diff options
-rw-r--r-- | arch/arm/cpu/mmu.c | 4 | ||||
-rw-r--r-- | drivers/net/fec_imx.c | 8 | ||||
-rw-r--r-- | include/asm-arm/mmu.h | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 298b897ab2..9e00927609 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -118,12 +118,12 @@ void *dma_alloc_coherent(size_t size) return NULL; } -unsigned long dma_to_phys(void *virt) +unsigned long virt_to_phys(void *virt) { return (unsigned long)virt - dma_coherent_offset; } -void *phys_to_dma(unsigned long phys) +void *phys_to_virt(unsigned long phys) { return (void *)(phys + dma_coherent_offset); } diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index cbb10bba10..43652c8915 100644 --- a/drivers/net/fec_imx.c +++ b/drivers/net/fec_imx.c @@ -178,7 +178,7 @@ static int fec_rbd_init(struct fec_priv *fec, int count, int size) for (ix = 0; ix < count; ix++) { if (!once) { - writel(dma_to_phys((void *)p), &fec->rbd_base[ix].data_pointer); + writel(virt_to_phys((void *)p), &fec->rbd_base[ix].data_pointer); p += size; } writew(FEC_RBD_EMPTY, &fec->rbd_base[ix].status); @@ -512,7 +512,7 @@ static int fec_recv(struct eth_device *dev) /* * Get buffer address and size */ - frame = phys_to_dma(readl(&rbd->data_pointer)); + frame = phys_to_virt(readl(&rbd->data_pointer)); frame_length = readw(&rbd->data_length) - 4; NetReceive(frame->data, frame_length); len = frame_length; @@ -576,8 +576,8 @@ static int fec_probe(struct device_d *dev) base &= ~(DB_ALIGNMENT - 1); fec->tbd_base = (struct buffer_descriptor *)base; - writel((uint32_t)dma_to_phys(fec->tbd_base), fec->regs + FEC_ETDSR); - writel((uint32_t)dma_to_phys(fec->rbd_base), fec->regs + FEC_ERDSR); + writel((uint32_t)virt_to_phys(fec->tbd_base), fec->regs + FEC_ETDSR); + writel((uint32_t)virt_to_phys(fec->rbd_base), fec->regs + FEC_ERDSR); fec->xcv_type = pdata->xcv_type; diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h index 5a04619f26..0dd3fa826c 100644 --- a/include/asm-arm/mmu.h +++ b/include/asm-arm/mmu.h @@ -22,8 +22,8 @@ void dma_free_coherent(void *mem); void dma_clean_range(const void *, const void *); void dma_flush_range(const void *, const void *); void dma_inv_range(const void *, const void *); -unsigned long dma_to_phys(void *virt); -void *phys_to_dma(unsigned long phys); +unsigned long virt_to_phys(void *virt); +void *phys_to_virt(unsigned long phys); #else static inline void *dma_alloc_coherent(size_t size) @@ -36,12 +36,12 @@ static inline void dma_free_coherent(void *mem) free(mem); } -static inline void *phys_to_dma(unsigned long phys) +static inline void *phys_to_virt(unsigned long phys) { return (void *)phys; } -static inline unsigned long dma_to_phys(void *mem) +static inline unsigned long virt_to_phys(void *mem) { return (unsigned long)mem; } |