diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parisc/dino.c | 30 | ||||
-rw-r--r-- | drivers/parisc/eisa_enumerator.c | 10 | ||||
-rw-r--r-- | drivers/parisc/hppb.c | 11 |
3 files changed, 37 insertions, 14 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 3c730103e637..2f1cac89ddf5 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c @@ -6,7 +6,7 @@ ** (c) Copyright 1999 SuSE GmbH ** (c) Copyright 1999,2000 Hewlett-Packard Company ** (c) Copyright 2000 Grant Grundler -** (c) Copyright 2006 Helge Deller +** (c) Copyright 2006-2019 Helge Deller ** ** ** This module provides access to Dino PCI bus (config/IOport spaces) @@ -156,6 +156,15 @@ static inline struct dino_device *DINO_DEV(struct pci_hba_data *hba) return container_of(hba, struct dino_device, hba); } +/* Check if PCI device is behind a Card-mode Dino. */ +static int pci_dev_is_behind_card_dino(struct pci_dev *dev) +{ + struct dino_device *dino_dev; + + dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge)); + return is_card_dino(&dino_dev->hba.dev->id); +} + /* * Dino Configuration Space Accessor Functions */ @@ -437,6 +446,21 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev) } DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus ); +#ifdef CONFIG_TULIP +static void pci_fixup_tulip(struct pci_dev *dev) +{ + if (!pci_dev_is_behind_card_dino(dev)) + return; + if (!(pci_resource_flags(dev, 1) & IORESOURCE_MEM)) + return; + pr_warn("%s: HP HSC-PCI Cards with card-mode Dino not yet supported.\n", + pci_name(dev)); + /* Disable this card by zeroing the PCI resources */ + memset(&dev->resource[0], 0, sizeof(dev->resource[0])); + memset(&dev->resource[1], 0, sizeof(dev->resource[1])); +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_DEC, PCI_ANY_ID, pci_fixup_tulip); +#endif /* CONFIG_TULIP */ static void __init dino_bios_init(void) @@ -863,14 +887,14 @@ static int __init dino_common_init(struct parisc_device *dev, #define CUJO_RAVEN_BADPAGE 0x01003000UL #define CUJO_FIREHAWK_BADPAGE 0x01607000UL -static const char *dino_vers[] = { +static const char dino_vers[][4] = { "2.0", "2.1", "3.0", "3.1" }; -static const char *cujo_vers[] = { +static const char cujo_vers[][4] = { "1.0", "2.0" }; diff --git a/drivers/parisc/eisa_enumerator.c b/drivers/parisc/eisa_enumerator.c index 9c08222c0cc6..f54a6f450391 100644 --- a/drivers/parisc/eisa_enumerator.c +++ b/drivers/parisc/eisa_enumerator.c @@ -93,7 +93,7 @@ static int configure_memory(const unsigned char *buf, res->start = mem_parent->start + get_24(buf+len+2); res->end = res->start + get_16(buf+len+5)*1024; res->flags = IORESOURCE_MEM; - printk("memory %lx-%lx ", (unsigned long)res->start, (unsigned long)res->end); + pr_cont("memory %pR ", res); result = request_resource(mem_parent, res); if (result < 0) { printk(KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n"); @@ -123,7 +123,7 @@ static int configure_irq(const unsigned char *buf) for (i=0;i<HPEE_IRQ_MAX_ENT;i++) { c = get_8(buf+len); - printk("IRQ %d ", c & HPEE_IRQ_CHANNEL_MASK); + pr_cont("IRQ %d ", c & HPEE_IRQ_CHANNEL_MASK); if (c & HPEE_IRQ_TRIG_LEVEL) { eisa_make_irq_level(c & HPEE_IRQ_CHANNEL_MASK); } else { @@ -153,7 +153,7 @@ static int configure_dma(const unsigned char *buf) for (i=0;i<HPEE_DMA_MAX_ENT;i++) { c = get_8(buf+len); - printk("DMA %d ", c&HPEE_DMA_CHANNEL_MASK); + pr_cont("DMA %d ", c&HPEE_DMA_CHANNEL_MASK); /* fixme: maybe initialize the dma channel withthe timing ? */ len+=2; if (!(c & HPEE_DMA_MORE)) { @@ -183,7 +183,7 @@ static int configure_port(const unsigned char *buf, struct resource *io_parent, res->start = get_16(buf+len+1); res->end = get_16(buf+len+1)+(c&HPEE_PORT_SIZE_MASK)+1; res->flags = IORESOURCE_IO; - printk("ioports %lx-%lx ", (unsigned long)res->start, (unsigned long)res->end); + pr_cont("ioports %pR ", res); result = request_resource(io_parent, res); if (result < 0) { printk(KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n"); @@ -401,7 +401,7 @@ static int parse_slot_config(int slot, } pos = p0 + function_len; } - printk("\n"); + pr_cont("\n"); if (!id_string_used) { kfree(board); } diff --git a/drivers/parisc/hppb.c b/drivers/parisc/hppb.c index 44e12c83cfa8..e60e68664654 100644 --- a/drivers/parisc/hppb.c +++ b/drivers/parisc/hppb.c @@ -61,8 +61,6 @@ static int __init hppb_probe(struct parisc_device *dev) } card = card->next; } - printk(KERN_INFO "Found GeckoBoa at 0x%llx\n", - (unsigned long long) dev->hpa.start); card->hpa = dev->hpa.start; card->mmio_region.name = "HP-PB Bus"; @@ -72,10 +70,11 @@ static int __init hppb_probe(struct parisc_device *dev) card->mmio_region.end = gsc_readl(dev->hpa.start + 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 (%pR)\n", - __FILE__, &card->mmio_region); - } + + pr_info("Found GeckoBoa at %pap, bus space %pR,%s claimed.\n", + &dev->hpa.start, + &card->mmio_region, + (status < 0) ? " not":"" ); return 0; } |