From patchwork Fri Jan 21 14:01:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishwanath BS X-Patchwork-Id: 18 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:39:15 -0000 Delivered-To: patches@linaro.org Received: by 10.147.124.10 with SMTP id b10cs148477yan; Fri, 21 Jan 2011 05:57:47 -0800 (PST) Received: by 10.151.109.11 with SMTP id l11mr787739ybm.62.1295618267085; Fri, 21 Jan 2011 05:57:47 -0800 (PST) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by mx.google.com with ESMTPS id q37si1400211yba.30.2011.01.21.05.57.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 21 Jan 2011 05:57:46 -0800 (PST) Received-SPF: pass (google.com: domain of vishwanath.bs@ti.com designates 198.47.26.153 as permitted sender) client-ip=198.47.26.153; DomainKey-Status: bad format Authentication-Results: mx.google.com; spf=pass (google.com: domain of vishwanath.bs@ti.com designates 198.47.26.153 as permitted sender) smtp.mail=vishwanath.bs@ti.com; domainkeys=neutral (bad format) header.From=@ Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p0LDvglK023398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Jan 2011 07:57:44 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p0LDvSPa010507; Fri, 21 Jan 2011 19:27:41 +0530 (IST) From: Vishwanath BS To: linux-omap@vger.kernel.org Cc: patches@linaro.org, Thara Gopinath Subject: [PATCH 10/13] OMAP3: Add voltage dependency table for VDD1. Date: Fri, 21 Jan 2011 19:31:02 +0530 Message-Id: <1295618465-15234-11-git-send-email-vishwanath.bs@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1295618465-15234-1-git-send-email-vishwanath.bs@ti.com> References: <1295618465-15234-1-git-send-email-vishwanath.bs@ti.com> From: Thara Gopinath In OMAP3, for perfomrance reasons when VDD1 is at voltage above 1.075V, VDD2 should be at 1.15V for perfomrance reasons. This patch introduce this cross VDD dependency for OMAP3 VDD1. Signed-off-by: Thara Gopinath This patch has checkpatch warnings for line over 80 chars. It is not fixed for code readability. --- arch/arm/mach-omap2/voltage.c | 42 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 40 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 92fe20d..8881c0c 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -191,6 +191,39 @@ static struct omap_volt_data omap44xx_vdd_core_volt_data[] = { VOLT_DATA_DEFINE(0, 0, 0, 0), }; +/* OMAP 3430 MPU Core VDD dependency table */ +static struct omap_vdd_dep_volt omap34xx_vdd1_vdd2_data[] = { + {.main_vdd_volt = OMAP3430_VDD_MPU_OPP1_UV, .dep_vdd_volt = OMAP4430_VDD_CORE_OPP50_UV}, + {.main_vdd_volt = OMAP3430_VDD_MPU_OPP2_UV, .dep_vdd_volt = OMAP4430_VDD_CORE_OPP50_UV}, + {.main_vdd_volt = OMAP3430_VDD_MPU_OPP3_UV, .dep_vdd_volt = OMAP4430_VDD_CORE_OPP100_UV}, + {.main_vdd_volt = OMAP3430_VDD_MPU_OPP4_UV, .dep_vdd_volt = OMAP4430_VDD_CORE_OPP100_UV}, + {.main_vdd_volt = OMAP3430_VDD_MPU_OPP5_UV, .dep_vdd_volt = OMAP4430_VDD_CORE_OPP100_UV}, + {.main_vdd_volt = 0, .dep_vdd_volt = 0}, +}; + +static struct omap_vdd_dep_info omap34xx_vdd1_dep_info[] = { + { + .name = "core", + .dep_table = omap34xx_vdd1_vdd2_data, + }, +}; + +/* OMAP 3630 MPU Core VDD dependency table */ +static struct omap_vdd_dep_volt omap36xx_vdd1_vdd2_data[] = { + {.main_vdd_volt = OMAP3630_VDD_MPU_OPP50_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP50_UV}, + {.main_vdd_volt = OMAP3630_VDD_MPU_OPP100_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP100_UV}, + {.main_vdd_volt = OMAP3630_VDD_MPU_OPP120_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP100_UV}, + {.main_vdd_volt = OMAP3630_VDD_MPU_OPP1G_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP100_UV}, + {.main_vdd_volt = 0, .dep_vdd_volt = 0}, +}; + +static struct omap_vdd_dep_info omap36xx_vdd1_dep_info[] = { + { + .name = "core", + .dep_table = omap36xx_vdd1_vdd2_data, + }, +}; + static struct dentry *voltage_dir; /* Init function pointers */ @@ -696,10 +729,15 @@ static int __init omap3_vdd_data_configure(struct omap_vdd_info *vdd) } if (!strcmp(vdd->voltdm.name, "mpu")) { - if (cpu_is_omap3630()) + if (cpu_is_omap3630()) { vdd->volt_data = omap36xx_vddmpu_volt_data; - else + vdd->dep_vdd_info = omap36xx_vdd1_dep_info; + vdd->nr_dep_vdd = ARRAY_SIZE(omap36xx_vdd1_dep_info); + } else { vdd->volt_data = omap34xx_vddmpu_volt_data; + vdd->dep_vdd_info = omap34xx_vdd1_dep_info; + vdd->nr_dep_vdd = ARRAY_SIZE(omap34xx_vdd1_dep_info); + } vdd->vp_reg.tranxdone_status = OMAP3430_VP1_TRANXDONE_ST_MASK; vdd->vc_reg.cmdval_reg = OMAP3_PRM_VC_CMD_VAL_0_OFFSET;