Skip to content
Snippets Groups Projects
Commit 9a61b249 authored by Florian Fainelli's avatar Florian Fainelli
Browse files

fix board patches so that new boards are withing appropriate ifdef

Some new board definitions were added within the #ifdef CONFIG_CPU_6338
section while some other were added within #ifdef CONFIG_CPU_6345, fix this

SVN-Revision: 32060
parent 5ec22097
No related branches found
No related tags found
No related merge requests found
Showing
with 86 additions and 66 deletions
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -29,12 +29,16 @@
@@ -30,12 +30,16 @@
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
......@@ -17,7 +17,7 @@
static struct bcm963xx_nvram nvram;
static unsigned int mac_addr_used;
static struct board_info board;
@@ -725,6 +729,29 @@ static int board_get_mac_address(u8 *mac
@@ -726,6 +730,29 @@ static int board_get_mac_address(u8 *mac
return 0;
}
......@@ -47,7 +47,7 @@
/*
* early init callback, read nvram data from flash and checksum it
*/
@@ -766,6 +793,11 @@ void __init board_prom_init(void)
@@ -767,6 +794,11 @@ void __init board_prom_init(void)
return;
}
......
......@@ -16,7 +16,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -825,7 +825,6 @@ void __init board_prom_init(void)
@@ -826,7 +826,6 @@ void __init board_prom_init(void)
#ifdef CONFIG_PCI
if (board.has_pci) {
......@@ -24,7 +24,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G2_PCI;
}
@@ -997,5 +996,10 @@ int __init board_register_devices(void)
@@ -998,5 +997,10 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_keys_device);
}
......
......@@ -39,7 +39,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <linux/ssb/ssb.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
@@ -26,6 +23,7 @@
@@ -27,6 +24,7 @@
#include <bcm63xx_dev_pci.h>
#include <bcm63xx_dev_enet.h>
#include <bcm63xx_dev_dsp.h>
......@@ -47,7 +47,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
@@ -865,40 +863,6 @@ void __init board_setup(void)
@@ -866,40 +864,6 @@ void __init board_setup(void)
panic("unexpected CPU for bcm963xx board");
}
......@@ -88,7 +88,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
static struct gpio_led_platform_data bcm63xx_led_data;
static struct platform_device bcm63xx_gpio_leds = {
@@ -922,7 +886,6 @@ static struct platform_device bcm63xx_gp
@@ -923,7 +887,6 @@ static struct platform_device bcm63xx_gp
*/
int __init board_register_devices(void)
{
......@@ -96,7 +96,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
int button_count = 0;
int led_count = 0;
@@ -967,14 +930,7 @@ int __init board_register_devices(void)
@@ -968,14 +931,7 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);
......
......@@ -33,7 +33,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
select HW_HAS_PCI
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -760,9 +760,14 @@ void __init board_prom_init(void)
@@ -761,9 +761,14 @@ void __init board_prom_init(void)
char cfe_version[32];
u32 val;
......
......@@ -58,7 +58,7 @@ Subject: [PATCH 24/63] MIPS: BCM63XX: register ohci device.
obj-y += boards/
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -26,6 +26,7 @@
@@ -27,6 +27,7 @@
#include <bcm63xx_dev_flash.h>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
......@@ -66,7 +66,7 @@ Subject: [PATCH 24/63] MIPS: BCM63XX: register ohci device.
#include <board_bcm963xx.h>
#include <bcm_tag.h>
@@ -911,6 +912,9 @@ int __init board_register_devices(void)
@@ -912,6 +913,9 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);
......
......@@ -41,7 +41,7 @@ Subject: [PATCH 26/63] MIPS: BCM63XX: register ehci device.
obj-y += boards/
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -27,6 +27,7 @@
@@ -28,6 +28,7 @@
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <bcm63xx_dev_usb_ohci.h>
......@@ -49,7 +49,7 @@ Subject: [PATCH 26/63] MIPS: BCM63XX: register ehci device.
#include <board_bcm963xx.h>
#include <bcm_tag.h>
@@ -912,6 +913,9 @@ int __init board_register_devices(void)
@@ -913,6 +914,9 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);
......
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -850,6 +850,8 @@ void __init board_prom_init(void)
@@ -851,6 +851,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;
......
......@@ -13,7 +13,7 @@ Subject: [PATCH 31/63] bcm63xx_enet: add support for bcm6368 internal ethernet s
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -915,6 +915,10 @@ int __init board_register_devices(void)
@@ -916,6 +916,10 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);
......
......@@ -28,7 +28,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
obj-y += boards/
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -24,6 +24,7 @@
@@ -25,6 +25,7 @@
#include <bcm63xx_dev_enet.h>
#include <bcm63xx_dev_dsp.h>
#include <bcm63xx_dev_flash.h>
......@@ -36,7 +36,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <bcm63xx_dev_usb_ohci.h>
@@ -940,6 +941,7 @@ int __init board_register_devices(void)
@@ -941,6 +942,7 @@ int __init board_register_devices(void)
pr_err(PFX "failed to register fallback SPROM\n");
}
#endif
......
......@@ -29,7 +29,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -20,6 +20,7 @@
@@ -21,6 +21,7 @@
#include <bcm63xx_dev_uart.h>
#include <bcm63xx_regs.h>
#include <bcm63xx_io.h>
......@@ -37,7 +37,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_dev_pci.h>
#include <bcm63xx_dev_enet.h>
#include <bcm63xx_dev_dsp.h>
@@ -40,8 +41,6 @@
@@ -41,8 +42,6 @@
#define CFE_OFFSET_64K 0x10000
#define CFE_OFFSET_128K 0x20000
......@@ -46,7 +46,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
static struct board_info board;
/*
@@ -695,50 +694,16 @@ const char *board_get_name(void)
@@ -696,50 +695,16 @@ const char *board_get_name(void)
return board.name;
}
......@@ -100,7 +100,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
/* No tag found */
printk(KERN_DEBUG "No bcm_tag found!\n");
return;
@@ -748,9 +713,9 @@ static void __init boardid_fixup(u8 *boo
@@ -749,9 +714,9 @@ static void __init boardid_fixup(u8 *boo
if (tag->information1[0] != '+')
return;
......@@ -112,7 +112,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
}
/*
@@ -758,9 +723,10 @@ static void __init boardid_fixup(u8 *boo
@@ -759,9 +724,10 @@ static void __init boardid_fixup(u8 *boo
*/
void __init board_prom_init(void)
{
......@@ -125,7 +125,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
u32 val;
/* read base address of boot chip select (0)
@@ -782,32 +748,19 @@ void __init board_prom_init(void)
@@ -783,32 +749,19 @@ void __init board_prom_init(void)
strcpy(cfe_version, "unknown");
printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
......@@ -162,7 +162,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
continue;
/* copy, board desc array is marked initdata */
memcpy(&board, bcm963xx_boards[i], sizeof(board));
@@ -817,7 +770,7 @@ void __init board_prom_init(void)
@@ -818,7 +771,7 @@ void __init board_prom_init(void)
/* bail out if board is not found, will complain later */
if (!board.name[0]) {
char name[17];
......@@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
name[16] = 0;
printk(KERN_ERR PFX "unknown bcm963xx board: %s\n",
name);
@@ -909,15 +862,15 @@ int __init board_register_devices(void)
@@ -910,15 +863,15 @@ int __init board_register_devices(void)
bcm63xx_pcmcia_register();
if (board.has_enet0 &&
......@@ -190,7 +190,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
bcm63xx_enetsw_register(&board.enetsw);
if (board.has_ehci0)
@@ -933,7 +886,7 @@ int __init board_register_devices(void)
@@ -934,7 +887,7 @@ int __init board_register_devices(void)
* do this after registering enet devices
*/
#ifdef CONFIG_SSB_PCIHOST
......
......@@ -10,7 +10,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -32,6 +32,7 @@
@@ -33,6 +33,7 @@
#include <bcm63xx_dev_usb_ehci.h>
#include <board_bcm963xx.h>
#include <bcm_tag.h>
......@@ -18,7 +18,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data
#define PFX "board_bcm963xx: "
@@ -851,6 +852,7 @@ int __init board_register_devices(void)
@@ -852,6 +853,7 @@ int __init board_register_devices(void)
{
int button_count = 0;
int led_count = 0;
......@@ -26,7 +26,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data
if (board.has_uart0)
bcm63xx_uart_register(0);
@@ -886,7 +888,8 @@ int __init board_register_devices(void)
@@ -887,7 +889,8 @@ int __init board_register_devices(void)
* do this after registering enet devices
*/
#ifdef CONFIG_SSB_PCIHOST
......@@ -36,7 +36,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
if (ssb_arch_register_fallback_sprom(
@@ -931,5 +934,9 @@ int __init board_register_devices(void)
@@ -932,5 +935,9 @@ int __init board_register_devices(void)
bcm63xx_pci_register();
#endif
......
......@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -907,7 +907,7 @@ int __init board_register_devices(void)
@@ -908,7 +908,7 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);
......
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -131,6 +131,55 @@ static struct board_info __initdata boar
},
},
@@ -469,6 +469,54 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
+
+static struct board_info __initdata board_96348_D4PW = {
......@@ -52,11 +52,10 @@
+ },
+ },
+};
+
#endif
/*
@@ -639,6 +688,7 @@ static const struct board_info __initdat
@@ -640,6 +688,7 @@ static const struct board_info __initdat
&board_DV201AMR,
&board_96348gw_a,
&board_rta1025w_16,
......
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -14,6 +14,9 @@
#include <linux/ssb/ssb.h>
@@ -15,6 +15,8 @@
#include <linux/gpio_keys.h>
#include <linux/input.h>
+#include <linux/spi/spi.h>
#include <linux/spi/spi.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/spi/74x164.h>
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
@@ -42,6 +45,12 @@
@@ -43,6 +45,12 @@
#define CFE_OFFSET_64K 0x10000
#define CFE_OFFSET_128K 0x20000
......@@ -23,7 +22,7 @@
static struct board_info board;
/*
@@ -666,6 +675,496 @@ static struct board_info __initdata boar
@@ -666,6 +674,496 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
......@@ -520,7 +519,7 @@
#endif
/*
@@ -696,9 +1195,31 @@ static const struct board_info __initdat
@@ -696,9 +1194,31 @@ static const struct board_info __initdat
&board_96358vw2,
&board_AGPFS0,
&board_DWVS0,
......@@ -552,7 +551,7 @@
/*
* Register a sane SPROMv2 to make the on-board
* bcm4318 WLAN work
@@ -807,6 +1328,9 @@ void __init board_prom_init(void)
@@ -807,6 +1327,9 @@ void __init board_prom_init(void)
boardid_fixup(boot_addr);
}
......@@ -562,3 +561,14 @@
board_name = bcm63xx_nvram_get_name();
/* find board by name */
for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -52,7 +52,7 @@ struct board_info {
struct bcm63xx_dsp_platform_data dsp;
/* GPIO LEDs */
- struct gpio_led leds[5];
+ struct gpio_led leds[9];
/* Buttons */
struct gpio_keys_button buttons[4];
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -201,6 +201,38 @@ static struct board_info __initdata boar
.has_uart0 = 1,
@@ -140,6 +140,38 @@ static struct board_info __initdata boar
},
},
};
+
+static struct board_info __initdata board_96338w2_e7t = {
......@@ -39,7 +39,7 @@
#endif
/*
@@ -1174,6 +1206,7 @@ static const struct board_info __initdat
@@ -1173,6 +1205,7 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6338
&board_96338gw,
&board_96338w,
......
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -664,6 +664,98 @@ static struct board_info __initdata boar
@@ -663,6 +663,98 @@ static struct board_info __initdata boar
},
};
......@@ -99,7 +99,7 @@
static struct board_info __initdata board_AGPFS0 = {
.name = "AGPF-S0",
.expected_cpu_id = 0x6358,
@@ -1227,6 +1319,7 @@ static const struct board_info __initdat
@@ -1226,6 +1318,7 @@ static const struct board_info __initdat
&board_96358vw,
&board_96358vw2,
&board_AGPFS0,
......@@ -107,3 +107,14 @@
&board_DWVS0,
&board_nb4_ser_r0,
&board_nb4_ser_r1,
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -52,7 +52,7 @@ struct board_info {
struct bcm63xx_dsp_platform_data dsp;
/* GPIO LEDs */
- struct gpio_led leds[9];
+ struct gpio_led leds[10];
/* Buttons */
struct gpio_keys_button buttons[4];
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -800,6 +800,59 @@ static struct board_info __initdata boar
@@ -799,6 +799,59 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
......@@ -60,7 +60,7 @@
struct spi_gpio_platform_data nb4_spi_gpio_data = {
.sck = NB4_SPI_GPIO_CLK,
.mosi = NB4_SPI_GPIO_MOSI,
@@ -1321,6 +1374,7 @@ static const struct board_info __initdat
@@ -1320,6 +1373,7 @@ static const struct board_info __initdat
&board_AGPFS0,
&board_CPVA642,
&board_DWVS0,
......
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -189,6 +189,67 @@ static struct board_info __initdata boar
@@ -557,6 +557,67 @@ static struct board_info __initdata boar
},
},
};
+
+static struct board_info __initdata board_spw500v = {
+ .name = "SPW500V",
+ .expected_cpu_id = 0x6348,
......@@ -64,11 +65,10 @@
+ },
+ },
+};
+
#endif
/*
@@ -1366,6 +1427,7 @@ static const struct board_info __initdat
@@ -1365,6 +1426,7 @@ static const struct board_info __initdat
&board_96348gw_a,
&board_rta1025w_16,
&board_96348_D4PW,
......
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -536,6 +536,112 @@ static struct board_info __initdata boar
@@ -426,6 +426,112 @@ static struct board_info __initdata boar
},
};
......@@ -113,7 +113,7 @@
static struct board_info __initdata board_FAST2404 = {
.name = "F@ST2404",
.expected_cpu_id = 0x6348,
@@ -1420,6 +1526,8 @@ static const struct board_info __initdat
@@ -1419,6 +1525,8 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6348
&board_96348r,
&board_96348gw,
......
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -250,6 +250,76 @@ static struct board_info __initdata boar
@@ -724,6 +724,76 @@ static struct board_info __initdata boar
},
},
};
+
+static struct board_info __initdata board_96348sv = {
+ .name = "MAGIC",
+ .expected_cpu_id = 0x6348,
+ .expected_cpu_id = 0x6348,
+
+ .has_uart0 = 1,
+ .has_enet0 = 1,
......@@ -14,11 +15,11 @@
+ .has_pci = 1,
+
+ .enet0 = {
+ .has_phy = 1,
+ .has_phy = 1,
+ .use_internal_phy = 1,
+ },
+ .enet1 = {
+ /* is has BP_ENET_EXTERNAL_PHY */
+ /* it has BP_ENET_EXTERNAL_PHY */
+ .force_speed_100 = 1,
+ .force_duplex_full = 1,
+ },
......@@ -31,7 +32,7 @@
+ .dsp = {
+ .gpio_rst = 25,
+ .gpio_int = 34,
+ .cs = 2,
+ .cs = 2,
+ .ext_irq = 2,
+ },
+
......@@ -73,11 +74,10 @@
+ },
+ },
+};
+
#endif
/*
@@ -1536,6 +1606,7 @@ static const struct board_info __initdat
@@ -1535,6 +1605,7 @@ static const struct board_info __initdat
&board_rta1025w_16,
&board_96348_D4PW,
&board_spw500v,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment