[PATCH 2/4] nios2/altera_tse.c: switch to ressources
franck.jullien at gmail.com
franck.jullien at gmail.com
Mon Jul 25 15:50:18 EDT 2011
From: Franck Jullien <franck.jullien at gmail.com>
Signed-off-by: Franck Jullien <franck.jullien at gmail.com>
---
drivers/net/altera_tse.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index ac8cd2d..4298739 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -510,7 +510,7 @@ static int tse_probe(struct device_d *dev)
dev->type_data = edev;
edev->priv = (struct altera_tse_priv *)(edev + 1);
- edev->iobase = dev->map_base;
+ edev->iobase = (int)dev_request_mem_region(dev, 0);
priv = edev->priv;
@@ -539,7 +539,7 @@ static int tse_probe(struct device_d *dev)
memset(rx_desc, 0, (sizeof *rx_desc) * (PKTBUFSRX + 1));
memset(tx_desc, 0, (sizeof *tx_desc) * 2);
- priv->mac_dev = (struct alt_tse_mac *)dev->map_base;
+ priv->mac_dev = (struct alt_tse_mac *)dev_request_mem_region(dev, 0);
priv->sgdma_rx = (struct alt_sgdma_registers *)NIOS_SOPC_SGDMA_RX_BASE;
priv->sgdma_tx = (struct alt_sgdma_registers *)NIOS_SOPC_SGDMA_TX_BASE;
priv->rx_desc = rx_desc;
--
1.7.1
More information about the barebox
mailing list