summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/gpmc.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-05-10 00:12:31 +0400
committerOlof Johansson <olof@lixom.net>2013-05-10 00:13:57 +0400
commit474dbaa78c9fedbe4fe7e49abb27f0ce766ec9fc (patch)
tree9259b30a20dbd15b4d09b55ff463f79def6311af /arch/arm/mach-omap2/gpmc.c
parent27d4cdca7500ddc42002b96c0ea818e6da61ad91 (diff)
parentb1dd11d60e5357c13d3f3decfb69bd07dde159bd (diff)
downloadlinux-474dbaa78c9fedbe4fe7e49abb27f0ce766ec9fc.tar.xz
Merge tag 'omap-for-v3.10/fixes-for-merge-window-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren: Omap fixes for things that were discovered during the merge window: - Few GPMC fixes and binding doc updates noted after sending pull requests for the GPMC branch. - Board fixes for beagle usb host and rx51 spi probe order - SoC fixes dt earlyprintk, omap1 dma and omap2+ id.c error handling fixes Then few minor things that are not strictly fixes but are good to get out of the way: - Add missing legacy mux registers for am/dm73x gpio - Add detection for am33xx pg2.1 silicon - Enable twl4030 audio modules in defconfig * tag 'omap-for-v3.10/fixes-for-merge-window-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Remove bogus IS_ERR_OR_NULL checking from id.c ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module ARM: OMAP2: AM33XX: id: Add support for new AM335x PG2.1 Si omap: mux: add AM/DM37x gpios ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init() ARM: OMAP2+: omap_device: use late_initcall_sync ARM: OMAP: RX-51: change probe order of touchscreen and panel SPI devices ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx ARM: OMAP2+: only WARN if a GPMC child probe function fail ARM: OMAP2+: only search for GPMC DT child nodes on probe Documentation: dt: update properties in TI GPMC NAND example Documentation: dt: update TI GPMC ethernet binding properties Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r--arch/arm/mach-omap2/gpmc.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index ed946df5ad8a..6c4da1254f53 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1520,36 +1520,22 @@ static int gpmc_probe_dt(struct platform_device *pdev)
return ret;
}
- for_each_node_by_name(child, "nand") {
- ret = gpmc_probe_nand_child(pdev, child);
- if (ret < 0) {
- of_node_put(child);
- return ret;
- }
- }
+ for_each_child_of_node(pdev->dev.of_node, child) {
- for_each_node_by_name(child, "onenand") {
- ret = gpmc_probe_onenand_child(pdev, child);
- if (ret < 0) {
- of_node_put(child);
- return ret;
- }
- }
+ if (!child->name)
+ continue;
- for_each_node_by_name(child, "nor") {
- ret = gpmc_probe_generic_child(pdev, child);
- if (ret < 0) {
- of_node_put(child);
- return ret;
- }
- }
+ if (of_node_cmp(child->name, "nand") == 0)
+ ret = gpmc_probe_nand_child(pdev, child);
+ else if (of_node_cmp(child->name, "onenand") == 0)
+ ret = gpmc_probe_onenand_child(pdev, child);
+ else if (of_node_cmp(child->name, "ethernet") == 0 ||
+ of_node_cmp(child->name, "nor") == 0)
+ ret = gpmc_probe_generic_child(pdev, child);
- for_each_node_by_name(child, "ethernet") {
- ret = gpmc_probe_generic_child(pdev, child);
- if (ret < 0) {
+ if (WARN(ret < 0, "%s: probing gpmc child %s failed\n",
+ __func__, child->full_name))
of_node_put(child);
- return ret;
- }
}
return 0;