Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[deliverable/linux.git] / arch / arm / mach-shark / pci.c
CommitLineData
1da177e4
LT
1/*
2 * linux/arch/arm/mach-shark/pci.c
3 *
4 * PCI bios-type initialisation for PCI machines
5 *
6 * Bits taken from various places.
7 */
8#include <linux/kernel.h>
9#include <linux/pci.h>
10#include <linux/init.h>
c04dc9a6 11#include <linux/io.h>
cc22b4c1 12#include <video/vga.h>
1da177e4
LT
13
14#include <asm/irq.h>
15#include <asm/mach/pci.h>
16#include <asm/mach-types.h>
17
c04dc9a6
RH
18#define IO_START 0x40000000
19
d5341942 20static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
1da177e4
LT
21{
22 if (dev->bus->number == 0)
ff4659c1
AG
23 if (dev->devfn == 0)
24 return 255;
25 else
26 return 11;
27 else
28 return 255;
1da177e4
LT
29}
30
31extern void __init via82c505_preinit(void);
32
33static struct hw_pci shark_pci __initdata = {
34 .setup = via82c505_setup,
1da177e4
LT
35 .map_irq = shark_map_irq,
36 .nr_controllers = 1,
c23bfc38 37 .ops = &via82c505_ops,
1da177e4
LT
38 .preinit = via82c505_preinit,
39};
40
41static int __init shark_pci_init(void)
42{
c9d95fbe 43 if (!machine_is_shark())
9c7f4f5c 44 return -ENODEV;
c9d95fbe
RH
45
46 pcibios_min_io = 0x6000;
47 pcibios_min_mem = 0x50000000;
cc22b4c1 48 vga_base = 0xe8000000;
c9d95fbe 49
c04dc9a6
RH
50 pci_ioremap_io(0, IO_START);
51
c9d95fbe
RH
52 pci_common_init(&shark_pci);
53
1da177e4
LT
54 return 0;
55}
56
57subsys_initcall(shark_pci_init);
This page took 0.611724 seconds and 5 git commands to generate.