diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-02-01 06:06:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 11:53:20 -0500 |
commit | 37cc7943788c841b03a48c00751dfac0ad9f5b12 (patch) | |
tree | e25d4f7738b675cbb5129da9eaa6c0b56e398e1b /arch/sh/cchips | |
parent | 8d27e08191379b7a3302a33a6efdb8bdfd319c95 (diff) |
[PATCH] sh: convert voyagergx to platform device, drop sh-bus
Trivial patch updating the voyagergx cchip code to reference a platform device
instead, now that the dma mask is taken care of. Given this, there's no
longer any reason to drag around the SH-bus code, so kill that off entirely.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sh/cchips')
-rw-r--r-- | arch/sh/cchips/voyagergx/consistent.c | 15 | ||||
-rw-r--r-- | arch/sh/cchips/voyagergx/irq.c | 7 |
2 files changed, 11 insertions, 11 deletions
diff --git a/arch/sh/cchips/voyagergx/consistent.c b/arch/sh/cchips/voyagergx/consistent.c index 3d9a02c093a3..07e8b9c5a531 100644 --- a/arch/sh/cchips/voyagergx/consistent.c +++ b/arch/sh/cchips/voyagergx/consistent.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/bus-sh.h> | 18 | |
19 | 19 | ||
20 | struct voya_alloc_entry { | 20 | struct voya_alloc_entry { |
21 | struct list_head list; | 21 | struct list_head list; |
@@ -30,12 +30,13 @@ static LIST_HEAD(voya_alloc_list); | |||
30 | #define OHCI_HCCA_SIZE 0x100 | 30 | #define OHCI_HCCA_SIZE 0x100 |
31 | #define OHCI_SRAM_SIZE 0x10000 | 31 | #define OHCI_SRAM_SIZE 0x10000 |
32 | 32 | ||
33 | #define VOYAGER_OHCI_NAME "voyager-ohci" | ||
34 | |||
33 | void *voyagergx_consistent_alloc(struct device *dev, size_t size, | 35 | void *voyagergx_consistent_alloc(struct device *dev, size_t size, |
34 | dma_addr_t *handle, gfp_t flag) | 36 | dma_addr_t *handle, gfp_t flag) |
35 | { | 37 | { |
36 | struct list_head *list = &voya_alloc_list; | 38 | struct list_head *list = &voya_alloc_list; |
37 | struct voya_alloc_entry *entry; | 39 | struct voya_alloc_entry *entry; |
38 | struct sh_dev *shdev = to_sh_dev(dev); | ||
39 | unsigned long start, end; | 40 | unsigned long start, end; |
40 | unsigned long flags; | 41 | unsigned long flags; |
41 | 42 | ||
@@ -46,9 +47,7 @@ void *voyagergx_consistent_alloc(struct device *dev, size_t size, | |||
46 | * | 47 | * |
47 | * Everything else goes through consistent_alloc(). | 48 | * Everything else goes through consistent_alloc(). |
48 | */ | 49 | */ |
49 | if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] || | 50 | if (!dev || strcmp(dev->driver->name, VOYAGER_OHCI_NAME)) |
50 | (dev->bus == &sh_bus_types[SH_BUS_VIRT] && | ||
51 | shdev->dev_id != SH_DEV_ID_USB_OHCI)) | ||
52 | return NULL; | 51 | return NULL; |
53 | 52 | ||
54 | start = OHCI_SRAM_START + OHCI_HCCA_SIZE; | 53 | start = OHCI_SRAM_START + OHCI_HCCA_SIZE; |
@@ -98,12 +97,9 @@ int voyagergx_consistent_free(struct device *dev, size_t size, | |||
98 | void *vaddr, dma_addr_t handle) | 97 | void *vaddr, dma_addr_t handle) |
99 | { | 98 | { |
100 | struct voya_alloc_entry *entry; | 99 | struct voya_alloc_entry *entry; |
101 | struct sh_dev *shdev = to_sh_dev(dev); | ||
102 | unsigned long flags; | 100 | unsigned long flags; |
103 | 101 | ||
104 | if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] || | 102 | if (!dev || strcmp(dev->driver->name, VOYAGER_OHCI_NAME)) |
105 | (dev->bus == &sh_bus_types[SH_BUS_VIRT] && | ||
106 | shdev->dev_id != SH_DEV_ID_USB_OHCI)) | ||
107 | return -EINVAL; | 103 | return -EINVAL; |
108 | 104 | ||
109 | spin_lock_irqsave(&voya_list_lock, flags); | 105 | spin_lock_irqsave(&voya_list_lock, flags); |
@@ -123,4 +119,3 @@ int voyagergx_consistent_free(struct device *dev, size_t size, | |||
123 | 119 | ||
124 | EXPORT_SYMBOL(voyagergx_consistent_alloc); | 120 | EXPORT_SYMBOL(voyagergx_consistent_alloc); |
125 | EXPORT_SYMBOL(voyagergx_consistent_free); | 121 | EXPORT_SYMBOL(voyagergx_consistent_free); |
126 | |||
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 1b6ac523b458..2ee330b3c38f 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
@@ -163,7 +163,12 @@ int voyagergx_irq_demux(int irq) | |||
163 | return irq; | 163 | return irq; |
164 | } | 164 | } |
165 | 165 | ||
166 | static struct irqaction irq0 = { voyagergx_interrupt, SA_INTERRUPT, 0, "VOYAGERGX", NULL, NULL}; | 166 | static struct irqaction irq0 = { |
167 | .name = "voyagergx", | ||
168 | .handler = voyagergx_interrupt, | ||
169 | .flags = SA_INTERRUPT, | ||
170 | .mask = CPU_MASK_NONE, | ||
171 | }; | ||
167 | 172 | ||
168 | void __init setup_voyagergx_irq(void) | 173 | void __init setup_voyagergx_irq(void) |
169 | { | 174 | { |