Re: [PATCH 10/12] mfd: TWL4030: changes for TRITON Errata 27 workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 19, 2011 at 1:33 AM, David Cohen <dacohen@xxxxxxxxx> wrote:
> Hi,
>
> On Fri, Feb 18, 2011 at 7:08 PM, Lesly A M <leslyam@xxxxxx> wrote:
>> Workaround for TWL5030 Silicon Errata 27 & 28:
>> Â Â Â Â27 - VDD1, VDD2, may have glitches when their output value is updated.
>> Â Â Â Â28 - VDD1 and / or VDD2 DCDC clock may stop working when internal clock
>> Â Â Â Â Â Â Â Âis switched from internal to external.
>>
>> Errata 27:
>> Â Â Â ÂIf the DCDC regulators is running on their internal oscillator,
>> Â Â Â Ânegative glitches may occur on VDD1, VDD2 output when voltage is changed.
>> Â Â Â ÂThe OMAP device may reboot if the VDD1 or VDD2 go below the
>> Â Â Â Âcore minimum operating voltage.
>>
>> Â Â Â ÂWORKAROUND
>> Â Â Â ÂSet up the TWL5030 DC-DC power supplies to use the HFCLKIN instead of
>> Â Â Â Âthe internal oscillator.
>>
>> Errata 28:
>> Â Â Â ÂVDD1/VDD2 clock system may hang during switching the clock source from
>> Â Â Â Âinternal oscillator to external. VDD1/VDD2 output voltages may collapse
>> Â Â Â Âif clock stops.
>>
>> Â Â Â ÂWORKAROUND
>> Â Â Â ÂIf HFCLK is disabled in OFFMODE, modify the sleep/wakeup sequence and
>> Â Â Â Âsetuptimes to make sure the switching will happen only when HFCLKIN is stable.
>> Â Â Â ÂAlso use the TWL5030 watchdog to safeguard the first switching from
>> Â Â Â Âinternal oscillator to HFCLKIN during the TWL5030 init.
>>
>> Â Â Â ÂIMPACT
>> Â Â Â Âsetup time and the power sequence is changed.
>> Â Â Â Âsleep/wakeup time values will be changed.
>>
>> The workaround changes are called from twl4030_power_init(), since we have to
>> make some i2c_read calls to check the TRITON version & the i2c will not be
>> initialized in the early stage.
>>
>> This workaround is required for TWL5030 Silicon version less than ES1.2
>> The power script & setup time changes are recommended by TI HW team.
>>
>> http://omapedia.org/wiki/TWL4030_power_scripts
>>
>> Changes taken from TRITON Errata27 workaround patch by Nishanth Menon.
>>
>> Signed-off-by: Lesly A M <leslyam@xxxxxx>
>> Cc: Nishanth Menon <nm@xxxxxx>
>> Cc: David Derrick <dderrick@xxxxxx>
>> Cc: Samuel Ortiz <sameo@xxxxxxxxxxxxxxx>
>> ---
>> Âarch/arm/mach-omap2/omap_twl.c      Â|  35 +++++++++
>> Âarch/arm/mach-omap2/twl4030.c       | Â115 +++++++++++++++++++++++++++++
>> Âarch/arm/plat-omap/include/plat/voltage.h | Â Â2 +
>> Âdrivers/mfd/twl4030-power.c        |  74 ++++++++++++++++++
>> Âinclude/linux/i2c/twl.h          |  Â2 +
>> Â5 files changed, 228 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
>> index f0feab9..d6984b8 100644
>> --- a/arch/arm/mach-omap2/omap_twl.c
>> +++ b/arch/arm/mach-omap2/omap_twl.c
>> @@ -176,6 +176,14 @@
>> Â#define OMAP3_CLKSETUP_RET Â Â Â Â Â Â 31 Â Â Â/* 30.5 uS */
>> Â#define OMAP3_CLKSETUP_OFF Â Â Â Â Â Â 10000 Â /* 10 mS */
>>
>> +/*
>> + * The clk/volt setuptime is adjusted to do the VDD1/VDD2 voltage rampup
>> + * only after HFCLKIN is stabilized and the HFCLKOUT is enabled
>> + */
>> +#define CLKSETUP_TWL5030_ERRATA27 Â Â Â11567 Â /* 11.567 mS */
>> +#define VOLTOFFSET_TWL5030_ERRATA27 Â Â516 Â Â /* 516 uS */
>> +#define VOLTSETUP2_TWL5030_ERRATA27 Â Â11079 Â /* 11.079 mS */
>> +
>> Âstatic bool is_offset_valid;
>> Âstatic u8 smps_offset;
>>
>> @@ -482,6 +490,33 @@ static struct omap_volt_pmic_info omap4_core_volt_info = {
>>    Â.uv_to_vsel       = twl6030_uv_to_vsel,
>> Â};
>>
>> +/**
>> + * omap3_twl5030_errata27() - update the clk & volt setup time.
>> + *
>> + * Api to update the clk & volt setup time for TWL5030 errata 27.
>> + */
>> +void omap3_twl5030_errata27(void)
>> +{
>> + Â Â Â if (!cpu_is_omap34xx())
>> + Â Â Â Â Â Â Â return;
>> +
>> + Â Â Â if (cpu_is_omap3630()) {
>> + Â Â Â Â Â Â Â omap3630_mpu_volt_info.voltsetup_off.voltsetup2 =
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â VOLTSETUP2_TWL5030_ERRATA27;
>> + Â Â Â Â Â Â Â omap3630_mpu_volt_info.voltsetup_off.voltoffset =
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â VOLTOFFSET_TWL5030_ERRATA27;
>> + Â Â Â Â Â Â Â omap3630_mpu_volt_info.clksetup_off.clksetup =
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â CLKSETUP_TWL5030_ERRATA27;
>> + Â Â Â } else {
>> + Â Â Â Â Â Â Â omap3430_mpu_volt_info.voltsetup_off.voltsetup2 =
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â VOLTSETUP2_TWL5030_ERRATA27;
>> + Â Â Â Â Â Â Â omap3430_mpu_volt_info.voltsetup_off.voltoffset =
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â VOLTOFFSET_TWL5030_ERRATA27;
>> + Â Â Â Â Â Â Â omap3430_mpu_volt_info.clksetup_off.clksetup =
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â CLKSETUP_TWL5030_ERRATA27;
>> + Â Â Â }
>> +}
>> +
>> Âint __init omap4_twl_init(void)
>> Â{
>> Â Â Â Âstruct voltagedomain *voltdm;
>> diff --git a/arch/arm/mach-omap2/twl4030.c b/arch/arm/mach-omap2/twl4030.c
>> index f3d05e5..b5fb496 100644
>> --- a/arch/arm/mach-omap2/twl4030.c
>> +++ b/arch/arm/mach-omap2/twl4030.c
>> @@ -137,10 +137,125 @@ static struct twl4030_resconfig twl4030_rconfig[] = {
>> Â Â Â Â{ 0, 0},
>> Â};
>>
>> +/*
>> + * Active to Sleep sequence, which is executed upon P1/P2/P3
>> + * transition for sleep.
>> + *
>> + * The sleep sequence is adjusted to do the switching of VDD1/VDD2/VIO OSC from
>> + * HFCLKIN to internal oscillator when the HFCLKIN is stable.
>> + */
>> +static struct twl4030_ins __initdata sleep_on_seq_errata27[] = {
>> + Â Â Â /*
>> + Â Â Â Â* Singular message to disable HCLKOUT.
>> + Â Â Â Â* Wait for ~488.32 uS to do the switching of VDD1/VDD2/VIO OSC from
>> + Â Â Â Â* HFCLKIN to internal oscillator before disabling HFCLKIN.
>> + Â Â Â Â*/
>> + Â Â Â {MSG_SINGULAR(DEV_GRP_NULL, RES_HFCLKOUT, RES_STATE_SLEEP), 20},
>> + Â Â Â /* Broadcast message to put res(TYPE2 = 1) to sleep */
>> + Â Â Â {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RES_STATE_SLEEP), 2},
>> + Â Â Â /* Broadcast message to put res(TYPE2 = 2) to sleep, disable HFCLKIN */
>> + Â Â Â {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RES_STATE_SLEEP), 2},
>> +};
>> +
>> +static struct twl4030_script sleep_on_script_errata27 __initdata = {
>> + Â Â Â .script = sleep_on_seq_errata27,
>> +    .size  = ARRAY_SIZE(sleep_on_seq_errata27),
>> + Â Â Â .flags Â= TWL4030_SLEEP_SCRIPT,
>> +};
>> +
>> +/*
>> + * Sleep to Active sequence, which is executed upon P1/P2/P3
>> + * transition for wakeup.
>> + *
>> + * The wakeup sequence is adjusted to do the VDD1/VDD2 voltage rampup
>> + * only after HFCLKIN is stabilized and the HFCLKOUT is enabled.
>> + */
>> +static struct twl4030_ins wakeup_seq_errata27[] __initdata = {
>> + Â Â Â /*
>> + Â Â Â Â* Broadcast message to put res(TYPE2 = 2) to active.
>> + Â Â Â Â* Wait for ~10 mS (rampup time for OSC on the board)
>> + Â Â Â Â* after HFCLKIN is enabled
>> + Â Â Â Â*/
>> + Â Â Â {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RES_STATE_ACTIVE), 55},
>> + Â Â Â {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RES_STATE_ACTIVE), 55},
>> + Â Â Â {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RES_STATE_ACTIVE), 54},
>> + Â Â Â {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RES_STATE_ACTIVE), 1},
>> + Â Â Â /* Singular message to enable HCLKOUT after HFCLKIN is stabilized */
>> + Â Â Â {MSG_SINGULAR(DEV_GRP_NULL, RES_HFCLKOUT, RES_STATE_ACTIVE), 1},
>> + Â Â Â /*
>> + Â Â Â Â* Broadcast message to put res(TYPE2 = 1) to active.
>> + Â Â Â Â* VDD1/VDD2 rampup after HFCLKIN is stable and HFCLKOUT is enabled.
>> + Â Â Â Â*/
>> + Â Â Â {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RES_STATE_ACTIVE), 2},
>> +};
>> +
>> +static struct twl4030_script wakeup_script_errata27 __initdata = {
>> + Â Â Â .script = wakeup_seq_errata27,
>> +    .size  = ARRAY_SIZE(wakeup_seq_errata27),
>> + Â Â Â .flags Â= TWL4030_WAKEUP12_SCRIPT | TWL4030_WAKEUP3_SCRIPT,
>> +};
>> +
>> +/* TRITON script for sleep, wakeup & warm_reset */
>> +static struct twl4030_script *twl4030_scripts_errata27[] __initdata = {
>> + Â Â Â &sleep_on_script_errata27,
>> + Â Â Â &wakeup_script_errata27,
>> + Â Â Â &wrst_script,
>> +};
>> +
>> +/*
>> + * VDD1/VDD2/VPLL are assigned to P1 and P3, to have better control
>> + * during OFFMODE. HFCLKOUT is assigned to P1 and P3 (*p2) to turn off
>> + * only during OFFMODE.
>> + * (*P2 is included if the platform uses it for modem/some other processor)
>> + */
>> +static struct twl4030_resconfig twl4030_rconfig_errata27[] = {
>> + Â Â Â { .resource = RES_VPLL1, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
>> + Â Â Â Â Â Â Â .type = 3, .type2 = 1, .remap_sleep = RES_STATE_OFF },
>> + Â Â Â { .resource = RES_VINTANA1, .devgroup = DEV_GRP_ALL, .type = 1,
>> + Â Â Â Â Â Â Â .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_VINTANA2, .devgroup = DEV_GRP_ALL, .type = 0,
>> + Â Â Â Â Â Â Â .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_VINTDIG, .devgroup = DEV_GRP_ALL, .type = 1,
>> + Â Â Â Â Â Â Â .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_VIO, .devgroup = DEV_GRP_ALL, .type = 2,
>> + Â Â Â Â Â Â Â .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_VDD1, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
>> + Â Â Â Â Â Â Â .type = 4, .type2 = 1, .remap_sleep = RES_STATE_OFF },
>> + Â Â Â { .resource = RES_VDD2, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
>> + Â Â Â Â Â Â Â .type = 3, .type2 = 1, .remap_sleep = RES_STATE_OFF },
>> + Â Â Â { .resource = RES_REGEN, .devgroup = DEV_GRP_ALL, .type = 2,
>> + Â Â Â Â Â Â Â .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_NRES_PWRON, .devgroup = DEV_GRP_ALL, .type = 0,
>> + Â Â Â Â Â Â Â .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_CLKEN, .devgroup = DEV_GRP_ALL, .type = 3,
>> + Â Â Â Â Â Â Â .type2 = 2, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_SYSEN, .devgroup = DEV_GRP_ALL, .type = 6,
>> + Â Â Â Â Â Â Â .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
>> + Â Â Â Â Â Â Â .type = 0, .type2 = 1, .remap_sleep = RES_STATE_SLEEP },
>> + Â Â Â { 0, 0},
>> +};
>> +
>> +void twl5030_script_errata27(void)
>> +{
>> + Â Â Â twl4030_generic_script.scripts = twl4030_scripts_errata27;
>> + Â Â Â twl4030_generic_script.num = ARRAY_SIZE(twl4030_scripts_errata27);
>> + Â Â Â twl4030_generic_script.resource_config = twl4030_rconfig_errata27;
>> +}
>> +
>> Âstruct twl4030_power_data twl4030_generic_script = {
>>    Â.scripts    Â= twl4030_scripts,
>>    Â.num      Â= ARRAY_SIZE(twl4030_scripts),
>> Â Â Â Â.resource_config = twl4030_rconfig,
>> + Â Â Â .twl5030_errata27wa_vcsetup = omap3_twl5030_errata27,
>> + Â Â Â .twl5030_errata27wa_script = twl5030_script_errata27,
>> Â};
>> ÂEXPORT_SYMBOL(twl4030_generic_script);
>> Â#endif
>> diff --git a/arch/arm/plat-omap/include/plat/voltage.h b/arch/arm/plat-omap/include/plat/voltage.h
>> index 2d737b9..c9d899b 100644
>> --- a/arch/arm/plat-omap/include/plat/voltage.h
>> +++ b/arch/arm/plat-omap/include/plat/voltage.h
>> @@ -152,6 +152,7 @@ struct dentry *omap_voltage_get_dbgdir(struct voltagedomain *voltdm);
>> Âint omap_voltage_register_pmic(struct voltagedomain *voltdm,
>> Â Â Â Â Â Â Â Âstruct omap_volt_pmic_info *pmic_info);
>> Âvoid omap3_voltage_vc_update(int core_next_state);
>> +void omap3_twl5030_errata27(void);
>> Âvoid omap_change_voltscale_method(struct voltagedomain *voltdm,
>> Â Â Â Â Â Â Â Âint voltscale_method);
>> Â/* API to get the voltagedomain pointer */
>> @@ -165,6 +166,7 @@ static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
>> Â Â Â Âreturn -EINVAL;
>> Â}
>> Âvoid omap3_voltage_vc_update(int core_next_state) {}
>> +void omap3_twl5030_errata27(void) {}
>> Âstatic inline Âvoid omap_change_voltscale_method(struct voltagedomain *voltdm,
>> Â Â Â Â Â Â Â Âint voltscale_method) {}
>> Âstatic inline int omap_voltage_late_init(void)
>> diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
>> index 8373d79..cc8a137 100644
>> --- a/drivers/mfd/twl4030-power.c
>> +++ b/drivers/mfd/twl4030-power.c
>> @@ -63,6 +63,14 @@ static u8 twl4030_start_script_address = 0x2b;
>> Â#define R_MEMORY_ADDRESS Â Â Â PHY_TO_OFF_PM_MASTER(0x59)
>> Â#define R_MEMORY_DATA Â Â Â Â ÂPHY_TO_OFF_PM_MASTER(0x5a)
>>
>> +#define R_VDD1_OSC Â Â Â Â Â Â 0x5C
>> +#define R_VDD2_OSC Â Â Â Â Â Â 0x6A
>> +#define R_VIO_OSC Â Â Â Â Â Â Â0x52
>> +#define EXT_FS_CLK_EN Â Â Â Â Â(0x1 << 6)
>> +
>> +#define R_WDT_CFG Â Â Â Â Â Â Â0x03
>> +#define WDT_WRK_TIMEOUT Â Â Â Â Â Â Â Â0x03
>> +
>> Â/* resource configuration registers
>> Â Â<RESOURCE>_DEV_GRP Â at address 'n+0'
>> Â Â<RESOURCE>_TYPE Â Â Âat address 'n+1'
>> @@ -511,6 +519,60 @@ int twl4030_remove_script(u8 flags)
>> Â Â Â Âreturn err;
>> Â}
>>
>> +/**
>> + * twl_errata27_workaround() - Workaround for TWL5030 Silicon Errata 27 & 28:
>> + * 27 - VDD1, VDD2, may have glitches when their output value is updated.
>> + * 28 - VDD1 and / or VDD2 DCDC clock may stop working when internal clock is
>> + * switched from internal to external.
>> + *
>> + * Workaround requires the TWL DCDCs to use HFCLK instead of
>> + * internal oscillator. Also enable TWL watchdog before switching the osc
>> + * to recover if the VDD1/VDD2 stop working.
>> + */
>> +static void __init twl_errata27_workaround(void)
>> +{
>> + Â Â Â u8 val;
>> + Â Â Â u8 smps_osc_reg[] = {R_VDD1_OSC, R_VDD2_OSC, R_VIO_OSC};
>> + Â Â Â u8 wdt_counter_val = 0;
>> + Â Â Â int i;
>> + Â Â Â int err;
>> +
>> + Â Â Â /* Setup the twl wdt to take care of borderline failure case */
>> + Â Â Â err = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &wdt_counter_val,
>> + Â Â Â Â Â Â Â Â Â Â Â R_WDT_CFG);
>> + Â Â Â err |= twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, WDT_WRK_TIMEOUT,
>> + Â Â Â Â Â Â Â Â Â Â Â R_WDT_CFG);
>> +
>> + Â Â Â for (i = 0; i < sizeof(smps_osc_reg); i++) {
>> + Â Â Â Â Â Â Â err |= twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &val,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â smps_osc_reg[i]);
>> + Â Â Â Â Â Â Â val |= EXT_FS_CLK_EN;
>> + Â Â Â Â Â Â Â err |= twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, val,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â smps_osc_reg[i]);
>> + Â Â Â }
>> +
>> + Â Â Â /* restore the original value */
>> + Â Â Â err |= twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, wdt_counter_val,
>> + Â Â Â Â Â Â Â Â Â Â Â R_WDT_CFG);
>> + Â Â Â if (err)
>> + Â Â Â Â Â Â Â pr_warning("TWL4030: workaround setup failed!\n");
>> +}
>> +
>> +bool is_twl5030_errata27wa_required(void)
>> +{
>> + Â Â Â u32 twl5030_si_ver;
>> + Â Â Â int ret = 0;
>> +
>> + Â Â Â ret = twl5030_get_si_ver(&twl5030_si_ver);
>> + Â Â Â if (ret)
>> + Â Â Â Â Â Â Â pr_warning("TWL4030: Unable to get the Si version\n");
>
> You can get rid of 'ret'. What about:
> if (twl5030_get_si_ver(&twl5030_si_ver))
> Â Â Â Âpr_warning("TWL4030: Unable to get the Si version\n");

And return error from here in case of !twl5030_get_si_ver()

Br,

David

>
>> +
>> + Â Â Â if (twl5030_si_ver < TWL5030_REV_1_2)
>> + Â Â Â Â Â Â Â return true;
>> + Â Â Â else
>> + Â Â Â Â Â Â Â return false;
>
> No need to if...else here. You can:
> return twl5030_si_ver < TWL5030_REV_1_2;
>
> Regards,
>
> David Cohen
>
>> +}
>> +
>> Âvoid __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts)
>> Â{
>> Â Â Â Âint err = 0;
>> @@ -530,6 +592,18 @@ void __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts)
>> Â Â Â Âif (err)
>> Â Â Â Â Â Â Â Âgoto unlock;
>>
>> + Â Â Â /* Applying TWL5030 Errata 27 WA based on Si revision &
>> + Â Â Â Â* flag updated from board file*/
>> + Â Â Â if (is_twl5030_errata27wa_required()) {
>> + Â Â Â Â Â Â Â pr_info("TWL5030: Enabling workaround for Si Errata 27\n");
>> + Â Â Â Â Â Â Â twl_errata27_workaround();
>> + Â Â Â Â Â Â Â if (twl4030_scripts->twl5030_errata27wa_vcsetup)
>> + Â Â Â Â Â Â Â Â Â Â Â twl4030_scripts->twl5030_errata27wa_vcsetup();
>> +
>> + Â Â Â Â Â Â Â if (twl4030_scripts->twl5030_errata27wa_script)
>> + Â Â Â Â Â Â Â Â Â Â Â twl4030_scripts->twl5030_errata27wa_script();
>> + Â Â Â }
>> +
>> Â Â Â Âfor (i = 0; i < twl4030_scripts->num; i++) {
>> Â Â Â Â Â Â Â Âerr = load_twl4030_script(twl4030_scripts->scripts[i], address);
>> Â Â Â Â Â Â Â Âif (err)
>> diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
>> index 5d3f2bf..26232f3 100644
>> --- a/include/linux/i2c/twl.h
>> +++ b/include/linux/i2c/twl.h
>> @@ -667,6 +667,8 @@ struct twl4030_power_data {
>> Â Â Â Âstruct twl4030_script **scripts;
>> Â Â Â Âunsigned num;
>> Â Â Â Âstruct twl4030_resconfig *resource_config;
>> + Â Â Â void (*twl5030_errata27wa_vcsetup)(void);
>> + Â Â Â void (*twl5030_errata27wa_script)(void);
>> Â#define TWL4030_RESCONFIG_UNDEF Â Â Â Â((u8)-1)
>> Â};
>>
>> --
>> 1.7.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux