aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.8
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-07-19 12:02:34 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-07-19 12:02:34 +0000
commitc7f8cb3f4f55d187a56c3166793f906a19805358 (patch)
tree753e841c3e46b9a8013d384934e3469f79f64684 /target/linux/brcm47xx/patches-3.8
parent75df42e578094fba85c2ddd7ad402e4f24545479 (diff)
downloadupstream-c7f8cb3f4f55d187a56c3166793f906a19805358.tar.gz
upstream-c7f8cb3f4f55d187a56c3166793f906a19805358.tar.bz2
upstream-c7f8cb3f4f55d187a56c3166793f906a19805358.zip
kernel: update bcma and ssb to version from wireless-testing/master tag master-2013-07-18
This should fix some build problems in b43 with kernel 3.3. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37432
Diffstat (limited to 'target/linux/brcm47xx/patches-3.8')
-rw-r--r--target/linux/brcm47xx/patches-3.8/030-mtd-bcm47xxsflash-add-own-struct-for-abstrating-bus-.patch2
-rw-r--r--target/linux/brcm47xx/patches-3.8/060-ssb-add-serial-flash-driver.patch87
-rw-r--r--target/linux/brcm47xx/patches-3.8/070-bcma-add-functions-to-write-to-serial-flash.patch37
-rw-r--r--target/linux/brcm47xx/patches-3.8/241-bcma-broadcom-2011-sdk-updates.patch10
-rw-r--r--target/linux/brcm47xx/patches-3.8/280-activate_ssb_support_in_usb.patch4
5 files changed, 33 insertions, 107 deletions
diff --git a/target/linux/brcm47xx/patches-3.8/030-mtd-bcm47xxsflash-add-own-struct-for-abstrating-bus-.patch b/target/linux/brcm47xx/patches-3.8/030-mtd-bcm47xxsflash-add-own-struct-for-abstrating-bus-.patch
index 2d2f11bf34..a1d9b37011 100644
--- a/target/linux/brcm47xx/patches-3.8/030-mtd-bcm47xxsflash-add-own-struct-for-abstrating-bus-.patch
+++ b/target/linux/brcm47xx/patches-3.8/030-mtd-bcm47xxsflash-add-own-struct-for-abstrating-bus-.patch
@@ -113,7 +113,7 @@
+#endif /* BCM47XXSFLASH */
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
-@@ -544,6 +544,7 @@ struct bcma_nflash {
+@@ -599,6 +599,7 @@ struct bcma_nflash {
bool boot; /* This is the flash the SoC boots from */
struct mtd_info *mtd;
diff --git a/target/linux/brcm47xx/patches-3.8/060-ssb-add-serial-flash-driver.patch b/target/linux/brcm47xx/patches-3.8/060-ssb-add-serial-flash-driver.patch
index 1148a489db..dcb70e87b9 100644
--- a/target/linux/brcm47xx/patches-3.8/060-ssb-add-serial-flash-driver.patch
+++ b/target/linux/brcm47xx/patches-3.8/060-ssb-add-serial-flash-driver.patch
@@ -11,7 +11,7 @@
# Assumption: We are on embedded, if we compile the MIPS core.
--- a/drivers/ssb/driver_chipcommon_sflash.c
+++ b/drivers/ssb/driver_chipcommon_sflash.c
-@@ -1,14 +1,35 @@
+@@ -1,14 +1,22 @@
/*
* Sonics Silicon Backplane
* ChipCommon serial flash interface
@@ -31,50 +31,19 @@
+#define NUM_RETRIES 3
+
-+static struct resource ssb_sflash_resource = {
-+ .name = "ssb_sflash",
-+ .start = SSB_FLASH2,
-+ .end = 0,
-+ .flags = IORESOURCE_MEM | IORESOURCE_READONLY,
-+};
-+
-+struct platform_device ssb_sflash_dev = {
-+ .name = "bcm47xx-sflash",
-+ .resource = &ssb_sflash_resource,
-+ .num_resources = 1,
-+};
-+
- struct ssb_sflash_tbl_e {
- char *name;
- u32 id;
-@@ -16,7 +37,7 @@ struct ssb_sflash_tbl_e {
- u16 numblocks;
+ static struct resource ssb_sflash_resource = {
+ .name = "ssb_sflash",
+ .start = SSB_FLASH2,
+@@ -17,7 +25,7 @@ static struct resource ssb_sflash_resour
};
--static struct ssb_sflash_tbl_e ssb_sflash_st_tbl[] = {
-+static const struct ssb_sflash_tbl_e ssb_sflash_st_tbl[] = {
- { "M25P20", 0x11, 0x10000, 4, },
- { "M25P40", 0x12, 0x10000, 8, },
-
-@@ -27,7 +48,7 @@ static struct ssb_sflash_tbl_e ssb_sflas
- { 0 },
- };
-
--static struct ssb_sflash_tbl_e ssb_sflash_sst_tbl[] = {
-+static const struct ssb_sflash_tbl_e ssb_sflash_sst_tbl[] = {
- { "SST25WF512", 1, 0x1000, 16, },
- { "SST25VF512", 0x48, 0x1000, 16, },
- { "SST25WF010", 2, 0x1000, 32, },
-@@ -45,7 +66,7 @@ static struct ssb_sflash_tbl_e ssb_sflas
- { 0 },
+ struct platform_device ssb_sflash_dev = {
+- .name = "ssb_sflash",
++ .name = "bcm47xx-sflash",
+ .resource = &ssb_sflash_resource,
+ .num_resources = 1,
};
-
--static struct ssb_sflash_tbl_e ssb_sflash_at_tbl[] = {
-+static const struct ssb_sflash_tbl_e ssb_sflash_at_tbl[] = {
- { "AT45DB011", 0xc, 256, 512, },
- { "AT45DB021", 0x14, 256, 1024, },
- { "AT45DB041", 0x1c, 256, 2048, },
-@@ -70,10 +91,186 @@ static void ssb_sflash_cmd(struct ssb_ch
+@@ -83,10 +91,185 @@ static void ssb_sflash_cmd(struct ssb_ch
pr_err("SFLASH control command failed (timeout)!\n");
}
@@ -256,25 +225,18 @@
/* Initialize serial flash access */
int ssb_sflash_init(struct ssb_chipcommon *cc)
{
-- struct ssb_sflash_tbl_e *e;
+- struct ssb_sflash *sflash = &cc->dev->bus->mipscore.sflash;
+ struct bcm47xxsflash *sflash = &cc->sflash;
-+ const struct ssb_sflash_tbl_e *e;
+ const struct ssb_sflash_tbl_e *e;
u32 id, id2;
- switch (cc->capabilities & SSB_CHIPCO_CAP_FLASHT) {
-@@ -131,10 +328,26 @@ int ssb_sflash_init(struct ssb_chipcommo
- return -ENOTSUPP;
- }
-
+@@ -150,17 +333,21 @@ int ssb_sflash_init(struct ssb_chipcommo
+ sflash->numblocks = e->numblocks;
+ sflash->size = sflash->blocksize * sflash->numblocks;
+ sflash->present = true;
+-
- pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
- e->name, e->blocksize, e->numblocks);
--
-- pr_err("Serial flash support is not implemented yet!\n");
-+ sflash->window = SSB_FLASH2;
-+ sflash->blocksize = e->blocksize;
-+ sflash->numblocks = e->numblocks;
-+ sflash->size = sflash->blocksize * sflash->numblocks;
-+ sflash->present = true;
+ sflash->poll = ssb_sflash_poll;
+ sflash->write = ssb_sflash_write;
+ sflash->erase = ssb_sflash_erase;
@@ -284,13 +246,16 @@
+ pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n",
+ e->name, sflash->size / 1024, sflash->blocksize,
+ sflash->numblocks);
-+
-+ /* Prepare platform device, but don't register it yet. It's too early,
-+ * malloc (required by device_private_init) is not available yet. */
-+ ssb_sflash_dev.resource[0].end = ssb_sflash_dev.resource[0].start +
+
+ /* Prepare platform device, but don't register it yet. It's too early,
+ * malloc (required by device_private_init) is not available yet. */
+ ssb_sflash_dev.resource[0].end = ssb_sflash_dev.resource[0].start +
+- sflash->size;
+ sflash->size;
-+ ssb_sflash_dev.dev.platform_data = sflash;
+ ssb_sflash_dev.dev.platform_data = sflash;
+- pr_err("Serial flash support is not implemented yet!\n");
+-
- return -ENOTSUPP;
+ return 0;
}
diff --git a/target/linux/brcm47xx/patches-3.8/070-bcma-add-functions-to-write-to-serial-flash.patch b/target/linux/brcm47xx/patches-3.8/070-bcma-add-functions-to-write-to-serial-flash.patch
index bba2b69e46..fb0e0469f1 100644
--- a/target/linux/brcm47xx/patches-3.8/070-bcma-add-functions-to-write-to-serial-flash.patch
+++ b/target/linux/brcm47xx/patches-3.8/070-bcma-add-functions-to-write-to-serial-flash.patch
@@ -31,34 +31,7 @@
.resource = &bcma_sflash_resource,
.num_resources = 1,
};
-@@ -30,7 +37,7 @@ struct bcma_sflash_tbl_e {
- u16 numblocks;
- };
-
--static struct bcma_sflash_tbl_e bcma_sflash_st_tbl[] = {
-+static const struct bcma_sflash_tbl_e bcma_sflash_st_tbl[] = {
- { "M25P20", 0x11, 0x10000, 4, },
- { "M25P40", 0x12, 0x10000, 8, },
-
-@@ -41,7 +48,7 @@ static struct bcma_sflash_tbl_e bcma_sfl
- { 0 },
- };
-
--static struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
-+static const struct bcma_sflash_tbl_e bcma_sflash_sst_tbl[] = {
- { "SST25WF512", 1, 0x1000, 16, },
- { "SST25VF512", 0x48, 0x1000, 16, },
- { "SST25WF010", 2, 0x1000, 32, },
-@@ -59,7 +66,7 @@ static struct bcma_sflash_tbl_e bcma_sfl
- { 0 },
- };
-
--static struct bcma_sflash_tbl_e bcma_sflash_at_tbl[] = {
-+static const struct bcma_sflash_tbl_e bcma_sflash_at_tbl[] = {
- { "AT45DB011", 0xc, 256, 512, },
- { "AT45DB021", 0x14, 256, 1024, },
- { "AT45DB041", 0x1c, 256, 2048, },
-@@ -84,12 +91,186 @@ static void bcma_sflash_cmd(struct bcma_
+@@ -84,11 +91,185 @@ static void bcma_sflash_cmd(struct bcma_
bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n");
}
@@ -241,12 +214,10 @@
{
struct bcma_bus *bus = cc->core->bus;
- struct bcma_sflash *sflash = &cc->sflash;
-- struct bcma_sflash_tbl_e *e;
+ struct bcm47xxsflash *sflash = &cc->sflash;
-+ const struct bcma_sflash_tbl_e *e;
+ const struct bcma_sflash_tbl_e *e;
u32 id, id2;
- switch (cc->capabilities & BCMA_CC_CAP_FLASHT) {
@@ -150,6 +331,11 @@ int bcma_sflash_init(struct bcma_drv_cc
sflash->numblocks = e->numblocks;
sflash->size = sflash->blocksize * sflash->numblocks;
@@ -269,7 +240,7 @@
/** ChipCommon core registers. **/
#define BCMA_CC_ID 0x0000
-@@ -523,19 +524,6 @@ struct bcma_pflash {
+@@ -578,19 +579,6 @@ struct bcma_pflash {
u32 window_size;
};
@@ -289,7 +260,7 @@
#ifdef CONFIG_BCMA_NFLASH
struct mtd_info;
-@@ -570,7 +558,7 @@ struct bcma_drv_cc {
+@@ -625,7 +613,7 @@ struct bcma_drv_cc {
#ifdef CONFIG_BCMA_DRIVER_MIPS
struct bcma_pflash pflash;
#ifdef CONFIG_BCMA_SFLASH
diff --git a/target/linux/brcm47xx/patches-3.8/241-bcma-broadcom-2011-sdk-updates.patch b/target/linux/brcm47xx/patches-3.8/241-bcma-broadcom-2011-sdk-updates.patch
deleted file mode 100644
index 72b02088c6..0000000000
--- a/target/linux/brcm47xx/patches-3.8/241-bcma-broadcom-2011-sdk-updates.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/drivers/bcma/core.c
-+++ b/drivers/bcma/core.c
-@@ -43,6 +43,7 @@ int bcma_core_enable(struct bcma_device
- bcma_aread32(core, BCMA_IOCTL);
-
- bcma_awrite32(core, BCMA_RESET_CTL, 0);
-+ bcma_aread32(core, BCMA_RESET_CTL);
- udelay(1);
-
- bcma_awrite32(core, BCMA_IOCTL, (BCMA_IOCTL_CLK | flags));
diff --git a/target/linux/brcm47xx/patches-3.8/280-activate_ssb_support_in_usb.patch b/target/linux/brcm47xx/patches-3.8/280-activate_ssb_support_in_usb.patch
index c4382ed514..aabaf29471 100644
--- a/target/linux/brcm47xx/patches-3.8/280-activate_ssb_support_in_usb.patch
+++ b/target/linux/brcm47xx/patches-3.8/280-activate_ssb_support_in_usb.patch
@@ -5,7 +5,7 @@ This prevents the options from being delete with make kernel_oldconfig.
--- a/drivers/bcma/Kconfig
+++ b/drivers/bcma/Kconfig
-@@ -37,6 +37,7 @@ config BCMA_DRIVER_PCI_HOSTMODE
+@@ -38,6 +38,7 @@ config BCMA_DRIVER_PCI_HOSTMODE
config BCMA_HOST_SOC
bool
depends on BCMA_DRIVER_MIPS
@@ -18,7 +18,7 @@ This prevents the options from being delete with make kernel_oldconfig.
@@ -146,6 +146,7 @@ config SSB_SFLASH
config SSB_EMBEDDED
bool
- depends on SSB_DRIVER_MIPS
+ depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE
+ select USB_HCD_SSB if USB_EHCI_HCD || USB_OHCI_HCD
default y