From 37cc7943788c841b03a48c00751dfac0ad9f5b12 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 1 Feb 2006 03:06:05 -0800 Subject: [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 Signed-off-by: Paul Mundt Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/sh/cchips/voyagergx/consistent.c | 15 +++++---------- arch/sh/cchips/voyagergx/irq.c | 7 ++++++- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'arch/sh/cchips') 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 #include #include -#include + 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); - diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 1b6ac523b45..2ee330b3c38 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) return irq; } -static struct irqaction irq0 = { voyagergx_interrupt, SA_INTERRUPT, 0, "VOYAGERGX", NULL, NULL}; +static struct irqaction irq0 = { + .name = "voyagergx", + .handler = voyagergx_interrupt, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, +}; void __init setup_voyagergx_irq(void) { -- cgit v1.2.3