• Home
  • Raw
  • Download

Lines Matching refs:hc

18 HFC_outb_embsd(struct hfc_multi *hc, u_char reg, u_char val,  in HFC_outb_embsd()  argument
21 HFC_outb_embsd(struct hfc_multi *hc, u_char reg, u_char val) in HFC_outb_embsd()
24 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_outb_embsd()
25 writeb(reg, hc->xhfc_memaddr); in HFC_outb_embsd()
26 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_outb_embsd()
27 writeb(val, hc->xhfc_memdata); in HFC_outb_embsd()
31 HFC_inb_embsd(struct hfc_multi *hc, u_char reg, const char *function, int line) in HFC_inb_embsd() argument
33 HFC_inb_embsd(struct hfc_multi *hc, u_char reg) in HFC_inb_embsd()
36 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_inb_embsd()
37 writeb(reg, hc->xhfc_memaddr); in HFC_inb_embsd()
38 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_inb_embsd()
39 return readb(hc->xhfc_memdata); in HFC_inb_embsd()
43 HFC_inw_embsd(struct hfc_multi *hc, u_char reg, const char *function, int line) in HFC_inw_embsd() argument
45 HFC_inw_embsd(struct hfc_multi *hc, u_char reg) in HFC_inw_embsd()
48 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_inw_embsd()
49 writeb(reg, hc->xhfc_memaddr); in HFC_inw_embsd()
50 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_inw_embsd()
51 return readb(hc->xhfc_memdata); in HFC_inw_embsd()
55 HFC_wait_embsd(struct hfc_multi *hc, const char *function, int line) in HFC_wait_embsd() argument
57 HFC_wait_embsd(struct hfc_multi *hc) in HFC_wait_embsd()
60 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in HFC_wait_embsd()
61 writeb(R_STATUS, hc->xhfc_memaddr); in HFC_wait_embsd()
62 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in HFC_wait_embsd()
63 while (readb(hc->xhfc_memdata) & V_BUSY) in HFC_wait_embsd()
69 write_fifo_embsd(struct hfc_multi *hc, u_char *data, int len) in write_fifo_embsd() argument
71 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in write_fifo_embsd()
72 *hc->xhfc_memaddr = A_FIFO_DATA0; in write_fifo_embsd()
73 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in write_fifo_embsd()
75 *hc->xhfc_memdata = *data; in write_fifo_embsd()
83 read_fifo_embsd(struct hfc_multi *hc, u_char *data, int len) in read_fifo_embsd() argument
85 hc->immap->im_ioport.iop_padat |= PA_XHFC_A0; in read_fifo_embsd()
86 *hc->xhfc_memaddr = A_FIFO_DATA0; in read_fifo_embsd()
87 hc->immap->im_ioport.iop_padat &= ~(PA_XHFC_A0); in read_fifo_embsd()
89 *data = (u_char)(*hc->xhfc_memdata); in read_fifo_embsd()
96 setup_embedded(struct hfc_multi *hc, struct hm_map *m) in setup_embedded() argument
102 hc->pci_dev = NULL; in setup_embedded()
104 test_and_set_bit(HFC_CHIP_CLOCK2, &hc->chip); in setup_embedded()
106 hc->leds = m->leds; in setup_embedded()
107 hc->ledstate = 0xAFFEAFFE; in setup_embedded()
108 hc->opticalsupport = m->opticalsupport; in setup_embedded()
110 hc->pci_iobase = 0; in setup_embedded()
111 hc->pci_membase = 0; in setup_embedded()
112 hc->xhfc_membase = NULL; in setup_embedded()
113 hc->xhfc_memaddr = NULL; in setup_embedded()
114 hc->xhfc_memdata = NULL; in setup_embedded()
118 hc->io_mode = m->io_mode; in setup_embedded()
119 switch (hc->io_mode) { in setup_embedded()
121 test_and_set_bit(HFC_CHIP_EMBSD, &hc->chip); in setup_embedded()
122 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()