]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge commit '7185684' into omap-for-v3.10/timer
authorTony Lindgren <tony@atomide.com>
Wed, 3 Apr 2013 17:32:47 +0000 (10:32 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 3 Apr 2013 17:32:47 +0000 (10:32 -0700)
Conflicts:
arch/arm/plat-omap/dmtimer.c

Resolve merge conflict in omap_device.c as per
Lothar Waßmann <LW@KARO-electronics.de>.

17 files changed:
arch/arm/kernel/entry-armv.S
arch/arm/kernel/process.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/gpmc-onenand.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/omap_device.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/pm-debug.c
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/timer.c
arch/arm/mach-tegra/board-harmony-pcie.c
arch/arm/mach-tegra/tegra2_emc.c
arch/arm/mach-ux500/cpu.c
arch/arm/plat-omap/dmtimer.c

index 0f82098c9bfe3618115dcc4e8b2d74d95c7ddcf6..cd22d821bf74cb1d73acc0fcc44e229dd60a505f 100644 (file)
@@ -562,21 +562,21 @@ ENDPROC(__und_usr)
        @ Fall-through from Thumb-2 __und_usr
        @
 #ifdef CONFIG_NEON
+       get_thread_info r10                     @ get current thread
        adr     r6, .LCneon_thumb_opcodes
        b       2f
 #endif
 call_fpe:
+       get_thread_info r10                     @ get current thread
 #ifdef CONFIG_NEON
        adr     r6, .LCneon_arm_opcodes
-2:
-       ldr     r7, [r6], #4                    @ mask value
-       cmp     r7, #0                          @ end mask?
-       beq     1f
-       and     r8, r0, r7
+2:     ldr     r5, [r6], #4                    @ mask value
        ldr     r7, [r6], #4                    @ opcode bits matching in mask
+       cmp     r5, #0                          @ end mask?
+       beq     1f
+       and     r8, r0, r5
        cmp     r8, r7                          @ NEON instruction?
        bne     2b
-       get_thread_info r10
        mov     r7, #1
        strb    r7, [r10, #TI_USED_CP + 10]     @ mark CP#10 as used
        strb    r7, [r10, #TI_USED_CP + 11]     @ mark CP#11 as used
@@ -586,7 +586,6 @@ call_fpe:
        tst     r0, #0x08000000                 @ only CDP/CPRT/LDC/STC have bit 27
        tstne   r0, #0x04000000                 @ bit 26 set on both ARM and Thumb-2
        moveq   pc, lr
-       get_thread_info r10                     @ get current thread
        and     r8, r0, #0x00000f00             @ mask out CP number
  THUMB(        lsr     r8, r8, #8              )
        mov     r7, #1
index 047d3e40e47062d4946d7f7c11e8330132340654..cbd0f51937cc68e63a8dc4c1d62ec3ff4f7b20ad 100644 (file)
@@ -459,15 +459,16 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
  * atomic helpers and the signal restart code. Insert it into the
  * gate_vma so that it is visible through ptrace and /proc/<pid>/mem.
  */
-static struct vm_area_struct gate_vma;
+static struct vm_area_struct gate_vma = {
+       .vm_start       = 0xffff0000,
+       .vm_end         = 0xffff0000 + PAGE_SIZE,
+       .vm_flags       = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYEXEC,
+       .vm_mm          = &init_mm,
+};
 
 static int __init gate_vma_init(void)
 {
-       gate_vma.vm_start       = 0xffff0000;
-       gate_vma.vm_end         = 0xffff0000 + PAGE_SIZE;
-       gate_vma.vm_page_prot   = PAGE_READONLY_EXEC;
-       gate_vma.vm_flags       = VM_READ | VM_EXEC |
-                                 VM_MAYREAD | VM_MAYEXEC;
+       gate_vma.vm_page_prot = PAGE_READONLY_EXEC;
        return 0;
 }
 arch_initcall(gate_vma_init);
index ea961445e0e993a6f244b8bc70cd5a79c59108c4..b23c8e4f28e859180b90d04fb1a7c8b79e619b69 100644 (file)
@@ -536,16 +536,14 @@ static void __init ap_init_of(void)
                                           'A' + (ap_sc_id & 0x0f));
 
        soc_dev = soc_device_register(soc_dev_attr);
-       if (IS_ERR_OR_NULL(soc_dev)) {
+       if (IS_ERR(soc_dev)) {
                kfree(soc_dev_attr->revision);
                kfree(soc_dev_attr);
                return;
        }
 
        parent = soc_device_to_device(soc_dev);
-
-       if (!IS_ERR_OR_NULL(parent))
-               integrator_init_sysfs(parent, ap_sc_id);
+       integrator_init_sysfs(parent, ap_sc_id);
 
        of_platform_populate(root, of_default_bus_match_table,
                        ap_auxdata_lookup, parent);
index 2b0db82a53819e58d98b89131fd05f07317515e6..da1091be0887bd1344a9ba33daf743d1d0a05b3a 100644 (file)
@@ -360,17 +360,14 @@ static void __init intcp_init_of(void)
                                           'A' + (intcp_sc_id & 0x0f));
 
        soc_dev = soc_device_register(soc_dev_attr);
-       if (IS_ERR_OR_NULL(soc_dev)) {
+       if (IS_ERR(soc_dev)) {
                kfree(soc_dev_attr->revision);
                kfree(soc_dev_attr);
                return;
        }
 
        parent = soc_device_to_device(soc_dev);
-
-       if (!IS_ERR_OR_NULL(parent))
-               integrator_init_sysfs(parent, intcp_sc_id);
-
+       integrator_init_sysfs(parent, intcp_sc_id);
        of_platform_populate(root, of_default_bus_match_table,
                        intcp_auxdata_lookup, parent);
 }
index c3558f93d42c4a3d52f705573be61e156ff59669..6c949bc862565a66abe51393d58f9f81a9b3c424 100644 (file)
@@ -479,7 +479,7 @@ static int __init beagle_opp_init(void)
 
        /* Initialize the omap3 opp table if not already created. */
        r = omap3_opp_init();
-       if (IS_ERR_VALUE(r) && (r != -EEXIST)) {
+       if (r < 0 && (r != -EEXIST)) {
                pr_err("%s: opp default init failed\n", __func__);
                return r;
        }
index e4ec3a69ee2e749b1d40b80065956f23b4424070..2191f25ad21b6f18153034e9de15aad273d2174b 100644 (file)
@@ -596,7 +596,7 @@ int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name)
                return -ENOENT;
 
        r = clk_set_rate(mpurate_ck, mpurate);
-       if (IS_ERR_VALUE(r)) {
+       if (r < 0) {
                WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n",
                     mpurate_ck_name, mpurate, r);
                clk_put(mpurate_ck);
index fadd87435cd02e8396ef7fea8ed16a5eabf8e116..0d75889c0a6f57d13f9362cd10bc6c137b023fdb 100644 (file)
@@ -303,7 +303,7 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
        t = omap2_onenand_calc_async_timings();
 
        ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t);
-       if (IS_ERR_VALUE(ret))
+       if (ret < 0)
                return ret;
 
        omap2_onenand_set_async_mode(onenand_base);
@@ -325,7 +325,7 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr)
        t = omap2_onenand_calc_sync_timings(gpmc_onenand_data, freq);
 
        ret = gpmc_set_sync_mode(gpmc_onenand_data->cs, &t);
-       if (IS_ERR_VALUE(ret))
+       if (ret < 0)
                return ret;
 
        set_onenand_cfg(onenand_base);
index 410e1bac781531e35fb4aa3b58b77a9a2a01111d..6de31739b45c474c63e68acec36171a05bbe0c8b 100644 (file)
@@ -716,7 +716,7 @@ static int gpmc_setup_irq(void)
                return -EINVAL;
 
        gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0);
-       if (IS_ERR_VALUE(gpmc_irq_start)) {
+       if (gpmc_irq_start < 0) {
                pr_err("irq_alloc_descs failed\n");
                return gpmc_irq_start;
        }
@@ -801,7 +801,7 @@ static int gpmc_mem_init(void)
                        continue;
                gpmc_cs_get_memconf(cs, &base, &size);
                rc = gpmc_cs_insert_mem(cs, base, size);
-               if (IS_ERR_VALUE(rc)) {
+               if (rc < 0) {
                        while (--cs >= 0)
                                if (gpmc_cs_mem_enabled(cs))
                                        gpmc_cs_delete_mem(cs);
@@ -1370,14 +1370,14 @@ static int gpmc_probe(struct platform_device *pdev)
                 GPMC_REVISION_MINOR(l));
 
        rc = gpmc_mem_init();
-       if (IS_ERR_VALUE(rc)) {
+       if (rc < 0) {
                clk_disable_unprepare(gpmc_l3_clk);
                clk_put(gpmc_l3_clk);
                dev_err(gpmc_dev, "failed to reserve memory\n");
                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 */
index 381be7ac0c17923d8330ad6bfc983347c1695417..eeea4fa28fbcced9e8e8908d1749493ea4057a8b 100644 (file)
@@ -131,7 +131,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
        int oh_cnt, i, ret = 0;
 
        oh_cnt = of_property_count_strings(node, "ti,hwmods");
-       if (!oh_cnt || IS_ERR_VALUE(oh_cnt)) {
+       if (oh_cnt <= 0) {
                dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n");
                return -ENODEV;
        }
@@ -815,20 +815,17 @@ struct device *omap_device_get_by_hwmod_name(const char *oh_name)
        }
 
        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 ERR_PTR(-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 ERR_PTR(-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;
 }
 
index e5cafed8ef2584dc20a86bbbed5821e6063384c0..2520d46c8508baa4e99d1a7a6217d2d0b7854973 100644 (file)
@@ -1659,7 +1659,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
                return -ENOSYS;
 
        ret = _lookup_hardreset(oh, name, &ohri);
-       if (IS_ERR_VALUE(ret))
+       if (ret < 0)
                return ret;
 
        if (oh->clkdm) {
@@ -2409,7 +2409,7 @@ static int __init _init(struct omap_hwmod *oh, void *data)
        _init_mpu_rt_base(oh, NULL);
 
        r = _init_clocks(oh, NULL);
-       if (IS_ERR_VALUE(r)) {
+       if (r < 0) {
                WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
                return -EINVAL;
        }
index 1edd000a81439eb6e7648dcefeeb69ec5ab01b42..0b339861d751004a4c3f8607e329922eeb008334 100644 (file)
@@ -217,7 +217,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir)
                return 0;
 
        d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir);
-       if (!(IS_ERR_OR_NULL(d)))
+       if (d)
                (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d,
                        (void *)pwrdm, &pwrdm_suspend_fops);
 
@@ -261,8 +261,8 @@ static int __init pm_dbg_init(void)
                return 0;
 
        d = debugfs_create_dir("pm_debug", NULL);
-       if (IS_ERR_OR_NULL(d))
-               return PTR_ERR(d);
+       if (!d)
+               return -EINVAL;
 
        (void) debugfs_create_file("count", S_IRUGO,
                d, (void *)DEBUG_FILE_COUNTERS, &debug_fops);
index 89cad4a605dde7251fa0903bfb58f41e55523b13..86babd740d410d42cbe3cf6502cdcaa971313558 100644 (file)
@@ -1180,7 +1180,7 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
 {
        int i;
 
-       if (IS_ERR_OR_NULL(pwrdm)) {
+       if (!pwrdm) {
                pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
                         __func__);
                return 1;
index 773733fccd835439bc3d0d96c8826473ff134467..06cbb49cc976fd73be8fd3647fccac665ee1059f 100644 (file)
@@ -288,7 +288,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
                        r = -EINVAL;
                } else {
                        r = clk_set_parent(timer->fclk, src);
-                       if (IS_ERR_VALUE(r))
+                       if (r < 0)
                                pr_warn("%s: %s cannot set source\n",
                                        __func__, oh->name);
                        clk_put(src);
index 3cdc1bb8254c6764c453fb978f748aae6d8f526a..6d29e6a395406415bc2b8ac1f0527fd681038f9d 100644 (file)
@@ -56,9 +56,9 @@ int __init harmony_pcie_init(void)
        gpio_direction_output(en_vdd_1v05, 1);
 
        regulator = regulator_get(NULL, "vdd_ldo0,vddio_pex_clk");
-       if (IS_ERR_OR_NULL(regulator)) {
-               pr_err("%s: regulator_get failed: %d\n", __func__,
-                      (int)PTR_ERR(regulator));
+       if (IS_ERR(regulator)) {
+               err = PTR_ERR(regulator);
+               pr_err("%s: regulator_get failed: %d\n", __func__, err);
                goto err_reg;
        }
 
index ce7ce42a1ac97b5ec8724181c0a03436e9377c45..9e8bdfa2b36915e4db7a8352753626e7f41b682e 100644 (file)
@@ -276,7 +276,7 @@ static struct tegra_emc_pdata *tegra_emc_fill_pdata(struct platform_device *pdev
        int i;
 
        WARN_ON(pdev->dev.platform_data);
-       BUG_ON(IS_ERR_OR_NULL(c));
+       BUG_ON(IS_ERR(c));
 
        pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
        pdata->tables = devm_kzalloc(&pdev->dev, sizeof(*pdata->tables),
index 537870d3fea87a5df90eb733969ce81dcac8a538..002da9a369d5fe170bd2ca10658a5fa2b9a8725d 100644 (file)
@@ -140,14 +140,13 @@ struct device * __init ux500_soc_device_init(const char *soc_id)
        soc_info_populate(soc_dev_attr, soc_id);
 
        soc_dev = soc_device_register(soc_dev_attr);
-       if (IS_ERR_OR_NULL(soc_dev)) {
+       if (IS_ERR(soc_dev)) {
                kfree(soc_dev_attr);
                return NULL;
        }
 
        parent = soc_device_to_device(soc_dev);
-       if (!IS_ERR_OR_NULL(parent))
-               device_create_file(parent, &ux500_soc_attr);
+       device_create_file(parent, &ux500_soc_attr);
 
        return parent;
 }
index a0daa2fb5de667d4410a87e81fb53cba254dc664..e6dbc8dbe6a68457acf5515a238551f61fc65e78 100644 (file)
@@ -140,8 +140,7 @@ static int omap_dm_timer_prepare(struct omap_dm_timer *timer)
         */
        if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) {
                timer->fclk = clk_get(&timer->pdev->dev, "fck");
-               if (WARN_ON_ONCE(IS_ERR_OR_NULL(timer->fclk))) {
-                       timer->fclk = NULL;
+               if (WARN_ON_ONCE(IS_ERR(timer->fclk))) {
                        dev_err(&timer->pdev->dev, ": No fclk handle.\n");
                        return -EINVAL;
                }
@@ -373,7 +372,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
 
 struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
 {
-       if (timer)
+       if (timer && !IS_ERR(timer->fclk))
                return timer->fclk;
        return NULL;
 }
@@ -482,7 +481,7 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
        if (pdata && pdata->set_timer_src)
                return pdata->set_timer_src(timer->pdev, source);
 
-       if (!timer->fclk)
+       if (IS_ERR(timer->fclk))
                return -EINVAL;
 
        switch (source) {
@@ -500,13 +499,13 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
        }
 
        parent = clk_get(&timer->pdev->dev, parent_name);
-       if (IS_ERR_OR_NULL(parent)) {
+       if (IS_ERR(parent)) {
                pr_err("%s: %s not found\n", __func__, parent_name);
                return -EINVAL;
        }
 
        ret = clk_set_parent(timer->fclk, parent);
-       if (IS_ERR_VALUE(ret))
+       if (ret < 0)
                pr_err("%s: failed to set %s as parent\n", __func__,
                        parent_name);
 
@@ -808,6 +807,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
                return  -ENOMEM;
        }
 
+       timer->fclk = ERR_PTR(-ENODEV);
        timer->io_base = devm_ioremap_resource(dev, mem);
        if (IS_ERR(timer->io_base))
                return PTR_ERR(timer->io_base);