diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-07-23 01:20:12 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-08 14:29:30 -0400 |
commit | 08ccf57283f89adbc2ff897ad82d6ad4560db7cd (patch) | |
tree | 11d715ac33eab75e57a8e62b0b7d822e316a9145 /arch/mips/bcm47xx/serial.c | |
parent | 908debc8da0d5a91418f71c6a462f62bd2ac69ef (diff) | |
download | linux-08ccf57283f89adbc2ff897ad82d6ad4560db7cd.tar.gz linux-08ccf57283f89adbc2ff897ad82d6ad4560db7cd.tar.bz2 linux-08ccf57283f89adbc2ff897ad82d6ad4560db7cd.zip |
bcm47xx: prepare to support different buses
Prepare bcm47xx to support different System buses. Before adding
support for bcma it should be possible to build bcm47xx without the
need of ssb. With this patch bcm47xx does not directly contain a
ssb_bus, but a union contain all the supported system buses. As a SoC
just uses one system bus a union is a good choice.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'arch/mips/bcm47xx/serial.c')
-rw-r--r-- | arch/mips/bcm47xx/serial.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/serial.c b/arch/mips/bcm47xx/serial.c index 59c11afdb2ab..17c67e24b549 100644 --- a/arch/mips/bcm47xx/serial.c +++ b/arch/mips/bcm47xx/serial.c @@ -23,10 +23,10 @@ static struct platform_device uart8250_device = { }, }; -static int __init uart8250_init(void) +static int __init uart8250_init_ssb(void) { int i; - struct ssb_mipscore *mcore = &(ssb_bcm47xx.mipscore); + struct ssb_mipscore *mcore = &(bcm47xx_bus.ssb.mipscore); memset(&uart8250_data, 0, sizeof(uart8250_data)); @@ -45,6 +45,15 @@ static int __init uart8250_init(void) return platform_device_register(&uart8250_device); } +static int __init uart8250_init(void) +{ + switch (bcm47xx_bus_type) { + case BCM47XX_BUS_TYPE_SSB: + return uart8250_init_ssb(); + } + return -EINVAL; +} + module_init(uart8250_init); MODULE_AUTHOR("Aurelien Jarno <aurelien@aurel32.net>"); |