omap mux updates for 2.6.36 merge window
Subsystems (9)
Tony Lindgren
maintainercover omap mux updates for 2.6.36 merge window
Hi all,
This series converts the remaining mach-omap2 code to use the new mux framework that's already in use for omap3. After this series we still need to add the mux data for omap4.
Regards,
Tony
---
Tony Lindgren (16):
omap: mux: Fix omap_mux_init_gpio for omap24xx
omap: mux: Renumber package defines to make room for older 24xx packages
omap: mux: Allow compiling in new mux code on all mach-omap2 systems
omap: mux: Remove unncessary parens from mux34xx.c
omap: mux: Add data for 2420
omap: mux: Add data for 2430
omap: mux: Select SIP package for H4
omap: mux: Select POP package for Apollon
omap: mux: Select POP package for N8X0
omap: mux: Select POP package for 2430SDP
omap: mux: Make omap2 FS USB code use new mux functions
omap: mux: Do keypad muxing in board-*.c files
omap: mux: Mux Apollon LCD power in board-apollon.c
omap: mux: Mux 2430 USB0HS_STP in board-2430.c
omap: mux: Convert 2420 platform init code to use new mux code
omap: mux: Remove old mux code
arch/arm/mach-omap1/board-fsample.c | 12 arch/arm/mach-omap1/board-h2.c | 13 arch/arm/mach-omap1/board-h3.c | 13 arch/arm/mach-omap1/board-perseus2.c | 12 arch/arm/mach-omap2/Kconfig | 10 arch/arm/mach-omap2/Makefile | 2 arch/arm/mach-omap2/board-2430sdp.c | 15 arch/arm/mach-omap2/board-3630sdp.c | 1 arch/arm/mach-omap2/board-apollon.c | 28 + arch/arm/mach-omap2/board-generic.c | 1 arch/arm/mach-omap2/board-h4.c | 36 + arch/arm/mach-omap2/board-n8x0.c | 11 arch/arm/mach-omap2/board-rx51-peripherals.c | 1 arch/arm/mach-omap2/board-rx51-video.c | 1 arch/arm/mach-omap2/devices.c | 25 - arch/arm/mach-omap2/i2c.c | 27 - arch/arm/mach-omap2/io.c | 2 arch/arm/mach-omap2/mcbsp.c | 13 arch/arm/mach-omap2/mux.c | 308 ---------- arch/arm/mach-omap2/mux.h | 28 + arch/arm/mach-omap2/mux2420.c | 688 +++++++++++++++++++++++ arch/arm/mach-omap2/mux2420.h | 282 +++++++++ arch/arm/mach-omap2/mux2430.c | 791 ++++++++++++++++++++++++++ arch/arm/mach-omap2/mux2430.h | 370 ++++++++++++ arch/arm/mach-omap2/mux34xx.c | 8 arch/arm/mach-omap2/pm24xx.c | 1 arch/arm/mach-omap2/usb-ehci.c | 1 arch/arm/mach-omap2/usb-fs.c | 33 + arch/arm/mach-omap2/usb-musb.c | 1 arch/arm/mach-omap2/usb-tusb6010.c | 14 arch/arm/plat-omap/devices.c | 61 -- arch/arm/plat-omap/include/plat/mux.h | 220 ------- arch/arm/plat-omap/mux.c | 2 drivers/usb/musb/omap2430.c | 4 drivers/video/omap/lcd_apollon.c | 3 35 files changed, 2359 insertions(+), 679 deletions(-) create mode 100644 arch/arm/mach-omap2/mux2420.c create mode 100644 arch/arm/mach-omap2/mux2420.h create mode 100644 arch/arm/mach-omap2/mux2430.c create mode 100644 arch/arm/mach-omap2/mux2430.h
Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/16 omap: mux: Fix omap_mux_init_gpio for omap24xx
Looks like 24xx uses mode3 instead of mode4 for muxable GPIO pins. This will be needed when 24xx mux code is converted to use the new mux functions.
--- arch/arm/mach-omap2/mux.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/mux.c +9 -1
@@ -43,6 +43,7 @@#define OMAP_MUX_BASE_OFFSET 0x30/* Offset from CTRL_BASE */ #define OMAP_MUX_BASE_SZ 0x5ca +#define MUXABLE_GPIO_MODE3 BIT(0)struct omap_mux_entry {struct omap_mux mux;
@@ -51,6 +52,7 @@ struct omap_mux_entry {static unsigned long mux_phys;static void __iomem *mux_base; +static u8 omap_mux_flags;u16 omap_mux_read (u16 reg) {
@@ -394,7 +396,10 @@ int __init omap_mux_init_gpio(int gpio, int val) old_mode =omap_mux_read (m->reg_offset); mux_mode = val & ~(OMAP_MUX_NR_MODES -1 ); - mux_mode |=OMAP_MUX_MODE4 ; +if (omap_mux_flags &MUXABLE_GPIO_MODE3 ) + 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" , m->muxnames[0 ], gpio, old_mode, mux_mode);
@@ -1032,6 +1037,9 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size,return -ENODEV ; } +if (cpu_is_omap24xx ()) + omap_mux_flags =MUXABLE_GPIO_MODE3 ; +omap_mux_init_package (superset, package_subset, package_balls);omap_mux_init_list (superset);omap_mux_init_signals (board_mux);
Tony Lindgren
maintainerPATCH 2/16 omap: mux: Renumber package defines to make room for older 24xx packages
In reply to Tony LindgrenOnly POP and SIP are known to exist for 2420, 2430 seems to only have SIP package available.
--- arch/arm/mach-omap2/mux.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/mux.h +6 -4
@@ -56,10 +56,12 @@/* Flags for omap_mux_init */ #define OMAP_PACKAGE_MASK 0xffff -#define OMAP_PACKAGE_CBP 4/* 515-pin 0.40 0.50 */ -#define OMAP_PACKAGE_CUS 3/* 423-pin 0.65 */ -#define OMAP_PACKAGE_CBB 2/* 515-pin 0.40 0.50 */ -#define OMAP_PACKAGE_CBC 1/* 515-pin 0.50 0.65 */ +#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 */ +#define OMAP_PACKAGE_CBC 3/* 515-pin 0.50 0.65 */ +#define OMAP_PACKAGE_ZAC 2/* 24xx 447-pin POP */ +#define OMAP_PACKAGE_ZAF 1/* 2420 447-pin SIP */ #define OMAP_MUX_NR_MODES 8/* Available modes */
Tony Lindgren
maintainerPATCH 3/16 omap: mux: Allow compiling in new mux code on all mach-omap2 systems
In reply to Tony LindgrenAllow compiling in new mux code on all mach-omap2 systems
--- arch/arm/mach-omap2/mux.c | 2 +- arch/arm/mach-omap2/mux.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/mux.c +1 -1
@@ -372,7 +372,7 @@ int __init omap2_mux_init(void)/*----------------------------------------------------------------------------*/ -#ifdef CONFIG_ARCH_OMAP3 +#ifdef CONFIG_ARCH_OMAP2PLUS static LIST_HEAD (muxmodes);static DEFINE_MUTEX (muxmode_mutex);
arch/arm/mach-omap2/mux.h +1 -1
@@ -104,7 +104,7 @@ struct omap_board_mux {u16 value; }; -#if defined(CONFIG_OMAP_MUX ) && defined(CONFIG_ARCH_OMAP3 ) +#if defined(CONFIG_OMAP_MUX )/** * omap_mux_init_gpio - initialize a signal based on the GPIO number
Tony Lindgren
maintainerPATCH 4/16 omap: mux: Remove unncessary parens from mux34xx.c
In reply to Tony LindgrenRemove unncessary parens from mux34xx.c
--- arch/arm/mach-omap2/mux34xx.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/mux34xx.c +4 -4
@@ -2032,19 +2032,19 @@ int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags)struct omap_ball *package_balls;switch (flags &OMAP_PACKAGE_MASK ) { -case (OMAP_PACKAGE_CBC ): +case OMAP_PACKAGE_CBC : package_subset = omap3_cbc_subset; package_balls = omap3_cbc_ball;break ; -case (OMAP_PACKAGE_CBB ): +case OMAP_PACKAGE_CBB : package_subset = omap3_cbb_subset; package_balls = omap3_cbb_ball;break ; -case (OMAP_PACKAGE_CUS ): +case OMAP_PACKAGE_CUS : package_subset = omap3_cus_subset; package_balls = omap3_cus_ball;break ; -case (OMAP_PACKAGE_CBP ): +case OMAP_PACKAGE_CBP : package_subset = omap36xx_cbp_subset; package_balls = omap36xx_cbp_ball;break ;
Tony Lindgren
maintainerPATCH 5/16 omap: mux: Add data for 2420
In reply to Tony LindgrenAdd data for 2420. Big thanks to Paul Walmsley <[email protected]> for generating usable mux data out of TRMs.
--- arch/arm/mach-omap2/Kconfig | 6 arch/arm/mach-omap2/Makefile | 1 arch/arm/mach-omap2/mux.h | 8 arch/arm/mach-omap2/mux2420.c | 688 +++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/mux2420.h | 282 +++++++++++++++++ 5 files changed, 985 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/mux2420.c create mode 100644 arch/arm/mach-omap2/mux2420.h
arch/arm/mach-omap2/Kconfig +6 -0
@@ -17,6 +17,12 @@ config ARCH_OMAP3430 depends on ARCH_OMAP3 select ARCH_OMAP_OTG +config OMAP_PACKAGE_ZAF + bool + +config OMAP_PACKAGE_ZAC + bool + config OMAP_PACKAGE_CBC bool
arch/arm/mach-omap2/Makefile +1 -0
@@ -36,6 +36,7 @@ AFLAGS_sram243x.o :=-Wa,-march=armv6 AFLAGS_sram34xx.o :=-Wa,-march=armv7-a # Pin multiplexing +obj-$(CONFIG_ARCH_OMAP2420) += mux2420.o obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o # SMS/SDRC
arch/arm/mach-omap2/mux.h +8 -0
@@ -7,6 +7,7 @@* published by the Free Software Foundation. */ +#include "mux2420.h" #include "mux34xx.h" #define OMAP_MUX_TERMINATOR 0xffff
@@ -173,6 +174,13 @@ void omap_mux_write(u16 val, u16 mux_offset);void omap_mux_write_array (struct omap_board_mux *board_mux);/** +* omap2420_mux_init() - initialize mux system with board specific set +* @board_mux: Board specific mux table +* @flags: OMAP package type used for the board +*/ +int omap2420_mux_init (struct omap_board_mux *board_mux,int flags); + +/** * omap3_mux_init() - initialize mux system with board specific set * @board_mux: Board specific mux table * @flags: OMAP package type used for the board
arch/arm/mach-omap2/mux2420.c new file +688 -0
688 lines not on this page · raw message
arch/arm/mach-omap2/mux2420.h new file +282 -0
282 lines not on this page · raw message
Tony Lindgren
maintainerPATCH 6/16 omap: mux: Add data for 2430
In reply to Tony LindgrenAdd data for 2430. Big thanks to Paul Walmsley <[email protected]> for generating usable mux data out of TRMs.
--- arch/arm/mach-omap2/Makefile | 1 arch/arm/mach-omap2/mux.h | 8 arch/arm/mach-omap2/mux2430.c | 791 +++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/mux2430.h | 370 +++++++++++++++++++ 4 files changed, 1170 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/mux2430.c create mode 100644 arch/arm/mach-omap2/mux2430.h
arch/arm/mach-omap2/Makefile +1 -0
@@ -37,6 +37,7 @@ AFLAGS_sram34xx.o :=-Wa,-march=armv7-a # Pin multiplexing obj-$(CONFIG_ARCH_OMAP2420) += mux2420.o +obj-$(CONFIG_ARCH_OMAP2430) += mux2430.o obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o # SMS/SDRC
arch/arm/mach-omap2/mux.h +8 -0
@@ -8,6 +8,7 @@*/ #include "mux2420.h" +#include "mux2430.h" #include "mux34xx.h" #define OMAP_MUX_TERMINATOR 0xffff
@@ -181,6 +182,13 @@ void omap_mux_write_array(struct omap_board_mux *board_mux);int omap2420_mux_init (struct omap_board_mux *board_mux,int flags);/** +* omap2430_mux_init() - initialize mux system with board specific set +* @board_mux: Board specific mux table +* @flags: OMAP package type used for the board +*/ +int omap2430_mux_init (struct omap_board_mux *board_mux,int flags); + +/** * omap3_mux_init() - initialize mux system with board specific set * @board_mux: Board specific mux table * @flags: OMAP package type used for the board
arch/arm/mach-omap2/mux2430.c new file +791 -0
791 lines not on this page · raw message
arch/arm/mach-omap2/mux2430.h new file +370 -0
370 lines not on this page · raw message
Tony Lindgren
maintainerPATCH 7/16 omap: mux: Select SIP package for H4
In reply to Tony LindgrenSelect SIP package for H4
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/board-h4.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -50,6 +50,7 @@ config MACH_OMAP2_TUSB6010 config MACH_OMAP_H4 bool "OMAP 2420 H4 board" depends on ARCH_OMAP2 + select OMAP_PACKAGE_ZAF select OMAP_DEBUG_DEVICES config MACH_OMAP_APOLLON
arch/arm/mach-omap2/board-h4.c +12 -0
@@ -42,6 +42,8 @@#include <plat/dma.h> #include <plat/gpmc.h> +#include "mux.h" +#define H4_FLASH_CS 0#define H4_SMC91X_CS 1
@@ -338,8 +340,18 @@ static struct i2c_board_info __initdata h4_i2c_board_info[] = { }, }; +#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_h4_init (void ) { +omap2420_mux_init (board_mux,OMAP_PACKAGE_ZAF ); +/* * Make sure the serial ports are muxed on at this point. * You have to mux them off in device drivers later on
Tony Lindgren
maintainerPATCH 8/16 omap: mux: Select POP package for Apollon
In reply to Tony LindgrenSelect POP package for Apollon
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/board-apollon.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -56,6 +56,7 @@ config MACH_OMAP_H4 config MACH_OMAP_APOLLON bool "OMAP 2420 Apollon board" depends on ARCH_OMAP2 + select OMAP_PACKAGE_ZAC config MACH_OMAP_2430SDP bool "OMAP 2430 SDP board"
arch/arm/mach-omap2/board-apollon.c +12 -0
@@ -42,6 +42,8 @@#include <plat/gpmc.h> #include <plat/control.h> +#include "mux.h" +/* LED & Switch macros */ #define LED0_GPIO13 13#define LED1_GPIO14 14
@@ -309,10 +311,20 @@ static void __init apollon_usb_init(void)omap2_usbfs_init (&apollon_usb_config); } +#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_apollon_init (void ) {u32 v; +omap2420_mux_init (board_mux,OMAP_PACKAGE_ZAC ); +apollon_led_init ();apollon_flash_init ();apollon_usb_init ();
Tony Lindgren
maintainerPATCH 9/16 omap: mux: Select POP package for N8X0
In reply to Tony LindgrenSelect POP package for N8X0
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/board-n8x0.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -120,6 +120,7 @@ config MACH_NOKIA_N810_WIMAX config MACH_NOKIA_N8X0 bool "Nokia N800/N810" depends on ARCH_OMAP2420 + select OMAP_PACKAGE_ZAC select MACH_NOKIA_N800 select MACH_NOKIA_N810 select MACH_NOKIA_N810_WIMAX
arch/arm/mach-omap2/board-n8x0.c +11 -0
@@ -33,6 +33,8 @@#include <plat/mmc.h> #include <plat/serial.h> +#include "mux.h" +static int slot1_cover_open;static int slot2_cover_open;static struct device *mmc_device;
@@ -649,8 +651,17 @@ static void __init n8x0_init_irq(void)omap_gpio_init (); } +#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 n8x0_init_machine (void ) { +omap2420_mux_init (board_mux,OMAP_PACKAGE_ZAC );/* FIXME: add n810 spi devices */ spi_register_board_info (n800_spi_board_info,ARRAY_SIZE (n800_spi_board_info));
Tony Lindgren
maintainerPATCH 10/16 omap: mux: Select POP package for 2430SDP
In reply to Tony LindgrenSelect POP package for 2430SDP
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/board-2430sdp.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -61,6 +61,7 @@ config MACH_OMAP_APOLLON config MACH_OMAP_2430SDP bool "OMAP 2430 SDP board" depends on ARCH_OMAP2 + select OMAP_PACKAGE_ZAC config MACH_OMAP3_BEAGLE bool "OMAP3 BEAGLE board"
arch/arm/mach-omap2/board-2430sdp.c +11 -0
@@ -38,6 +38,7 @@#include <plat/usb.h> #include <plat/gpmc-smc91x.h> +#include "mux.h" #include "hsmmc.h" #define SDP2430_CS0_BASE 0x04000000
@@ -217,10 +218,20 @@ static struct omap_usb_config sdp2430_usb_config __initdata = { .pins[0] = 3, }; +#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_2430sdp_init (void ) {int ret; +omap2430_mux_init (board_mux,OMAP_PACKAGE_ZAC ); +omap2430_i2c_init ();platform_add_devices (sdp2430_devices,ARRAY_SIZE (sdp2430_devices));
Tony Lindgren
maintainerPATCH 11/16 omap: mux: Make omap2 FS USB code use new mux functions
In reply to Tony LindgrenMake omap2 FS USB code use new mux functions. Do not mux usb2_tllse0 as it has multiple options.
--- arch/arm/mach-omap2/usb-fs.c | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-)
arch/arm/mach-omap2/usb-fs.c +18 -15
@@ -30,7 +30,6 @@#include <asm/irq.h> #include <plat/control.h> -#include <plat/mux.h> #include <plat/usb.h> #include <plat/board.h>
@@ -40,6 +39,8 @@#define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN#define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG +#include "mux.h" +#if defined(CONFIG_ARCH_OMAP2 )#ifdef CONFIG_USB_GADGET_OMAP
@@ -209,13 +210,13 @@ static u32 __init omap2_usb0_init(unsigned nwires, unsigned is_device)return 0 ;if (is_device) -omap_cfg_reg (J20_24XX_USB0_PUEN ); +omap_mux_init_signal ("usb0_puen" ,0 ); -omap_cfg_reg (K18_24XX_USB0_DAT ); -omap_cfg_reg (K19_24XX_USB0_TXEN ); -omap_cfg_reg (J14_24XX_USB0_SE0 ); +omap_mux_init_signal ("usb0_dat" ,0 ); +omap_mux_init_signal ("usb0_txen" ,0 ); +omap_mux_init_signal ("usb0_se0" ,0 );if (nwires !=3 ) -omap_cfg_reg (J18_24XX_USB0_RCV ); +omap_mux_init_signal ("usb0_rcv" ,0 );switch (nwires) {case 3 :
@@ -228,8 +229,8 @@ static u32 __init omap2_usb0_init(unsigned nwires, unsigned is_device)break ;case 6 : syscon1 =3 ; -omap_cfg_reg (J19_24XX_USB0_VP ); -omap_cfg_reg (K20_24XX_USB0_VM ); +omap_mux_init_signal ("usb0_vp" ,0 ); +omap_mux_init_signal ("usb0_vm" ,0 );omap2_usb_devconf_set (0 ,USB_UNIDIR );break ;default :
@@ -289,12 +290,12 @@ static u32 __init omap2_usb2_init(unsigned nwires, unsigned alt_pingroup)if (alt_pingroup || nwires ==0 )return 0 ; -omap_cfg_reg (Y11_24XX_USB2_DAT ); -omap_cfg_reg (AA10_24XX_USB2_SE0 ); +omap_mux_init_signal ("usb2_dat" ,0 ); +omap_mux_init_signal ("usb2_se0" ,0 );if (nwires >2 ) -omap_cfg_reg (AA12_24XX_USB2_TXEN ); +omap_mux_init_signal ("usb2_txen" ,0 );if (nwires >3 ) -omap_cfg_reg (AA6_24XX_USB2_RCV ); +omap_mux_init_signal ("usb2_rcv" ,0 );switch (nwires) {case 2 :
@@ -313,11 +314,13 @@ static u32 __init omap2_usb2_init(unsigned nwires, unsigned alt_pingroup)omap2_usb_devconf_set (2 ,USB_BIDIR );break ;case 5 : -omap_cfg_reg (AA4_24XX_USB2_TLLSE0 ); -/* NOTE: board-specific code must override this setting if -* this TLL link is not using DP/DM. Something must also +/* NOTE: board-specific code must mux this setting depending +* on TLL link using DP/DM. Something must also * set up OTG_SYSCON2.HMC_TLL{ATTACH,SPEED} +* 2420: hdq_sio.usb2_tllse0 or vlynq_rx0.usb2_tllse0 +* 2430: hdq_sio.usb2_tllse0 or sdmmc2_dat0.usb2_tllse0 */ + syscon1 =3 ;omap2_usb2_enable_5pinunitll ();break ;
Tony Lindgren
maintainerPATCH 12/16 omap: mux: Do keypad muxing in board-*.c files
In reply to Tony LindgrenThis way we get pin muxing out of plat-omap and can convert H4 to use the new mux functions.
Note that it should be safe to assume we can mux all the keypad pins except on H4 which may have Menelaus connected.
--- arch/arm/mach-omap1/board-fsample.c | 12 +++++++ arch/arm/mach-omap1/board-h2.c | 13 +++++++ arch/arm/mach-omap1/board-h3.c | 13 +++++++ arch/arm/mach-omap1/board-perseus2.c | 12 +++++++ arch/arm/mach-omap2/board-h4.c | 17 +++++++++ arch/arm/plat-omap/devices.c | 61 ---------------------------------- 6 files changed, 67 insertions(+), 61 deletions(-)
arch/arm/mach-omap1/board-fsample.c +12 -0
@@ -292,6 +292,18 @@ static void __init omap_fsample_init(void)omap_cfg_reg (L3_1610_FLASH_CS2B_OE );omap_cfg_reg (M8_1610_FLASH_CS2B_WE ); +/* Mux pins for keypad */ +omap_cfg_reg (E2_7XX_KBR0 ); +omap_cfg_reg (J7_7XX_KBR1 ); +omap_cfg_reg (E1_7XX_KBR2 ); +omap_cfg_reg (F3_7XX_KBR3 ); +omap_cfg_reg (D2_7XX_KBR4 ); +omap_cfg_reg (C2_7XX_KBC0 ); +omap_cfg_reg (D3_7XX_KBC1 ); +omap_cfg_reg (E4_7XX_KBC2 ); +omap_cfg_reg (F4_7XX_KBC3 ); +omap_cfg_reg (E3_7XX_KBC4 ); +platform_add_devices (devices,ARRAY_SIZE (devices)); omap_board_config = fsample_config;
arch/arm/mach-omap1/board-h2.c +13 -0
@@ -437,6 +437,19 @@ static void __init h2_init(void)/* omap_cfg_reg(U19_ARMIO1); */ /* CD */ omap_cfg_reg (BALLOUT_V8_ARMIO3 );/* WP */ +/* Mux pins for keypad */ +omap_cfg_reg (F18_1610_KBC0 ); +omap_cfg_reg (D20_1610_KBC1 ); +omap_cfg_reg (D19_1610_KBC2 ); +omap_cfg_reg (E18_1610_KBC3 ); +omap_cfg_reg (C21_1610_KBC4 ); +omap_cfg_reg (G18_1610_KBR0 ); +omap_cfg_reg (F19_1610_KBR1 ); +omap_cfg_reg (H14_1610_KBR2 ); +omap_cfg_reg (E20_1610_KBR3 ); +omap_cfg_reg (E19_1610_KBR4 ); +omap_cfg_reg (N19_1610_KBR5 ); +/* Irda */ #if defined(CONFIG_OMAP_IR ) || defined(CONFIG_OMAP_IR_MODULE )omap_writel (omap_readl (FUNC_MUX_CTRL_A ) |7 ,FUNC_MUX_CTRL_A );
arch/arm/mach-omap1/board-h3.c +13 -0
@@ -397,6 +397,19 @@ static void __init h3_init(void)/* GPIO10 pullup/down register, Enable pullup on GPIO10 */ omap_cfg_reg (V2_1710_GPIO10 ); +/* Mux pins for keypad */ +omap_cfg_reg (F18_1610_KBC0 ); +omap_cfg_reg (D20_1610_KBC1 ); +omap_cfg_reg (D19_1610_KBC2 ); +omap_cfg_reg (E18_1610_KBC3 ); +omap_cfg_reg (C21_1610_KBC4 ); +omap_cfg_reg (G18_1610_KBR0 ); +omap_cfg_reg (F19_1610_KBR1 ); +omap_cfg_reg (H14_1610_KBR2 ); +omap_cfg_reg (E20_1610_KBR3 ); +omap_cfg_reg (E19_1610_KBR4 ); +omap_cfg_reg (N19_1610_KBR5 ); +platform_add_devices (devices,ARRAY_SIZE (devices));spi_register_board_info (h3_spi_board_info,ARRAY_SIZE (h3_spi_board_info));
arch/arm/mach-omap1/board-perseus2.c +12 -0
@@ -260,6 +260,18 @@ static void __init omap_perseus2_init(void)omap_cfg_reg (L3_1610_FLASH_CS2B_OE );omap_cfg_reg (M8_1610_FLASH_CS2B_WE ); +/* Mux pins for keypad */ +omap_cfg_reg (E2_7XX_KBR0 ); +omap_cfg_reg (J7_7XX_KBR1 ); +omap_cfg_reg (E1_7XX_KBR2 ); +omap_cfg_reg (F3_7XX_KBR3 ); +omap_cfg_reg (D2_7XX_KBR4 ); +omap_cfg_reg (C2_7XX_KBC0 ); +omap_cfg_reg (D3_7XX_KBC1 ); +omap_cfg_reg (E4_7XX_KBC2 ); +omap_cfg_reg (F4_7XX_KBC3 ); +omap_cfg_reg (E3_7XX_KBC4 ); +platform_add_devices (devices,ARRAY_SIZE (devices)); omap_board_config = perseus2_config;
arch/arm/mach-omap2/board-h4.c +17 -0
@@ -363,11 +363,28 @@ static void __init omap_h4_init(void)#endif #if defined(CONFIG_KEYBOARD_OMAP ) || defined(CONFIG_KEYBOARD_OMAP_MODULE ) +omap_mux_init_gpio (88 ,OMAP_PULL_ENA |OMAP_PULL_UP ); +omap_mux_init_gpio (89 ,OMAP_PULL_ENA |OMAP_PULL_UP ); +omap_mux_init_gpio (124 ,OMAP_PULL_ENA |OMAP_PULL_UP ); +omap_mux_init_signal ("mcbsp2_dr.gpio_11" ,OMAP_PULL_ENA |OMAP_PULL_UP );if (omap_has_menelaus ()) { +omap_mux_init_signal ("sdrc_a14.gpio0" , +OMAP_PULL_ENA |OMAP_PULL_UP ); +omap_mux_init_signal ("vlynq_rx0.gpio_15" ,0 ); +omap_mux_init_signal ("gpio_98" ,0 ); row_gpios[5 ] =0 ; col_gpios[2 ] =15 ; col_gpios[6 ] =18 ; + }else { +omap_mux_init_signal ("gpio_96" ,OMAP_PULL_ENA |OMAP_PULL_UP ); +omap_mux_init_signal ("gpio_100" ,0 ); +omap_mux_init_signal ("gpio_98" ,0 ); } +omap_mux_init_signal ("gpio_90" ,0 ); +omap_mux_init_signal ("gpio_91" ,0 ); +omap_mux_init_signal ("gpio_36" ,0 ); +omap_mux_init_signal ("mcbsp2_clkx.gpio_12" ,0 ); +omap_mux_init_signal ("gpio_97" ,0 );#endif i2c_register_board_info(1, h4_i2c_board_info,
arch/arm/plat-omap/devices.c +0 -61
80 lines not on this page · raw message
Tony Lindgren
maintainerPATCH 13/16 omap: mux: Mux Apollon LCD power in board-apollon.c
In reply to Tony LindgrenUse the new mux function for that.
--- arch/arm/mach-omap2/board-apollon.c | 3 +++ drivers/video/omap/lcd_apollon.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/board-apollon.c +3 -0
@@ -332,6 +332,9 @@ static void __init omap_apollon_init(void)/* REVISIT: where's the correct place */ omap_cfg_reg (W19_24XX_SYS_NIRQ ); +/* LCD PWR_EN */ +omap_mux_init_signal ("mcbsp2_dr.gpio_11" ,OMAP_PULL_ENA |OMAP_PULL_UP ); +/* Use Interal loop-back in MMC/SDIO Module Input Clock selection */ v =omap_ctrl_readl (OMAP2_CONTROL_DEVCONF0 ); v |= (1 <<24 );
drivers/video/omap/lcd_apollon.c +0 -3
@@ -25,7 +25,6 @@#include <linux/platform_device.h> #include <mach/gpio.h> -#include <plat/mux.h> #include "omapfb.h"
@@ -34,8 +33,6 @@static int apollon_panel_init (struct lcd_panel *panel,struct omapfb_device *fbdev) { -/* configure LCD PWR_EN */ -omap_cfg_reg (M21_242X_GPIO11 );return 0 ; }
PATCH 13/16 omap: mux: Mux Apollon LCD power in board-apollon.c
Quoted 15 lines · ext Tony Lindgren
Use the new mux function for that.
Cc Kyungmin Park <[email protected]>Cc Tomi Valkeinen <[email protected]>Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/mach-omap2/board-apollon.c | 3 +++ drivers/video/omap/lcd_apollon.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-omap2/board-apollon.c +0
-0
arch/arm/mach-omap2/board-apollon.c static void __init omap_apollon_init(void) · line 336
Quoted 5 lines
arch/arm/mach-omap2/board-apollon.c +2
-0@@ -332,6 +332,9 @@ static void __init omap_apollon_init(void)/* REVISIT: where's the correct place */ omap_cfg_reg (W19_24XX_SYS_NIRQ ); +/* LCD PWR_EN */ +omap_mux_init_signal ("mcbsp2_dr.gpio_11" ,OMAP_PULL_ENA |OMAP_PULL_UP );
LCD_PWR_EN sounds like output pin. However, I don't see lcd_apollon.c nor board-apollon.c set the gpio.
I don't know what omap_cfg_reg(M21_242X_GPIO11) does, but if it does the same thing as the line above, then does the apollon LCD work by luck? OMAP pulling the line up, and by chance the pull is stronger than the LCDs (possible) pull down, and thus the LCD is powered up...
Tomi
PATCH 13/16 omap: mux: Mux Apollon LCD power in board-apollon.c
Hi,
This value is set from bootloader, and kernel side only change the mode. Right it runs by luck.
Thank you,
Kyungmin Park
Quoted 42 lines
-----Original Message-----
From: Tomi Valkeinen [mailto:tomi.valkeinen at nokia.com]
Sent: Thursday, July 01, 2010 4:06 PM
To: ext Tony Lindgren
Cc: linux-arm-kernel at lists.infradead.org; Kyungmin Park; linux- omap at vger.kernel.org
Subject: Re: [PATCH 13/16] omap: mux: Mux Apollon LCD power in board-apollon.carch/arm/mach-
Quoted 11 lines · ext Tony Lindgren
Use the new mux function for that.
Cc Kyungmin Park <[email protected]>Cc Tomi Valkeinen <[email protected]>Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/mach-omap2/board-apollon.c | 3 +++ drivers/video/omap/lcd_apollon.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)arch/arm/mach- renamed from arch/arm/mach-omap2/board-apollon.c +0
-0
omap2/board-apollon.carch/arm/mach-omap2/board-apollon.c static void __init omap_apollon_init(void) · line 336
Quoted 9 lines
index b86a879..bc67026 100644
arch/arm/mach-omap2/board-apollon.c +2
-0@@ -332,6 +332,9 @@ static void __init omap_apollon_init(void)/* REVISIT: where's the correct place */ omap_cfg_reg (W19_24XX_SYS_NIRQ ); +/* LCD PWR_EN */ + omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA |
OMAP_PULL_UP);
LCD_PWR_ENsounds like output pin. However, I don't seelcd_apollon.cnorboard-apollon.cset the gpio.I don't know what
omap_cfg_reg(M21_242X_GPIO11)does, but if it does the same thing as the line above, then does the apollon LCD work by luck? OMAP pulling the line up, and by chance the pull is stronger than the LCDs (possible) pull down, and thus the LCD is powered up...Tomi
Tony Lindgren
maintainerPATCH 13/16 omap: mux: Mux Apollon LCD power in board-apollon.c
Quoted 4 lines · Kyungmin Park
Hi,
This value is set from bootloader, and kernel side only change the mode. Right it runs by luck.
So should we just drop the omap_cfg_reg for now, then add it back later with proper gpio_request etc?
Tony
PATCH 13/16 omap: mux: Mux Apollon LCD power in board-apollon.c
Quoted 8 lines · Tony Lindgren
Quoted 4 lines · Kyungmin Park
Hi,
This value is set from bootloader, and kernel side only change the mode. Right it runs by luck.
So should we just drop the
omap_cfg_regfor now, then add it back later with propergpio_requestetc?
I mean the original patch is okay. Now that's find. I'll send a patch if require.
Thank you,
Kyungmin Park
Tony Lindgren
maintainerPATCH 14/16 omap: mux: Mux 2430 USB0HS_STP in board-2430.c
In reply to Tony LindgrenUse new mux functions for that. There are no other known 2430 boards that need this mux.
--- arch/arm/mach-omap2/board-2430sdp.c | 4 +++- drivers/usb/musb/omap2430.c | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/board-2430sdp.c +3 -1
@@ -31,7 +31,6 @@#include <asm/mach/map.h> #include <mach/gpio.h> -#include <plat/mux.h> #include <plat/board.h> #include <plat/common.h> #include <plat/gpmc.h>
@@ -238,7 +237,10 @@ static void __init omap_2430sdp_init(void)omap_serial_init ();omap2_hsmmc_init (mmc);omap2_usbfs_init (&sdp2430_usb_config); + +omap_mux_init_signal ("usb0hs_stp" ,OMAP_PULL_ENA |OMAP_PULL_UP );usb_musb_init (&musb_board_data); +board_smc91x_init ();/* Turn off secondary LCD backlight */
drivers/usb/musb/omap2430.c +0 -4
@@ -194,10 +194,6 @@ int __init musb_platform_init(struct musb *musb, void *board_data)u32 l;struct omap_musb_board_data *data = board_data; -#if defined(CONFIG_ARCH_OMAP2430 ) -omap_cfg_reg (AE5_2430_USB0HS_STP ); -#endif -/* We require some kind of external transceiver, hooked * up through ULPI. TWL4030-family PMICs include one, * which needs a driver, drivers aren't always needed.
PATCH 14/16 omap: mux: Mux 2430 USB0HS_STP in board-2430.c
hi,
drivers/usb/musb/omap2430.c int __init musb_platform_init(struct musb *musb, void *board_data) · line 199
Quoted 11 lines · ext Tony Lindgren
drivers/usb/musb/omap2430.c +0
-3@@ -194,10 +194,6 @@ int __init musb_platform_init(struct musb *musb, void *board_data)u32 l;struct omap_musb_board_data *data = board_data; -#if defined(CONFIG_ARCH_OMAP2430 ) -omap_cfg_reg (AE5_2430_USB0HS_STP ); -#endif
there's a patch from Anand taking care of this hunk, could you send only the hunk on board-2430sdp.c ?
this part on omap2430.c will go on next merge window.
Signature · 3 lines
balbi DefectiveByDesign.org
Tony Lindgren
maintainerPATCH 14/16 omap: mux: Mux 2430 USB0HS_STP in board-2430.c
Quoted 11 lines · Felipe Balbi
hi,
Quoted 8 lines · ext Tony Lindgren
drivers/usb/musb/omap2430.c +0
-0@@ -194,10 +194,6 @@ int __init musb_platform_init(struct musb *musb, void *board_data)u32 l;struct omap_musb_board_data *data = board_data;
Quoted 8 lines
drivers/usb/musb/omap2430.c int __init musb_platform_init(struct musb *musb, void *board_data) · line 199
Quoted 3 lines
drivers/usb/musb/omap2430.c +0
-3-#if defined(CONFIG_ARCH_OMAP2430 ) -omap_cfg_reg (AE5_2430_USB0HS_STP ); -#endif there's a patch from Anand taking care of this hunk, could you send only the hunk on
board-2430sdp.c?this part on
omap2430.cwill go on next merge window.
OK, updated patch below.
Regards,
Tony
From: Tony Lindgren <[email protected]>
Date: Wed, 30 Jun 2010 13:39:43 +0300
Subject: [PATCH] omap: mux: Mux 2430 USB0HS_STP in board-2430.c
Use new mux functions for that. There are no other known 2430 boards that need this mux.
arch/arm/mach-omap2/board-2430sdp.c +3 -1
@@ -31,7 +31,6 @@#include <asm/mach/map.h> #include <mach/gpio.h> -#include <plat/mux.h> #include <plat/board.h> #include <plat/common.h> #include <plat/gpmc.h>
@@ -238,7 +237,10 @@ static void __init omap_2430sdp_init(void)omap_serial_init ();omap2_hsmmc_init (mmc);omap2_usbfs_init (&sdp2430_usb_config); + +omap_mux_init_signal ("usb0hs_stp" ,OMAP_PULL_ENA |OMAP_PULL_UP );usb_musb_init (&musb_board_data); +board_smc91x_init ();/* Turn off secondary LCD backlight */
Tony Lindgren
maintainerPATCH 15/16 omap: mux: Convert 2420 platform init code to use new mux code
In reply to Tony LindgrenConvert 2420 platform init code to use new mux code
--- arch/arm/mach-omap2/board-apollon.c | 13 ++++++------- arch/arm/mach-omap2/board-h4.c | 7 +++---- arch/arm/mach-omap2/devices.c | 25 ++++++++++++------------- arch/arm/mach-omap2/i2c.c | 27 +++++++-------------------- arch/arm/mach-omap2/mcbsp.c | 13 +++++++------ arch/arm/mach-omap2/usb-tusb6010.c | 14 +++++++------- 6 files changed, 42 insertions(+), 57 deletions(-)
arch/arm/mach-omap2/board-apollon.c +6 -7
@@ -35,7 +35,6 @@#include <mach/gpio.h> #include <plat/led.h> -#include <plat/mux.h> #include <plat/usb.h> #include <plat/board.h> #include <plat/common.h>
@@ -246,7 +245,7 @@ static inline void __init apollon_init_smc91x(void) apollon_smc91x_resources[0 ].end = base +0x30f ;udelay (100 ); -omap_cfg_reg (W4__24XX_GPIO74 ); +omap_mux_init_gpio (74 ,0 );if (gpio_request (APOLLON_ETHR_GPIO_IRQ ,"SMC91x irq" ) <0 ) {printk (KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n" ,APOLLON_ETHR_GPIO_IRQ );
@@ -288,15 +287,15 @@ static void __init omap_apollon_init_irq(void)static void __init apollon_led_init (void ) {/* LED0 - AA10 */ -omap_cfg_reg (AA10_242X_GPIO13 ); +omap_mux_init_signal ("vlynq_clk.gpio_13" ,0 );gpio_request (LED0_GPIO13 ,"LED0" );gpio_direction_output (LED0_GPIO13 ,0 );/* LED1 - AA6 */ -omap_cfg_reg (AA6_242X_GPIO14 ); +omap_mux_init_signal ("vlynq_rx1.gpio_14" ,0 );gpio_request (LED1_GPIO14 ,"LED1" );gpio_direction_output (LED1_GPIO14 ,0 );/* LED2 - AA4 */ -omap_cfg_reg (AA4_242X_GPIO15 ); +omap_mux_init_signal ("vlynq_rx0.gpio_15" ,0 );gpio_request (LED2_GPIO15 ,"LED2" );gpio_direction_output (LED2_GPIO15 ,0 ); }
@@ -305,7 +304,7 @@ static void __init apollon_usb_init(void) {/* USB device */ /* DEVICE_SUSPEND */ -omap_cfg_reg (P21_242X_GPIO12 ); +omap_mux_init_signal ("mcbsp2_clkx.gpio_12" ,0 );gpio_request (12 ,"USB suspend" );gpio_direction_output (12 ,0 );omap2_usbfs_init (&apollon_usb_config);
@@ -330,7 +329,7 @@ static void __init omap_apollon_init(void)apollon_usb_init ();/* REVISIT: where's the correct place */ -omap_cfg_reg (W19_24XX_SYS_NIRQ ); +omap_mux_init_signal ("sys_nirq" ,OMAP_PULL_ENA |OMAP_PULL_UP );/* LCD PWR_EN */ omap_mux_init_signal ("mcbsp2_dr.gpio_11" ,OMAP_PULL_ENA |OMAP_PULL_UP );
arch/arm/mach-omap2/board-h4.c +3 -4
@@ -33,7 +33,6 @@#include <plat/control.h> #include <mach/gpio.h> -#include <plat/mux.h> #include <plat/usb.h> #include <plat/board.h> #include <plat/common.h>
@@ -248,7 +247,7 @@ static inline void __init h4_init_debug(void)udelay (100 ); -omap_cfg_reg (M15_24XX_GPIO92 ); +omap_mux_init_gpio (92 ,0 );if (debug_card_init (cs_mem_base,H4_ETHR_GPIO_IRQ ) <0 )gpmc_cs_free (eth_cs);
@@ -358,8 +357,8 @@ static void __init omap_h4_init(void)* if not needed. */ #if defined(CONFIG_OMAP_IR ) || defined(CONFIG_OMAP_IR_MODULE ) -omap_cfg_reg (K15_24XX_UART3_TX ); -omap_cfg_reg (K14_24XX_UART3_RX ); +omap_mux_init_signal ("uart3_tx_irtx.uart3_tx_irtx" ,0 ); +omap_mux_init_signal ("uart3_rx_irrx.uart3_rx_irrx" ,0 );#endif #if defined(CONFIG_KEYBOARD_OMAP ) || defined(CONFIG_KEYBOARD_OMAP_MODULE )
arch/arm/mach-omap2/devices.c +12 -13
@@ -25,7 +25,6 @@#include <plat/control.h> #include <plat/tc.h> #include <plat/board.h> -#include <plat/mux.h> #include <mach/gpio.h> #include <plat/mmc.h> #include <plat/dma.h>
@@ -672,19 +671,19 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, OMAP_PIN_INPUT_PULLUP);if (cpu_is_omap2420 () && controller_nr ==0 ) { -omap_cfg_reg (H18_24XX_MMC_CMD ); -omap_cfg_reg (H15_24XX_MMC_CLKI ); -omap_cfg_reg (G19_24XX_MMC_CLKO ); -omap_cfg_reg (F20_24XX_MMC_DAT0 ); -omap_cfg_reg (F19_24XX_MMC_DAT_DIR0 ); -omap_cfg_reg (G18_24XX_MMC_CMD_DIR ); +omap_mux_init_signal ("sdmmc_cmd" ,0 ); +omap_mux_init_signal ("sdmmc_clki" ,0 ); +omap_mux_init_signal ("sdmmc_clko" ,0 ); +omap_mux_init_signal ("sdmmc_dat0" ,0 ); +omap_mux_init_signal ("sdmmc_dat_dir0" ,0 ); +omap_mux_init_signal ("sdmmc_cmd_dir" ,0 );if (mmc_controller->slots[0 ].wires ==4 ) { -omap_cfg_reg (H14_24XX_MMC_DAT1 ); -omap_cfg_reg (E19_24XX_MMC_DAT2 ); -omap_cfg_reg (D19_24XX_MMC_DAT3 ); -omap_cfg_reg (E20_24XX_MMC_DAT_DIR1 ); -omap_cfg_reg (F18_24XX_MMC_DAT_DIR2 ); -omap_cfg_reg (E18_24XX_MMC_DAT_DIR3 ); +omap_mux_init_signal ("sdmmc_dat1" ,0 ); +omap_mux_init_signal ("sdmmc_dat2" ,0 ); +omap_mux_init_signal ("sdmmc_dat3" ,0 ); +omap_mux_init_signal ("sdmmc_dat_dir1" ,0 ); +omap_mux_init_signal ("sdmmc_dat_dir2" ,0 ); +omap_mux_init_signal ("sdmmc_dat_dir3" ,0 ); }/*
arch/arm/mach-omap2/i2c.c +7 -20
@@ -21,32 +21,19 @@#include <plat/cpu.h> #include <plat/i2c.h> -#include <plat/mux.h> #include "mux.h" void __init omap2_i2c_mux_pins (int bus_id) { -if (cpu_is_omap24xx ()) { -const int omap24xx_pins[][2 ] = { - {M19_24XX_I2C1_SCL ,L15_24XX_I2C1_SDA }, - {J15_24XX_I2C2_SCL ,H19_24XX_I2C2_SDA }, - }; -int scl, sda; - - scl = omap24xx_pins[bus_id -1 ][0 ]; - sda = omap24xx_pins[bus_id -1 ][1 ]; -omap_cfg_reg (sda); -omap_cfg_reg (scl); - } +char mux_name[sizeof ("i2c2_scl.i2c2_scl" )];/* First I2C bus is not muxable */ -if (cpu_is_omap34xx () && bus_id >1 ) { -char mux_name[sizeof ("i2c2_scl.i2c2_scl" )]; +if (bus_id ==1 ) +return ; -sprintf (mux_name,"i2c%i_scl.i2c%i_scl" , bus_id, bus_id); -omap_mux_init_signal (mux_name,OMAP_PIN_INPUT ); -sprintf (mux_name,"i2c%i_sda.i2c%i_sda" , bus_id, bus_id); -omap_mux_init_signal (mux_name,OMAP_PIN_INPUT ); - } +sprintf (mux_name,"i2c%i_scl.i2c%i_scl" , bus_id, bus_id); +omap_mux_init_signal (mux_name,OMAP_PIN_INPUT ); +sprintf (mux_name,"i2c%i_sda.i2c%i_sda" , bus_id, bus_id); +omap_mux_init_signal (mux_name,OMAP_PIN_INPUT ); }
arch/arm/mach-omap2/mcbsp.c +7 -6
@@ -20,17 +20,18 @@#include <mach/irqs.h> #include <plat/dma.h> -#include <plat/mux.h> #include <plat/cpu.h> #include <plat/mcbsp.h> +#include "mux.h" +static void omap2_mcbsp2_mux_setup (void ) { -omap_cfg_reg (Y15_24XX_MCBSP2_CLKX ); -omap_cfg_reg (R14_24XX_MCBSP2_FSX ); -omap_cfg_reg (W15_24XX_MCBSP2_DR ); -omap_cfg_reg (V15_24XX_MCBSP2_DX ); -omap_cfg_reg (V14_24XX_GPIO117 ); +omap_mux_init_signal ("eac_ac_sclk.mcbsp2_clkx" ,OMAP_PULL_ENA ); +omap_mux_init_signal ("eac_ac_fs.mcbsp2_fsx" ,OMAP_PULL_ENA ); +omap_mux_init_signal ("eac_ac_din.mcbsp2_dr" ,OMAP_PULL_ENA ); +omap_mux_init_signal ("eac_ac_dout.mcbsp2_dx" ,OMAP_PULL_ENA ); +omap_mux_init_gpio (117 ,OMAP_PULL_ENA );/* * TODO: Need to add MUX settings for OMAP 2430 SDP */
arch/arm/mach-omap2/usb-tusb6010.c +7 -7
@@ -17,8 +17,8 @@#include <linux/usb/musb.h> #include <plat/gpmc.h> -#include <plat/mux.h> +#include "mux.h" static u8 async_cs, sync_cs;static unsigned refclk_psec;
@@ -325,17 +325,17 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data,else {/* assume OMAP 2420 ES2.0 and later */ if (dmachan & (1 <<0 )) -omap_cfg_reg (AA10_242X_DMAREQ0 ); +omap_mux_init_signal ("sys_ndmareq0" ,0 );if (dmachan & (1 <<1 )) -omap_cfg_reg (AA6_242X_DMAREQ1 ); +omap_mux_init_signal ("sys_ndmareq1" ,0 );if (dmachan & (1 <<2 )) -omap_cfg_reg (E4_242X_DMAREQ2 ); +omap_mux_init_signal ("sys_ndmareq2" ,0 );if (dmachan & (1 <<3 )) -omap_cfg_reg (G4_242X_DMAREQ3 ); +omap_mux_init_signal ("sys_ndmareq3" ,0 );if (dmachan & (1 <<4 )) -omap_cfg_reg (D3_242X_DMAREQ4 ); +omap_mux_init_signal ("sys_ndmareq4" ,0 );if (dmachan & (1 <<5 )) -omap_cfg_reg (E3_242X_DMAREQ5 ); +omap_mux_init_signal ("sys_ndmareq5" ,0 ); }/* so far so good ... register the device */
Tony Lindgren
maintainerPATCH 16/16 omap: mux: Remove old mux code
In reply to Tony LindgrenAll mach-omap2 omaps should now use the new mux code.
--- arch/arm/mach-omap2/board-3630sdp.c | 1 arch/arm/mach-omap2/board-generic.c | 1 arch/arm/mach-omap2/board-rx51-peripherals.c | 1 arch/arm/mach-omap2/board-rx51-video.c | 1 arch/arm/mach-omap2/io.c | 2 arch/arm/mach-omap2/mux.c | 298 -------------------------- arch/arm/mach-omap2/pm24xx.c | 1 arch/arm/mach-omap2/usb-ehci.c | 1 arch/arm/mach-omap2/usb-musb.c | 1 arch/arm/plat-omap/include/plat/mux.h | 220 ------------------- arch/arm/plat-omap/mux.c | 2 11 files changed, 1 insertions(+), 528 deletions(-)
arch/arm/mach-omap2/board-3630sdp.c +0 -1
@@ -18,7 +18,6 @@#include <plat/common.h> #include <plat/board.h> #include <plat/gpmc-smc91x.h> -#include <plat/mux.h> #include <plat/usb.h> #include <mach/board-zoom.h>
arch/arm/mach-omap2/board-generic.c +0 -1
@@ -26,7 +26,6 @@#include <asm/mach/map.h> #include <mach/gpio.h> -#include <plat/mux.h> #include <plat/usb.h> #include <plat/board.h> #include <plat/common.h>
arch/arm/mach-omap2/board-rx51-peripherals.c +0 -1
@@ -25,7 +25,6 @@#include <linux/mmc/host.h> #include <plat/mcspi.h> -#include <plat/mux.h> #include <plat/board.h> #include <plat/common.h> #include <plat/dma.h>
arch/arm/mach-omap2/board-rx51-video.c +0 -1
@@ -16,7 +16,6 @@#include <linux/mm.h> #include <asm/mach-types.h> -#include <plat/mux.h> #include <plat/display.h> #include <plat/vram.h> #include <plat/mcspi.h>
arch/arm/mach-omap2/io.c +0 -2
@@ -28,7 +28,6 @@#include <asm/mach/map.h> -#include <plat/mux.h> #include <plat/sram.h> #include <plat/sdrc.h> #include <plat/gpmc.h>
@@ -324,7 +323,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,omap2430_hwmod_init (); else if (cpu_is_omap34xx()) omap3xxx_hwmod_init(); -omap2_mux_init ();/* The OPP tables have to be registered before a clk init */ omap_pm_if_early_init (mpu_opps ,dsp_opps ,l3_opps );
arch/arm/mach-omap2/mux.c +0 -298
313 lines not on this page · raw message
arch/arm/mach-omap2/pm24xx.c +0 -1
@@ -39,7 +39,6 @@#include <plat/clock.h> #include <plat/sram.h> #include <plat/control.h> -#include <plat/mux.h> #include <plat/dma.h> #include <plat/board.h>
arch/arm/mach-omap2/usb-ehci.c +0 -1
@@ -23,7 +23,6 @@#include <linux/dma-mapping.h> #include <asm/io.h> -#include <plat/mux.h> #include <mach/hardware.h> #include <mach/irqs.h>
arch/arm/mach-omap2/usb-musb.c +0 -1
@@ -28,7 +28,6 @@#include <mach/hardware.h> #include <mach/irqs.h> -#include <plat/mux.h> #include <plat/usb.h> #ifdef CONFIG_USB_MUSB_SOC
arch/arm/plat-omap/include/plat/mux.h +0 -220
243 lines not on this page · raw message
arch/arm/plat-omap/mux.c +1 -1
@@ -54,7 +54,7 @@ int __init_or_module omap_cfg_reg(const unsigned long index) {struct pin_config *reg; -if (cpu_is_omap34xx () ||cpu_is_omap44xx ()) { +if (!cpu_class_is_omap1 ()) {printk (KERN_ERR "mux: Broken omap_cfg_reg(%lu) entry\n" , index);WARN_ON (1 );