Skip to content

Commit

Permalink
[PATCH] sh: convert voyagergx to platform device, drop sh-bus
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt authored and Linus Torvalds committed Feb 1, 2006
1 parent 8d27e08 commit 37cc794
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 275 deletions.
15 changes: 5 additions & 10 deletions arch/sh/cchips/voyagergx/consistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -123,4 +119,3 @@ int voyagergx_consistent_free(struct device *dev, size_t size,

EXPORT_SYMBOL(voyagergx_consistent_alloc);
EXPORT_SYMBOL(voyagergx_consistent_free);

7 changes: 6 additions & 1 deletion arch/sh/cchips/voyagergx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for the Linux/SuperH CPU-specifc backends.
#

obj-y += irq/ init.o bus.o clock.o
obj-y += irq/ init.o clock.o

obj-$(CONFIG_CPU_SH2) += sh2/
obj-$(CONFIG_CPU_SH3) += sh3/
Expand Down
197 changes: 0 additions & 197 deletions arch/sh/kernel/cpu/bus.c

This file was deleted.

66 changes: 0 additions & 66 deletions include/asm-sh/bus-sh.h

This file was deleted.

0 comments on commit 37cc794

Please sign in to comment.