MIPS: Alchemy: merge PB1550 support into DB1550 code
PATCH 1/1 MIPS: Alchemy: merge PB1550 support into DB1550 code
The PB1550 is more or less a DB1550 without the PCI IDE controller, a more complicated (read: configurable) Flash setup and some other minor changes. Like the DB1550 it can be automatically detected by reading the CPLD ID register bits.
This patch adds PB1550 detection and setup to the DB1550 code.
Signed-off-by Manuel Lauss <[email protected]>
---
Tested only on the DB1550 since I don't have and don't know anyone with a PB1550.
Applies on top of the previos db1200/1300/1550 merge patch.
arch/mips/alchemy/Kconfig | 11 +- arch/mips/alchemy/devboards/Makefile | 1 - arch/mips/alchemy/devboards/db1235.c | 16 ++- arch/mips/alchemy/devboards/db1550.c | 181 +++++++++++++++++++++----- arch/mips/alchemy/devboards/pb1550.c | 244 ----------------------------------- arch/mips/configs/pb1550_defconfig | 145 --------------------- 6 files changed, 161 insertions(+), 437 deletions(-) delete mode 100644 arch/mips/alchemy/devboards/pb1550.c delete mode 100644 arch/mips/configs/pb1550_defconfig
arch/mips/alchemy/Kconfig +1 -10
@@ -37,7 +37,7 @@ config MIPS_DB1000 select SYS_HAS_EARLY_PRINTK config MIPS_DB1235 - bool "Alchemy DB1200/PB1200/DB1300/DB1550 boards" + bool "Alchemy DB1200/PB1200/DB1300/DB1550/PB1550 boards" select ARCH_REQUIRE_GPIOLIB select HW_HAS_PCI select DMA_COHERENT
@@ -62,15 +62,6 @@ config MIPS_PB1500 select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_HAS_EARLY_PRINTK -config MIPS_PB1550 - bool "Alchemy PB1550 board" - select ALCHEMY_GPIOINT_AU1000 - select DMA_NONCOHERENT - select HW_HAS_PCI - select MIPS_DISABLE_OBSOLETE_IDE - select SYS_SUPPORTS_LITTLE_ENDIAN - select SYS_HAS_EARLY_PRINTK - config MIPS_XXS1500 bool "MyCable XXS1500 board" select DMA_NONCOHERENT
arch/mips/alchemy/devboards/Makefile +0 -1
@@ -6,6 +6,5 @@ obj-y += bcsr.o platform.o obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_MIPS_PB1100) += pb1100.o obj-$(CONFIG_MIPS_PB1500) += pb1500.o -obj-$(CONFIG_MIPS_PB1550) += pb1550.o obj-$(CONFIG_MIPS_DB1000) += db1000.o obj-$(CONFIG_MIPS_DB1235) += db1235.o db1200.o db1300.o db1550.o
arch/mips/alchemy/devboards/db1235.c +13 -3
@@ -13,7 +13,7 @@ int __init db1300_board_setup(void);int __init db1300_dev_setup (void );int __init db1550_board_setup (void );int __init db1550_dev_setup (void ); -int __init db1550_pci_setup (void ); +int __init db1550_pci_setup (int );static const char *board_type_str (void ) {
@@ -27,6 +27,9 @@ static const char *board_type_str(void)return "DB1300" ;case BCSR_WHOAMI_DB1550 :return "DB1550" ; +case BCSR_WHOAMI_PB1550_SDR : +case BCSR_WHOAMI_PB1550_DDR : +return "PB1550" ;default :return "(unknown)" ; }
@@ -61,8 +64,13 @@ void __init board_setup(void)int __init db1235_arch_init (void ) { -if (BCSR_WHOAMI_BOARD (bcsr_read (BCSR_WHOAMI )) ==BCSR_WHOAMI_DB1550 ) -return db1550_pci_setup (); +int id =BCSR_WHOAMI_BOARD (bcsr_read (BCSR_WHOAMI )); +if (id ==BCSR_WHOAMI_DB1550 ) +return db1550_pci_setup (0 ); +else if ((id ==BCSR_WHOAMI_PB1550_SDR ) || + (id ==BCSR_WHOAMI_PB1550_DDR )) +return db1550_pci_setup (1 ); +return 0 ; }arch_initcall (db1235_arch_init);
@@ -77,6 +85,8 @@ int __init db1235_dev_init(void)case BCSR_WHOAMI_DB1300 :return db1300_dev_setup ();case BCSR_WHOAMI_DB1550 : +case BCSR_WHOAMI_PB1550_SDR : +case BCSR_WHOAMI_PB1550_DDR :return db1550_dev_setup (); }return 0 ;
arch/mips/alchemy/devboards/db1550.c +147 -34
261 lines not on this page · raw message
arch/mips/alchemy/devboards/pb1550.c deleted +0 -244
244 lines not on this page · raw message
arch/mips/configs/pb1550_defconfig deleted +0 -145
145 lines not on this page · raw message
Signature · 1 line
1.7.12
Thanks, queued.
Ralf