6 #ifndef _ASM_SPARC64_PARPORT_H
7 #define _ASM_SPARC64_PARPORT_H 1
15 #define PARPORT_PC_MAX_PORTS PARPORT_MAX
25 #define claim_dma_lock() \
26 ({ unsigned long flags; \
27 spin_lock_irqsave(&dma_spin_lock, flags); \
31 #define release_dma_lock(__flags) \
32 spin_unlock_irqrestore(&dma_spin_lock, __flags);
34 static struct sparc_ebus_info {
49 if (
xchg(&sparc_ebus_dmas[dmanr].lock, 1) != 0)
54 static inline void free_dma(
unsigned int dmanr)
60 if (
xchg(&sparc_ebus_dmas[dmanr].lock, 0) == 0) {
66 static inline void enable_dma(
unsigned int dmanr)
71 sparc_ebus_dmas[dmanr].
addr,
72 sparc_ebus_dmas[dmanr].
count))
81 static inline void clear_dma_ff(
unsigned int dmanr)
91 static inline void set_dma_addr(
unsigned int dmanr,
unsigned int addr)
93 sparc_ebus_dmas[dmanr].addr =
addr;
98 sparc_ebus_dmas[dmanr].count =
count;
110 unsigned long d_base = op->
resource[2].start;
116 parent = op->
dev.of_node->parent;
120 op->
dev.parent->parent, 0);
132 if (slot >= PARPORT_PC_MAX_PORTS)
138 sparc_ebus_dmas[
slot].info.regs =
141 if (!sparc_ebus_dmas[slot].
info.regs)
144 sparc_ebus_dmas[
slot].info.flags = 0;
145 sparc_ebus_dmas[
slot].info.callback =
NULL;
146 sparc_ebus_dmas[
slot].info.client_cookie =
NULL;
147 sparc_ebus_dmas[
slot].info.irq = 0xdeadbeef;
148 strcpy(sparc_ebus_dmas[slot].
info.name,
"parport");
156 outb(0x04, base + 0x02);
157 ns87303_modify(config,
PCR,
165 ns87303_modify(config,
PTR,
175 goto out_disable_irq;
203 unsigned long d_base = op->
resource[2].start;
211 sparc_ebus_dmas[slot].info.regs,
225 .compatible =
"ecpp",
229 .compatible =
"ns87317-ecpp",
233 .compatible =
"pnpALI,1533,3",
242 .of_match_table = ecpp_match,
248 static int parport_pc_find_nonpci_ports(
int autoirq,
int autodma)