[PATCH] OMAP4: voltage: Populate missing .vp/.vc_common pointers

Rajendra Nayak rnayak at ti.com
Thu Feb 24 06:12:25 EST 2011


The common_data for vp and vc on OMAP4 is defined
but not hooked up with the corresponding
vp/vc_data.
This causes an abort at bootup on OMAP4, as the
framework api's assumes these to be present.

While here, also rename omap4_vp_data to
omap4_vp_common and omap4_vc_data to
omap4_vc_common to maintain consistency in
naming structs across all OMAPs.

Signed-off-by: Rajendra Nayak <rnayak at ti.com>
---
 arch/arm/mach-omap2/vc44xx_data.c |    5 ++++-
 arch/arm/mach-omap2/vp44xx_data.c |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/vc44xx_data.c
b/arch/arm/mach-omap2/vc44xx_data.c
index 548cb06..a98da8d 100644
--- a/arch/arm/mach-omap2/vc44xx_data.c
+++ b/arch/arm/mach-omap2/vc44xx_data.c
@@ -30,7 +30,7 @@
  * VC data common to 44xx chips
  * XXX This stuff presumably belongs in the vc3xxx.c or vc.c file.
  */
-static const struct omap_vc_common_data omap4_vc_data = {
+static const struct omap_vc_common_data omap4_vc_common = {
 	.smps_sa_reg = OMAP4_PRM_VC_SMPS_SA_OFFSET,
 	.smps_volra_reg = OMAP4_PRM_VC_VAL_SMPS_RA_VOL_OFFSET,
 	.bypass_val_reg = OMAP4_PRM_VC_VAL_BYPASS_OFFSET,
@@ -47,6 +47,7 @@ static const struct omap_vc_common_data omap4_vc_data =
{

 /* VC instance data for each controllable voltage line */
 struct omap_vc_instance_data omap4_vc_mpu_data = {
+	.vc_common = &omap4_vc_common,
 	.cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_MPU_L_OFFSET,
 	.smps_sa_shift = OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_SHIFT,
 	.smps_sa_mask = OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK,
@@ -55,6 +56,7 @@ struct omap_vc_instance_data omap4_vc_mpu_data = {
 };

 struct omap_vc_instance_data omap4_vc_iva_data = {
+	.vc_common = &omap4_vc_common,
 	.cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_IVA_L_OFFSET,
 	.smps_sa_shift = OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_SHIFT,
 	.smps_sa_mask = OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK,
@@ -63,6 +65,7 @@ struct omap_vc_instance_data omap4_vc_iva_data = {
 };

 struct omap_vc_instance_data omap4_vc_core_data = {
+	.vc_common = &omap4_vc_common,
 	.cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_CORE_L_OFFSET,
 	.smps_sa_shift = OMAP4430_SA_VDD_CORE_L_0_6_SHIFT,
 	.smps_sa_mask = OMAP4430_SA_VDD_CORE_L_0_6_MASK,
diff --git a/arch/arm/mach-omap2/vp44xx_data.c
b/arch/arm/mach-omap2/vp44xx_data.c
index 7b26f75..65d1ad6 100644
--- a/arch/arm/mach-omap2/vp44xx_data.c
+++ b/arch/arm/mach-omap2/vp44xx_data.c
@@ -31,7 +31,7 @@
  * VP data common to 44xx chips
  * XXX This stuff presumably belongs in the vp44xx.c or vp.c file.
  */
-static const struct omap_vp_common_data omap4_vp_data = {
+static const struct omap_vp_common_data omap4_vp_common = {
 	.vpconfig_erroroffset_shift = OMAP4430_ERROROFFSET_SHIFT,
 	.vpconfig_errorgain_mask = OMAP4430_ERRORGAIN_MASK,
 	.vpconfig_errorgain_shift = OMAP4430_ERRORGAIN_SHIFT,
@@ -56,6 +56,7 @@ static const struct omap_vp_prm_irqst_data
omap4_vp_mpu_prm_irqst_data = {
 };

 struct omap_vp_instance_data omap4_vp_mpu_data = {
+	.vp_common = &omap4_vp_common,
 	.vpconfig = OMAP4_PRM_VP_MPU_CONFIG_OFFSET,
 	.vstepmin = OMAP4_PRM_VP_MPU_VSTEPMIN_OFFSET,
 	.vstepmax = OMAP4_PRM_VP_MPU_VSTEPMAX_OFFSET,
@@ -71,6 +72,7 @@ static const struct omap_vp_prm_irqst_data
omap4_vp_iva_prm_irqst_data = {
 };

 struct omap_vp_instance_data omap4_vp_iva_data = {
+	.vp_common = &omap4_vp_common,
 	.vpconfig = OMAP4_PRM_VP_IVA_CONFIG_OFFSET,
 	.vstepmin = OMAP4_PRM_VP_IVA_VSTEPMIN_OFFSET,
 	.vstepmax = OMAP4_PRM_VP_IVA_VSTEPMAX_OFFSET,
@@ -86,6 +88,7 @@ static const struct omap_vp_prm_irqst_data
omap4_vp_core_prm_irqst_data = {
 };

 struct omap_vp_instance_data omap4_vp_core_data = {
+	.vp_common = &omap4_vp_common,
 	.vpconfig = OMAP4_PRM_VP_CORE_CONFIG_OFFSET,
 	.vstepmin = OMAP4_PRM_VP_CORE_VSTEPMIN_OFFSET,
 	.vstepmax = OMAP4_PRM_VP_CORE_VSTEPMAX_OFFSET,
-- 
1.7.0.4

>
> This series is available from git://git.pwsan.com/linux-2.6 in the
> 'voltage_split_2.6.39' branch.
>
>
> - Paul
>
>
> ---
>
> voltage_split_2.6.39
>    text	   data	    bss	    dec	    hex	filename
> 5766071	 488104	5596920	11851095	 b4d557
vmlinux.omap2plus_defconfig.orig
> 5765631	 487848	5596920	11850399	 b4d29f
vmlinux.omap2plus_defconfig
>
>
> Paul Walmsley (3):
>       OMAP: smartreflex: move plat/smartreflex.h to
mach-omap2/smartreflex.h
>       OMAP: voltage: move plat/voltage.h to mach-omap2/voltage.h
>       OMAP2+: voltage: reorganize, split code from data
>
>
>  arch/arm/mach-omap2/Makefile                  |   20
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c    |    2
>  arch/arm/mach-omap2/omap_opp_data.h           |   12
>  arch/arm/mach-omap2/omap_twl.c                |    2
>  arch/arm/mach-omap2/opp3xxx_data.c            |   44 +
>  arch/arm/mach-omap2/opp4xxx_data.c            |   30 +
>  arch/arm/mach-omap2/pm.c                      |    2
>  arch/arm/mach-omap2/smartreflex-class3.c      |    2
>  arch/arm/mach-omap2/smartreflex.c             |    2
>  arch/arm/mach-omap2/smartreflex.h             |    3
>  arch/arm/mach-omap2/sr_device.c               |    4
>  arch/arm/mach-omap2/vc.h                      |   83 ++
>  arch/arm/mach-omap2/vc3xxx_data.c             |   63 ++
>  arch/arm/mach-omap2/vc44xx_data.c             |   72 ++
>  arch/arm/mach-omap2/voltage.c                 | 1019
+++++++------------------
>  arch/arm/mach-omap2/voltage.h                 |   66 ++
>  arch/arm/mach-omap2/voltagedomains3xxx_data.c |  104 +++
>  arch/arm/mach-omap2/voltagedomains44xx_data.c |  108 +++
>  arch/arm/mach-omap2/vp.h                      |  143 ++++
>  arch/arm/mach-omap2/vp3xxx_data.c             |   82 ++
>  arch/arm/mach-omap2/vp44xx_data.c             |   97 ++
>  arch/arm/plat-omap/include/plat/omap_hwmod.h  |    1
>  22 files changed, 1203 insertions(+), 758 deletions(-)
>  rename arch/arm/{plat-omap/include/plat/smartreflex.h =>
mach-omap2/smartreflex.h} (99%)
>  create mode 100644 arch/arm/mach-omap2/vc.h
>  create mode 100644 arch/arm/mach-omap2/vc3xxx_data.c
>  create mode 100644 arch/arm/mach-omap2/vc44xx_data.c
>  rename arch/arm/{plat-omap/include/plat/voltage.h =>
mach-omap2/voltage.h} (68%)
>  create mode 100644 arch/arm/mach-omap2/voltagedomains3xxx_data.c
>  create mode 100644 arch/arm/mach-omap2/voltagedomains44xx_data.c
>  create mode 100644 arch/arm/mach-omap2/vp.h
>  create mode 100644 arch/arm/mach-omap2/vp3xxx_data.c
>  create mode 100644 arch/arm/mach-omap2/vp44xx_data.c
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--20cf30433eeccc95c2049d05ecaa
Content-Type: application/octet-stream; 
	name="0001-OMAP4-voltage-Populate-missing-.vp-.vc_common-pointe.patch"
Content-Disposition: attachment; 
	filename="0001-OMAP4-voltage-Populate-missing-.vp-.vc_common-pointe.patch"
Content-Transfer-Encoding: base64
X-Attachment-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