2 * linux/arch/sh/drivers/pci/ops-lboxre2.c
4 * Copyright (C) 2007 Nobuhiro Iwamatsu
6 * PCI initialization for the NTT COMWARE L-BOX RE2
8 #include <linux/kernel.h>
9 #include <linux/types.h>
10 #include <linux/init.h>
11 #include <linux/pci.h>
13 #include <asm/lboxre2.h>
16 static char lboxre2_irq_tab
[] __initdata
= {
17 IRQ_ETH0
, IRQ_ETH1
, IRQ_INTA
, IRQ_INTD
,
20 int __init
pcibios_map_platform_irq(struct pci_dev
*pdev
, u8 slot
, u8 pin
)
22 return lboxre2_irq_tab
[slot
];
25 static struct resource sh7751_io_resource
= {
27 .start
= SH7751_PCI_IO_BASE
,
28 .end
= SH7751_PCI_IO_BASE
+ SH7751_PCI_IO_SIZE
- 1,
29 .flags
= IORESOURCE_IO
32 static struct resource sh7751_mem_resource
= {
34 .start
= SH7751_PCI_MEMORY_BASE
,
35 .end
= SH7751_PCI_MEMORY_BASE
+ SH7751_PCI_MEM_SIZE
- 1,
36 .flags
= IORESOURCE_MEM
39 extern struct pci_ops sh7751_pci_ops
;
41 struct pci_channel board_pci_channels
[] = {
42 { &sh4_pci_ops
, &sh7751_io_resource
, &sh7751_mem_resource
, 0, 0xff },
43 { NULL
, NULL
, NULL
, 0, 0 },
46 EXPORT_SYMBOL(board_pci_channels
);
48 static struct sh4_pci_address_map sh7751_pci_map
= {
50 .base
= SH7751_CS3_BASE_ADDR
,
54 .base
= 0x00000000, /* Unused */
55 .size
= 0x00000000, /* Unused */
57 .flags
= SH4_PCIC_NO_RESET
,
60 int __init
pcibios_init_platform(void)
62 return sh7751_pcic_init(&sh7751_pci_map
);