X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5ee9afcc22911391ea439353b4e8e984b8976f38..fc057cea384990dcf0b445d68750b3df4358c395:/target/linux/brcm63xx/patches-2.6.27/011-add_preliminary_board_support.patch diff --git a/target/linux/brcm63xx/patches-2.6.27/011-add_preliminary_board_support.patch b/target/linux/brcm63xx/patches-2.6.27/011-add_preliminary_board_support.patch index a738bcc7c..1d8789fd7 100644 --- a/target/linux/brcm63xx/patches-2.6.27/011-add_preliminary_board_support.patch +++ b/target/linux/brcm63xx/patches-2.6.27/011-add_preliminary_board_support.patch @@ -1,4 +1,4 @@ -From b95a2bbbcae5423e5404a7b3c8dd1685e1786f13 Mon Sep 17 00:00:00 2001 +From 16dc080062a37c21642bc77fde5391a3416729a4 Mon Sep 17 00:00:00 2001 From: Maxime Bizon Date: Wed, 17 Sep 2008 15:55:36 +0200 Subject: [PATCH] [MIPS] BCM63XX: Add preliminary board support. @@ -9,20 +9,18 @@ Signed-off-by: Maxime Bizon arch/mips/bcm63xx/Makefile | 2 + arch/mips/bcm63xx/boards/Kconfig | 10 + arch/mips/bcm63xx/boards/Makefile | 1 + - arch/mips/bcm63xx/boards/board_bcm963xx.c | 322 ++++++++++++++++++++++++ + arch/mips/bcm63xx/boards/board_bcm963xx.c | 328 ++++++++++++++++++++++++ arch/mips/bcm63xx/prom.c | 4 + arch/mips/bcm63xx/setup.c | 16 +- include/asm-mips/mach-bcm63xx/bcm63xx_board.h | 12 + include/asm-mips/mach-bcm63xx/board_bcm963xx.h | 50 ++++ - 9 files changed, 417 insertions(+), 2 deletions(-) + 9 files changed, 423 insertions(+), 2 deletions(-) create mode 100644 arch/mips/bcm63xx/boards/Kconfig create mode 100644 arch/mips/bcm63xx/boards/Makefile create mode 100644 arch/mips/bcm63xx/boards/board_bcm963xx.c create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_board.h create mode 100644 include/asm-mips/mach-bcm63xx/board_bcm963xx.h -diff --git a/arch/mips/bcm63xx/Kconfig b/arch/mips/bcm63xx/Kconfig -index be120f7..8c192e7 100644 --- a/arch/mips/bcm63xx/Kconfig +++ b/arch/mips/bcm63xx/Kconfig @@ -17,3 +17,5 @@ config BCM63XX_CPU_6358 @@ -31,8 +29,6 @@ index be120f7..8c192e7 100644 endmenu + +source "arch/mips/bcm63xx/boards/Kconfig" -diff --git a/arch/mips/bcm63xx/Makefile b/arch/mips/bcm63xx/Makefile -index 5358093..10462ae 100644 --- a/arch/mips/bcm63xx/Makefile +++ b/arch/mips/bcm63xx/Makefile @@ -5,3 +5,5 @@ obj-y += dev-usb-ohci.o @@ -41,9 +37,6 @@ index 5358093..10462ae 100644 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o + +obj-y += boards/ -diff --git a/arch/mips/bcm63xx/boards/Kconfig b/arch/mips/bcm63xx/boards/Kconfig -new file mode 100644 -index 0000000..da5eeaa --- /dev/null +++ b/arch/mips/bcm63xx/boards/Kconfig @@ -0,0 +1,10 @@ @@ -57,19 +50,13 @@ index 0000000..da5eeaa + help + +endchoice -diff --git a/arch/mips/bcm63xx/boards/Makefile b/arch/mips/bcm63xx/boards/Makefile -new file mode 100644 -index 0000000..af07c1a --- /dev/null +++ b/arch/mips/bcm63xx/boards/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o -diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c -new file mode 100644 -index 0000000..de52a2a --- /dev/null +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -0,0 +1,322 @@ +@@ -0,0 +1,353 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive @@ -122,6 +109,30 @@ index 0000000..de52a2a + }, +}; + ++static struct board_info __initdata board_96348gw_11 = { ++ .name = "96348GW-11", ++ .expected_cpu_id = 0x6348, ++ ++ .has_enet0 = 1, ++ .has_enet1 = 1, ++ .has_pci = 1, ++ ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .enet1 = { ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++ ++ ++ .has_ohci0 = 1, ++ .has_pccard = 1, ++ .has_ehci0 = 1, ++}; ++ +static struct board_info __initdata board_96348gw = { + .name = "96348GW", + .expected_cpu_id = 0x6348, @@ -172,6 +183,7 @@ index 0000000..de52a2a +#ifdef CONFIG_BCM63XX_CPU_6348 + &board_96348r, + &board_96348gw, ++ &board_96348gw_11, +#endif + +#ifdef CONFIG_BCM63XX_CPU_6358 @@ -231,8 +243,14 @@ index 0000000..de52a2a + } + + /* bail out if board is not found, will complain later */ -+ if (!board.name) ++ if (!board.name[0]) { ++ char name[17]; ++ memcpy(name, nvram.name, 16); ++ name[16] = 0; ++ printk(KERN_ERR PFX "unknown bcm963xx board: %s\n", ++ name); + return; ++ } + + /* setup pin multiplexing depending on board enabled device, + * this has to be done this early since PCI init is done @@ -271,7 +289,7 @@ index 0000000..de52a2a + */ +void __init board_setup(void) +{ -+ if (!board.name) ++ if (!board.name[0]) + panic("unable to detect bcm963xx board"); + printk(KERN_INFO PFX "board name: %s\n", board.name); + @@ -392,8 +410,6 @@ index 0000000..de52a2a + return 0; +} + -diff --git a/arch/mips/bcm63xx/prom.c b/arch/mips/bcm63xx/prom.c -index f0b49e8..d97ceed 100644 --- a/arch/mips/bcm63xx/prom.c +++ b/arch/mips/bcm63xx/prom.c @@ -9,6 +9,7 @@ @@ -414,8 +430,6 @@ index f0b49e8..d97ceed 100644 } void __init prom_free_prom_memory(void) -diff --git a/arch/mips/bcm63xx/setup.c b/arch/mips/bcm63xx/setup.c -index 4d8b127..c4516fb 100644 --- a/arch/mips/bcm63xx/setup.c +++ b/arch/mips/bcm63xx/setup.c @@ -16,6 +16,7 @@ @@ -426,7 +440,7 @@ index 4d8b127..c4516fb 100644 #include #include #include -@@ -87,8 +88,9 @@ static void __bcm63xx_machine_reboot(char *p) +@@ -87,8 +88,9 @@ static void __bcm63xx_machine_reboot(cha const char *get_system_type(void) { static char buf[128]; @@ -460,9 +474,6 @@ index 4d8b127..c4516fb 100644 } + +device_initcall(bcm63xx_register_devices); -diff --git a/include/asm-mips/mach-bcm63xx/bcm63xx_board.h b/include/asm-mips/mach-bcm63xx/bcm63xx_board.h -new file mode 100644 -index 0000000..fa3e7e6 --- /dev/null +++ b/include/asm-mips/mach-bcm63xx/bcm63xx_board.h @@ -0,0 +1,12 @@ @@ -478,9 +489,6 @@ index 0000000..fa3e7e6 +int board_register_devices(void); + +#endif /* ! BCM63XX_BOARD_H_ */ -diff --git a/include/asm-mips/mach-bcm63xx/board_bcm963xx.h b/include/asm-mips/mach-bcm63xx/board_bcm963xx.h -new file mode 100644 -index 0000000..17e4e7e --- /dev/null +++ b/include/asm-mips/mach-bcm63xx/board_bcm963xx.h @@ -0,0 +1,50 @@ @@ -534,6 +542,3 @@ index 0000000..17e4e7e +}; + +#endif /* ! BOARD_BCM963XX_H_ */ --- -1.5.4.3 -