diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index a259dc0bf063..5f6af202807a 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -785,9 +785,9 @@ static void gpmc_mem_exit(void) | |||
785 | 785 | ||
786 | } | 786 | } |
787 | 787 | ||
788 | static int gpmc_mem_init(void) | 788 | static void gpmc_mem_init(void) |
789 | { | 789 | { |
790 | int cs, rc; | 790 | int cs; |
791 | 791 | ||
792 | /* | 792 | /* |
793 | * The first 1MB of GPMC address space is typically mapped to | 793 | * The first 1MB of GPMC address space is typically mapped to |
@@ -804,16 +804,12 @@ static int gpmc_mem_init(void) | |||
804 | if (!gpmc_cs_mem_enabled(cs)) | 804 | if (!gpmc_cs_mem_enabled(cs)) |
805 | continue; | 805 | continue; |
806 | gpmc_cs_get_memconf(cs, &base, &size); | 806 | gpmc_cs_get_memconf(cs, &base, &size); |
807 | rc = gpmc_cs_insert_mem(cs, base, size); | 807 | if (gpmc_cs_insert_mem(cs, base, size)) { |
808 | if (rc < 0) { | 808 | pr_warn("%s: disabling cs %d mapped at 0x%x-0x%x\n", |
809 | while (--cs >= 0) | 809 | __func__, cs, base, base + size); |
810 | if (gpmc_cs_mem_enabled(cs)) | 810 | gpmc_cs_disable_mem(cs); |
811 | gpmc_cs_delete_mem(cs); | ||
812 | return rc; | ||
813 | } | 811 | } |
814 | } | 812 | } |
815 | |||
816 | return 0; | ||
817 | } | 813 | } |
818 | 814 | ||
819 | static u32 gpmc_round_ps_to_sync_clk(u32 time_ps, u32 sync_clk) | 815 | static u32 gpmc_round_ps_to_sync_clk(u32 time_ps, u32 sync_clk) |
@@ -1611,13 +1607,7 @@ static int gpmc_probe(struct platform_device *pdev) | |||
1611 | dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), | 1607 | dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), |
1612 | GPMC_REVISION_MINOR(l)); | 1608 | GPMC_REVISION_MINOR(l)); |
1613 | 1609 | ||
1614 | rc = gpmc_mem_init(); | 1610 | gpmc_mem_init(); |
1615 | if (rc < 0) { | ||
1616 | clk_disable_unprepare(gpmc_l3_clk); | ||
1617 | clk_put(gpmc_l3_clk); | ||
1618 | dev_err(gpmc_dev, "failed to reserve memory\n"); | ||
1619 | return rc; | ||
1620 | } | ||
1621 | 1611 | ||
1622 | if (gpmc_setup_irq() < 0) | 1612 | if (gpmc_setup_irq() < 0) |
1623 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); | 1613 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); |