diff options
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/ldo.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/ldo3xxx_data.c | 49 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm2xxx_3xxx.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 |
5 files changed, 58 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index e33e864..f02eaba 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -103,7 +103,7 @@ obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) \ voltagedomains2xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ voltagedomains3xxx_data.o \ - ldo.o + ldo.o ldo3xxx_data.o obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ voltagedomains44xx_data.o \ ldo.o diff --git a/arch/arm/mach-omap2/ldo.h b/arch/arm/mach-omap2/ldo.h index c27133b..b595a64 100644 --- a/arch/arm/mach-omap2/ldo.h +++ b/arch/arm/mach-omap2/ldo.h @@ -99,6 +99,8 @@ struct omap_ldo_abb_instance { int __cur_abb_type; }; +extern struct omap_ldo_abb_instance omap3630_ldo_abb_mpu_instance; + extern int omap_ldo_abb_pre_scale(struct voltagedomain *voltdm, unsigned long target_volt); extern int omap_ldo_abb_post_scale(struct voltagedomain *voltdm, diff --git a/arch/arm/mach-omap2/ldo3xxx_data.c b/arch/arm/mach-omap2/ldo3xxx_data.c new file mode 100644 index 0000000..870a912 --- /dev/null +++ b/arch/arm/mach-omap2/ldo3xxx_data.c @@ -0,0 +1,49 @@ +/* + * OMAP3xxx LDO data + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * Mike Turquette <mturquette@ti.com> + * Nishanth Menon + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "voltage.h" +#include "ldo.h" +#include "prm2xxx_3xxx.h" +#include "prm-regbits-34xx.h" + +static struct omap_ldo_abb_ops omap3630_ldo_abb_ops = { + .check_txdone = omap36xx_prm_abb_check_txdone, + .clear_txdone = omap36xx_prm_abb_clear_txdone, +}; + +/* WARNING: OMAP3630 as per TRM rev J, has the register names inverted */ + +static struct omap_ldo_abb_setup_bits omap3630_ldo_abb_setup_bits = { + .enable_mask = OMAP_LDO_ABB_SETUP_SR2EN_MASK, + .active_fbb_mask = OMAP_LDO_ABB_SETUP_ACTIVE_FBB_SEL_MASK, + .wait_count_mask = OMAP_LDO_ABB_SETUP_SR2_WTCNT_VALUE_MASK, +}; + +static struct omap_ldo_abb_ctrl_bits omap3630_ldo_abb_ctrl_bits = { + .in_tansition_mask = OMAP_LDO_ABB_CTRL_SR2_IN_TRANSITION_MASK, + .status_mask = OMAP_LDO_ABB_CTRL_SR2_STATUS_MASK, + .opp_change_mask = OMAP_LDO_ABB_CTRL_OPP_CHANGE_MASK, + .opp_sel_mask = OMAP_LDO_ABB_CTRL_OPP_SEL_MASK, +}; + +struct omap_ldo_abb_instance omap3630_ldo_abb_mpu_instance = { + .prm_irq_id = OMAP3_PRM_IRQ_VDD_MPU_ID, + .ctrl_reg = OMAP3_PRM_LDO_ABB_CTRL_OFFSET, + .setup_reg = OMAP3_PRM_LDO_ABB_SETUP_OFFSET, + .ctrl_bits = &omap3630_ldo_abb_ctrl_bits, + .setup_bits = &omap3630_ldo_abb_setup_bits, + .ops = &omap3630_ldo_abb_ops, + + .settling_time = 30, + .cycle_rate = 8, + .tranx_timeout = OMAP_ABB_TRANXDONE_TIMEOUT_US, +}; diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h index 9634978..08d5f1e 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.h +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h @@ -167,6 +167,10 @@ #define OMAP3430_PRM_VP2_VOLTAGE OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00e0) #define OMAP3_PRM_VP2_STATUS_OFFSET 0x00e4 #define OMAP3430_PRM_VP2_STATUS OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00e4) +#define OMAP3_PRM_LDO_ABB_SETUP_OFFSET 0x00f0 +#define OMAP3630_PRM_LDO_ABB_SETUP OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00f0) +#define OMAP3_PRM_LDO_ABB_CTRL_OFFSET 0x00f4 +#define OMAP3630_PRM_LDO_ABB_CTRL OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00f4) #define OMAP3_PRM_CLKSEL_OFFSET 0x0040 #define OMAP3430_PRM_CLKSEL OMAP34XX_PRM_REGADDR(OMAP3430_CCR_MOD, 0x0040) diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index 8264d15..65a00ff 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -26,6 +26,7 @@ #include "voltage.h" #include "vc.h" #include "vp.h" +#include "ldo.h" /* * VDD data @@ -97,6 +98,7 @@ void __init omap3xxx_voltagedomains_init(void) omap3_vdd1_info.volt_data = omap36xx_vddmpu_volt_data; omap3_vdd2_info.volt_data = omap36xx_vddcore_volt_data; omap3_vdd1_info.dep_vdd_info = omap36xx_vddmpu_dep_info; + omap3_voltdm_mpu.abb = &omap3630_ldo_abb_mpu_instance; } else { omap3_vdd1_info.volt_data = omap34xx_vddmpu_volt_data; |