[parisc-linux-cvs] ccio-rm diff
Matthew Wilcox
willy@debian.org
Thu, 4 Oct 2001 14:12:34 +0100
Index: arch/parisc/kernel/ccio-rm-dma.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ccio-rm-dma.c,v
retrieving revision 1.3
diff -u -p -r1.3 ccio-rm-dma.c
--- ccio-rm-dma.c 2001/07/14 21:17:01 1.3
+++ ccio-rm-dma.c 2001/10/02 14:27:12
@@ -56,26 +56,6 @@
#define UTURN_IOA_RUNWAY 0x581
#define UTURN_BC_GSC 0x502
-static int ccio_driver_callback(struct hp_device *, struct pa_iodc_driver *);
-
-static struct pa_iodc_driver ccio_drivers_for[] = {
-
- {HPHW_BCPORT, U2_BC_GSC, 0x0, 0xb, 0, 0x10,
- DRIVER_CHECK_HVERSION +
- DRIVER_CHECK_SVERSION + DRIVER_CHECK_HWTYPE,
- MODULE_NAME, "U2 I/O MMU", (void *) ccio_driver_callback},
-
- {HPHW_BCPORT, UTURN_BC_GSC, 0x0, 0xb, 0, 0x10,
- DRIVER_CHECK_HVERSION +
- DRIVER_CHECK_SVERSION + DRIVER_CHECK_HWTYPE,
- MODULE_NAME, "Uturn I/O MMU", (void *) ccio_driver_callback},
-
- {0,0,0,0,0,0,
- 0,
- (char *) NULL, (char *) NULL, (void *) NULL }
-};
-
-
#define IS_U2(id) ( \
(((id)->hw_type == HPHW_IOA) && ((id)->hversion == U2_IOA_RUNWAY)) || \
(((id)->hw_type == HPHW_BCPORT) && ((id)->hversion == U2_BC_GSC)) \
@@ -86,13 +66,6 @@ static struct pa_iodc_driver ccio_driver
(((id)->hw_type == HPHW_BCPORT) && ((id)->hversion == UTURN_BC_GSC)) \
)
-
-void __init ccio_init(void)
-{
- pdc_register_driver(ccio_drivers_for);
-}
-
-
static int ccio_dma_supported( struct pci_dev *dev, dma_addr_t mask)
{
if (dev == NULL) {
@@ -182,8 +155,6 @@ static struct pci_dma_ops ccio_ops = {
ccio_unmap_sg,
NULL, /* dma_sync_single : NOP for U2 */
NULL, /* dma_sync_sg : ditto */
-
-
};
@@ -193,9 +164,11 @@ static struct pci_dma_ops ccio_ops = {
** have work to do.
*/
static int
-ccio_driver_callback(struct hp_device *d, struct pa_iodc_driver *dri)
+ccio_probe(struct parisc_device *dev)
{
- printk(KERN_INFO "%s found %s at 0x%p\n", dri->name, dri->version, d->hpa);
+ printk(KERN_INFO "%s found %s at 0x%lx\n", MODULE_NAME,
+ dev->id.hversion == U2_BC_GSC ? "U2" : "UTurn",
+ dev->hpa);
/*
** FIXME - should check U2 registers to verify it's really running
@@ -209,4 +182,21 @@ ccio_driver_callback(struct hp_device *d
#endif
hppa_dma_ops = &ccio_ops;
return 0;
+}
+
+static struct parisc_device_id ccio_tbl[] = {
+ { HPHW_BCPORT, HVERSION_REV_ANY_ID, U2_BC_GSC, 0xc },
+ { HPHW_BCPORT, HVERSION_REV_ANY_ID, UTURN_BC_GSC, 0xc },
+ { 0, }
+};
+
+static struct parisc_driver ccio_driver = {
+ name: "U2/Uturn",
+ id_table: ccio_tbl,
+ probe: ccio_probe,
+};
+
+void __init ccio_init(void)
+{
+ register_parisc_driver(&ccio_driver);
}
--
Revolutions do not require corporate support.