OMAP4: mux: Add the OMAP4430 ES1.0 & ES2.x support
Subsystems (3)
v2 cover OMAP4: mux: Add the OMAP4430 ES1.0 & ES2.x support
Hi Tony,
Here is the version updated with your latest fixes and improvements after a small clean to fix a checkpatch issue.
I added as well a patch from Dan to add __func__ in every pr__xxx calls.
The series is based on mainline (2.6.37-rc1) and is available here:git://gitorious.org/omap-pm/linux.git ctrl-wip/mux-omap4-v4
Tested on SDP4430 ES1.0, ES2.0 and ES2.1 with omap2plus_defconfig. It still requires some test on OMAP3 and OMAP2.
Thanks,
Benoit
PATCH v1
http://www.spinics.net/lists/linux-omap/msg40039.html
- Add a patch from Tony to remove the partition information used only for debugfs purpose. A look up is done when needed in order to save some memory.
- Add a patch from Dan, to add __func__ information during pr_xxx calls.
- Add patch from Tony to fix a crash reported by
Anand Gadiyar <[email protected]> on zoom3
https://patchwork.kernel.org/patch/325622/
RFC v2:
http://www.spinics.net/lists/linux-omap/msg38995.html
- Take into account Tony's proposal to store partition information in a partition structure instead of inside every pad entries.
- Remove some cpu_is_xxx calls from the core code by adding a couple of flags during partition init.
RFC v1:
http://www.spinics.net/lists/linux-omap/msg37158.html
Benoit Cousson (6):
OMAP: mux: Replace printk with pr_xxx macros
OMAP: mux: Add support for control module split in several partitions
OMAP4: mux: Add CBL package data for OMAP4430 ES1
OMAP4: sdp4430: Select CBL package for ES1 and initialize mux
OMAP4: mux: Add CBS package data for OMAP4430 ES2
OMAP4: sdp4430: Select CBS package for ES2
Dan Murphy (1):
OMAP: mux: Add __func__ macro to pr_xxx macros
sricharan (1):
OMAP4: pandaboard: Select CBL & CBS package and initialize mux
arch/arm/mach-omap2/Kconfig | 10 + arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/board-4430sdp.c | 14 + arch/arm/mach-omap2/board-omap4panda.c | 16 + arch/arm/mach-omap2/board-rx51-peripherals.c | 12 +- arch/arm/mach-omap2/mux.c | 369 ++++-- arch/arm/mach-omap2/mux.h | 83 ++- arch/arm/mach-omap2/mux2420.c | 10 +- arch/arm/mach-omap2/mux2430.c | 10 +- arch/arm/mach-omap2/mux34xx.c | 9 +- arch/arm/mach-omap2/mux44xx.c | 1625 ++++++++++++++++++++++++++ arch/arm/mach-omap2/mux44xx.h | 298 +++++ 12 files changed, 2310 insertions(+), 147 deletions(-) create mode 100644 arch/arm/mach-omap2/mux44xx.c create mode 100644 arch/arm/mach-omap2/mux44xx.h
PATCH v2 1/8 OMAP: mux: Replace printk with pr_xxx macros
Replace all the printk(KERN_XXX... with pr_xxx macros.
--- arch/arm/mach-omap2/mux.c | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-)
arch/arm/mach-omap2/mux.c +19 -19
@@ -102,13 +102,13 @@ int __init omap_mux_init_gpio(int gpio, int val) }if (found ==0 ) { -printk (KERN_ERR "mux: Could not set gpio%i\n" , gpio); +pr_err ("mux: Could not set gpio%i\n" , gpio);return -ENODEV ; }if (found >1 ) { -printk (KERN_INFO "mux: Multiple gpio paths (%d) for gpio%i\n" , - found, gpio); +pr_info ("mux: Multiple gpio paths (%d) for gpio%i\n" , + found, gpio);return -EINVAL ; }
@@ -118,8 +118,8 @@ int __init omap_mux_init_gpio(int gpio, int val) mux_mode |=OMAP_MUX_MODE3 ; else mux_mode |= OMAP_MUX_MODE4; -printk (KERN_DEBUG "mux: Setting signal %s.gpio%i 0x%04x -> 0x%04x\n" , - gpio_mux->muxnames[0 ], gpio, old_mode, mux_mode); +pr_debug ("mux: Setting signal %s.gpio%i 0x%04x -> 0x%04x\n" , + gpio_mux->muxnames[0 ], gpio, old_mode, mux_mode);omap_mux_write (mux_mode, gpio_mux->reg_offset);return 0 ;
@@ -161,9 +161,9 @@ int __init omap_mux_init_signal(const char *muxname, int val) old_mode =omap_mux_read (m->reg_offset); mux_mode = val | i; -printk (KERN_DEBUG "mux: Setting signal " -"%s.%s 0x%04x -> 0x%04x\n" , - m0_entry, muxname, old_mode, mux_mode); +pr_debug ("mux: Setting signal " +"%s.%s 0x%04x -> 0x%04x\n" , + m0_entry, muxname, old_mode, mux_mode);omap_mux_write (mux_mode, m->reg_offset); found++; }
@@ -174,12 +174,12 @@ int __init omap_mux_init_signal(const char *muxname, int val)return 0 ;if (found >1 ) { -printk (KERN_ERR "mux: Multiple signal paths (%i) for %s\n" , - found, muxname); +pr_err ("mux: Multiple signal paths (%i) for %s\n" , + found, muxname);return -EINVAL ; } -printk (KERN_ERR "mux: Could not set signal %s\n" , muxname); +pr_err ("mux: Could not set signal %s\n" , muxname);return -ENODEV ; }
@@ -462,8 +462,8 @@ static void __init omap_mux_package_fixup(struct omap_mux *p, s++; }if (!found) -printk (KERN_ERR "mux: Unknown entry offset 0x%x\n" , - p->reg_offset); +pr_err ("mux: Unknown entry offset 0x%x\n" , + p->reg_offset); p++; } }
@@ -487,8 +487,8 @@ static void __init omap_mux_package_init_balls(struct omap_ball *b, s++; }if (!found) -printk (KERN_ERR "mux: Unknown ball offset 0x%x\n" , - b->reg_offset); +pr_err ("mux: Unknown ball offset 0x%x\n" , + b->reg_offset); b++; } }
@@ -615,7 +615,7 @@ u16 omap_mux_get_gpio(int gpio) offset =omap_mux_get_by_gpio (gpio);if (offset ==OMAP_MUX_TERMINATOR ) { -printk (KERN_ERR "mux: Could not get gpio%i\n" , gpio); +pr_err ("mux: Could not get gpio%i\n" , gpio);return offset; }
@@ -629,7 +629,7 @@ void omap_mux_set_gpio(u16 val, int gpio) offset =omap_mux_get_by_gpio (gpio);if (offset ==OMAP_MUX_TERMINATOR ) { -printk (KERN_ERR "mux: Could not set gpio%i\n" , gpio); +pr_err ("mux: Could not set gpio%i\n" , gpio);return ; }
@@ -687,7 +687,7 @@ static void __init omap_mux_init_list(struct omap_mux *superset) entry =omap_mux_list_add (superset);if (!entry) { -printk (KERN_ERR "mux: Could not add entry\n" ); +pr_err ("mux: Could not add entry\n" );return ; } superset++;
@@ -738,7 +738,7 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, mux_phys = mux_pbase; mux_base =ioremap (mux_pbase, mux_size);if (!mux_base) { -printk (KERN_ERR "mux: Could not ioremap\n" ); +pr_err ("mux: Could not ioremap\n" );return -ENODEV ; }
Signature · 1 line
1.7.0.4
PATCH v2 2/8 OMAP: mux: Add support for control module split in several partitions
In reply to Benoit CoussonStarting on OMAP4, the pin mux configuration is located in two different partitions of the control module (CODE_PAD and WKUP_PAD). The first one is inside the core power domain whereas the second one is inside the wakeup.
- Add the capability to add any number of partition during board init time depending of Soc partitioning.
- Add some init flags as well in order to avoid explicit Soc version check inside the mux core code.
- Add a comment with mux0 mode on top of omap_mux/board/<partition> if the current mux mode is not the default one.
Thanks to Tony Lindgren <[email protected]> for the following improvements:
- Add omap_mux_get for getting the partition data so platform level device code can use it.
- Fix the rx51 board code to use the new API.
- Do not store the partition for each mux entry. Look up the partition for debugfs instead.
Thanks to Dan Murphy <[email protected]> for testing on OMAP4 and reporting a couple of bugs.
Thanks to Anand Gadiyar <[email protected]> for testing on OMAP3 zoom and bug report.
--- arch/arm/mach-omap2/board-rx51-peripherals.c | 12 +- arch/arm/mach-omap2/mux.c | 337 ++++++++++++++++++-------- arch/arm/mach-omap2/mux.h | 70 +++++- arch/arm/mach-omap2/mux2420.c | 7 +- arch/arm/mach-omap2/mux2430.c | 7 +- arch/arm/mach-omap2/mux34xx.c | 7 +- 6 files changed, 312 insertions(+), 128 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +9 -3
@@ -293,6 +293,8 @@ static struct omap_board_mux rx51_mmc2_off_mux[] = { { .reg_offset = OMAP_MUX_TERMINATOR }, }; +static struct omap_mux_partition *partition; +/* * Current flows to eMMC when eMMC is off and the data lines are pulled up, * so pull them down. N.B. we pull 8 lines because we are using 8 lines.
@@ -300,9 +302,9 @@ static struct omap_board_mux rx51_mmc2_off_mux[] = {static void rx51_mmc2_remux (struct device *dev,int slot,int power_on) {if (power_on) -omap_mux_write_array (rx51_mmc2_on_mux); +omap_mux_write_array (partition, rx51_mmc2_on_mux);else -omap_mux_write_array (rx51_mmc2_off_mux); +omap_mux_write_array (partition, rx51_mmc2_off_mux); }static struct omap2_hsmmc_info mmc[]__initdata = {
@@ -922,7 +924,11 @@ void __init rx51_peripherals_init(void)rx51_init_wl1251 ();spi_register_board_info (rx51_peripherals_spi_board_info,ARRAY_SIZE (rx51_peripherals_spi_board_info)); -omap2_hsmmc_init (mmc); + + partition =omap_mux_get ("core" ); +if (partition) +omap2_hsmmc_init (mmc); +platform_device_register (&rx51_charger_device); }
arch/arm/mach-omap2/mux.c +233 -104
596 lines not on this page · raw message
arch/arm/mach-omap2/mux.h +58 -12
121 lines not on this page · raw message
arch/arm/mach-omap2/mux2420.c +4 -3
@@ -681,8 +681,9 @@ int __init omap2420_mux_init(struct omap_board_mux *board_subset, int flags)pr_warning ("mux: No ball data available for omap2420 package\n" ); } -return omap_mux_init (OMAP2420_CONTROL_PADCONF_MUX_PBASE , +return omap_mux_init ("core" ,OMAP_MUX_REG_8BIT |OMAP_MUX_GPIO_IN_MODE3 , +OMAP2420_CONTROL_PADCONF_MUX_PBASE ,OMAP2420_CONTROL_PADCONF_MUX_SIZE , - omap2420_muxmodes,NULL , board_subset, - package_balls); + omap2420_muxmodes,NULL , board_subset, + package_balls); }
arch/arm/mach-omap2/mux2430.c +4 -3
@@ -784,8 +784,9 @@ int __init omap2430_mux_init(struct omap_board_mux *board_subset, int flags)pr_warning ("mux: No ball data available for omap2420 package\n" ); } -return omap_mux_init (OMAP2430_CONTROL_PADCONF_MUX_PBASE , +return omap_mux_init ("core" ,OMAP_MUX_REG_8BIT |OMAP_MUX_GPIO_IN_MODE3 , +OMAP2430_CONTROL_PADCONF_MUX_PBASE ,OMAP2430_CONTROL_PADCONF_MUX_SIZE , - omap2430_muxmodes,NULL , board_subset, - package_balls); + omap2430_muxmodes,NULL , board_subset, + package_balls); }
arch/arm/mach-omap2/mux34xx.c +4 -3
@@ -2053,8 +2053,9 @@ int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags)return -EINVAL ; } -return omap_mux_init (OMAP3_CONTROL_PADCONF_MUX_PBASE , +return omap_mux_init ("core" ,0 , +OMAP3_CONTROL_PADCONF_MUX_PBASE ,OMAP3_CONTROL_PADCONF_MUX_SIZE , - omap3_muxmodes, package_subset, board_subset, - package_balls); + omap3_muxmodes, package_subset, board_subset, + package_balls); }
Signature · 1 line
1.7.0.4
PATCH v2 3/8 OMAP4: mux: Add CBL package data for OMAP4430 ES1
In reply to Benoit CoussonAdd data for OMAP4430 generated from HW pinout & register database. The data set is split in two partitions for both core and wkup.
--- arch/arm/mach-omap2/Kconfig | 3 + arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/mux.h | 12 + arch/arm/mach-omap2/mux44xx.c | 900 +++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/mux44xx.h | 277 +++++++++++++ 5 files changed, 1193 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/mux44xx.c create mode 100644 arch/arm/mach-omap2/mux44xx.h
arch/arm/mach-omap2/Kconfig +3 -0
@@ -85,6 +85,9 @@ config OMAP_PACKAGE_CUS config OMAP_PACKAGE_CBP bool +config OMAP_PACKAGE_CBL + bool + comment "OMAP Board Type" depends on ARCH_OMAP2PLUS
arch/arm/mach-omap2/Makefile +1 -0
@@ -42,6 +42,7 @@ AFLAGS_sram34xx.o :=-Wa,-march=armv7-a obj-$(CONFIG_ARCH_OMAP2420) += mux2420.o obj-$(CONFIG_ARCH_OMAP2430) += mux2430.o obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o +obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o # SMS/SDRC obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
arch/arm/mach-omap2/mux.h +12 -0
@@ -10,6 +10,7 @@#include "mux2420.h" #include "mux2430.h" #include "mux34xx.h" +#include "mux44xx.h" #define OMAP_MUX_TERMINATOR 0xffff
@@ -37,6 +38,9 @@#define OMAP_OFF_PULL_UP (1 << 13)#define OMAP_WAKEUP_EN (1 << 14) +/* 44xx specific mux bit defines */ +#define OMAP_WAKEUP_EVENT (1 << 15) +/* Active pin states */ #define OMAP_PIN_OUTPUT 0#define OMAP_PIN_INPUT OMAP_INPUT_EN
@@ -58,6 +62,7 @@/* Flags for omapX_mux_init */ #define OMAP_PACKAGE_MASK 0xffff +#define OMAP_PACKAGE_CBL 7/* 547-pin 0.40 0.40 */ #define OMAP_PACKAGE_CBP 6/* 515-pin 0.40 0.50 */ #define OMAP_PACKAGE_CUS 5/* 423-pin 0.65 */ #define OMAP_PACKAGE_CBB 4/* 515-pin 0.40 0.50 */
@@ -240,6 +245,13 @@ int omap2430_mux_init(struct omap_board_mux *board_mux, int flags);int omap3_mux_init (struct omap_board_mux *board_mux,int flags);/** +* omap4_mux_init() - initialize mux system with board specific set +* @board_mux: Board specific mux table +* @flags: OMAP package type used for the board +*/ +int omap4_mux_init (struct omap_board_mux *board_mux,int flags); + +/** * omap_mux_init - private mux init function, do not call */ int omap_mux_init(const char *name, u32 flags,
arch/arm/mach-omap2/mux44xx.c new file +900 -0
900 lines not on this page · raw message
arch/arm/mach-omap2/mux44xx.h new file +277 -0
277 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v2 4/8 OMAP4: sdp4430: Select CBL package for ES1 and initialize mux
In reply to Benoit CoussonSelect the CBL package if SDP4430 is enabled during config. Initialize the mux framework during the board init.
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/board-4430sdp.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -280,6 +280,7 @@ config MACH_OMAP_4430SDP bool "OMAP 4430 SDP board" default y depends on ARCH_OMAP4 + select OMAP_PACKAGE_CBL config MACH_OMAP4_PANDA bool "OMAP4 Panda Board"
arch/arm/mach-omap2/board-4430sdp.c +10 -0
@@ -35,6 +35,7 @@#include <plat/usb.h> #include <plat/mmc.h> +#include "mux.h" #include "hsmmc.h" #include "timer-gp.h" #include "control.h"
@@ -505,10 +506,19 @@ static void __init omap_sfh7741prox_init(void) } } +#ifdef CONFIG_OMAP_MUX +static struct omap_board_mux board_mux[]__initdata = { + { .reg_offset =OMAP_MUX_TERMINATOR }, +}; +#else +#define board_mux NULL +#endif +static void __init omap_4430sdp_init (void ) {int status; +omap4_mux_init (board_mux,OMAP_PACKAGE_CBL );omap4_i2c_init ();omap_sfh7741prox_init ();platform_add_devices (sdp4430_devices,ARRAY_SIZE (sdp4430_devices));
Signature · 1 line
1.7.0.4
PATCH v2 5/8 OMAP4: mux: Add CBS package data for OMAP4430 ES2
In reply to Benoit CoussonPlease note that the full muxmodes are re-defined for ES2 instead of using the subset. There are 81 differences among 204 pins. The subset fixup will have to iterate over the whole list for each subset entry, which can lead to an important number of iteration. On the other hand, it will take much more memory at boot time.
--- arch/arm/mach-omap2/Kconfig | 3 + arch/arm/mach-omap2/mux.h | 1 + arch/arm/mach-omap2/mux44xx.c | 741 ++++++++++++++++++++++++++++++++++++++++- arch/arm/mach-omap2/mux44xx.h | 21 ++ 4 files changed, 758 insertions(+), 8 deletions(-)
arch/arm/mach-omap2/Kconfig +3 -0
@@ -88,6 +88,9 @@ config OMAP_PACKAGE_CBP config OMAP_PACKAGE_CBL bool +config OMAP_PACKAGE_CBS + bool + comment "OMAP Board Type" depends on ARCH_OMAP2PLUS
arch/arm/mach-omap2/mux.h +1 -0
@@ -62,6 +62,7 @@/* Flags for omapX_mux_init */ #define OMAP_PACKAGE_MASK 0xffff +#define OMAP_PACKAGE_CBS 8/* 547-pin 0.40 0.40 */ #define OMAP_PACKAGE_CBL 7/* 547-pin 0.40 0.40 */ #define OMAP_PACKAGE_CBP 6/* 515-pin 0.40 0.50 */ #define OMAP_PACKAGE_CUS 5/* 423-pin 0.65 */
arch/arm/mach-omap2/mux44xx.c +733 -8
785 lines not on this page · raw message
arch/arm/mach-omap2/mux44xx.h +21 -0
@@ -233,6 +233,27 @@#define OMAP4_CTRL_MODULE_PAD_DPM_EMU18_OFFSET 0x01d2#define OMAP4_CTRL_MODULE_PAD_DPM_EMU19_OFFSET 0x01d4 +/* ES2.0 only */ +#define OMAP4_CTRL_MODULE_PAD_GPMC_WAIT2_OFFSET 0x008e +#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS4_OFFSET 0x0090 +#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS5_OFFSET 0x0092 +#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS6_OFFSET 0x0094 +#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS7_OFFSET 0x0096 + +#define OMAP4_CTRL_MODULE_PAD_KPD_COL3_OFFSET 0x017c +#define OMAP4_CTRL_MODULE_PAD_KPD_COL4_OFFSET 0x017e +#define OMAP4_CTRL_MODULE_PAD_KPD_COL5_OFFSET 0x0180 +#define OMAP4_CTRL_MODULE_PAD_KPD_COL0_OFFSET 0x0182 +#define OMAP4_CTRL_MODULE_PAD_KPD_COL1_OFFSET 0x0184 +#define OMAP4_CTRL_MODULE_PAD_KPD_COL2_OFFSET 0x0186 +#define OMAP4_CTRL_MODULE_PAD_KPD_ROW3_OFFSET 0x0188 +#define OMAP4_CTRL_MODULE_PAD_KPD_ROW4_OFFSET 0x018a +#define OMAP4_CTRL_MODULE_PAD_KPD_ROW5_OFFSET 0x018c +#define OMAP4_CTRL_MODULE_PAD_KPD_ROW0_OFFSET 0x018e +#define OMAP4_CTRL_MODULE_PAD_KPD_ROW1_OFFSET 0x0190 +#define OMAP4_CTRL_MODULE_PAD_KPD_ROW2_OFFSET 0x0192 + +#define OMAP4_CTRL_MODULE_PAD_CORE_MUX_SIZE \ (OMAP4_CTRL_MODULE_PAD_DPM_EMU19_OFFSET \ - OMAP4_CTRL_MODULE_PAD_GPMC_AD0_OFFSET + 2)
Signature · 1 line
1.7.0.4
PATCH v2 6/8 OMAP4: sdp4430: Select CBS package for ES2
In reply to Benoit CoussonSelect the CBS package if SDP4430 is enabled during config. Use the proper package (CBL or CBS) based on chip revision.
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/board-4430sdp.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -284,6 +284,7 @@ config MACH_OMAP_4430SDP default y depends on ARCH_OMAP4 select OMAP_PACKAGE_CBL + select OMAP_PACKAGE_CBS config MACH_OMAP4_PANDA bool "OMAP4 Panda Board"
arch/arm/mach-omap2/board-4430sdp.c +5 -1
@@ -517,8 +517,12 @@ static struct omap_board_mux board_mux[] __initdata = {static void __init omap_4430sdp_init (void ) {int status; +int package =OMAP_PACKAGE_CBS ; + +if (omap_rev () ==OMAP4430_REV_ES1_0 ) + package =OMAP_PACKAGE_CBL ; +omap4_mux_init (board_mux, package); -omap4_mux_init (board_mux,OMAP_PACKAGE_CBL );omap4_i2c_init ();omap_sfh7741prox_init ();platform_add_devices (sdp4430_devices,ARRAY_SIZE (sdp4430_devices));
Signature · 1 line
1.7.0.4
PATCH v2 7/8 OMAP4: pandaboard: Select CBL & CBS package and initialize mux
In reply to Benoit CoussonFrom: sricharan <[email protected]>
The mux framework allows the change of pad configuration by drivers when needed. Prior to this the mux framework has to be initialised with all the mux parameters specific to the board. The mux init is already present in the board file for SDP. Adding the mux init for panda boards.
--- arch/arm/mach-omap2/Kconfig | 2 ++ arch/arm/mach-omap2/board-omap4panda.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +2 -0
@@ -290,6 +290,8 @@ config MACH_OMAP4_PANDA bool "OMAP4 Panda Board" default y depends on ARCH_OMAP4 + select OMAP_PACKAGE_CBL + select OMAP_PACKAGE_CBS config OMAP3_EMU bool "OMAP3 debugging peripherals"
arch/arm/mach-omap2/board-omap4panda.c +16 -0
@@ -40,6 +40,7 @@#include "hsmmc.h" #include "control.h" +#include "mux.h" #define GPIO_HUB_POWER 1#define GPIO_HUB_NRESET 62
@@ -368,8 +369,23 @@ static int __init omap4_panda_i2c_init(void)omap_register_i2c_bus (4 ,400 ,NULL ,0 );return 0 ; } + +#ifdef CONFIG_OMAP_MUX +static struct omap_board_mux board_mux[]__initdata = { + { .reg_offset =OMAP_MUX_TERMINATOR }, +}; +#else +#define board_mux NULL +#endif +static void __init omap4_panda_init (void ) { +int package =OMAP_PACKAGE_CBS ; + +if (omap_rev () ==OMAP4430_REV_ES1_0 ) + package =OMAP_PACKAGE_CBL ; +omap4_mux_init (board_mux, package); +omap4_panda_i2c_init ();platform_add_devices (panda_devices,ARRAY_SIZE (panda_devices));omap_serial_init ();
Signature · 1 line
1.7.0.4
PATCH v2 8/8 OMAP: mux: Add __func__ macro to pr_xxx macros
In reply to Benoit CoussonFrom: Dan Murphy <[email protected]>
Removed mux: and added the __func__ macro to make debugging easier.
--- arch/arm/mach-omap2/mux.c | 30 +++++++++++++++--------------- arch/arm/mach-omap2/mux2420.c | 3 ++- arch/arm/mach-omap2/mux2430.c | 3 ++- arch/arm/mach-omap2/mux34xx.c | 2 +- arch/arm/mach-omap2/mux44xx.c | 6 +++--- 5 files changed, 23 insertions(+), 21 deletions(-)
arch/arm/mach-omap2/mux.c +15 -15
@@ -114,12 +114,12 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, }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 ; }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);return -EINVAL ; }
@@ -130,7 +130,7 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, mux_mode |=OMAP_MUX_MODE3 ; else 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);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, old_mode =omap_mux_read (partition, m->reg_offset); mux_mode = val | i; -pr_debug ("mux: Setting signal " -"%s.%s 0x%04x -> 0x%04x\n" , +pr_debug ("%s: Setting signal " +"%s.%s 0x%04x -> 0x%04x\n" , __func__, m0_entry, muxname, old_mode, mux_mode);omap_mux_write (partition, mux_mode, m->reg_offset);
@@ -204,12 +204,12 @@ static int __init _omap_mux_init_signal(struct omap_mux_partition *partition,return 0 ;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);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 ; }
@@ -561,7 +561,7 @@ static void __init omap_mux_package_fixup(struct omap_mux *p, s++; }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++; }
@@ -586,7 +586,7 @@ static void __init omap_mux_package_init_balls(struct omap_ball *b, s++; }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++; }
@@ -722,7 +722,7 @@ u16 omap_mux_get_gpio(int gpio) }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 ; }
@@ -742,7 +742,7 @@ void omap_mux_set_gpio(u16 val, int gpio) }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(
@@ -800,7 +800,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition, entry =omap_mux_list_add (partition, superset);if (!entry) { -pr_err ("mux: Could not add entry\n" ); +pr_err ("%s: Could not add entry\n" , __func__);return ; } superset++;
@@ -862,8 +862,8 @@ int __init omap_mux_init(const char *name, u32 flags, partition->phys = mux_pbase; partition->base =ioremap (mux_pbase, mux_size);if (!partition->base) { -pr_err ("mux: Could not ioremap mux partition at 0x%08x\n" , - partition->phys); +pr_err ("%s: Could not ioremap mux partition at 0x%08x\n" , + __func__, partition->phys);return -ENODEV ; }
@@ -871,7 +871,7 @@ int __init omap_mux_init(const char *name, u32 flags,list_add_tail (&partition->node, &mux_partitions); 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);omap_mux_init_package (superset, package_subset, package_balls);
arch/arm/mach-omap2/mux2420.c +2 -1
@@ -678,7 +678,8 @@ int __init omap2420_mux_init(struct omap_board_mux *board_subset, int flags)case OMAP_PACKAGE_ZAF :/* REVISIT: Please add data */ 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,
arch/arm/mach-omap2/mux2430.c +2 -1
@@ -781,7 +781,8 @@ int __init omap2430_mux_init(struct omap_board_mux *board_subset, int flags) package_balls = omap2430_pop_ball;break ;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,
arch/arm/mach-omap2/mux34xx.c +1 -1
@@ -2049,7 +2049,7 @@ int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags) package_balls = omap36xx_cbp_ball;break ;default : -printk (KERN_ERR "mux: Unknown omap package, mux disabled\n" ); +pr_err ("%s Unknown omap package, mux disabled\n" , __func__);return -EINVAL ; }
arch/arm/mach-omap2/mux44xx.c +3 -3
@@ -1590,17 +1590,17 @@ int __init omap4_mux_init(struct omap_board_mux *board_subset, int flags)switch (flags &OMAP_PACKAGE_MASK ) {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; core_muxmodes = omap4_core_muxmodes;break ;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; core_muxmodes = omap4_es2_core_muxmodes;break ;default : -pr_err ("mux: Unknown omap package, mux disabled\n" ); +pr_err ("%s: Unknown omap package, mux disabled\n" , __func__);return -EINVAL ; }
Signature · 1 line
1.7.0.4