From patchwork Wed Sep 21 20:17:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Salveti X-Patchwork-Id: 4232 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 933CB23EFD for ; Wed, 21 Sep 2011 20:18:17 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 88E14A188E1 for ; Wed, 21 Sep 2011 20:18:17 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 23so2878814fxe.11 for ; Wed, 21 Sep 2011 13:18:17 -0700 (PDT) Received: by 10.223.5.76 with SMTP id 12mr1609322fau.103.1316636297387; Wed, 21 Sep 2011 13:18:17 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.18.198 with SMTP id y6cs142609lad; Wed, 21 Sep 2011 13:18:17 -0700 (PDT) Received: by 10.236.191.101 with SMTP id f65mr8465326yhn.61.1316636296157; Wed, 21 Sep 2011 13:18:16 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id b41si7036943yhn.111.2011.09.21.13.18.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Sep 2011 13:18:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of ricardo.salveti@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of ricardo.salveti@linaro.org) smtp.mail=ricardo.salveti@linaro.org Received: by mail-yw0-f50.google.com with SMTP id 13so2822165ywm.37 for ; Wed, 21 Sep 2011 13:18:15 -0700 (PDT) Received: by 10.101.119.1 with SMTP id w1mr1185166anm.130.1316636295396; Wed, 21 Sep 2011 13:18:15 -0700 (PDT) Received: from localhost.localdomain ([189.61.233.110]) by mx.google.com with ESMTPS id h20sm24134769ann.7.2011.09.21.13.18.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Sep 2011 13:18:15 -0700 (PDT) From: Ricardo Salveti de Araujo To: u-boot@lists.denx.de Cc: patches@linaro.org, aneesh@ti.com, john.rigby@linaro.org, s-jan@ti.com, s-paulraj@ti.com, Ricardo Salveti de Araujo Subject: [PATCH 3/3] omap4: splitting padconfs into common, 4430 and 4460 Date: Wed, 21 Sep 2011 17:17:31 -0300 Message-Id: <1316636251-23961-4-git-send-email-ricardo.salveti@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1316636251-23961-1-git-send-email-ricardo.salveti@linaro.org> References: <1316636251-23961-1-git-send-email-ricardo.salveti@linaro.org> Not all padconfs are the same between 4430 and 4460, so instead of working around this with an if, we should have an specific padconf structure for both chips (like handling the differences between the LEDs GPIOs and TPS). Signed-off-by: Ricardo Salveti de Araujo 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/omap4/board.c b/arch/arm/cpu/armv7/omap4/board.c index d9639ab..b842782 100644 --- a/arch/arm/cpu/armv7/omap4/board.c +++ b/arch/arm/cpu/armv7/omap4/board.c @@ -152,9 +152,11 @@ static void set_muxconf_regs_essential(void) sizeof(wkup_padconf_array_essential) / sizeof(struct pad_conf_entry)); - /* gpio_wk7 is used for controlling TPS on 4460 */ if (omap_revision() >= OMAP4460_ES1_0) - writew(M3, CONTROL_WKUP_PAD1_FREF_CLK4_REQ); + do_set_mux(CONTROL_PADCONF_WKUP, + wkup_padconf_array_essential_4460, + sizeof(wkup_padconf_array_essential_4460) / + sizeof(struct pad_conf_entry)); } static void set_mux_conf_regs(void) diff --git a/arch/arm/cpu/armv7/omap4/omap4_mux_data.h b/arch/arm/cpu/armv7/omap4/omap4_mux_data.h index 00c52f8..b940391 100644 --- a/arch/arm/cpu/armv7/omap4/omap4_mux_data.h +++ b/arch/arm/cpu/armv7/omap4/omap4_mux_data.h @@ -73,4 +73,11 @@ const struct pad_conf_entry wkup_padconf_array_essential[] = { }; +const struct pad_conf_entry wkup_padconf_array_essential_4460[] = { + +{PAD1_FREF_CLK4_REQ, (M3)}, /* gpio_wk7, TPS */ + +}; + + #endif /* _OMAP4_MUX_DATA_H_ */ diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 9afed80..97320cb 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -71,9 +71,26 @@ void set_muxconf_regs_non_essential(void) sizeof(core_padconf_array_non_essential) / sizeof(struct pad_conf_entry)); + if (omap_revision() < OMAP4460_ES1_0) + do_set_mux(CONTROL_PADCONF_CORE, + core_padconf_array_non_essential_4430, + sizeof(core_padconf_array_non_essential_4430) / + sizeof(struct pad_conf_entry)); + else + do_set_mux(CONTROL_PADCONF_CORE, + core_padconf_array_non_essential_4460, + sizeof(core_padconf_array_non_essential_4460) / + sizeof(struct pad_conf_entry)); + do_set_mux(CONTROL_PADCONF_WKUP, wkup_padconf_array_non_essential, sizeof(wkup_padconf_array_non_essential) / sizeof(struct pad_conf_entry)); + + if (omap_revision() < OMAP4460_ES1_0) + do_set_mux(CONTROL_PADCONF_WKUP, + wkup_padconf_array_non_essential_4430, + sizeof(wkup_padconf_array_non_essential_4430) / + sizeof(struct pad_conf_entry)); } #ifdef CONFIG_GENERIC_MMC diff --git a/board/ti/panda/panda_mux_data.h b/board/ti/panda/panda_mux_data.h index 63448b6..83d0c3f 100644 --- a/board/ti/panda/panda_mux_data.h +++ b/board/ti/panda/panda_mux_data.h @@ -100,7 +100,6 @@ const struct pad_conf_entry core_padconf_array_non_essential[] = { {USBB1_HSIC_STROBE, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* usbb1_hsic_strobe */ {USBC1_ICUSB_DP, (IEN | M0)}, /* usbc1_icusb_dp */ {USBC1_ICUSB_DM, (IEN | M0)}, /* usbc1_icusb_dm */ - {ABE_MCBSP2_CLKX, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* abe_mcbsp2_clkx */ {ABE_MCBSP2_DR, (IEN | OFF_EN | OFF_OUT_PTD | M0)}, /* abe_mcbsp2_dr */ {ABE_MCBSP2_DX, (OFF_EN | OFF_OUT_PTD | M0)}, /* abe_mcbsp2_dx */ {ABE_MCBSP2_FSX, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* abe_mcbsp2_fsx */ @@ -202,6 +201,14 @@ const struct pad_conf_entry core_padconf_array_non_essential[] = { {DPM_EMU19, (IEN | M5)}, /* dispc2_data0 */ }; +const struct pad_conf_entry core_padconf_array_non_essential_4430[] = { + {ABE_MCBSP2_CLKX, (IEN | OFF_EN | OFF_PD | OFF_IN | M0)}, /* abe_mcbsp2_clkx */ +}; + +const struct pad_conf_entry core_padconf_array_non_essential_4460[] = { + {ABE_MCBSP2_CLKX, (PTU | OFF_EN | OFF_OUT_PTU | M3)}, /* led status_1 */ +}; + const struct pad_conf_entry wkup_padconf_array_non_essential[] = { {PAD0_SIM_IO, (IEN | M0)}, /* sim_io */ {PAD1_SIM_CLK, (M0)}, /* sim_clk */ @@ -214,7 +221,6 @@ const struct pad_conf_entry wkup_padconf_array_non_essential[] = { {PAD0_FREF_CLK0_OUT, (M2)}, /* sys_drm_msecure */ {PAD1_FREF_CLK3_REQ, M7}, /* safe mode */ {PAD0_FREF_CLK3_OUT, (M0)}, /* fref_clk3_out */ - {PAD1_FREF_CLK4_REQ, (PTU | M3)}, /* led status_1 */ {PAD0_FREF_CLK4_OUT, (PTU | M3)}, /* led status_2 */ {PAD0_SYS_NRESPWRON, (M0)}, /* sys_nrespwron */ {PAD1_SYS_NRESWARM, (M0)}, /* sys_nreswarm */ @@ -224,4 +230,8 @@ const struct pad_conf_entry wkup_padconf_array_non_essential[] = { {PAD1_SYS_BOOT7, (IEN | M3)}, /* gpio_wk10 */ }; +const struct pad_conf_entry wkup_padconf_array_non_essential_4430[] = { + {PAD1_FREF_CLK4_REQ, (PTU | M3)}, /* led status_1 */ +}; + #endif /* _PANDA_MUX_DATA_H_ */