brcm47xx: reorder patches so that the patches already in mainline linux will be applied at first.

SVN-Revision: 32845
owl
Hauke Mehrtens 2012-07-25 14:52:00 +00:00
parent ab2cb9ce61
commit e0837a51f0
16 changed files with 62 additions and 54 deletions

View File

@ -1,7 +1,6 @@
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
@@ -268,8 +268,7 @@ int nvram_getenv(char *name, char *val,
@@ -107,8 +107,7 @@ int nvram_getenv(char *name, char *val,
value = eq + 1;
if ((eq - var) == strlen(name) &&
strncmp(var, name, (eq - var)) == 0) {

View File

@ -1,4 +1,3 @@
--- a/arch/mips/include/asm/mach-bcm47xx/nvram.h
+++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h
@@ -37,7 +37,7 @@ struct nvram_header {

View File

@ -4,12 +4,12 @@
# under Linux.
#
-obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o bus.o
+obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o bus.o sprom.o
-obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o
+obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -132,156 +132,7 @@ static void bcm47xx_machine_halt(void)
@@ -85,156 +85,7 @@ static void bcm47xx_machine_halt(void)
}
#ifdef CONFIG_BCM47XX_SSB

View File

@ -6,10 +6,10 @@
* Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.org>
- * Copyright (C) 2010-2011 Hauke Mehrtens <hauke@hauke-m.de>
+ * Copyright (C) 2010-2012 Hauke Mehrtens <hauke@hauke-m.de>
* Copyright (C) 2011-2012 Tathagata Das <tathagata@alumnux.com>
*
* This program is free software; you can redistribute it and/or modify it
@@ -132,7 +132,7 @@ static void bcm47xx_machine_halt(void)
* under the terms of the GNU General Public License as published by the
@@ -85,7 +85,7 @@ static void bcm47xx_machine_halt(void)
}
#ifdef CONFIG_BCM47XX_SSB
@ -18,7 +18,7 @@
{
char prefix[10];
@@ -149,7 +149,7 @@ static int bcm47xx_get_sprom(struct ssb_
@@ -102,7 +102,7 @@ static int bcm47xx_get_sprom(struct ssb_
}
static int bcm47xx_get_invariants(struct ssb_bus *bus,
@ -27,7 +27,7 @@
{
char buf[20];
@@ -204,7 +204,7 @@ static void __init bcm47xx_register_ssb(
@@ -132,7 +132,7 @@ static void __init bcm47xx_register_ssb(
char buf[100];
struct ssb_mipscore *mcore;
@ -36,7 +36,7 @@
if (err)
printk(KERN_WARNING "bcm47xx: someone else already registered"
" a ssb SPROM callback handler (err %d)\n", err);
@@ -256,10 +256,41 @@ static int __init bcm47xx_register_flash
@@ -159,10 +159,41 @@ static void __init bcm47xx_register_ssb(
#endif
#ifdef CONFIG_BCM47XX_BCMA

View File

@ -1,11 +1,11 @@
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -163,8 +163,6 @@ static int bcm47xx_get_invariants(struct
@@ -115,8 +115,6 @@ static int bcm47xx_get_invariants(struct
iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;
if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
- if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
- iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
memset(&iv->sprom, 0, sizeof(struct ssb_sprom));
bcm47xx_fill_sprom(&iv->sprom, NULL);

View File

@ -1,6 +1,6 @@
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -157,12 +157,7 @@ static int bcm47xx_get_invariants(struct
@@ -109,12 +109,7 @@ static int bcm47xx_get_invariants(struct
/* Fill boardinfo structure */
memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
@ -12,11 +12,11 @@
- iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
+ bcm47xx_fill_ssb_boardinfo(&iv->boardinfo, NULL);
memset(&iv->sprom, 0, sizeof(struct ssb_sprom));
bcm47xx_fill_sprom(&iv->sprom, NULL);
--- a/arch/mips/bcm47xx/sprom.c
+++ b/arch/mips/bcm47xx/sprom.c
@@ -616,3 +616,15 @@ void bcm47xx_fill_sprom(struct ssb_sprom
@@ -618,3 +618,15 @@ void bcm47xx_fill_sprom(struct ssb_sprom
bcm47xx_fill_sprom_r1(sprom, prefix);
}
}

View File

@ -1,17 +1,17 @@
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -297,6 +297,8 @@ static void __init bcm47xx_register_bcma
if (bcm47xx_bus.bcma.bus.drv_cc.flash_type == BCMA_NFLASH)
bcm47xx_nflash_struct_bcma_init(&bcm47xx_nflash, &bcm47xx_bus.bcma.bus.drv_cc);
@@ -190,6 +190,8 @@ static void __init bcm47xx_register_bcma
err = bcma_host_soc_register(&bcm47xx_bus.bcma);
if (err)
panic("Failed to initialize BCMA bus (err %d)", err);
+
+ bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
}
#endif
static int __init bcm47xx_register_flash_bcma(void)
--- a/arch/mips/bcm47xx/sprom.c
+++ b/arch/mips/bcm47xx/sprom.c
@@ -628,3 +628,15 @@ void bcm47xx_fill_ssb_boardinfo(struct s
@@ -630,3 +630,15 @@ void bcm47xx_fill_ssb_boardinfo(struct s
nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0);
}
#endif

View File

@ -1,6 +1,6 @@
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -137,6 +137,7 @@ static int bcm47xx_get_sprom_ssb(struct
@@ -90,6 +90,7 @@ static int bcm47xx_get_sprom_ssb(struct
char prefix[10];
if (bus->bustype == SSB_BUSTYPE_PCI) {
@ -8,15 +8,15 @@
snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
bus->host_pci->bus->number + 1,
PCI_SLOT(bus->host_pci->devfn));
@@ -165,6 +166,7 @@ static int bcm47xx_get_invariants(struct
if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
@@ -111,6 +112,7 @@ static int bcm47xx_get_invariants(struct
bcm47xx_fill_ssb_boardinfo(&iv->boardinfo, NULL);
+ memset(&iv->sprom, 0, sizeof(struct ssb_sprom));
bcm47xx_fill_sprom(&iv->sprom, NULL);
if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
@@ -263,12 +265,14 @@ static int bcm47xx_get_sprom_bcma(struct
@@ -159,12 +161,14 @@ static int bcm47xx_get_sprom_bcma(struct
switch (bus->hosttype) {
case BCMA_HOSTTYPE_PCI:
@ -33,7 +33,7 @@
if (core) {
--- a/arch/mips/bcm47xx/sprom.c
+++ b/arch/mips/bcm47xx/sprom.c
@@ -555,8 +555,6 @@ void bcm47xx_fill_sprom_ethernet(struct
@@ -557,8 +557,6 @@ void bcm47xx_fill_sprom_ethernet(struct
void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix)
{

View File

@ -0,0 +1,10 @@
--- a/arch/mips/bcm47xx/Kconfig
+++ b/arch/mips/bcm47xx/Kconfig
@@ -21,6 +21,7 @@ config BCM47XX_BCMA
select BCMA
select BCMA_HOST_SOC
select BCMA_DRIVER_MIPS
+ select BCMA_HOST_PCI if PCI
select BCMA_DRIVER_PCI_HOSTMODE if PCI
default y
help

View File

@ -4,8 +4,8 @@
# under Linux.
#
-obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o
+obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o bus.o
-obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
+obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o sprom.o bus.o
obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
--- /dev/null
+++ b/arch/mips/bcm47xx/bus.c
@ -103,7 +103,7 @@
static void bcm47xx_machine_restart(char *command)
{
printk(KERN_ALERT "Please stand by while rebooting the system...\n");
@@ -291,6 +293,9 @@ static void __init bcm47xx_register_ssb(
@@ -137,6 +139,9 @@ static void __init bcm47xx_register_ssb(
if (err)
panic("Failed to initialize SSB bus (err %d)", err);
@ -113,16 +113,16 @@
mcore = &bcm47xx_bus.ssb.mipscore;
if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0) {
if (strstr(buf, "console=ttyS1")) {
@@ -315,6 +320,9 @@ static void __init bcm47xx_register_bcma
err = bcma_host_soc_register(&bcm47xx_bus.bcma);
@@ -195,6 +200,9 @@ static void __init bcm47xx_register_bcma
if (err)
panic("Failed to initialize BCMA bus (err %d)", err);
+
+ if (bcm47xx_bus.bcma.bus.drv_cc.flash_type == BCMA_SFLASH)
+ bcm47xx_sflash_struct_bcma_init(&bcm47xx_sflash, &bcm47xx_bus.bcma.bus.drv_cc);
+
bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
}
#endif
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm47xx/bus.h
@@ -0,0 +1,36 @@

View File

@ -8,9 +8,9 @@
default y
help
Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support.
@@ -22,6 +23,7 @@ config BCM47XX_BCMA
select BCMA_HOST_SOC
@@ -23,6 +24,7 @@ config BCM47XX_BCMA
select BCMA_DRIVER_MIPS
select BCMA_HOST_PCI if PCI
select BCMA_DRIVER_PCI_HOSTMODE if PCI
+ select BCMA_SFLASH
default y
@ -64,7 +64,7 @@
static void bcm47xx_machine_restart(char *command)
{
printk(KERN_ALERT "Please stand by while rebooting the system...\n");
@@ -310,6 +338,24 @@ static void __init bcm47xx_register_ssb(
@@ -156,6 +184,24 @@ static void __init bcm47xx_register_ssb(
}
}
}
@ -89,9 +89,9 @@
#endif
#ifdef CONFIG_BCM47XX_BCMA
@@ -324,6 +370,24 @@ static void __init bcm47xx_register_bcma
if (bcm47xx_bus.bcma.bus.drv_cc.flash_type == BCMA_SFLASH)
bcm47xx_sflash_struct_bcma_init(&bcm47xx_sflash, &bcm47xx_bus.bcma.bus.drv_cc);
@@ -205,6 +251,24 @@ static void __init bcm47xx_register_bcma
bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
}
+
+static int __init bcm47xx_register_flash_bcma(void)
@ -114,7 +114,7 @@
#endif
void __init plat_mem_setup(void)
@@ -366,3 +430,19 @@ static int __init bcm47xx_register_bus_c
@@ -247,3 +311,19 @@ static int __init bcm47xx_register_bus_c
return 0;
}
device_initcall(bcm47xx_register_bus_complete);

View File

@ -1,7 +1,7 @@
--- a/arch/mips/bcm47xx/Kconfig
+++ b/arch/mips/bcm47xx/Kconfig
@@ -24,6 +24,7 @@ config BCM47XX_BCMA
select BCMA_DRIVER_MIPS
@@ -25,6 +25,7 @@ config BCM47XX_BCMA
select BCMA_HOST_PCI if PCI
select BCMA_DRIVER_PCI_HOSTMODE if PCI
select BCMA_SFLASH
+ select BCMA_NFLASH
@ -115,7 +115,7 @@
@@ -4,6 +4,7 @@
* Copyright (C) 2006 Michael Buesch <m@bues.ch>
* Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.org>
* Copyright (C) 2010-2011 Hauke Mehrtens <hauke@hauke-m.de>
* Copyright (C) 2010-2012 Hauke Mehrtens <hauke@hauke-m.de>
+ * Copyright (C) 2011-2012 Tathagata Das <tathagata@alumnux.com>
*
* This program is free software; you can redistribute it and/or modify it
@ -148,17 +148,17 @@
static void bcm47xx_machine_restart(char *command)
{
printk(KERN_ALERT "Please stand by while rebooting the system...\n");
@@ -369,6 +384,9 @@ static void __init bcm47xx_register_bcma
@@ -248,6 +263,9 @@ static void __init bcm47xx_register_bcma
if (bcm47xx_bus.bcma.bus.drv_cc.flash_type == BCMA_SFLASH)
bcm47xx_sflash_struct_bcma_init(&bcm47xx_sflash, &bcm47xx_bus.bcma.bus.drv_cc);
+
+ if (bcm47xx_bus.bcma.bus.drv_cc.flash_type == BCMA_NFLASH)
+ bcm47xx_nflash_struct_bcma_init(&bcm47xx_nflash, &bcm47xx_bus.bcma.bus.drv_cc);
}
static int __init bcm47xx_register_flash_bcma(void)
@@ -383,6 +401,9 @@ static int __init bcm47xx_register_flash
bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
}
@@ -264,6 +282,9 @@ static int __init bcm47xx_register_flash
case BCMA_SFLASH:
bcm47xx_sflash_dev.dev.platform_data = &bcm47xx_sflash;
return platform_device_register(&bcm47xx_sflash_dev);

View File

@ -24,7 +24,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
@@ -320,6 +322,31 @@ static int bcm47xx_get_invariants(struct
@@ -166,6 +168,31 @@ static int bcm47xx_get_invariants(struct
return 0;
}
@ -56,7 +56,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
static void __init bcm47xx_register_ssb(void)
{
int err;
@@ -352,6 +379,10 @@ static void __init bcm47xx_register_ssb(
@@ -198,6 +225,10 @@ static void __init bcm47xx_register_ssb(
memcpy(&mcore->serial_ports[1], &port, sizeof(port));
}
}

View File

@ -3,7 +3,7 @@
@@ -4,4 +4,3 @@
#
obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o bus.o sprom.o
obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o sprom.o bus.o
-obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
--- a/arch/mips/bcm47xx/wgt634u.c
+++ /dev/null

View File

@ -9,8 +9,8 @@ out the configuration than the in kernel cfe config reader.
# under Linux.
#
-obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o bus.o sprom.o
+obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o bus.o sprom.o cfe_env.o
-obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o sprom.o bus.o
+obj-y += gpio.o irq.o nvram.o prom.o serial.o setup.o time.o sprom.o bus.o cfe_env.o
--- /dev/null
+++ b/arch/mips/bcm47xx/cfe_env.c
@@ -0,0 +1,229 @@