18 #include <linux/sched.h>
19 #include <linux/kernel.h>
20 #include <linux/pci.h>
21 #include <linux/ptrace.h>
28 #include <linux/export.h>
35 static void it8152_mask_irq(
struct irq_data *
d)
54 static void it8152_unmask_irq(
struct irq_data *
d)
73 static struct irq_chip it8152_irq_chip = {
75 .irq_ack = it8152_mask_irq,
76 .irq_mask = it8152_mask_irq,
77 .irq_unmask = it8152_unmask_irq,
92 irq_set_chip_and_handler(irq, &it8152_irq_chip,
100 int bits_pd, bits_lp, bits_ld;
114 if (!(bits_ld | bits_lp | bits_pd)) {
120 if (!(bits_ld | bits_lp | bits_pd))
128 bits_pd &= ~(1 <<
i);
135 bits_lp &= ~(1 <<
i);
142 bits_ld &= ~(1 <<
i);
163 static unsigned long it8152_pci_dev_base_address(
struct pci_bus *
bus,
166 unsigned long addr = 0;
172 addr = (bus->
number << 16) | (devfn << 8);
177 static int it8152_pci_read_config(
struct pci_bus *bus,
178 unsigned int devfn,
int where,
181 unsigned long addr = it8152_pci_dev_base_address(bus, devfn);
195 static int it8152_pci_write_config(
struct pci_bus *bus,
196 unsigned int devfn,
int where,
199 unsigned long addr = it8152_pci_dev_base_address(bus, devfn);
214 vtemp &= ~(mask << (8 * shift));
218 v = (value << (8 * shift));
226 .read = it8152_pci_read_config,
227 .write = it8152_pci_write_config,
230 static struct resource it8152_io = {
231 .name =
"IT8152 PCI I/O region",
235 static struct resource it8152_mem = {
236 .name =
"IT8152 PCI memory region",
249 dev_dbg(dev,
"%s: dma_addr %08x, size %08x\n",
250 __func__, dma_addr, size);
258 static int it8152_pci_platform_notify(
struct device *dev)
269 static int it8152_pci_platform_notify_remove(
struct device *dev)