target/linux/brcm63xx/patches-2.6.37/454-board_V2500V.patch |
| 1 | Index: b/arch/mips/bcm63xx/boards/board_bcm963xx.c |
| 2 | =================================================================== |
| 3 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 2011-03-21 08:29:36.500387994 +0000 |
| 4 | @@ -845,6 +845,63 @@ |
| 5 | }, |
| 6 | }; |
| 7 | |
| 8 | + static struct board_info __initdata board_V2500V_BB = { |
| 9 | + .name = "V2500V_BB", |
| 10 | + .expected_cpu_id = 0x6348, |
| 11 | + |
| 12 | + .has_uart0 = 1, |
| 13 | + .has_enet0 = 1, |
| 14 | + .has_enet1 = 1, |
| 15 | + .has_pci = 1, |
| 16 | + |
| 17 | + .enet0 = { |
| 18 | + .has_phy = 1, |
| 19 | + .use_internal_phy = 1, |
| 20 | + }, |
| 21 | + .enet1 = { |
| 22 | + .force_speed_100 = 1, |
| 23 | + .force_duplex_full = 1, |
| 24 | + }, |
| 25 | + |
| 26 | + .leds = { |
| 27 | + { |
| 28 | + .name = "power:green", |
| 29 | + .gpio = 0, |
| 30 | + .active_low = 1, |
| 31 | + .default_trigger = "default-on", |
| 32 | + }, |
| 33 | + { |
| 34 | + .name = "power:red", |
| 35 | + .gpio = 1, |
| 36 | + .active_low = 1, |
| 37 | + }, |
| 38 | + { |
| 39 | + .name = "adsl", |
| 40 | + .gpio = 2, |
| 41 | + .active_low = 1, |
| 42 | + }, |
| 43 | + { .name = "ppp", |
| 44 | + .gpio = 3, |
| 45 | + .active_low = 1, |
| 46 | + }, |
| 47 | + { |
| 48 | + .name = "wireless", |
| 49 | + .gpio = 6, |
| 50 | + .active_low = 1, |
| 51 | + }, |
| 52 | + }, |
| 53 | + .buttons = { |
| 54 | + { |
| 55 | + .desc = "reset", |
| 56 | + .gpio = 31, |
| 57 | + .active_low = 1, |
| 58 | + .type = EV_KEY, |
| 59 | + .code = KEY_RESTART, |
| 60 | + .threshold = 3, |
| 61 | + }, |
| 62 | + }, |
| 63 | +}; |
| 64 | + |
| 65 | #endif |
| 66 | |
| 67 | /* |
| 68 | @@ -1830,6 +1887,7 @@ |
| 69 | &board_spw500v, |
| 70 | &board_ct536_ct5621, |
| 71 | &board_96348sv, |
| 72 | + &board_V2500V_BB, |
| 73 | #endif |
| 74 | |
| 75 | #ifdef CONFIG_BCM63XX_CPU_6358 |
| 76 | @@ -1977,6 +2035,22 @@ |
| 77 | val &= MPI_CSBASE_BASE_MASK; |
| 78 | } |
| 79 | boot_addr = (u8 *)KSEG1ADDR(val); |
| 80 | + printk(KERN_INFO PFX "Boot address 0x%08x\n",(unsigned int)boot_addr); |
| 81 | + |
| 82 | + /* BT Voyager 2500V (RTA1046VW PCB) has 8 Meg flash used as two */ |
| 83 | + /* banks of 4 Meg. The byte at 0xBF800000 identifies the back to use.*/ |
| 84 | + /* Loading firmware from the CFE Prompt always loads to Bank 0 */ |
| 85 | + /* Do an early check of CFE and then select bank 0 */ |
| 86 | + |
| 87 | + if (boot_addr == (u8 *)0xbf800000) { |
| 88 | + u8 *tmp_boot_addr; |
| 89 | + tmp_boot_addr = (u8 *)0xbfc00000; // Address of Bank 0 |
| 90 | + memcpy(&nvram, tmp_boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram)); |
| 91 | + if (!strcmp(nvram.name, "V2500V_BB")) { |
| 92 | + printk(KERN_INFO PFX "V2500V: nvram bank 0\n"); |
| 93 | + boot_addr = (u8 *)0xbfc00000; // Bank 0 |
| 94 | + } |
| 95 | + } |
| 96 | |
| 97 | /* dump cfe version */ |
| 98 | cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET; |
| 99 | @@ -2184,6 +2258,14 @@ |
| 100 | val = bcm_mpi_readl(MPI_CSBASE_REG(0)); |
| 101 | val &= MPI_CSBASE_BASE_MASK; |
| 102 | } |
| 103 | + |
| 104 | + /* BT Voyager 2500V has 8 Meg flash in two 4 Meg banks */ |
| 105 | + /* Loading from CFE always uses Bank 0 */ |
| 106 | + if (!strcmp(board.name, "V2500V_BB")) { |
| 107 | + printk(KERN_INFO PFX "V2500V: Start in Bank 0\n"); |
| 108 | + val = val + 0x400000; // Select Bank 0 start address |
| 109 | + } |
| 110 | + |
| 111 | mtd_resources[0].start = val; |
| 112 | mtd_resources[0].end = 0x1FFFFFFF; |
| 113 | |