From patchwork Thu May 26 03:41:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 819312 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 p4Q3fZZ6006056 for ; Thu, 26 May 2011 03:41:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752266Ab1EZDlc (ORCPT ); Wed, 25 May 2011 23:41:32 -0400 Received: from na3sys009aob106.obsmtp.com ([74.125.149.76]:53222 "EHLO na3sys009aog106.obsmtp.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751948Ab1EZDlc (ORCPT ); Wed, 25 May 2011 23:41:32 -0400 Received: from mail-gw0-f53.google.com ([74.125.83.53]) (using TLSv1) by na3sys009aob106.postini.com ([74.125.148.12]) with SMTP ID DSNKTd3L6zhZQP5kfTGAjhKjxMeUo8USh1ID@postini.com; Wed, 25 May 2011 20:41:32 PDT Received: by gwj20 with SMTP id 20so165529gwj.26 for ; Wed, 25 May 2011 20:41:30 -0700 (PDT) Received: by 10.150.143.3 with SMTP id q3mr472089ybd.102.1306381290662; Wed, 25 May 2011 20:41:30 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id t16sm252392ybe.4.2011.05.25.20.41.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2011 20:41:29 -0700 (PDT) From: Nishanth Menon To: linux-omap Cc: Nishanth Menon Subject: [RFC][PATCH 10/9] OMAP4: HWMOD: differentiate 4430 and 4460 bandgap Date: Wed, 25 May 2011 20:41:25 -0700 Message-Id: <1306381285-17764-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <[RFC][PATCH 0/9] OMAP4: Add 4460 base support> References: <[RFC][PATCH 0/9] OMAP4: Add 4460 base support> 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]); Thu, 26 May 2011 03:41:36 +0000 (UTC) OMAP4430 and 4460 have slightly different functional clocks. we need to map this back into hwmod database as well to ensure sanity. Signed-off-by: Nishanth Menon --- Depends on the series posted earlier for http://marc.info/?l=linux-omap&m=130637503008641&w=2 missed tracking this down after a last min update :( Boot tested on both SDP4430 and SDP4460 arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 30 ++++++++++++++++++++++----- 1 files changed, 24 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 27319c4..9ac9cac 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c @@ -762,11 +762,11 @@ static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = { }; /* bandgap */ -static struct omap_hwmod_opt_clk bandgap_opt_clks[] = { +static struct omap_hwmod_opt_clk bandgap443x_opt_clks[] = { { .role = "fclk", .clk = "bandgap_fclk" }, }; -static struct omap_hwmod omap44xx_bandgap_hwmod = { +static struct omap_hwmod omap443x_bandgap_hwmod = { .name = "bandgap", .class = &omap44xx_bandgap_hwmod_class, .prcm = { @@ -774,9 +774,26 @@ static struct omap_hwmod omap44xx_bandgap_hwmod = { .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, }, }, - .opt_clks = bandgap_opt_clks, - .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks), - .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX), + .opt_clks = bandgap443x_opt_clks, + .opt_clks_cnt = ARRAY_SIZE(bandgap443x_opt_clks), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), +}; + +static struct omap_hwmod_opt_clk bandgap446x_opt_clks[] = { + { .role = "fclk", .clk = "bandgap_ts_fclk" }, +}; + +static struct omap_hwmod omap446x_bandgap_hwmod = { + .name = "bandgap", + .class = &omap44xx_bandgap_hwmod_class, + .prcm = { + .omap4 = { + .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, + }, + }, + .opt_clks = bandgap446x_opt_clks, + .opt_clks_cnt = ARRAY_SIZE(bandgap446x_opt_clks), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4460), }; /* @@ -5074,7 +5091,8 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { /* &omap44xx_aess_hwmod, */ /* bandgap class */ - &omap44xx_bandgap_hwmod, + &omap443x_bandgap_hwmod, + &omap446x_bandgap_hwmod, /* counter class */ /* &omap44xx_counter_32k_hwmod, */