diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-03 16:28:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-03 16:28:14 -0400 |
commit | d6748066ad0e8b2514545998f8367ebb3906f299 (patch) | |
tree | f7a9bfd764a8fb781aeda0ef2249afbab42dddf7 /drivers/net | |
parent | f04c045f8ce69c22bda9d99eb927276b776135fc (diff) | |
parent | 3ba1e543ab4b02640d396098f2f6a199560d5f2d (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (37 commits)
MIPS: O32: Provide definition of registers ta0 .. ta3.
MIPS: perf: Add Octeon support for hardware perf.
MIPS: perf: Add support for 64-bit perf counters.
MIPS: perf: Reorganize contents of perf support files.
MIPS: perf: Cleanup formatting in arch/mips/kernel/perf_event.c
MIPS: Add accessor macros for 64-bit performance counter registers.
MIPS: Add probes for more Octeon II CPUs.
MIPS: Add more CPU identifiers for Octeon II CPUs.
MIPS: XLR, XLS: Add comment for smp setup
MIPS: JZ4740: GPIO: Check correct IRQ in demux handler
MIPS: JZ4740: GPIO: Simplify IRQ demuxer
MIPS: JZ4740: Use generic irq chip
MIPS: Alchemy: remove all CONFIG_SOC_AU1??? defines
MIPS: Alchemy: kill au1xxx.h header
MIPS: Alchemy: clean DMA code of CONFIG_SOC_AU1??? defines
MIPS, IDE: Alchem, au1xxx-ide: Remove pb1200/db1200 header dep
MIPS: Alchemy: Redo PCI as platform driver
MIPS: Alchemy: more base address cleanup
MIPS: Alchemy: rewrite USB platform setup.
MIPS: Alchemy: abstract USB block control register access
...
Fix up trivial conflicts in:
arch/mips/alchemy/devboards/db1x00/platform.c
drivers/ide/Kconfig
drivers/mmc/host/au1xmmc.c
drivers/video/Kconfig
sound/mips/Kconfig
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/amd/au1000_eth.c | 48 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/au1000_eth.h | 2 | ||||
-rw-r--r-- | drivers/net/irda/Kconfig | 2 |
3 files changed, 38 insertions, 14 deletions
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c index 82386677bb8c..4865ff14bebf 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c | |||
@@ -541,19 +541,17 @@ static void au1000_reset_mac(struct net_device *dev) | |||
541 | * these are not descriptors sitting in memory. | 541 | * these are not descriptors sitting in memory. |
542 | */ | 542 | */ |
543 | static void | 543 | static void |
544 | au1000_setup_hw_rings(struct au1000_private *aup, u32 rx_base, u32 tx_base) | 544 | au1000_setup_hw_rings(struct au1000_private *aup, void __iomem *tx_base) |
545 | { | 545 | { |
546 | int i; | 546 | int i; |
547 | 547 | ||
548 | for (i = 0; i < NUM_RX_DMA; i++) { | 548 | for (i = 0; i < NUM_RX_DMA; i++) { |
549 | aup->rx_dma_ring[i] = | 549 | aup->rx_dma_ring[i] = (struct rx_dma *) |
550 | (struct rx_dma *) | 550 | (tx_base + 0x100 + sizeof(struct rx_dma) * i); |
551 | (rx_base + sizeof(struct rx_dma)*i); | ||
552 | } | 551 | } |
553 | for (i = 0; i < NUM_TX_DMA; i++) { | 552 | for (i = 0; i < NUM_TX_DMA; i++) { |
554 | aup->tx_dma_ring[i] = | 553 | aup->tx_dma_ring[i] = (struct tx_dma *) |
555 | (struct tx_dma *) | 554 | (tx_base + sizeof(struct tx_dma) * i); |
556 | (tx_base + sizeof(struct tx_dma)*i); | ||
557 | } | 555 | } |
558 | } | 556 | } |
559 | 557 | ||
@@ -1026,7 +1024,7 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1026 | struct net_device *dev = NULL; | 1024 | struct net_device *dev = NULL; |
1027 | struct db_dest *pDB, *pDBfree; | 1025 | struct db_dest *pDB, *pDBfree; |
1028 | int irq, i, err = 0; | 1026 | int irq, i, err = 0; |
1029 | struct resource *base, *macen; | 1027 | struct resource *base, *macen, *macdma; |
1030 | 1028 | ||
1031 | base = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1029 | base = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1032 | if (!base) { | 1030 | if (!base) { |
@@ -1049,6 +1047,13 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1049 | goto out; | 1047 | goto out; |
1050 | } | 1048 | } |
1051 | 1049 | ||
1050 | macdma = platform_get_resource(pdev, IORESOURCE_MEM, 2); | ||
1051 | if (!macdma) { | ||
1052 | dev_err(&pdev->dev, "failed to retrieve MACDMA registers\n"); | ||
1053 | err = -ENODEV; | ||
1054 | goto out; | ||
1055 | } | ||
1056 | |||
1052 | if (!request_mem_region(base->start, resource_size(base), | 1057 | if (!request_mem_region(base->start, resource_size(base), |
1053 | pdev->name)) { | 1058 | pdev->name)) { |
1054 | dev_err(&pdev->dev, "failed to request memory region for base registers\n"); | 1059 | dev_err(&pdev->dev, "failed to request memory region for base registers\n"); |
@@ -1063,6 +1068,13 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1063 | goto err_request; | 1068 | goto err_request; |
1064 | } | 1069 | } |
1065 | 1070 | ||
1071 | if (!request_mem_region(macdma->start, resource_size(macdma), | ||
1072 | pdev->name)) { | ||
1073 | dev_err(&pdev->dev, "failed to request MACDMA memory region\n"); | ||
1074 | err = -ENXIO; | ||
1075 | goto err_macdma; | ||
1076 | } | ||
1077 | |||
1066 | dev = alloc_etherdev(sizeof(struct au1000_private)); | 1078 | dev = alloc_etherdev(sizeof(struct au1000_private)); |
1067 | if (!dev) { | 1079 | if (!dev) { |
1068 | dev_err(&pdev->dev, "alloc_etherdev failed\n"); | 1080 | dev_err(&pdev->dev, "alloc_etherdev failed\n"); |
@@ -1109,10 +1121,14 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1109 | } | 1121 | } |
1110 | aup->mac_id = pdev->id; | 1122 | aup->mac_id = pdev->id; |
1111 | 1123 | ||
1112 | if (pdev->id == 0) | 1124 | aup->macdma = ioremap_nocache(macdma->start, resource_size(macdma)); |
1113 | au1000_setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); | 1125 | if (!aup->macdma) { |
1114 | else if (pdev->id == 1) | 1126 | dev_err(&pdev->dev, "failed to ioremap MACDMA registers\n"); |
1115 | au1000_setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR); | 1127 | err = -ENXIO; |
1128 | goto err_remap3; | ||
1129 | } | ||
1130 | |||
1131 | au1000_setup_hw_rings(aup, aup->macdma); | ||
1116 | 1132 | ||
1117 | /* set a random MAC now in case platform_data doesn't provide one */ | 1133 | /* set a random MAC now in case platform_data doesn't provide one */ |
1118 | random_ether_addr(dev->dev_addr); | 1134 | random_ether_addr(dev->dev_addr); |
@@ -1252,6 +1268,8 @@ err_out: | |||
1252 | err_mdiobus_reg: | 1268 | err_mdiobus_reg: |
1253 | mdiobus_free(aup->mii_bus); | 1269 | mdiobus_free(aup->mii_bus); |
1254 | err_mdiobus_alloc: | 1270 | err_mdiobus_alloc: |
1271 | iounmap(aup->macdma); | ||
1272 | err_remap3: | ||
1255 | iounmap(aup->enable); | 1273 | iounmap(aup->enable); |
1256 | err_remap2: | 1274 | err_remap2: |
1257 | iounmap(aup->mac); | 1275 | iounmap(aup->mac); |
@@ -1261,6 +1279,8 @@ err_remap1: | |||
1261 | err_vaddr: | 1279 | err_vaddr: |
1262 | free_netdev(dev); | 1280 | free_netdev(dev); |
1263 | err_alloc: | 1281 | err_alloc: |
1282 | release_mem_region(macdma->start, resource_size(macdma)); | ||
1283 | err_macdma: | ||
1264 | release_mem_region(macen->start, resource_size(macen)); | 1284 | release_mem_region(macen->start, resource_size(macen)); |
1265 | err_request: | 1285 | err_request: |
1266 | release_mem_region(base->start, resource_size(base)); | 1286 | release_mem_region(base->start, resource_size(base)); |
@@ -1293,9 +1313,13 @@ static int __devexit au1000_remove(struct platform_device *pdev) | |||
1293 | (NUM_TX_BUFFS + NUM_RX_BUFFS), | 1313 | (NUM_TX_BUFFS + NUM_RX_BUFFS), |
1294 | (void *)aup->vaddr, aup->dma_addr); | 1314 | (void *)aup->vaddr, aup->dma_addr); |
1295 | 1315 | ||
1316 | iounmap(aup->macdma); | ||
1296 | iounmap(aup->mac); | 1317 | iounmap(aup->mac); |
1297 | iounmap(aup->enable); | 1318 | iounmap(aup->enable); |
1298 | 1319 | ||
1320 | base = platform_get_resource(pdev, IORESOURCE_MEM, 2); | ||
1321 | release_mem_region(base->start, resource_size(base)); | ||
1322 | |||
1299 | base = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1323 | base = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1300 | release_mem_region(base->start, resource_size(base)); | 1324 | release_mem_region(base->start, resource_size(base)); |
1301 | 1325 | ||
diff --git a/drivers/net/ethernet/amd/au1000_eth.h b/drivers/net/ethernet/amd/au1000_eth.h index 6229c774552c..4b7f7ad62bb8 100644 --- a/drivers/net/ethernet/amd/au1000_eth.h +++ b/drivers/net/ethernet/amd/au1000_eth.h | |||
@@ -124,7 +124,7 @@ struct au1000_private { | |||
124 | */ | 124 | */ |
125 | struct mac_reg *mac; /* mac registers */ | 125 | struct mac_reg *mac; /* mac registers */ |
126 | u32 *enable; /* address of MAC Enable Register */ | 126 | u32 *enable; /* address of MAC Enable Register */ |
127 | 127 | void __iomem *macdma; /* base of MAC DMA port */ | |
128 | u32 vaddr; /* virtual address of rx/tx buffers */ | 128 | u32 vaddr; /* virtual address of rx/tx buffers */ |
129 | dma_addr_t dma_addr; /* dma address of rx/tx buffers */ | 129 | dma_addr_t dma_addr; /* dma address of rx/tx buffers */ |
130 | 130 | ||
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig index a40fab44b9ae..d423d18b4ad6 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig | |||
@@ -314,7 +314,7 @@ config TOSHIBA_FIR | |||
314 | 314 | ||
315 | config AU1000_FIR | 315 | config AU1000_FIR |
316 | tristate "Alchemy Au1000 SIR/FIR" | 316 | tristate "Alchemy Au1000 SIR/FIR" |
317 | depends on SOC_AU1000 && IRDA | 317 | depends on IRDA && MIPS_ALCHEMY |
318 | 318 | ||
319 | config SMC_IRCC_FIR | 319 | config SMC_IRCC_FIR |
320 | tristate "SMSC IrCC (EXPERIMENTAL)" | 320 | tristate "SMSC IrCC (EXPERIMENTAL)" |