14 #include <linux/pci.h>
22 #define PORT(_base,_irq) \
27 .iotype = UPIO_PORT, \
28 .flags = UPF_BOOT_AUTOCONF, \
41 .platform_data = pcit_data,
57 .platform_data = pcit_cplus_data,
61 static struct resource pcit_cmos_rsrc[] = {
77 .resource = pcit_cmos_rsrc
85 static struct resource sni_io_resource = {
86 .start = 0x00000000
UL,
92 static struct resource pcit_io_resources[] = {
111 .name =
"dma page reg",
121 .name =
"PCI config addr",
126 .name =
"PCI config data",
131 static struct resource sni_mem_resource = {
132 .start = 0x18000000
UL,
134 .name =
"PCIT PCI MEM",
138 static void __init sni_pcit_resource_init(
void)
143 for (i = 0; i <
ARRAY_SIZE(pcit_io_resources); i++)
152 .mem_resource = &sni_mem_resource,
153 .mem_offset = 0x00000000
UL,
154 .io_resource = &sni_io_resource,
155 .io_offset = 0x00000000
UL,
159 static void enable_pcit_irq(
struct irq_data *
d)
173 static struct irq_chip pcit_irq_type = {
176 .irq_unmask = enable_pcit_irq,
179 static void pcit_hwint1(
void)
185 irq =
ffs((pending >> 16) & 0x7f);
192 static void pcit_hwint0(
void)
198 irq =
ffs((pending >> 16) & 0x3f);
205 static void sni_pcit_hwint(
void)
211 else if (pending &
C_IRQ2)
213 else if (pending &
C_IRQ3)
215 else if (pending &
C_IRQ5)
219 static void sni_pcit_hwint_cplus(
void)
225 else if (pending & C_IRQ1)
227 else if (pending & C_IRQ2)
229 else if (pending & C_IRQ3)
231 else if (pending &
C_IRQ5)
268 sni_pcit_resource_init();
271 static int __init snirm_pcit_setup_devinit(
void)