From patchwork Mon Aug 3 12:58:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Pedanekar X-Patchwork-Id: 38890 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n73D0RV9017217 for ; Mon, 3 Aug 2009 13:00:27 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n73CwT9w001838; Mon, 3 Aug 2009 07:58:34 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id n73CwSLI028840; Mon, 3 Aug 2009 07:58:29 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id E07BC80627; Mon, 3 Aug 2009 07:58:28 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp31.itg.ti.com (dbdp31.itg.ti.com [172.24.170.98]) by linux.omap.com (Postfix) with ESMTP id 2019580626 for ; Mon, 3 Aug 2009 07:58:27 -0500 (CDT) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id n73CwPrY026680; Mon, 3 Aug 2009 18:28:25 +0530 (IST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by psplinux051.india.ti.com (8.13.1/8.13.1) with ESMTP id n73CwPrk016431; Mon, 3 Aug 2009 18:28:25 +0530 Received: (from a0393588@localhost) by psplinux051.india.ti.com (8.13.1/8.13.1/Submit) id n73CwPrt016428; Mon, 3 Aug 2009 18:28:25 +0530 From: Hemant Pedanekar To: davinci-linux-open-source@linux.davincidsp.com Date: Mon, 3 Aug 2009 18:28:25 +0530 Message-Id: <1249304305-16399-1-git-send-email-hemantp@ti.com> X-Mailer: git-send-email 1.6.2.4 Cc: Subject: [PATCH v2 1/4] davinci: dm646x: Add PCI clock info and mux setup X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com Note that configuration option CONFIG_DAVINCI_RESET_CLOCKS should _not_ be selected if kernel is being built for DM646x PCI target. Slecting this option will disable the PCI PSC during kernel boot, thus preventing any access to PCI backend configuration (e.g., if PCI window needs to be changed). This problem is not applicable when kernel is loaded on Dm646x PCI host since the host setup code would call clk_enable explicitly. Signed-off-by: Hemant Pedanekar --- arch/arm/mach-davinci/dm646x.c | 11 +++++++++++ arch/arm/mach-davinci/include/mach/mux.h | 6 ++++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 8fa2803..99f4d33 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c @@ -306,6 +306,12 @@ static struct clk vpif1_clk = { .flags = ALWAYS_ENABLED, }; +static struct clk pci_clk = { + .name = "pci", + .parent = &pll1_sysclk2, + .lpsc = DM646X_LPSC_PCI, +}; + struct davinci_clk dm646x_clks[] = { CLK(NULL, "ref", &ref_clk), CLK(NULL, "aux", &aux_clkin), @@ -342,6 +348,7 @@ struct davinci_clk dm646x_clks[] = { CLK(NULL, "pwm1", &pwm1_clk), CLK(NULL, "timer0", &timer0_clk), CLK(NULL, "timer1", &timer1_clk), + CLK(NULL, "pci", &pci_clk), CLK("watchdog", NULL, &timer2_clk), CLK("palm_bk3710", NULL, &ide_clk), CLK(NULL, "vpif0", &vpif0_clk), @@ -409,6 +416,10 @@ static const struct mux_config dm646x_pins[] = { #ifdef CONFIG_DAVINCI_MUX MUX_CFG(DM646X, ATAEN, 0, 0, 5, 1, true) +MUX_CFG(DM646X, PCIEN, 0, 0, 7, 4, true) + +MUX_CFG(DM646X, HPI32EN, 0, 0, 7, 2, true) + MUX_CFG(DM646X, AUDCK1, 0, 29, 1, 0, false) MUX_CFG(DM646X, AUDCK0, 0, 28, 1, 0, false) diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index 368fca6..7ea97cf 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h @@ -94,6 +94,12 @@ enum davinci_dm646x_index { /* ATA function */ DM646X_ATAEN, + /* PCI function */ + DM646X_PCIEN, + + /* HPI 32-bit */ + DM646X_HPI32EN, + /* AUDIO Clock */ DM646X_AUDCK1, DM646X_AUDCK0,