From 13e886c3b435d14668aefaed449d8d7ca6dce3a8 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 27 Jul 2005 11:44:07 -0700 Subject: [PATCH] ppc32: Make the UARTs on MPC824x individual platform devices The UARTs on the MPC824x are unique devices and really shouldn't be thought of as a DUART. In addition, if both UARTs are in use we need to configure the part to enable the 2nd UART since the pins for the UARTs are multiplexed. Adds support to run the 824x Sandpoint with both UARTs if desired. Signed-off-by: Matt McClintock Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/ppc/platforms/sandpoint.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'arch/ppc/platforms/sandpoint.c') diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index 8b149c2fc54f..21e31346b12b 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c @@ -311,19 +311,22 @@ sandpoint_setup_arch(void) { bd_t *bp = (bd_t *)__res; struct plat_serial8250_port *pdata; - pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC10X_DUART); + pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC10X_UART0); if (pdata) { pdata[0].uartclk = bp->bi_busfreq; - pdata[0].membase = ioremap(pdata[0].mapbase, 0x100); + } - /* this disables the 2nd serial port on the DUART - * since the sandpoint does not have it connected */ - pdata[1].uartclk = 0; - pdata[1].irq = 0; - pdata[1].mapbase = 0; +#ifdef CONFIG_SANDPOINT_ENABLE_UART1 + pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC10X_UART1); + if (pdata) + { + pdata[0].uartclk = bp->bi_busfreq; } +#else + ppc_sys_device_remove(MPC10X_UART1); +#endif } printk(KERN_INFO "Motorola SPS Sandpoint Test Platform\n"); -- cgit v1.2.3-59-g8ed1b