Commit 4de460b9 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] More parisc updates

Updates for drivers/parisc.  Mostly conversion to generic device model.
New hppb driver from Ryan Bradetich.
parent d97c3377
...@@ -10,6 +10,13 @@ config GSC ...@@ -10,6 +10,13 @@ config GSC
are not found in B1000, C3000, J5000, A500, L1000, N4000 and upwards. are not found in B1000, C3000, J5000, A500, L1000, N4000 and upwards.
If in doubt, say "Y". If in doubt, say "Y".
config HPPB
bool "HP-PB bus support"
depends on GSC
help
The HP-PB bus was used in the Nova class and K-class servers.
If in doubt, say "Y"
config IOMMU_CCIO config IOMMU_CCIO
bool "U2/Uturn I/O MMU" bool "U2/Uturn I/O MMU"
depends on GSC depends on GSC
...@@ -60,6 +67,8 @@ config PCI ...@@ -60,6 +67,8 @@ config PCI
Beware that some GSC cards have a Dino onboard and PCI inside them, Beware that some GSC cards have a Dino onboard and PCI inside them,
so it may be safest to say "Y" anyway. so it may be safest to say "Y" anyway.
source "drivers/pci/Kconfig"
config GSC_DINO config GSC_DINO
bool "GSCtoPCI/Dino PCI support" bool "GSCtoPCI/Dino PCI support"
depends on PCI && GSC depends on PCI && GSC
...@@ -82,22 +91,21 @@ config PCI_LBA ...@@ -82,22 +91,21 @@ config PCI_LBA
config IOSAPIC config IOSAPIC
bool bool
depends on PCI_LBA depends on PCI_LBA
default y default PCI_LBA
config IOMMU_SBA config IOMMU_SBA
bool bool
depends on PCI_LBA depends on PCI_LBA
default y default PCI_LBA
source "drivers/pci/Kconfig"
#config PCI_EPIC #config PCI_EPIC
# bool "EPIC/SAGA PCI support" # bool "EPIC/SAGA PCI support"
# depends on PCI # depends on PCI
config SUPERIO config SUPERIO
bool bool "SuperIO (SuckyIO) support"
depends on PCI depends on PCI
default y
help help
Say Y here to support the SuperIO chip found in Bxxxx, C3xxx and Say Y here to support the SuperIO chip found in Bxxxx, C3xxx and
J5xxx+ machines. This enables IDE, Floppy, Parallel Port, and J5xxx+ machines. This enables IDE, Floppy, Parallel Port, and
...@@ -105,6 +113,7 @@ config SUPERIO ...@@ -105,6 +113,7 @@ config SUPERIO
config CHASSIS_LCD_LED config CHASSIS_LCD_LED
bool "Chassis LCD and LED support" bool "Chassis LCD and LED support"
default y
help help
Say Y here if you want to enable support for the Heartbeat, Say Y here if you want to enable support for the Heartbeat,
Disk/Network activities LEDs on some PA-RISC machines, Disk/Network activities LEDs on some PA-RISC machines,
......
...@@ -2,24 +2,32 @@ ...@@ -2,24 +2,32 @@
# Makefile for most of the non-PCI devices in PA-RISC machines # Makefile for most of the non-PCI devices in PA-RISC machines
# #
export-objs := gsc.o superio.o export-objs := gsc.o superio.o
obj-y := gsc.o power.o obj-y :=
obj-m := obj-m :=
obj-n := obj-n :=
obj- := obj- :=
obj-$(CONFIG_GSC_DINO) += dino.o
obj-$(CONFIG_GSC_LASI) += lasi.o asp.o
obj-$(CONFIG_GSC_WAX) += wax.o
obj-$(CONFIG_EISA) += eisa.o eisa_enumerator.o eisa_eeprom.o
obj-$(CONFIG_SUPERIO) += superio.o
obj-$(CONFIG_PCI_LBA) += lba_pci.o
# I/O SAPIC is also on IA64 platforms. # I/O SAPIC is also on IA64 platforms.
# The two could be merged into a common source some day. # The two could be merged into a common source some day.
obj-$(CONFIG_IOSAPIC) += iosapic.o obj-$(CONFIG_IOSAPIC) += iosapic.o
obj-$(CONFIG_IOMMU_SBA) += sba_iommu.o obj-$(CONFIG_IOMMU_SBA) += sba_iommu.o
obj-$(CONFIG_PCI_LBA) += lba_pci.o
# Only use one of them: ccio-rm-dma is for PCX-W systems *only* # Only use one of them: ccio-rm-dma is for PCX-W systems *only*
# obj-$(CONFIG_IOMMU_CCIO) += ccio-rm-dma.o # obj-$(CONFIG_IOMMU_CCIO) += ccio-rm-dma.o
obj-$(CONFIG_IOMMU_CCIO) += ccio-dma.o obj-$(CONFIG_IOMMU_CCIO) += ccio-dma.o
obj-$(CONFIG_CHASSIS_LCD_LED) += led.o
obj-y += gsc.o
obj-$(CONFIG_HPPB) += hppb.o
obj-$(CONFIG_GSC_DINO) += dino.o
obj-$(CONFIG_GSC_LASI) += lasi.o asp.o
obj-$(CONFIG_GSC_WAX) += wax.o
obj-$(CONFIG_EISA) += eisa.o eisa_enumerator.o eisa_eeprom.o
obj-$(CONFIG_SUPERIO) += superio.o
obj-$(CONFIG_CHASSIS_LCD_LED) += led.o
obj-y += power.o
...@@ -76,6 +76,8 @@ asp_init_chip(struct parisc_device *dev) ...@@ -76,6 +76,8 @@ asp_init_chip(struct parisc_device *dev)
printk(KERN_INFO "%s version %d at 0x%lx found.\n", printk(KERN_INFO "%s version %d at 0x%lx found.\n",
asp->name, asp->version, dev->hpa); asp->name, asp->version, dev->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name), "%s version %d",
asp->name, asp->version);
/* the IRQ ASP should use */ /* the IRQ ASP should use */
ret = -EBUSY; ret = -EBUSY;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware.h> /* for register_module() */ #include <asm/hardware.h> /* for register_module() */
#include <asm/parisc-device.h>
/* /*
** Choose "ccio" since that's what HP-UX calls it. ** Choose "ccio" since that's what HP-UX calls it.
...@@ -599,7 +600,7 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ...@@ -599,7 +600,7 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
* This function implements the pci_dma_supported function. * This function implements the pci_dma_supported function.
*/ */
static int static int
ccio_dma_supported(struct pci_dev *dev, u64 mask) ccio_dma_supported(struct device *dev, u64 mask)
{ {
if(dev == NULL) { if(dev == NULL) {
printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n"); printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
...@@ -607,8 +608,6 @@ ccio_dma_supported(struct pci_dev *dev, u64 mask) ...@@ -607,8 +608,6 @@ ccio_dma_supported(struct pci_dev *dev, u64 mask)
return 0; return 0;
} }
dev->dma_mask = mask; /* save it */
/* only support 32-bit devices (ie PCI/GSC) */ /* only support 32-bit devices (ie PCI/GSC) */
return (int)(mask == 0xffffffffUL); return (int)(mask == 0xffffffffUL);
} }
...@@ -623,7 +622,8 @@ ccio_dma_supported(struct pci_dev *dev, u64 mask) ...@@ -623,7 +622,8 @@ ccio_dma_supported(struct pci_dev *dev, u64 mask)
* This function implements the pci_map_single function. * This function implements the pci_map_single function.
*/ */
static dma_addr_t static dma_addr_t
ccio_map_single(struct pci_dev *dev, void *addr, size_t size, int direction) ccio_map_single(struct device *dev, void *addr, size_t size,
enum dma_data_direction direction)
{ {
int idx; int idx;
struct ioc *ioc; struct ioc *ioc;
...@@ -631,11 +631,9 @@ ccio_map_single(struct pci_dev *dev, void *addr, size_t size, int direction) ...@@ -631,11 +631,9 @@ ccio_map_single(struct pci_dev *dev, void *addr, size_t size, int direction)
dma_addr_t iovp; dma_addr_t iovp;
dma_addr_t offset; dma_addr_t offset;
u64 *pdir_start; u64 *pdir_start;
unsigned long hint = hint_lookup[direction]; unsigned long hint = hint_lookup[(int)direction];
ASSERT(dev); BUG_ON(!dev);
ASSERT(dev->sysdata);
ASSERT(HBA_DATA(dev->sysdata)->iommu);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
ASSERT(size > 0); ASSERT(size > 0);
...@@ -692,16 +690,14 @@ ccio_map_single(struct pci_dev *dev, void *addr, size_t size, int direction) ...@@ -692,16 +690,14 @@ ccio_map_single(struct pci_dev *dev, void *addr, size_t size, int direction)
* This function implements the pci_unmap_single function. * This function implements the pci_unmap_single function.
*/ */
static void static void
ccio_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size, ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
int direction) enum dma_data_direction direction)
{ {
struct ioc *ioc; struct ioc *ioc;
unsigned long flags; unsigned long flags;
dma_addr_t offset = iova & ~IOVP_MASK; dma_addr_t offset = iova & ~IOVP_MASK;
ASSERT(dev); BUG_ON(!dev);
ASSERT(dev->sysdata);
ASSERT(HBA_DATA(dev->sysdata)->iommu);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
DBG_RUN("%s() iovp 0x%lx/%x\n", DBG_RUN("%s() iovp 0x%lx/%x\n",
...@@ -732,7 +728,7 @@ ccio_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size, ...@@ -732,7 +728,7 @@ ccio_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size,
* This function implements the pci_alloc_consistent function. * This function implements the pci_alloc_consistent function.
*/ */
static void * static void *
ccio_alloc_consistent(struct pci_dev *dev, size_t size, dma_addr_t *dma_handle) ccio_alloc_consistent(struct device *dev, size_t size, dma_addr_t *dma_handle)
{ {
void *ret; void *ret;
#if 0 #if 0
...@@ -765,7 +761,7 @@ ccio_alloc_consistent(struct pci_dev *dev, size_t size, dma_addr_t *dma_handle) ...@@ -765,7 +761,7 @@ ccio_alloc_consistent(struct pci_dev *dev, size_t size, dma_addr_t *dma_handle)
* This function implements the pci_free_consistent function. * This function implements the pci_free_consistent function.
*/ */
static void static void
ccio_free_consistent(struct pci_dev *dev, size_t size, void *cpu_addr, ccio_free_consistent(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t dma_handle) dma_addr_t dma_handle)
{ {
ccio_unmap_single(dev, dma_handle, size, 0); ccio_unmap_single(dev, dma_handle, size, 0);
...@@ -964,17 +960,15 @@ ccio_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents) ...@@ -964,17 +960,15 @@ ccio_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents)
* This function implements the pci_map_sg function. * This function implements the pci_map_sg function.
*/ */
static int static int
ccio_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
int direction) enum dma_data_direction direction)
{ {
struct ioc *ioc; struct ioc *ioc;
int coalesced, filled = 0; int coalesced, filled = 0;
unsigned long flags; unsigned long flags;
unsigned long hint = hint_lookup[direction]; unsigned long hint = hint_lookup[(int)direction];
ASSERT(dev); BUG_ON(!dev);
ASSERT(dev->sysdata);
ASSERT(HBA_DATA(dev->sysdata)->iommu);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents);
...@@ -1032,14 +1026,12 @@ ccio_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, ...@@ -1032,14 +1026,12 @@ ccio_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents,
* This function implements the pci_unmap_sg function. * This function implements the pci_unmap_sg function.
*/ */
static void static void
ccio_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
int direction) enum dma_data_direction direction)
{ {
struct ioc *ioc; struct ioc *ioc;
ASSERT(dev); BUG_ON(!dev);
ASSERT(dev->sysdata);
ASSERT(HBA_DATA(dev->sysdata)->iommu);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
DBG_RUN_SG("%s() START %d entries, %08lx,%x\n", DBG_RUN_SG("%s() START %d entries, %08lx,%x\n",
...@@ -1062,16 +1054,17 @@ ccio_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, ...@@ -1062,16 +1054,17 @@ ccio_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents,
DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents); DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents);
} }
static struct pci_dma_ops ccio_ops = { static struct hppa_dma_ops ccio_ops = {
ccio_dma_supported, .dma_supported = ccio_dma_supported,
ccio_alloc_consistent, .alloc_consistent = ccio_alloc_consistent,
ccio_free_consistent, .alloc_noncoherent = ccio_alloc_consistent,
ccio_map_single, .free_consistent = ccio_free_consistent,
ccio_unmap_single, .map_single = ccio_map_single,
ccio_map_sg, .unmap_single = ccio_unmap_single,
ccio_unmap_sg, .map_sg = ccio_map_sg,
NULL, /* dma_sync_single : NOP for U2/Uturn */ .unmap_sg = ccio_unmap_sg,
NULL, /* dma_sync_sg : ditto */ .dma_sync_single = NULL, /* NOP for U2/Uturn */
.dma_sync_sg = NULL, /* ditto */
}; };
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
...@@ -1529,6 +1522,7 @@ static int ccio_probe(struct parisc_device *dev) ...@@ -1529,6 +1522,7 @@ static int ccio_probe(struct parisc_device *dev)
memset(ioc, 0, sizeof(struct ioc)); memset(ioc, 0, sizeof(struct ioc));
ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn"; ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn";
strncpy(dev->dev.name, ioc->name, sizeof(dev->dev.name));
printk(KERN_INFO "Found %s at 0x%lx\n", ioc->name, dev->hpa); printk(KERN_INFO "Found %s at 0x%lx\n", ioc->name, dev->hpa);
...@@ -1542,6 +1536,12 @@ static int ccio_probe(struct parisc_device *dev) ...@@ -1542,6 +1536,12 @@ static int ccio_probe(struct parisc_device *dev)
ccio_ioc_init(ioc); ccio_ioc_init(ioc);
ccio_init_resources(ioc); ccio_init_resources(ioc);
hppa_dma_ops = &ccio_ops; hppa_dma_ops = &ccio_ops;
dev->dev.platform_data = kmalloc(sizeof(struct pci_hba_data), GFP_KERNEL);
/* if this fails, no I/O cards will work, so may as well bug */
BUG_ON(dev->dev.platform_data == NULL);
HBA_DATA(dev->dev.platform_data)->iommu = ioc;
if (ioc_count == 0) { if (ioc_count == 0) {
/* XXX: Create separate entries for each ioc */ /* XXX: Create separate entries for each ioc */
...@@ -1577,13 +1577,13 @@ struct pci_dev * ccio_get_fake(const struct parisc_device *dev) ...@@ -1577,13 +1577,13 @@ struct pci_dev * ccio_get_fake(const struct parisc_device *dev)
} }
memset(ioc->fake_pci_dev, 0, sizeof(struct pci_dev)); memset(ioc->fake_pci_dev, 0, sizeof(struct pci_dev));
ioc->fake_pci_dev->sysdata = kmalloc(sizeof(struct pci_hba_data), GFP_KERNEL); ioc->fake_pci_dev->dev.platform_data = kmalloc(sizeof(struct pci_hba_data), GFP_KERNEL);
if(ioc->fake_pci_dev->sysdata == NULL) { if(ioc->fake_pci_dev->dev.platform_data == NULL) {
printk(KERN_ERR MODULE_NAME ": memory allocation failure\n"); printk(KERN_ERR MODULE_NAME ": memory allocation failure\n");
return NULL; return NULL;
} }
HBA_DATA(ioc->fake_pci_dev->sysdata)->iommu = ioc; HBA_DATA(ioc->fake_pci_dev->dev.platform_data)->iommu = ioc;
return ioc->fake_pci_dev; return ioc->fake_pci_dev;
} }
...@@ -1595,7 +1595,7 @@ static struct parisc_device_id ccio_tbl[] = { ...@@ -1595,7 +1595,7 @@ static struct parisc_device_id ccio_tbl[] = {
}; };
static struct parisc_driver ccio_driver = { static struct parisc_driver ccio_driver = {
.name = "U2/Uturn", .name = "U2:Uturn",
.id_table = ccio_tbl, .id_table = ccio_tbl,
.probe = ccio_probe, .probe = ccio_probe,
}; };
......
...@@ -74,8 +74,6 @@ static int ccio_dma_supported( struct pci_dev *dev, u64 mask) ...@@ -74,8 +74,6 @@ static int ccio_dma_supported( struct pci_dev *dev, u64 mask)
return(0); return(0);
} }
dev->dma_mask = mask; /* save it */
/* only support 32-bit devices (ie PCI/GSC) */ /* only support 32-bit devices (ie PCI/GSC) */
return((int) (mask >= 0xffffffffUL)); return((int) (mask >= 0xffffffffUL));
} }
......
...@@ -168,7 +168,7 @@ struct dino_device ...@@ -168,7 +168,7 @@ struct dino_device
static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where,
int size, u32 *val) int size, u32 *val)
{ {
struct dino_device *d = DINO_DEV(bus->sysdata); struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->dev));
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
unsigned long base_addr = d->hba.base_addr; unsigned long base_addr = d->hba.base_addr;
...@@ -202,7 +202,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, ...@@ -202,7 +202,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where,
static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where, static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where,
int size, u32 val) int size, u32 val)
{ {
struct dino_device *d = DINO_DEV(bus->sysdata); struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->dev));
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
unsigned long base_addr = d->hba.base_addr; unsigned long base_addr = d->hba.base_addr;
...@@ -255,7 +255,7 @@ static u##size dino_in##size (struct pci_hba_data *d, u16 addr) \ ...@@ -255,7 +255,7 @@ static u##size dino_in##size (struct pci_hba_data *d, u16 addr) \
unsigned long flags; \ unsigned long flags; \
spin_lock_irqsave(&(DINO_DEV(d)->dinosaur_pen), flags); \ spin_lock_irqsave(&(DINO_DEV(d)->dinosaur_pen), flags); \
/* tell HW which IO Port address */ \ /* tell HW which IO Port address */ \
gsc_writel((u32) addr & ~3, d->base_addr + DINO_PCI_ADDR); \ gsc_writel((u32) addr, d->base_addr + DINO_PCI_ADDR); \
/* generate I/O PORT read cycle */ \ /* generate I/O PORT read cycle */ \
v = gsc_read##type(d->base_addr+DINO_IO_DATA+(addr&mask)); \ v = gsc_read##type(d->base_addr+DINO_IO_DATA+(addr&mask)); \
spin_unlock_irqrestore(&(DINO_DEV(d)->dinosaur_pen), flags); \ spin_unlock_irqrestore(&(DINO_DEV(d)->dinosaur_pen), flags); \
...@@ -271,7 +271,7 @@ static void dino_out##size (struct pci_hba_data *d, u16 addr, u##size val) \ ...@@ -271,7 +271,7 @@ static void dino_out##size (struct pci_hba_data *d, u16 addr, u##size val) \
{ \ { \
unsigned long flags; \ unsigned long flags; \
spin_lock_irqsave(&(DINO_DEV(d)->dinosaur_pen), flags); \ spin_lock_irqsave(&(DINO_DEV(d)->dinosaur_pen), flags); \
/* tell HW which CFG address */ \ /* tell HW which IO port address */ \
gsc_writel((u32) addr, d->base_addr + DINO_PCI_ADDR); \ gsc_writel((u32) addr, d->base_addr + DINO_PCI_ADDR); \
/* generate cfg write cycle */ \ /* generate cfg write cycle */ \
gsc_write##type(cpu_to_le##size(val), d->base_addr+DINO_IO_DATA+(addr&mask)); \ gsc_write##type(cpu_to_le##size(val), d->base_addr+DINO_IO_DATA+(addr&mask)); \
...@@ -475,7 +475,7 @@ static void __init ...@@ -475,7 +475,7 @@ static void __init
dino_card_setup(struct pci_bus *bus, unsigned long base_addr) dino_card_setup(struct pci_bus *bus, unsigned long base_addr)
{ {
int i; int i;
struct dino_device *dino_dev = DINO_DEV(bus->sysdata); struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->dev));
struct resource *res; struct resource *res;
res = &dino_dev->hba.lmmio_space; res = &dino_dev->hba.lmmio_space;
...@@ -498,7 +498,7 @@ dino_card_setup(struct pci_bus *bus, unsigned long base_addr) ...@@ -498,7 +498,7 @@ dino_card_setup(struct pci_bus *bus, unsigned long base_addr)
} }
gsc_writel(1 << i, base_addr + DINO_IO_ADDR_EN); gsc_writel(1 << i, base_addr + DINO_IO_ADDR_EN);
pcibios_assign_unassigned_resources(bus); pci_bus_assign_resources(bus);
} }
static void __init static void __init
...@@ -545,11 +545,11 @@ dino_fixup_bus(struct pci_bus *bus) ...@@ -545,11 +545,11 @@ dino_fixup_bus(struct pci_bus *bus)
{ {
struct list_head *ln; struct list_head *ln;
struct pci_dev *dev; struct pci_dev *dev;
struct dino_device *dino_dev = DINO_DEV(bus->sysdata); struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->dev));
int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num); int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num);
DBG(KERN_WARNING "%s(0x%p) bus %d sysdata 0x%p\n", DBG(KERN_WARNING "%s(0x%p) bus %d sysdata 0x%p\n",
__FUNCTION__, bus, bus->secondary, bus->sysdata); __FUNCTION__, bus, bus->secondary, bus->dev->platform_data);
/* Firmware doesn't set up card-mode dino, so we have to */ /* Firmware doesn't set up card-mode dino, so we have to */
if (is_card_dino(&dino_dev->hba.dev->id)) if (is_card_dino(&dino_dev->hba.dev->id))
...@@ -836,6 +836,8 @@ dino_driver_callback(struct parisc_device *dev) ...@@ -836,6 +836,8 @@ dino_driver_callback(struct parisc_device *dev)
} }
printk("%s version %s found at 0x%lx\n", name, version, dev->hpa); printk("%s version %s found at 0x%lx\n", name, version, dev->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name),
"%s version %s", name, version);
if (!request_mem_region(dev->hpa, PAGE_SIZE, name)) { if (!request_mem_region(dev->hpa, PAGE_SIZE, name)) {
printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n", printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n",
...@@ -891,13 +893,15 @@ dino_driver_callback(struct parisc_device *dev) ...@@ -891,13 +893,15 @@ dino_driver_callback(struct parisc_device *dev)
if (dino_common_init(dev, dino_dev, name)) if (dino_common_init(dev, dino_dev, name))
return 1; return 1;
dev->dev.platform_data = dino_dev;
/* /*
** It's not used to avoid chicken/egg problems ** It's not used to avoid chicken/egg problems
** with configuration accessor functions. ** with configuration accessor functions.
*/ */
dino_dev->hba.hba_bus = pci_scan_bus(dino_dev->hba.hba_num, dino_dev->hba.hba_bus =
&dino_cfg_ops, dino_dev); pci_scan_bus_parented(&dev->dev, dino_dev->hba.hba_num,
&dino_cfg_ops, NULL);
return 0; return 0;
} }
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/parisc-device.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/eisa_bus.h> #include <asm/eisa_bus.h>
...@@ -322,6 +323,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) ...@@ -322,6 +323,7 @@ static int __devinit eisa_probe(struct parisc_device *dev)
printk(KERN_INFO "%s EISA Adapter found at 0x%08lx\n", printk(KERN_INFO "%s EISA Adapter found at 0x%08lx\n",
name, dev->hpa); name, dev->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name), "%s EISA", name);
eisa_dev.hba.dev = dev; eisa_dev.hba.dev = dev;
eisa_dev.hba.iommu = ccio_get_iommu(dev); eisa_dev.hba.iommu = ccio_get_iommu(dev);
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/parisc-device.h>
#define OFFSET_IRR 0x0000 /* Interrupt request register */ #define OFFSET_IRR 0x0000 /* Interrupt request register */
#define OFFSET_IMR 0x0004 /* Interrupt mask register */ #define OFFSET_IMR 0x0004 /* Interrupt mask register */
......
/*
** hppb.c:
** HP-PB bus driver for the NOVA and K-Class systems.
**
** (c) Copyright 2002 Ryan Bradetich
** (c) Copyright 2002 Hewlett-Packard Company
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This Driver currently only supports the console (port 0) on the MUX.
** Additional work will be needed on this driver to enable the full
** functionality of the MUX.
**
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/parisc-device.h>
#include <linux/pci.h>
struct hppb_card {
unsigned long hpa;
struct resource mmio_region;
struct hppb_card *next;
};
struct hppb_card hppb_card_head = {
.hpa = 0,
.next = NULL,
};
#define IO_IO_LOW offsetof(struct bc_module, io_io_low)
#define IO_IO_HIGH offsetof(struct bc_module, io_io_high)
/**
* hppb_probe - Determine if the hppb driver should claim this device.
* @dev: The device which has been found
*
* Determine if hppb driver should claim this chip (return 0) or not
* (return 1). If so, initialize the chip and tell other partners in crime
* they have work to do.
*/
static int hppb_probe(struct parisc_device *dev)
{
int status;
struct hppb_card *card = &hppb_card_head;
while(card->next) {
card = card->next;
}
if(card->hpa) {
card->next = kmalloc(sizeof(struct hppb_card), GFP_KERNEL);
if(!card->next) {
printk(KERN_ERR "HP-PB: Unable to allocate memory.\n");
return 1;
}
memset(card->next, '\0', sizeof(struct hppb_card));
card = card->next;
}
printk(KERN_INFO "Found GeckoBoa at 0x%lx\n", dev->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name), "GeckoBoa");
card->hpa = dev->hpa;
card->mmio_region.name = "HP-PB Bus";
card->mmio_region.flags = IORESOURCE_MEM;
card->mmio_region.start = __raw_readl(dev->hpa + IO_IO_LOW);
card->mmio_region.end = __raw_readl(dev->hpa + IO_IO_HIGH) - 1;
status = ccio_request_resource(dev, &card->mmio_region);
if(status < 0) {
printk(KERN_ERR "%s: failed to claim HP-PB bus space (%08lx, %08lx)\n",
__FILE__, card->mmio_region.start, card->mmio_region.end);
}
return 0;
}
static struct parisc_device_id hppb_tbl[] = {
{ HPHW_BCPORT, HVERSION_REV_ANY_ID, 0x500, 0xc },
{ 0, }
};
static struct parisc_driver hppb_driver = {
.name = "Gecko Boa",
.id_table = hppb_tbl,
.probe = hppb_probe,
};
/**
* hppb_init - HP-PB bus initalization procedure.
*
* Register this driver.
*/
void __init hppb_init(void)
{
register_parisc_driver(&hppb_driver);
}
...@@ -641,7 +641,7 @@ iosapic_fixup_irq(void *isi_obj, struct pci_dev *pcidev) ...@@ -641,7 +641,7 @@ iosapic_fixup_irq(void *isi_obj, struct pci_dev *pcidev)
if (NULL == isi) { if (NULL == isi) {
printk(KERN_WARNING MODULE_NAME ": hpa not registered for %s\n", printk(KERN_WARNING MODULE_NAME ": hpa not registered for %s\n",
pcidev->name); pcidev->dev.name);
return(-1); return(-1);
} }
......
...@@ -77,7 +77,8 @@ lasi_init_irq(struct busdevice *this_lasi) ...@@ -77,7 +77,8 @@ lasi_init_irq(struct busdevice *this_lasi)
/* Resets */ /* Resets */
/* gsc_writel(0xFFFFFFFF, lasi_base+0x2000);*/ /* Parallel */ /* gsc_writel(0xFFFFFFFF, lasi_base+0x2000);*/ /* Parallel */
gsc_writel(0xFFFFFFFF, lasi_base+0x4004); /* Audio */ if(pdc_add_valid(lasi_base+0x4004) == PDC_OK)
gsc_writel(0xFFFFFFFF, lasi_base+0x4004); /* Audio */
/* gsc_writel(0xFFFFFFFF, lasi_base+0x5000);*/ /* Serial */ /* gsc_writel(0xFFFFFFFF, lasi_base+0x5000);*/ /* Serial */
/* gsc_writel(0xFFFFFFFF, lasi_base+0x6000);*/ /* SCSI */ /* gsc_writel(0xFFFFFFFF, lasi_base+0x6000);*/ /* SCSI */
gsc_writel(0xFFFFFFFF, lasi_base+0x7000); /* LAN */ gsc_writel(0xFFFFFFFF, lasi_base+0x7000); /* LAN */
...@@ -184,6 +185,8 @@ lasi_init_chip(struct parisc_device *dev) ...@@ -184,6 +185,8 @@ lasi_init_chip(struct parisc_device *dev)
lasi->version = gsc_readl(lasi->hpa + LASI_VER) & 0xf; lasi->version = gsc_readl(lasi->hpa + LASI_VER) & 0xf;
printk(KERN_INFO "%s version %d at 0x%lx found.\n", printk(KERN_INFO "%s version %d at 0x%lx found.\n",
lasi->name, lasi->version, lasi->hpa); lasi->name, lasi->version, lasi->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name), "%s version %d",
lasi->name, lasi->version);
/* initialize the chassis LEDs really early */ /* initialize the chassis LEDs really early */
lasi_led_init(lasi->hpa); lasi_led_init(lasi->hpa);
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/hardware.h> /* for register_parisc_driver() stuff */ #include <asm/hardware.h> /* for register_parisc_driver() stuff */
#include <asm/parisc-device.h>
#include <asm/iosapic.h> /* for iosapic_register() */ #include <asm/iosapic.h> /* for iosapic_register() */
#include <asm/io.h> /* read/write stuff */ #include <asm/io.h> /* read/write stuff */
...@@ -507,7 +508,7 @@ lba_rd_cfg(struct lba_device *d, u32 tok, u8 reg, u32 size) ...@@ -507,7 +508,7 @@ lba_rd_cfg(struct lba_device *d, u32 tok, u8 reg, u32 size)
static int lba_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) static int lba_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data)
{ {
struct lba_device *d = LBA_DEV(bus->sysdata); struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->dev));
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
u32 tok = LBA_CFG_TOK(local_bus, devfn); u32 tok = LBA_CFG_TOK(local_bus, devfn);
...@@ -591,7 +592,7 @@ lba_wr_cfg( struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size) ...@@ -591,7 +592,7 @@ lba_wr_cfg( struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size)
static int lba_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) static int lba_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data)
{ {
struct lba_device *d = LBA_DEV(bus->sysdata); struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->dev));
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
u32 tok = LBA_CFG_TOK(local_bus,devfn); u32 tok = LBA_CFG_TOK(local_bus,devfn);
...@@ -697,11 +698,11 @@ lba_fixup_bus(struct pci_bus *bus) ...@@ -697,11 +698,11 @@ lba_fixup_bus(struct pci_bus *bus)
u16 fbb_enable = PCI_STATUS_FAST_BACK; u16 fbb_enable = PCI_STATUS_FAST_BACK;
u16 status; u16 status;
#endif #endif
struct lba_device *ldev = LBA_DEV(bus->sysdata); struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->dev));
int lba_portbase = HBA_PORT_BASE(ldev->hba.hba_num); int lba_portbase = HBA_PORT_BASE(ldev->hba.hba_num);
DBG("lba_fixup_bus(0x%p) bus %d sysdata 0x%p\n", DBG("lba_fixup_bus(0x%p) bus %d sysdata 0x%p\n",
bus, bus->secondary, bus->sysdata); bus, bus->secondary, bus->dev->platform_data);
/* /*
** Properly Setup MMIO resources for this bus. ** Properly Setup MMIO resources for this bus.
...@@ -1357,6 +1358,8 @@ lba_driver_callback(struct parisc_device *dev) ...@@ -1357,6 +1358,8 @@ lba_driver_callback(struct parisc_device *dev)
printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n", printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n",
MODULE_NAME, version, func_class & 0xf, dev->hpa); MODULE_NAME, version, func_class & 0xf, dev->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name), "%s version %s",
MODULE_NAME, version);
/* Just in case we find some prototypes... */ /* Just in case we find some prototypes... */
if (func_class < 2) { if (func_class < 2) {
...@@ -1425,14 +1428,16 @@ lba_driver_callback(struct parisc_device *dev) ...@@ -1425,14 +1428,16 @@ lba_driver_callback(struct parisc_device *dev)
** Tell PCI support another PCI bus was found. ** Tell PCI support another PCI bus was found.
** Walks PCI bus for us too. ** Walks PCI bus for us too.
*/ */
dev->dev.platform_data = lba_dev;
lba_bus = lba_dev->hba.hba_bus = lba_bus = lba_dev->hba.hba_bus =
pci_scan_bus(lba_dev->hba.bus_num.start, &lba_cfg_ops, (void *) lba_dev); pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start,
&lba_cfg_ops, NULL);
#ifdef __LP64__ #ifdef __LP64__
if (is_pdc_pat()) { if (is_pdc_pat()) {
/* assign resources to un-initialized devices */ /* assign resources to un-initialized devices */
DBG_PAT("LBA pcibios_assign_unassigned_resources()\n"); DBG_PAT("LBA pci_bus_assign_resources()\n");
pcibios_assign_unassigned_resources(lba_bus); pci_bus_assign_resources(lba_bus);
#ifdef DEBUG_LBA_PAT #ifdef DEBUG_LBA_PAT
DBG_PAT("\nLBA PIOP resource tree\n"); DBG_PAT("\nLBA PIOP resource tree\n");
...@@ -1464,7 +1469,7 @@ static struct parisc_device_id lba_tbl[] = { ...@@ -1464,7 +1469,7 @@ static struct parisc_device_id lba_tbl[] = {
static struct parisc_driver lba_driver = { static struct parisc_driver lba_driver = {
.name = MODULE_NAME, .name = MODULE_NAME,
.id_table = lba_tbl, .id_table = lba_tbl,
.probe = lba_driver_callback .probe = lba_driver_callback,
}; };
/* /*
......
...@@ -404,7 +404,7 @@ static void led_get_diskio_stats(int addvalue) ...@@ -404,7 +404,7 @@ static void led_get_diskio_stats(int addvalue)
int major, disk, total; int major, disk, total;
total = 0; total = 0;
#ifdef 0 #if 0
/* /*
* this section will no longer work in 2.5, as we no longer * this section will no longer work in 2.5, as we no longer
* have either kstat.dk_drive nor DK_MAX_*. It can probably * have either kstat.dk_drive nor DK_MAX_*. It can probably
......
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/proc_fs.h>
#include <linux/ctype.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <asm/pdc.h> #include <asm/pdc.h>
...@@ -142,11 +140,7 @@ static void process_shutdown(void) ...@@ -142,11 +140,7 @@ static void process_shutdown(void)
DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0); DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0);
/* soft power switch enabled/disabled */ /* soft power switch enabled/disabled */
#ifdef CONFIG_PROC_FS int pwrsw_enabled = 1;
static int pwrsw_enabled = 1;
#else
#define pwrsw_enabled (1)
#endif
/* /*
* On gecko style machines (e.g. 712/xx and 715/xx) * On gecko style machines (e.g. 712/xx and 715/xx)
...@@ -207,90 +201,6 @@ static void powerfail_interrupt(int code, void *x, struct pt_regs *regs) ...@@ -207,90 +201,6 @@ static void powerfail_interrupt(int code, void *x, struct pt_regs *regs)
/*
* /proc filesystem support
*/
#ifdef CONFIG_SYSCTL
static int power_proc_read(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
char *out = page;
int len;
out += sprintf(out, "Software power switch support: ");
out += sprintf(out, pwrsw_enabled ? "enabled (1)" : "disabled (0)" );
out += sprintf(out, "\n");
len = out - page - off;
if (len < count) {
*eof = 1;
if (len <= 0) return 0;
} else {
len = count;
}
*start = page + off;
return len;
}
static int power_proc_write(struct file *file, const char *buf,
unsigned long count, void *data)
{
char *cur, lbuf[count];
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
memset(lbuf, 0, count);
copy_from_user(lbuf, buf, count);
cur = lbuf;
/* skip initial spaces */
while (*cur && isspace(*cur))
cur++;
switch (*cur) {
case '0': pwrsw_enabled = 0;
break;
case '1': pwrsw_enabled = 1;
break;
default: printk(KERN_CRIT "/proc/" SYSCTL_FILENAME
": Parse error: only '0' or '1' allowed!\n");
return -EINVAL;
} /* switch() */
return count;
}
static struct proc_dir_entry *ent;
static void __init power_create_procfs(void)
{
if (!power_tasklet.func)
return;
ent = create_proc_entry(SYSCTL_FILENAME, S_IFREG|S_IRUGO|S_IWUSR, 0);
if (!ent) return;
ent->nlink = 1;
ent->read_proc = power_proc_read;
ent->write_proc = power_proc_write;
ent->owner = THIS_MODULE;
}
static void __exit power_remove_procfs(void)
{
remove_proc_entry(SYSCTL_FILENAME, NULL);
}
#else
#define power_create_procfs() do { } while (0)
#define power_remove_procfs() do { } while (0)
#endif /* CONFIG_SYSCTL */
/* parisc_panic_event() is called by the panic handler. /* parisc_panic_event() is called by the panic handler.
* As soon as a panic occurs, our tasklets above will not be * As soon as a panic occurs, our tasklets above will not be
* executed any longer. This function then re-enables the * executed any longer. This function then re-enables the
...@@ -344,7 +254,6 @@ static int __init power_init(void) ...@@ -344,7 +254,6 @@ static int __init power_init(void)
/* Register a call for panic conditions. */ /* Register a call for panic conditions. */
notifier_chain_register(&panic_notifier_list, &parisc_panic_block); notifier_chain_register(&panic_notifier_list, &parisc_panic_block);
power_create_procfs();
tasklet_enable(&power_tasklet); tasklet_enable(&power_tasklet);
return 0; return 0;
...@@ -357,7 +266,6 @@ static void __exit power_exit(void) ...@@ -357,7 +266,6 @@ static void __exit power_exit(void)
tasklet_disable(&power_tasklet); tasklet_disable(&power_tasklet);
notifier_chain_unregister(&panic_notifier_list, &parisc_panic_block); notifier_chain_unregister(&panic_notifier_list, &parisc_panic_block);
power_remove_procfs();
power_tasklet.func = NULL; power_tasklet.func = NULL;
pdc_soft_power_button(0); pdc_soft_power_button(0);
} }
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <asm/runway.h> /* for proc_runway_root */ #include <asm/runway.h> /* for proc_runway_root */
#include <asm/pdc.h> /* for PDC_MODEL_* */ #include <asm/pdc.h> /* for PDC_MODEL_* */
#include <asm/parisc-device.h>
#define MODULE_NAME "SBA" #define MODULE_NAME "SBA"
...@@ -803,7 +804,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) ...@@ -803,7 +804,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static int static int
sba_dma_supported( struct pci_dev *dev, u64 mask) sba_dma_supported( struct device *dev, u64 mask)
{ {
if (dev == NULL) { if (dev == NULL) {
printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n"); printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
...@@ -811,10 +812,8 @@ sba_dma_supported( struct pci_dev *dev, u64 mask) ...@@ -811,10 +812,8 @@ sba_dma_supported( struct pci_dev *dev, u64 mask)
return(0); return(0);
} }
dev->dma_mask = mask; /* save it */
/* only support 32-bit PCI devices - no DAC support (yet) */ /* only support 32-bit PCI devices - no DAC support (yet) */
return((int) (mask == 0xffffffff)); return((int) (mask == 0xffffffffUL));
} }
...@@ -828,7 +827,8 @@ sba_dma_supported( struct pci_dev *dev, u64 mask) ...@@ -828,7 +827,8 @@ sba_dma_supported( struct pci_dev *dev, u64 mask)
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static dma_addr_t static dma_addr_t
sba_map_single(struct pci_dev *dev, void *addr, size_t size, int direction) sba_map_single(struct device *dev, void *addr, size_t size,
enum dma_data_direction direction)
{ {
struct ioc *ioc; struct ioc *ioc;
unsigned long flags; unsigned long flags;
...@@ -840,7 +840,6 @@ sba_map_single(struct pci_dev *dev, void *addr, size_t size, int direction) ...@@ -840,7 +840,6 @@ sba_map_single(struct pci_dev *dev, void *addr, size_t size, int direction)
ASSERT(size > 0); ASSERT(size > 0);
ASSERT(size <= DMA_CHUNK_SIZE); ASSERT(size <= DMA_CHUNK_SIZE);
ASSERT(dev->sysdata);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
ASSERT(ioc); ASSERT(ioc);
...@@ -906,7 +905,8 @@ sba_map_single(struct pci_dev *dev, void *addr, size_t size, int direction) ...@@ -906,7 +905,8 @@ sba_map_single(struct pci_dev *dev, void *addr, size_t size, int direction)
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static void static void
sba_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size, int direction) sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
enum dma_data_direction direction)
{ {
struct ioc *ioc; struct ioc *ioc;
#if DELAYED_RESOURCE_CNT > 0 #if DELAYED_RESOURCE_CNT > 0
...@@ -915,7 +915,6 @@ sba_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size, int directio ...@@ -915,7 +915,6 @@ sba_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size, int directio
unsigned long flags; unsigned long flags;
dma_addr_t offset; dma_addr_t offset;
ASSERT(dev->sysdata);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
ASSERT(ioc); ASSERT(ioc);
...@@ -976,7 +975,7 @@ sba_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size, int directio ...@@ -976,7 +975,7 @@ sba_unmap_single(struct pci_dev *dev, dma_addr_t iova, size_t size, int directio
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static void * static void *
sba_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) sba_alloc_consistent(struct device *hwdev, size_t size, dma_addr_t *dma_handle)
{ {
void *ret; void *ret;
...@@ -1007,7 +1006,8 @@ sba_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) ...@@ -1007,7 +1006,8 @@ sba_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle)
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static void static void
sba_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) sba_free_consistent(struct device *hwdev, size_t size, void *vaddr,
dma_addr_t dma_handle)
{ {
sba_unmap_single(hwdev, dma_handle, size, 0); sba_unmap_single(hwdev, dma_handle, size, 0);
free_pages((unsigned long) vaddr, get_order(size)); free_pages((unsigned long) vaddr, get_order(size));
...@@ -1269,7 +1269,8 @@ sba_coalesce_chunks( struct ioc *ioc, ...@@ -1269,7 +1269,8 @@ sba_coalesce_chunks( struct ioc *ioc,
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static int static int
sba_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
enum dma_data_direction direction)
{ {
struct ioc *ioc; struct ioc *ioc;
int coalesced, filled = 0; int coalesced, filled = 0;
...@@ -1277,7 +1278,6 @@ sba_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direc ...@@ -1277,7 +1278,6 @@ sba_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direc
DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents);
ASSERT(dev->sysdata);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
ASSERT(ioc); ASSERT(ioc);
...@@ -1351,7 +1351,8 @@ sba_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direc ...@@ -1351,7 +1351,8 @@ sba_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direc
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static void static void
sba_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
enum dma_data_direction direction)
{ {
struct ioc *ioc; struct ioc *ioc;
#ifdef ASSERT_PDIR_SANITY #ifdef ASSERT_PDIR_SANITY
...@@ -1361,7 +1362,6 @@ sba_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int dir ...@@ -1361,7 +1362,6 @@ sba_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int dir
DBG_RUN_SG("%s() START %d entries, %p,%x\n", DBG_RUN_SG("%s() START %d entries, %p,%x\n",
__FUNCTION__, nents, sg_virt_addr(sglist), sglist->length); __FUNCTION__, nents, sg_virt_addr(sglist), sglist->length);
ASSERT(dev->sysdata);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
ASSERT(ioc); ASSERT(ioc);
...@@ -1395,16 +1395,17 @@ sba_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int dir ...@@ -1395,16 +1395,17 @@ sba_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int dir
} }
static struct pci_dma_ops sba_ops = { static struct hppa_dma_ops sba_ops = {
sba_dma_supported, .dma_supported = sba_dma_supported,
sba_alloc_consistent, /* allocate cacheable host mem */ .alloc_consistent = sba_alloc_consistent,
sba_free_consistent, /* release cacheable host mem */ .alloc_noncoherent = sba_alloc_consistent,
sba_map_single, .free_consistent = sba_free_consistent,
sba_unmap_single, .map_single = sba_map_single,
sba_map_sg, .unmap_single = sba_unmap_single,
sba_unmap_sg, .map_sg = sba_map_sg,
NULL, /* dma_sync_single */ .unmap_sg = sba_unmap_sg,
NULL /* dma_sync_sg */ .dma_sync_single = NULL,
.dma_sync_sg = NULL,
}; };
...@@ -1977,6 +1978,8 @@ sba_driver_callback(struct parisc_device *dev) ...@@ -1977,6 +1978,8 @@ sba_driver_callback(struct parisc_device *dev)
printk(KERN_INFO "%s found %s at 0x%lx\n", printk(KERN_INFO "%s found %s at 0x%lx\n",
MODULE_NAME, version, dev->hpa); MODULE_NAME, version, dev->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name), "%s version %s",
MODULE_NAME, version);
#ifdef DEBUG_SBA_INIT #ifdef DEBUG_SBA_INIT
sba_dump_tlb(dev->hpa); sba_dump_tlb(dev->hpa);
......
...@@ -390,7 +390,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) ...@@ -390,7 +390,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
void __devinit void __devinit
superio_serial_init(void) superio_serial_init(void)
{ {
#ifdef CONFIG_SERIAL #ifdef CONFIG_SERIAL_8250
struct serial_struct *serial; struct serial_struct *serial;
int retval; int retval;
...@@ -443,7 +443,7 @@ superio_serial_init(void) ...@@ -443,7 +443,7 @@ superio_serial_init(void)
retval = register_serial(serial); retval = register_serial(serial);
if (retval < 0) if (retval < 0)
printk(KERN_WARNING "SuperIO: Register Serial #1 failed.\n"); printk(KERN_WARNING "SuperIO: Register Serial #1 failed.\n");
#endif /* CONFIG_SERIAL */ #endif /* CONFIG_SERIAL_8250 */
} }
EXPORT_SYMBOL(superio_serial_init); EXPORT_SYMBOL(superio_serial_init);
...@@ -504,7 +504,7 @@ static int __devinit superio_probe(struct pci_dev *dev, const struct pci_device_ ...@@ -504,7 +504,7 @@ static int __devinit superio_probe(struct pci_dev *dev, const struct pci_device_
#ifdef CONFIG_PARPORT_PC #ifdef CONFIG_PARPORT_PC
superio_parport_init(); superio_parport_init();
#endif #endif
#ifdef CONFIG_SERIAL #ifdef CONFIG_SERIAL_8250
superio_serial_init(); superio_serial_init();
#endif #endif
/* REVISIT : superio_fdc_init() ? */ /* REVISIT : superio_fdc_init() ? */
...@@ -530,6 +530,11 @@ static struct pci_driver superio_driver = { ...@@ -530,6 +530,11 @@ static struct pci_driver superio_driver = {
static int __init superio_modinit(void) static int __init superio_modinit(void)
{ {
#ifdef CONFIG_SERIAL_8250
extern int serial8250_init(void);
serial8250_init();
#endif
return pci_module_init(&superio_driver); return pci_module_init(&superio_driver);
} }
......
...@@ -83,6 +83,8 @@ wax_init_chip(struct parisc_device *dev) ...@@ -83,6 +83,8 @@ wax_init_chip(struct parisc_device *dev)
wax->version = 0; /* gsc_readb(wax->hpa+WAX_VER); */ wax->version = 0; /* gsc_readb(wax->hpa+WAX_VER); */
printk(KERN_INFO "%s at 0x%lx found.\n", wax->name, wax->hpa); printk(KERN_INFO "%s at 0x%lx found.\n", wax->name, wax->hpa);
snprintf(dev->dev.name, sizeof(dev->dev.name), "%s version %d",
wax->name, wax->version);
/* Stop wax hissing for a bit */ /* Stop wax hissing for a bit */
wax_init_irq(wax); wax_init_irq(wax);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment