Lines Matching refs:xcno
180 struct xc *request_xc(int xcno, struct device *dev) in request_xc() argument
186 if (xcno > 3) in request_xc()
188 if (xc_in_use & (1 << xcno)) in request_xc()
196 (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, kobject_name(&dev->kobj))) in request_xc()
200 (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, kobject_name(&dev->kobj))) in request_xc()
204 (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, kobject_name(&dev->kobj))) in request_xc()
207 x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno)); in request_xc()
208 x->xmac_base = (void * __iomem)io_p2v(NETX_PA_XMAC(xcno)); in request_xc()
209 x->sram_base = ioremap(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); in request_xc()
213 x->irq = NETX_IRQ_XPEC(xcno); in request_xc()
215 x->no = xcno; in request_xc()
218 xc_in_use |= (1 << xcno); in request_xc()
223 release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); in request_xc()
225 release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE); in request_xc()
227 release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE); in request_xc()
238 int xcno = x->no; in free_xc() local
243 release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); in free_xc()
244 release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE); in free_xc()
245 release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE); in free_xc()