Lines Matching refs:hc

19 HFC_outb_embsd(struct hfc_multi *hc, u_char reg, u_char val,  in HFC_outb_embsd()  argument
22 HFC_outb_embsd(struct hfc_multi *hc, u_char reg, u_char val) in HFC_outb_embsd()
25 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_outb_embsd()
26 writeb(reg, hc->xhfc_memaddr); in HFC_outb_embsd()
27 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_outb_embsd()
28 writeb(val, hc->xhfc_memdata); in HFC_outb_embsd()
32 HFC_inb_embsd(struct hfc_multi *hc, u_char reg, const char *function, int line) in HFC_inb_embsd() argument
34 HFC_inb_embsd(struct hfc_multi *hc, u_char reg) in HFC_inb_embsd()
37 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_inb_embsd()
38 writeb(reg, hc->xhfc_memaddr); in HFC_inb_embsd()
39 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_inb_embsd()
40 return readb(hc->xhfc_memdata); in HFC_inb_embsd()
44 HFC_inw_embsd(struct hfc_multi *hc, u_char reg, const char *function, int line) in HFC_inw_embsd() argument
46 HFC_inw_embsd(struct hfc_multi *hc, u_char reg) in HFC_inw_embsd()
49 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_inw_embsd()
50 writeb(reg, hc->xhfc_memaddr); in HFC_inw_embsd()
51 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_inw_embsd()
52 return readb(hc->xhfc_memdata); in HFC_inw_embsd()
56 HFC_wait_embsd(struct hfc_multi *hc, const char *function, int line) in HFC_wait_embsd() argument
58 HFC_wait_embsd(struct hfc_multi *hc) in HFC_wait_embsd()
61 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_wait_embsd()
62 writeb(R_STATUS, hc->xhfc_memaddr); in HFC_wait_embsd()
63 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_wait_embsd()
64 while (readb(hc->xhfc_memdata) & V_BUSY) in HFC_wait_embsd()
70 write_fifo_embsd(struct hfc_multi *hc, u_char *data, int len) in write_fifo_embsd() argument
72 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in write_fifo_embsd()
73 *hc->xhfc_memaddr = A_FIFO_DATA0; in write_fifo_embsd()
74 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in write_fifo_embsd()
76 *hc->xhfc_memdata = *data; in write_fifo_embsd()
84 read_fifo_embsd(struct hfc_multi *hc, u_char *data, int len) in read_fifo_embsd() argument
86 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in read_fifo_embsd()
87 *hc->xhfc_memaddr = A_FIFO_DATA0; in read_fifo_embsd()
88 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in read_fifo_embsd()
90 *data = (u_char)(*hc->xhfc_memdata); in read_fifo_embsd()
97 setup_embedded(struct hfc_multi *hc, struct hm_map *m) in setup_embedded() argument
103 hc->pci_dev = NULL; in setup_embedded()
105 test_and_set_bit(HFC_CHIP_CLOCK2, &hc->chip); in setup_embedded()
107 hc->leds = m->leds; in setup_embedded()
108 hc->ledstate = 0xAFFEAFFE; in setup_embedded()
109 hc->opticalsupport = m->opticalsupport; in setup_embedded()
111 hc->pci_iobase = 0; in setup_embedded()
112 hc->pci_membase = 0; in setup_embedded()
113 hc->xhfc_membase = NULL; in setup_embedded()
114 hc->xhfc_memaddr = NULL; in setup_embedded()
115 hc->xhfc_memdata = NULL; in setup_embedded()
119 hc->io_mode = m->io_mode; in setup_embedded()
120 switch (hc->io_mode) { in setup_embedded()
122 test_and_set_bit(HFC_CHIP_EMBSD, &hc->chip); in setup_embedded()
123 hc->slots = 128; /* required */ in setup_embedded()
124 hc->HFC_outb = HFC_outb_embsd; in setup_embedded()
125 hc->HFC_inb = HFC_inb_embsd; in setup_embedded()
126 hc->HFC_inw = HFC_inw_embsd; in setup_embedded()
127 hc->HFC_wait = HFC_wait_embsd; in setup_embedded()
128 hc->read_fifo = read_fifo_embsd; in setup_embedded()
129 hc->write_fifo = write_fifo_embsd; in setup_embedded()
130 hc->xhfc_origmembase = XHFC_MEMBASE + XHFC_OFFSET * hc->id; in setup_embedded()
131 hc->xhfc_membase = (u_char *)ioremap(hc->xhfc_origmembase, in setup_embedded()
133 if (!hc->xhfc_membase) { in setup_embedded()
139 hc->xhfc_memaddr = (u_long *)(hc->xhfc_membase + 4); in setup_embedded()
140 hc->xhfc_memdata = (u_long *)(hc->xhfc_membase); in setup_embedded()
144 (u_long)hc->xhfc_membase, hc->xhfc_origmembase, in setup_embedded()
145 (u_long)hc->xhfc_memaddr, (u_long)hc->xhfc_memdata); in setup_embedded()
153 hc->immap = (struct immap *)(IMAP_ADDR); in setup_embedded()
154 hc->immap->im_ioport.iop_papar &= ~(PA_XHFC_A0); in setup_embedded()
155 hc->immap->im_ioport.iop_paodr &= ~(PA_XHFC_A0); in setup_embedded()
156 hc->immap->im_ioport.iop_padir |= PA_XHFC_A0; in setup_embedded()
159 hc->pb_irqmsk = (PB_XHFC_IRQ1 << hc->id); in setup_embedded()
160 hc->immap->im_cpm.cp_pbpar &= ~(hc->pb_irqmsk); in setup_embedded()
161 hc->immap->im_cpm.cp_pbodr &= ~(hc->pb_irqmsk); in setup_embedded()
162 hc->immap->im_cpm.cp_pbdir &= ~(hc->pb_irqmsk); in setup_embedded()