linux/arch/mn10300/unit-asb2305/pci-asb2305.h
<<
>>
Prefs
   1/* ASB2305 Arch-specific PCI declarations
   2 *
   3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
   4 * Written by David Howells (dhowells@redhat.com)
   5 * Derived from: arch/i386/kernel/pci-i386.h: (c) 1999 Martin Mares <mj@ucw.cz>
   6 *
   7 * This program is free software; you can redistribute it and/or
   8 * modify it under the terms of the GNU General Public Licence
   9 * as published by the Free Software Foundation; either version
  10 * 2 of the Licence, or (at your option) any later version.
  11 */
  12#ifndef _PCI_ASB2305_H
  13#define _PCI_ASB2305_H
  14
  15#undef DEBUG
  16
  17#ifdef DEBUG
  18#define DBG(x...) printk(x)
  19#else
  20#define DBG(x...)
  21#endif
  22
  23extern unsigned int pci_probe;
  24
  25/* pci-asb2305.c */
  26
  27extern void pcibios_resource_survey(void);
  28
  29/* pci.c */
  30
  31extern struct pci_ops *pci_root_ops;
  32
  33/* pci-irq.c */
  34
  35struct irq_info {
  36        u8 bus, devfn;                  /* Bus, device and function */
  37        struct {
  38                u8 link;                /* IRQ line ID, chipset dependent,
  39                                         * 0=not routed */
  40                u16 bitmap;             /* Available IRQs */
  41        } __attribute__((packed)) irq[4];
  42        u8 slot;                        /* Slot number, 0=onboard */
  43        u8 rfu;
  44} __attribute__((packed));
  45
  46struct irq_routing_table {
  47        u32 signature;                  /* PIRQ_SIGNATURE should be here */
  48        u16 version;                    /* PIRQ_VERSION */
  49        u16 size;                       /* Table size in bytes */
  50        u8 rtr_bus, rtr_devfn;          /* Where the interrupt router lies */
  51        u16 exclusive_irqs;             /* IRQs devoted exclusively to PCI usage */
  52        u16 rtr_vendor, rtr_device;     /* Vendor and device ID of interrupt router */
  53        u32 miniport_data;              /* Crap */
  54        u8 rfu[11];
  55        u8 checksum;                    /* Modulo 256 checksum must give zero */
  56        struct irq_info slots[0];
  57} __attribute__((packed));
  58
  59extern unsigned int pcibios_irq_mask;
  60
  61extern void pcibios_irq_init(void);
  62extern void pcibios_fixup_irqs(void);
  63extern void pcibios_enable_irq(struct pci_dev *dev);
  64
  65#endif /* PCI_ASB2305_H */
  66