sba_iommu.c (3d5271f9883cba7b54762bc4fe027d4172f06db7) sba_iommu.c (cb6fc18e9ca615f03d18e60c49855b434ca2e51e)
1/*
2** System Bus Adapter (SBA) I/O MMU manager
3**
4** (c) Copyright 2000-2004 Grant Grundler <grundler @ parisc-linux x org>
5** (c) Copyright 2004 Naresh Kumar Inna <knaresh at india x hp x com>
6** (c) Copyright 2000-2004 Hewlett-Packard Company
7**
8** Portions (c) 1999 Dave S. Miller (from sparc64 I/O MMU code)

--- 2050 unchanged lines hidden (view full) ---

2059 /* Astro and Pluto have one IOC per SBA */
2060 if ((!IS_ASTRO(&dev->id)) || (!IS_PLUTO(&dev->id)))
2061 global_ioc_cnt *= 2;
2062 }
2063
2064 printk(KERN_INFO "%s found %s at 0x%lx\n",
2065 MODULE_NAME, version, dev->hpa.start);
2066
1/*
2** System Bus Adapter (SBA) I/O MMU manager
3**
4** (c) Copyright 2000-2004 Grant Grundler <grundler @ parisc-linux x org>
5** (c) Copyright 2004 Naresh Kumar Inna <knaresh at india x hp x com>
6** (c) Copyright 2000-2004 Hewlett-Packard Company
7**
8** Portions (c) 1999 Dave S. Miller (from sparc64 I/O MMU code)

--- 2050 unchanged lines hidden (view full) ---

2059 /* Astro and Pluto have one IOC per SBA */
2060 if ((!IS_ASTRO(&dev->id)) || (!IS_PLUTO(&dev->id)))
2061 global_ioc_cnt *= 2;
2062 }
2063
2064 printk(KERN_INFO "%s found %s at 0x%lx\n",
2065 MODULE_NAME, version, dev->hpa.start);
2066
2067 sba_dev = kmalloc(sizeof(struct sba_device), GFP_KERNEL);
2067 sba_dev = kzalloc(sizeof(struct sba_device), GFP_KERNEL);
2068 if (!sba_dev) {
2069 printk(KERN_ERR MODULE_NAME " - couldn't alloc sba_device\n");
2070 return -ENOMEM;
2071 }
2072
2073 parisc_set_drvdata(dev, sba_dev);
2068 if (!sba_dev) {
2069 printk(KERN_ERR MODULE_NAME " - couldn't alloc sba_device\n");
2070 return -ENOMEM;
2071 }
2072
2073 parisc_set_drvdata(dev, sba_dev);
2074 memset(sba_dev, 0, sizeof(struct sba_device));
2075
2076 for(i=0; i<MAX_IOC; i++)
2077 spin_lock_init(&(sba_dev->ioc[i].res_lock));
2078
2079 sba_dev->dev = dev;
2080 sba_dev->hw_rev = func_class;
2081 sba_dev->iodc = &dev->id;
2082 sba_dev->name = dev->name;

--- 135 unchanged lines hidden ---
2074
2075 for(i=0; i<MAX_IOC; i++)
2076 spin_lock_init(&(sba_dev->ioc[i].res_lock));
2077
2078 sba_dev->dev = dev;
2079 sba_dev->hw_rev = func_class;
2080 sba_dev->iodc = &dev->id;
2081 sba_dev->name = dev->name;

--- 135 unchanged lines hidden ---