Lines Matching +full:multi +full:- +full:chip

1 /* SPDX-License-Identifier: GPL-2.0 */
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()
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()
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()
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()
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()
78 len--; in write_fifo_embsd()
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()
92 len--; in read_fifo_embsd()
100 "HFC-multi: card manufacturer: '%s' card name: '%s' clock: %s\n", in setup_embedded()
101 m->vendor_name, m->card_name, m->clock2 ? "double" : "normal"); in setup_embedded()
103 hc->pci_dev = NULL; in setup_embedded()
104 if (m->clock2) 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()
118 if (m->io_mode) /* use mode from card config */ 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()
135 "HFC-multi: failed to remap xhfc address space. " in setup_embedded()
137 return -EIO; 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()
142 "HFC-multi: xhfc_membase:%#lx xhfc_origmembase:%#lx " 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()
148 printk(KERN_WARNING "HFC-multi: Invalid IO mode.\n"); in setup_embedded()
149 return -EIO; 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()