From patchwork Thu Jan 26 20:46:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaccon Bastiaansen X-Patchwork-Id: 138043 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 43875B6EF7 for ; Fri, 27 Jan 2012 07:50:03 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RqWDs-0005Id-P3; Thu, 26 Jan 2012 20:47:08 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RqWDq-0005E9-JB for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2012 20:47:07 +0000 Received: by mail-ee0-f49.google.com with SMTP id b15so350417eek.36 for ; Thu, 26 Jan 2012 12:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=pFkPK5XnQvigHxxlB4WYKdQ/IE2fr38QjXbh/uPTQ08=; b=lUNITUhM73traesR3Rs3L5+FH72EMRna66OuUfh7pJ0xMsewDVu13cy+Yz3rtOKGis U5KCHHmvgaX1wXfM1foT1jVWeYOLU3jOuS4AXd+3aP2xKnwWNnUOhsxuK0JbBf3xQRqz pFHKwhpYGfVUg+m6w98htBvkPVN+6rwZ/bLE4= Received: by 10.14.3.135 with SMTP id 7mr1255936eeh.80.1327610826229; Thu, 26 Jan 2012 12:47:06 -0800 (PST) Received: from localhost.localdomain (s529d540e.adsl.wanadoo.nl. [82.157.84.14]) by mx.google.com with ESMTPS id x4sm19936979eeb.4.2012.01.26.12.47.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jan 2012 12:47:04 -0800 (PST) From: Jaccon Bastiaansen To: kernel@pengutronix.de, u.kleine-koenig@pengutronix.de, s.hauer@pengutronix.de, davem@davemloft.net, cavokz@gmail.com, linux@arm.linux.org.uk, fabio.estevam@freescale.com, festevam@gmail.com Subject: [PATCH V5 2/4] CS89x0 : add CS89x0 platform device to the iMX21ADS board Date: Thu, 26 Jan 2012 21:46:57 +0100 Message-Id: <1327610817-26927-1-git-send-email-jaccon.bastiaansen@gmail.com> X-Mailer: git-send-email 1.7.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jaccon.bastiaansen[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: netdev@vger.kernel.org, Jaccon Bastiaansen , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Add CS89x0 networking support to the iMX21ADS board by using the platform driver support in the CS89x0 driver. Signed-off-by: Jaccon Bastiaansen Acked-by: David S. Miller --- arch/arm/configs/imx_v4_v5_defconfig | 2 ++ arch/arm/mach-imx/mach-mx21ads.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletions(-) diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index 11a4192..fc0106f 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig @@ -81,6 +81,8 @@ CONFIG_NET_ETHERNET=y CONFIG_SMC91X=y CONFIG_DM9000=y CONFIG_SMC911X=y +CONFIG_CS89x0=y +CONFIG_CS89x0_PLATFORM=y # CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_10000 is not set # CONFIG_INPUT_MOUSEDEV is not set diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 25f8402..b73d4f7 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c @@ -37,8 +37,8 @@ #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ (MX21ADS_MMIO_BASE_ADDR + (offset)) +#define MX21ADS_CS8900A_MMIO_SIZE 0x200000 #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) -#define MX21ADS_CS8900A_IOBASE_REG MX21ADS_REG_ADDR(0x000000) #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) @@ -159,6 +159,18 @@ static struct platform_device mx21ads_nor_mtd_device = { .resource = &mx21ads_flash_resource, }; +static const struct resource mx21ads_cs8900_resources[] __initconst = { + DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), + DEFINE_RES_IRQ(MX21ADS_CS8900A_IRQ), +}; + +static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = { + .name = "cs89x0", + .id = 0, + .res = mx21ads_cs8900_resources, + .num_res = ARRAY_SIZE(mx21ads_cs8900_resources), +}; + static const struct imxuart_platform_data uart_pdata_rts __initconst = { .flags = IMXUART_HAVE_RTSCTS, }; @@ -292,6 +304,8 @@ static void __init mx21ads_board_init(void) imx21_add_mxc_nand(&mx21ads_nand_board_info); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); + platform_device_register_full( + (struct platform_device_info *)&mx21ads_cs8900_devinfo); } static void __init mx21ads_timer_init(void)