001-arm-ixp4xx-set-cohorent_dma_mask-for-ethernet-platfo.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. From 7113f56b683c5123df5c20724ac813cee66fa21a Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <jogo@openwrt.org>
  3. Date: Mon, 1 Jul 2013 16:49:05 +0200
  4. Subject: [PATCH 1/2] arm: ixp4xx: set cohorent_dma_mask for ethernet platform
  5. devices
  6. ARM requires the cohorent_dma_mask set, so set it for the platform
  7. devices so that the ethernet driver has access to it.
  8. Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  9. ---
  10. arch/arm/mach-ixp4xx/fsg-setup.c | 2 ++
  11. arch/arm/mach-ixp4xx/goramo_mlr.c | 2 ++
  12. arch/arm/mach-ixp4xx/ixdp425-setup.c | 3 +++
  13. arch/arm/mach-ixp4xx/nas100d-setup.c | 1 +
  14. arch/arm/mach-ixp4xx/nslu2-setup.c | 1 +
  15. arch/arm/mach-ixp4xx/omixp-setup.c | 3 +++
  16. arch/arm/mach-ixp4xx/vulcan-setup.c | 2 ++
  17. 7 files changed, 14 insertions(+)
  18. --- a/arch/arm/mach-ixp4xx/fsg-setup.c
  19. +++ b/arch/arm/mach-ixp4xx/fsg-setup.c
  20. @@ -142,12 +142,14 @@ static struct platform_device fsg_eth[]
  21. .id = IXP4XX_ETH_NPEB,
  22. .dev = {
  23. .platform_data = fsg_plat_eth,
  24. + .coherent_dma_mask = DMA_BIT_MASK(32),
  25. },
  26. }, {
  27. .name = "ixp4xx_eth",
  28. .id = IXP4XX_ETH_NPEC,
  29. .dev = {
  30. .platform_data = fsg_plat_eth + 1,
  31. + .coherent_dma_mask = DMA_BIT_MASK(32),
  32. },
  33. }
  34. };
  35. --- a/arch/arm/mach-ixp4xx/goramo_mlr.c
  36. +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
  37. @@ -295,10 +295,12 @@ static struct platform_device device_eth
  38. .name = "ixp4xx_eth",
  39. .id = IXP4XX_ETH_NPEB,
  40. .dev.platform_data = eth_plat,
  41. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  42. }, {
  43. .name = "ixp4xx_eth",
  44. .id = IXP4XX_ETH_NPEC,
  45. .dev.platform_data = eth_plat + 1,
  46. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  47. }
  48. };
  49. --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
  50. +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
  51. @@ -20,6 +20,7 @@
  52. #include <linux/mtd/nand.h>
  53. #include <linux/mtd/partitions.h>
  54. #include <linux/delay.h>
  55. +#include <linux/dma-mapping.h>
  56. #include <linux/gpio.h>
  57. #include <asm/types.h>
  58. #include <asm/setup.h>
  59. @@ -196,10 +197,12 @@ static struct platform_device ixdp425_et
  60. .name = "ixp4xx_eth",
  61. .id = IXP4XX_ETH_NPEB,
  62. .dev.platform_data = ixdp425_plat_eth,
  63. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  64. }, {
  65. .name = "ixp4xx_eth",
  66. .id = IXP4XX_ETH_NPEC,
  67. .dev.platform_data = ixdp425_plat_eth + 1,
  68. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  69. }
  70. };
  71. --- a/arch/arm/mach-ixp4xx/nas100d-setup.c
  72. +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
  73. @@ -170,6 +170,7 @@ static struct platform_device nas100d_et
  74. .name = "ixp4xx_eth",
  75. .id = IXP4XX_ETH_NPEB,
  76. .dev.platform_data = nas100d_plat_eth,
  77. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  78. }
  79. };
  80. --- a/arch/arm/mach-ixp4xx/nslu2-setup.c
  81. +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
  82. @@ -182,6 +182,7 @@ static struct platform_device nslu2_eth[
  83. .name = "ixp4xx_eth",
  84. .id = IXP4XX_ETH_NPEB,
  85. .dev.platform_data = nslu2_plat_eth,
  86. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  87. }
  88. };
  89. --- a/arch/arm/mach-ixp4xx/omixp-setup.c
  90. +++ b/arch/arm/mach-ixp4xx/omixp-setup.c
  91. @@ -17,6 +17,7 @@
  92. #include <linux/serial_8250.h>
  93. #include <linux/mtd/mtd.h>
  94. #include <linux/mtd/partitions.h>
  95. +#include <linux/dma-mapping.h>
  96. #include <linux/leds.h>
  97. #include <asm/setup.h>
  98. @@ -188,10 +189,12 @@ static struct platform_device ixdp425_et
  99. .name = "ixp4xx_eth",
  100. .id = IXP4XX_ETH_NPEB,
  101. .dev.platform_data = ixdp425_plat_eth,
  102. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  103. }, {
  104. .name = "ixp4xx_eth",
  105. .id = IXP4XX_ETH_NPEC,
  106. .dev.platform_data = ixdp425_plat_eth + 1,
  107. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  108. },
  109. };
  110. --- a/arch/arm/mach-ixp4xx/vulcan-setup.c
  111. +++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
  112. @@ -139,6 +139,7 @@ static struct platform_device vulcan_eth
  113. .id = IXP4XX_ETH_NPEB,
  114. .dev = {
  115. .platform_data = &vulcan_plat_eth[0],
  116. + .coherent_dma_mask = DMA_BIT_MASK(32),
  117. },
  118. },
  119. [1] = {
  120. @@ -146,6 +147,7 @@ static struct platform_device vulcan_eth
  121. .id = IXP4XX_ETH_NPEC,
  122. .dev = {
  123. .platform_data = &vulcan_plat_eth[1],
  124. + .coherent_dma_mask = DMA_BIT_MASK(32),
  125. },
  126. },
  127. };