All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Various OF fixes for little-endian and ARM
@ 2010-11-16 20:33 Rob Herring
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

This is a mixture of driver fixes for OF on little-endian and ARM platforms.

The last 2 patches need more thought. Currently, it's just copied from PPC. There 
are some ARM platforms which set 64-bit dma_masks (iop13xx and orion5x)
which is not handled. I would think 64-bit PPC would have a similar issue.

Rob Herring (7):
  OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
  of: Fixes for OF probing on little endian systems
  ipmi: explicitly include of_address.h and of_irq.h
  mmc: sdhci-of: fix build on non-powerpc platforms
  mmc: sdhci-of: support generic OF controllers
  ARM: add dma_mask to pdev_archdata
  OF: set dma_mask for ARM

 arch/arm/include/asm/device.h    |    1 +
 drivers/char/ipmi/ipmi_si_intf.c |   24 +++++++++++++-----------
 drivers/mmc/host/Kconfig         |    2 +-
 drivers/mmc/host/sdhci-of-core.c |   18 ++++++++++++++++--
 drivers/mtd/Kconfig              |    2 +-
 drivers/mtd/maps/Kconfig         |    2 +-
 drivers/net/can/sja1000/Kconfig  |    4 ++--
 drivers/of/platform.c            |    4 ++--
 drivers/serial/Kconfig           |    2 +-
 drivers/usb/host/isp1760-if.c    |    8 ++++----
 10 files changed, 42 insertions(+), 25 deletions(-)

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-16 20:33   ` Rob Herring
       [not found]     ` <1289939635-30742-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:33   ` [PATCH 2/7] of: Fixes for OF probing on little endian systems Rob Herring
                     ` (6 subsequent siblings)
  7 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Some OF drivers could likely be used on non-powerpc OF based platforms,
so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF

Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
---
 drivers/char/ipmi/ipmi_si_intf.c |   14 +++++++-------
 drivers/mmc/host/Kconfig         |    2 +-
 drivers/mtd/Kconfig              |    2 +-
 drivers/mtd/maps/Kconfig         |    2 +-
 drivers/net/can/sja1000/Kconfig  |    4 ++--
 drivers/serial/Kconfig           |    2 +-
 drivers/usb/host/isp1760-if.c    |    8 ++++----
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 035da9e..1b33a42 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -66,7 +66,7 @@
 #include <linux/ctype.h>
 #include <linux/pnp.h>
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 #include <linux/of_device.h>
 #include <linux/of_platform.h>
 #endif
@@ -308,7 +308,7 @@ static int pci_registered;
 #ifdef CONFIG_ACPI
 static int pnp_registered;
 #endif
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 static int of_registered;
 #endif
 
@@ -2540,7 +2540,7 @@ static struct pci_driver ipmi_pci_driver = {
 #endif /* CONFIG_PCI */
 
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 static int __devinit ipmi_of_probe(struct platform_device *dev,
 			 const struct of_device_id *match)
 {
@@ -2646,7 +2646,7 @@ static struct of_platform_driver ipmi_of_platform_driver = {
 	.probe		= ipmi_of_probe,
 	.remove		= __devexit_p(ipmi_of_remove),
 };
-#endif /* CONFIG_PPC_OF */
+#endif /* CONFIG_OF */
 
 static int wait_for_msg_done(struct smi_info *smi_info)
 {
@@ -3380,7 +3380,7 @@ static int __devinit init_ipmi_si(void)
 	spmi_find_bmc();
 #endif
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 	of_register_platform_driver(&ipmi_of_platform_driver);
 	of_registered = 1;
 #endif
@@ -3440,7 +3440,7 @@ static int __devinit init_ipmi_si(void)
 			pci_unregister_driver(&ipmi_pci_driver);
 #endif
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 		if (of_registered)
 			of_unregister_platform_driver(&ipmi_of_platform_driver);
 #endif
@@ -3541,7 +3541,7 @@ static void __exit cleanup_ipmi_si(void)
 		pnp_unregister_driver(&ipmi_pnp_driver);
 #endif
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 	if (of_registered)
 		of_unregister_platform_driver(&ipmi_of_platform_driver);
 #endif
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index d618e86..982ff67 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -83,7 +83,7 @@ config MMC_RICOH_MMC
 
 config MMC_SDHCI_OF
 	tristate "SDHCI support on OpenFirmware platforms"
-	depends on MMC_SDHCI && PPC_OF
+	depends on MMC_SDHCI && OF
 	help
 	  This selects the OF support for Secure Digital Host Controller
 	  Interfaces.
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 1e2cbf5..b1f7689 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -159,7 +159,7 @@ config MTD_AFS_PARTS
 
 config MTD_OF_PARTS
 	tristate "Flash partition map based on OF description"
-	depends on (MICROBLAZE || PPC_OF) && MTD_PARTITIONS
+	depends on OF && MTD_PARTITIONS
 	help
 	  This provides a partition parsing function which derives
 	  the partition map from the children of the flash node,
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index a0dd7bb..5d37d31 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -72,7 +72,7 @@ config MTD_PHYSMAP_BANKWIDTH
 
 config MTD_PHYSMAP_OF
 	tristate "Flash device in physical memory map based on OF description"
-	depends on (MICROBLAZE || PPC_OF) && (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
+	depends on OF && (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
 	help
 	  This provides a 'mapping' driver which allows the NOR Flash and
 	  ROM driver code to communicate with chips which are mapped
diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
index 6fdc031..3175190 100644
--- a/drivers/net/can/sja1000/Kconfig
+++ b/drivers/net/can/sja1000/Kconfig
@@ -22,11 +22,11 @@ config CAN_SJA1000_PLATFORM
 
 config CAN_SJA1000_OF_PLATFORM
 	tristate "Generic OF Platform Bus based SJA1000 driver"
-	depends on PPC_OF
+	depends on OF
 	---help---
 	  This driver adds support for the SJA1000 chips connected to
 	  the OpenFirmware "platform bus" found on embedded systems with
-	  OpenFirmware bindings, e.g. if you have a PowerPC based system
+	  OpenFirmware bindings, e.g. if you have a OpenFirmware based system
 	  you may want to enable this option.
 
 config CAN_EMS_PCI
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index aff9dcd..9d109f9 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -1402,7 +1402,7 @@ config SERIAL_NETX_CONSOLE
 
 config SERIAL_OF_PLATFORM
 	tristate "Serial port on Open Firmware platform bus"
-	depends on PPC_OF || MICROBLAZE
+	depends on OF
 	depends on SERIAL_8250 || SERIAL_OF_PLATFORM_NWPSERIAL
 	help
 	  If you have a PowerPC based system that has serial ports
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 3b28dbf..c0de61e 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -17,7 +17,7 @@
 
 #include "isp1760-hcd.h"
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #endif
@@ -26,7 +26,7 @@
 #include <linux/pci.h>
 #endif
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 static int of_isp1760_probe(struct platform_device *dev,
 		const struct of_device_id *match)
 {
@@ -397,7 +397,7 @@ static int __init isp1760_init(void)
 	ret = platform_driver_register(&isp1760_plat_driver);
 	if (!ret)
 		any_ret = 0;
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 	ret = of_register_platform_driver(&isp1760_of_driver);
 	if (!ret)
 		any_ret = 0;
@@ -417,7 +417,7 @@ module_init(isp1760_init);
 static void __exit isp1760_exit(void)
 {
 	platform_driver_unregister(&isp1760_plat_driver);
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 	of_unregister_platform_driver(&isp1760_of_driver);
 #endif
 #ifdef CONFIG_PCI
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 2/7] of: Fixes for OF probing on little endian systems
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:33   ` [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF Rob Herring
@ 2010-11-16 20:33   ` Rob Herring
       [not found]     ` <1289939635-30742-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:33   ` [PATCH 3/7] ipmi: explicitly include of_address.h and of_irq.h Rob Herring
                     ` (5 subsequent siblings)
  7 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Fixes for sdhci-of and ipmi drivers.

Auditing all drivers using of_get_property did not find other
occurrences likely to be used on LE platforms.

Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
---
 drivers/char/ipmi/ipmi_si_intf.c |    8 ++++----
 drivers/mmc/host/sdhci-of-core.c |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 1b33a42..8842044 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2546,7 +2546,7 @@ static int __devinit ipmi_of_probe(struct platform_device *dev,
 {
 	struct smi_info *info;
 	struct resource resource;
-	const int *regsize, *regspacing, *regshift;
+	const __be32 *regsize, *regspacing, *regshift;
 	struct device_node *np = dev->dev.of_node;
 	int ret;
 	int proplen;
@@ -2599,9 +2599,9 @@ static int __devinit ipmi_of_probe(struct platform_device *dev,
 
 	info->io.addr_data	= resource.start;
 
-	info->io.regsize	= regsize ? *regsize : DEFAULT_REGSIZE;
-	info->io.regspacing	= regspacing ? *regspacing : DEFAULT_REGSPACING;
-	info->io.regshift	= regshift ? *regshift : 0;
+	info->io.regsize	= regsize ? be32_to_cpup(regsize) : DEFAULT_REGSIZE;
+	info->io.regspacing	= regspacing ? be32_to_cpup(regspacing) : DEFAULT_REGSPACING;
+	info->io.regshift	= regshift ? be32_to_cpup(regshift) : 0;
 
 	info->irq		= irq_of_parse_and_map(dev->dev.of_node, 0);
 	info->dev		= &dev->dev;
diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index c51b711..fa19d84 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -122,7 +122,7 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
 	struct sdhci_of_data *sdhci_of_data = match->data;
 	struct sdhci_host *host;
 	struct sdhci_of_host *of_host;
-	const u32 *clk;
+	const __be32 *clk;
 	int size;
 	int ret;
 
@@ -166,7 +166,7 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
 
 	clk = of_get_property(np, "clock-frequency", &size);
 	if (clk && size == sizeof(*clk) && *clk)
-		of_host->clock = *clk;
+		of_host->clock = be32_to_cpup(clk);
 
 	ret = sdhci_add_host(host);
 	if (ret)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 3/7] ipmi: explicitly include of_address.h and of_irq.h
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:33   ` [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF Rob Herring
  2010-11-16 20:33   ` [PATCH 2/7] of: Fixes for OF probing on little endian systems Rob Herring
@ 2010-11-16 20:33   ` Rob Herring
       [not found]     ` <1289939635-30742-4-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:33   ` [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms Rob Herring
                     ` (4 subsequent siblings)
  7 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

of_address.h and of_irq.h are implicitly included on powerpc. Adding
them fixes builds on non-powerpc platforms.

Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
---
 drivers/char/ipmi/ipmi_si_intf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 8842044..51b33cf 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -69,6 +69,8 @@
 #ifdef CONFIG_OF
 #include <linux/of_device.h>
 #include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
 #endif
 
 #define PFX "ipmi_si: "
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2010-11-16 20:33   ` [PATCH 3/7] ipmi: explicitly include of_address.h and of_irq.h Rob Herring
@ 2010-11-16 20:33   ` Rob Herring
  2010-11-16 21:44     ` Wolfram Sang
       [not found]     ` <1289939635-30742-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:33   ` [PATCH 5/7] mmc: sdhci-of: support generic OF controllers Rob Herring
                     ` (3 subsequent siblings)
  7 siblings, 2 replies; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Explicitly include err.h, of_address.h and of_irq.h.
Make use of machine_is() conditional on PPC.

Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
---
 drivers/mmc/host/sdhci-of-core.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index fa19d84..dd84124 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -13,6 +13,7 @@
  * your option) any later version.
  */
 
+#include <linux/err.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -20,8 +21,12 @@
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
 #include <linux/mmc/host.h>
+#ifdef CONFIG_PPC
 #include <asm/machdep.h>
+#endif
 #include "sdhci-of.h"
 #include "sdhci.h"
 
@@ -112,7 +117,11 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
 		return true;
 
 	/* Old device trees don't have the wp-inverted property. */
+#ifdef CONFIG_PPC
 	return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
+#else
+	return false;
+#endif
 }
 
 static int __devinit sdhci_of_probe(struct platform_device *ofdev,
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 5/7] mmc: sdhci-of: support generic OF controllers
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (3 preceding siblings ...)
  2010-11-16 20:33   ` [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms Rob Herring
@ 2010-11-16 20:33   ` Rob Herring
  2010-11-16 21:32     ` Wolfram Sang
       [not found]     ` <1289939635-30742-6-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:33   ` [PATCH 6/7] ARM: add dma_mask to pdev_archdata Rob Herring
                     ` (2 subsequent siblings)
  7 siblings, 2 replies; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

The base sdhci driver requires a valid ops struct. Add empty struct to
sdhci-of to allow generic controllers which don't need custom ops functions.

Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
---
 drivers/mmc/host/sdhci-of-core.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index dd84124..de292fe 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -30,6 +30,9 @@
 #include "sdhci-of.h"
 #include "sdhci.h"
 
+static struct sdhci_ops sdhci_of_ops = {
+};
+
 #ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
 
 /*
@@ -161,6 +164,8 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
 	if (sdhci_of_data) {
 		host->quirks = sdhci_of_data->quirks;
 		host->ops = &sdhci_of_data->ops;
+	} else {
+		host->ops = &sdhci_of_ops;
 	}
 
 	if (of_get_property(np, "sdhci,auto-cmd12", NULL))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 6/7] ARM: add dma_mask to pdev_archdata
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (4 preceding siblings ...)
  2010-11-16 20:33   ` [PATCH 5/7] mmc: sdhci-of: support generic OF controllers Rob Herring
@ 2010-11-16 20:33   ` Rob Herring
  2010-11-16 20:33   ` [PATCH 7/7] OF: set dma_mask for ARM Rob Herring
  2010-11-17  0:07   ` [PATCH 0/7] Various OF fixes for little-endian and ARM Stephen Rothwell
  7 siblings, 0 replies; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
---
 arch/arm/include/asm/device.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h
index 9f390ce..2035476 100644
--- a/arch/arm/include/asm/device.h
+++ b/arch/arm/include/asm/device.h
@@ -13,6 +13,7 @@ struct dev_archdata {
 };
 
 struct pdev_archdata {
+        u64 dma_mask;
 };
 
 #endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 7/7] OF: set dma_mask for ARM
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (5 preceding siblings ...)
  2010-11-16 20:33   ` [PATCH 6/7] ARM: add dma_mask to pdev_archdata Rob Herring
@ 2010-11-16 20:33   ` Rob Herring
       [not found]     ` <1289939635-30742-8-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-17  0:07   ` [PATCH 0/7] Various OF fixes for little-endian and ARM Stephen Rothwell
  7 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-16 20:33 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring

From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Various drivers require dma_mask to be valid, so it needs to be setup
when doing OF probing on ARM.

Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
---
 drivers/of/platform.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 5b4a07f..fe2669a 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -614,7 +614,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
 	}
 
 	dev->dev.of_node = of_node_get(np);
-#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
+#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
 	dev->dev.dma_mask = &dev->archdata.dma_mask;
 #endif
 	dev->dev.parent = parent;
@@ -644,7 +644,7 @@ struct platform_device *of_platform_device_create(struct device_node *np,
 	if (!dev)
 		return NULL;
 
-#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
+#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
 	dev->archdata.dma_mask = 0xffffffffUL;
 #endif
 	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]     ` <1289939635-30742-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-16 20:40       ` Grant Likely
       [not found]         ` <20101116204058.GA5016-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
  2010-11-17  5:43       ` Grant Likely
  1 sibling, 1 reply; 33+ messages in thread
From: Grant Likely @ 2010-11-16 20:40 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> Some OF drivers could likely be used on non-powerpc OF based platforms,
> so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF
> 
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Hi Rob,

Which of these drivers are you actually using, or going to use in the
near future?

g.


> ---
>  drivers/char/ipmi/ipmi_si_intf.c |   14 +++++++-------
>  drivers/mmc/host/Kconfig         |    2 +-
>  drivers/mtd/Kconfig              |    2 +-
>  drivers/mtd/maps/Kconfig         |    2 +-
>  drivers/net/can/sja1000/Kconfig  |    4 ++--
>  drivers/serial/Kconfig           |    2 +-
>  drivers/usb/host/isp1760-if.c    |    8 ++++----
>  7 files changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 035da9e..1b33a42 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -66,7 +66,7 @@
>  #include <linux/ctype.h>
>  #include <linux/pnp.h>
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  #include <linux/of_device.h>
>  #include <linux/of_platform.h>
>  #endif
> @@ -308,7 +308,7 @@ static int pci_registered;
>  #ifdef CONFIG_ACPI
>  static int pnp_registered;
>  #endif
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int of_registered;
>  #endif
>  
> @@ -2540,7 +2540,7 @@ static struct pci_driver ipmi_pci_driver = {
>  #endif /* CONFIG_PCI */
>  
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int __devinit ipmi_of_probe(struct platform_device *dev,
>  			 const struct of_device_id *match)
>  {
> @@ -2646,7 +2646,7 @@ static struct of_platform_driver ipmi_of_platform_driver = {
>  	.probe		= ipmi_of_probe,
>  	.remove		= __devexit_p(ipmi_of_remove),
>  };
> -#endif /* CONFIG_PPC_OF */
> +#endif /* CONFIG_OF */
>  
>  static int wait_for_msg_done(struct smi_info *smi_info)
>  {
> @@ -3380,7 +3380,7 @@ static int __devinit init_ipmi_si(void)
>  	spmi_find_bmc();
>  #endif
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  	of_register_platform_driver(&ipmi_of_platform_driver);
>  	of_registered = 1;
>  #endif
> @@ -3440,7 +3440,7 @@ static int __devinit init_ipmi_si(void)
>  			pci_unregister_driver(&ipmi_pci_driver);
>  #endif
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  		if (of_registered)
>  			of_unregister_platform_driver(&ipmi_of_platform_driver);
>  #endif
> @@ -3541,7 +3541,7 @@ static void __exit cleanup_ipmi_si(void)
>  		pnp_unregister_driver(&ipmi_pnp_driver);
>  #endif
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  	if (of_registered)
>  		of_unregister_platform_driver(&ipmi_of_platform_driver);
>  #endif
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index d618e86..982ff67 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -83,7 +83,7 @@ config MMC_RICOH_MMC
>  
>  config MMC_SDHCI_OF
>  	tristate "SDHCI support on OpenFirmware platforms"
> -	depends on MMC_SDHCI && PPC_OF
> +	depends on MMC_SDHCI && OF
>  	help
>  	  This selects the OF support for Secure Digital Host Controller
>  	  Interfaces.
> diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
> index 1e2cbf5..b1f7689 100644
> --- a/drivers/mtd/Kconfig
> +++ b/drivers/mtd/Kconfig
> @@ -159,7 +159,7 @@ config MTD_AFS_PARTS
>  
>  config MTD_OF_PARTS
>  	tristate "Flash partition map based on OF description"
> -	depends on (MICROBLAZE || PPC_OF) && MTD_PARTITIONS
> +	depends on OF && MTD_PARTITIONS
>  	help
>  	  This provides a partition parsing function which derives
>  	  the partition map from the children of the flash node,
> diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
> index a0dd7bb..5d37d31 100644
> --- a/drivers/mtd/maps/Kconfig
> +++ b/drivers/mtd/maps/Kconfig
> @@ -72,7 +72,7 @@ config MTD_PHYSMAP_BANKWIDTH
>  
>  config MTD_PHYSMAP_OF
>  	tristate "Flash device in physical memory map based on OF description"
> -	depends on (MICROBLAZE || PPC_OF) && (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
> +	depends on OF && (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
>  	help
>  	  This provides a 'mapping' driver which allows the NOR Flash and
>  	  ROM driver code to communicate with chips which are mapped
> diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
> index 6fdc031..3175190 100644
> --- a/drivers/net/can/sja1000/Kconfig
> +++ b/drivers/net/can/sja1000/Kconfig
> @@ -22,11 +22,11 @@ config CAN_SJA1000_PLATFORM
>  
>  config CAN_SJA1000_OF_PLATFORM
>  	tristate "Generic OF Platform Bus based SJA1000 driver"
> -	depends on PPC_OF
> +	depends on OF
>  	---help---
>  	  This driver adds support for the SJA1000 chips connected to
>  	  the OpenFirmware "platform bus" found on embedded systems with
> -	  OpenFirmware bindings, e.g. if you have a PowerPC based system
> +	  OpenFirmware bindings, e.g. if you have a OpenFirmware based system
>  	  you may want to enable this option.
>  
>  config CAN_EMS_PCI
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index aff9dcd..9d109f9 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -1402,7 +1402,7 @@ config SERIAL_NETX_CONSOLE
>  
>  config SERIAL_OF_PLATFORM
>  	tristate "Serial port on Open Firmware platform bus"
> -	depends on PPC_OF || MICROBLAZE
> +	depends on OF
>  	depends on SERIAL_8250 || SERIAL_OF_PLATFORM_NWPSERIAL
>  	help
>  	  If you have a PowerPC based system that has serial ports
> diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
> index 3b28dbf..c0de61e 100644
> --- a/drivers/usb/host/isp1760-if.c
> +++ b/drivers/usb/host/isp1760-if.c
> @@ -17,7 +17,7 @@
>  
>  #include "isp1760-hcd.h"
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
>  #endif
> @@ -26,7 +26,7 @@
>  #include <linux/pci.h>
>  #endif
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int of_isp1760_probe(struct platform_device *dev,
>  		const struct of_device_id *match)
>  {
> @@ -397,7 +397,7 @@ static int __init isp1760_init(void)
>  	ret = platform_driver_register(&isp1760_plat_driver);
>  	if (!ret)
>  		any_ret = 0;
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  	ret = of_register_platform_driver(&isp1760_of_driver);
>  	if (!ret)
>  		any_ret = 0;
> @@ -417,7 +417,7 @@ module_init(isp1760_init);
>  static void __exit isp1760_exit(void)
>  {
>  	platform_driver_unregister(&isp1760_plat_driver);
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  	of_unregister_platform_driver(&isp1760_of_driver);
>  #endif
>  #ifdef CONFIG_PCI
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]         ` <20101116204058.GA5016-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
@ 2010-11-16 20:44           ` Mitch Bradley
  2010-11-16 23:59           ` Stephen Rothwell
  1 sibling, 0 replies; 33+ messages in thread
From: Mitch Bradley @ 2010-11-16 20:44 UTC (permalink / raw)
  To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On 11/16/2010 10:40 AM, Grant Likely wrote:
> On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
>> From: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>
>> Some OF drivers could likely be used on non-powerpc OF based platforms,
>> so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF
>>
>> Signed-off-by: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>
> Hi Rob,
>
> Which of these drivers are you actually using, or going to use in the
> near future?


OLPC will probably use SDHCI soon, on an ARM system with Open Firmware 
in the boot FLASH.

>
> g.
>
>
>> ---
>>   drivers/char/ipmi/ipmi_si_intf.c |   14 +++++++-------
>>   drivers/mmc/host/Kconfig         |    2 +-
>>   drivers/mtd/Kconfig              |    2 +-
>>   drivers/mtd/maps/Kconfig         |    2 +-
>>   drivers/net/can/sja1000/Kconfig  |    4 ++--
>>   drivers/serial/Kconfig           |    2 +-
>>   drivers/usb/host/isp1760-if.c    |    8 ++++----
>>   7 files changed, 17 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
>> index 035da9e..1b33a42 100644
>> --- a/drivers/char/ipmi/ipmi_si_intf.c
>> +++ b/drivers/char/ipmi/ipmi_si_intf.c
>> @@ -66,7 +66,7 @@
>>   #include<linux/ctype.h>
>>   #include<linux/pnp.h>
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   #include<linux/of_device.h>
>>   #include<linux/of_platform.h>
>>   #endif
>> @@ -308,7 +308,7 @@ static int pci_registered;
>>   #ifdef CONFIG_ACPI
>>   static int pnp_registered;
>>   #endif
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   static int of_registered;
>>   #endif
>>
>> @@ -2540,7 +2540,7 @@ static struct pci_driver ipmi_pci_driver = {
>>   #endif /* CONFIG_PCI */
>>
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   static int __devinit ipmi_of_probe(struct platform_device *dev,
>>   			 const struct of_device_id *match)
>>   {
>> @@ -2646,7 +2646,7 @@ static struct of_platform_driver ipmi_of_platform_driver = {
>>   	.probe		= ipmi_of_probe,
>>   	.remove		= __devexit_p(ipmi_of_remove),
>>   };
>> -#endif /* CONFIG_PPC_OF */
>> +#endif /* CONFIG_OF */
>>
>>   static int wait_for_msg_done(struct smi_info *smi_info)
>>   {
>> @@ -3380,7 +3380,7 @@ static int __devinit init_ipmi_si(void)
>>   	spmi_find_bmc();
>>   #endif
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   	of_register_platform_driver(&ipmi_of_platform_driver);
>>   	of_registered = 1;
>>   #endif
>> @@ -3440,7 +3440,7 @@ static int __devinit init_ipmi_si(void)
>>   			pci_unregister_driver(&ipmi_pci_driver);
>>   #endif
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   		if (of_registered)
>>   			of_unregister_platform_driver(&ipmi_of_platform_driver);
>>   #endif
>> @@ -3541,7 +3541,7 @@ static void __exit cleanup_ipmi_si(void)
>>   		pnp_unregister_driver(&ipmi_pnp_driver);
>>   #endif
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   	if (of_registered)
>>   		of_unregister_platform_driver(&ipmi_of_platform_driver);
>>   #endif
>> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
>> index d618e86..982ff67 100644
>> --- a/drivers/mmc/host/Kconfig
>> +++ b/drivers/mmc/host/Kconfig
>> @@ -83,7 +83,7 @@ config MMC_RICOH_MMC
>>
>>   config MMC_SDHCI_OF
>>   	tristate "SDHCI support on OpenFirmware platforms"
>> -	depends on MMC_SDHCI&&  PPC_OF
>> +	depends on MMC_SDHCI&&  OF
>>   	help
>>   	  This selects the OF support for Secure Digital Host Controller
>>   	  Interfaces.
>> diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
>> index 1e2cbf5..b1f7689 100644
>> --- a/drivers/mtd/Kconfig
>> +++ b/drivers/mtd/Kconfig
>> @@ -159,7 +159,7 @@ config MTD_AFS_PARTS
>>
>>   config MTD_OF_PARTS
>>   	tristate "Flash partition map based on OF description"
>> -	depends on (MICROBLAZE || PPC_OF)&&  MTD_PARTITIONS
>> +	depends on OF&&  MTD_PARTITIONS
>>   	help
>>   	  This provides a partition parsing function which derives
>>   	  the partition map from the children of the flash node,
>> diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
>> index a0dd7bb..5d37d31 100644
>> --- a/drivers/mtd/maps/Kconfig
>> +++ b/drivers/mtd/maps/Kconfig
>> @@ -72,7 +72,7 @@ config MTD_PHYSMAP_BANKWIDTH
>>
>>   config MTD_PHYSMAP_OF
>>   	tristate "Flash device in physical memory map based on OF description"
>> -	depends on (MICROBLAZE || PPC_OF)&&  (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
>> +	depends on OF&&  (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
>>   	help
>>   	  This provides a 'mapping' driver which allows the NOR Flash and
>>   	  ROM driver code to communicate with chips which are mapped
>> diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
>> index 6fdc031..3175190 100644
>> --- a/drivers/net/can/sja1000/Kconfig
>> +++ b/drivers/net/can/sja1000/Kconfig
>> @@ -22,11 +22,11 @@ config CAN_SJA1000_PLATFORM
>>
>>   config CAN_SJA1000_OF_PLATFORM
>>   	tristate "Generic OF Platform Bus based SJA1000 driver"
>> -	depends on PPC_OF
>> +	depends on OF
>>   	---help---
>>   	  This driver adds support for the SJA1000 chips connected to
>>   	  the OpenFirmware "platform bus" found on embedded systems with
>> -	  OpenFirmware bindings, e.g. if you have a PowerPC based system
>> +	  OpenFirmware bindings, e.g. if you have a OpenFirmware based system
>>   	  you may want to enable this option.
>>
>>   config CAN_EMS_PCI
>> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
>> index aff9dcd..9d109f9 100644
>> --- a/drivers/serial/Kconfig
>> +++ b/drivers/serial/Kconfig
>> @@ -1402,7 +1402,7 @@ config SERIAL_NETX_CONSOLE
>>
>>   config SERIAL_OF_PLATFORM
>>   	tristate "Serial port on Open Firmware platform bus"
>> -	depends on PPC_OF || MICROBLAZE
>> +	depends on OF
>>   	depends on SERIAL_8250 || SERIAL_OF_PLATFORM_NWPSERIAL
>>   	help
>>   	  If you have a PowerPC based system that has serial ports
>> diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
>> index 3b28dbf..c0de61e 100644
>> --- a/drivers/usb/host/isp1760-if.c
>> +++ b/drivers/usb/host/isp1760-if.c
>> @@ -17,7 +17,7 @@
>>
>>   #include "isp1760-hcd.h"
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   #include<linux/of.h>
>>   #include<linux/of_platform.h>
>>   #endif
>> @@ -26,7 +26,7 @@
>>   #include<linux/pci.h>
>>   #endif
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   static int of_isp1760_probe(struct platform_device *dev,
>>   		const struct of_device_id *match)
>>   {
>> @@ -397,7 +397,7 @@ static int __init isp1760_init(void)
>>   	ret = platform_driver_register(&isp1760_plat_driver);
>>   	if (!ret)
>>   		any_ret = 0;
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   	ret = of_register_platform_driver(&isp1760_of_driver);
>>   	if (!ret)
>>   		any_ret = 0;
>> @@ -417,7 +417,7 @@ module_init(isp1760_init);
>>   static void __exit isp1760_exit(void)
>>   {
>>   	platform_driver_unregister(&isp1760_plat_driver);
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   	of_unregister_platform_driver(&isp1760_of_driver);
>>   #endif
>>   #ifdef CONFIG_PCI
>> --
>> 1.7.1
>>
>> _______________________________________________
>> devicetree-discuss mailing list
>> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
>> https://lists.ozlabs.org/listinfo/devicetree-discuss
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 5/7] mmc: sdhci-of: support generic OF controllers
  2010-11-16 20:33   ` [PATCH 5/7] mmc: sdhci-of: support generic OF controllers Rob Herring
@ 2010-11-16 21:32     ` Wolfram Sang
       [not found]     ` <1289939635-30742-6-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 0 replies; 33+ messages in thread
From: Wolfram Sang @ 2010-11-16 21:32 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss, Rob Herring, linux-mmc

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

On Tue, Nov 16, 2010 at 02:33:53PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> The base sdhci driver requires a valid ops struct. Add empty struct to
> sdhci-of to allow generic controllers which don't need custom ops functions.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

For the sdhci-patches, you should add linux-mmc@vger.kernel.org to the CC-list.
Done now...

> ---
>  drivers/mmc/host/sdhci-of-core.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
> index dd84124..de292fe 100644
> --- a/drivers/mmc/host/sdhci-of-core.c
> +++ b/drivers/mmc/host/sdhci-of-core.c
> @@ -30,6 +30,9 @@
>  #include "sdhci-of.h"
>  #include "sdhci.h"
>  
> +static struct sdhci_ops sdhci_of_ops = {
> +};
> +
>  #ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
>  
>  /*
> @@ -161,6 +164,8 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
>  	if (sdhci_of_data) {
>  		host->quirks = sdhci_of_data->quirks;
>  		host->ops = &sdhci_of_data->ops;
> +	} else {
> +		host->ops = &sdhci_of_ops;
>  	}
>  
>  	if (of_get_property(np, "sdhci,auto-cmd12", NULL))
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
  2010-11-16 20:33   ` [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms Rob Herring
@ 2010-11-16 21:44     ` Wolfram Sang
  2010-11-16 22:34       ` Rob Herring
       [not found]     ` <1289939635-30742-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Wolfram Sang @ 2010-11-16 21:44 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss, Rob Herring, linux-mmc

[-- Attachment #1: Type: text/plain, Size: 1956 bytes --]

On Tue, Nov 16, 2010 at 02:33:52PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Explicitly include err.h, of_address.h and of_irq.h.
> Make use of machine_is() conditional on PPC.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>

Hmm, sins of the past :/ I wonder if we can get away with less #ifdeffery, will
think about it...

> ---
>  drivers/mmc/host/sdhci-of-core.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
> index fa19d84..dd84124 100644
> --- a/drivers/mmc/host/sdhci-of-core.c
> +++ b/drivers/mmc/host/sdhci-of-core.c
> @@ -13,6 +13,7 @@
>   * your option) any later version.
>   */
>  
> +#include <linux/err.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
>  #include <linux/io.h>
> @@ -20,8 +21,12 @@
>  #include <linux/delay.h>
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
>  #include <linux/mmc/host.h>
> +#ifdef CONFIG_PPC
>  #include <asm/machdep.h>
> +#endif
>  #include "sdhci-of.h"
>  #include "sdhci.h"
>  
> @@ -112,7 +117,11 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
>  		return true;
>  
>  	/* Old device trees don't have the wp-inverted property. */
> +#ifdef CONFIG_PPC
>  	return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
> +#else
> +	return false;
> +#endif
>  }
>  
>  static int __devinit sdhci_of_probe(struct platform_device *ofdev,
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
  2010-11-16 21:44     ` Wolfram Sang
@ 2010-11-16 22:34       ` Rob Herring
  2010-11-17  5:32         ` Grant Likely
  0 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-16 22:34 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: devicetree-discuss, Rob Herring, linux-mmc

On 11/16/2010 03:44 PM, Wolfram Sang wrote:
> On Tue, Nov 16, 2010 at 02:33:52PM -0600, Rob Herring wrote:
>> From: Rob Herring<rob.herring@calxeda.com>
>>
>> Explicitly include err.h, of_address.h and of_irq.h.
>> Make use of machine_is() conditional on PPC.
>>
>> Signed-off-by: Rob Herring<rob.herring@calxeda.com>
>
> Hmm, sins of the past :/ I wonder if we can get away with less #ifdeffery, will
> think about it...
>

I don't want to start a long debate, but is updating a kernel without 
updating the dtb really something to worry about? Isn't a year enough of 
a transition period.

Do these machines have a machine level compatible property that could be 
used instead?

Rob

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]         ` <20101116204058.GA5016-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
  2010-11-16 20:44           ` Mitch Bradley
@ 2010-11-16 23:59           ` Stephen Rothwell
       [not found]             ` <20101117105945.64b3b656.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Stephen Rothwell @ 2010-11-16 23:59 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring


[-- Attachment #1.1: Type: text/plain, Size: 862 bytes --]

Hi Mitch,

On Tue, 16 Nov 2010 13:40:58 -0700 Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
>
> On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
> > From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> > 
> > Some OF drivers could likely be used on non-powerpc OF based platforms,
> > so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF
> > 
> > Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> Which of these drivers are you actually using, or going to use in the
> near future?

And have you made sure that you haven't broken the allmodconfig builds on
other architectures that enable CONFIG_OF?

-- 
Cheers,
Stephen Rothwell                    sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/

[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead ofCONFIG_PPC_OF
       [not found]             ` <20101117105945.64b3b656.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
@ 2010-11-17  0:07               ` Stephen Neuendorffer
       [not found]                 ` <64244dc8-4564-42e1-802b-ae1a939ef3b6-RaUQJvECHis6W+Ha+8ZLibjjLBE8jN/0@public.gmane.org>
  2010-11-17  4:28               ` [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF Rob Herring
  1 sibling, 1 reply; 33+ messages in thread
From: Stephen Neuendorffer @ 2010-11-17  0:07 UTC (permalink / raw)
  To: Stephen Rothwell, Rob Herring
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring



> -----Original Message-----
> From:
devicetree-discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlaKREJ1Ck/qmQ@public.gmane.org
org [mailto:devicetree-
> discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org] On
Behalf Of Stephen Rothwell
> Sent: Tuesday, November 16, 2010 4:00 PM
> To: Rob Herring
> Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; Rob Herring
> Subject: Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead
ofCONFIG_PPC_OF
> 
> Hi Mitch,
> 
> On Tue, 16 Nov 2010 13:40:58 -0700 Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
> >
> > On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
> > > From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> > >
> > > Some OF drivers could likely be used on non-powerpc OF based
platforms,
> > > so fix the kconfig depends to be CONFIG_OF instead of
CONFIG_PPC_OF
> > >
> > > Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> >
> > Which of these drivers are you actually using, or going to use in
the
> > near future?
> 
> And have you made sure that you haven't broken the allmodconfig builds
on
> other architectures that enable CONFIG_OF?

In general, is there an easy way to do this?  I can easily see a
difficult to bound testing
problem here, that might benefit from a build farm.

Steve

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 0/7] Various OF fixes for little-endian and ARM
       [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (6 preceding siblings ...)
  2010-11-16 20:33   ` [PATCH 7/7] OF: set dma_mask for ARM Rob Herring
@ 2010-11-17  0:07   ` Stephen Rothwell
  7 siblings, 0 replies; 33+ messages in thread
From: Stephen Rothwell @ 2010-11-17  0:07 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring


[-- Attachment #1.1: Type: text/plain, Size: 1241 bytes --]

Hi Rob,

On Tue, 16 Nov 2010 14:33:48 -0600 Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> This is a mixture of driver fixes for OF on little-endian and ARM platforms.
> 
> The last 2 patches need more thought. Currently, it's just copied from PPC. There 
> are some ARM platforms which set 64-bit dma_masks (iop13xx and orion5x)
> which is not handled. I would think 64-bit PPC would have a similar issue.
> 
> Rob Herring (7):
>   OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
>   of: Fixes for OF probing on little endian systems
>   ipmi: explicitly include of_address.h and of_irq.h
>   mmc: sdhci-of: fix build on non-powerpc platforms
>   mmc: sdhci-of: support generic OF controllers
>   ARM: add dma_mask to pdev_archdata
>   OF: set dma_mask for ARM

I think you need to change the order of these patches so that the fixes
for the bugs exposed by allowing the building of these drivers on other
platforms are before the patch that allows the building.

-- 
Cheers,
Stephen Rothwell                    sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/

[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead ofCONFIG_PPC_OF
       [not found]                 ` <64244dc8-4564-42e1-802b-ae1a939ef3b6-RaUQJvECHis6W+Ha+8ZLibjjLBE8jN/0@public.gmane.org>
@ 2010-11-17  0:19                   ` Grant Likely
  0 siblings, 0 replies; 33+ messages in thread
From: Grant Likely @ 2010-11-17  0:19 UTC (permalink / raw)
  To: Stephen Neuendorffer
  Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 5:07 PM, Stephen Neuendorffer
<stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> wrote:
>
>
>> -----Original Message-----
>> From:
> devicetree-discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlaKREJ1Ck/qmQ@public.gmane.org
> org [mailto:devicetree-
>> discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org] On
> Behalf Of Stephen Rothwell
>> Sent: Tuesday, November 16, 2010 4:00 PM
>> To: Rob Herring
>> Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; Rob Herring
>> Subject: Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead
> ofCONFIG_PPC_OF
>>
>> Hi Mitch,
>>
>> On Tue, 16 Nov 2010 13:40:58 -0700 Grant Likely
> <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
>> >
>> > On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
>> > > From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>> > >
>> > > Some OF drivers could likely be used on non-powerpc OF based
> platforms,
>> > > so fix the kconfig depends to be CONFIG_OF instead of
> CONFIG_PPC_OF
>> > >
>> > > Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>> >
>> > Which of these drivers are you actually using, or going to use in
> the
>> > near future?
>>
>> And have you made sure that you haven't broken the allmodconfig builds
> on
>> other architectures that enable CONFIG_OF?
>
> In general, is there an easy way to do this?  I can easily see a
> difficult to bound testing
> problem here, that might benefit from a build farm.

I can put it in my experimental branch that gets picked up by the
build server that ozlabs maintains.  However, having some level of
sanity checking beforehand is important before I do so.  Including a
log of what testing has been performed in the patch description is
always the right thing to do.

g.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]             ` <20101117105945.64b3b656.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
  2010-11-17  0:07               ` [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead ofCONFIG_PPC_OF Stephen Neuendorffer
@ 2010-11-17  4:28               ` Rob Herring
       [not found]                 ` <4CE359F1.5000209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-17  4:28 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Stephen,

On 11/16/2010 05:59 PM, Stephen Rothwell wrote:
> Hi Mitch,
>
> On Tue, 16 Nov 2010 13:40:58 -0700 Grant Likely<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>  wrote:
>>
>> On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
>>> From: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>>
>>> Some OF drivers could likely be used on non-powerpc OF based platforms,
>>> so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF
>>>
>>> Signed-off-by: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>
>> Which of these drivers are you actually using, or going to use in the
>> near future?
>
> And have you made sure that you haven't broken the allmodconfig builds on
> other architectures that enable CONFIG_OF?
>

Well no as I don't have compilers for other arch's. The main OF platform 
to test here would be sparc as most of the kconfig options changed here 
already depend on PPC || MICROBLAZE.

I could simply have tacked on "|| ARM", but that seemed like the wrong 
thing to do. So I went down the path of looking at all OF drivers that 
could be used on other arch's.

Rob

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]                 ` <4CE359F1.5000209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-17  4:43                   ` Tony Breeds
       [not found]                     ` <20101117044331.GC19615-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Tony Breeds @ 2010-11-17  4:43 UTC (permalink / raw)
  To: Rob Herring; +Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Tue, Nov 16, 2010 at 10:28:33PM -0600, Rob Herring wrote:

> Well no as I don't have compilers for other arch's.

*cough*
http://kernel.org/pub/tools/crosstool/files/bin/i686 or
http://kernel.org/pub/tools/crosstool/files/bin/x86_64
*cough*

With 4.4.5 and 4.5.1 arriving RSN

Yours Tony

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]                     ` <20101117044331.GC19615-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
@ 2010-11-17  4:51                       ` Grant Likely
       [not found]                         ` <AANLkTikWRZ6mpuYor3Lmh+qKBCLU65Lni0DYjv8j+bVT-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Grant Likely @ 2010-11-17  4:51 UTC (permalink / raw)
  To: Tony Breeds; +Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Tue, Nov 16, 2010 at 9:43 PM, Tony Breeds <tony-B47dsA4koDqXvyopL2yb9tBPR1lH4CV8@public.gmane.org> wrote:
> On Tue, Nov 16, 2010 at 10:28:33PM -0600, Rob Herring wrote:
>
>> Well no as I don't have compilers for other arch's.
>
> *cough*
> http://kernel.org/pub/tools/crosstool/files/bin/i686 or
> http://kernel.org/pub/tools/crosstool/files/bin/x86_64
> *cough*

Don't suppose you've got a set of powerpc host toolchains kicking
around too?  :-)

g.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]                         ` <AANLkTikWRZ6mpuYor3Lmh+qKBCLU65Lni0DYjv8j+bVT-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-11-17  4:54                           ` Tony Breeds
  0 siblings, 0 replies; 33+ messages in thread
From: Tony Breeds @ 2010-11-17  4:54 UTC (permalink / raw)
  To: Grant Likely; +Cc: Stephen Rothwell, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Tue, Nov 16, 2010 at 09:51:31PM -0700, Grant Likely wrote:

> Don't suppose you've got a set of powerpc host toolchains kicking
> around too?  :-)

Not yet.  I am working on it though.

Yours Tony

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/7] of: Fixes for OF probing on little endian systems
       [not found]     ` <1289939635-30742-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-17  5:23       ` Grant Likely
       [not found]         ` <20101117052331.GA12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Grant Likely @ 2010-11-17  5:23 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 02:33:50PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> Fixes for sdhci-of and ipmi drivers.
> 
> Auditing all drivers using of_get_property did not find other
> occurrences likely to be used on LE platforms.
> 
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Merged, thanks.

g.

> ---
>  drivers/char/ipmi/ipmi_si_intf.c |    8 ++++----
>  drivers/mmc/host/sdhci-of-core.c |    4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 1b33a42..8842044 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -2546,7 +2546,7 @@ static int __devinit ipmi_of_probe(struct platform_device *dev,
>  {
>  	struct smi_info *info;
>  	struct resource resource;
> -	const int *regsize, *regspacing, *regshift;
> +	const __be32 *regsize, *regspacing, *regshift;
>  	struct device_node *np = dev->dev.of_node;
>  	int ret;
>  	int proplen;
> @@ -2599,9 +2599,9 @@ static int __devinit ipmi_of_probe(struct platform_device *dev,
>  
>  	info->io.addr_data	= resource.start;
>  
> -	info->io.regsize	= regsize ? *regsize : DEFAULT_REGSIZE;
> -	info->io.regspacing	= regspacing ? *regspacing : DEFAULT_REGSPACING;
> -	info->io.regshift	= regshift ? *regshift : 0;
> +	info->io.regsize	= regsize ? be32_to_cpup(regsize) : DEFAULT_REGSIZE;
> +	info->io.regspacing	= regspacing ? be32_to_cpup(regspacing) : DEFAULT_REGSPACING;
> +	info->io.regshift	= regshift ? be32_to_cpup(regshift) : 0;
>  
>  	info->irq		= irq_of_parse_and_map(dev->dev.of_node, 0);
>  	info->dev		= &dev->dev;
> diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
> index c51b711..fa19d84 100644
> --- a/drivers/mmc/host/sdhci-of-core.c
> +++ b/drivers/mmc/host/sdhci-of-core.c
> @@ -122,7 +122,7 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
>  	struct sdhci_of_data *sdhci_of_data = match->data;
>  	struct sdhci_host *host;
>  	struct sdhci_of_host *of_host;
> -	const u32 *clk;
> +	const __be32 *clk;
>  	int size;
>  	int ret;
>  
> @@ -166,7 +166,7 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
>  
>  	clk = of_get_property(np, "clock-frequency", &size);
>  	if (clk && size == sizeof(*clk) && *clk)
> -		of_host->clock = *clk;
> +		of_host->clock = be32_to_cpup(clk);
>  
>  	ret = sdhci_add_host(host);
>  	if (ret)
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 3/7] ipmi: explicitly include of_address.h and of_irq.h
       [not found]     ` <1289939635-30742-4-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-17  5:23       ` Grant Likely
  0 siblings, 0 replies; 33+ messages in thread
From: Grant Likely @ 2010-11-17  5:23 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 02:33:51PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> of_address.h and of_irq.h are implicitly included on powerpc. Adding
> them fixes builds on non-powerpc platforms.
> 
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

merged, thanks.

> ---
>  drivers/char/ipmi/ipmi_si_intf.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 8842044..51b33cf 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -69,6 +69,8 @@
>  #ifdef CONFIG_OF
>  #include <linux/of_device.h>
>  #include <linux/of_platform.h>
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
>  #endif
>  
>  #define PFX "ipmi_si: "
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 7/7] OF: set dma_mask for ARM
       [not found]     ` <1289939635-30742-8-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-17  5:24       ` Grant Likely
       [not found]         ` <20101117052448.GC12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Grant Likely @ 2010-11-17  5:24 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 02:33:55PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> Various drivers require dma_mask to be valid, so it needs to be setup
> when doing OF probing on ARM.
> 
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

I'll let patches 6 & 7 lay fallow for the moment.  I'm not hugely fond
of the powerpc approach (which microblaze copies), but I haven't had a
chance to look for a better solution.

g.

> ---
>  drivers/of/platform.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 5b4a07f..fe2669a 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -614,7 +614,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
>  	}
>  
>  	dev->dev.of_node = of_node_get(np);
> -#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
> +#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
>  	dev->dev.dma_mask = &dev->archdata.dma_mask;
>  #endif
>  	dev->dev.parent = parent;
> @@ -644,7 +644,7 @@ struct platform_device *of_platform_device_create(struct device_node *np,
>  	if (!dev)
>  		return NULL;
>  
> -#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
> +#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
>  	dev->archdata.dma_mask = 0xffffffffUL;
>  #endif
>  	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
  2010-11-16 22:34       ` Rob Herring
@ 2010-11-17  5:32         ` Grant Likely
  0 siblings, 0 replies; 33+ messages in thread
From: Grant Likely @ 2010-11-17  5:32 UTC (permalink / raw)
  To: Rob Herring; +Cc: Wolfram Sang, devicetree-discuss, linux-mmc, Rob Herring

On Tue, Nov 16, 2010 at 04:34:56PM -0600, Rob Herring wrote:
> On 11/16/2010 03:44 PM, Wolfram Sang wrote:
> >On Tue, Nov 16, 2010 at 02:33:52PM -0600, Rob Herring wrote:
> >>From: Rob Herring<rob.herring@calxeda.com>
> >>
> >>Explicitly include err.h, of_address.h and of_irq.h.
> >>Make use of machine_is() conditional on PPC.
> >>
> >>Signed-off-by: Rob Herring<rob.herring@calxeda.com>
> >
> >Hmm, sins of the past :/ I wonder if we can get away with less #ifdeffery, will
> >think about it...
> >
> 
> I don't want to start a long debate, but is updating a kernel
> without updating the dtb really something to worry about?

Yes, once a .dtb is merged we try very hard not to break it.  It may
need to be updated to enable more features, but the goal is to not
regress.  One of the reason being that firmware may provide a default,
but old, dtb and it is important to still be able to boot on those
systems, even if the dtb is immediately going to be updated.

That's one of the reasons why it is so important to document and
review bindings up front and make sure they make sense before we
commit to them.

That being said, there are other ways to deal with old dtbs, like
fixing up the data at platform setup time.

> Isn't a year enough of a transition period.

No.

g.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
       [not found]     ` <1289939635-30742-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-17  5:32       ` Grant Likely
  0 siblings, 0 replies; 33+ messages in thread
From: Grant Likely @ 2010-11-17  5:32 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 02:33:52PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> Explicitly include err.h, of_address.h and of_irq.h.
> Make use of machine_is() conditional on PPC.
> 
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Merged into my test branch, thanks.

g.

> ---
>  drivers/mmc/host/sdhci-of-core.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
> index fa19d84..dd84124 100644
> --- a/drivers/mmc/host/sdhci-of-core.c
> +++ b/drivers/mmc/host/sdhci-of-core.c
> @@ -13,6 +13,7 @@
>   * your option) any later version.
>   */
>  
> +#include <linux/err.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
>  #include <linux/io.h>
> @@ -20,8 +21,12 @@
>  #include <linux/delay.h>
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
>  #include <linux/mmc/host.h>
> +#ifdef CONFIG_PPC
>  #include <asm/machdep.h>
> +#endif
>  #include "sdhci-of.h"
>  #include "sdhci.h"
>  
> @@ -112,7 +117,11 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
>  		return true;
>  
>  	/* Old device trees don't have the wp-inverted property. */
> +#ifdef CONFIG_PPC
>  	return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
> +#else
> +	return false;
> +#endif
>  }
>  
>  static int __devinit sdhci_of_probe(struct platform_device *ofdev,
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 5/7] mmc: sdhci-of: support generic OF controllers
       [not found]     ` <1289939635-30742-6-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-17  5:36       ` Grant Likely
  0 siblings, 0 replies; 33+ messages in thread
From: Grant Likely @ 2010-11-17  5:36 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 02:33:53PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> The base sdhci driver requires a valid ops struct. Add empty struct to
> sdhci-of to allow generic controllers which don't need custom ops functions.
> 
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>

Applied to my test branch, thanks

g.

> ---
>  drivers/mmc/host/sdhci-of-core.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
> index dd84124..de292fe 100644
> --- a/drivers/mmc/host/sdhci-of-core.c
> +++ b/drivers/mmc/host/sdhci-of-core.c
> @@ -30,6 +30,9 @@
>  #include "sdhci-of.h"
>  #include "sdhci.h"
>  
> +static struct sdhci_ops sdhci_of_ops = {
> +};
> +
>  #ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
>  
>  /*
> @@ -161,6 +164,8 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
>  	if (sdhci_of_data) {
>  		host->quirks = sdhci_of_data->quirks;
>  		host->ops = &sdhci_of_data->ops;
> +	} else {
> +		host->ops = &sdhci_of_ops;
>  	}
>  
>  	if (of_get_property(np, "sdhci,auto-cmd12", NULL))
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]     ` <1289939635-30742-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2010-11-16 20:40       ` Grant Likely
@ 2010-11-17  5:43       ` Grant Likely
       [not found]         ` <20101117054337.GG12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Grant Likely @ 2010-11-17  5:43 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring

On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 
> Some OF drivers could likely be used on non-powerpc OF based platforms,
> so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF
> 
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> ---
>  drivers/char/ipmi/ipmi_si_intf.c |   14 +++++++-------
>  drivers/mmc/host/Kconfig         |    2 +-
>  drivers/mtd/Kconfig              |    2 +-
>  drivers/mtd/maps/Kconfig         |    2 +-
>  drivers/net/can/sja1000/Kconfig  |    4 ++--
>  drivers/serial/Kconfig           |    2 +-
>  drivers/usb/host/isp1760-if.c    |    8 ++++----
>  7 files changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 035da9e..1b33a42 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -66,7 +66,7 @@
>  #include <linux/ctype.h>
>  #include <linux/pnp.h>
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  #include <linux/of_device.h>
>  #include <linux/of_platform.h>
>  #endif
> @@ -308,7 +308,7 @@ static int pci_registered;
>  #ifdef CONFIG_ACPI
>  static int pnp_registered;
>  #endif
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int of_registered;
>  #endif
>  
> @@ -2540,7 +2540,7 @@ static struct pci_driver ipmi_pci_driver = {
>  #endif /* CONFIG_PCI */
>  
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int __devinit ipmi_of_probe(struct platform_device *dev,
>  			 const struct of_device_id *match)
>  {
> @@ -2646,7 +2646,7 @@ static struct of_platform_driver ipmi_of_platform_driver = {
>  	.probe		= ipmi_of_probe,
>  	.remove		= __devexit_p(ipmi_of_remove),
>  };
> -#endif /* CONFIG_PPC_OF */
> +#endif /* CONFIG_OF */

Nack on this hunk.  of_platform_drivers are now deprecated and the
regular platform_driver should be used instead.  Instead of extending
the of_platform_driver usage to all the architectures, please move the
of_match_table and the probe/remove routines into the platform_driver.

> diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
> index 3b28dbf..c0de61e 100644
> --- a/drivers/usb/host/isp1760-if.c
> +++ b/drivers/usb/host/isp1760-if.c
> @@ -17,7 +17,7 @@
>  
>  #include "isp1760-hcd.h"
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
>  #endif
> @@ -26,7 +26,7 @@
>  #include <linux/pci.h>
>  #endif
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int of_isp1760_probe(struct platform_device *dev,
>  		const struct of_device_id *match)
>  {
> @@ -397,7 +397,7 @@ static int __init isp1760_init(void)
>  	ret = platform_driver_register(&isp1760_plat_driver);
>  	if (!ret)
>  		any_ret = 0;
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  	ret = of_register_platform_driver(&isp1760_of_driver);
>  	if (!ret)
>  		any_ret = 0;
> @@ -417,7 +417,7 @@ module_init(isp1760_init);
>  static void __exit isp1760_exit(void)
>  {
>  	platform_driver_unregister(&isp1760_plat_driver);
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  	of_unregister_platform_driver(&isp1760_of_driver);
>  #endif
>  #ifdef CONFIG_PCI

Ditto here.

g.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]         ` <20101117054337.GG12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
@ 2010-11-17 14:53           ` Rob Herring
       [not found]             ` <4CE3EC7B.4020404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2010-11-17 14:53 UTC (permalink / raw)
  To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Grant,

On 11/16/2010 11:43 PM, Grant Likely wrote:
> On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
>> From: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>
>> Some OF drivers could likely be used on non-powerpc OF based platforms,
>> so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF
>>
>> Signed-off-by: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>> ---
>>   drivers/char/ipmi/ipmi_si_intf.c |   14 +++++++-------
>>   drivers/mmc/host/Kconfig         |    2 +-
>>   drivers/mtd/Kconfig              |    2 +-
>>   drivers/mtd/maps/Kconfig         |    2 +-
>>   drivers/net/can/sja1000/Kconfig  |    4 ++--
>>   drivers/serial/Kconfig           |    2 +-
>>   drivers/usb/host/isp1760-if.c    |    8 ++++----
>>   7 files changed, 17 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
>> index 035da9e..1b33a42 100644
>> --- a/drivers/char/ipmi/ipmi_si_intf.c
>> +++ b/drivers/char/ipmi/ipmi_si_intf.c
>> @@ -66,7 +66,7 @@
>>   #include<linux/ctype.h>
>>   #include<linux/pnp.h>
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   #include<linux/of_device.h>
>>   #include<linux/of_platform.h>
>>   #endif
>> @@ -308,7 +308,7 @@ static int pci_registered;
>>   #ifdef CONFIG_ACPI
>>   static int pnp_registered;
>>   #endif
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   static int of_registered;
>>   #endif
>>
>> @@ -2540,7 +2540,7 @@ static struct pci_driver ipmi_pci_driver = {
>>   #endif /* CONFIG_PCI */
>>
>>
>> -#ifdef CONFIG_PPC_OF
>> +#ifdef CONFIG_OF
>>   static int __devinit ipmi_of_probe(struct platform_device *dev,
>>   			 const struct of_device_id *match)
>>   {
>> @@ -2646,7 +2646,7 @@ static struct of_platform_driver ipmi_of_platform_driver = {
>>   	.probe		= ipmi_of_probe,
>>   	.remove		= __devexit_p(ipmi_of_remove),
>>   };
>> -#endif /* CONFIG_PPC_OF */
>> +#endif /* CONFIG_OF */
>
> Nack on this hunk.  of_platform_drivers are now deprecated and the
> regular platform_driver should be used instead.  Instead of extending
> the of_platform_driver usage to all the architectures, please move the
> of_match_table and the probe/remove routines into the platform_driver.
>

Okay, no problem. How do I get the match ptr or more importantly the 
data ptr from the match table? Do I have to call of_match_device within 
probe func?

Rob

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
       [not found]             ` <4CE3EC7B.4020404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-11-17 15:25               ` Grant Likely
  0 siblings, 0 replies; 33+ messages in thread
From: Grant Likely @ 2010-11-17 15:25 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Wed, Nov 17, 2010 at 08:53:47AM -0600, Rob Herring wrote:
> Grant,
> 
> On 11/16/2010 11:43 PM, Grant Likely wrote:
> >On Tue, Nov 16, 2010 at 02:33:49PM -0600, Rob Herring wrote:
> >>From: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> >>
> >>Some OF drivers could likely be used on non-powerpc OF based platforms,
> >>so fix the kconfig depends to be CONFIG_OF instead of CONFIG_PPC_OF
> >>
> >>Signed-off-by: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> >>---
> >>  drivers/char/ipmi/ipmi_si_intf.c |   14 +++++++-------
> >>  drivers/mmc/host/Kconfig         |    2 +-
> >>  drivers/mtd/Kconfig              |    2 +-
> >>  drivers/mtd/maps/Kconfig         |    2 +-
> >>  drivers/net/can/sja1000/Kconfig  |    4 ++--
> >>  drivers/serial/Kconfig           |    2 +-
> >>  drivers/usb/host/isp1760-if.c    |    8 ++++----
> >>  7 files changed, 17 insertions(+), 17 deletions(-)
> >>
> >>diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> >>index 035da9e..1b33a42 100644
> >>--- a/drivers/char/ipmi/ipmi_si_intf.c
> >>+++ b/drivers/char/ipmi/ipmi_si_intf.c
> >>@@ -66,7 +66,7 @@
> >>  #include<linux/ctype.h>
> >>  #include<linux/pnp.h>
> >>
> >>-#ifdef CONFIG_PPC_OF
> >>+#ifdef CONFIG_OF
> >>  #include<linux/of_device.h>
> >>  #include<linux/of_platform.h>
> >>  #endif
> >>@@ -308,7 +308,7 @@ static int pci_registered;
> >>  #ifdef CONFIG_ACPI
> >>  static int pnp_registered;
> >>  #endif
> >>-#ifdef CONFIG_PPC_OF
> >>+#ifdef CONFIG_OF
> >>  static int of_registered;
> >>  #endif
> >>
> >>@@ -2540,7 +2540,7 @@ static struct pci_driver ipmi_pci_driver = {
> >>  #endif /* CONFIG_PCI */
> >>
> >>
> >>-#ifdef CONFIG_PPC_OF
> >>+#ifdef CONFIG_OF
> >>  static int __devinit ipmi_of_probe(struct platform_device *dev,
> >>  			 const struct of_device_id *match)
> >>  {
> >>@@ -2646,7 +2646,7 @@ static struct of_platform_driver ipmi_of_platform_driver = {
> >>  	.probe		= ipmi_of_probe,
> >>  	.remove		= __devexit_p(ipmi_of_remove),
> >>  };
> >>-#endif /* CONFIG_PPC_OF */
> >>+#endif /* CONFIG_OF */
> >
> >Nack on this hunk.  of_platform_drivers are now deprecated and the
> >regular platform_driver should be used instead.  Instead of extending
> >the of_platform_driver usage to all the architectures, please move the
> >of_match_table and the probe/remove routines into the platform_driver.
> >
> 
> Okay, no problem. How do I get the match ptr or more importantly the
> data ptr from the match table? Do I have to call of_match_device
> within probe func?

yes.

g.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/7] of: Fixes for OF probing on little endian systems
       [not found]         ` <20101117052331.GA12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
@ 2011-01-03 18:08           ` Rob Herring
       [not found]             ` <4D221094.5070703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Rob Herring @ 2011-01-03 18:08 UTC (permalink / raw)
  To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Grant,

On 11/16/2010 11:23 PM, Grant Likely wrote:
> On Tue, Nov 16, 2010 at 02:33:50PM -0600, Rob Herring wrote:
>> From: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>
>> Fixes for sdhci-of and ipmi drivers.
>>
>> Auditing all drivers using of_get_property did not find other
>> occurrences likely to be used on LE platforms.
>>
>> Signed-off-by: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>
> Merged, thanks.

I don't see this one in your tree. Are you still going to take this one?

Rob

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/7] of: Fixes for OF probing on little endian systems
       [not found]             ` <4D221094.5070703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-01-03 19:24               ` Grant Likely
  0 siblings, 0 replies; 33+ messages in thread
From: Grant Likely @ 2011-01-03 19:24 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Mon, Jan 03, 2011 at 12:08:20PM -0600, Rob Herring wrote:
> Grant,
> 
> On 11/16/2010 11:23 PM, Grant Likely wrote:
> >On Tue, Nov 16, 2010 at 02:33:50PM -0600, Rob Herring wrote:
> >>From: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> >>
> >>Fixes for sdhci-of and ipmi drivers.
> >>
> >>Auditing all drivers using of_get_property did not find other
> >>occurrences likely to be used on LE platforms.
> >>
> >>Signed-off-by: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> >
> >Merged, thanks.

Hmmm, I don't know what happened there, but I've re-merged it now and
it will appear in my public tree after I run through sanity testing.

g.

> 
> I don't see this one in your tree. Are you still going to take this one?
> 
> Rob

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 7/7] OF: set dma_mask for ARM
       [not found]         ` <20101117052448.GC12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
@ 2011-02-08  3:24           ` Rob Herring
  0 siblings, 0 replies; 33+ messages in thread
From: Rob Herring @ 2011-02-08  3:24 UTC (permalink / raw)
  To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Grant,

On 11/16/2010 11:24 PM, Grant Likely wrote:
> On Tue, Nov 16, 2010 at 02:33:55PM -0600, Rob Herring wrote:
>> From: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>
>> Various drivers require dma_mask to be valid, so it needs to be setup
>> when doing OF probing on ARM.
>>
>> Signed-off-by: Rob Herring<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>
> I'll let patches 6&  7 lay fallow for the moment.  I'm not hugely fond
> of the powerpc approach (which microblaze copies), but I haven't had a
> chance to look for a better solution.
>

Looking at this some more, there's a couple of options I see.

Other buses (ISA, PCI, EISA) have a dma_mask in their struct. So perhaps 
platform_device should just have a dma_mask field.

There are several examples of setting dma_mask = &coherent_dma_mask. I'm 
not sure if this is considered correct. At least on ARM, I don't think 
these would need to be different.

Another option would be using bus notifiers to set the dma_mask like 
platform_data. But that doesn't seem like a good long term solution.

Rob

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2011-02-08  3:24 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-16 20:33 [PATCH 0/7] Various OF fixes for little-endian and ARM Rob Herring
     [not found] ` <1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-16 20:33   ` [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF Rob Herring
     [not found]     ` <1289939635-30742-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-16 20:40       ` Grant Likely
     [not found]         ` <20101116204058.GA5016-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-11-16 20:44           ` Mitch Bradley
2010-11-16 23:59           ` Stephen Rothwell
     [not found]             ` <20101117105945.64b3b656.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2010-11-17  0:07               ` [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead ofCONFIG_PPC_OF Stephen Neuendorffer
     [not found]                 ` <64244dc8-4564-42e1-802b-ae1a939ef3b6-RaUQJvECHis6W+Ha+8ZLibjjLBE8jN/0@public.gmane.org>
2010-11-17  0:19                   ` Grant Likely
2010-11-17  4:28               ` [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF Rob Herring
     [not found]                 ` <4CE359F1.5000209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-17  4:43                   ` Tony Breeds
     [not found]                     ` <20101117044331.GC19615-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
2010-11-17  4:51                       ` Grant Likely
     [not found]                         ` <AANLkTikWRZ6mpuYor3Lmh+qKBCLU65Lni0DYjv8j+bVT-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-17  4:54                           ` Tony Breeds
2010-11-17  5:43       ` Grant Likely
     [not found]         ` <20101117054337.GG12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-11-17 14:53           ` Rob Herring
     [not found]             ` <4CE3EC7B.4020404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-17 15:25               ` Grant Likely
2010-11-16 20:33   ` [PATCH 2/7] of: Fixes for OF probing on little endian systems Rob Herring
     [not found]     ` <1289939635-30742-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-17  5:23       ` Grant Likely
     [not found]         ` <20101117052331.GA12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-01-03 18:08           ` Rob Herring
     [not found]             ` <4D221094.5070703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-01-03 19:24               ` Grant Likely
2010-11-16 20:33   ` [PATCH 3/7] ipmi: explicitly include of_address.h and of_irq.h Rob Herring
     [not found]     ` <1289939635-30742-4-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-17  5:23       ` Grant Likely
2010-11-16 20:33   ` [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms Rob Herring
2010-11-16 21:44     ` Wolfram Sang
2010-11-16 22:34       ` Rob Herring
2010-11-17  5:32         ` Grant Likely
     [not found]     ` <1289939635-30742-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-17  5:32       ` Grant Likely
2010-11-16 20:33   ` [PATCH 5/7] mmc: sdhci-of: support generic OF controllers Rob Herring
2010-11-16 21:32     ` Wolfram Sang
     [not found]     ` <1289939635-30742-6-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-17  5:36       ` Grant Likely
2010-11-16 20:33   ` [PATCH 6/7] ARM: add dma_mask to pdev_archdata Rob Herring
2010-11-16 20:33   ` [PATCH 7/7] OF: set dma_mask for ARM Rob Herring
     [not found]     ` <1289939635-30742-8-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-17  5:24       ` Grant Likely
     [not found]         ` <20101117052448.GC12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-02-08  3:24           ` Rob Herring
2010-11-17  0:07   ` [PATCH 0/7] Various OF fixes for little-endian and ARM Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.