1
0
Fork 0
forked from len0rd/rockbox

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:
Vencislav Atanasov 2024-11-21 00:05:58 +02:00
parent 39f8101d60
commit fb134c9533
14 changed files with 38 additions and 38 deletions

View file

@ -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;

View file

@ -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

View file

@ -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 =

View file

@ -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 =

View file

@ -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);

View file

@ -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;

View file

@ -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

View file

@ -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 =

View file

@ -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);

View file

@ -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 */