]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/mux.c
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / mux.c
index 042105ac30b8ea5058861343058d62112e44b288..75211f20ccb3db11dc04347f991a30d82a5447a3 100644 (file)
@@ -83,10 +83,21 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
                        reg |= OMAP24XX_PULL_ENA;
                if(cfg->pu_pd_val)
                        reg |= OMAP24XX_PULL_UP;
-#ifdef CONFIG_OMAP_MUX_DEBUG
-               printk("Muxing %s (0x%08x): 0x%02x -> 0x%02x\n",
-                      cfg->name, OMAP24XX_L4_BASE + cfg->mux_reg,
-                      omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg), reg);
+#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
+               {
+                       u8 orig = omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg);
+                       u8 debug = 0;
+
+#ifdef CONFIG_OMAP_MUX_DEBUG
+                       debug = cfg->debug;
+#endif
+                       warn = (orig != reg);
+                       if (debug || warn)
+                               printk("MUX: setup %s (0x%08x): 0x%02x -> 0x%02x\n",
+                                               cfg->name,
+                                               OMAP24XX_L4_BASE + cfg->mux_reg,
+                                               orig, reg);
+               }
 #endif
                omap_writeb(reg, OMAP24XX_L4_BASE + cfg->mux_reg);
 
@@ -116,7 +127,7 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
        }
 
        /* Check for pull up or pull down selection on 1610 */
-       if (!cpu_is_omap1510()) {
+       if (!cpu_is_omap15xx()) {
                if (cfg->pu_pd_reg && cfg->pull_val) {
                        spin_lock_irqsave(&mux_spin_lock, flags);
                        pu_pd_orig = omap_readl(cfg->pu_pd_reg);
@@ -172,7 +183,7 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
                printk("      %s (0x%08x) = 0x%08x -> 0x%08x\n",
                       cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg);
 
-               if (!cpu_is_omap1510()) {
+               if (!cpu_is_omap15xx()) {
                        if (cfg->pu_pd_reg && cfg->pull_val) {
                                printk("      %s (0x%08x) = 0x%08x -> 0x%08x\n",
                                       cfg->pu_pd_name, cfg->pu_pd_reg,