Few omap fixes for review
Subsystems (3)
Tony Lindgren
maintainercover Few omap fixes for review
Hi all,
Here are some omap fixes for review. Only the first two would be nice to get into v3.1 during the -rc cycle.
Regards,
Tony
---
Bjarne Steinsbo (1):
ARM: OMAP4: Keyboard: Fix section mismatch in the board file
Bryan Buckley (1):
ARM: OMAP4: MMC: fix power and audio issue, decouple USBC1 from MMC1
Tapani Utriainen (1):
ARM: OMAP: irq: loop counter fix in omap_init_irq()
Tony Lindgren (1):
ARM: OMAP: Fix i2c init for twl4030
arch/arm/mach-omap2/board-2430sdp.c | 3 ++- arch/arm/mach-omap2/board-4430sdp.c | 2 +- arch/arm/mach-omap2/hsmmc.c | 12 ++++-------- arch/arm/mach-omap2/irq.c | 4 ++-- 4 files changed, 9 insertions(+), 12 deletions(-)
Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/4 ARM: OMAP4: MMC: fix power and audio issue, decouple USBC1 from MMC1
From: Bryan Buckley <[email protected]>
Remove OMAP4_USBC1_ICUSB_PWRDNZ_MASK during enable/disable PWRDNZ mode for MMC1_PBIAS and associated extended-drain MMC1 I/O cell. This is in accordance with the control module programming guide. This fixes a bug where if trying to use gpio_98 or gpio_99 and MMC1 at the same time the GPIO signal will be affected by a changing SDMMC1_VDDS.
Software must keep MMC1_PBIAS cell and MMC1_IO cell PWRDNZ signals low whenever SDMMC1_VDDS ramps up/down or changes for cell protection purposes.
MMC1 is based on SDMMC1_VDDS whereas USBC1 is based on SIM_VDDS therefore they can operate independently.
--- arch/arm/mach-omap2/hsmmc.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
arch/arm/mach-omap2/hsmmc.c +4 -8
@@ -137,8 +137,7 @@ static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot,*/ reg =omap4_ctrl_pad_readl (control_pbias_offset); reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | -OMAP4_MMC1_PWRDNZ_MASK | -OMAP4_USBC1_ICUSB_PWRDNZ_MASK ); +OMAP4_MMC1_PWRDNZ_MASK );omap4_ctrl_pad_writel (reg, control_pbias_offset); }
@@ -156,8 +155,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot,else reg |=OMAP4_MMC1_PBIASLITE_VMODE_MASK ; reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | -OMAP4_MMC1_PWRDNZ_MASK | -OMAP4_USBC1_ICUSB_PWRDNZ_MASK ); +OMAP4_MMC1_PWRDNZ_MASK );omap4_ctrl_pad_writel (reg, control_pbias_offset); timeout = jiffies +msecs_to_jiffies (5 );
@@ -171,16 +169,14 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot,if (reg &OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK ) {pr_err ("Pbias Voltage is not same as LDO\n" );/* Caution : On VMODE_ERROR Power Down MMC IO */ - reg &= ~(OMAP4_MMC1_PWRDNZ_MASK | -OMAP4_USBC1_ICUSB_PWRDNZ_MASK ); + reg &= ~(OMAP4_MMC1_PWRDNZ_MASK );omap4_ctrl_pad_writel (reg, control_pbias_offset); } }else { reg =omap4_ctrl_pad_readl (control_pbias_offset); reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK |OMAP4_MMC1_PWRDNZ_MASK | -OMAP4_MMC1_PBIASLITE_VMODE_MASK | -OMAP4_USBC1_ICUSB_PWRDNZ_MASK ); +OMAP4_MMC1_PBIASLITE_VMODE_MASK );omap4_ctrl_pad_writel (reg, control_pbias_offset); } }
Tony Lindgren
maintainerPATCH 2/4 ARM: OMAP: Fix i2c init for twl4030
In reply to Tony LindgrenLooks like 2600 kHz rate does not work reliably on 2430, so just use the 100 kHz rate.
Otherwise the system often fails to boot properly with:
omap_i2c omap_i2c.2: timeout waiting for bus ready omap_i2c omap_i2c.2: timeout waiting for bus ready
twl: i2c_write failed to transfer all messages omap_i2c omap_i2c.2: timeout waiting for bus ready
twl: i2c_write failed to transfer all messages omap_i2c omap_i2c.2: timeout waiting for bus ready
twl: i2c_write failed to transfer all messages
twl: clock init err [-110]omap_i2c omap_i2c.2: timeout waiting for bus ready
twl: i2c_write failed to transfer all messages TWL4030 Unable to unlock IDCODE registers --110
--- arch/arm/mach-omap2/board-2430sdp.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-2430sdp.c +2 -1
@@ -193,7 +193,8 @@ static int __init omap2430_i2c_init(void) {omap_register_i2c_bus (1 ,100 , sdp2430_i2c1_boardinfo,ARRAY_SIZE (sdp2430_i2c1_boardinfo)); -omap2_pmic_init ("twl4030" , &sdp2430_twldata); +omap_pmic_init (2 ,100 ,"twl4030" ,INT_24XX_SYS_NIRQ , + &sdp2430_twldata);return 0 ; }
Tony Lindgren
maintainerPATCH 3/4 ARM: OMAP4: Keyboard: Fix section mismatch in the board file
In reply to Tony LindgrenFrom: Bjarne Steinsbo <[email protected]>
keypad_pads' is referred to by keypad_data' which is not __initdata, so `keypad_pads' should not be __initdata either.
--- arch/arm/mach-omap2/board-4430sdp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-4430sdp.c +1 -1
@@ -129,7 +129,7 @@ static const int sdp4430_keymap[] = {KEY (7 ,6 ,KEY_OK ), KEY(7, 7, KEY_DOWN), }; -static struct omap_device_pad keypad_pads[]__initdata = { +static struct omap_device_pad keypad_pads[] = { { .name ="kpd_col1.kpd_col1" , .enable =OMAP_WAKEUP_EN |OMAP_MUX_MODE1 , },
Tony Lindgren
maintainerPATCH 4/4 ARM: OMAP: irq: loop counter fix in omap_init_irq()
In reply to Tony LindgrenFrom: Tapani Utriainen <[email protected]>
Fixes bug where variable i was redundantly used for counting two nested loops.
--- arch/arm/mach-omap2/irq.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/irq.c +2 -2
@@ -165,8 +165,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs)omap_irq_bank_init_one (bank); -for (i =0 , j =0 ; i < bank->nr_irqs; i +=32 , j +=0x20 ) -omap_alloc_gc (bank->base_reg + j, i,32 ); +for (j =0 ; j < bank->nr_irqs; j +=32 ) +omap_alloc_gc (bank->base_reg + j, j,32 ); nr_of_irqs += bank->nr_irqs; nr_banks++;