mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-27 14:14:37 +08:00
serial/ns16550: ns16550 has a different register layout on SOC_DA8XX
also fix NS16550_init() as we need 16x divider Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com> Acked-by: Christian Riesch <christian.riesch@omicron.at> Tested-by: Christian Riesch <christian.riesch@omicron.at> Acked-by: Sughosh Ganu <urwithsughosh@gmail.com> Tested-by: Sughosh Ganu <urwithsughosh@gmail.com>
This commit is contained in:
parent
680866a502
commit
99b603e714
@ -52,7 +52,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
|
|||||||
serial_out((baud_divisor >> 8) & 0xff, &com_port->dlm);
|
serial_out((baud_divisor >> 8) & 0xff, &com_port->dlm);
|
||||||
serial_out(UART_LCRVAL, &com_port->lcr);
|
serial_out(UART_LCRVAL, &com_port->lcr);
|
||||||
#if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
|
#if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
|
||||||
defined(CONFIG_AM33XX)
|
defined(CONFIG_AM33XX) || defined(CONFIG_SOC_DA8XX)
|
||||||
|
|
||||||
#if defined(CONFIG_APTIX)
|
#if defined(CONFIG_APTIX)
|
||||||
/* /13 mode so Aptix 6MHz can hit 115200 */
|
/* /13 mode so Aptix 6MHz can hit 115200 */
|
||||||
|
@ -46,6 +46,14 @@ struct NS16550 {
|
|||||||
UART_REG(lsr); /* 5 */
|
UART_REG(lsr); /* 5 */
|
||||||
UART_REG(msr); /* 6 */
|
UART_REG(msr); /* 6 */
|
||||||
UART_REG(spr); /* 7 */
|
UART_REG(spr); /* 7 */
|
||||||
|
#ifdef CONFIG_SOC_DA8XX
|
||||||
|
UART_REG(reg8); /* 8 */
|
||||||
|
UART_REG(reg9); /* 9 */
|
||||||
|
UART_REG(revid1); /* A */
|
||||||
|
UART_REG(revid2); /* B */
|
||||||
|
UART_REG(pwr_mgmt); /* C */
|
||||||
|
UART_REG(mdr1); /* D */
|
||||||
|
#else
|
||||||
UART_REG(mdr1); /* 8 */
|
UART_REG(mdr1); /* 8 */
|
||||||
UART_REG(reg9); /* 9 */
|
UART_REG(reg9); /* 9 */
|
||||||
UART_REG(regA); /* A */
|
UART_REG(regA); /* A */
|
||||||
@ -58,6 +66,7 @@ struct NS16550 {
|
|||||||
UART_REG(ssr); /* 11*/
|
UART_REG(ssr); /* 11*/
|
||||||
UART_REG(reg12); /* 12*/
|
UART_REG(reg12); /* 12*/
|
||||||
UART_REG(osc_12m_sel); /* 13*/
|
UART_REG(osc_12m_sel); /* 13*/
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define thr rbr
|
#define thr rbr
|
||||||
|
Loading…
Reference in New Issue
Block a user