summaryrefslogtreecommitdiff
path: root/target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-02-04 23:00:55 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-02-04 23:00:55 +0000
commitb75a9b04dfd077a5b57ba2785cc3bab7a5a79b80 (patch)
tree885cea12c5c607babd5c02179276c9f43db1d8f7 /target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch
parentf491623c3771b47fca0a53bd5776730bea741890 (diff)
downloadmtk-20170518-b75a9b04dfd077a5b57ba2785cc3bab7a5a79b80.zip
mtk-20170518-b75a9b04dfd077a5b57ba2785cc3bab7a5a79b80.tar.gz
mtk-20170518-b75a9b04dfd077a5b57ba2785cc3bab7a5a79b80.tar.bz2
bcm53xx: update the bcm53xx patches
This does not add any new features, just some changes to the patches and a first try to use dt to set the irqs. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 39466
Diffstat (limited to 'target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch')
-rw-r--r--target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch41
1 files changed, 30 insertions, 11 deletions
diff --git a/target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch b/target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch
index 0077f90..fe44827 100644
--- a/target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch
+++ b/target/linux/bcm53xx/patches-3.10/111-bcma-register-bcma-as-device-tree-driver.patch
@@ -1,12 +1,16 @@
-bcma: register bcma as device tree driver
+From c046c19fc8f1af7cf253fea5b0253143c159948a Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Mon, 6 Jan 2014 23:29:15 +0100
+Subject: [PATCH 6/8] bcma: register bcma as device tree driver
This driver is used by the bcm53xx ARM SoC code.Now it is possible to
give the address of the chipcommon core in device tree.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
- drivers/bcma/host_soc.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 73 insertions(+)
+ drivers/bcma/host_soc.c | 70 +++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/bcma/bcma.h | 2 ++
+ 2 files changed, 72 insertions(+)
--- a/drivers/bcma/host_soc.c
+++ b/drivers/bcma/host_soc.c
@@ -20,7 +24,15 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <linux/bcma/bcma.h>
#include <linux/bcma/bcma_soc.h>
-@@ -181,3 +184,73 @@ int __init bcma_host_soc_register(struct
+@@ -173,6 +176,7 @@ int __init bcma_host_soc_register(struct
+ /* Host specific */
+ bus->hosttype = BCMA_HOSTTYPE_SOC;
+ bus->ops = &bcma_host_soc_ops;
++ bus->host_pdev = NULL;
+
+ /* Register */
+ err = bcma_bus_early_register(bus, &soc->core_cc, &soc->core_mips);
+@@ -181,3 +185,69 @@ int __init bcma_host_soc_register(struct
return err;
}
@@ -34,20 +46,19 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+ int err;
+
+ /* Alloc */
-+ bus = kzalloc(sizeof(*bus), GFP_KERNEL);
++ bus = devm_kzalloc(dev, sizeof(*bus), GFP_KERNEL);
+ if (!bus)
+ return -ENOMEM;
+
+ /* Map MMIO */
-+ err = -ENOMEM;
+ bus->mmio = of_iomap(np, 0);
+ if (!bus->mmio)
-+ goto err_kfree_bus;
++ return -ENOMEM;
+
+ /* Host specific */
+ bus->hosttype = BCMA_HOSTTYPE_SOC;
+ bus->ops = &bcma_host_soc_ops;
-+
++ bus->host_pdev = pdev;
+
+ /* Register */
+ err = bcma_bus_register(bus);
@@ -60,8 +71,6 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+
+err_unmap_mmio:
+ iounmap(bus->mmio);
-+err_kfree_bus:
-+ kfree(bus);
+ return err;
+}
+
@@ -71,7 +80,6 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+
+ bcma_bus_unregister(bus);
+ iounmap(bus->mmio);
-+ kfree(bus);
+ platform_set_drvdata(pdev, NULL);
+
+ return 0;
@@ -94,3 +102,14 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+};
+module_platform_driver(bcma_host_soc_driver);
+#endif /* CONFIG_OF */
+--- a/include/linux/bcma/bcma.h
++++ b/include/linux/bcma/bcma.h
+@@ -319,6 +319,8 @@ struct bcma_bus {
+ struct pci_dev *host_pci;
+ /* Pointer to the SDIO device (only for BCMA_HOSTTYPE_SDIO) */
+ struct sdio_func *host_sdio;
++ /* Pointer to platform device (only for BCMA_HOSTTYPE_SOC) */
++ struct platform_device *host_pdev;
+ };
+
+ struct bcma_chipinfo chipinfo;