diff --git a/firmware/SOURCES b/firmware/SOURCES index 47b4c56ca8..93d62ec8cb 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -1544,7 +1544,7 @@ target/arm/s5l8700/ipodnano2g/pmu-nano2g.c target/arm/s5l8700/ipodnano2g/rtc-nano2g.c target/arm/s5l8700/usb-s5l8701.c #ifdef HAVE_SERIAL -target/arm/uc870x.c +target/arm/uc87xx.c target/arm/s5l8700/uart-s5l8701.c target/arm/s5l8700/ipodnano2g/serial-nano2g.c #endif @@ -1583,7 +1583,7 @@ target/arm/s5l8702/ipod6g/adc-6g.c target/arm/s5l8702/usb-s5l8702.c #endif #ifdef HAVE_SERIAL -target/arm/uc870x.c +target/arm/uc87xx.c target/arm/s5l8702/uart-s5l8702.c target/arm/s5l8702/ipod6g/serial-6g.c #endif diff --git a/firmware/export/s5l8700.h b/firmware/export/s5l8700.h index 945cf932cd..577129ff74 100644 --- a/firmware/export/s5l8700.h +++ b/firmware/export/s5l8700.h @@ -620,7 +620,7 @@ /* 25. UART */ #if CONFIG_CPU==S5L8701 -/* s5l8701 UC870X HW: 3 UARTC, 1 port per UARTC */ +/* s5l8701 UC87XX HW: 3 UARTC, 1 port per UARTC */ #define S5L8701_N_UARTC 3 #define S5L8701_N_PORTS 3 @@ -635,7 +635,7 @@ #define UARTC2_PORT_OFFSET 0x0 #else -/* s5l8700 UC870X HW: 1 UARTC, 2 ports */ +/* s5l8700 UC87XX HW: 1 UARTC, 2 ports */ #define S5L8700_N_UARTC 1 #define S5L8700_N_PORTS 2 diff --git a/firmware/export/s5l8702.h b/firmware/export/s5l8702.h index 4b22e25366..72bb788c64 100644 --- a/firmware/export/s5l8702.h +++ b/firmware/export/s5l8702.h @@ -741,7 +741,7 @@ /////UART///// -/* s5l8702 UC870X HW: 1 UARTC, 4 ports */ +/* s5l8702 UC87XX HW: 1 UARTC, 4 ports */ #define UARTC_BASE_ADDR 0x3CC00000 #define UARTC_N_PORTS 4 #define UARTC_PORT_OFFSET 0x4000 diff --git a/firmware/export/uc870x.h b/firmware/export/uc87xx.h similarity index 98% rename from firmware/export/uc870x.h rename to firmware/export/uc87xx.h index 7f0ac8169a..99303ef9e6 100644 --- a/firmware/export/uc870x.h +++ b/firmware/export/uc87xx.h @@ -18,8 +18,8 @@ * KIND, either express or implied. * ****************************************************************************/ -#ifndef __UC870X_H__ -#define __UC870X_H__ +#ifndef __UC87XX_H__ +#define __UC87XX_H__ #include #include @@ -30,10 +30,10 @@ /* - * UC870x: UART controller for s5l870x + * UC87xx: UART controller for s5l87xx * * This UART is similar to the UART described in s5l8700 datasheet, - * (see also s3c2416 and s3c6400 datasheets). On s5l8701+ the UC870x + * (see also s3c2416 and s3c6400 datasheets). On s5l8701+ the UC87xx * includes autobauding, and fine tuning for Tx/Rx speed on s5l8702+. */ #if (CONFIG_CPU == S5L8701) @@ -310,7 +310,7 @@ struct uartc_port bool abr_aborted; #endif -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG uint32_t n_tx_bytes; uint32_t n_rx_bytes; uint32_t n_ovr_err; @@ -321,12 +321,12 @@ struct uartc_port uint32_t n_abnormal0; uint32_t n_abnormal1; #endif /* UART_CAP_AUTOBAUD */ -#endif /* UC870X_DEBUG */ +#endif /* UC87XX_DEBUG */ }; /* - * uc870x low level API + * uc87xx low level API */ /* Initialization */ @@ -365,7 +365,7 @@ void uartc_port_abr_stop(struct uartc_port *port); void uartc_callback(const struct uartc *uartc, int port_id); /* Debug */ -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG void uartc_port_get_line_info(struct uartc_port *port, int *tx_status, int *rx_status, int *tx_speed, int *rx_speed, char *line_cfg); @@ -380,6 +380,6 @@ enum { int uartc_port_get_abr_info(struct uartc_port *port, uint32_t *abr_cnt); #endif /* UART_CAP_AUTOBAUD */ -#endif /* UC870X_DEBUG */ +#endif /* UC87XX_DEBUG */ -#endif /* __UC870X_H__ */ +#endif /* __UC87XX_H__ */ diff --git a/firmware/target/arm/s5l8700/debug-s5l8700.c b/firmware/target/arm/s5l8700/debug-s5l8700.c index c42eac0438..f174fd5728 100644 --- a/firmware/target/arm/s5l8700/debug-s5l8700.c +++ b/firmware/target/arm/s5l8700/debug-s5l8700.c @@ -34,7 +34,7 @@ #endif #ifdef HAVE_SERIAL #include "uart-target.h" -#include "uc870x.h" +#include "uc87xx.h" #endif #define DEBUG_CANCEL BUTTON_MENU @@ -53,7 +53,7 @@ bool dbg_hw_info(void) int i; #ifdef IPOD_NANO2G unsigned int state = 0; -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG const unsigned int max_states=3; #else const unsigned int max_states=2; @@ -131,7 +131,7 @@ bool dbg_hw_info(void) _DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off"); _DEBUG_PRINTF("brightness value: %d", pmu_read(0x28)); } -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG else if(state==2) { extern struct uartc_port ser_port; diff --git a/firmware/target/arm/s5l8700/ipodnano2g/serial-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/serial-nano2g.c index 5ff0b0ca25..ee1c49a536 100644 --- a/firmware/target/arm/s5l8700/ipodnano2g/serial-nano2g.c +++ b/firmware/target/arm/s5l8700/ipodnano2g/serial-nano2g.c @@ -27,7 +27,7 @@ #include "serial.h" #include "s5l8700.h" -#include "uc870x.h" +#include "uc87xx.h" /* Define LOGF_ENABLE to enable logf output in this file */ #define LOGF_ENABLE diff --git a/firmware/target/arm/s5l8700/uart-s5l8700.c b/firmware/target/arm/s5l8700/uart-s5l8700.c index 80207e94df..3b75973318 100644 --- a/firmware/target/arm/s5l8700/uart-s5l8700.c +++ b/firmware/target/arm/s5l8700/uart-s5l8700.c @@ -25,7 +25,7 @@ #include "system.h" #include "s5l8700.h" -#include "uc870x.h" +#include "uc87xx.h" /* @@ -34,7 +34,7 @@ /* - * s5l8700 UC870X HW: 1 UARTC, 2 ports + * s5l8700 UC87XX HW: 1 UARTC, 2 ports */ static struct uartc_port *uartc_port_l[UARTC_N_PORTS]; const struct uartc s5l8700_uartc = diff --git a/firmware/target/arm/s5l8700/uart-s5l8701.c b/firmware/target/arm/s5l8700/uart-s5l8701.c index b9fb1632ac..2dd3411f62 100644 --- a/firmware/target/arm/s5l8700/uart-s5l8701.c +++ b/firmware/target/arm/s5l8700/uart-s5l8701.c @@ -25,11 +25,11 @@ #include "system.h" #include "s5l8700.h" -#include "uc870x.h" +#include "uc87xx.h" /* - * s5l8701 UC870X HW: 3 UARTC, 1 port per UARTC + * s5l8701 UC87XX HW: 3 UARTC, 1 port per UARTC */ static struct uartc_port *uartc0_port_l[UARTC0_N_PORTS]; const struct uartc s5l8701_uartc0 = diff --git a/firmware/target/arm/s5l8700/uart-target.h b/firmware/target/arm/s5l8700/uart-target.h index d6d45b9073..76446f7fad 100644 --- a/firmware/target/arm/s5l8700/uart-target.h +++ b/firmware/target/arm/s5l8700/uart-target.h @@ -22,7 +22,7 @@ #define __UART_TARGET_H__ /* Define this to show debug data on "View HW Info" */ -/* #define UC870X_DEBUG */ +/* #define UC87XX_DEBUG */ void uart_init(void); diff --git a/firmware/target/arm/s5l8702/debug-s5l8702.c b/firmware/target/arm/s5l8702/debug-s5l8702.c index 26b8e557a0..bd7c39462e 100644 --- a/firmware/target/arm/s5l8702/debug-s5l8702.c +++ b/firmware/target/arm/s5l8702/debug-s5l8702.c @@ -34,7 +34,7 @@ #include "pcm-target.h" #ifdef HAVE_SERIAL #include "uart-target.h" -#include "uc870x.h" +#include "uc87xx.h" #endif #include "clocking-s5l8702.h" @@ -53,7 +53,7 @@ bool dbg_hw_info(void) int line; int i; unsigned int state = 0; -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG const unsigned int max_states=3; #else const unsigned int max_states=2; @@ -145,7 +145,7 @@ bool dbg_hw_info(void) _DEBUG_PRINTF("USB D-: %d mV", adc_read_usbdata_voltage(false)); line++; } -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG else if(state==(max_states-1)) { extern struct uartc_port ser_port; diff --git a/firmware/target/arm/s5l8702/ipod6g/serial-6g.c b/firmware/target/arm/s5l8702/ipod6g/serial-6g.c index f1f06987bc..c90180142f 100644 --- a/firmware/target/arm/s5l8702/ipod6g/serial-6g.c +++ b/firmware/target/arm/s5l8702/ipod6g/serial-6g.c @@ -27,7 +27,7 @@ #include "serial.h" #include "s5l8702.h" -#include "uc870x.h" +#include "uc87xx.h" /* Define LOGF_ENABLE to enable logf output in this file */ #define LOGF_ENABLE diff --git a/firmware/target/arm/s5l8702/uart-s5l8702.c b/firmware/target/arm/s5l8702/uart-s5l8702.c index 9d8faaa173..b46ce6bc45 100644 --- a/firmware/target/arm/s5l8702/uart-s5l8702.c +++ b/firmware/target/arm/s5l8702/uart-s5l8702.c @@ -26,11 +26,11 @@ #include "system.h" #include "s5l8702.h" -#include "uc870x.h" +#include "uc87xx.h" /* - * s5l8702 UC870X HW: 1 UARTC, 4 ports + * s5l8702 UC87XX HW: 1 UARTC, 4 ports */ static struct uartc_port *uartc_port_l[UARTC_N_PORTS]; const struct uartc s5l8702_uartc = diff --git a/firmware/target/arm/s5l8702/uart-target.h b/firmware/target/arm/s5l8702/uart-target.h index d6d45b9073..76446f7fad 100644 --- a/firmware/target/arm/s5l8702/uart-target.h +++ b/firmware/target/arm/s5l8702/uart-target.h @@ -22,7 +22,7 @@ #define __UART_TARGET_H__ /* Define this to show debug data on "View HW Info" */ -/* #define UC870X_DEBUG */ +/* #define UC87XX_DEBUG */ void uart_init(void); diff --git a/firmware/target/arm/uc870x.c b/firmware/target/arm/uc87xx.c similarity index 98% rename from firmware/target/arm/uc870x.c rename to firmware/target/arm/uc87xx.c index 61a1cc41e0..e42454e581 100644 --- a/firmware/target/arm/uc870x.c +++ b/firmware/target/arm/uc87xx.c @@ -25,11 +25,11 @@ #include "system.h" #include "uart-target.h" -#include "uc870x.h" +#include "uc87xx.h" /* - * UC870x: UART controller for s5l870x + * UC87xx: UART controller for s5l87xx */ /* Rx related INTs */ @@ -242,7 +242,7 @@ bool uartc_port_tx_ready(struct uartc_port *port) void uartc_port_tx_byte(struct uartc_port *port, uint8_t ch) { UTXH(port->baddr) = ch; -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG port->n_tx_bytes++; #endif } @@ -327,7 +327,7 @@ void ICODE_ATTR uartc_callback(const struct uartc* uartc, int port_id) if (ints & UTRSTAT_AUTOBR_INT_BIT) { if (uartc_port_abr_status(port) == UABRSTAT_STATUS_COUNTING) { - #ifdef UC870X_DEBUG + #ifdef UC87XX_DEBUG if (_UCON_RD(baddr) & UCON_AUTOBR_START_BIT) port->n_abnormal0++; else port->n_abnormal1++; #endif @@ -365,7 +365,7 @@ void ICODE_ATTR uartc_callback(const struct uartc* uartc, int port_id) port->rx_cb(len, port->rx_data, port->rx_err); #endif -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG if (len) { port->n_rx_bytes += len; if (port->rx_err[0] & UERSTAT_OVERRUN_BIT) @@ -393,7 +393,7 @@ void ICODE_ATTR uartc_callback(const struct uartc* uartc, int port_id) } -#ifdef UC870X_DEBUG +#ifdef UC87XX_DEBUG /*#define LOGF_ENABLE*/ #include "logf.h" @@ -506,4 +506,4 @@ int uartc_port_get_abr_info(struct uartc_port *port, uint32_t *abr_cnt) return status; } #endif /* UART_CAP_AUTOBAUD */ -#endif /* UC870X_DEBUG */ +#endif /* UC87XX_DEBUG */