Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54365
b: refs/heads/master
c: 34a780a
h: refs/heads/master
i:
  54363: aef50b9
v: v3
  • Loading branch information
Kristoffer Ericson authored and Paul Mundt committed May 7, 2007
1 parent 8b4f068 commit b17157d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd12666278daa0008ac439603c8d3037bc213556
refs/heads/master: 34a780a0afeb8f99c9ca9934f4cc0822541769c6
67 changes: 37 additions & 30 deletions trunk/arch/sh/boards/hp6xx/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* linux/arch/sh/boards/hp6xx/setup.c
*
* 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
* License. See linux/COPYING for more information.
Expand All @@ -10,6 +11,7 @@
*/
#include <linux/types.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <asm/hd64461.h>
#include <asm/io.h>
#include <asm/irq.h>
Expand All @@ -19,6 +21,40 @@
#define SCPCR 0xa4000116
#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)
{
u8 v8;
Expand Down Expand Up @@ -60,41 +96,12 @@ static void __init hp6xx_setup(char **cmdline_p)
v |= SCPCR_TS_ENABLE;
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 = {
.mv_name = "hp6xx",
.mv_setup = hp6xx_setup,
.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,
};
ALIAS_MV(hp6xx)

0 comments on commit b17157d

Please sign in to comment.