Path: blob/master/arch/mn10300/unit-asb2305/pci-asb2305.h
10819 views
/* ASB2305 Arch-specific PCI declarations1*2* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4* Derived from: arch/i386/kernel/pci-i386.h: (c) 1999 Martin Mares <[email protected]>5*6* This program is free software; you can redistribute it and/or7* modify it under the terms of the GNU General Public Licence8* as published by the Free Software Foundation; either version9* 2 of the Licence, or (at your option) any later version.10*/11#ifndef _PCI_ASB2305_H12#define _PCI_ASB2305_H1314#undef DEBUG1516#ifdef DEBUG17#define DBG(x...) printk(x)18#else19#define DBG(x...)20#endif2122#define PCI_PROBE_BIOS 123#define PCI_PROBE_CONF1 224#define PCI_PROBE_CONF2 425#define PCI_NO_CHECKS 0x40026#define PCI_ASSIGN_ROMS 0x100027#define PCI_BIOS_IRQ_SCAN 0x20002829extern unsigned int pci_probe;3031/* pci-asb2305.c */3233extern unsigned int pcibios_max_latency;3435extern void pcibios_resource_survey(void);3637/* pci.c */3839extern int pcibios_last_bus;40extern struct pci_bus *pci_root_bus;41extern struct pci_ops *pci_root_ops;4243extern struct irq_routing_table *pcibios_get_irq_routing_table(void);44extern int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);4546/* pci-irq.c */4748struct irq_info {49u8 bus, devfn; /* Bus, device and function */50struct {51u8 link; /* IRQ line ID, chipset dependent,52* 0=not routed */53u16 bitmap; /* Available IRQs */54} __attribute__((packed)) irq[4];55u8 slot; /* Slot number, 0=onboard */56u8 rfu;57} __attribute__((packed));5859struct irq_routing_table {60u32 signature; /* PIRQ_SIGNATURE should be here */61u16 version; /* PIRQ_VERSION */62u16 size; /* Table size in bytes */63u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */64u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */65u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */66u32 miniport_data; /* Crap */67u8 rfu[11];68u8 checksum; /* Modulo 256 checksum must give zero */69struct irq_info slots[0];70} __attribute__((packed));7172extern unsigned int pcibios_irq_mask;7374extern void pcibios_irq_init(void);75extern void pcibios_fixup_irqs(void);76extern void pcibios_enable_irq(struct pci_dev *dev);7778#endif /* PCI_ASB2305_H */798081