aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-10-17 20:05:25 -0400
committerOlof Johansson <olof@lixom.net>2012-10-17 20:05:25 -0400
commitb5beb20d03c89a1ea7cb208c445546f2c62225e4 (patch)
tree903875467ff7fef37762be9edb3e8407bd49f056 /arch
parentb08d48414e73fbf743a93b96e2e5449775239e4a (diff)
parent8119024ef7363591fd958ec89ebfaee7c18209e3 (diff)
Merge tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren: A boot problem fix for am33xx beaglebone caused by GPMC, a regression fix for local timer, and a clockdomain locking fix. Also few minor fixes for boot time and sparse warnings. * tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck ARM: OMAP: resolve sparse warning concerning debug_card_init() ARM: OMAP4: Fix twd_local_timer_register regression
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/clockdomain.c15
-rw-r--r--arch/arm/mach-omap2/devices.c2
-rw-r--r--arch/arm/mach-omap2/gpmc.c24
-rw-r--r--arch/arm/mach-omap2/timer.c2
-rw-r--r--arch/arm/plat-omap/debug-devices.c1
6 files changed, 34 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index d661d138f270..6efc30c961a5 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3294,7 +3294,7 @@ static struct omap_clk omap44xx_clks[] = {
3294 CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X), 3294 CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X),
3295 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), 3295 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X),
3296 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), 3296 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X),
3297 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), 3297 CLK("omap-gpmc", "fck", &dummy_ck, CK_443X),
3298 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), 3298 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X),
3299 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), 3299 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
3300 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), 3300 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index cbb879139c51..512e79a842cb 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -925,15 +925,18 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
925 if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable) 925 if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable)
926 return -EINVAL; 926 return -EINVAL;
927 927
928 spin_lock_irqsave(&clkdm->lock, flags);
929
928 /* 930 /*
929 * For arch's with no autodeps, clkcm_clk_enable 931 * For arch's with no autodeps, clkcm_clk_enable
930 * should be called for every clock instance or hwmod that is 932 * should be called for every clock instance or hwmod that is
931 * enabled, so the clkdm can be force woken up. 933 * enabled, so the clkdm can be force woken up.
932 */ 934 */
933 if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps) 935 if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps) {
936 spin_unlock_irqrestore(&clkdm->lock, flags);
934 return 0; 937 return 0;
938 }
935 939
936 spin_lock_irqsave(&clkdm->lock, flags);
937 arch_clkdm->clkdm_clk_enable(clkdm); 940 arch_clkdm->clkdm_clk_enable(clkdm);
938 pwrdm_state_switch(clkdm->pwrdm.ptr); 941 pwrdm_state_switch(clkdm->pwrdm.ptr);
939 spin_unlock_irqrestore(&clkdm->lock, flags); 942 spin_unlock_irqrestore(&clkdm->lock, flags);
@@ -950,15 +953,19 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)
950 if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) 953 if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable)
951 return -EINVAL; 954 return -EINVAL;
952 955
956 spin_lock_irqsave(&clkdm->lock, flags);
957
953 if (atomic_read(&clkdm->usecount) == 0) { 958 if (atomic_read(&clkdm->usecount) == 0) {
959 spin_unlock_irqrestore(&clkdm->lock, flags);
954 WARN_ON(1); /* underflow */ 960 WARN_ON(1); /* underflow */
955 return -ERANGE; 961 return -ERANGE;
956 } 962 }
957 963
958 if (atomic_dec_return(&clkdm->usecount) > 0) 964 if (atomic_dec_return(&clkdm->usecount) > 0) {
965 spin_unlock_irqrestore(&clkdm->lock, flags);
959 return 0; 966 return 0;
967 }
960 968
961 spin_lock_irqsave(&clkdm->lock, flags);
962 arch_clkdm->clkdm_clk_disable(clkdm); 969 arch_clkdm->clkdm_clk_disable(clkdm);
963 pwrdm_state_switch(clkdm->pwrdm.ptr); 970 pwrdm_state_switch(clkdm->pwrdm.ptr);
964 spin_unlock_irqrestore(&clkdm->lock, flags); 971 spin_unlock_irqrestore(&clkdm->lock, flags);
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index c8c211731d26..cba60e05e32e 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -341,7 +341,7 @@ static void __init omap_init_dmic(void)
341 341
342 oh = omap_hwmod_lookup("dmic"); 342 oh = omap_hwmod_lookup("dmic");
343 if (!oh) { 343 if (!oh) {
344 printk(KERN_ERR "Could not look up mcpdm hw_mod\n"); 344 pr_err("Could not look up dmic hw_mod\n");
345 return; 345 return;
346 } 346 }
347 347
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 5ac5cf30406a..92b5718fa722 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -868,9 +868,9 @@ static void __devexit gpmc_mem_exit(void)
868 868
869} 869}
870 870
871static void __devinit gpmc_mem_init(void) 871static int __devinit gpmc_mem_init(void)
872{ 872{
873 int cs; 873 int cs, rc;
874 unsigned long boot_rom_space = 0; 874 unsigned long boot_rom_space = 0;
875 875
876 /* never allocate the first page, to facilitate bug detection; 876 /* never allocate the first page, to facilitate bug detection;
@@ -890,13 +890,21 @@ static void __devinit gpmc_mem_init(void)
890 if (!gpmc_cs_mem_enabled(cs)) 890 if (!gpmc_cs_mem_enabled(cs))
891 continue; 891 continue;
892 gpmc_cs_get_memconf(cs, &base, &size); 892 gpmc_cs_get_memconf(cs, &base, &size);
893 if (gpmc_cs_insert_mem(cs, base, size) < 0) 893 rc = gpmc_cs_insert_mem(cs, base, size);
894 BUG(); 894 if (IS_ERR_VALUE(rc)) {
895 while (--cs >= 0)
896 if (gpmc_cs_mem_enabled(cs))
897 gpmc_cs_delete_mem(cs);
898 return rc;
899 }
895 } 900 }
901
902 return 0;
896} 903}
897 904
898static __devinit int gpmc_probe(struct platform_device *pdev) 905static __devinit int gpmc_probe(struct platform_device *pdev)
899{ 906{
907 int rc;
900 u32 l; 908 u32 l;
901 struct resource *res; 909 struct resource *res;
902 910
@@ -936,7 +944,13 @@ static __devinit int gpmc_probe(struct platform_device *pdev)
936 dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), 944 dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l),
937 GPMC_REVISION_MINOR(l)); 945 GPMC_REVISION_MINOR(l));
938 946
939 gpmc_mem_init(); 947 rc = gpmc_mem_init();
948 if (IS_ERR_VALUE(rc)) {
949 clk_disable_unprepare(gpmc_l3_clk);
950 clk_put(gpmc_l3_clk);
951 dev_err(gpmc_dev, "failed to reserve memory\n");
952 return rc;
953 }
940 954
941 if (IS_ERR_VALUE(gpmc_setup_irq())) 955 if (IS_ERR_VALUE(gpmc_setup_irq()))
942 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); 956 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 44f9aa7ec0c0..69e46631a7cd 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -467,7 +467,7 @@ OMAP_SYS_TIMER(3_am33xx)
467#ifdef CONFIG_ARCH_OMAP4 467#ifdef CONFIG_ARCH_OMAP4
468#ifdef CONFIG_LOCAL_TIMERS 468#ifdef CONFIG_LOCAL_TIMERS
469static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 469static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
470 OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START); 470 OMAP44XX_LOCAL_TWD_BASE, 29);
471#endif 471#endif
472 472
473static void __init omap4_timer_init(void) 473static void __init omap4_timer_init(void)
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c
index c7a4c0902b38..5a4678edd65a 100644
--- a/arch/arm/plat-omap/debug-devices.c
+++ b/arch/arm/plat-omap/debug-devices.c
@@ -16,6 +16,7 @@
16#include <linux/smc91x.h> 16#include <linux/smc91x.h>
17 17
18#include <mach/hardware.h> 18#include <mach/hardware.h>
19#include "../mach-omap2/debug-devices.h"
19 20
20/* Many OMAP development platforms reuse the same "debug board"; these 21/* Many OMAP development platforms reuse the same "debug board"; these
21 * platforms include H2, H3, H4, and Perseus2. 22 * platforms include H2, H3, H4, and Perseus2.