From patchwork Sat Feb 26 12:25:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lesly A M X-Patchwork-Id: 592371 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1QCMXU2026198 for ; Sat, 26 Feb 2011 12:22:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752168Ab1BZMWk (ORCPT ); Sat, 26 Feb 2011 07:22:40 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:51958 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165Ab1BZMWi (ORCPT ); Sat, 26 Feb 2011 07:22:38 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1QCMZ3I000584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 26 Feb 2011 06:22:37 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p1QCMJeI021470; Sat, 26 Feb 2011 17:52:32 +0530 (IST) From: Lesly A M To: linux-omap@vger.kernel.org Cc: Lesly A M , Nishanth Menon , David Derrick , Samuel Ortiz Subject: [PATCH 7/8] omap3430: Updating the board file to use TWL4030 scripts Date: Sat, 26 Feb 2011 17:55:38 +0530 Message-Id: <1298723139-1693-8-git-send-email-leslyam@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1298723139-1693-1-git-send-email-leslyam@ti.com> References: <1298723139-1693-1-git-send-email-leslyam@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 26 Feb 2011 12:22:41 +0000 (UTC) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 742ca67..bb11329 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -175,7 +175,8 @@ obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \ hsmmc.o obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \ hsmmc.o \ - board-flash.o + board-flash.o \ + twl4030.o obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o \ sdram-nokia.o \ diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 813893b..a0bb530 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -46,6 +46,7 @@ #include "mux.h" #include "sdram-qimonda-hyb18m512160af-6.h" #include "hsmmc.h" +#include "twl4030.h" #include "pm.h" #include "control.h" @@ -425,96 +426,6 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = { .irq_line = 1, }; - -static struct twl4030_ins __initdata sleep_on_seq[] = { - /* Turn off HFCLKOUT */ - {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_OFF), 2}, - /* Turn OFF VDD1 */ - {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 2}, - /* Turn OFF VDD2 */ - {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2}, - /* Turn OFF VPLL1 */ - {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 2}, -}; - -static struct twl4030_script sleep_on_script __initdata = { - .script = sleep_on_seq, - .size = ARRAY_SIZE(sleep_on_seq), - .flags = TWL4030_SLEEP_SCRIPT, -}; - -static struct twl4030_ins wakeup_p12_seq[] __initdata = { - /* Turn on HFCLKOUT */ - {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2}, - /* Turn ON VDD1 */ - {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 2}, - /* Turn ON VDD2 */ - {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 2}, - /* Turn ON VPLL1 */ - {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 2}, -}; - -static struct twl4030_script wakeup_p12_script __initdata = { - .script = wakeup_p12_seq, - .size = ARRAY_SIZE(wakeup_p12_seq), - .flags = TWL4030_WAKEUP12_SCRIPT, -}; - -static struct twl4030_ins wakeup_p3_seq[] __initdata = { - {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2}, -}; - -static struct twl4030_script wakeup_p3_script __initdata = { - .script = wakeup_p3_seq, - .size = ARRAY_SIZE(wakeup_p3_seq), - .flags = TWL4030_WAKEUP3_SCRIPT, -}; - -static struct twl4030_ins wrst_seq[] __initdata = { -/* - * Reset twl4030. - * Reset VDD1 regulator. - * Reset VDD2 regulator. - * Reset VPLL1 regulator. - * Enable sysclk output. - * Reenable twl4030. - */ - {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2}, - {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15}, - {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15}, - {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60}, - {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2}, - {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2}, -}; -static struct twl4030_script wrst_script __initdata = { - .script = wrst_seq, - .size = ARRAY_SIZE(wrst_seq), - .flags = TWL4030_WRST_SCRIPT, -}; - -static struct twl4030_script *twl4030_scripts[] __initdata = { - &sleep_on_script, - &wakeup_p12_script, - &wakeup_p3_script, - &wrst_script, -}; - -static struct twl4030_resconfig twl4030_rconfig[] = { - { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1, - .type2 = -1 }, - { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1, - .type2 = -1 }, - { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1, - .type2 = -1 }, - { 0, 0}, -}; - -static struct twl4030_power_data sdp3430_t2scripts_data __initdata = { - .scripts = twl4030_scripts, - .num = ARRAY_SIZE(twl4030_scripts), - .resource_config = twl4030_rconfig, -}; - /* * Apply all the fixed voltages since most versions of U-Boot * don't bother with that initialization. @@ -673,8 +584,8 @@ static struct twl4030_platform_data sdp3430_twldata = { .gpio = &sdp3430_gpio_data, .madc = &sdp3430_madc_data, .keypad = &sdp3430_kp_data, - .power = &sdp3430_t2scripts_data, .usb = &sdp3430_usb_data, + .power = &twl4030_generic_script, .codec = &sdp3430_codec, .vaux1 = &sdp3430_vaux1,