From patchwork Tue Aug 23 20:18:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1089782 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7NK7FWV002549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Aug 2011 20:07:36 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QvxFZ-0004KC-Ok; Tue, 23 Aug 2011 20:07:05 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QvxFZ-000396-BF; Tue, 23 Aug 2011 20:07:05 +0000 Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11] helo=TX2EHSOBE001.bigfish.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QvxFV-00038n-V2 for linux-arm-kernel@lists.infradead.org; Tue, 23 Aug 2011 20:07:03 +0000 Received: from mail31-tx2-R.bigfish.com (10.9.14.250) by TX2EHSOBE001.bigfish.com (10.9.40.21) with Microsoft SMTP Server id 14.1.225.22; Tue, 23 Aug 2011 20:06:59 +0000 Received: from mail31-tx2 (localhost.localdomain [127.0.0.1]) by mail31-tx2-R.bigfish.com (Postfix) with ESMTP id 80B425A4023C; Tue, 23 Aug 2011 20:06:59 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail31-tx2 (localhost.localdomain [127.0.0.1]) by mail31-tx2 (MessageSwitch) id 1314130019312482_21988; Tue, 23 Aug 2011 20:06:59 +0000 (UTC) Received: from TX2EHSMHS015.bigfish.com (unknown [10.9.14.240]) by mail31-tx2.bigfish.com (Postfix) with ESMTP id 3D4F94C9004B; Tue, 23 Aug 2011 20:06:59 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS015.bigfish.com (10.9.99.115) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 23 Aug 2011 20:06:59 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.323.2; Tue, 23 Aug 2011 15:06:58 -0500 Received: from localhost.localdomain ([10.29.240.182]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p7NK6tWj028599; Tue, 23 Aug 2011 15:06:56 -0500 (CDT) From: Fabio Estevam To: Subject: [PATCH 1/2] ARM: imx: Add PATA resources for other i.MX processors Date: Tue, 23 Aug 2011 17:18:06 -0300 Message-ID: <1314130687-27523-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.6.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110823_160702_179385_FC77F039 X-CRM114-Status: GOOD ( 16.41 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [65.55.88.11 listed in list.dnswl.org] Cc: Fabio Estevam , arnaud.patard@rtp-net.org, kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 23 Aug 2011 20:07:36 +0000 (UTC) MX27/31/35/53 also have PATA block. Add PATA resources for them. Signed-off-by: Fabio Estevam --- In order to avoid breaking MX51 PATA support the following patch is needed: http://git.pengutronix.de/?p=imx/linux-2.6.git;a=commitdiff;h=1a1952779b8e92a404dceaecca70ba120bea2d94 arch/arm/plat-mxc/devices/platform-pata_imx.c | 29 +++++++++++++++++++--- arch/arm/plat-mxc/include/mach/devices-common.h | 1 + arch/arm/plat-mxc/include/mach/mx35.h | 2 +- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c b/arch/arm/plat-mxc/devices/platform-pata_imx.c index c1cbaf9..b67ad9e 100644 --- a/arch/arm/plat-mxc/devices/platform-pata_imx.c +++ b/arch/arm/plat-mxc/devices/platform-pata_imx.c @@ -6,24 +6,45 @@ #include #include -#define imx_pata_imx_data_entry_single(soc) \ +#define imx_pata_imx_data_entry_single(soc, _size) \ { \ .iobase = soc ## _ATA_BASE_ADDR, \ - .irq = soc ## _MXC_INT_ATA, \ + .iosize = _size, \ + .irq = soc ## _INT_ATA, \ } +#ifdef CONFIG_SOC_IMX27 +const struct imx_pata_imx_data imx27_pata_imx_data __initconst = + imx_pata_imx_data_entry_single(MX27, SZ_4K); +#endif /* ifdef CONFIG_SOC_IMX27 */ + +#ifdef CONFIG_SOC_IMX31 +const struct imx_pata_imx_data imx31_pata_imx_data __initconst = + imx_pata_imx_data_entry_single(MX31, SZ_16K); +#endif /* ifdef CONFIG_SOC_IMX31 */ + +#ifdef CONFIG_SOC_IMX35 +const struct imx_pata_imx_data imx35_pata_imx_data __initconst = + imx_pata_imx_data_entry_single(MX35, SZ_16K); +#endif /* ifdef CONFIG_SOC_IMX35 */ + #ifdef CONFIG_SOC_IMX51 const struct imx_pata_imx_data imx51_pata_imx_data __initconst = - imx_pata_imx_data_entry_single(MX51); + imx_pata_imx_data_entry_single(MX51, SZ_16K); #endif /* ifdef CONFIG_SOC_IMX51 */ +#ifdef CONFIG_SOC_IMX53 +const struct imx_pata_imx_data imx53_pata_imx_data __initconst = + imx_pata_imx_data_entry_single(MX53, SZ_16K); +#endif /* ifdef CONFIG_SOC_IMX53 */ + struct platform_device *__init imx_add_pata_imx( const struct imx_pata_imx_data *data) { struct resource res[] = { { .start = data->iobase, - .end = data->iobase + SZ_16K - 1, + .end = data->iobase + data->iobase - 1, .flags = IORESOURCE_MEM, }, { diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 1b76c67..4cbad45 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h @@ -253,6 +253,7 @@ struct platform_device *__init imx_add_mxc_nand( struct imx_pata_imx_data { resource_size_t iobase; + resource_size_t iosize; resource_size_t irq; }; struct platform_device *__init imx_add_pata_imx( diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h index d13dbfe..80965a9 100644 --- a/arch/arm/plat-mxc/include/mach/mx35.h +++ b/arch/arm/plat-mxc/include/mach/mx35.h @@ -36,7 +36,7 @@ #define MX35_UART3_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x0c000) #define MX35_CSPI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x10000) #define MX35_SSI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x14000) -#define MX35_ATA_DMA_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x20000) +#define MX35_ATA_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x20000) #define MX35_MSHC1_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x24000) #define MX35_FEC_BASE_ADDR 0x50038000 #define MX35_SPBA_CTRL_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x3c000)