Various OF fixes for little-endian and ARM
Subsystems (8)
cover Various OF fixes for little-endian and ARM
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
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(-)
A message that is not in the archive (sent off-list or not yet received): 1289939635-30742-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/7 OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
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
--- 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(-)
drivers/char/ipmi/ipmi_si_intf.c +7 -7
@@ -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
drivers/mmc/host/Kconfig +1 -1
@@ -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.
drivers/mtd/Kconfig +1 -1
@@ -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,
drivers/mtd/maps/Kconfig +1 -1
@@ -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
drivers/net/can/sja1000/Kconfig +2 -2
@@ -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
drivers/serial/Kconfig +1 -1
@@ -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
drivers/usb/host/isp1760-if.c +4 -4
@@ -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
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1289939635-30742-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
Quoted 6 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based platforms, so fix the kconfig depends to be
CONFIG_OFinstead ofCONFIG_PPC_OFSigned-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Hi Rob,
Which of these drivers are you actually using, or going to use in the near future?
g.
Quoted 194 lines
--- 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(-)drivers/char/ipmi/ipmi_si_intf.c +7
-7@@ -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 drivers/mmc/host/Kconfig +1
-1@@ -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.drivers/mtd/Kconfig +1
-1@@ -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,drivers/mtd/maps/Kconfig +1
-1@@ -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 mappeddrivers/net/can/sja1000/Kconfig +2
-2@@ -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_PCIdrivers/serial/Kconfig +1
-1@@ -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 portsdrivers/usb/host/isp1760-if.c +4
-4@@ -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 Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
A message that is not in the archive (sent off-list or not yet received): 20101116204058.GA5016-MrY2KI0G/OVr83L8+7iqerDks+cytr/[email protected]
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
Quoted 6 lines · Grant Likely
Quoted 5 lines · Rob Herring
From: Rob Herring<rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based platforms, so fix the kconfig depends to be
CONFIG_OFinstead ofCONFIG_PPC_OF
Quoted 6 lines
Quoted 1 line
Signed-off-by Rob Herring<rob.herring-bsGFqQB8/[email protected]>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.
Quoted 203 lines
g.
Quoted 190 lines
--- 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(-)drivers/char/ipmi/ipmi_si_intf.c +7
-7@@ -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 drivers/mmc/host/Kconfig +1
-1@@ -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.drivers/mtd/Kconfig +1
-1@@ -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,drivers/mtd/maps/Kconfig +1
-1@@ -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 mappeddrivers/net/can/sja1000/Kconfig +2
-2@@ -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_PCIdrivers/serial/Kconfig +1
-1@@ -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 portsdrivers/usb/host/isp1760-if.c +4
-5@@ -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
Quoted 4 lines
_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
In reply to a message not in the archiveHi Mitch,
Quoted 11 lines · On Tue, 16 Nov 2010 13:40:58 -0700 Grant Likely…
Quoted 6 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based platforms, so fix the kconfig depends to be
CONFIG_OFinstead ofCONFIG_PPC_OFSigned-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>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?
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss
A message that is not in the archive (sent off-list or not yet received): 20101117105945.64b3b656.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
RE: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead ofCONFIG_PPC_OF
Quoted 4 lines
-----Original Message-----
From:
devicetree-discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlaKREJ1Ck/[email protected] org [mailto:devicetree-
Quoted 1 line
discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlY/[email protected]] On
Behalf Of Stephen Rothwell
Quoted 4 lines
Sent: Tuesday, November 16, 2010 4:00 PM
To: Rob Herring
Cc: devicetree-discuss-uLR06cmDAlY/[email protected]; Rob Herring
Subject: Re: [PATCH 1/7] OF: make drivers depend onCONFIG_OFinstead
ofCONFIG_PPC_OF
Quoted 4 lines
Hi Mitch,
On Tue, 16 Nov 2010 13:40:58 -0700 Grant Likely
Quoted 5 lines · <grant.likely-s3s/[email protected]> wrote:
Quoted 5 lines · Rob Herring
Quoted 3 lines
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based
platforms,
Quoted 1 line
Quoted 1 line
Quoted 1 line
so fix the kconfig depends to be
CONFIG_OFinstead of
CONFIG_PPC_OF
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>Which of these drivers are you actually using, or going to use in
the
Quoted 3 lines
Quoted 1 line
near future?
And have you made sure that you haven't broken the allmodconfig builds
on
Quoted 1 line
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.
A message that is not in the archive (sent off-list or not yet received): 64244dc8-4564-42e1-802b-ae1a939ef3b6-RaUQJvECHis6W+Ha+8ZLibjjLBE8jN/[email protected]
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead ofCONFIG_PPC_OF
Quoted 33 lines · Stephen Neuendorffer
Quoted 4 lines
-----Original Message-----
From:devicetree-discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlaKREJ1Ck/[email protected] org [mailto:devicetree-
Quoted 1 line
discuss-bounces+stephen.neuendorffer=xilinx.com-uLR06cmDAlY/[email protected]] On
Behalf Of Stephen Rothwell
Quoted 4 lines
Sent: Tuesday, November 16, 2010 4:00 PM
To: Rob Herring
Cc: devicetree-discuss-uLR06cmDAlY/[email protected]; Rob Herring
Subject: Re: [PATCH 1/7] OF: make drivers depend onCONFIG_OFinstead
ofCONFIG_PPC_OFQuoted 4 lines
Hi Mitch,
On Tue, 16 Nov 2010 13:40:58 -0700 Grant Likely
Quoted 5 lines · <grant.likely-s3s/[email protected]> wrote:
Quoted 5 lines · Rob Herring
Quoted 3 lines
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based
platforms,
Quoted 1 line
Quoted 1 line
Quoted 1 line
so fix the kconfig depends to be
CONFIG_OFinstead of
CONFIG_PPC_OFQuoted 4 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>Which of these drivers are you actually using, or going to use in
the
Quoted 2 lines
Quoted 1 line
near future?
Quoted 7 lines
Quoted 1 line
And have you made sure that you haven't broken the allmodconfig builds
on
Quoted 1 line
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.
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
In reply to a message not in the archiveStephen,
Quoted 10 lines · Stephen Rothwell
Hi Mitch,
Quoted 7 lines · On Tue, 16 Nov 2010 13:40:58 -0700 Grant…
Quoted 5 lines · Rob Herring
From: Rob Herring<rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based platforms, so fix the kconfig depends to be
CONFIG_OFinstead ofCONFIG_PPC_OF
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Rob Herring<rob.herring-bsGFqQB8/[email protected]>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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
Quoted 1 line · Rob Herring
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
Quoted 8 lines · Tony Breeds
Quoted 1 line · Rob Herring
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.
A message that is not in the archive (sent off-list or not yet received): AANLkTikWRZ6mpuYor3Lmh+qKBCLU65Lni0DYjv8j+bVT-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
Quoted 2 lines · Grant Likely
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
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
In reply to a message not in the archiveQuoted 48 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based platforms, so fix the kconfig depends to be
CONFIG_OFinstead ofCONFIG_PPC_OFSigned-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>--- 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(-)drivers/char/ipmi/ipmi_si_intf.c +3
-3@@ -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) {
drivers/char/ipmi/ipmi_si_intf.c static struct of_platform_driver ipmi_of_platform_driver = { · line 2649
Quoted 5 lines
drivers/char/ipmi/ipmi_si_intf.c +1
-1@@ -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.
Quoted 32 lines
drivers/usb/host/isp1760-if.c +3
-3@@ -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 ;
drivers/usb/host/isp1760-if.c module_init(isp1760_init); · line 423
Quoted 8 lines
drivers/usb/host/isp1760-if.c +1
-1@@ -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.
A message that is not in the archive (sent off-list or not yet received): 20101117054337.GG12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/[email protected]
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
Grant,
Quoted 43 lines · Grant Likely
Quoted 42 lines · Rob Herring
From: Rob Herring<rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based platforms, so fix the kconfig depends to be
CONFIG_OFinstead ofCONFIG_PPC_OFSigned-off-by Rob Herring<rob.herring-bsGFqQB8/[email protected]>--- 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(-)drivers/char/ipmi/ipmi_si_intf.c +2
-2@@ -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 */
Quoted 17 lines
drivers/char/ipmi/ipmi_si_intf.c static struct of_platform_driver ipmi_of_platform_driver = { · line 2649
Quoted 11 lines
drivers/char/ipmi/ipmi_si_intf.c +2
-2-#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_driversare now deprecated and the regularplatform_drivershould be used instead. Instead of extending theof_platform_driverusage to all the architectures, please move theof_match_tableand the probe/remove routines into theplatform_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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/7] OF: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
Quoted 64 lines · Rob Herring
Grant,
Quoted 43 lines · Grant Likely
Quoted 42 lines · Rob Herring
From: Rob Herring<rob.herring-bsGFqQB8/[email protected]>
Some OF drivers could likely be used on non-powerpc OF based platforms, so fix the kconfig depends to be
CONFIG_OFinstead ofCONFIG_PPC_OFSigned-off-by Rob Herring<rob.herring-bsGFqQB8/[email protected]>--- 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(-)drivers/char/ipmi/ipmi_si_intf.c +2
-2@@ -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 */ Quoted 17 lines
drivers/char/ipmi/ipmi_si_intf.c static struct of_platform_driver ipmi_of_platform_driver = { · line 2649
Quoted 11 lines
drivers/char/ipmi/ipmi_si_intf.c +2
-2-#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_driversare now deprecated and the regularplatform_drivershould be used instead. Instead of extending theof_platform_driverusage to all the architectures, please move theof_match_tableand the probe/remove routines into theplatform_driver.
Quoted 3 lines
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_devicewithin probe func?
yes.
g.
PATCH 2/7 of: Fixes for OF probing on little endian systems
In reply to a message not in the archiveFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
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.
--- drivers/char/ipmi/ipmi_si_intf.c | 8 ++++---- drivers/mmc/host/sdhci-of-core.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +4 -4
@@ -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;
drivers/mmc/host/sdhci-of-core.c +2 -2
@@ -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)
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1289939635-30742-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Grant Likely
AppliedRe: [PATCH 2/7] of: Fixes for OF probing on little endian systems
Quoted 8 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Fixes for sdhci-of and ipmi drivers.
Auditing all drivers using
of_get_propertydid not find other occurrences likely to be used on LE platforms.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Merged, thanks.
g.
Quoted 60 lines
--- drivers/char/ipmi/ipmi_si_intf.c | 8 ++++---- drivers/mmc/host/sdhci-of-core.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)drivers/char/ipmi/ipmi_si_intf.c +4
-4@@ -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;drivers/mmc/host/sdhci-of-core.c +2
-2@@ -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)Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
A message that is not in the archive (sent off-list or not yet received): 20101117052331.GA12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/[email protected]
Re: [PATCH 2/7] of: Fixes for OF probing on little endian systems
Grant,
Quoted 11 lines · Grant Likely
Quoted 8 lines · Rob Herring
From: Rob Herring<rob.herring-bsGFqQB8/[email protected]>
Fixes for sdhci-of and ipmi drivers.
Auditing all drivers using
of_get_propertydid not find other occurrences likely to be used on LE platforms.Signed-off-by Rob Herring<rob.herring-bsGFqQB8/[email protected]>Merged, thanks.
I don't see this one in your tree. Are you still going to take this one?
Rob
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 2/7] of: Fixes for OF probing on little endian systems
Quoted 14 lines · Rob Herring
Grant,
Quoted 11 lines · Grant Likely
Quoted 8 lines · Rob Herring
From: Rob Herring<rob.herring-bsGFqQB8/[email protected]>
Fixes for sdhci-of and ipmi drivers.
Auditing all drivers using
of_get_propertydid not find other occurrences likely to be used on LE platforms.Signed-off-by Rob Herring<rob.herring-bsGFqQB8/[email protected]>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.
Quoted 4 lines
I don't see this one in your tree. Are you still going to take this one?
Rob
PATCH 3/7 ipmi: explicitly include of_address.h and of_irq.h
In reply to a message not in the archiveFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
of_address.h and of_irq.h are implicitly included on powerpc. Adding them fixes builds on non-powerpc platforms.
--- drivers/char/ipmi/ipmi_si_intf.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +2 -0
@@ -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: "
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1289939635-30742-4-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Grant Likely
AppliedRe: [PATCH 3/7] ipmi: explicitly include of_address.h and of_irq.h
Quoted 6 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
of_address.handof_irq.hare implicitly included on powerpc. Adding them fixes builds on non-powerpc platforms.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>
merged, thanks.
Quoted 24 lines
--- drivers/char/ipmi/ipmi_si_intf.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/char/ipmi/ipmi_si_intf.c +2
-0@@ -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: "Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
PATCH 4/7 mmc: sdhci-of: fix build on non-powerpc platforms
In reply to a message not in the archiveFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Explicitly include err.h, of_address.h and of_irq.h. Make use of machine_is() conditional on PPC.
--- drivers/mmc/host/sdhci-of-core.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/mmc/host/sdhci-of-core.c +9 -0
@@ -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,
Signature · 1 line
1.7.1
Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
Quoted 6 lines · Rob Herring
From: Rob Herring <[email protected]>
Explicitly include
err.h,of_address.handof_irq.h. Make use ofmachine_is()conditional on PPC.Signed-off-by Rob Herring <[email protected]>
Hmm, sins of the past :/ I wonder if we can get away with less #ifdeffery, will think about it...
Quoted 48 lines
--- drivers/mmc/host/sdhci-of-core.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)drivers/mmc/host/sdhci-of-core.c +9
-0@@ -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,Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
Signature · 2 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
Quoted 11 lines · Wolfram Sang
Quoted 6 lines · Rob Herring
From: Rob Herring<[email protected]>
Explicitly include
err.h,of_address.handof_irq.h. Make use ofmachine_is()conditional on PPC.Signed-off-by Rob Herring<[email protected]>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
Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
Quoted 7 lines · Rob Herring
Quoted 6 lines · Wolfram Sang
Quoted 5 lines · Rob Herring
From: Rob Herring<[email protected]>
Explicitly include
err.h,of_address.handof_irq.h. Make use ofmachine_is()conditional on PPC.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring<[email protected]>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.
Quoted 1 line
Isn't a year enough of a transition period.
No.
g.
A message that is not in the archive (sent off-list or not yet received): 1289939635-30742-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms
Quoted 6 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Explicitly include
err.h,of_address.handof_irq.h. Make use ofmachine_is()conditional on PPC.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Merged into my test branch, thanks.
g.
Quoted 48 lines
--- drivers/mmc/host/sdhci-of-core.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)drivers/mmc/host/sdhci-of-core.c +9
-0@@ -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,Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
PATCH 5/7 mmc: sdhci-of: support generic OF controllers
In reply to a message not in the archiveFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
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.
--- drivers/mmc/host/sdhci-of-core.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/mmc/host/sdhci-of-core.c +5 -0
@@ -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 ))
Signature · 1 line
1.7.1
Re: [PATCH 5/7] mmc: sdhci-of: support generic OF controllers
Quoted 6 lines · Rob Herring
From: Rob Herring <[email protected]>
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 <[email protected]>
For the sdhci-patches, you should add [email protected] to the CC-list. Done now...
Quoted 34 lines
--- drivers/mmc/host/sdhci-of-core.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)drivers/mmc/host/sdhci-of-core.c +5
-0@@ -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 ))Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
Signature · 2 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
A message that is not in the archive (sent off-list or not yet received): 1289939635-30742-6-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH 5/7] mmc: sdhci-of: support generic OF controllers
Quoted 6 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
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/[email protected]>
Applied to my test branch, thanks
g.
Quoted 34 lines
--- drivers/mmc/host/sdhci-of-core.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)drivers/mmc/host/sdhci-of-core.c +5
-0@@ -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 ))Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
PATCH 6/7 ARM: add dma_mask to pdev_archdata
In reply to a message not in the archiveFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
--- arch/arm/include/asm/device.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/device.h +1 -0
@@ -13,6 +13,7 @@ struct dev_archdata { };struct pdev_archdata { +u64 dma_mask; };#endif
Signature · 1 line
1.7.1
PATCH 7/7 OF: set dma_mask for ARM
In reply to a message not in the archiveFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Various drivers require dma_mask to be valid, so it needs to be setup when doing OF probing on ARM.
--- drivers/of/platform.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/of/platform.c +2 -2
@@ -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 );
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1289939635-30742-8-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH 7/7] OF: set dma_mask for ARM
Quoted 6 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Various drivers require
dma_maskto be valid, so it needs to be setup when doing OF probing on ARM.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>
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.
Quoted 33 lines
--- drivers/of/platform.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/of/platform.c +2
-2@@ -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 );Signature · 6 lines
1.7.1 _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
A message that is not in the archive (sent off-list or not yet received): 20101117052448.GC12813-MrY2KI0G/OVr83L8+7iqerDks+cytr/[email protected]
Re: [PATCH 7/7] OF: set dma_mask for ARM
Grant,
Quoted 12 lines · Grant Likely
Quoted 6 lines · Rob Herring
From: Rob Herring<rob.herring-bsGFqQB8/[email protected]>
Various drivers require
dma_maskto be valid, so it needs to be setup when doing OF probing on ARM.Signed-off-by Rob Herring<rob.herring-bsGFqQB8/[email protected]>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
Hi Rob,
Quoted 9 lines · On Tue, 16 Nov 2010 14:33:48 -0600 Rob Herring…
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
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.
Quoted 8 lines
Rob Herring (7):
OF: make drivers depend onCONFIG_OFinstead ofCONFIG_PPC_OF
of: Fixes for OF probing on little endian systems
ipmi: explicitly includeof_address.handof_irq.h
mmc: sdhci-of: fix build on non-powerpc platforms
mmc: sdhci-of: support generic OF controllers
ARM: adddma_masktopdev_archdata
OF: setdma_maskfor 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.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss