From patchwork Mon Aug 2 15:29:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cory Maccarrone X-Patchwork-Id: 116544 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o72FUOx8014464 for ; Mon, 2 Aug 2010 15:30:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752682Ab0HBPad (ORCPT ); Mon, 2 Aug 2010 11:30:33 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:55996 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752371Ab0HBPac (ORCPT ); Mon, 2 Aug 2010 11:30:32 -0400 Received: by iwn7 with SMTP id 7so4239745iwn.19 for ; Mon, 02 Aug 2010 08:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=XSbYIJNocc8UblhgeP2MqvqqItzrruqHYc3Rk0BnBNc=; b=JMSd2lJ4AAShbCcyr4gC/INBwtZhd6bmBjr2Nu+Dx3FmGfK+SSvJllRReNb5oRx5Po RsE0jhcR2GzOUEDexvlxN4glagsaAUGkVpaLLi+aqENOUgCtm9JLthNhNYJAIz0xgGSK YXW0EXhWg86bU+D6Gz7HRb2fQRCFuPmBrFS74= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=w9Z5pNmEqw6TATT8KEFIybJfpGBcgSBcgFnIp3vnHPbYZ2IumFkOmCMbvZka21nOG4 K2NB8ohp71z14++RFVpEjQ8IFrrt2NcAsrosHQco0hZ+caAxAfRbkYiESl5AzDoOVvrD EBz5wqCKDDMOlruKcFBWUSscdDNhnpftJTW2E= Received: by 10.231.31.202 with SMTP id z10mr6971528ibc.191.1280763031873; Mon, 02 Aug 2010 08:30:31 -0700 (PDT) Received: from localhost (97-126-99-222.tukw.qwest.net [97.126.99.222]) by mx.google.com with ESMTPS id h8sm5582463ibk.9.2010.08.02.08.30.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Aug 2010 08:30:30 -0700 (PDT) From: Cory Maccarrone To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Cory Maccarrone Subject: [PATCH 3/5] [omap1] omap7xx clocks, mux, serial fixes Date: Mon, 2 Aug 2010 08:29:34 -0700 Message-Id: <1280762976-17284-4-git-send-email-darkstar6262@gmail.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1280762976-17284-1-git-send-email-darkstar6262@gmail.com> References: <1280762976-17284-1-git-send-email-darkstar6262@gmail.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.3 (demeter.kernel.org [140.211.167.41]); Mon, 02 Aug 2010 15:30:33 +0000 (UTC) diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index ca4bd86..af54114 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c @@ -551,6 +551,24 @@ static struct clk usb_dc_ck7xx = { .enable_bit = SOFT_USB_OTG_DPLL_REQ_SHIFT, }; +static struct clk uart1_7xx = { + .name = "uart1_ck", + .ops = &clkops_generic, + /* Direct from ULPD, no parent */ + .rate = 12000000, + .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG), + .enable_bit = 9, +}; + +static struct clk uart2_7xx = { + .name = "uart2_ck", + .ops = &clkops_generic, + /* Direct from ULPD, no parent */ + .rate = 12000000, + .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG), + .enable_bit = 11, +}; + static struct clk mclk_1510 = { .name = "mclk", .ops = &clkops_generic, @@ -697,7 +715,9 @@ static struct omap_clk omap_clks[] = { /* ULPD clocks */ CLK(NULL, "uart1_ck", &uart1_1510, CK_1510 | CK_310), CLK(NULL, "uart1_ck", &uart1_16xx.clk, CK_16XX), + CLK(NULL, "uart1_ck", &uart1_7xx, CK_7XX), CLK(NULL, "uart2_ck", &uart2_ck, CK_16XX | CK_1510 | CK_310), + CLK(NULL, "uart2_ck", &uart2_7xx, CK_7XX), CLK(NULL, "uart3_ck", &uart3_1510, CK_1510 | CK_310), CLK(NULL, "uart3_ck", &uart3_16xx.clk, CK_16XX), CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310), diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index 3e98835..7835add 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c @@ -70,6 +70,10 @@ MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0) MUX_CFG_7XX("SPI_7XX_6", 9, 5, 0, 4, 0, 0) + +/* UART pins */ +MUX_CFG_7XX("UART_7XX_1", 3, 21, 0, 20, 0, 0) +MUX_CFG_7XX("UART_7XX_2", 8, 1, 6, 0, 0, 0) }; #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) #else diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 349de90..b78d074 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -122,6 +122,13 @@ void __init omap_serial_init(void) for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) { + /* Don't look at UARTs higher than 2 for omap7xx */ + if (cpu_is_omap7xx() && i > 1) { + serial_platform_data[i].membase = NULL; + serial_platform_data[i].mapbase = 0; + continue; + } + /* Static mapping, never released */ serial_platform_data[i].membase = ioremap(serial_platform_data[i].mapbase, SZ_2K); diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h index e1da7b1..aeba717 100644 --- a/arch/arm/plat-omap/include/plat/mux.h +++ b/arch/arm/plat-omap/include/plat/mux.h @@ -173,6 +173,10 @@ enum omap7xx_index { SPI_7XX_4, SPI_7XX_5, SPI_7XX_6, + + /* UART */ + UART_7XX_1, + UART_7XX_2, }; enum omap1xxx_index {