sh: hp6xx pata_platform support.
Drop the hd64461 I/O ops and wire up pata_platform for MMIO. Signed-off-by: Kristoffer Ericson <Kristoffer_e1@hotmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
committed by
Paul Mundt
parent
dd12666278
commit
34a780a0af
@@ -2,6 +2,7 @@
|
|||||||
* linux/arch/sh/boards/hp6xx/setup.c
|
* linux/arch/sh/boards/hp6xx/setup.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Andriy Skulysh
|
* Copyright (C) 2002 Andriy Skulysh
|
||||||
|
* Copyright (C) 2007 Kristoffer Ericson <Kristoffer_e1@hotmail.com>
|
||||||
*
|
*
|
||||||
* May be copied or modified under the terms of the GNU General Public
|
* May be copied or modified under the terms of the GNU General Public
|
||||||
* License. See linux/COPYING for more information.
|
* License. See linux/COPYING for more information.
|
||||||
@@ -10,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <asm/hd64461.h>
|
#include <asm/hd64461.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
@@ -19,6 +21,40 @@
|
|||||||
#define SCPCR 0xa4000116
|
#define SCPCR 0xa4000116
|
||||||
#define SCPDR 0xa4000136
|
#define SCPDR 0xa4000136
|
||||||
|
|
||||||
|
/* CF Slot */
|
||||||
|
static struct resource cf_ide_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = 0x15000000 + 0x1f0,
|
||||||
|
.end = 0x15000000 + 0x1f0 + 0x08 - 0x01,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = 0x15000000 + 0x1fe,
|
||||||
|
.end = 0x15000000 + 0x1fe + 0x01,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[2] = {
|
||||||
|
.start = 93,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device cf_ide_device = {
|
||||||
|
.name = "pata_platform",
|
||||||
|
.id = -1,
|
||||||
|
.num_resources = ARRAY_SIZE(cf_ide_resources),
|
||||||
|
.resource = cf_ide_resources,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device *hp6xx_devices[] __initdata = {
|
||||||
|
&cf_ide_device,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init hp6xx_devices_setup(void)
|
||||||
|
{
|
||||||
|
return platform_add_devices(hp6xx_devices, ARRAY_SIZE(hp6xx_devices));
|
||||||
|
}
|
||||||
|
|
||||||
static void __init hp6xx_setup(char **cmdline_p)
|
static void __init hp6xx_setup(char **cmdline_p)
|
||||||
{
|
{
|
||||||
u8 v8;
|
u8 v8;
|
||||||
@@ -60,41 +96,12 @@ static void __init hp6xx_setup(char **cmdline_p)
|
|||||||
v |= SCPCR_TS_ENABLE;
|
v |= SCPCR_TS_ENABLE;
|
||||||
ctrl_outw(v, SCPCR);
|
ctrl_outw(v, SCPCR);
|
||||||
}
|
}
|
||||||
|
device_initcall(hp6xx_devices_setup);
|
||||||
|
|
||||||
/*
|
|
||||||
* XXX: This is stupid, we should have a generic machine vector for the cchips
|
|
||||||
* and just wrap the platform setup code in to this, as it's the only thing
|
|
||||||
* that ends up being different.
|
|
||||||
*/
|
|
||||||
struct sh_machine_vector mv_hp6xx __initmv = {
|
struct sh_machine_vector mv_hp6xx __initmv = {
|
||||||
.mv_name = "hp6xx",
|
.mv_name = "hp6xx",
|
||||||
.mv_setup = hp6xx_setup,
|
.mv_setup = hp6xx_setup,
|
||||||
.mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
|
.mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
|
||||||
|
|
||||||
.mv_inb = hd64461_inb,
|
|
||||||
.mv_inw = hd64461_inw,
|
|
||||||
.mv_inl = hd64461_inl,
|
|
||||||
.mv_outb = hd64461_outb,
|
|
||||||
.mv_outw = hd64461_outw,
|
|
||||||
.mv_outl = hd64461_outl,
|
|
||||||
|
|
||||||
.mv_inb_p = hd64461_inb_p,
|
|
||||||
.mv_inw_p = hd64461_inw,
|
|
||||||
.mv_inl_p = hd64461_inl,
|
|
||||||
.mv_outb_p = hd64461_outb_p,
|
|
||||||
.mv_outw_p = hd64461_outw,
|
|
||||||
.mv_outl_p = hd64461_outl,
|
|
||||||
|
|
||||||
.mv_insb = hd64461_insb,
|
|
||||||
.mv_insw = hd64461_insw,
|
|
||||||
.mv_insl = hd64461_insl,
|
|
||||||
.mv_outsb = hd64461_outsb,
|
|
||||||
.mv_outsw = hd64461_outsw,
|
|
||||||
.mv_outsl = hd64461_outsl,
|
|
||||||
|
|
||||||
.mv_readw = hd64461_readw,
|
|
||||||
.mv_writew = hd64461_writew,
|
|
||||||
|
|
||||||
.mv_irq_demux = hd64461_irq_demux,
|
.mv_irq_demux = hd64461_irq_demux,
|
||||||
};
|
};
|
||||||
ALIAS_MV(hp6xx)
|
ALIAS_MV(hp6xx)
|
||||||
|
Reference in New Issue
Block a user