patch-2.3.35 linux/drivers/net/ptifddi.c
Next file: linux/drivers/net/sis900.c
Previous file: linux/drivers/net/myri_sbus.h
Back to the patch index
Back to the overall index
- Lines: 67
- Date:
Mon Dec 20 22:06:42 1999
- Orig file:
v2.3.34/linux/drivers/net/ptifddi.c
- Orig date:
Tue Aug 31 17:29:14 1999
diff -u --recursive --new-file v2.3.34/linux/drivers/net/ptifddi.c linux/drivers/net/ptifddi.c
@@ -1,4 +1,4 @@
-/* $Id: ptifddi.c,v 1.9 1999/08/20 00:31:07 davem Exp $
+/* $Id: ptifddi.c,v 1.11 1999/10/25 01:50:16 zaitcev Exp $
* ptifddi.c: Network driver for Performance Technologies single-attach
* and dual-attach FDDI sbus cards.
*
@@ -149,7 +149,7 @@
{
}
-static inline int pti_fddi_init(struct net_device *dev, struct linux_sbus_device *sdev, int num)
+static inline int pti_fddi_init(struct net_device *dev, struct sbus_dev *sdev, int num)
{
static unsigned version_printed = 0;
struct ptifddi *pp;
@@ -160,34 +160,25 @@
if(version_printed++ == 0)
printk(version);
- prom_apply_sbus_ranges(sdev->my_bus, &sdev->reg_addrs[0],
- sdev->num_registers, sdev);
-
/* Register 0 mapping contains DPRAM. */
- pp->dpram = sparc_alloc_io(sdev->reg_addrs[0].phys_addr, 0,
- sdev->reg_addrs[0].reg_size,
- "PTI FDDI DPRAM",
- sdev->reg_addrs[0].which_io, 0);
+ pp->dpram = (struct dfddi_ram *) sbus_ioremap(
+ &sdep->resource[0], 0, sizeof(sturct dfddi_ram), "PTI FDDI DPRAM");
if(!pp->dpram) {
printk("ptiFDDI: Cannot map DPRAM I/O area.\n");
return ENODEV;
}
/* Next, register 1 contains reset byte. */
- pp->reset = sparc_alloc_io(sdev->reg_addrs[1].phys_addr, 0,
- sdev->reg_addrs[1].reg_size,
- "PTI FDDI RESET Byte",
- sdev->reg_addrs[1].which_io, 0);
+ pp->reset = (unsigned char *) sbus_ioremap(
+ &sdep->resource[1], 0, 1, "PTI FDDI RESET Byte");
if(!pp->reset) {
printk("ptiFDDI: Cannot map RESET byte.\n");
return ENODEV;
}
/* Register 2 contains unreset byte. */
- pp->unreset = sparc_alloc_io(sdev->reg_addrs[2].phys_addr, 0,
- sdev->reg_addrs[2].reg_size,
- "PTI FDDI UNRESET Byte",
- sdev->reg_addrs[2].which_io, 0);
+ pp->unreset = (unsigned char *) sbus_ioremap(
+ &sdep->resource[2], 0, 1, "PTI FDDI UNRESET Byte");
if(!pp->unreset) {
printk("ptiFDDI: Cannot map UNRESET byte.\n");
return ENODEV;
@@ -215,8 +206,8 @@
int __init ptifddi_sbus_probe(struct net_device *dev)
{
- struct linux_sbus *bus;
- struct linux_sbus_device *sdev = 0;
+ struct sbus_bus *bus;
+ struct sbus_dev *sdev = 0;
static int called = 0;
int cards = 0, v;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)