aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-04-26 17:08:53 +0000
committerRafał Miłecki <zajec5@gmail.com>2016-04-26 17:08:53 +0000
commit7092a08d771f6cbd72788c4893b60fa144b617bf (patch)
treee35505b7b557c3b7073c4fc5fd07d2a25d84865f /target/linux/bcm53xx
parent933b47bd5c9a711c9900661468343b48334b1e21 (diff)
downloadmaster-187ad058-7092a08d771f6cbd72788c4893b60fa144b617bf.tar.gz
master-187ad058-7092a08d771f6cbd72788c4893b60fa144b617bf.tar.bz2
master-187ad058-7092a08d771f6cbd72788c4893b60fa144b617bf.zip
bcm53xx: switch to m25p80 and drop bcm53xxspiflash
For some time now m25p80 supports 32 MiB flashes and we just needed to patch spi-nor to support JEDEC incompatible w25q128. Also by switching to m25p80 we gain accelerated SPI flash reads. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49260 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/bcm53xx')
-rw-r--r--target/linux/bcm53xx/config-4.42
-rw-r--r--target/linux/bcm53xx/patches-4.4/404-mtd-bcm53xxspiflash-new-driver-for-SPI-flahes-on-Bro.patch20
-rw-r--r--target/linux/bcm53xx/patches-4.4/820-spi-bcm53xx-let-DT-specify-SPI-device-s-instead-hard.patch41
3 files changed, 42 insertions, 21 deletions
diff --git a/target/linux/bcm53xx/config-4.4 b/target/linux/bcm53xx/config-4.4
index 40826c78f9..ce9508a2ef 100644
--- a/target/linux/bcm53xx/config-4.4
+++ b/target/linux/bcm53xx/config-4.4
@@ -215,11 +215,11 @@ CONFIG_MIGHT_HAVE_CACHE_L2X0=y
CONFIG_MIGHT_HAVE_PCI=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_MTD_BCM47XX_PARTS=y
+CONFIG_MTD_M25P80=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_BRCMNAND=y
CONFIG_MTD_NAND_ECC=y
# CONFIG_MTD_PHYSMAP_OF is not set
-CONFIG_MTD_SPI_BCM53XXSPIFLASH=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_SEAMA_FW=y
diff --git a/target/linux/bcm53xx/patches-4.4/404-mtd-bcm53xxspiflash-new-driver-for-SPI-flahes-on-Bro.patch b/target/linux/bcm53xx/patches-4.4/404-mtd-bcm53xxspiflash-new-driver-for-SPI-flahes-on-Bro.patch
deleted file mode 100644
index 487e64fd5b..0000000000
--- a/target/linux/bcm53xx/patches-4.4/404-mtd-bcm53xxspiflash-new-driver-for-SPI-flahes-on-Bro.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/drivers/mtd/spi-nor/Kconfig
-+++ b/drivers/mtd/spi-nor/Kconfig
-@@ -41,4 +41,10 @@ config SPI_NXP_SPIFI
- Flash. Enable this option if you have a device with a SPIFI
- controller and want to access the Flash as a mtd device.
-
-+config MTD_SPI_BCM53XXSPIFLASH
-+ tristate "SPI-NOR flashes connected to the Broadcom ARM SoC"
-+ depends on MTD_SPI_NOR
-+ help
-+ SPI driver for flashes used on Broadcom ARM SoCs.
-+
- endif # MTD_SPI_NOR
---- a/drivers/mtd/spi-nor/Makefile
-+++ b/drivers/mtd/spi-nor/Makefile
-@@ -1,3 +1,4 @@
- obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o
- obj-$(CONFIG_SPI_FSL_QUADSPI) += fsl-quadspi.o
-+obj-$(CONFIG_MTD_SPI_BCM53XXSPIFLASH) += bcm53xxspiflash.o
- obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o
diff --git a/target/linux/bcm53xx/patches-4.4/820-spi-bcm53xx-let-DT-specify-SPI-device-s-instead-hard.patch b/target/linux/bcm53xx/patches-4.4/820-spi-bcm53xx-let-DT-specify-SPI-device-s-instead-hard.patch
new file mode 100644
index 0000000000..0519c1bbcc
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.4/820-spi-bcm53xx-let-DT-specify-SPI-device-s-instead-hard.patch
@@ -0,0 +1,41 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
+Subject: [PATCH] spi: bcm53xx: let DT specify SPI device(s) instead hardcoding
+ them
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+---
+
+--- a/drivers/spi/spi-bcm53xx.c
++++ b/drivers/spi/spi-bcm53xx.c
+@@ -275,10 +275,6 @@ static int bcm53xxspi_flash_read(struct spi_device *spi,
+ * BCMA
+ **************************************************/
+
+-static struct spi_board_info bcm53xx_info = {
+- .modalias = "bcm53xxspiflash",
+-};
+-
+ static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = {
+ BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS),
+ {},
+@@ -300,6 +296,7 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core)
+ master = spi_alloc_master(dev, sizeof(*b53spi));
+ if (!master)
+ return -ENOMEM;
++ master->dev.of_node = dev->of_node;
+
+ b53spi = spi_master_get_devdata(master);
+ b53spi->master = master;
+@@ -324,9 +321,6 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core)
+ return err;
+ }
+
+- /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */
+- spi_new_device(master, &bcm53xx_info);
+-
+ return 0;
+ }
+