diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-07-17 16:36:43 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-07-17 16:36:43 +0000 |
commit | 904141001751effef1fb7324061c3447d360f9a6 (patch) | |
tree | 10057e9151e07e2fed868788391e0df87db8793d /target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch | |
parent | a145d0410bf92cfbef482828d319b247c2156928 (diff) | |
download | master-31e0f0ae-904141001751effef1fb7324061c3447d360f9a6.tar.gz master-31e0f0ae-904141001751effef1fb7324061c3447d360f9a6.tar.bz2 master-31e0f0ae-904141001751effef1fb7324061c3447d360f9a6.zip |
atheros[ar231x-eth]: pass phys address of I/O memory via platform res
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41697
Diffstat (limited to 'target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch')
-rw-r--r-- | target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch b/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch index 5f743b433c..0e158d4d01 100644 --- a/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch @@ -33,7 +33,7 @@ +obj-$(CONFIG_NET_AR231X) += ar231x.o --- /dev/null +++ b/drivers/net/ethernet/atheros/ar231x/ar231x.c -@@ -0,0 +1,1249 @@ +@@ -0,0 +1,1246 @@ +/* + * ar231x.c: Linux driver for the Atheros AR231x Ethernet device. + * @@ -257,8 +257,7 @@ + tasklet_init(&sp->rx_tasklet, rx_tasklet_func, (unsigned long) dev); + tasklet_disable(&sp->rx_tasklet); + -+ sp->eth_regs = ioremap_nocache(virt_to_phys(ar_eth_base), -+ sizeof(*sp->eth_regs)); ++ sp->eth_regs = ioremap_nocache(ar_eth_base, sizeof(*sp->eth_regs)); + if (!sp->eth_regs) { + printk("Can't remap eth registers\n"); + return -ENXIO; @@ -269,26 +268,24 @@ + * even though the MAC might be on ENET1. + * Needto remap PHY regs separately in this case + */ -+ if (virt_to_phys(ar_eth_base) == virt_to_phys(sp->phy_regs)) ++ if (ar_eth_base == sp->cfg->phy_base) + sp->phy_regs = sp->eth_regs; + else { -+ sp->phy_regs = -+ ioremap_nocache(virt_to_phys(sp->cfg->phy_base), -+ sizeof(*sp->phy_regs)); ++ sp->phy_regs = ioremap_nocache(sp->cfg->phy_base, ++ sizeof(*sp->phy_regs)); + if (!sp->phy_regs) { + printk("Can't remap phy registers\n"); + return -ENXIO; + } + } + -+ sp->dma_regs = -+ ioremap_nocache(virt_to_phys(ar_eth_base + 0x1000), -+ sizeof(*sp->dma_regs)); -+ dev->base_addr = (unsigned int) sp->dma_regs; ++ sp->dma_regs = ioremap_nocache(ar_eth_base + 0x1000, ++ sizeof(*sp->dma_regs)); + if (!sp->dma_regs) { + printk("Can't remap DMA registers\n"); + return -ENXIO; + } ++ dev->base_addr = ar_eth_base + 0x1000; + + strncpy(sp->name, "Atheros AR231x", sizeof(sp->name) - 1); + sp->name[sizeof(sp->name) - 1] = '\0'; |