Commit 032a6424 authored by Dan Murphy's avatar Dan Murphy Committed by Benoit Cousson

OMAP: mux: Add __func__ macro to pr_xxx macros

Removed mux: and added the __func__ macro to make debugging
easier.
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarBenoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
parent fc63de82
...@@ -114,12 +114,12 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, ...@@ -114,12 +114,12 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition,
} }
if (found == 0) { if (found == 0) {
pr_err("mux: Could not set gpio%i\n", gpio); pr_err("%s: Could not set gpio%i\n", __func__, gpio);
return -ENODEV; return -ENODEV;
} }
if (found > 1) { if (found > 1) {
pr_info("mux: Multiple gpio paths (%d) for gpio%i\n", pr_info("%s: Multiple gpio paths (%d) for gpio%i\n", __func__,
found, gpio); found, gpio);
return -EINVAL; return -EINVAL;
} }
...@@ -130,7 +130,7 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, ...@@ -130,7 +130,7 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition,
mux_mode |= OMAP_MUX_MODE3; mux_mode |= OMAP_MUX_MODE3;
else else
mux_mode |= OMAP_MUX_MODE4; mux_mode |= OMAP_MUX_MODE4;
pr_debug("mux: Setting signal %s.gpio%i 0x%04x -> 0x%04x\n", pr_debug("%s: Setting signal %s.gpio%i 0x%04x -> 0x%04x\n", __func__,
gpio_mux->muxnames[0], gpio, old_mode, mux_mode); gpio_mux->muxnames[0], gpio, old_mode, mux_mode);
omap_mux_write(partition, mux_mode, gpio_mux->reg_offset); omap_mux_write(partition, mux_mode, gpio_mux->reg_offset);
...@@ -190,8 +190,8 @@ static int __init _omap_mux_init_signal(struct omap_mux_partition *partition, ...@@ -190,8 +190,8 @@ static int __init _omap_mux_init_signal(struct omap_mux_partition *partition,
old_mode = omap_mux_read(partition, old_mode = omap_mux_read(partition,
m->reg_offset); m->reg_offset);
mux_mode = val | i; mux_mode = val | i;
pr_debug("mux: Setting signal " pr_debug("%s: Setting signal "
"%s.%s 0x%04x -> 0x%04x\n", "%s.%s 0x%04x -> 0x%04x\n", __func__,
m0_entry, muxname, old_mode, mux_mode); m0_entry, muxname, old_mode, mux_mode);
omap_mux_write(partition, mux_mode, omap_mux_write(partition, mux_mode,
m->reg_offset); m->reg_offset);
...@@ -204,12 +204,12 @@ static int __init _omap_mux_init_signal(struct omap_mux_partition *partition, ...@@ -204,12 +204,12 @@ static int __init _omap_mux_init_signal(struct omap_mux_partition *partition,
return 0; return 0;
if (found > 1) { if (found > 1) {
pr_err("mux: Multiple signal paths (%i) for %s\n", pr_err("%s: Multiple signal paths (%i) for %s\n", __func__,
found, muxname); found, muxname);
return -EINVAL; return -EINVAL;
} }
pr_err("mux: Could not set signal %s\n", muxname); pr_err("%s: Could not set signal %s\n", __func__, muxname);
return -ENODEV; return -ENODEV;
} }
...@@ -561,7 +561,7 @@ static void __init omap_mux_package_fixup(struct omap_mux *p, ...@@ -561,7 +561,7 @@ static void __init omap_mux_package_fixup(struct omap_mux *p,
s++; s++;
} }
if (!found) if (!found)
pr_err("mux: Unknown entry offset 0x%x\n", pr_err("%s: Unknown entry offset 0x%x\n", __func__,
p->reg_offset); p->reg_offset);
p++; p++;
} }
...@@ -586,7 +586,7 @@ static void __init omap_mux_package_init_balls(struct omap_ball *b, ...@@ -586,7 +586,7 @@ static void __init omap_mux_package_init_balls(struct omap_ball *b,
s++; s++;
} }
if (!found) if (!found)
pr_err("mux: Unknown ball offset 0x%x\n", pr_err("%s: Unknown ball offset 0x%x\n", __func__,
b->reg_offset); b->reg_offset);
b++; b++;
} }
...@@ -722,7 +722,7 @@ u16 omap_mux_get_gpio(int gpio) ...@@ -722,7 +722,7 @@ u16 omap_mux_get_gpio(int gpio)
} }
if (!m || m->reg_offset == OMAP_MUX_TERMINATOR) if (!m || m->reg_offset == OMAP_MUX_TERMINATOR)
pr_err("mux: Could not get gpio%i\n", gpio); pr_err("%s: Could not get gpio%i\n", __func__, gpio);
return OMAP_MUX_TERMINATOR; return OMAP_MUX_TERMINATOR;
} }
...@@ -742,7 +742,7 @@ void omap_mux_set_gpio(u16 val, int gpio) ...@@ -742,7 +742,7 @@ void omap_mux_set_gpio(u16 val, int gpio)
} }
if (!m || m->reg_offset == OMAP_MUX_TERMINATOR) if (!m || m->reg_offset == OMAP_MUX_TERMINATOR)
pr_err("mux: Could not set gpio%i\n", gpio); pr_err("%s: Could not set gpio%i\n", __func__, gpio);
} }
static struct omap_mux * __init omap_mux_list_add( static struct omap_mux * __init omap_mux_list_add(
...@@ -800,7 +800,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition, ...@@ -800,7 +800,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition,
entry = omap_mux_list_add(partition, superset); entry = omap_mux_list_add(partition, superset);
if (!entry) { if (!entry) {
pr_err("mux: Could not add entry\n"); pr_err("%s: Could not add entry\n", __func__);
return; return;
} }
superset++; superset++;
...@@ -862,8 +862,8 @@ int __init omap_mux_init(const char *name, u32 flags, ...@@ -862,8 +862,8 @@ int __init omap_mux_init(const char *name, u32 flags,
partition->phys = mux_pbase; partition->phys = mux_pbase;
partition->base = ioremap(mux_pbase, mux_size); partition->base = ioremap(mux_pbase, mux_size);
if (!partition->base) { if (!partition->base) {
pr_err("mux: Could not ioremap mux partition at 0x%08x\n", pr_err("%s: Could not ioremap mux partition at 0x%08x\n",
partition->phys); __func__, partition->phys);
return -ENODEV; return -ENODEV;
} }
...@@ -871,7 +871,7 @@ int __init omap_mux_init(const char *name, u32 flags, ...@@ -871,7 +871,7 @@ int __init omap_mux_init(const char *name, u32 flags,
list_add_tail(&partition->node, &mux_partitions); list_add_tail(&partition->node, &mux_partitions);
mux_partitions_cnt++; mux_partitions_cnt++;
pr_info("MUX: Add partition: #%d: %s, flags: %x\n", pr_info("%s: Add partition: #%d: %s, flags: %x\n", __func__,
mux_partitions_cnt, partition->name, partition->flags); mux_partitions_cnt, partition->name, partition->flags);
omap_mux_init_package(superset, package_subset, package_balls); omap_mux_init_package(superset, package_subset, package_balls);
......
...@@ -678,7 +678,8 @@ int __init omap2420_mux_init(struct omap_board_mux *board_subset, int flags) ...@@ -678,7 +678,8 @@ int __init omap2420_mux_init(struct omap_board_mux *board_subset, int flags)
case OMAP_PACKAGE_ZAF: case OMAP_PACKAGE_ZAF:
/* REVISIT: Please add data */ /* REVISIT: Please add data */
default: default:
pr_warning("mux: No ball data available for omap2420 package\n"); pr_warning("%s: No ball data available for omap2420 package\n",
__func__);
} }
return omap_mux_init("core", OMAP_MUX_REG_8BIT | OMAP_MUX_GPIO_IN_MODE3, return omap_mux_init("core", OMAP_MUX_REG_8BIT | OMAP_MUX_GPIO_IN_MODE3,
......
...@@ -781,7 +781,8 @@ int __init omap2430_mux_init(struct omap_board_mux *board_subset, int flags) ...@@ -781,7 +781,8 @@ int __init omap2430_mux_init(struct omap_board_mux *board_subset, int flags)
package_balls = omap2430_pop_ball; package_balls = omap2430_pop_ball;
break; break;
default: default:
pr_warning("mux: No ball data available for omap2420 package\n"); pr_warning("%s: No ball data available for omap2420 package\n",
__func__);
} }
return omap_mux_init("core", OMAP_MUX_REG_8BIT | OMAP_MUX_GPIO_IN_MODE3, return omap_mux_init("core", OMAP_MUX_REG_8BIT | OMAP_MUX_GPIO_IN_MODE3,
......
...@@ -2049,7 +2049,7 @@ int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags) ...@@ -2049,7 +2049,7 @@ int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags)
package_balls = omap36xx_cbp_ball; package_balls = omap36xx_cbp_ball;
break; break;
default: default:
printk(KERN_ERR "mux: Unknown omap package, mux disabled\n"); pr_err("%s Unknown omap package, mux disabled\n", __func__);
return -EINVAL; return -EINVAL;
} }
......
...@@ -1590,17 +1590,17 @@ int __init omap4_mux_init(struct omap_board_mux *board_subset, int flags) ...@@ -1590,17 +1590,17 @@ int __init omap4_mux_init(struct omap_board_mux *board_subset, int flags)
switch (flags & OMAP_PACKAGE_MASK) { switch (flags & OMAP_PACKAGE_MASK) {
case OMAP_PACKAGE_CBL: case OMAP_PACKAGE_CBL:
pr_debug("mux: OMAP4430 ES1.0 -> OMAP_PACKAGE_CBL\n"); pr_debug("%s: OMAP4430 ES1.0 -> OMAP_PACKAGE_CBL\n", __func__);
package_balls_core = omap4_core_cbl_ball; package_balls_core = omap4_core_cbl_ball;
core_muxmodes = omap4_core_muxmodes; core_muxmodes = omap4_core_muxmodes;
break; break;
case OMAP_PACKAGE_CBS: case OMAP_PACKAGE_CBS:
pr_debug("mux: OMAP4430 ES2.X -> OMAP_PACKAGE_CBS\n"); pr_debug("%s: OMAP4430 ES2.X -> OMAP_PACKAGE_CBS\n", __func__);
package_balls_core = omap4_core_cbs_ball; package_balls_core = omap4_core_cbs_ball;
core_muxmodes = omap4_es2_core_muxmodes; core_muxmodes = omap4_es2_core_muxmodes;
break; break;
default: default:
pr_err("mux: Unknown omap package, mux disabled\n"); pr_err("%s: Unknown omap package, mux disabled\n", __func__);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment