[PATCH] audio:am3517evm support for AIC23
This patch aims to fix the registration of the AIC23-based audio module on the AM3517-EVM, with the following two changes: 1. The i2c_board_info entry supporting aic23 codec was added into the i2c2 bus. 2. The i2c client device name (".2-001a" in this case, including the separator period) was appended to the codec_name member of am3517evm_dai to resolve the names mismatch happening in soc_bind_dai_link(). Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/board-am3517evm.c |3 +++ sound/soc/omap/am3517evm.c|2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index ad71cbf..8da8d20 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -358,6 +358,9 @@ static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = { }; static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = { { + I2C_BOARD_INFO("tlv320aic23", 0x1A), + }, + { I2C_BOARD_INFO("tca6416", 0x21), .platform_data = &am3517evm_gpio_expander_info_0, }, diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c index 979dd50..ddbd2a1 100644 --- a/sound/soc/omap/am3517evm.c +++ b/sound/soc/omap/am3517evm.c @@ -139,7 +139,7 @@ static struct snd_soc_dai_link am3517evm_dai = { .cpu_dai_name ="omap-mcbsp-dai.0", .codec_dai_name = "tlv320aic23-hifi", .platform_name = "omap-pcm-audio", - .codec_name = "tlv320aic23-codec", + .codec_name = "tlv320aic23-codec.2-001a", .init = am3517evm_aic23_init, .ops = &am3517evm_ops, }; -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] audio : AM3517 : Adding i2c info for AIC23 codec
From: Abhilash Vadakkepat Koyamangalath The i2c_board_info entry supporting AIC23 codec was added into the i2c2 bus. Signed-off-by: Abhilash K V Acked-by: Jarkko Nikula --- arch/arm/mach-omap2/board-am3517evm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index ad71cbf..8da8d20 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -358,6 +358,9 @@ static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = { }; static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = { { + I2C_BOARD_INFO("tlv320aic23", 0x1A), + }, + { I2C_BOARD_INFO("tca6416", 0x21), .platform_data = &am3517evm_gpio_expander_info_0, }, -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ASoC: AM3517: Update codec name after multi-component update
The i2c client device name (".2-001a" in this case, including the separator period) for the AIC23 codec on the TI AM3517-EVM was appended to the codec_name member of am3517evm_dai to resolve the names mismatch happening in soc_bind_dai_link(), due to which the card was not getting registered. Signed-off-by: Abhilash K V Acked-by: Jarkko Nikula --- sound/soc/omap/am3517evm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c index 979dd50..ddbd2a1 100644 --- a/sound/soc/omap/am3517evm.c +++ b/sound/soc/omap/am3517evm.c @@ -139,7 +139,7 @@ static struct snd_soc_dai_link am3517evm_dai = { .cpu_dai_name ="omap-mcbsp-dai.0", .codec_dai_name = "tlv320aic23-hifi", .platform_name = "omap-pcm-audio", - .codec_name = "tlv320aic23-codec", + .codec_name = "tlv320aic23-codec.2-001a", .init = am3517evm_aic23_init, .ops = &am3517evm_ops, }; -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] can : TI_HECC : Unintialized variables
1. In ti_hecc_xmit(), "data" is not initialized, causing undesirable effects like setting the RTR field for every transmit. 2. In ti_hecc_probe(), the spinlock priv->mbx_lock is not inited, causing a spinlock lockup BUG. Signed-off-by: Vaibhav Hiremath Acked-by: Anant Gole Signed-off-by: Abhilash K V --- drivers/net/can/ti_hecc.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 4d07f1e..73c6025 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c @@ -503,6 +503,7 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev) spin_unlock_irqrestore(&priv->mbx_lock, flags); /* Prepare mailbox for transmission */ + data = cf->can_dlc; if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ data |= HECC_CANMCF_RTR; data |= get_tx_head_prio(priv) << 8; @@ -923,6 +924,7 @@ static int ti_hecc_probe(struct platform_device *pdev) priv->can.do_get_state = ti_hecc_get_state; priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES; + spin_lock_init(&priv->mbx_lock); ndev->irq = irq->start; ndev->flags |= IFF_ECHO; platform_set_drvdata(pdev, ndev); -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] can : AM3517EVM : add platform specific init
CAN module on AM3517 requires programming of IO expander as part of init sequence. Added transceiver_switch callback to handle this. Signed-off-by: Sriramakrishnan Reviewed-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/board-am3517evm.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 2e4aad2..782d72d 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -734,6 +734,23 @@ static struct omap_board_mux board_mux[] __initdata = { }; #endif +/* + * HECC information + */ + +#define CAN_STB 214 +static void hecc_phy_control(int on) +{ +int r; + +r = gpio_request(CAN_STB, "can_stb"); +if (r) { +printk(KERN_ERR "failed to get can_stb \n"); +return; +} + +gpio_direction_output(CAN_STB, (on==1)?0:1); +} static struct resource am3517_hecc_resources[] = { { @@ -762,6 +779,7 @@ static struct ti_hecc_platform_data am3517_evm_hecc_pdata = { .mbx_offset = AM35XX_HECC_MBOX_OFFSET, .int_line = AM35XX_HECC_INT_LINE, .version= AM35XX_HECC_VERSION, + .transceiver_switch = hecc_phy_control, }; static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata) -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] OMAP3: powerdomains: Match silicon revision to select the correct "core_pwrdm" definition
powerdomains3xxx_data.c defines core_3xxx_pre_es3_1_pwrdm and core_3xxx_es3_1_pwrdm to take care of differences in "core_pwrdm" implementations across revisions. However,_pwrdm_lookup("core_pwrdm") always matches the first definition for 3630 ES 1.1 and 1.2 which is incorrect. This patch fixes this issue by adding code to match silicon revision as well while looking up "core_pwrdm" in _pwrdm_lookup(). core_3xxx_es3_1_pwrdm is different from core_3xxx_pre_es3_1_pwrdm in that the former adds hardware save-restore support for USBTLL for 3430 ES3.1 and for 3630 ES1.1 and ES1.2. Signed-off-by: Abhilash K V --- v2: * now tested on 3630 (ES1.2 and ES1.0) and 3530 (ES3.0 and ES3.1) * fixed checkpatch errors/warnings. arch/arm/mach-omap2/powerdomain.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 9af0847..82a2e30 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -32,6 +32,7 @@ #include "powerdomain.h" #include "clockdomain.h" #include +#include #include "pm.h" @@ -58,6 +59,24 @@ static struct powerdomain *_pwrdm_lookup(const char *name) list_for_each_entry(temp_pwrdm, &pwrdm_list, node) { if (!strcmp(name, temp_pwrdm->name)) { + if (!strcmp(name, "core_pwrdm") && cpu_is_omap3630()) { + if (omap_rev() > OMAP3630_REV_ES1_0) { + /* +* match omap_chip info for OMAP3630 +* Rev ES1.1, ES1.2 or higher +*/ + if (!(temp_pwrdm->omap_chip.oc + & CHIP_GE_OMAP3630ES1_1)) + continue; + } else { + /* match omap_chip info for OMAP3630 +* Rev ES1.0 +*/ + if (!(temp_pwrdm->omap_chip.oc +& CHIP_IS_OMAP3630ES1)) + continue; + } + } pwrdm = temp_pwrdm; break; } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/2] AM3517: Booting up
This patch-set gets the kernel booting up on a AM3517 EVM. The board is able to boot with ramdisk after this,but the MMC and Ethernet drivers are not up yet. Lots of warnings remain which will be addressed in subsequent patches. The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.0.0-rc7 and last commit on top of which these patches were added is: 885cf6ff7d3dad4cc44be74b0577d3a554d3ab71: Linux-omap rebuilt: Updated to -rc7, added new boards Cc: Sanjeev Premi Cc: Vaibhav Hiremath --- Abhilash K V (1): AM35x: Using OMAP3 generic hwmods Vaibhav Hiremath (1): omap_twl: Prevent SR to enable for am3517/am3505 devices arch/arm/mach-omap2/board-am3517evm.c| 11 +++ arch/arm/mach-omap2/omap_hwmod.c |3 ++- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/mach-omap2/omap_twl.c |8 arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 5 files changed, 42 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] AM35x: Using OMAP3 generic hwmods
This patch enables AM35x SoCs to use generic OMAP3 hwmods (i,e. omap3xxx_hwmods) by allowing board-am3517evm.c to disable the modules which are not present in AM3517. Reviewed-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/board-am3517evm.c| 11 +++ arch/arm/mach-omap2/omap_hwmod.c |3 ++- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 4 files changed, 34 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index f3006c3..8a5f232 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -359,11 +360,21 @@ static struct omap_dss_board_info am3517_evm_dss_data = { .default_device = &am3517_evm_lcd_device, }; +static char *am3517_unused_hwmods[] = { + "iva", + "sr1_hwmod", + "sr2_hwmod", + "mailbox", + "usb_otg_hs", + NULL, +}; + /* * Board initialization */ static void __init am3517_evm_init_early(void) { + omap2_disable_unused_hwmods(am3517_unused_hwmods); omap2_init_common_infrastructure(); omap2_init_common_devices(NULL, NULL); } diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 84cc0bd..bb765b5 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -1954,7 +1954,8 @@ int __init omap_hwmod_register(struct omap_hwmod **ohs) i = 0; do { - if (!omap_chip_is(ohs[i]->omap_chip)) + if (!omap_chip_is(ohs[i]->omap_chip) + || (ohs[i]->flags & HWMOD_UNUSED)) continue; r = _register(ohs[i]); diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 25bf43b..5c282bb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3281,6 +3281,24 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { NULL, }; +void __init omap2_disable_unused_hwmods(char *unused_hwmods[]) +{ + int index; + + for (index = 0; omap3xxx_hwmods[index]; index++) { + char **hwmods = unused_hwmods; + while (*hwmods) { + if (strcmp(omap3xxx_hwmods[index]->name, + *hwmods) == 0) { + omap3xxx_hwmods[index]->flags + = HWMOD_UNUSED; + break; + } + hwmods++; + } + } +} + int __init omap3xxx_hwmod_init(void) { return omap_hwmod_register(omap3xxx_hwmods); diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 0e329ca..490a95a 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -398,6 +398,7 @@ struct omap_hwmod_omap4_prcm { * in order to complete the reset. Optional clocks will be disabled * again after the reset. * HWMOD_16BIT_REG: Module has 16bit registers + * HWMOD_UNUSED: The IP for this module is unused or disabled on current SoC */ #define HWMOD_SWSUP_SIDLE (1 << 0) #define HWMOD_SWSUP_MSTANDBY (1 << 1) @@ -408,6 +409,7 @@ struct omap_hwmod_omap4_prcm { #define HWMOD_NO_IDLEST(1 << 6) #define HWMOD_CONTROL_OPT_CLKS_IN_RESET(1 << 7) #define HWMOD_16BIT_REG(1 << 8) +#define HWMOD_UNUSED (1 << 9) /* * omap_hwmod._int_flags definitions @@ -615,5 +617,6 @@ extern int omap2420_hwmod_init(void); extern int omap2430_hwmod_init(void); extern int omap3xxx_hwmod_init(void); extern int omap44xx_hwmod_init(void); +extern void omap2_disable_unused_hwmods(char *unused_hwmods[]); #endif -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] omap_twl: Prevent SR to enable for am3517/am3505 devices
From: Vaibhav Hiremath In case of AM3517 & AM3505, Smart Reflex is not applicable so we must not enable it. So add check for am3517/05 cpu revision in omap3_twl_init() and return -ENODEV if true, else continue. Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/omap_twl.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 07d6140..92fadcb 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c @@ -269,6 +269,14 @@ int __init omap3_twl_init(void) if (!cpu_is_omap34xx()) return -ENODEV; + /* +* In case of AM3517/AM3505 we should not be going down +* further, since SR is not applicable there. +*/ + if (cpu_is_omap3505() || cpu_is_omap3517()) { + return -ENODEV; + } + if (cpu_is_omap3630()) { omap3_mpu_volt_info.vp_vddmin = OMAP3630_VP1_VLIMITTO_VDDMIN; omap3_mpu_volt_info.vp_vddmax = OMAP3630_VP1_VLIMITTO_VDDMAX; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] OMAP3: Add support for TPS65023 (AM35x only)
From: Sanjeev Premi This patch adds support for TPS65023 used with OMAP3 devices. The PMIC is currently hooked to AM35x devices, but can easily be extended for other OMAP3 devices. Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/Makefile|3 +- arch/arm/mach-omap2/pm.c|1 + arch/arm/mach-omap2/pm.h|9 arch/arm/mach-omap2/pmic_tps65023.c | 84 +++ 4 files changed, 96 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index fb02937..46f5fbc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -18,7 +18,8 @@ obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o -obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_REGULATOR_TPS65023) += pmic_tps65023.o # SMP support ONLY available for OMAP4 obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index e3e2d1e..61ebd2f 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -257,6 +257,7 @@ static int __init omap2_common_pm_late_init(void) /* Init the OMAP TWL parameters */ omap3_twl_init(); omap4_twl_init(); + omap3_tps65023_init(); /* Init the voltage layer */ omap_voltage_late_init(); diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index babac19..5c2bd2f 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -123,5 +123,14 @@ static inline int omap4_twl_init(void) return -EINVAL; } #endif +#ifdef CONFIG_REGULATOR_TPS65023 +extern int omap3_tps65023_init(void); +#else +static inline int omap3_tps65023_init(void) +{ + return -EINVAL; +} +#endif + #endif diff --git a/arch/arm/mach-omap2/pmic_tps65023.c b/arch/arm/mach-omap2/pmic_tps65023.c new file mode 100644 index 000..3245929 --- /dev/null +++ b/arch/arm/mach-omap2/pmic_tps65023.c @@ -0,0 +1,84 @@ +/** + * Implements support for TPS65023 + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include + +#include "voltage.h" + +#include "pm.h" + +#defineTPS65023_VDCDC1_MIN 80 /* 0.8V */ +#defineTPS65023_VDCDC1_STEP25000 /* 0.025V */ + + +/* + * Get voltage corresponding to specified vsel value using this formula: + * Vout = 0.8V + (25mV x Vsel) + */ +static unsigned long tps65023_vsel_to_uv(const u8 vsel) +{ + return TPS65023_VDCDC1_MIN + (TPS65023_VDCDC1_STEP * vsel); +} + +/* + * Get vsel value corresponding to specified voltage using this formula: + * Vsel = (Vout - 0.8V)/ 25mV + */ +static u8 tps65023_uv_to_vsel(unsigned long uv) +{ + return DIV_ROUND_UP(uv - TPS65023_VDCDC1_MIN, TPS65023_VDCDC1_STEP); +} + +/* + * TPS65023 is currently supported only for AM35x devices. + * Therefore, implementation below is specific to this device pair. + */ + +/** + * Voltage information related to the MPU voltage domain of the + * AM35x processors - in relation to the TPS65023. + */ +static struct omap_volt_pmic_info tps65023_am35xx_mpu_volt_info = { + .step_size = 25000, + .on_volt= 120, + .vsel_to_uv = tps65023_vsel_to_uv, + .uv_to_vsel = tps65023_uv_to_vsel, +}; + +int __init omap3_tps65023_init(void) +{ + struct voltagedomain *voltdm; + + if (!cpu_is_omap34xx()) + return -ENODEV; + + if (cpu_is_omap3505() || cpu_is_omap3517()) { + voltdm = omap_voltage_domain_lookup("mpu"); + omap_voltage_register_pmic(voltdm, + &tps65023_am35xx_mpu_volt_info); + voltdm = omap_voltage_domain_lookup("core"); + omap_voltage_register_pmic(voltdm, + &tps65023_am35xx_mpu_volt_info); + } else { + /* TODO: +* Support for other devices that support TPS65023 +*/ + } + + return 0; +} -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] AM35x: voltage: Basic initialization
From: Sanjeev Premi This patch adds the basic initialization of voltage layer for AM35x. Since AM35x doesn't support voltage scaling, Many functions have been defined to plug into existing voltage layer. Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/omap_opp_data.h |1 + arch/arm/mach-omap2/opp3xxx_data.c| 10 ++ arch/arm/mach-omap2/pm.c |3 +- arch/arm/mach-omap2/voltage.c | 18 +++ arch/arm/mach-omap2/voltagedomains3xxx_data.c | 40 - 5 files changed, 70 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h index c784c12..c7cedf3 100644 --- a/arch/arm/mach-omap2/omap_opp_data.h +++ b/arch/arm/mach-omap2/omap_opp_data.h @@ -88,6 +88,7 @@ extern struct omap_volt_data omap34xx_vddmpu_volt_data[]; extern struct omap_volt_data omap34xx_vddcore_volt_data[]; extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; extern struct omap_volt_data omap36xx_vddcore_volt_data[]; +extern struct omap_volt_data am35xx_vdd_volt_data[]; extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c index d95f3f9..2337d0f 100644 --- a/arch/arm/mach-omap2/opp3xxx_data.c +++ b/arch/arm/mach-omap2/opp3xxx_data.c @@ -150,6 +150,16 @@ static struct omap_opp_def __initdata omap36xx_opp_def_list[] = { OPP_INITIALIZER("iva", false, 8, OMAP3630_VDD_MPU_OPP1G_UV), }; +/* AM35x + * + * Fields related to SmartReflex and Voltage Processor are set to 0. + */ +struct omap_volt_data am35xx_vdd_volt_data[] = { + VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP3_UV, 0x0, 0x0, 0x0), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + + /** * omap3_opp_init() - initialize omap3 opp table */ diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 3feb359..e3e2d1e 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -227,7 +227,8 @@ static void __init omap3_init_voltages(void) { if (!cpu_is_omap34xx()) return; - + if (cpu_is_omap3505() || cpu_is_omap3517()) + return; omap2_set_init_voltage("mpu", "dpll1_ck", mpu_dev); omap2_set_init_voltage("core", "l3_ick", l3_dev); } diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 9ef3789..3fa0652 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -60,6 +60,12 @@ static struct dentry *voltage_dir; static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd, unsigned long target_volt); +static int volt_scale_nop(struct omap_vdd_info *vdd, + unsigned long target_volt) +{ + return 0; +} + static u32 omap3_voltage_read_reg(u16 mod, u8 offset) { return omap2_prm_read_mod_reg(mod, offset); @@ -114,6 +120,12 @@ static int __init _config_common_vdd_data(struct omap_vdd_info *vdd) sys_clk_speed /= 1000; /* Generic voltage parameters */ + if (cpu_is_omap3505() || cpu_is_omap3517()) { + vdd->volt_scale = volt_scale_nop; + vdd->vp_enabled = false; + return 0; + } + vdd->volt_scale = vp_forceupdate_scale_voltage; vdd->vp_enabled = false; @@ -217,6 +229,9 @@ static void __init vp_init(struct omap_vdd_info *vdd) { u32 vp_val; + if (cpu_is_omap3505() || cpu_is_omap3517()) + return ; + if (!vdd->read_reg || !vdd->write_reg) { pr_err("%s: No read/write API for accessing vdd_%s regs\n", __func__, vdd->voltdm.name); @@ -598,6 +613,9 @@ static void __init omap_vc_init(struct omap_vdd_info *vdd) { u32 vc_val; + if (cpu_is_omap3505() || cpu_is_omap3517()) + return ; + if (!vdd->pmic_info || !vdd->pmic_info->uv_to_vsel) { pr_err("%s: PMIC info requried to configure vc for" "vdd_%s not populated.Hence cannot initialize vc\n", diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index def230f..b45d145 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -67,6 +67,38 @@ static struct omap_vdd_info *omap3_vdd_info[] = { &omap3_vdd2_info, }; +/* + * AM35x VDD structures + * + * In AM35x there neither scalable voltage domain nor any hook-up with + * voltage controller/processor. However, when trying to re-use the hwmod + * database for OMAP3, definition of "core" voltage domain is necessary. + * Else, changes in hwmod data
[PATCH 0/3] AM35x: Adding PM init
This patch-set fixes the power and voltage management initialization sequence for AM35x. These patches are dependent on the following patch-set http://marc.info/?l=linux-omap&m=131247357813228&w=2 which gets the AM3517 EVM booting. The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.0.0-rc7 and last commit on top of which these patches were added is: 885cf6ff7d3dad4cc44be74b0577d3a554d3ab71: Linux-omap rebuilt: Updated to -rc7, added new boards Cc: Sanjeev Premi --- Abhilash K V (1): OMAP3: Remove auto-selection of PMICs Sanjeev Premi (2): AM35x: voltage: Basic initialization OMAP3: Add support for TPS65023 (AM35x only) arch/arm/configs/omap2plus_defconfig |3 + arch/arm/mach-omap2/Kconfig |3 - arch/arm/mach-omap2/Makefile |3 +- arch/arm/mach-omap2/omap_opp_data.h |1 + arch/arm/mach-omap2/opp3xxx_data.c| 10 +++ arch/arm/mach-omap2/pm.c |4 +- arch/arm/mach-omap2/pm.h |9 +++ arch/arm/mach-omap2/pmic_tps65023.c | 84 + arch/arm/mach-omap2/voltage.c | 18 + arch/arm/mach-omap2/voltagedomains3xxx_data.c | 40 +++- drivers/mfd/Kconfig |4 +- 11 files changed, 171 insertions(+), 8 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] OMAP3: Remove auto-selection of PMICs
The current implementation almost assumes that only TWL4030/TWL5030/TWl6030 are (or can be) used with the OMAP processors. This is, however, not true. This patch removes the automatic selection of the PMIC from Kconfig. All currently used PMICs are now added to omap2plus_defconfig; any new PMIC that gets supported in future could now be enabled here rather than by changing Kconfig for ARCH_OMAP2PLUS_TYPICAL Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/configs/omap2plus_defconfig |3 +++ arch/arm/mach-omap2/Kconfig |3 --- drivers/mfd/Kconfig |4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index eb96dc3..7a79fbb 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -134,6 +134,9 @@ CONFIG_POWER_SUPPLY=y CONFIG_WATCHDOG=y CONFIG_OMAP_WATCHDOG=y CONFIG_TWL4030_WATCHDOG=y +CONFIG_MENELAUS=y +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_POWER=y CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_TPS65023=y CONFIG_REGULATOR_TPS6507X=y diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index d5e4b60..c5d4966 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -16,9 +16,6 @@ config ARCH_OMAP2PLUS_TYPICAL select I2C select I2C_OMAP select MFD_SUPPORT - select MENELAUS if ARCH_OMAP2 - select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 - select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 help Compile a kernel suitable for booting most boards diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 37b83eb..08db166 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -183,7 +183,7 @@ config MENELAUS config TWL4030_CORE bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support" - depends on I2C=y && GENERIC_HARDIRQS + depends on I2C=y && GENERIC_HARDIRQS && (ARCH_OMAP3 || ARCH_OMAP4) help Say yes here if you have TWL4030 / TWL6030 family chip on your board. This core driver provides register access and IRQ handling @@ -207,7 +207,7 @@ config TWL4030_MADC config TWL4030_POWER bool "Support power resources on TWL4030 family chips" - depends on TWL4030_CORE && ARM + depends on TWL4030_CORE && (ARCH_OMAP3 || ARCH_OMAP4) help Say yes here if you want to use the power resources on the TWL4030 family chips. Most of these resources are regulators, -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/2] AM3517EVM: Add support for MMC1
This patch-set adds support for MMC1 slot on the AM3517 EVM's base-board. These patches are dependent on the following patch-set http://marc.info/?l=linux-omap&m=131247357813228&w=2 which gets the AM3517 EVM booting. The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.0.0-rc7 and last commit on top of which these patches were added is: 885cf6ff7d3dad4cc44be74b0577d3a554d3ab71: Linux-omap rebuilt: Updated to -rc7, added new boards Cc: Vaibhav Hiremath --- Abhilash K V (1): AM3517: Support for MMC1 Vaibhav Hiremath (1): AM3517EVM: Add support for base-board MMC slot arch/arm/mach-omap2/board-am3517evm.c | 22 ++ arch/arm/mach-omap2/hsmmc.c | 10 +- 2 files changed, 31 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] AM3517EVM: Add support for base-board MMC slot
From: Vaibhav Hiremath Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/board-am3517evm.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index f3006c3..bea6da0 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -39,6 +40,7 @@ #include "mux.h" #include "control.h" +#include "hsmmc.h" #define AM35XX_EVM_MDIO_FREQUENCY (100) @@ -460,6 +462,23 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata) static struct omap_board_config_kernel am3517_evm_config[] __initdata = { }; +static struct omap2_hsmmc_info mmc[] = { + { + .mmc= 1, + .caps = MMC_CAP_4_BIT_DATA, + .gpio_cd= 127, + .gpio_wp= 126, + }, + { + .mmc= 2, + .caps = MMC_CAP_4_BIT_DATA, + .gpio_cd= 128, + .gpio_wp= 129, + }, + {} /* Terminator */ +}; + + static void __init am3517_evm_init(void) { omap_board_config = am3517_evm_config; @@ -487,6 +506,9 @@ static void __init am3517_evm_init(void) /* MUSB */ am3517_evm_musb_init(); + + /* MMC init function */ + omap2_hsmmc_init(mmc); } MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] AM3517: Support for MMC1
This patch fixes the following error message which appears while intializing MMC1 on the AM3517 EVM base-board: mmc0: host doesn't support card's voltages mmc0: error -22 whilst initialising SD card The ocr_mask, which enumerates the volatges supported by the MMC card was not being indicated before, assuming that a separate Vcc regulator maybe another controllable regulator driver would be doing this. This patch statically specifies a subset of the voltages supported by the MMC driver, which are provided by the current fixed voltage regulator on AM3517 EVM. Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/hsmmc.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index a9b45c7..9dee2e1 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -350,7 +350,15 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, * * temporary HACK: ocr_mask instead of fixed supply */ - mmc->slots[0].ocr_mask = c->ocr_mask; + if (cpu_is_omap3505() || cpu_is_omap3517()) + mmc->slots[0].ocr_mask = MMC_VDD_165_195 | +MMC_VDD_26_27 | +MMC_VDD_27_28 | +MMC_VDD_29_30 | +MMC_VDD_30_31 | +MMC_VDD_31_32; + else + mmc->slots[0].ocr_mask = c->ocr_mask; if (cpu_is_omap3517() || cpu_is_omap3505()) mmc->slots[0].set_power = nop_mmc_set_power; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] AM3517: Fix suspend-resume sequence
This patch fixes the crash seen while resuming with i2c devices enabled. This crash was happening because the interface-clocks were disabled in the suspend sequence, and not re-enabled on resumption. The current patch saves the value of the CM_ICLKEN1_CORE register before zeroing it out, and restores upon resumption. In AM3517 the interface clocks are enabled by the clock module ONLY during initialization, so the suspend sequence (in arch/arm/mach-omap2/ sleep3517.S) has to manually turn it off before executing wfi and then back on again on returning from wfi, to ensure that all interface clocks are enabled when control returns to omap_sram_idle() after waking up from idle. Reviewed-by: Vaibhav Hiremath Reviewed-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/sleep3517.S |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/sleep3517.S b/arch/arm/mach-omap2/sleep3517.S index 3fceefc..070a943 100644 --- a/arch/arm/mach-omap2/sleep3517.S +++ b/arch/arm/mach-omap2/sleep3517.S @@ -55,6 +55,9 @@ loop: /* Disable SDRC and Control Module */ ldr r4, cm_iclken1_core + ldr r5, [r4] + str r5, iclk_core_enable + ldr r4, cm_iclken1_core ldr r5, clk_core_disable str r5, [r4] wait_sdrc_ok: @@ -108,7 +111,7 @@ wait_sdrc_ok: clk_core_disable: .word 0x0 iclk_core_enable: - .word 0x42 + .word 0x0 emif_phy_gate: .word 0x2620 emif_phy_enable: -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/4] AM3517: Adding support for suspend/resume
This patch-set adds support for suspension to RAM and resumption on the AM3517. These patches are dependent on the following patch-set http://marc.info/?l=linux-omap&m=131247357813228&w=2 which gets the AM3517 EVM booting. They are also dependent on the PM initialization patches which are still to be submitted. The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.0.0-rc7 and last commit on top of which these patches were added is: 885cf6ff7d3dad4cc44be74b0577d3a554d3ab71: Linux-omap rebuilt: Updated to -rc7, added new boards Cc: Sanjeev Premi Cc: Vaibhav Hiremath --- Abhilash K V (2): AM3517 : support for suspend/resume AM3517: Fix suspend-resume sequence Vaibhav Hiremath (2): AM3517: Add armv7-a flag for sleepam3517.S pm34xx: Warning FIX related to ambiguous else loop arch/arm/mach-omap2/Makefile|3 +- arch/arm/mach-omap2/control.c |7 ++- arch/arm/mach-omap2/control.h |1 + arch/arm/mach-omap2/pm.h|4 + arch/arm/mach-omap2/pm34xx.c| 21 +- arch/arm/mach-omap2/sleep3517.S | 147 +++ 6 files changed, 176 insertions(+), 7 deletions(-) create mode 100644 arch/arm/mach-omap2/sleep3517.S -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] pm34xx: Warning FIX related to ambiguous else loop
From: Vaibhav Hiremath Fixes below warning - arch/arm/mach-omap2/pm34xx.c:1041: warning: suggest explicit braces to avoid ambiguous 'else Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/pm34xx.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 12af5b9..ab3822b 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -856,7 +856,7 @@ void omap_push_sram_idle(void) else _omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend, omap34xx_cpu_suspend_sz); - if (omap_type() != OMAP2_DEVICE_TYPE_GP) + if (omap_type() != OMAP2_DEVICE_TYPE_GP) { if (cpu_is_omap3505() || cpu_is_omap3517()) _omap_save_secure_sram = omap_sram_push( omap3517_save_secure_ram_context, @@ -865,6 +865,7 @@ void omap_push_sram_idle(void) _omap_save_secure_sram = omap_sram_push( save_secure_ram_context, save_secure_ram_context_sz); + } } static void __init pm_errata_configure(void) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] AM3517 : support for suspend/resume
1. Patch to disable dynamic sleep (as it is not supported on AM35xx). 2. Imported the unique suspend/resume sequence for AM3517, contained in the new file arch/arm/mach-omap2/sleep3517.S. 3. Added omap3517_ to symbol-names in sleep3517.S which are common with sleep34xx.S, and added appropriate checks. There are still 3 caveats: 1. If "no_console_suspend" is enabled (via boot-args), the device doesnot resume but simply hangs. 2. Every second and subsequent attempt to suspend/resume prints this slow-path WARNING (for both uart1 and uart2), while resuming : [ 70.943939] omap_hwmod: uart1: idle state can only be entered from enabled state 3. Wakeup using the TSC2004 touch-screen controller is not supported. Signed-off-by: Ranjith Lohithakshan Reviewed-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/Makefile|2 +- arch/arm/mach-omap2/control.c |7 ++- arch/arm/mach-omap2/control.h |1 + arch/arm/mach-omap2/pm.h|4 + arch/arm/mach-omap2/pm34xx.c| 18 - arch/arm/mach-omap2/sleep3517.S | 144 +++ 6 files changed, 170 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-omap2/sleep3517.S diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 46f5fbc..3fdf086 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -61,7 +61,7 @@ endif ifeq ($(CONFIG_PM),y) obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o -obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o \ +obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o sleep3517.o \ cpuidle34xx.o obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o obj-$(CONFIG_PM_DEBUG) += pm-debug.o diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index da53ba3..7d2d8a8 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -284,10 +284,13 @@ void omap3_save_scratchpad_contents(void) * The restore pointer is stored into the scratchpad. */ scratchpad_contents.boot_config_ptr = 0x0; - if (cpu_is_omap3630()) + if (cpu_is_omap3505() || cpu_is_omap3517()) { + scratchpad_contents.public_restore_ptr = + virt_to_phys(omap3517_get_restore_pointer()); + } else if (cpu_is_omap3630()) { scratchpad_contents.public_restore_ptr = virt_to_phys(get_omap3630_restore_pointer()); - else if (omap_rev() != OMAP3430_REV_ES3_0 && + } else if (omap_rev() != OMAP3430_REV_ES3_0 && omap_rev() != OMAP3430_REV_ES3_1) scratchpad_contents.public_restore_ptr = virt_to_phys(get_restore_pointer()); diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index ad024df..3003940 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h @@ -389,6 +389,7 @@ extern void omap4_ctrl_pad_writel(u32 val, u16 offset); extern void omap3_save_scratchpad_contents(void); extern void omap3_clear_scratchpad_contents(void); extern u32 *get_restore_pointer(void); +extern u32 *omap3517_get_restore_pointer(void); extern u32 *get_es3_restore_pointer(void); extern u32 *get_omap3630_restore_pointer(void); extern u32 omap3_arm_context[128]; diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 5c2bd2f..d773e07 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -77,13 +77,17 @@ extern void omap24xx_idle_loop_suspend(void); extern void omap24xx_cpu_suspend(u32 dll_ctrl, void __iomem *sdrc_dlla_ctrl, void __iomem *sdrc_power); extern void omap34xx_cpu_suspend(u32 *addr, int save_state); +extern void omap3517_cpu_suspend(u32 *addr, int save_state); extern int save_secure_ram_context(u32 *addr); +extern void omap3517_save_secure_ram_context(u32 *addr); extern void omap3_save_scratchpad_contents(void); extern unsigned int omap24xx_idle_loop_suspend_sz; extern unsigned int save_secure_ram_context_sz; +extern unsigned int omap3517_save_secure_ram_context_sz; extern unsigned int omap24xx_cpu_suspend_sz; extern unsigned int omap34xx_cpu_suspend_sz; +extern unsigned int omap3517_cpu_suspend_sz; #define PM_RTA_ERRATUM_i608(1 << 0) #define PM_SDRC_WAKEUP_ERRATUM_i583(1 << 1) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 96a7624..12af5b9 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -497,6 +497,8 @@ console_still_active: int omap3_can_sleep(void) { + if (cpu_is_omap3505() || cpu_is_omap3517()) + return 0; if (!omap_uart_can_sleep()) return 0; return 1; @
[PATCH 2/4] AM3517: Add armv7-a flag for sleepam3517.S
From: Vaibhav Hiremath Without "armv7-a" this flag build fails with following error - arch/arm/mach-omap2/sleep3517.S: Assembler messages: arch/arm/mach-omap2/sleep3517.S:80: Error: selected processor does not support `wfi' make[1]: *** [arch/arm/mach-omap2/sleep3517.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 3fdf086..0e626da 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -70,6 +70,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o AFLAGS_sleep24xx.o :=-Wa,-march=armv6 AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) +AFLAGS_sleep3517.o :=-Wa,-march=armv7-a$(plus_sec) ifeq ($(CONFIG_PM_VERBOSE),y) CFLAGS_pm_bus.o+= -DDEBUG -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/2] AM35x: Using OMAP3 generic hwmods
This patch enables AM35x SoCs to use generic OMAP3 hwmods (i,e. omap3xxx_hwmods) by allowing board-am3517evm.c to disable the modules which are not present in AM3517. Reviewed-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/board-am3517evm.c| 11 +++ arch/arm/mach-omap2/omap_hwmod.c |3 ++- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 4 files changed, 34 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index f3006c3..8a5f232 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -359,11 +360,21 @@ static struct omap_dss_board_info am3517_evm_dss_data = { .default_device = &am3517_evm_lcd_device, }; +static char *am3517_unused_hwmods[] = { + "iva", + "sr1_hwmod", + "sr2_hwmod", + "mailbox", + "usb_otg_hs", + NULL, +}; + /* * Board initialization */ static void __init am3517_evm_init_early(void) { + omap2_disable_unused_hwmods(am3517_unused_hwmods); omap2_init_common_infrastructure(); omap2_init_common_devices(NULL, NULL); } diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 84cc0bd..bb765b5 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -1954,7 +1954,8 @@ int __init omap_hwmod_register(struct omap_hwmod **ohs) i = 0; do { - if (!omap_chip_is(ohs[i]->omap_chip)) + if (!omap_chip_is(ohs[i]->omap_chip) + || (ohs[i]->flags & HWMOD_UNUSED)) continue; r = _register(ohs[i]); diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 25bf43b..5c282bb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3281,6 +3281,24 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { NULL, }; +void __init omap2_disable_unused_hwmods(char *unused_hwmods[]) +{ + int index; + + for (index = 0; omap3xxx_hwmods[index]; index++) { + char **hwmods = unused_hwmods; + while (*hwmods) { + if (strcmp(omap3xxx_hwmods[index]->name, + *hwmods) == 0) { + omap3xxx_hwmods[index]->flags + = HWMOD_UNUSED; + break; + } + hwmods++; + } + } +} + int __init omap3xxx_hwmod_init(void) { return omap_hwmod_register(omap3xxx_hwmods); diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 0e329ca..490a95a 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -398,6 +398,7 @@ struct omap_hwmod_omap4_prcm { * in order to complete the reset. Optional clocks will be disabled * again after the reset. * HWMOD_16BIT_REG: Module has 16bit registers + * HWMOD_UNUSED: The IP for this module is unused or disabled on current SoC */ #define HWMOD_SWSUP_SIDLE (1 << 0) #define HWMOD_SWSUP_MSTANDBY (1 << 1) @@ -408,6 +409,7 @@ struct omap_hwmod_omap4_prcm { #define HWMOD_NO_IDLEST(1 << 6) #define HWMOD_CONTROL_OPT_CLKS_IN_RESET(1 << 7) #define HWMOD_16BIT_REG(1 << 8) +#define HWMOD_UNUSED (1 << 9) /* * omap_hwmod._int_flags definitions @@ -615,5 +617,6 @@ extern int omap2420_hwmod_init(void); extern int omap2430_hwmod_init(void); extern int omap3xxx_hwmod_init(void); extern int omap44xx_hwmod_init(void); +extern void omap2_disable_unused_hwmods(char *unused_hwmods[]); #endif -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 0/2] AM3517: Booting up
This patch-set gets the kernel booting up on a AM3517 EVM. The board is able to boot with ramdisk after this,but the MMC and Ethernet drivers are not up yet. Lots of warnings remain which will be addressed in subsequent patches. The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.1.0-rc1 and last commit on top of which these patches were added is: d4f02b12e9cf9b443ee07b97245d8e8515d84029:omap: timer: Set dmtimer used as clocksource in autoreload mode Cc: Sanjeev Premi Cc: Vaibhav Hiremath --- v2: Incorporated Kevin's comments to add SmartReflex as a FEATURE, and use omap3_has_sr() to fall out of omap3_twl_init() for AM35x case. Abhilash K V (1): AM35x: Using OMAP3 generic hwmods Vaibhav Hiremath (1): omap_twl: Prevent SR to enable for am3517/am3505 devices arch/arm/mach-omap2/board-am3517evm.c| 11 +++ arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/omap_hwmod.c |3 ++- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/mach-omap2/omap_twl.c |8 arch/arm/plat-omap/include/plat/cpu.h|2 ++ arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 7 files changed, 45 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/2] omap_twl: Prevent SR to enable for am3517/am3505 devices
From: Vaibhav Hiremath In case of AM3517 & AM3505, Smart Reflex is not applicable so we must not enable it. So add check for absence of SR feature in omap3_twl_init() and return -ENODEV if absence, else continue. Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/omap_twl.c|8 arch/arm/plat-omap/include/plat/cpu.h |2 ++ 3 files changed, 11 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 37efb86..da71098 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -202,7 +202,7 @@ static void __init omap3_check_features(void) if (cpu_is_omap3630()) omap_features |= OMAP3_HAS_192MHZ_CLK; if (!cpu_is_omap3505() && !cpu_is_omap3517()) - omap_features |= OMAP3_HAS_IO_WAKEUP; + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR); omap_features |= OMAP3_HAS_SDRC; diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 07d6140..47e27b5 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c @@ -269,6 +269,14 @@ int __init omap3_twl_init(void) if (!cpu_is_omap34xx()) return -ENODEV; + /* +* In case of AM3517/AM3505 we should not be going down +* further, since SR is not applicable there. +*/ + if (!omap3_has_sr()) { + return -ENODEV; + } + if (cpu_is_omap3630()) { omap3_mpu_volt_info.vp_vddmin = OMAP3630_VP1_VLIMITTO_VDDMIN; omap3_mpu_volt_info.vp_vddmax = OMAP3630_VP1_VLIMITTO_VDDMAX; diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 67b3d75..294e015 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -491,6 +491,7 @@ extern u32 omap_features; #define OMAP4_HAS_MPU_1GHZ BIT(8) #define OMAP4_HAS_MPU_1_2GHZ BIT(9) #define OMAP4_HAS_MPU_1_5GHZ BIT(10) +#define OMAP3_HAS_SR BIT(11) #define OMAP3_HAS_FEATURE(feat,flag) \ @@ -507,6 +508,7 @@ OMAP3_HAS_FEATURE(isp, ISP) OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) OMAP3_HAS_FEATURE(sdrc, SDRC) +OMAP3_HAS_FEATURE(sr, SR) /* * Runtime detection of OMAP4 features -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 0/2] AM3517: Booting up
This patch-set gets the kernel booting up on a AM3517 EVM. The board is able to boot with ramdisk after this,but the MMC and Ethernet drivers are not up yet. Lots of warnings remain which will be addressed in subsequent patches. The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.1-rc3 and last commit on top of which these patches were added is: b148d763841161894ed6629794064065a834aa2b: Linux-omap rebuilt: Updated to use omap_sdrc_init with the folowing commit reverted: f3637a5f2e2eb391ff5757bc83fb5de8f9726464: irq: Always set IRQF_ONESHOT if no primary handler is specified Cc: Sanjeev Premi --- Changes in v3: Presence of SR feature is now used to decide if TWL4030 initialisation is to be done or not. Abhilash K V (2): AM35x: Using OMAP3 generic hwmods omap_twl: Prevent SR to enable for am3517/am3505 devices arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/io.c | 11 +++ arch/arm/mach-omap2/omap_hwmod.c |3 ++- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/mach-omap2/pm.c |3 ++- arch/arm/plat-omap/include/plat/cpu.h|2 ++ arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 7 files changed, 39 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/2] AM35x: Using OMAP3 generic hwmods
This patch enables AM35x SoCs to use generic OMAP3 hwmods (i,e. omap3xxx_hwmods) by allowing am35xx_init_early() to disable the modules which are not present in AM3517. Reviewed-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/io.c | 11 +++ arch/arm/mach-omap2/omap_hwmod.c |3 ++- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 4 files changed, 34 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 132724c..135e894 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -239,6 +239,16 @@ static struct map_desc omap44xx_io_desc[] __initdata = { }; #endif +static char *am3517_unused_hwmods[] = { + "iva", + "sr1_hwmod", + "sr2_hwmod", + "mailbox", + "usb_otg_hs", + NULL, +}; + + static void __init _omap2_map_common_io(void) { /* Normally devicemaps_init() would flush caches and tlb after @@ -427,6 +437,7 @@ void __init omap3630_init_early(void) void __init am35xx_init_early(void) { + omap2_disable_unused_hwmods(am3517_unused_hwmods); omap2_init_common_infrastructure(); } diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 84cc0bd..bb765b5 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -1954,7 +1954,8 @@ int __init omap_hwmod_register(struct omap_hwmod **ohs) i = 0; do { - if (!omap_chip_is(ohs[i]->omap_chip)) + if (!omap_chip_is(ohs[i]->omap_chip) + || (ohs[i]->flags & HWMOD_UNUSED)) continue; r = _register(ohs[i]); diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 25bf43b..5c282bb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3281,6 +3281,24 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { NULL, }; +void __init omap2_disable_unused_hwmods(char *unused_hwmods[]) +{ + int index; + + for (index = 0; omap3xxx_hwmods[index]; index++) { + char **hwmods = unused_hwmods; + while (*hwmods) { + if (strcmp(omap3xxx_hwmods[index]->name, + *hwmods) == 0) { + omap3xxx_hwmods[index]->flags + = HWMOD_UNUSED; + break; + } + hwmods++; + } + } +} + int __init omap3xxx_hwmod_init(void) { return omap_hwmod_register(omap3xxx_hwmods); diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 0e329ca..490a95a 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -398,6 +398,7 @@ struct omap_hwmod_omap4_prcm { * in order to complete the reset. Optional clocks will be disabled * again after the reset. * HWMOD_16BIT_REG: Module has 16bit registers + * HWMOD_UNUSED: The IP for this module is unused or disabled on current SoC */ #define HWMOD_SWSUP_SIDLE (1 << 0) #define HWMOD_SWSUP_MSTANDBY (1 << 1) @@ -408,6 +409,7 @@ struct omap_hwmod_omap4_prcm { #define HWMOD_NO_IDLEST(1 << 6) #define HWMOD_CONTROL_OPT_CLKS_IN_RESET(1 << 7) #define HWMOD_16BIT_REG(1 << 8) +#define HWMOD_UNUSED (1 << 9) /* * omap_hwmod._int_flags definitions @@ -615,5 +617,6 @@ extern int omap2420_hwmod_init(void); extern int omap2430_hwmod_init(void); extern int omap3xxx_hwmod_init(void); extern int omap44xx_hwmod_init(void); +extern void omap2_disable_unused_hwmods(char *unused_hwmods[]); #endif -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 2/2] omap_twl: Prevent SR to enable for am3517/am3505 devices
In case of AM3517 & AM3505, SmartReflex is not applicable so we must not enable it. So omap3_twl_init() is now not called when the processor does not support SR. This is as per discussion at http://marc.info/?l=linux-omap&m=131417482924928&w=2 Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/pm.c |3 ++- arch/arm/plat-omap/include/plat/cpu.h |2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 37efb86..da71098 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -202,7 +202,7 @@ static void __init omap3_check_features(void) if (cpu_is_omap3630()) omap_features |= OMAP3_HAS_192MHZ_CLK; if (!cpu_is_omap3505() && !cpu_is_omap3517()) - omap_features |= OMAP3_HAS_IO_WAKEUP; + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR); omap_features |= OMAP3_HAS_SDRC; diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 3feb359..8929798 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -254,7 +254,8 @@ postcore_initcall(omap2_common_pm_init); static int __init omap2_common_pm_late_init(void) { /* Init the OMAP TWL parameters */ - omap3_twl_init(); + if (omap3_has_sr()) + omap3_twl_init(); omap4_twl_init(); /* Init the voltage layer */ diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 67b3d75..294e015 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -491,6 +491,7 @@ extern u32 omap_features; #define OMAP4_HAS_MPU_1GHZ BIT(8) #define OMAP4_HAS_MPU_1_2GHZ BIT(9) #define OMAP4_HAS_MPU_1_5GHZ BIT(10) +#define OMAP3_HAS_SR BIT(11) #define OMAP3_HAS_FEATURE(feat,flag) \ @@ -507,6 +508,7 @@ OMAP3_HAS_FEATURE(isp, ISP) OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) OMAP3_HAS_FEATURE(sdrc, SDRC) +OMAP3_HAS_FEATURE(sr, SR) /* * Runtime detection of OMAP4 features -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 0/3] AM35x: Adding PM init
This patch-set fixes the power and voltage management initialization sequence for AM35x. These patches are dependent on the following patch-set [PATCH v3 0/2] AM3517: Booting up at http://marc.info/?l=linux-kernel&m=131548351225196&w=2 which gets the AM3517 EVM booting. The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.1-rc3 and last commit on top of which these patches were added is: b148d763841161894ed6629794064065a834aa2b: Linux-omap rebuilt: Updated to use omap_sdrc_init with the folowing commit reverted: f3637a5f2e2eb391ff5757bc83fb5de8f9726464: irq: Always set IRQF_ONESHOT if no primary handler is specified Cc: Sanjeev Premi --- Changes in v2: * TWL4030 CORE and POWER drivers are no longer built only for ARM and OMAP * changed comments to mark AM35x voltgate-scaling code as ad hoc Abhilash K V (1): OMAP3: Remove auto-selection of PMICs Sanjeev Premi (2): AM35x: voltage: Basic initialization OMAP3: Add support for TPS65023 (AM35x only) arch/arm/configs/omap2plus_defconfig |3 + arch/arm/mach-omap2/Kconfig |3 - arch/arm/mach-omap2/Makefile |3 +- arch/arm/mach-omap2/omap_opp_data.h |1 + arch/arm/mach-omap2/opp3xxx_data.c| 10 +++ arch/arm/mach-omap2/pm.c |4 +- arch/arm/mach-omap2/pm.h |9 +++ arch/arm/mach-omap2/pmic_tps65023.c | 84 + arch/arm/mach-omap2/voltage.c | 18 + arch/arm/mach-omap2/voltagedomains3xxx_data.c | 41 - drivers/mfd/Kconfig |2 +- 11 files changed, 171 insertions(+), 7 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/3] AM35x: voltage: Basic initialization
From: Sanjeev Premi This patch adds the basic initialization of voltage layer for AM35x. Since AM35x doesn't support voltage scaling, Many functions have been defined to plug into existing voltage layer. Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/omap_opp_data.h |1 + arch/arm/mach-omap2/opp3xxx_data.c| 10 ++ arch/arm/mach-omap2/pm.c |3 +- arch/arm/mach-omap2/voltage.c | 18 +++ arch/arm/mach-omap2/voltagedomains3xxx_data.c | 41 - 5 files changed, 71 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h index c784c12..c7cedf3 100644 --- a/arch/arm/mach-omap2/omap_opp_data.h +++ b/arch/arm/mach-omap2/omap_opp_data.h @@ -88,6 +88,7 @@ extern struct omap_volt_data omap34xx_vddmpu_volt_data[]; extern struct omap_volt_data omap34xx_vddcore_volt_data[]; extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; extern struct omap_volt_data omap36xx_vddcore_volt_data[]; +extern struct omap_volt_data am35xx_vdd_volt_data[]; extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c index d95f3f9..2337d0f 100644 --- a/arch/arm/mach-omap2/opp3xxx_data.c +++ b/arch/arm/mach-omap2/opp3xxx_data.c @@ -150,6 +150,16 @@ static struct omap_opp_def __initdata omap36xx_opp_def_list[] = { OPP_INITIALIZER("iva", false, 8, OMAP3630_VDD_MPU_OPP1G_UV), }; +/* AM35x + * + * Fields related to SmartReflex and Voltage Processor are set to 0. + */ +struct omap_volt_data am35xx_vdd_volt_data[] = { + VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP3_UV, 0x0, 0x0, 0x0), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + + /** * omap3_opp_init() - initialize omap3 opp table */ diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 8929798..863b384 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -227,7 +227,8 @@ static void __init omap3_init_voltages(void) { if (!cpu_is_omap34xx()) return; - + if (cpu_is_omap3505() || cpu_is_omap3517()) + return; omap2_set_init_voltage("mpu", "dpll1_ck", mpu_dev); omap2_set_init_voltage("core", "l3_ick", l3_dev); } diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 9ef3789..3fa0652 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -60,6 +60,12 @@ static struct dentry *voltage_dir; static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd, unsigned long target_volt); +static int volt_scale_nop(struct omap_vdd_info *vdd, + unsigned long target_volt) +{ + return 0; +} + static u32 omap3_voltage_read_reg(u16 mod, u8 offset) { return omap2_prm_read_mod_reg(mod, offset); @@ -114,6 +120,12 @@ static int __init _config_common_vdd_data(struct omap_vdd_info *vdd) sys_clk_speed /= 1000; /* Generic voltage parameters */ + if (cpu_is_omap3505() || cpu_is_omap3517()) { + vdd->volt_scale = volt_scale_nop; + vdd->vp_enabled = false; + return 0; + } + vdd->volt_scale = vp_forceupdate_scale_voltage; vdd->vp_enabled = false; @@ -217,6 +229,9 @@ static void __init vp_init(struct omap_vdd_info *vdd) { u32 vp_val; + if (cpu_is_omap3505() || cpu_is_omap3517()) + return ; + if (!vdd->read_reg || !vdd->write_reg) { pr_err("%s: No read/write API for accessing vdd_%s regs\n", __func__, vdd->voltdm.name); @@ -598,6 +613,9 @@ static void __init omap_vc_init(struct omap_vdd_info *vdd) { u32 vc_val; + if (cpu_is_omap3505() || cpu_is_omap3517()) + return ; + if (!vdd->pmic_info || !vdd->pmic_info->uv_to_vsel) { pr_err("%s: PMIC info requried to configure vc for" "vdd_%s not populated.Hence cannot initialize vc\n", diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index def230f..7432a1b 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -67,6 +67,39 @@ static struct omap_vdd_info *omap3_vdd_info[] = { &omap3_vdd2_info, }; +/* + * AM35x VDD structures + * + * In AM35x there neither scalable voltage domain nor any hook-up with + * voltage controller/processor. However, when trying to re-use the hwmod + * database for OMAP3, definition of "core" voltage domain is necessary. + * Else, changes in hwmod data
[PATCH v2 2/3] OMAP3: Add support for TPS65023 (AM35x only)
From: Sanjeev Premi This patch adds support for TPS65023 used with OMAP3 devices. The PMIC is currently hooked to AM35x devices, but can easily be extended for other OMAP3 devices. Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/Makefile|3 +- arch/arm/mach-omap2/pm.c|1 + arch/arm/mach-omap2/pm.h|9 arch/arm/mach-omap2/pmic_tps65023.c | 84 +++ 4 files changed, 96 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index e43d94b..590e797 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -18,7 +18,8 @@ obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o -obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_REGULATOR_TPS65023) += pmic_tps65023.o # SMP support ONLY available for OMAP4 obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 863b384..f8338a8 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -258,6 +258,7 @@ static int __init omap2_common_pm_late_init(void) if (omap3_has_sr()) omap3_twl_init(); omap4_twl_init(); + omap3_tps65023_init(); /* Init the voltage layer */ omap_voltage_late_init(); diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 4e166ad..ce028f6 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -133,5 +133,14 @@ static inline int omap4_twl_init(void) return -EINVAL; } #endif +#ifdef CONFIG_REGULATOR_TPS65023 +extern int omap3_tps65023_init(void); +#else +static inline int omap3_tps65023_init(void) +{ + return -EINVAL; +} +#endif + #endif diff --git a/arch/arm/mach-omap2/pmic_tps65023.c b/arch/arm/mach-omap2/pmic_tps65023.c new file mode 100644 index 000..3245929 --- /dev/null +++ b/arch/arm/mach-omap2/pmic_tps65023.c @@ -0,0 +1,84 @@ +/** + * Implements support for TPS65023 + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include + +#include "voltage.h" + +#include "pm.h" + +#defineTPS65023_VDCDC1_MIN 80 /* 0.8V */ +#defineTPS65023_VDCDC1_STEP25000 /* 0.025V */ + + +/* + * Get voltage corresponding to specified vsel value using this formula: + * Vout = 0.8V + (25mV x Vsel) + */ +static unsigned long tps65023_vsel_to_uv(const u8 vsel) +{ + return TPS65023_VDCDC1_MIN + (TPS65023_VDCDC1_STEP * vsel); +} + +/* + * Get vsel value corresponding to specified voltage using this formula: + * Vsel = (Vout - 0.8V)/ 25mV + */ +static u8 tps65023_uv_to_vsel(unsigned long uv) +{ + return DIV_ROUND_UP(uv - TPS65023_VDCDC1_MIN, TPS65023_VDCDC1_STEP); +} + +/* + * TPS65023 is currently supported only for AM35x devices. + * Therefore, implementation below is specific to this device pair. + */ + +/** + * Voltage information related to the MPU voltage domain of the + * AM35x processors - in relation to the TPS65023. + */ +static struct omap_volt_pmic_info tps65023_am35xx_mpu_volt_info = { + .step_size = 25000, + .on_volt= 120, + .vsel_to_uv = tps65023_vsel_to_uv, + .uv_to_vsel = tps65023_uv_to_vsel, +}; + +int __init omap3_tps65023_init(void) +{ + struct voltagedomain *voltdm; + + if (!cpu_is_omap34xx()) + return -ENODEV; + + if (cpu_is_omap3505() || cpu_is_omap3517()) { + voltdm = omap_voltage_domain_lookup("mpu"); + omap_voltage_register_pmic(voltdm, + &tps65023_am35xx_mpu_volt_info); + voltdm = omap_voltage_domain_lookup("core"); + omap_voltage_register_pmic(voltdm, + &tps65023_am35xx_mpu_volt_info); + } else { + /* TODO: +* Support for other devices that support TPS65023 +*/ + } + + return 0; +} -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 3/3] OMAP3: Remove auto-selection of PMICs
The current implementation almost assumes that only TWL4030/TWL5030/TWl6030 are (or can be) used with the OMAP processors. This is, however, not true. This patch removes the automatic selection of the PMIC from Kconfig. All currently used PMICs are now added to omap2plus_defconfig; any new PMIC that gets supported in future could now be enabled here rather than by changing Kconfig for ARCH_OMAP2PLUS_TYPICAL TWL4030 CORE and POWER drivers are no longer built only for ARM and OMAP, as per the discussion here: http://marc.info/?l=linux-omap&m=131402877315314&w=2 Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/configs/omap2plus_defconfig |3 +++ arch/arm/mach-omap2/Kconfig |3 --- drivers/mfd/Kconfig |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index d5f00d7..076b131 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -130,6 +130,9 @@ CONFIG_POWER_SUPPLY=y CONFIG_WATCHDOG=y CONFIG_OMAP_WATCHDOG=y CONFIG_TWL4030_WATCHDOG=y +CONFIG_MENELAUS=y +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_POWER=y CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_TPS65023=y CONFIG_REGULATOR_TPS6507X=y diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 7edf802..d40f6d2 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -15,9 +15,6 @@ config ARCH_OMAP2PLUS_TYPICAL select I2C select I2C_OMAP select MFD_SUPPORT - select MENELAUS if ARCH_OMAP2 - select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 - select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 help Compile a kernel suitable for booting most boards diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 21574bd..72e15c8 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -238,7 +238,7 @@ config TWL4030_MADC config TWL4030_POWER bool "Support power resources on TWL4030 family chips" - depends on TWL4030_CORE && ARM + depends on TWL4030_CORE help Say yes here if you want to use the power resources on the TWL4030 family chips. Most of these resources are regulators, -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] AM3517 : support for suspend/resume
This patch-set adds support for suspension to RAM and resumption on the AM3517. This includes: 1. Patch to disable dynamic sleep (as it is not supported on AM35xx). 2. Imported the unique suspend/resume sequence for AM3517, contained in the new file arch/arm/mach-omap2/sleep3517.S. Caveat: If "no_console_suspend" is enabled (via boot-args),the device doesnot resume but simply hangs. Kevin's fix below should fix this: http://marc.info/?l=linux-omap&m=131593828001388&w=2#1 Signed-off-by: Ranjith Lohithakshan Reviewed-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- This patch is dependent on the following patch-sets: * [PATCH v3 0/2] AM3517: Booting up at http://marc.info/?l=linux-omap&m=131548349725176&w=2 * [PATCH v2 0/3] AM35x: Adding PM init at http://marc.info/?l=linux-kernel&m=131548606728209&w=2 The patches are tested on master of tmlind/linux-omap-2.6.git. Kernel version is 3.1-rc3 and last commit on top of which these patches were added is: b148d763841161894ed6629794064065a834aa2b: Linux-omap rebuilt: Updated to use omap_sdrc_init with the folowing commit reverted: f3637a5f2e2eb391ff5757bc83fb5de8f9726464: irq: Always set IRQF_ONESHOT if no primary handler is specified Changes in v2: * Synchronised with the cleaned-up suspend-resume code for OMAP3 * Removed unused *_get_restore_pointer code * Added SECURE_SRAM feature to disallow saving and restoring secure ram context for AM35x * Compacted the number of patches by squashing three closely coupled ones and eliminating one that was no longer needed. arch/arm/mach-omap2/Makefile |3 +- arch/arm/mach-omap2/id.c |4 +- arch/arm/mach-omap2/pm.h |3 + arch/arm/mach-omap2/pm34xx.c | 21 - arch/arm/mach-omap2/sleep3517.S | 156 + arch/arm/plat-omap/include/plat/cpu.h |2 + 6 files changed, 183 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-omap2/sleep3517.S diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 590e797..37f62ae 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -61,7 +61,7 @@ endif ifeq ($(CONFIG_PM),y) obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o -obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o \ +obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o sleep3517.o \ cpuidle34xx.o obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o obj-$(CONFIG_PM_DEBUG) += pm-debug.o @@ -70,6 +70,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o AFLAGS_sleep24xx.o :=-Wa,-march=armv6 AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) +AFLAGS_sleep3517.o :=-Wa,-march=armv7-a$(plus_sec) ifeq ($(CONFIG_PM_VERBOSE),y) CFLAGS_pm_bus.o+= -DDEBUG diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index da71098..3e40c02 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -202,7 +202,9 @@ static void __init omap3_check_features(void) if (cpu_is_omap3630()) omap_features |= OMAP3_HAS_192MHZ_CLK; if (!cpu_is_omap3505() && !cpu_is_omap3517()) - omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR); + omap_features |= (OMAP3_HAS_IO_WAKEUP + | OMAP3_HAS_SR + | OMAP3_HAS_SECURE_SRAM); omap_features |= OMAP3_HAS_SDRC; diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index ce028f6..952eb2b 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -82,10 +82,13 @@ extern unsigned int omap24xx_cpu_suspend_sz; /* 3xxx */ extern void omap34xx_cpu_suspend(int save_state); +extern void omap3517_cpu_suspend(int save_state); /* omap3_do_wfi function pointer and size, for copy to SRAM */ extern void omap3_do_wfi(void); +extern void omap3517_do_wfi(void); extern unsigned int omap3_do_wfi_sz; +extern unsigned int omap3517_do_wfi_sz; /* ... and its pointer from SRAM after copy */ extern void (*omap3_do_wfi_sram)(void); diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 7255d9b..44f7bac 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -80,6 +80,7 @@ static LIST_HEAD(pwrst_list); static int (*_omap_save_secure_sram)(u32 *addr); void (*omap3_do_wfi_sram)(void); +void (*omap3517_do_wfi_sram)(void); static struct powerdomain *mpu_pwrdm, *neon_pwrdm; static struct powerdomain *core_pwrdm, *per_pwrdm; @@ -323,7 +324,10 @@ static void omap34xx_save_context(u32 *save) static int omap34xx_do_sram_idle(unsigned long save_state) { - omap34xx_cpu_s
[PATCH v4 0/3] AM3517: Booting up
This patch-set gets the kernel booting up on a AM3517 EVM. The board is able to boot with ramdisk after this,but the MMC and Ethernet drivers are not up yet. Lots of warnings remain which will be addressed in subsequent patches. The patches are tested on master of git://github.com/tmlind/linux.git Kernel version is 3.1.0-rc6 and last commit on top of which these patches were added is: 0c2838d00350afc5259730c35bbda81598e8875f: Linux-omap rebuilt: Updated to -rc7, merged in dmtimer Cc: Sanjeev Premi --- Changes in v4: -Rebased and tested against the latest 3.1.0-rc6. -Added a patch [3/3] to check for missing PMIC info in vp init. Changes in v3: Presence of SR feature is now used to decide if TWL4030 initialisation is to be done or not. Changes in v2: Incorporated Kevin's comments to add SmartReflex as a FEATURE, and use omap3_has_sr() to fall out of omap3_twl_init() for AM35x case. Abhilash K V (3): AM35x: Using OMAP3 generic hwmods omap_twl: Prevent SR to enable for am3517/am3505 devices OMAP2+: voltage: add check for missing PMIC info in vp init arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/io.c | 11 +++ arch/arm/mach-omap2/omap_hwmod.c |2 ++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/mach-omap2/pm.c |3 ++- arch/arm/mach-omap2/vp.c |7 +++ arch/arm/plat-omap/include/plat/cpu.h|2 ++ arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 8 files changed, 46 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
In case of AM3517 & AM3505, SmartReflex is not applicable so we must not enable it. So omap3_twl_init() is now not called when the processor does not support SR. Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/pm.c |3 ++- arch/arm/plat-omap/include/plat/cpu.h |2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index d27daf9..b7e3082 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -188,7 +188,7 @@ static void __init omap3_check_features(void) if (cpu_is_omap3630()) omap_features |= OMAP3_HAS_192MHZ_CLK; if (!cpu_is_omap3505() && !cpu_is_omap3517()) - omap_features |= OMAP3_HAS_IO_WAKEUP; + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR); omap_features |= OMAP3_HAS_SDRC; diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index d34fc52..da71abc 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init); static int __init omap2_common_pm_late_init(void) { /* Init the OMAP TWL parameters */ - omap3_twl_init(); + if (omap3_has_sr()) + omap3_twl_init(); omap4_twl_init(); /* Init the voltage layer */ diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 2f90269..cc6fcd3 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -413,6 +413,7 @@ extern u32 omap_features; #define OMAP4_HAS_MPU_1GHZ BIT(8) #define OMAP4_HAS_MPU_1_2GHZ BIT(9) #define OMAP4_HAS_MPU_1_5GHZ BIT(10) +#define OMAP3_HAS_SR BIT(11) #define OMAP3_HAS_FEATURE(feat,flag) \ @@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP) OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) OMAP3_HAS_FEATURE(sdrc, SDRC) +OMAP3_HAS_FEATURE(sr, SR) /* * Runtime detection of OMAP4 features -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 1/3] AM35x: Using OMAP3 generic hwmods
This patch enables AM35x SoCs to use generic OMAP3 hwmods (i,e. omap3xxx_hwmods) by allowing am35xx_init_early() to disable the modules which are not present in AM3517. Reviewed-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/io.c | 11 +++ arch/arm/mach-omap2/omap_hwmod.c |2 ++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++ arch/arm/plat-omap/include/plat/omap_hwmod.h |3 +++ 4 files changed, 34 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 15f91c4..6a6e2cc 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -240,6 +240,16 @@ static struct map_desc omap44xx_io_desc[] __initdata = { }; #endif +static char *am3517_unused_hwmods[] = { + "iva", + "sr1_hwmod", + "sr2_hwmod", + "mailbox", + "usb_otg_hs", + NULL, +}; + + static void __init _omap2_map_common_io(void) { /* Normally devicemaps_init() would flush caches and tlb after @@ -432,6 +442,7 @@ void __init omap3630_init_early(void) void __init am35xx_init_early(void) { + omap2_disable_unused_hwmods(am3517_unused_hwmods); omap2_init_common_infrastructure(); } diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index d713807..c7b0395 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -1954,6 +1954,8 @@ int __init omap_hwmod_register(struct omap_hwmod **ohs) i = 0; do { + if (ohs[i]->flags & HWMOD_UNUSED) + continue; r = _register(ohs[i]); WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name, r); diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 3008e16..682171c 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3259,6 +3259,24 @@ static __initdata struct omap_hwmod *am35xx_hwmods[] = { NULL }; +void __init omap2_disable_unused_hwmods(char *unused_hwmods[]) +{ + int index; + + for (index = 0; omap3xxx_hwmods[index]; index++) { + char **hwmods = unused_hwmods; + while (*hwmods) { + if (strcmp(omap3xxx_hwmods[index]->name, + *hwmods) == 0) { + omap3xxx_hwmods[index]->flags + = HWMOD_UNUSED; + break; + } + hwmods++; + } + } +} + int __init omap3xxx_hwmod_init(void) { int r; diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 5419f1a..96650f3 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -398,6 +398,7 @@ struct omap_hwmod_omap4_prcm { * in order to complete the reset. Optional clocks will be disabled * again after the reset. * HWMOD_16BIT_REG: Module has 16bit registers + * HWMOD_UNUSED: The IP for this module is unused or disabled on current SoC */ #define HWMOD_SWSUP_SIDLE (1 << 0) #define HWMOD_SWSUP_MSTANDBY (1 << 1) @@ -408,6 +409,7 @@ struct omap_hwmod_omap4_prcm { #define HWMOD_NO_IDLEST(1 << 6) #define HWMOD_CONTROL_OPT_CLKS_IN_RESET(1 << 7) #define HWMOD_16BIT_REG(1 << 8) +#define HWMOD_UNUSED (1 << 9) /* * omap_hwmod._int_flags definitions @@ -612,5 +614,6 @@ extern int omap2420_hwmod_init(void); extern int omap2430_hwmod_init(void); extern int omap3xxx_hwmod_init(void); extern int omap44xx_hwmod_init(void); +extern void omap2_disable_unused_hwmods(char *unused_hwmods[]); #endif -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
If PMIC info is not available in omap_vp_init(), abort. Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/vp.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 66bd700..2c99837 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c @@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm) u32 val, sys_clk_rate, timeout, waittime; u32 vddmin, vddmax, vstepmin, vstepmax; + if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { + pr_err("%s: PMIC info requried to configure vp for" + "vdd_%s not populated.Hence cannot initialize vp\n", + __func__, voltdm->name); + return; + } + if (!voltdm->read || !voltdm->write) { pr_err("%s: No read/write API for accessing vdd_%s regs\n", __func__, voltdm->name); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/3] AM35x: voltage: Basic initialization
This patch adds the basic initialization of voltage layer for AM35x. Since AM35x doesn't support voltage scaling, Many functions have been defined to plug into existing voltage layer. Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/omap_opp_data.h |1 + arch/arm/mach-omap2/opp3xxx_data.c|9 + arch/arm/mach-omap2/voltagedomains3xxx_data.c | 10 -- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h index c784c12..c7cedf3 100644 --- a/arch/arm/mach-omap2/omap_opp_data.h +++ b/arch/arm/mach-omap2/omap_opp_data.h @@ -88,6 +88,7 @@ extern struct omap_volt_data omap34xx_vddmpu_volt_data[]; extern struct omap_volt_data omap34xx_vddcore_volt_data[]; extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; extern struct omap_volt_data omap36xx_vddcore_volt_data[]; +extern struct omap_volt_data am35xx_vdd_volt_data[]; extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c index d95f3f9..e4a5ee6 100644 --- a/arch/arm/mach-omap2/opp3xxx_data.c +++ b/arch/arm/mach-omap2/opp3xxx_data.c @@ -85,6 +85,15 @@ struct omap_volt_data omap36xx_vddcore_volt_data[] = { VOLT_DATA_DEFINE(0, 0, 0, 0), }; +/* AM35x + * + * Fields related to SmartReflex and Voltage Processor are set to 0. + */ +struct omap_volt_data am35xx_vdd_volt_data[] = { + VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP3_UV, 0x0, 0x0, 0x0), + VOLT_DATA_DEFINE(0, 0, 0, 0), +}; + /* OPP data */ static struct omap_opp_def __initdata omap34xx_opp_def_list[] = { diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index 071101d..530082f 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -85,7 +85,10 @@ void __init omap3xxx_voltagedomains_init(void) * XXX Will depend on the process, validation, and binning * for the currently-running IC */ - if (cpu_is_omap3630()) { + if (cpu_is_omap3505() || cpu_is_omap3517()) { + omap3_voltdm_mpu.volt_data = am35xx_vdd_volt_data; + omap3_voltdm_core.volt_data = am35xx_vdd_volt_data; + } else if (cpu_is_omap3630()) { omap3_voltdm_mpu.volt_data = omap36xx_vddmpu_volt_data; omap3_voltdm_core.volt_data = omap36xx_vddcore_volt_data; } else { @@ -93,8 +96,11 @@ void __init omap3xxx_voltagedomains_init(void) omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data; } - for (i = 0; voltdm = voltagedomains_omap3[i], voltdm; i++) + for (i = 0; voltdm = voltagedomains_omap3[i], voltdm; i++) { + if (cpu_is_omap3505() || cpu_is_omap3517()) + voltdm->scalable = false; voltdm->sys_clk.name = sys_clk_name; + } voltdm_init(voltagedomains_omap3); }; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 0/3] AM35x: Adding PM init
This patch-set fixes the power and voltage management initialization sequence for AM35x. These patches are dependent on the following patch-set [PATCH v4 0/3] AM3517: Booting up which gets the AM3517 EVM booting. The patches are tested on master of git://github.com/tmlind/linux.git Kernel version is 3.1.0-rc6 and last commit on top of which these patches were added is: 0c2838d00350afc5259730c35bbda81598e8875f: Linux-omap rebuilt: Updated to -rc7, merged in dmtimer Cc: Sanjeev Premi --- Changes in v3: * Reworked against the cleaned-up voltage management layer. Changes in v2: * TWL4030 CORE and POWER drivers are no longer built only for ARM and OMAP * changed comments to mark AM35x voltgate-scaling code as ad hoc Abhilash K V (2): AM35x: voltage: Basic initialization OMAP3: Remove auto-selection of PMICs Sanjeev Premi (1): OMAP3: Add support for TPS65023 (AM35x only) arch/arm/configs/omap2plus_defconfig |3 + arch/arm/mach-omap2/Kconfig |3 - arch/arm/mach-omap2/Makefile |3 +- arch/arm/mach-omap2/omap_opp_data.h |1 + arch/arm/mach-omap2/opp3xxx_data.c|9 +++ arch/arm/mach-omap2/pm.c |1 + arch/arm/mach-omap2/pm.h |9 +++ arch/arm/mach-omap2/pmic_tps65023.c | 84 + arch/arm/mach-omap2/voltagedomains3xxx_data.c | 10 +++- drivers/mfd/Kconfig |2 +- 10 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 3/3] OMAP3: Remove auto-selection of PMICs
The current implementation almost assumes that only TWL4030/TWL5030/TWl6030 are (or can be) used with the OMAP processors. This is, however, not true. This patch removes the automatic selection of the PMIC from Kconfig. All currently used PMICs are now added to omap2plus_defconfig; any new PMIC that gets supported in future could now be enabled here rather than by changing Kconfig for ARCH_OMAP2PLUS_TYPICAL Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/configs/omap2plus_defconfig |3 +++ arch/arm/mach-omap2/Kconfig |3 --- drivers/mfd/Kconfig |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index d5f00d7..076b131 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -130,6 +130,9 @@ CONFIG_POWER_SUPPLY=y CONFIG_WATCHDOG=y CONFIG_OMAP_WATCHDOG=y CONFIG_TWL4030_WATCHDOG=y +CONFIG_MENELAUS=y +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_POWER=y CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_TPS65023=y CONFIG_REGULATOR_TPS6507X=y diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 7edf802..d40f6d2 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -15,9 +15,6 @@ config ARCH_OMAP2PLUS_TYPICAL select I2C select I2C_OMAP select MFD_SUPPORT - select MENELAUS if ARCH_OMAP2 - select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 - select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 help Compile a kernel suitable for booting most boards diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 21574bd..72e15c8 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -238,7 +238,7 @@ config TWL4030_MADC config TWL4030_POWER bool "Support power resources on TWL4030 family chips" - depends on TWL4030_CORE && ARM + depends on TWL4030_CORE help Say yes here if you want to use the power resources on the TWL4030 family chips. Most of these resources are regulators, -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 2/3] OMAP3: Add support for TPS65023 (AM35x only)
From: Sanjeev Premi This patch adds support for TPS65023 used with OMAP3 devices. The PMIC is currently hooked to AM35x devices, but can easily be extended for other OMAP3 devices. Signed-off-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/Makefile|3 +- arch/arm/mach-omap2/pm.c|1 + arch/arm/mach-omap2/pm.h|9 arch/arm/mach-omap2/pmic_tps65023.c | 84 +++ 4 files changed, 96 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-omap2/pmic_tps65023.c diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 46a3497..e71e4bc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -18,7 +18,8 @@ obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o -obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_TWL4030_CORE) += omap_twl.o +obj-$(CONFIG_REGULATOR_TPS65023) += pmic_tps65023.o # SMP support ONLY available for OMAP4 obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index da71abc..bb64383 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -255,6 +255,7 @@ static int __init omap2_common_pm_late_init(void) if (omap3_has_sr()) omap3_twl_init(); omap4_twl_init(); + omap3_tps65023_init(); /* Init the voltage layer */ omap_voltage_late_init(); diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 4e166ad..ce028f6 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -133,5 +133,14 @@ static inline int omap4_twl_init(void) return -EINVAL; } #endif +#ifdef CONFIG_REGULATOR_TPS65023 +extern int omap3_tps65023_init(void); +#else +static inline int omap3_tps65023_init(void) +{ + return -EINVAL; +} +#endif + #endif diff --git a/arch/arm/mach-omap2/pmic_tps65023.c b/arch/arm/mach-omap2/pmic_tps65023.c new file mode 100644 index 000..415d804 --- /dev/null +++ b/arch/arm/mach-omap2/pmic_tps65023.c @@ -0,0 +1,84 @@ +/** + * Implements support for TPS65023 + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include + +#include "voltage.h" + +#include "pm.h" + +#defineTPS65023_VDCDC1_MIN 80 /* 0.8V */ +#defineTPS65023_VDCDC1_STEP25000 /* 0.025V */ + + +/* + * Get voltage corresponding to specified vsel value using this formula: + * Vout = 0.8V + (25mV x Vsel) + */ +static unsigned long tps65023_vsel_to_uv(const u8 vsel) +{ + return TPS65023_VDCDC1_MIN + (TPS65023_VDCDC1_STEP * vsel); +} + +/* + * Get vsel value corresponding to specified voltage using this formula: + * Vsel = (Vout - 0.8V)/ 25mV + */ +static u8 tps65023_uv_to_vsel(unsigned long uv) +{ + return DIV_ROUND_UP(uv - TPS65023_VDCDC1_MIN, TPS65023_VDCDC1_STEP); +} + +/* + * TPS65023 is currently supported only for AM35x devices. + * Therefore, implementation below is specific to this device pair. + */ + +/** + * Voltage information related to the MPU voltage domain of the + * AM35x processors - in relation to the TPS65023. + */ +static struct omap_voltdm_pmic tps65023_am35xx_mpu_volt_info = { + .step_size = 25000, + .on_volt= 120, + .vsel_to_uv = tps65023_vsel_to_uv, + .uv_to_vsel = tps65023_uv_to_vsel, +}; + +int __init omap3_tps65023_init(void) +{ + struct voltagedomain *voltdm; + + if (!cpu_is_omap34xx()) + return -ENODEV; + + if (cpu_is_omap3505() || cpu_is_omap3517()) { + voltdm = voltdm_lookup("mpu"); + omap_voltage_register_pmic(voltdm, + &tps65023_am35xx_mpu_volt_info); + voltdm = voltdm_lookup("core"); + omap_voltage_register_pmic(voltdm, + &tps65023_am35xx_mpu_volt_info); + } else { + /* TODO: +* Support for other devices that support TPS65023 +*/ + } + + return 0; +} -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 0/3] AM3517: Booting up
From: Abhilash K V This patch-set gets the kernel booting up on a AM3517 EVM. The board is able to boot with ramdisk after this,but the MMC and Ethernet drivers are not up yet. Lots of warnings remain which will be addressed in subsequent patches. The patches are tested on master of git://github.com/tmlind/linux.git Kernel version is 3.1.0-rc8 and last commit on top of which these patches were added is: 1dd8838c74476fe13e51334ad2444e6c963cf5ff: Linux-omap rebuilt: Updated to -rc8, merged l3 fixes Cc: Sanjeev Premi --- Changes in v5: -[1/3] was reworked to use the new method to select hwmods between different omap3 variants/revisions. -minor code reformatting in [3/3] Changes in v4: -Rebased and tested against the latest 3.1.0-rc6. -Added a patch [3/3] to check for missing PMIC info in vp init. Changes in v3: Presence of SR feature is now used to decide if TWL4030 initialisation is to be done or not. Changes in v2: Incorporated Kevin's comments to add SmartReflex as a FEATURE, and use omap3_has_sr() to fall out of omap3_twl_init() for AM35x case. Abhilash K V (3): AM35x: Using OMAP3 generic hwmods omap_twl: Prevent SR to enable for am3517/am3505 devices OMAP2+: voltage: add check for missing PMIC info in vp init arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 17 - arch/arm/mach-omap2/pm.c |3 ++- arch/arm/mach-omap2/vp.c |7 +++ arch/arm/plat-omap/include/plat/cpu.h |2 ++ 5 files changed, 24 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
From: Abhilash K V In case of AM3517 & AM3505, SmartReflex is not applicable so we must not enable it. So omap3_twl_init() is now not called when the processor does not support SR. Signed-off-by: Vaibhav Hiremath Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/id.c |2 +- arch/arm/mach-omap2/pm.c |3 ++- arch/arm/plat-omap/include/plat/cpu.h |2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index d27daf9..b7e3082 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -188,7 +188,7 @@ static void __init omap3_check_features(void) if (cpu_is_omap3630()) omap_features |= OMAP3_HAS_192MHZ_CLK; if (!cpu_is_omap3505() && !cpu_is_omap3517()) - omap_features |= OMAP3_HAS_IO_WAKEUP; + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR); omap_features |= OMAP3_HAS_SDRC; diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 0844e2e..6835198 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -250,7 +250,8 @@ postcore_initcall(omap2_common_pm_init); static int __init omap2_common_pm_late_init(void) { /* Init the OMAP TWL parameters */ - omap3_twl_init(); + if (omap3_has_sr()) + omap3_twl_init(); omap4_twl_init(); /* Init the voltage layer */ diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 2f90269..cc6fcd3 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -413,6 +413,7 @@ extern u32 omap_features; #define OMAP4_HAS_MPU_1GHZ BIT(8) #define OMAP4_HAS_MPU_1_2GHZ BIT(9) #define OMAP4_HAS_MPU_1_5GHZ BIT(10) +#define OMAP3_HAS_SR BIT(11) #define OMAP3_HAS_FEATURE(feat,flag) \ @@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP) OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) OMAP3_HAS_FEATURE(sdrc, SDRC) +OMAP3_HAS_FEATURE(sr, SR) /* * Runtime detection of OMAP4 features -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
From: Abhilash K V If PMIC info is not available in omap_vp_init(), abort. Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/vp.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 66bd700..0ed3d13 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c @@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm) u32 val, sys_clk_rate, timeout, waittime; u32 vddmin, vddmax, vstepmin, vstepmax; + if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { + pr_err("%s: PMIC info requried to configure VP for " + "vdd_%s not populated.Hence cannot initialize VP\n", + __func__, voltdm->name); + return; + } + if (!voltdm->read || !voltdm->write) { pr_err("%s: No read/write API for accessing vdd_%s regs\n", __func__, voltdm->name); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 1/3] AM35x: Using OMAP3 generic hwmods
From: Abhilash K V Removing modules iva, sr1_hwmod, sr2_hwmod, mailbox from the base omap3xxx_hwmods list, so that they can be excluded for am35x. Signed-off-by: Abhilash K V --- New in v5: reworked to use the new approach to select device-specific hwmods as suggested by PaulW here http://marc.info/?l=linux-kernel&m=131671863104802&w=2 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 3008e16..8de6dc4 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3159,7 +3159,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_mmc2_hwmod, &omap3xxx_mmc3_hwmod, &omap3xxx_mpu_hwmod, - &omap3xxx_iva_hwmod, &omap3xxx_timer1_hwmod, &omap3xxx_timer2_hwmod, @@ -3188,8 +3187,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_i2c1_hwmod, &omap3xxx_i2c2_hwmod, &omap3xxx_i2c3_hwmod, - &omap34xx_sr1_hwmod, - &omap34xx_sr2_hwmod, /* gpio class */ &omap3xxx_gpio1_hwmod, @@ -3211,8 +3208,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_mcbsp2_sidetone_hwmod, &omap3xxx_mcbsp3_sidetone_hwmod, - /* mailbox class */ - &omap3xxx_mailbox_hwmod, /* mcspi class */ &omap34xx_mcspi1, @@ -3225,31 +3220,43 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { /* 3430ES1-only hwmods */ static __initdata struct omap_hwmod *omap3430es1_hwmods[] = { + &omap3xxx_iva_hwmod, &omap3430es1_dss_core_hwmod, + /* mailbox class */ + &omap3xxx_mailbox_hwmod, NULL }; /* 3430ES2+-only hwmods */ static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = { + &omap3xxx_iva_hwmod, &omap3xxx_dss_core_hwmod, &omap3xxx_usbhsotg_hwmod, + /* mailbox class */ + &omap3xxx_mailbox_hwmod, NULL }; /* 34xx-only hwmods (all ES revisions) */ static __initdata struct omap_hwmod *omap34xx_hwmods[] = { + &omap3xxx_iva_hwmod, &omap34xx_sr1_hwmod, &omap34xx_sr2_hwmod, + /* mailbox class */ + &omap3xxx_mailbox_hwmod, NULL }; /* 36xx-only hwmods (all ES revisions) */ static __initdata struct omap_hwmod *omap36xx_hwmods[] = { + &omap3xxx_iva_hwmod, &omap3xxx_uart4_hwmod, &omap3xxx_dss_core_hwmod, &omap36xx_sr1_hwmod, &omap36xx_sr2_hwmod, &omap3xxx_usbhsotg_hwmod, + /* mailbox class */ + &omap3xxx_mailbox_hwmod, NULL }; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html