improve BCM6345 support
- runtime detect the amount of memory available - define EBI_BASE as MPI_BASE to get rid of chip-select specific hacks - fix GPIO control SVN-Revision: 27880
This commit is contained in:
parent
c4af036ec7
commit
11c4128770
33 changed files with 314 additions and 72 deletions
122
target/linux/brcm63xx/patches-2.6.39/001-6345_cpu.patch
Normal file
122
target/linux/brcm63xx/patches-2.6.39/001-6345_cpu.patch
Normal file
|
@ -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);
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 @@
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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")) {
|
||||
|
|
|
@ -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);
|
||||
|
|
122
target/linux/brcm63xx/patches-3.0/001-6345_cpu.patch
Normal file
122
target/linux/brcm63xx/patches-3.0/001-6345_cpu.patch
Normal file
|
@ -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
|
||||
@@ -709,15 +709,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 */
|
||||
@@ -893,12 +887,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);
|
|
@ -52,7 +52,7 @@ Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
|
|||
#include <board_bcm963xx.h>
|
||||
|
||||
#define PFX "board_bcm963xx: "
|
||||
@@ -889,6 +890,9 @@ int __init board_register_devices(void)
|
||||
@@ -883,6 +884,9 @@ int __init board_register_devices(void)
|
||||
!board_get_mac_address(board.enet1.mac_addr))
|
||||
bcm63xx_enet_register(1, &board.enet1);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
|
|||
#include <board_bcm963xx.h>
|
||||
|
||||
#define PFX "board_bcm963xx: "
|
||||
@@ -890,6 +891,9 @@ int __init board_register_devices(void)
|
||||
@@ -884,6 +885,9 @@ int __init board_register_devices(void)
|
||||
!board_get_mac_address(board.enet1.mac_addr))
|
||||
bcm63xx_enet_register(1, &board.enet1);
|
||||
|
||||
|
|
|
@ -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
|
||||
@@ -828,20 +828,6 @@ void __init board_setup(void)
|
||||
@@ -822,20 +822,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 */
|
||||
@@ -851,12 +837,9 @@ static struct resource mtd_resources[] =
|
||||
@@ -845,12 +831,9 @@ static struct resource mtd_resources[] =
|
||||
};
|
||||
|
||||
static struct platform_device mtd_dev = {
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
};
|
||||
|
||||
static struct board_info __initdata board_FAST2404 = {
|
||||
@@ -850,12 +872,23 @@ static struct platform_device bcm63xx_gp
|
||||
@@ -844,12 +866,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);
|
||||
@@ -900,5 +933,16 @@ int __init board_register_devices(void)
|
||||
@@ -891,5 +924,16 @@ int __init board_register_devices(void)
|
||||
|
||||
platform_device_register(&bcm63xx_gpio_leds);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -889,6 +889,7 @@ int __init board_register_devices(void)
|
||||
@@ -883,6 +883,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);
|
||||
@@ -928,7 +929,11 @@ int __init board_register_devices(void)
|
||||
@@ -919,7 +920,11 @@ int __init board_register_devices(void)
|
||||
|
||||
platform_device_register(&mtd_dev);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
};
|
||||
|
||||
static struct board_info __initdata board_rta1025w_16 = {
|
||||
@@ -917,6 +920,9 @@ int __init board_register_devices(void)
|
||||
@@ -911,6 +914,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 @@
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -923,6 +923,9 @@ int __init board_register_devices(void)
|
||||
@@ -917,6 +917,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 {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -926,6 +926,9 @@ int __init board_register_devices(void)
|
||||
@@ -920,6 +920,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 {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* known 6338 boards
|
||||
*/
|
||||
#ifdef CONFIG_BCM63XX_CPU_6338
|
||||
@@ -758,6 +765,7 @@ void __init board_prom_init(void)
|
||||
@@ -752,6 +759,7 @@ void __init board_prom_init(void)
|
||||
|
||||
/* extract nvram data */
|
||||
memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -829,6 +829,8 @@ void __init board_prom_init(void)
|
||||
@@ -823,6 +823,8 @@ void __init board_prom_init(void)
|
||||
if (BCMCPU_IS_6348())
|
||||
val |= GPIO_MODE_6348_G3_EXT_MII |
|
||||
GPIO_MODE_6348_G0_EXT_MII;
|
||||
|
|
|
@ -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: "
|
||||
@@ -939,6 +940,8 @@ int __init board_register_devices(void)
|
||||
@@ -933,6 +934,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;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
/*
|
||||
* early init callback, read nvram data from flash and checksum it
|
||||
*/
|
||||
@@ -782,6 +809,11 @@ void __init board_prom_init(void)
|
||||
@@ -776,6 +803,11 @@ void __init board_prom_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -867,18 +867,6 @@ void __init board_prom_init(void)
|
||||
@@ -861,18 +861,6 @@ void __init board_prom_init(void)
|
||||
}
|
||||
|
||||
bcm_gpio_writel(val, GPIO_MODE_REG);
|
||||
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
|
||||
/*
|
||||
@@ -954,6 +942,19 @@ int __init board_register_devices(void)
|
||||
@@ -948,6 +936,19 @@ int __init board_register_devices(void)
|
||||
!board_get_mac_address(board.enet1.mac_addr))
|
||||
bcm63xx_enet_register(1, &board.enet1);
|
||||
|
||||
|
|
|
@ -557,7 +557,7 @@
|
|||
/*
|
||||
* Register a sane SPROMv2 to make the on-board
|
||||
* bcm4318 WLAN work
|
||||
@@ -970,6 +1496,9 @@ void __init board_prom_init(void)
|
||||
@@ -964,6 +1490,9 @@ void __init board_prom_init(void)
|
||||
boardid_fixup(boot_addr);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,9 +72,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_BCM63XX_CPU_6358
|
||||
@@ -2070,6 +2128,22 @@ void __init board_prom_init(void)
|
||||
val &= MPI_CSBASE_BASE_MASK;
|
||||
}
|
||||
@@ -2064,6 +2122,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,17 +95,16 @@
|
|||
|
||||
/* dump cfe version */
|
||||
cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
|
||||
@@ -2274,6 +2348,14 @@ int __init board_register_devices(void)
|
||||
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
|
||||
val &= MPI_CSBASE_BASE_MASK;
|
||||
}
|
||||
+
|
||||
@@ -2265,6 +2339,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")) {
|
||||
+ printk(KERN_INFO PFX "V2500V: Start in Bank 0\n");
|
||||
+ val = val + 0x400000; // Select Bank 0 start address
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
mtd_resources[0].start = val;
|
||||
mtd_resources[0].end = 0x1FFFFFFF;
|
||||
|
|
Loading…
Reference in a new issue