diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-09 14:18:35 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-09 14:18:35 -0800 |
commit | 6c9e92476bc924ede6d6d2f0bfed2c06ae148d29 (patch) | |
tree | 1c9972cf4f4b484d6203844c396b0c232379f1f1 /drivers/misc | |
parent | 0563fdc0d9fbd4d8896956d4aeb01fad09146acc (diff) | |
parent | ef1dfa7332e9205b532da1c2d286757ce511cd1d (diff) | |
download | linux-6c9e92476bc924ede6d6d2f0bfed2c06ae148d29.tar.bz2 |
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Arnd Bergmann:
"The remaining cleanups for 3.19 are to a large part result of
devicetree conversion nearing completion on two other platforms
besides AT91:
- Like AT91, Renesas shmobile is in the process to migrate to DT and
multiplatform, but using a different approach of doing it one SoC
at a time. For 3.19, the r8a7791 platform and associated "Koelsch"
board are considered complete and we remove the non-DT
non-multiplatform support for this.
- The ARM Versatile Express has supported DT and multiplatform for a
long time, but we have still kept the legacy board files around,
because not all drivers were fully working before. We have finally
taken the last step to remove the board files.
Other changes in this branch are preparation for the later branches or
just unrelated to the more interesting changes:
- The dts files for arm64 get moved into per-vendor directories for a
clearer structure.
- Some dead code removal (zynq, exynos, davinci, imx)
- Using pr_*() macros more consistently instead of printk(KERN_*) in
some platform code"
* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (71 commits)
ARM: zynq: Remove secondary_startup() declaration from header
ARM: vexpress: Enable regulator framework when MMCI is in use
ARM: vexpress: Remove non-DT code
ARM: imx: Remove unneeded .map_io initialization
ARM: dts: imx6qdl-sabresd: Fix the microphone route
ARM: imx: refactor mxc_iomux_mode()
ARM: imx: simplify clk_pllv3_prepare()
ARM: imx6q: drop unnecessary semicolon
ARM: imx: clean up machine mxc_arch_reset_init_dt reset init
ARM: dts: imx6qdl-rex: Remove unneeded 'fsl,mode' property
ARM: dts: imx6qdl-gw5x: Remove unneeded 'fsl,mode' property
ARM: dts: imx6qdl-sabresd: Use IMX6QDL_CLK_CKO define
ARM: at91: remove useless init_time for DT-only SoCs
ARM: davinci: Remove redundant casts
ARM: davinci: Use standard logging styles
ARM: shmobile: r8a7779: Spelling/grammar s/entity/identity/, s/map/mapping/
ARM: shmobile: sh7372: Spelling/grammar s/entity map/identity mapping/
ARM: shmobile: sh73a0: Spelling/grammar s/entity map/identity mapping/
ARM: EXYNOS: Remove unused static iomapping
ARM: at91: fix build breakage due to legacy board removals
...
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/vexpress-syscfg.c | 60 |
1 files changed, 13 insertions, 47 deletions
diff --git a/drivers/misc/vexpress-syscfg.c b/drivers/misc/vexpress-syscfg.c index b3a812384a6f..c344483fa7d6 100644 --- a/drivers/misc/vexpress-syscfg.c +++ b/drivers/misc/vexpress-syscfg.c @@ -145,7 +145,7 @@ static struct regmap_config vexpress_syscfg_regmap_config = { static struct regmap *vexpress_syscfg_regmap_init(struct device *dev, void *context) { - struct platform_device *pdev = to_platform_device(dev); + int err; struct vexpress_syscfg *syscfg = context; struct vexpress_syscfg_func *func; struct property *prop; @@ -155,32 +155,18 @@ static struct regmap *vexpress_syscfg_regmap_init(struct device *dev, u32 site, position, dcc; int i; - if (dev->of_node) { - int err = vexpress_config_get_topo(dev->of_node, &site, + err = vexpress_config_get_topo(dev->of_node, &site, &position, &dcc); + if (err) + return ERR_PTR(err); - if (err) - return ERR_PTR(err); - - prop = of_find_property(dev->of_node, - "arm,vexpress-sysreg,func", NULL); - if (!prop) - return ERR_PTR(-EINVAL); - - num = prop->length / sizeof(u32) / 2; - val = prop->value; - } else { - if (pdev->num_resources != 1 || - pdev->resource[0].flags != IORESOURCE_BUS) - return ERR_PTR(-EFAULT); - - site = pdev->resource[0].start; - if (site == VEXPRESS_SITE_MASTER) - site = vexpress_config_get_master(); - position = 0; - dcc = 0; - num = 1; - } + prop = of_find_property(dev->of_node, + "arm,vexpress-sysreg,func", NULL); + if (!prop) + return ERR_PTR(-EINVAL); + + num = prop->length / sizeof(u32) / 2; + val = prop->value; /* * "arm,vexpress-energy" function used to be described @@ -207,13 +193,8 @@ static struct regmap *vexpress_syscfg_regmap_init(struct device *dev, for (i = 0; i < num; i++) { u32 function, device; - if (dev->of_node) { - function = be32_to_cpup(val++); - device = be32_to_cpup(val++); - } else { - function = pdev->resource[0].end; - device = pdev->id; - } + function = be32_to_cpup(val++); + device = be32_to_cpup(val++); dev_dbg(dev, "func %p: %u/%u/%u/%u/%u\n", func, site, position, dcc, @@ -265,17 +246,6 @@ static struct vexpress_config_bridge_ops vexpress_syscfg_bridge_ops = { }; -/* Non-DT hack, to be gone... */ -static struct device *vexpress_syscfg_bridge; - -int vexpress_syscfg_device_register(struct platform_device *pdev) -{ - pdev->dev.parent = vexpress_syscfg_bridge; - - return platform_device_register(pdev); -} - - static int vexpress_syscfg_probe(struct platform_device *pdev) { struct vexpress_syscfg *syscfg; @@ -303,10 +273,6 @@ static int vexpress_syscfg_probe(struct platform_device *pdev) if (IS_ERR(bridge)) return PTR_ERR(bridge); - /* Non-DT case */ - if (!pdev->dev.of_node) - vexpress_syscfg_bridge = bridge; - return 0; } |