From: Jon Hunter Date: Mon, 1 Apr 2013 19:33:50 +0000 (-0500) Subject: Merge commit '31d9adca82ce65e5c99d045b5fd917c702b6fce3' into tmp X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Merge commit '31d9adca82ce65e5c99d045b5fd917c702b6fce3' into tmp Conflicts: arch/arm/plat-omap/dmtimer.c --- dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4 diff --cc arch/arm/mach-omap2/gpmc.c index c0a2c26ed5a4,410e1bac7815..6de31739b45c --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@@ -1171,9 -1377,20 +1377,20 @@@ static int gpmc_probe(struct platform_d return rc; } - if (IS_ERR_VALUE(gpmc_setup_irq())) + if (gpmc_setup_irq() < 0) dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); + /* Now the GPMC is initialised, unreserve the chip-selects */ + gpmc_cs_map = 0; + + rc = gpmc_probe_dt(pdev); + if (rc < 0) { + clk_disable_unprepare(gpmc_l3_clk); + clk_put(gpmc_l3_clk); + dev_err(gpmc_dev, "failed to probe DT parameters\n"); + return rc; + } + return 0; } diff --cc arch/arm/mach-omap2/omap_device.c index b21ad59604d1,381be7ac0c17..2448c7a273d2 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@@ -1157,95 -815,22 +815,19 @@@ struct device *omap_device_get_by_hwmod } oh = omap_hwmod_lookup(oh_name); - if (IS_ERR_OR_NULL(oh)) { + if (!oh) { WARN(1, "%s: no hwmod for %s\n", __func__, oh_name); - return ERR_PTR(oh ? PTR_ERR(oh) : -ENODEV); + return -ENODEV; } - if (IS_ERR_OR_NULL(oh->od)) { + if (!oh->od) { WARN(1, "%s: no omap_device for %s\n", __func__, oh_name); - return ERR_PTR(oh->od ? PTR_ERR(oh->od) : -ENODEV); + return -ENODEV; } - if (IS_ERR_OR_NULL(oh->od->pdev)) - return ERR_PTR(oh->od->pdev ? PTR_ERR(oh->od->pdev) : -ENODEV); - return &oh->od->pdev->dev; } - EXPORT_SYMBOL(omap_device_get_by_hwmod_name); - - /* - * Public functions intended for use in omap_device_pm_latency - * .activate_func and .deactivate_func function pointers - */ - - /** - * omap_device_enable_hwmods - call omap_hwmod_enable() on all hwmods - * @od: struct omap_device *od - * - * Enable all underlying hwmods. Returns 0. - */ - int omap_device_enable_hwmods(struct omap_device *od) - { - int i; - - for (i = 0; i < od->hwmods_cnt; i++) - omap_hwmod_enable(od->hwmods[i]); - - /* XXX pass along return value here? */ - return 0; - } - - /** - * omap_device_idle_hwmods - call omap_hwmod_idle() on all hwmods - * @od: struct omap_device *od - * - * Idle all underlying hwmods. Returns 0. - */ - int omap_device_idle_hwmods(struct omap_device *od) - { - int i; - - for (i = 0; i < od->hwmods_cnt; i++) - omap_hwmod_idle(od->hwmods[i]); - - /* XXX pass along return value here? */ - return 0; - } - - /** - * omap_device_disable_clocks - disable all main and interface clocks - * @od: struct omap_device *od - * - * Disable the main functional clock and interface clock for all of the - * omap_hwmods associated with the omap_device. Returns 0. - */ - int omap_device_disable_clocks(struct omap_device *od) - { - int i; - - for (i = 0; i < od->hwmods_cnt; i++) - omap_hwmod_disable_clocks(od->hwmods[i]); - - /* XXX pass along return value here? */ - return 0; - } - - /** - * omap_device_enable_clocks - enable all main and interface clocks - * @od: struct omap_device *od - * - * Enable the main functional clock and interface clock for all of the - * omap_hwmods associated with the omap_device. Returns 0. - */ - int omap_device_enable_clocks(struct omap_device *od) - { - int i; - - for (i = 0; i < od->hwmods_cnt; i++) - omap_hwmod_enable_clocks(od->hwmods[i]); - - /* XXX pass along return value here? */ - return 0; - } static struct notifier_block platform_nb = { .notifier_call = _omap_device_notifier_call, diff --cc arch/arm/plat-omap/dmtimer.c index 5679ec41928b,a0daa2fb5de6..e6dbc8dbe6a6 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@@ -807,12 -808,9 +807,10 @@@ static int omap_dm_timer_probe(struct p return -ENOMEM; } + timer->fclk = ERR_PTR(-ENODEV); - timer->io_base = devm_request_and_ioremap(dev, mem); - if (!timer->io_base) { - dev_err(dev, "%s: region already claimed.\n", __func__); - return -ENOMEM; - } + timer->io_base = devm_ioremap_resource(dev, mem); + if (IS_ERR(timer->io_base)) + return PTR_ERR(timer->io_base); if (dev->of_node) { if (of_find_property(dev->of_node, "ti,timer-alwon", NULL))