mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Rename UC870x to UC87xx
This is a driver for the UART controller on the S5L87xx series of SoCs, which is named after the SoC family. Since S5L8720 is confirmed to have the same interface and the newer models probably also have it, the driver is renamed to reflect this. Change-Id: I974c002924372e860db0e49235d108dab87f8831
This commit is contained in:
parent
39f8101d60
commit
fb134c9533
14 changed files with 38 additions and 38 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef __UC870X_H__
|
||||
#define __UC870X_H__
|
||||
#ifndef __UC87XX_H__
|
||||
#define __UC87XX_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -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__ */
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 */
|
Loading…
Add table
Add a link
Reference in a new issue