From: Russell King <rmk+lkml@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jeff Garzik <jgarzik@pobox.com>
Subject: [RFC] pata_platform for ARM RiscPC
Date: Fri, 30 Mar 2007 12:08:00 +0100 [thread overview]
Message-ID: <20070330110800.GB21653@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20070330110022.GA21653@flint.arm.linux.org.uk>
Add pata_platform device for RiscPC, thereby converting the primary
IDE channel on the machine to PATA.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
Since this is dependent on the previous patch (to avoid build errors)
this needs to wait until the devm_ioport patch is merged. I'll
therefore push this through the ARM tree at the appropriate time.
arch/arm/mach-rpc/riscpc.c | 35 +++++++++++++++++++++++++++++++++++
drivers/ata/Kconfig | 2 +-
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index 208a2b5..711a2db 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -17,6 +17,7 @@
#include <linux/sched.h>
#include <linux/device.h>
#include <linux/serial_8250.h>
+#include <linux/pata_platform.h>
#include <asm/elf.h>
#include <asm/io.h>
@@ -159,11 +160,45 @@ static struct plat_serial8250_port serial_platform_data[] = {
},
};
+static struct pata_platform_info pata_platform_data = {
+ .ioport_shift = 2,
+};
+
+static struct resource pata_resources[] = {
+ [0] = {
+ .start = 0x030107c0,
+ .end = 0x030107df,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = 0x03010fd8,
+ .end = 0x03010fdb,
+ .flags = IORESOURCE_MEM,
+ },
+ [2] = {
+ .start = IRQ_HARDDISK,
+ .end = IRQ_HARDDISK,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device pata_device = {
+ .name = "pata_platform",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(pata_resources),
+ .resource = pata_resources,
+ .dev = {
+ .platform_data = &pata_platform_data,
+ .coherent_dma_mask = ~0, /* grumble */
+ },
+};
+
static struct platform_device *devs[] __initdata = {
&iomd_device,
&kbd_device,
&serial_device,
&acornfb_device,
+ &pata_device,
};
static int __init rpc_init(void)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index d16b5b0..d8a9758 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -545,7 +545,7 @@ config PATA_WINBOND_VLB
config PATA_PLATFORM
tristate "Generic platform device PATA support"
- depends on EMBEDDED
+ depends on EMBEDDED || ARCH_RPC
help
This option enables support for generic directly connected ATA
devices commonly found on embedded systems.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2007-03-30 11:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-30 11:00 [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT Russell King
2007-03-30 11:08 ` Russell King [this message]
2007-04-08 10:18 ` [RFC] pata_icside driver Russell King
2007-04-08 18:59 ` Alan Cox
2007-04-09 1:03 ` Jeff Garzik
2007-04-09 9:56 ` Alan Cox
2007-04-09 10:56 ` Jeff Garzik
2007-04-09 11:13 ` Jeff Garzik
2007-04-09 11:36 ` Russell King
2007-04-09 12:02 ` Jeff Garzik
2007-04-08 20:09 ` Alan Cox
2007-04-09 8:18 ` Russell King
2007-04-09 8:24 ` Roland Dreier
2007-04-09 8:44 ` Russell King
2007-04-09 10:25 ` Alan Cox
2007-04-09 11:33 ` Russell King
2007-04-21 15:09 ` Russell King
2007-04-09 11:32 ` [RFC] pata_platform for ARM RiscPC Jeff Garzik
2007-03-30 11:08 ` [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT Christoph Hellwig
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=20070330110800.GB21653@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome