diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer.c | 2 |
5 files changed, 33 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index a66eeae3bc5d..2a450c9b9a7b 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -3292,7 +3292,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3292 | CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X), | 3292 | CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X), |
3293 | CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), | 3293 | CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), |
3294 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), | 3294 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), |
3295 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), | 3295 | CLK("omap-gpmc", "fck", &dummy_ck, CK_443X), |
3296 | CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), | 3296 | CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), |
3297 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), | 3297 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), |
3298 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), | 3298 | 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 467567ad526a..64e50465a4b5 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -926,15 +926,18 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm) | |||
926 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable) | 926 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable) |
927 | return -EINVAL; | 927 | return -EINVAL; |
928 | 928 | ||
929 | spin_lock_irqsave(&clkdm->lock, flags); | ||
930 | |||
929 | /* | 931 | /* |
930 | * For arch's with no autodeps, clkcm_clk_enable | 932 | * For arch's with no autodeps, clkcm_clk_enable |
931 | * should be called for every clock instance or hwmod that is | 933 | * should be called for every clock instance or hwmod that is |
932 | * enabled, so the clkdm can be force woken up. | 934 | * enabled, so the clkdm can be force woken up. |
933 | */ | 935 | */ |
934 | if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps) | 936 | if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps) { |
937 | spin_unlock_irqrestore(&clkdm->lock, flags); | ||
935 | return 0; | 938 | return 0; |
939 | } | ||
936 | 940 | ||
937 | spin_lock_irqsave(&clkdm->lock, flags); | ||
938 | arch_clkdm->clkdm_clk_enable(clkdm); | 941 | arch_clkdm->clkdm_clk_enable(clkdm); |
939 | pwrdm_state_switch(clkdm->pwrdm.ptr); | 942 | pwrdm_state_switch(clkdm->pwrdm.ptr); |
940 | spin_unlock_irqrestore(&clkdm->lock, flags); | 943 | spin_unlock_irqrestore(&clkdm->lock, flags); |
@@ -951,15 +954,19 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm) | |||
951 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) | 954 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) |
952 | return -EINVAL; | 955 | return -EINVAL; |
953 | 956 | ||
957 | spin_lock_irqsave(&clkdm->lock, flags); | ||
958 | |||
954 | if (atomic_read(&clkdm->usecount) == 0) { | 959 | if (atomic_read(&clkdm->usecount) == 0) { |
960 | spin_unlock_irqrestore(&clkdm->lock, flags); | ||
955 | WARN_ON(1); /* underflow */ | 961 | WARN_ON(1); /* underflow */ |
956 | return -ERANGE; | 962 | return -ERANGE; |
957 | } | 963 | } |
958 | 964 | ||
959 | if (atomic_dec_return(&clkdm->usecount) > 0) | 965 | if (atomic_dec_return(&clkdm->usecount) > 0) { |
966 | spin_unlock_irqrestore(&clkdm->lock, flags); | ||
960 | return 0; | 967 | return 0; |
968 | } | ||
961 | 969 | ||
962 | spin_lock_irqsave(&clkdm->lock, flags); | ||
963 | arch_clkdm->clkdm_clk_disable(clkdm); | 970 | arch_clkdm->clkdm_clk_disable(clkdm); |
964 | pwrdm_state_switch(clkdm->pwrdm.ptr); | 971 | pwrdm_state_switch(clkdm->pwrdm.ptr); |
965 | spin_unlock_irqrestore(&clkdm->lock, flags); | 972 | spin_unlock_irqrestore(&clkdm->lock, flags); |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 86a5e13c9f59..2ad491d6910b 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -343,7 +343,7 @@ static void __init omap_init_dmic(void) | |||
343 | 343 | ||
344 | oh = omap_hwmod_lookup("dmic"); | 344 | oh = omap_hwmod_lookup("dmic"); |
345 | if (!oh) { | 345 | if (!oh) { |
346 | printk(KERN_ERR "Could not look up mcpdm hw_mod\n"); | 346 | pr_err("Could not look up dmic hw_mod\n"); |
347 | return; | 347 | return; |
348 | } | 348 | } |
349 | 349 | ||
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 6af1a5d98e6f..bf6117c32f4b 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -714,9 +714,9 @@ static void __devexit gpmc_mem_exit(void) | |||
714 | 714 | ||
715 | } | 715 | } |
716 | 716 | ||
717 | static void __devinit gpmc_mem_init(void) | 717 | static int __devinit gpmc_mem_init(void) |
718 | { | 718 | { |
719 | int cs; | 719 | int cs, rc; |
720 | unsigned long boot_rom_space = 0; | 720 | unsigned long boot_rom_space = 0; |
721 | 721 | ||
722 | /* never allocate the first page, to facilitate bug detection; | 722 | /* never allocate the first page, to facilitate bug detection; |
@@ -736,13 +736,21 @@ static void __devinit gpmc_mem_init(void) | |||
736 | if (!gpmc_cs_mem_enabled(cs)) | 736 | if (!gpmc_cs_mem_enabled(cs)) |
737 | continue; | 737 | continue; |
738 | gpmc_cs_get_memconf(cs, &base, &size); | 738 | gpmc_cs_get_memconf(cs, &base, &size); |
739 | if (gpmc_cs_insert_mem(cs, base, size) < 0) | 739 | rc = gpmc_cs_insert_mem(cs, base, size); |
740 | BUG(); | 740 | if (IS_ERR_VALUE(rc)) { |
741 | while (--cs >= 0) | ||
742 | if (gpmc_cs_mem_enabled(cs)) | ||
743 | gpmc_cs_delete_mem(cs); | ||
744 | return rc; | ||
745 | } | ||
741 | } | 746 | } |
747 | |||
748 | return 0; | ||
742 | } | 749 | } |
743 | 750 | ||
744 | static __devinit int gpmc_probe(struct platform_device *pdev) | 751 | static __devinit int gpmc_probe(struct platform_device *pdev) |
745 | { | 752 | { |
753 | int rc; | ||
746 | u32 l; | 754 | u32 l; |
747 | struct resource *res; | 755 | struct resource *res; |
748 | 756 | ||
@@ -782,7 +790,13 @@ static __devinit int gpmc_probe(struct platform_device *pdev) | |||
782 | dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), | 790 | dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), |
783 | GPMC_REVISION_MINOR(l)); | 791 | GPMC_REVISION_MINOR(l)); |
784 | 792 | ||
785 | gpmc_mem_init(); | 793 | rc = gpmc_mem_init(); |
794 | if (IS_ERR_VALUE(rc)) { | ||
795 | clk_disable_unprepare(gpmc_l3_clk); | ||
796 | clk_put(gpmc_l3_clk); | ||
797 | dev_err(gpmc_dev, "failed to reserve memory\n"); | ||
798 | return rc; | ||
799 | } | ||
786 | 800 | ||
787 | if (IS_ERR_VALUE(gpmc_setup_irq())) | 801 | if (IS_ERR_VALUE(gpmc_setup_irq())) |
788 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); | 802 | 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 45598ac819be..565e5755c9bc 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 |
469 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, | 469 | static 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 | ||
473 | static void __init omap4_timer_init(void) | 473 | static void __init omap4_timer_init(void) |