aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2017-10-09 02:16:01 +0300
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2017-10-09 02:16:01 +0300
commitce8a26c5ce819a697a0e625642282a68e573668c (patch)
tree6c6e0a07319be74a1a2920f25ed7814b1e729fc9 /drivers
parent4d43000f9d0d4c3ccb5f3443414c036de4153615 (diff)
switch api to matrch kernel for io_write
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtl8169.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/rtl8169.c b/drivers/rtl8169.c
index 7218a8e..4ab2124 100644
--- a/drivers/rtl8169.c
+++ b/drivers/rtl8169.c
@@ -51,30 +51,30 @@ int rtl_8169_remap(int container, void *map, struct rxdesc *rx_ring)
{
/* unock config registers */
- io_write8(map + 0x50, 0xc0);
+ io_write8(0xc0, map + 0x50);
/* RxConfig = RXFTH: unlimited, MXDMA: unlimited, AAP: set (promisc. mode set) */
- io_write32(map + 0x44, 0x0000e70f);
+ io_write32(0x0000e70f, map + 0x44);
/* Already enabled, do we need a reset? */
- //io_write8(map + 0x37, 0x04);
+ //io_write8(0x04, map + 0x37);
/* TxConfig = IFG: normal, MXDMA: unlimited */
- io_write32(map + 0x40, 0x03000700);
+ io_write32(0x03000700, map + 0x40);
/* Max Rx packet size */
- io_write16(map + 0xDA, 0x1FFF);
+ io_write16(0x1fff, map + 0xDA);
/* max Tx packet size */
- io_write8(map + 0xEC, 0x3B);
+ io_write8(0x3b, map + 0xEC);
/* physical address for descriptors */
//io_write32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr) >> 32);
//io_write32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr) & DMA_BIT_MASK(32));
/* XXX need physaddress here not virtual */
- io_write32(map + 0xE8, ((uint64_t) rx_ring) >> 32);
- io_write32(map + 0xE4, ((uint64_t) rx_ring) & 0x00000000ffffffff);
+ io_write32(((uint64_t) rx_ring) >> 32, map + 0xe8);
+ io_write32(((uint64_t) rx_ring) & 0x00000000ffffffff, map + 0xe4);
/* Done */
//io_write8(map + 0x37, 0x0C); /* Enable Rx/Tx in the Command register */
/* Lock config registers */
- io_write8(map + 0x50, 0x00);
+ io_write8(0x00, map + 0x50);
return 0;
}
@@ -103,7 +103,7 @@ void *rtl8169_rx_fill(int container, struct rxdesc *rx_desc_ring, uint64_t iova_
printf("Failed to map memory\n");
for (i = 0; i < NUM_RX_DESC; i++) {
- rtl8169_map_to_asic(&rx_desc_ring[i], (dma_addr_t)dma_map.iova + i * 2048, 2048);
+ rtl8169_map_to_asic(&rx_desc_ring[i], (dma_addr_t)vaddr + i * 2048, 2048);
}
return vaddr;