diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-02-01 03:06:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 08:53:20 -0800 |
commit | 37cc7943788c841b03a48c00751dfac0ad9f5b12 (patch) | |
tree | e25d4f7738b675cbb5129da9eaa6c0b56e398e1b /arch/sh/cchips/voyagergx/consistent.c | |
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/voyagergx/consistent.c')
-rw-r--r-- | arch/sh/cchips/voyagergx/consistent.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/sh/cchips/voyagergx/consistent.c b/arch/sh/cchips/voyagergx/consistent.c index 3d9a02c093a..07e8b9c5a53 100644 --- a/arch/sh/cchips/voyagergx/consistent.c +++ b/arch/sh/cchips/voyagergx/consistent.c @@ -15,7 +15,7 @@ #include <linux/module.h> #include <linux/device.h> #include <asm/io.h> -#include <asm/bus-sh.h> + struct voya_alloc_entry { struct list_head list; @@ -30,12 +30,13 @@ static LIST_HEAD(voya_alloc_list); #define OHCI_HCCA_SIZE 0x100 #define OHCI_SRAM_SIZE 0x10000 +#define VOYAGER_OHCI_NAME "voyager-ohci" + void *voyagergx_consistent_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t flag) { struct list_head *list = &voya_alloc_list; struct voya_alloc_entry *entry; - struct sh_dev *shdev = to_sh_dev(dev); unsigned long start, end; unsigned long flags; @@ -46,9 +47,7 @@ void *voyagergx_consistent_alloc(struct device *dev, size_t size, * * Everything else goes through consistent_alloc(). */ - if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] || - (dev->bus == &sh_bus_types[SH_BUS_VIRT] && - shdev->dev_id != SH_DEV_ID_USB_OHCI)) + if (!dev || strcmp(dev->driver->name, VOYAGER_OHCI_NAME)) return NULL; start = OHCI_SRAM_START + OHCI_HCCA_SIZE; @@ -98,12 +97,9 @@ int voyagergx_consistent_free(struct device *dev, size_t size, void *vaddr, dma_addr_t handle) { struct voya_alloc_entry *entry; - struct sh_dev *shdev = to_sh_dev(dev); unsigned long flags; - if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] || - (dev->bus == &sh_bus_types[SH_BUS_VIRT] && - shdev->dev_id != SH_DEV_ID_USB_OHCI)) + if (!dev || strcmp(dev->driver->name, VOYAGER_OHCI_NAME)) return -EINVAL; spin_lock_irqsave(&voya_list_lock, flags); @@ -123,4 +119,3 @@ int voyagergx_consistent_free(struct device *dev, size_t size, EXPORT_SYMBOL(voyagergx_consistent_alloc); EXPORT_SYMBOL(voyagergx_consistent_free); - |