]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/arm/mach-omap2/gpmc.c
Merge branch 'copy_user' of git://git.marvell.com/orion into devel
[mv-sheeva.git] / arch / arm / mach-omap2 / gpmc.c
index 763bdbeaf68182c87389d36a3ed4a53db09e59ed..f91934b2b092dc7ca199f853de520637baa32d08 100644 (file)
@@ -5,6 +5,9 @@
  *
  * Author: Juha Yrjola
  *
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -424,23 +427,24 @@ void __init gpmc_init(void)
        } else if (cpu_is_omap34xx()) {
                ck = "gpmc_fck";
                l = OMAP34XX_GPMC_BASE;
+       } else if (cpu_is_omap44xx()) {
+               ck = "gpmc_fck";
+               l = OMAP44XX_GPMC_BASE;
        }
 
        gpmc_l3_clk = clk_get(NULL, ck);
        if (IS_ERR(gpmc_l3_clk)) {
                printk(KERN_ERR "Could not get GPMC clock %s\n", ck);
-               return -ENODEV;
+               BUG();
        }
 
        gpmc_base = ioremap(l, SZ_4K);
        if (!gpmc_base) {
                clk_put(gpmc_l3_clk);
                printk(KERN_ERR "Could not get GPMC register memory\n");
-               return -ENOMEM;
+               BUG();
        }
 
-       BUG_ON(IS_ERR(gpmc_l3_clk));
-
        l = gpmc_read_reg(GPMC_REVISION);
        printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
        /* Set smart idle mode and automatic L3 clock gating */