netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaccon Bastiaansen <jaccon.bastiaansen@gmail.com>
To: s.hauer@pengutronix.de, kernel@pengutronix.de,
	u.kleine-koenig@pengutronix.de, davem@davemloft.net,
	cavokz@gmail.com, jaccon.bastiaansen@gmail.com
Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org
Subject: [PATCH 2/4] CS89x0 : add CS89x0 platform device to the iMX21ADS board
Date: Tue,  3 Jan 2012 23:12:10 +0100	[thread overview]
Message-ID: <1325628732-14535-2-git-send-email-jaccon.bastiaansen@gmail.com> (raw)
In-Reply-To: <1325628732-14535-1-git-send-email-jaccon.bastiaansen@gmail.com>

Add CS89x0 networking support to the iMX21ADS board by using the
platform driver support in the CS89x0 driver.

Signed-off-by: Jaccon Bastiaansen <jaccon.bastiaansen@gmail.com>
---
 arch/arm/configs/imx_v4_v5_defconfig |    2 ++
 arch/arm/mach-imx/mach-mx21ads.c     |   21 +++++++++++++++++++++
 2 files changed, 23 insertions(+), 0 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..b26b49c 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -159,6 +159,26 @@ static struct platform_device mx21ads_nor_mtd_device = {
 	.resource = &mx21ads_flash_resource,
 };
 
+static struct resource mx21ads_cs8900_resources[] = {
+	{
+		.start = (u32)MX21ADS_CS8900A_IOBASE_REG,
+		.end = (u32)MX21ADS_CS8900A_IOBASE_REG + 0x200000 - 1,
+		.flags = IORESOURCE_MEM
+	},
+	{
+		.start = MX21ADS_CS8900A_IRQ,
+		.end = MX21ADS_CS8900A_IRQ,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct platform_device mx21ads_cs8900_device = {
+	.name = "cs89x0",
+	.id = 0,
+	.num_resources = ARRAY_SIZE(mx21ads_cs8900_resources),
+	.resource = mx21ads_cs8900_resources
+};
+
 static const struct imxuart_platform_data uart_pdata_rts __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
@@ -275,6 +295,7 @@ static void __init mx21ads_map_io(void)
 
 static struct platform_device *platform_devices[] __initdata = {
 	&mx21ads_nor_mtd_device,
+	&mx21ads_cs8900_device
 };
 
 static void __init mx21ads_board_init(void)
-- 
1.7.1

  reply	other threads:[~2012-01-03 22:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 22:12 [PATCH 1/4] CS89x0 : add platform driver support Jaccon Bastiaansen
2012-01-03 22:12 ` Jaccon Bastiaansen [this message]
2012-01-03 22:12 ` [PATCH 3/4] CS89x0 : add CS89x0 platform device to the iMX31ADS board Jaccon Bastiaansen
2012-01-03 22:12 ` [PATCH 4/4] CS89x0 : remove QQ2440 board support from the CS89x0 driver Jaccon Bastiaansen
2012-01-04  9:20 ` [PATCH 1/4] CS89x0 : add platform driver support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325628732-14535-2-git-send-email-jaccon.bastiaansen@gmail.com \
    --to=jaccon.bastiaansen@gmail.com \
    --cc=cavokz@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).