diff options
Diffstat (limited to 'target/linux/brcm63xx/patches-2.6.39')
17 files changed, 157 insertions, 36 deletions
diff --git a/target/linux/brcm63xx/patches-2.6.39/001-6345_cpu.patch b/target/linux/brcm63xx/patches-2.6.39/001-6345_cpu.patch new file mode 100644 index 0000000000..b8cb016fb8 --- /dev/null +++ b/target/linux/brcm63xx/patches-2.6.39/001-6345_cpu.patch @@ -0,0 +1,122 @@ +--- a/arch/mips/bcm63xx/cpu.c ++++ b/arch/mips/bcm63xx/cpu.c +@@ -260,8 +260,10 @@ static unsigned int detect_memory_size(v + unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0; + u32 val; + +- if (BCMCPU_IS_6345()) +- return (8 * 1024 * 1024); ++ if (BCMCPU_IS_6345()) { ++ val = bcm_sdram_readl(SDRAM_MBASE_REG); ++ return (val * 8 * 1024 * 1024); ++ } + + if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) { + val = bcm_sdram_readl(SDRAM_CFG_REG); +--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h ++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +@@ -735,6 +735,8 @@ + #define SDRAM_CFG_BANK_SHIFT 13 + #define SDRAM_CFG_BANK_MASK (1 << SDRAM_CFG_BANK_SHIFT) + ++#define SDRAM_MBASE_REG 0xc ++ + #define SDRAM_PRIO_REG 0x2C + #define SDRAM_PRIO_MIPS_SHIFT 29 + #define SDRAM_PRIO_MIPS_MASK (1 << SDRAM_PRIO_MIPS_SHIFT) +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -698,15 +698,9 @@ void __init board_prom_init(void) + char cfe_version[32]; + u32 val; + +- /* read base address of boot chip select (0) +- * 6345 does not have MPI but boots from standard +- * MIPS Flash address */ +- if (BCMCPU_IS_6345()) +- val = 0x1fc00000; +- else { +- val = bcm_mpi_readl(MPI_CSBASE_REG(0)); +- val &= MPI_CSBASE_BASE_MASK; +- } ++ /* read base address of boot chip select (0) */ ++ val = bcm_mpi_readl(MPI_CSBASE_REG(0)); ++ val &= MPI_CSBASE_BASE_MASK; + boot_addr = (u8 *)KSEG1ADDR(val); + + /* dump cfe version */ +@@ -881,12 +875,9 @@ int __init board_register_devices(void) + bcm63xx_dsp_register(&board.dsp); + + /* read base address of boot chip select (0) */ +- if (BCMCPU_IS_6345()) +- val = 0x1fc00000; +- else { +- val = bcm_mpi_readl(MPI_CSBASE_REG(0)); +- val &= MPI_CSBASE_BASE_MASK; +- } ++ val = bcm_mpi_readl(MPI_CSBASE_REG(0)); ++ val &= MPI_CSBASE_BASE_MASK; ++ + mtd_resources[0].start = val; + mtd_resources[0].end = 0x1FFFFFFF; + +--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h ++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +@@ -163,7 +163,7 @@ enum bcm63xx_regs_set { + #define BCM_6345_ENET0_BASE (0xfffe1800) + #define BCM_6345_ENETDMA_BASE (0xfffe2800) + #define BCM_6345_PCMCIA_BASE (0xfffe2028) +-#define BCM_6345_MPI_BASE (0xdeadbeef) ++#define BCM_6345_MPI_BASE (0xfffe2000) + #define BCM_6345_OHCI0_BASE (0xfffe2100) + #define BCM_6345_OHCI_PRIV_BASE (0xfffe2200) + #define BCM_6345_USBH_PRIV_BASE (0xdeadbeef) +--- a/arch/mips/bcm63xx/gpio.c ++++ b/arch/mips/bcm63xx/gpio.c +@@ -4,7 +4,7 @@ + * for more details. + * + * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr> +- * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> ++ * Copyright (C) 2008-2011 Florian Fainelli <florian@openwrt.org> + */ + + #include <linux/kernel.h> +@@ -33,7 +33,10 @@ static void bcm63xx_gpio_set(struct gpio + BUG(); + + if (gpio < 32) { +- reg = GPIO_DATA_LO_REG; ++ if (!BCMCPU_IS_6345()) ++ reg = GPIO_DATA_LO_REG; ++ else ++ reg = GPIO_DATA_HI_REG; + mask = 1 << gpio; + v = &gpio_out_low; + } else { +@@ -60,7 +63,10 @@ static int bcm63xx_gpio_get(struct gpio_ + BUG(); + + if (gpio < 32) { +- reg = GPIO_DATA_LO_REG; ++ if (!BCMCPU_IS_6345()) ++ reg = GPIO_DATA_LO_REG; ++ else ++ reg = GPIO_DATA_HI_REG; + mask = 1 << gpio; + } else { + reg = GPIO_DATA_HI_REG; +@@ -125,7 +131,11 @@ static struct gpio_chip bcm63xx_gpio_chi + + int __init bcm63xx_gpio_init(void) + { +- gpio_out_low = bcm_gpio_readl(GPIO_DATA_LO_REG); ++ if (!BCMCPU_IS_6345()) ++ gpio_out_low = bcm_gpio_readl(GPIO_DATA_LO_REG); ++ else ++ gpio_out_low = bcm_gpio_readl(GPIO_DATA_HI_REG); ++ + gpio_out_high = bcm_gpio_readl(GPIO_DATA_HI_REG); + bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count(); + pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio); diff --git a/target/linux/brcm63xx/patches-2.6.39/007-usb-ohci-support.patch b/target/linux/brcm63xx/patches-2.6.39/007-usb-ohci-support.patch index a70b5012e3..6ea57d9526 100644 --- a/target/linux/brcm63xx/patches-2.6.39/007-usb-ohci-support.patch +++ b/target/linux/brcm63xx/patches-2.6.39/007-usb-ohci-support.patch @@ -52,7 +52,7 @@ Signed-off-by: Maxime Bizon <mbizon@freebox.fr> #include <board_bcm963xx.h> #define PFX "board_bcm963xx: " -@@ -877,6 +878,9 @@ int __init board_register_devices(void) +@@ -871,6 +872,9 @@ int __init board_register_devices(void) !board_get_mac_address(board.enet1.mac_addr)) bcm63xx_enet_register(1, &board.enet1); diff --git a/target/linux/brcm63xx/patches-2.6.39/008-usb-ehci-support.patch b/target/linux/brcm63xx/patches-2.6.39/008-usb-ehci-support.patch index 0c236f0b7c..b6810d5d5f 100644 --- a/target/linux/brcm63xx/patches-2.6.39/008-usb-ehci-support.patch +++ b/target/linux/brcm63xx/patches-2.6.39/008-usb-ehci-support.patch @@ -44,7 +44,7 @@ Signed-off-by: Maxime Bizon <mbizon@freebox.fr> #include <board_bcm963xx.h> #define PFX "board_bcm963xx: " -@@ -878,6 +879,9 @@ int __init board_register_devices(void) +@@ -872,6 +873,9 @@ int __init board_register_devices(void) !board_get_mac_address(board.enet1.mac_addr)) bcm63xx_enet_register(1, &board.enet1); diff --git a/target/linux/brcm63xx/patches-2.6.39/040-bcm963xx_flashmap.patch b/target/linux/brcm63xx/patches-2.6.39/040-bcm963xx_flashmap.patch index a2162302ea..ec21ba7124 100644 --- a/target/linux/brcm63xx/patches-2.6.39/040-bcm963xx_flashmap.patch +++ b/target/linux/brcm63xx/patches-2.6.39/040-bcm963xx_flashmap.patch @@ -12,7 +12,7 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org> --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -816,20 +816,6 @@ void __init board_setup(void) +@@ -810,20 +810,6 @@ void __init board_setup(void) panic("unexpected CPU for bcm963xx board"); } @@ -33,7 +33,7 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org> static struct resource mtd_resources[] = { { .start = 0, /* filled at runtime */ -@@ -839,12 +825,9 @@ static struct resource mtd_resources[] = +@@ -833,12 +819,9 @@ static struct resource mtd_resources[] = }; static struct platform_device mtd_dev = { diff --git a/target/linux/brcm63xx/patches-2.6.39/100-reset_buttons.patch b/target/linux/brcm63xx/patches-2.6.39/100-reset_buttons.patch index 786c18b777..208ec55640 100644 --- a/target/linux/brcm63xx/patches-2.6.39/100-reset_buttons.patch +++ b/target/linux/brcm63xx/patches-2.6.39/100-reset_buttons.patch @@ -43,7 +43,7 @@ }; static struct board_info __initdata board_FAST2404 = { -@@ -838,12 +860,23 @@ static struct platform_device bcm63xx_gp +@@ -832,12 +854,23 @@ static struct platform_device bcm63xx_gp .dev.platform_data = &bcm63xx_led_data, }; @@ -67,7 +67,7 @@ if (board.has_uart0) bcm63xx_uart_register(0); -@@ -888,5 +921,16 @@ int __init board_register_devices(void) +@@ -879,5 +912,16 @@ int __init board_register_devices(void) platform_device_register(&bcm63xx_gpio_leds); diff --git a/target/linux/brcm63xx/patches-2.6.39/141-led_count.patch b/target/linux/brcm63xx/patches-2.6.39/141-led_count.patch index 48aca11d45..216f85797d 100644 --- a/target/linux/brcm63xx/patches-2.6.39/141-led_count.patch +++ b/target/linux/brcm63xx/patches-2.6.39/141-led_count.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -877,6 +877,7 @@ int __init board_register_devices(void) +@@ -871,6 +871,7 @@ int __init board_register_devices(void) { u32 val; int button_count = 0; @@ -8,7 +8,7 @@ if (board.has_uart0) bcm63xx_uart_register(0); -@@ -916,7 +917,11 @@ int __init board_register_devices(void) +@@ -907,7 +908,11 @@ int __init board_register_devices(void) platform_device_register(&mtd_dev); diff --git a/target/linux/brcm63xx/patches-2.6.39/180-udc_preliminary_support.patch b/target/linux/brcm63xx/patches-2.6.39/180-udc_preliminary_support.patch index 9c9ffbbdd9..9c37c008d5 100644 --- a/target/linux/brcm63xx/patches-2.6.39/180-udc_preliminary_support.patch +++ b/target/linux/brcm63xx/patches-2.6.39/180-udc_preliminary_support.patch @@ -17,7 +17,7 @@ }; static struct board_info __initdata board_rta1025w_16 = { -@@ -905,6 +908,9 @@ int __init board_register_devices(void) +@@ -899,6 +902,9 @@ int __init board_register_devices(void) if (board.has_dsp) bcm63xx_dsp_register(&board.dsp); @@ -25,8 +25,8 @@ + bcm63xx_udc_register(); + /* read base address of boot chip select (0) */ - if (BCMCPU_IS_6345()) - val = 0x1fc00000; + val = bcm_mpi_readl(MPI_CSBASE_REG(0)); + val &= MPI_CSBASE_BASE_MASK; --- /dev/null +++ b/arch/mips/bcm63xx/dev-usb-udc.c @@ -0,0 +1,58 @@ diff --git a/target/linux/brcm63xx/patches-2.6.39/200-extended-platform-devices.patch b/target/linux/brcm63xx/patches-2.6.39/200-extended-platform-devices.patch index 12e431b285..e4e44b3081 100644 --- a/target/linux/brcm63xx/patches-2.6.39/200-extended-platform-devices.patch +++ b/target/linux/brcm63xx/patches-2.6.39/200-extended-platform-devices.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -911,6 +911,9 @@ int __init board_register_devices(void) +@@ -905,6 +905,9 @@ int __init board_register_devices(void) if (board.has_udc0) bcm63xx_udc_register(); @@ -8,8 +8,8 @@ + platform_add_devices(board.devs, board.num_devs); + /* read base address of boot chip select (0) */ - if (BCMCPU_IS_6345()) - val = 0x1fc00000; + val = bcm_mpi_readl(MPI_CSBASE_REG(0)); + val &= MPI_CSBASE_BASE_MASK; --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h @@ -61,6 +61,10 @@ struct board_info { diff --git a/target/linux/brcm63xx/patches-2.6.39/200-spi-board-info.patch b/target/linux/brcm63xx/patches-2.6.39/200-spi-board-info.patch index 6205202912..f665952769 100644 --- a/target/linux/brcm63xx/patches-2.6.39/200-spi-board-info.patch +++ b/target/linux/brcm63xx/patches-2.6.39/200-spi-board-info.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -914,6 +914,9 @@ int __init board_register_devices(void) +@@ -908,6 +908,9 @@ int __init board_register_devices(void) if (board.num_devs) platform_add_devices(board.devs, board.num_devs); @@ -8,8 +8,8 @@ + spi_register_board_info(board.spis, board.num_spis); + /* read base address of boot chip select (0) */ - if (BCMCPU_IS_6345()) - val = 0x1fc00000; + val = bcm_mpi_readl(MPI_CSBASE_REG(0)); + val &= MPI_CSBASE_BASE_MASK; --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h @@ -65,6 +65,10 @@ struct board_info { diff --git a/target/linux/brcm63xx/patches-2.6.39/220-wl_exports.patch b/target/linux/brcm63xx/patches-2.6.39/220-wl_exports.patch index 8cd87b8df7..39bde43374 100644 --- a/target/linux/brcm63xx/patches-2.6.39/220-wl_exports.patch +++ b/target/linux/brcm63xx/patches-2.6.39/220-wl_exports.patch @@ -14,7 +14,7 @@ * known 6338 boards */ #ifdef CONFIG_BCM63XX_CPU_6338 -@@ -747,6 +754,7 @@ void __init board_prom_init(void) +@@ -741,6 +748,7 @@ void __init board_prom_init(void) /* extract nvram data */ memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram)); diff --git a/target/linux/brcm63xx/patches-2.6.39/230-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-2.6.39/230-6358-enet1-external-mii-clk.patch index d859410b77..f4c1ed9a6d 100644 --- a/target/linux/brcm63xx/patches-2.6.39/230-6358-enet1-external-mii-clk.patch +++ b/target/linux/brcm63xx/patches-2.6.39/230-6358-enet1-external-mii-clk.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -818,6 +818,8 @@ void __init board_prom_init(void) +@@ -812,6 +812,8 @@ void __init board_prom_init(void) if (BCMCPU_IS_6348()) val |= GPIO_MODE_6348_G3_EXT_MII | GPIO_MODE_6348_G0_EXT_MII; diff --git a/target/linux/brcm63xx/patches-2.6.39/240-spi.patch b/target/linux/brcm63xx/patches-2.6.39/240-spi.patch index 437d906388..b30190ea3a 100644 --- a/target/linux/brcm63xx/patches-2.6.39/240-spi.patch +++ b/target/linux/brcm63xx/patches-2.6.39/240-spi.patch @@ -170,7 +170,7 @@ #define BCM_6358_OHCI0_IRQ (IRQ_INTERNAL_BASE + 5) --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -771,4 +771,116 @@ +@@ -773,4 +773,116 @@ #define DMIPSPLLCFG_N2_SHIFT 29 #define DMIPSPLLCFG_N2_MASK (0x7 << DMIPSPLLCFG_N2_SHIFT) @@ -919,12 +919,12 @@ #include <board_bcm963xx.h> #define PFX "board_bcm963xx: " -@@ -927,6 +928,8 @@ int __init board_register_devices(void) +@@ -921,6 +922,8 @@ int __init board_register_devices(void) if (board.num_spis) spi_register_board_info(board.spis, board.num_spis); + bcm63xx_spi_register(); + /* read base address of boot chip select (0) */ - if (BCMCPU_IS_6345()) - val = 0x1fc00000; + val = bcm_mpi_readl(MPI_CSBASE_REG(0)); + val &= MPI_CSBASE_BASE_MASK; diff --git a/target/linux/brcm63xx/patches-2.6.39/250-boardid_fixup.patch b/target/linux/brcm63xx/patches-2.6.39/250-boardid_fixup.patch index 50e8016e37..2035854c3a 100644 --- a/target/linux/brcm63xx/patches-2.6.39/250-boardid_fixup.patch +++ b/target/linux/brcm63xx/patches-2.6.39/250-boardid_fixup.patch @@ -44,7 +44,7 @@ /* * early init callback, read nvram data from flash and checksum it */ -@@ -771,6 +798,11 @@ void __init board_prom_init(void) +@@ -765,6 +792,11 @@ void __init board_prom_init(void) return; } diff --git a/target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch b/target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch index 40849c87d3..8dc7f248fd 100644 --- a/target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch +++ b/target/linux/brcm63xx/patches-2.6.39/260-ssb_sprom_mac_pool.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -856,17 +856,6 @@ void __init board_prom_init(void) +@@ -850,17 +850,6 @@ void __init board_prom_init(void) } bcm_gpio_writel(val, GPIO_MODE_REG); @@ -18,7 +18,7 @@ } /* -@@ -942,6 +931,18 @@ int __init board_register_devices(void) +@@ -936,6 +925,18 @@ int __init board_register_devices(void) !board_get_mac_address(board.enet1.mac_addr)) bcm63xx_enet_register(1, &board.enet1); diff --git a/target/linux/brcm63xx/patches-2.6.39/441-board-NB4.patch b/target/linux/brcm63xx/patches-2.6.39/441-board-NB4.patch index 2fb7ff2726..26a48c9d81 100644 --- a/target/linux/brcm63xx/patches-2.6.39/441-board-NB4.patch +++ b/target/linux/brcm63xx/patches-2.6.39/441-board-NB4.patch @@ -557,7 +557,7 @@ /* * Register a sane SPROMv2 to make the on-board * bcm4318 WLAN work -@@ -959,6 +1485,9 @@ void __init board_prom_init(void) +@@ -953,6 +1479,9 @@ void __init board_prom_init(void) boardid_fixup(boot_addr); } diff --git a/target/linux/brcm63xx/patches-2.6.39/452-board_V2500V.patch b/target/linux/brcm63xx/patches-2.6.39/452-board_V2500V.patch index 8ee99847bb..dc1ba793de 100644 --- a/target/linux/brcm63xx/patches-2.6.39/452-board_V2500V.patch +++ b/target/linux/brcm63xx/patches-2.6.39/452-board_V2500V.patch @@ -72,9 +72,9 @@ #endif #ifdef CONFIG_BCM63XX_CPU_6358 -@@ -2059,6 +2117,22 @@ void __init board_prom_init(void) - val &= MPI_CSBASE_BASE_MASK; - } +@@ -2053,6 +2111,22 @@ void __init board_prom_init(void) + val = bcm_mpi_readl(MPI_CSBASE_REG(0)); + val &= MPI_CSBASE_BASE_MASK; boot_addr = (u8 *)KSEG1ADDR(val); + printk(KERN_INFO PFX "Boot address 0x%08x\n",(unsigned int)boot_addr); + @@ -95,11 +95,10 @@ /* dump cfe version */ cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET; -@@ -2262,6 +2336,14 @@ int __init board_register_devices(void) - val = bcm_mpi_readl(MPI_CSBASE_REG(0)); - val &= MPI_CSBASE_BASE_MASK; - } -+ +@@ -2253,6 +2327,13 @@ int __init board_register_devices(void) + val = bcm_mpi_readl(MPI_CSBASE_REG(0)); + val &= MPI_CSBASE_BASE_MASK; + + /* BT Voyager 2500V has 8 Meg flash in two 4 Meg banks + * Loading from CFE always uses Bank 0 */ + if (!strcmp(board.name, "V2500V_BB")) { diff --git a/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch b/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch index ab4b0e59a6..1ac6f1ae54 100644 --- a/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch +++ b/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch @@ -18,7 +18,7 @@ #endif /* -@@ -2406,8 +2417,9 @@ int __init board_register_devices(void) +@@ -2400,8 +2411,9 @@ int __init board_register_devices(void) if (!board_get_mac_address(bcm63xx_sprom.il0mac)) { memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN); memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); |