2 * linux/arch/sh/drivers/pci/ops-rts7751r2d.c
4 * Author: Ian DaSilva (idasilva@mvista.com)
6 * Highly leveraged from pci-bigsur.c, written by Dustin McIntire.
8 * May be copied or modified under the terms of the GNU General Public
9 * License. See linux/COPYING for more information.
11 * PCI initialization for the Renesas SH7751R RTS7751R2D board
13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/init.h>
16 #include <linux/pci.h>
18 #include <asm/rts7751r2d.h>
21 static u8 rts7751r2d_irq_tab
[] __initdata
= {
28 int __init
pcibios_map_platform_irq(struct pci_dev
*pdev
, u8 slot
, u8 pin
)
30 return rts7751r2d_irq_tab
[slot
];
33 static struct resource sh7751_io_resource
= {
36 .end
= SH7751_PCI_IO_SIZE
- 1,
37 .flags
= IORESOURCE_IO
40 static struct resource sh7751_mem_resource
= {
42 .start
= SH7751_PCI_MEMORY_BASE
,
43 .end
= SH7751_PCI_MEMORY_BASE
+ SH7751_PCI_MEM_SIZE
- 1,
44 .flags
= IORESOURCE_MEM
47 extern struct pci_ops sh7751_pci_ops
;
49 struct pci_channel board_pci_channels
[] = {
50 { &sh4_pci_ops
, &sh7751_io_resource
, &sh7751_mem_resource
, 0, 0xff },
51 { NULL
, NULL
, NULL
, 0, 0 },
53 EXPORT_SYMBOL(board_pci_channels
);
55 static struct sh4_pci_address_map sh7751_pci_map
= {
57 .base
= SH7751_CS3_BASE_ADDR
,
62 .base
= 0x00000000, /* Unused */
63 .size
= 0x00000000, /* Unused */
66 .flags
= SH4_PCIC_NO_RESET
,
69 int __init
pcibios_init_platform(void)
71 __set_io_port_base(SH7751_PCI_IO_BASE
);
72 return sh7751_pcic_init(&sh7751_pci_map
);