sba_iommu.c (5658374766d9e0249bd04e9d62bdb8456b916b64) sba_iommu.c (53f01bba49938f115237fe43a261c31ac13ae5c6)
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)

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

1595** o initialize SBA chip modes (HardFail)
1596** o initialize SBA chip modes (HardFail)
1597** o FIXME: initialize DMA hints for reasonable defaults
1598**
1599**************************************************************************/
1600
1601static void __iomem *ioc_remap(struct sba_device *sba_dev, int offset)
1602{
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)

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

1595** o initialize SBA chip modes (HardFail)
1596** o initialize SBA chip modes (HardFail)
1597** o FIXME: initialize DMA hints for reasonable defaults
1598**
1599**************************************************************************/
1600
1601static void __iomem *ioc_remap(struct sba_device *sba_dev, int offset)
1602{
1603 return ioremap(sba_dev->dev->hpa + offset, SBA_FUNC_SIZE);
1603 return ioremap(sba_dev->dev->hpa.start + offset, SBA_FUNC_SIZE);
1604}
1605
1606static void sba_hw_init(struct sba_device *sba_dev)
1607{
1608 int i;
1609 int num_ioc;
1610 u64 ioc_ctl;
1611

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

1973*/
1974int
1975sba_driver_callback(struct parisc_device *dev)
1976{
1977 struct sba_device *sba_dev;
1978 u32 func_class;
1979 int i;
1980 char *version;
1604}
1605
1606static void sba_hw_init(struct sba_device *sba_dev)
1607{
1608 int i;
1609 int num_ioc;
1610 u64 ioc_ctl;
1611

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

1973*/
1974int
1975sba_driver_callback(struct parisc_device *dev)
1976{
1977 struct sba_device *sba_dev;
1978 u32 func_class;
1979 int i;
1980 char *version;
1981 void __iomem *sba_addr = ioremap(dev->hpa, SBA_FUNC_SIZE);
1981 void __iomem *sba_addr = ioremap(dev->hpa.start, SBA_FUNC_SIZE);
1982
1983 sba_dump_ranges(sba_addr);
1984
1985 /* Read HW Rev First */
1986 func_class = READ_REG(sba_addr + SBA_FCLASS);
1987
1988 if (IS_ASTRO(&dev->id)) {
1989 unsigned long fclass;

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

2015 global_ioc_cnt = count_parisc_driver(&sba_driver);
2016
2017 /* Astro and Pluto have one IOC per SBA */
2018 if ((!IS_ASTRO(&dev->id)) || (!IS_PLUTO(&dev->id)))
2019 global_ioc_cnt *= 2;
2020 }
2021
2022 printk(KERN_INFO "%s found %s at 0x%lx\n",
1982
1983 sba_dump_ranges(sba_addr);
1984
1985 /* Read HW Rev First */
1986 func_class = READ_REG(sba_addr + SBA_FCLASS);
1987
1988 if (IS_ASTRO(&dev->id)) {
1989 unsigned long fclass;

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

2015 global_ioc_cnt = count_parisc_driver(&sba_driver);
2016
2017 /* Astro and Pluto have one IOC per SBA */
2018 if ((!IS_ASTRO(&dev->id)) || (!IS_PLUTO(&dev->id)))
2019 global_ioc_cnt *= 2;
2020 }
2021
2022 printk(KERN_INFO "%s found %s at 0x%lx\n",
2023 MODULE_NAME, version, dev->hpa);
2023 MODULE_NAME, version, dev->hpa.start);
2024
2025 sba_dev = kmalloc(sizeof(struct sba_device), GFP_KERNEL);
2026 if (!sba_dev) {
2027 printk(KERN_ERR MODULE_NAME " - couldn't alloc sba_device\n");
2028 return -ENOMEM;
2029 }
2030
2031 parisc_set_drvdata(dev, sba_dev);

--- 144 unchanged lines hidden ---
2024
2025 sba_dev = kmalloc(sizeof(struct sba_device), GFP_KERNEL);
2026 if (!sba_dev) {
2027 printk(KERN_ERR MODULE_NAME " - couldn't alloc sba_device\n");
2028 return -ENOMEM;
2029 }
2030
2031 parisc_set_drvdata(dev, sba_dev);

--- 144 unchanged lines hidden ---