History

Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull first batch of arm-soc cleanups from Olof Johansson: "These cleanups are basically all over the place. The idea is to collect changes with minimal impact but large number of changes so we can avoid them from distracting in the diffstat in the other series. A significant number of lines get removed here, in particular because the ixp2000 and ixp23xx platforms get removed. These have never been extremely popular and have fallen into disuse over time with no active maintainer taking care of them. The u5500 soc never made it into a product, so we are removing it from the ux500 platform. Many good cleanups also went into the at91 and omap platforms, as has been the case for a number of releases." Trivial modify-delete conflicts in arch/arm/mach-{ixp2000,ixp23xx} * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (152 commits) ARM: clps711x: Cleanup IRQ handling ARM clps711x: Removed unused header mach/time.h ARM: clps711x: Added note about support EP731x CPU to Kconfig ARM: clps711x: Added missing register definitions ARM: clps711x: Used own subarch directory for store header file Dove: Fix Section mismatch warnings ARM: orion5x: ts78xx debugging changes ARM: orion5x: remove PM dependency from ts78xx ARM: orion5x: ts78xx fix NAND resource off by one ARM: orion5x: ts78xx whitespace cleanups Orion5x: Fix Section mismatch warnings Orion5x: Fix warning: struct pci_dev declared inside paramter list ARM: clps711x: Combine header files into one for clps711x-targets ARM: S3C24XX: Use common macro to define resources on mach-qt2410.c ARM: S3C24XX: Use common macro to define resources on mach-osiris.c ARM: EXYNOS: Adapt to cpuidle core time keeping and irq enable ARM: S5PV210: Use common macro to define resources on mach-smdkv210.c ARM: S5PV210: Use common macro to define resources on dev-audio.c ARM: S5PC100: Use common macro to define resources on dev-audio.c ARM: S5P64X0: Use common macro to define resources on dev-audio.c ...

Linus Torvalds committed 14 years ago

Commit 9bc747b2 parents 32b908e 0e896b1335 files · +8951 −25241Browse files

Unified · Split

335 files
  1. Documentation/arm/00-INDEX +0 −2
  2. Documentation/arm/IXP2000 +0 −69
  3. MAINTAINERS +0 −17
  4. arch/arm/Kconfig +4 −30
  5. arch/arm/Makefile +0 −2
  6. arch/arm/boot/compressed/head-xscale.S +0 −7
  7. arch/arm/common/Makefile +0 −2
  8. arch/arm/common/uengine.c +0 −507
  9. arch/arm/configs/at91_dt_defconfig +196 −0
  10. arch/arm/configs/at91rm9200_defconfig +1 −0
  11. arch/arm/configs/ixp2000_defconfig +0 −99
  12. arch/arm/configs/ixp23xx_defconfig +0 −105
  13. arch/arm/include/asm/hardware/cs89712.h +0 −49
  14. arch/arm/include/asm/hardware/ep7211.h +0 −40
  15. arch/arm/include/asm/hardware/ep7212.h +0 −83
  16. arch/arm/include/asm/hardware/uengine.h +0 −62
  17. arch/arm/mach-at91/Kconfig +89 −97
  18. arch/arm/mach-at91/Makefile +17 −9
  19. arch/arm/mach-at91/at91rm9200.c +0 −12
  20. arch/arm/mach-at91/at91rm9200_devices.c +0 −12
  21. arch/arm/mach-at91/at91sam9260.c +0 −12
  22. arch/arm/mach-at91/at91sam9260_devices.c +0 −12
  23. arch/arm/mach-at91/at91sam9261.c +0 −12
  24. arch/arm/mach-at91/at91sam9261_devices.c +0 −12
  25. arch/arm/mach-at91/at91sam9263.c +0 −12
  26. arch/arm/mach-at91/at91sam9263_devices.c +0 −12
  27. arch/arm/mach-at91/at91sam9g45.c +0 −12
  28. arch/arm/mach-at91/at91sam9g45_devices.c +0 −12
  29. arch/arm/mach-at91/at91sam9rl.c +0 −12
  30. arch/arm/mach-at91/at91sam9rl_devices.c +0 −12
  31. arch/arm/mach-at91/board-1arm.c +10 −14
  32. arch/arm/mach-at91/board-afeb-9260v1.c +12 −16
  33. arch/arm/mach-at91/board-cam60.c +2 −6
  34. arch/arm/mach-at91/board-carmeva.c +7 −11
  35. arch/arm/mach-at91/board-cpu9krea.c +24 −28
  36. arch/arm/mach-at91/board-cpuat91.c +18 −22
  37. arch/arm/mach-at91/board-csb337.c +4 −9
  38. arch/arm/mach-at91/board-csb637.c +2 −6
  39. arch/arm/mach-at91/board-dt.c +1 −7
  40. arch/arm/mach-at91/board-eb9200.c +10 −14
  41. arch/arm/mach-at91/board-ecbat91.c +8 −12
  42. arch/arm/mach-at91/board-eco920.c +4 −9
  43. arch/arm/mach-at91/board-flexibity.c +2 −6
  44. arch/arm/mach-at91/board-foxg20.c +33 −38
  45. arch/arm/mach-at91/board-gsia18s.c +31 −32
  46. arch/arm/mach-at91/board-kafa.c +8 −12
  47. arch/arm/mach-at91/board-kb9202.c +14 −18
  48. arch/arm/mach-at91/board-neocore926.c +5 −9
  49. arch/arm/mach-at91/board-pcontrol-g20.c +10 −11
  50. arch/arm/mach-at91/board-picotux200.c +7 −11
  51. arch/arm/mach-at91/board-qil-a9260.c +13 −18
  52. arch/arm/mach-at91/board-rm9200dk.c +10 −14
  53. arch/arm/mach-at91/board-rm9200ek.c +10 −14
  54. arch/arm/mach-at91/board-rsi-ews.c +16 −20
  55. arch/arm/mach-at91/board-sam9-l9260.c +13 −17
  56. arch/arm/mach-at91/board-sam9260ek.c +10 −14
  57. arch/arm/mach-at91/board-sam9261ek.c +5 −9
  58. arch/arm/mach-at91/board-sam9263ek.c +5 −9
  59. arch/arm/mach-at91/board-sam9g20ek.c +10 −14
  60. arch/arm/mach-at91/board-sam9m10g45ek.c +6 −10
  61. arch/arm/mach-at91/board-sam9rlek.c +5 −9
  62. arch/arm/mach-at91/board-snapper9260.c +8 −10
  63. arch/arm/mach-at91/board-stamp9g20.c +24 −40
  64. arch/arm/mach-at91/board-usb-a926x.c +2 −6
  65. arch/arm/mach-at91/board-yl-9200.c +16 −20
  66. arch/arm/mach-at91/cpuidle.c +7 −1
  67. arch/arm/mach-at91/generic.h +0 −11
  68. arch/arm/mach-at91/include/mach/at91rm9200.h +0 −5
  69. arch/arm/mach-at91/include/mach/at91sam9260.h +0 −7
  70. arch/arm/mach-at91/include/mach/at91sam9261.h +0 −4
  71. arch/arm/mach-at91/include/mach/at91sam9263.h +0 −4
  72. arch/arm/mach-at91/include/mach/at91sam9g45.h +0 −5
  73. arch/arm/mach-at91/include/mach/at91sam9rl.h +0 −5
  74. arch/arm/mach-at91/include/mach/at91sam9x5.h +0 −8
  75. arch/arm/mach-at91/include/mach/board.h +0 −1
  76. arch/arm/mach-at91/include/mach/cpu.h +11 −17
  77. arch/arm/mach-at91/include/mach/hardware.h +3 −13
  78. arch/arm/mach-at91/include/mach/uncompress.h +150 −28
  79. arch/arm/mach-at91/pm.c +8 −4
  80. arch/arm/mach-at91/pm.h +1 −14
  81. arch/arm/mach-at91/pm_slowclock.S +1 −1
  82. arch/arm/mach-at91/soc.h +7 −7
  83. arch/arm/mach-clps711x/Kconfig +4 −17
  84. arch/arm/mach-clps711x/common.c +2 −15
  85. arch/arm/mach-clps711x/include/mach/clps711x.h +112 −18
  86. arch/arm/mach-clps711x/include/mach/debug-macro.S +2 −3
  87. arch/arm/mach-clps711x/include/mach/entry-macro.S +1 −2
  88. arch/arm/mach-clps711x/include/mach/hardware.h +13 −46
  89. arch/arm/mach-clps711x/include/mach/irqs.h +1 −4
  90. arch/arm/mach-clps711x/include/mach/time.h +0 −49
  91. arch/arm/mach-clps711x/include/mach/uncompress.h +10 −11
  92. arch/arm/mach-clps711x/p720t-leds.c +0 −3
  93. arch/arm/mach-dove/common.c +1 −1
  94. arch/arm/mach-dove/mpp.c +4 −4
  95. arch/arm/mach-ep93xx/Kconfig +5 −0
  96. arch/arm/mach-ep93xx/core.c +20 −90
  97. arch/arm/mach-exynos/cpuidle.c +6 −47
  98. arch/arm/mach-exynos/dev-ahci.c +2 −10
  99. arch/arm/mach-exynos/dev-audio.c +26 −130
  100. arch/arm/mach-exynos/mach-armlex4210.c +3 −13
  101. arch/arm/mach-exynos/mach-nuri.c +0 −3
  102. arch/arm/mach-exynos/mach-origen.c +0 −2
  103. arch/arm/mach-exynos/mach-smdk4x12.c +0 −2
  104. arch/arm/mach-exynos/mach-smdkv310.c +3 −14
  105. arch/arm/mach-exynos/mach-universal_c210.c +0 −2
  106. arch/arm/mach-imx/Kconfig +2 −0
  107. arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +1 −1
  108. arch/arm/mach-imx/mach-cpuimx35.c +1 −1
  109. arch/arm/mach-imx/mach-mx1ads.c +1 −1
  110. arch/arm/mach-imx/mach-mx21ads.c +1 −2
  111. arch/arm/mach-imx/mach-mx31lite.c +1 −1
  112. arch/arm/mach-imx/mach-mx31moboard.c +1 −1
  113. arch/arm/mach-imx/mach-mx35_3ds.c +1 −1
  114. arch/arm/mach-imx/mach-mx51_efikamx.c +1 −2
  115. arch/arm/mach-imx/mach-mx51_efikasb.c +1 −1
  116. arch/arm/mach-imx/mach-pcm037.c +1 −1
  117. arch/arm/mach-imx/mach-pcm043.c +1 −1
  118. arch/arm/mach-imx/mach-vpr200.c +1 −1
  119. arch/arm/mach-ixp2000/Kconfig +0 −72
  120. arch/arm/mach-ixp2000/Makefile +0 −14
  121. arch/arm/mach-ixp2000/Makefile.boot +0 −3
  122. arch/arm/mach-ixp2000/core.c +0 −520
  123. arch/arm/mach-ixp2000/enp2611.c +0 −258
  124. arch/arm/mach-ixp2000/include/mach/debug-macro.S +0 −25
  125. arch/arm/mach-ixp2000/include/mach/enp2611.h +0 −46
  126. arch/arm/mach-ixp2000/include/mach/entry-macro.S +0 −54
  127. arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h +0 −48
  128. arch/arm/mach-ixp2000/include/mach/hardware.h +0 −36
  129. arch/arm/mach-ixp2000/include/mach/io.h +0 −133
  130. arch/arm/mach-ixp2000/include/mach/irqs.h +0 −207
  131. arch/arm/mach-ixp2000/include/mach/ixdp2x00.h +0 −92
  132. arch/arm/mach-ixp2000/include/mach/ixdp2x01.h +0 −57
  133. arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h +0 −451
  134. arch/arm/mach-ixp2000/include/mach/memory.h +0 −31
  135. arch/arm/mach-ixp2000/include/mach/platform.h +0 −153
  136. arch/arm/mach-ixp2000/include/mach/timex.h +0 −13
  137. arch/arm/mach-ixp2000/include/mach/uncompress.h +0 −47
  138. arch/arm/mach-ixp2000/ixdp2400.c +0 −180
  139. arch/arm/mach-ixp2000/ixdp2800.c +0 −295
  140. arch/arm/mach-ixp2000/ixdp2x00.c +0 −306
  141. arch/arm/mach-ixp2000/ixdp2x01.c +0 −483
  142. arch/arm/mach-ixp2000/pci.c +0 −246
  143. arch/arm/mach-ixp23xx/Kconfig +0 −25
  144. arch/arm/mach-ixp23xx/Makefile +0 −11
  145. arch/arm/mach-ixp23xx/Makefile.boot +0 −2
  146. arch/arm/mach-ixp23xx/core.c +0 −455
  147. arch/arm/mach-ixp23xx/espresso.c +0 −93
  148. arch/arm/mach-ixp23xx/include/mach/debug-macro.S +0 −25
  149. arch/arm/mach-ixp23xx/include/mach/entry-macro.S +0 −31
  150. arch/arm/mach-ixp23xx/include/mach/hardware.h +0 −32
  151. arch/arm/mach-ixp23xx/include/mach/io.h +0 −22
  152. arch/arm/mach-ixp23xx/include/mach/irqs.h +0 −223
  153. arch/arm/mach-ixp23xx/include/mach/ixdp2351.h +0 −89
  154. arch/arm/mach-ixp23xx/include/mach/ixp23xx.h +0 −298
  155. arch/arm/mach-ixp23xx/include/mach/memory.h +0 −34
  156. arch/arm/mach-ixp23xx/include/mach/platform.h +0 −58
  157. arch/arm/mach-ixp23xx/include/mach/time.h +0 −3
  158. arch/arm/mach-ixp23xx/include/mach/timex.h +0 −7
  159. arch/arm/mach-ixp23xx/include/mach/uncompress.h +0 −40
  160. arch/arm/mach-ixp23xx/ixdp2351.c +0 −347
  161. arch/arm/mach-ixp23xx/pci.c +0 −288
  162. arch/arm/mach-ixp23xx/roadrunner.c +0 −180
  163. arch/arm/mach-msm/board-msm7x30.c +0 −1
  164. arch/arm/mach-msm/board-qsd8x50.c +0 −1
  165. arch/arm/mach-msm/include/mach/debug-macro.S +1 −2
  166. arch/arm/mach-msm/scm.c +3 −0
  167. arch/arm/mach-omap1/Makefile +9 −4
  168. arch/arm/mach-omap1/ams-delta-fiq.c +1 −1
  169. arch/arm/mach-omap1/board-fsample.c +1 −15
  170. arch/arm/mach-omap1/board-h2.c +1 −16
  171. arch/arm/mach-omap1/board-h3.c +1 −15
  172. arch/arm/mach-omap1/board-nand.c +37 −0
  173. arch/arm/mach-omap1/board-palmz71.c +2 −2
  174. arch/arm/mach-omap1/board-perseus2.c +1 −15
  175. arch/arm/mach-omap1/clock.c +1 −2
  176. arch/arm/mach-omap1/common.h +14 −1
  177. arch/arm/mach-omap1/fpga.c +1 −1
  178. arch/arm/mach-omap1/id.c +2 −0
  179. arch/arm/mach-omap1/io.c +1 −2
  180. arch/arm/mach-omap1/irq.c +2 −0
  181. arch/arm/mach-omap1/lcd_dma.c +1 −6
  182. arch/arm/mach-omap1/ocpi.c +5 −2
  183. arch/arm/mach-omap1/pm.c +4 −5
  184. arch/arm/mach-omap1/reset.c +2 −0
  185. arch/arm/mach-omap1/timer.c +1 −2
  186. arch/arm/mach-omap1/usb.c +3 −0
  187. arch/arm/mach-omap2/am35xx-emac.c +17 −20
  188. arch/arm/mach-omap2/board-3430sdp.c +4 −34
  189. arch/arm/mach-omap2/board-4430sdp.c +8 −29
  190. arch/arm/mach-omap2/board-am3517evm.c +4 −21
  191. arch/arm/mach-omap2/board-cm-t35.c +4 −26
  192. arch/arm/mach-omap2/board-devkit8000.c +5 −25
  193. arch/arm/mach-omap2/board-igep0020.c +5 −27
  194. arch/arm/mach-omap2/board-omap3beagle.c +5 −32
  195. arch/arm/mach-omap2/board-omap3evm.c +8 −29
  196. arch/arm/mach-omap2/board-omap3stalker.c +4 −25
  197. arch/arm/mach-omap2/board-omap4panda.c +8 −38
  198. arch/arm/mach-omap2/board-overo.c +4 −21
  199. arch/arm/mach-omap2/board-rx51-peripherals.c +2 −2
  200. arch/arm/mach-omap2/board-rx51.c +18 −20
  201. arch/arm/mach-omap2/board-zoom-display.c +1 −0
  202. arch/arm/mach-omap2/common.h +0 −2
  203. arch/arm/mach-omap2/cpuidle34xx.c +120 −178
  204. arch/arm/mach-omap2/cpuidle44xx.c +52 −74
  205. arch/arm/mach-omap2/devices.c +3 −4
  206. arch/arm/mach-omap2/gpio.c +1 −1
  207. arch/arm/mach-omap2/gpmc-onenand.c +1 −2
  208. arch/arm/mach-omap2/gpmc.c +1 −2
  209. arch/arm/mach-omap2/hwspinlock.c +1 −1
  210. arch/arm/mach-omap2/io.c +1 −0
  211. arch/arm/mach-omap2/irq.c +2 −1
  212. arch/arm/mach-omap2/mux.c +1 −1
  213. arch/arm/mach-omap2/omap-secure.c +1 −0
  214. arch/arm/mach-omap2/omap-wakeupgen.c +1 −1
  215. arch/arm/mach-omap2/omap_hwmod.c +878 −265
  216. arch/arm/mach-omap2/omap_hwmod_2420_data.c +233 −1329
  217. arch/arm/mach-omap2/omap_hwmod_2430_data.c +569 −1746
  218. arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c +255 −11
  219. arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +562 −0
  220. arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +2256 −2743
  221. arch/arm/mach-omap2/omap_hwmod_44xx_data.c +2099 −2988
  222. arch/arm/mach-omap2/omap_hwmod_common_data.h +59 −12
  223. arch/arm/mach-omap2/pm.h +0 −21
  224. arch/arm/mach-omap2/pm24xx.c +0 −3
  225. arch/arm/mach-omap2/pm34xx.c +3 −7
  226. arch/arm/mach-omap2/prm_common.c +3 −1
  227. arch/arm/mach-omap2/serial.c +1 −1
  228. arch/arm/mach-omap2/timer.c +12 −3
  229. arch/arm/mach-omap2/usb-tusb6010.c +1 −1
  230. arch/arm/mach-orion5x/Kconfig +0 −1
  231. arch/arm/mach-orion5x/addr-map.c +1 −1
  232. arch/arm/mach-orion5x/common.c +1 −1
  233. arch/arm/mach-orion5x/common.h +1 −0
  234. arch/arm/mach-orion5x/ts78xx-fpga.h +3 −3
  235. arch/arm/mach-orion5x/ts78xx-setup.c +24 −28
  236. arch/arm/mach-s3c24xx/bast-ide.c +6 −30
  237. arch/arm/mach-s3c24xx/mach-amlm5900.c +2 −7
  238. arch/arm/mach-s3c24xx/mach-anubis.c +11 −51
  239. arch/arm/mach-s3c24xx/mach-at2440evb.c +4 −15
  240. arch/arm/mach-s3c24xx/mach-bast.c +9 −36
  241. arch/arm/mach-s3c24xx/mach-gta02.c +2 −5
  242. arch/arm/mach-s3c24xx/mach-h1940.c +2 −7
  243. arch/arm/mach-s3c24xx/mach-mini2440.c +4 −15
  244. arch/arm/mach-s3c24xx/mach-nexcoder.c +1 −5
  245. arch/arm/mach-s3c24xx/mach-osiris.c +2 −10
  246. arch/arm/mach-s3c24xx/mach-otom.c +1 −5
  247. arch/arm/mach-s3c24xx/mach-qt2410.c +2 −10
  248. arch/arm/mach-s3c24xx/mach-rx1950.c +2 −7
  249. arch/arm/mach-s3c24xx/mach-tct_hammer.c +2 −5
  250. arch/arm/mach-s3c24xx/mach-vr1000.c +8 −31
  251. arch/arm/mach-s3c24xx/simtec-nor.c +1 −5
  252. arch/arm/mach-s3c64xx/dev-audio.c +20 −100
  253. arch/arm/mach-s3c64xx/dev-uart.c +8 −40
  254. arch/arm/mach-s3c64xx/mach-anw6410.c +4 −15
  255. arch/arm/mach-s3c64xx/mach-crag6410.c +5 −21
  256. arch/arm/mach-s3c64xx/mach-mini6410.c +4 −15
  257. arch/arm/mach-s3c64xx/mach-real6410.c +4 −15
  258. arch/arm/mach-s3c64xx/mach-smdk6410.c +3 −10
  259. arch/arm/mach-s5p64x0/dev-audio.c +12 −60
  260. arch/arm/mach-s5pc100/dev-audio.c +23 −115
  261. arch/arm/mach-s5pv210/dev-audio.c +26 −130
  262. arch/arm/mach-s5pv210/mach-smdkv210.c +4 −15
  263. arch/arm/mach-tegra/board-dt-tegra20.c +0 −1
  264. arch/arm/mach-tegra/include/mach/dma.h +0 −4
  265. arch/arm/mach-ux500/Kconfig +0 −25
  266. arch/arm/mach-ux500/Makefile +0 −5
  267. arch/arm/mach-ux500/board-u5500-sdi.c +0 −74
  268. arch/arm/mach-ux500/board-u5500.c +0 −162
  269. arch/arm/mach-ux500/cache-l2x0.c +1 −3
  270. arch/arm/mach-ux500/clock.c +1 −11
  271. arch/arm/mach-ux500/cpu-db5500.c +0 −247
  272. arch/arm/mach-ux500/cpu.c +1 −7
  273. arch/arm/mach-ux500/devices-db5500.h +0 −99
  274. arch/arm/mach-ux500/dma-db5500.c +0 −137
  275. arch/arm/mach-ux500/include/mach/db5500-regs.h +0 −143
  276. arch/arm/mach-ux500/include/mach/debug-macro.S +0 −4
  277. arch/arm/mach-ux500/include/mach/devices.h +0 −1
  278. arch/arm/mach-ux500/include/mach/hardware.h +0 −1
  279. arch/arm/mach-ux500/include/mach/irqs-board-u5500.h +0 −21
  280. arch/arm/mach-ux500/include/mach/irqs-db5500.h +0 −113
  281. arch/arm/mach-ux500/include/mach/irqs.h +0 −5
  282. arch/arm/mach-ux500/include/mach/mbox-db5500.h +0 −88
  283. arch/arm/mach-ux500/include/mach/setup.h +0 −6
  284. arch/arm/mach-ux500/include/mach/uncompress.h +2 −5
  285. arch/arm/mach-ux500/mbox-db5500.c +0 −565
  286. arch/arm/mach-ux500/modem-irq-db5500.c +0 −143
  287. arch/arm/mach-ux500/pins-db5500.h +0 −620
  288. arch/arm/mach-ux500/platsmp.c +2 −6
  289. arch/arm/mach-ux500/ste-dma40-db5500.h +0 −135
  290. arch/arm/mach-ux500/timer.c +4 −9
  291. arch/arm/plat-mxc/include/mach/iomux-mx51.h +24 −24
  292. arch/arm/plat-mxc/include/mach/iomux-mx53.h +2 −2
  293. arch/arm/plat-omap/Makefile +0 −3
  294. arch/arm/plat-omap/common.c +1 −0
  295. arch/arm/plat-omap/dma.c +11 −2
  296. arch/arm/plat-omap/dmtimer.c +2 −1
  297. arch/arm/plat-omap/include/plat/board.h +2 −0
  298. arch/arm/plat-omap/include/plat/common.h +2 −0
  299. arch/arm/plat-omap/include/plat/dma.h +1 −0
  300. arch/arm/plat-omap/include/plat/dmtimer.h +2 −2
  301. arch/arm/plat-omap/include/plat/omap_hwmod.h +30 −10
  302. arch/arm/plat-omap/omap_device.c +0 −2
  303. arch/arm/plat-omap/sram.c +2 −2
  304. arch/arm/plat-omap/usb.c +3 −5
  305. arch/arm/plat-samsung/devs.c +2 −14
  306. arch/arm/plat-samsung/include/plat/sdhci.h +0 −7
  307. arch/arm/plat-samsung/platformdata.c +0 −2
  308. drivers/char/hw_random/Kconfig +1 −1
  309. drivers/clocksource/Kconfig +1 −1
  310. drivers/input/touchscreen/Kconfig +2 −2
  311. drivers/mfd/Kconfig +0 −27
  312. drivers/mfd/Makefile +0 −3
  313. drivers/mfd/ab5500-core.c +0 −1439
  314. drivers/mfd/ab5500-debugfs.c +0 −807
  315. drivers/mfd/ab5500-debugfs.h +0 −22
  316. drivers/mfd/db5500-prcmu.c +0 −451
  317. drivers/mtd/nand/autcpu12.c +4 −6
  318. drivers/mtd/nand/h1910.c +1 −1
  319. drivers/net/irda/Kconfig +2 −2
  320. drivers/rtc/Kconfig +1 −1
  321. drivers/tty/serial/clps711x.c +0 −1
  322. drivers/usb/host/ohci-omap.c +3 −2
  323. drivers/video/clps711xfb.c +0 −1
  324. drivers/video/omap2/displays/Kconfig +4 −4
  325. drivers/video/omap2/displays/Makefile +1 −1
  326. drivers/video/omap2/displays/panel-taal.c +22 −0
  327. drivers/video/omap2/displays/panel-tfp410.c +76 −58
  328. drivers/video/omap2/dss/dsi.c +68 −65
  329. include/linux/mfd/abx500.h +1 −4
  330. include/linux/mfd/abx500/ab5500.h +0 −140
  331. include/linux/mfd/db5500-prcmu.h +0 −105
  332. include/linux/mfd/dbx500-prcmu.h +43 −199
  333. include/video/omap-panel-nokia-dsi.h +3 −0
  334. include/video/omap-panel-tfp410.h +8 −10
  335. include/video/omapdss.h +17 −11
Documentation/arm/00-INDEX+0−2
@@ -4,8 +4,6 @@ Booting · 3 unmodified lines
44 - requirements for booting
55 Interrupts
66 - ARM Interrupt subsystem documentation
7−IXP2000
8− - Release Notes for Linux on Intel's IXP2000 Network Processor
97 msm
108 - MSM specific documentation
119 Netwinder
Documentation/arm/IXP2000+0−69
@@ -1,69 +0,0 @@
1−
2−-------------------------------------------------------------------------
3−Release Notes for Linux on Intel's IXP2000 Network Processor
4−
5−Maintained by Deepak Saxena <dsaxena@plexity.net>
6−-------------------------------------------------------------------------
7−
8−1. Overview
9−
10−Intel's IXP2000 family of NPUs (IXP2400, IXP2800, IXP2850) is designed
11−for high-performance network applications such high-availability
12−telecom systems. In addition to an XScale core, it contains up to 8
13−"MicroEngines" that run special code, several high-end networking
14−interfaces (UTOPIA, SPI, etc), a PCI host bridge, one serial port,
15−flash interface, and some other odds and ends. For more information, see:
16−
17−http://developer.intel.com
18−
19−2. Linux Support
20−
21−Linux currently supports the following features on the IXP2000 NPUs:
22−
23−- On-chip serial
24−- PCI
25−- Flash (MTD/JFFS2)
26−- I2C through GPIO
27−- Timers (watchdog, OS)
28−
29−That is about all we can support under Linux ATM b/c the core networking
30−components of the chip are accessed via Intel's closed source SDK.
31−Please contact Intel directly on issues with using those. There is
32−also a mailing list run by some folks at Princeton University that might
33−be of help: https://lists.cs.princeton.edu/mailman/listinfo/ixp2xxx
34−
35−WHATEVER YOU DO, DO NOT POST EMAIL TO THE LINUX-ARM OR LINUX-ARM-KERNEL
36−MAILING LISTS REGARDING THE INTEL SDK.
37−
38−3. Supported Platforms
39−
40−- Intel IXDP2400 Reference Platform
41−- Intel IXDP2800 Reference Platform
42−- Intel IXDP2401 Reference Platform
43−- Intel IXDP2801 Reference Platform
44−- RadiSys ENP-2611
45−
46−4. Usage Notes
47−
48−- The IXP2000 platforms usually have rather complex PCI bus topologies
49− with large memory space requirements. In addition, b/c of the way the
50− Intel SDK is designed, devices are enumerated in a very specific
51− way. B/c of this this, we use "pci=firmware" option in the kernel
52− command line so that we do not re-enumerate the bus.
53−
54−- IXDP2x01 systems have variable clock tick rates that we cannot determine
55− via HW registers. The "ixdp2x01_clk=XXX" cmd line options allow you
56− to pass the clock rate to the board port.
57−
58−5. Thanks
59−
60−The IXP2000 work has been funded by Intel Corp. and MontaVista Software, Inc.
61−
62−The following people have contributed patches/comments/etc:
63−
64−Naeem F. Afzal
65−Lennert Buytenhek
66−Jeffrey Daly
67−
68−-------------------------------------------------------------------------
69−Last Update: 8/09/2004
MAINTAINERS+0−17
@@ -640,13 +640,6 @@ S: Maintained · 639 unmodified lines
640640 F: drivers/amba/
641641 F: include/linux/amba/bus.h
642642
643−ARM/ADI ROADRUNNER MACHINE SUPPORT
644−M: Lennert Buytenhek <kernel@wantstofly.org>
645−L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
646−S: Maintained
647−F: arch/arm/mach-ixp23xx/
648−F: arch/arm/mach-ixp23xx/include/mach/
649−
650643 ARM/ADS SPHERE MACHINE SUPPORT
651644 M: Lennert Buytenhek <kernel@wantstofly.org>
652645 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -862,21 +855,11 @@ M: Dan Williams <dan.j.williams@intel.com> · 209 unmodified lines
862855 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
863856 S: Maintained
864857
865−ARM/INTEL IXP2000 ARM ARCHITECTURE
866−M: Lennert Buytenhek <kernel@wantstofly.org>
867−L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
868−S: Maintained
869−
870858 ARM/INTEL IXDP2850 MACHINE SUPPORT
871859 M: Lennert Buytenhek <kernel@wantstofly.org>
872860 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
873861 S: Maintained
874862
875−ARM/INTEL IXP23XX ARM ARCHITECTURE
876−M: Lennert Buytenhek <kernel@wantstofly.org>
877−L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
878−S: Maintained
879−
880863 ARM/INTEL IXP4XX ARM ARCHITECTURE
881864 M: Imre Kaloz <kaloz@openwrt.org>
882865 M: Krzysztof Halasa <khc@pm.waw.pl>
arch/arm/Kconfig+4−30
@@ -336,8 +336,8 @@ config ARCH_AT91 · 335 unmodified lines
336336 select IRQ_DOMAIN
337337 select NEED_MACH_IO_H if PCCARD
338338 help
339− This enables support for systems based on the Atmel AT91RM9200,
340− AT91SAM9 processors.
339+ This enables support for systems based on Atmel
340+ AT91RM9200 and AT91SAM9* processors.
341341
342342 config ARCH_BCMRING
343343 bool "Broadcom BCMRING"
@@ -369,12 +369,12 @@ config ARCH_HIGHBANK · 25 unmodified lines
369369 Support for the Calxeda Highbank SoC based boards.
370370
371371 config ARCH_CLPS711X
372− bool "Cirrus Logic CLPS711x/EP721x-based"
372+ bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
373373 select CPU_ARM720T
374374 select ARCH_USES_GETTIMEOFFSET
375375 select NEED_MACH_MEMORY_H
376376 help
377− Support for Cirrus Logic 711x/721x based boards.
377+ Support for Cirrus Logic 711x/721x/731x based boards.
378378
379379 config ARCH_CNS3XXX
380380 bool "Cavium Networks CNS3XXX family"
@@ -524,28 +524,6 @@ config ARCH_IOP33X · 143 unmodified lines
524524 help
525525 Support for Intel's IOP33X (XScale) family of processors.
526526
527−config ARCH_IXP23XX
528− bool "IXP23XX-based"
529− depends on MMU
530− select CPU_XSC3
531− select PCI
532− select ARCH_USES_GETTIMEOFFSET
533− select NEED_MACH_IO_H
534− select NEED_MACH_MEMORY_H
535− help
536− Support for Intel's IXP23xx (XScale) family of processors.
537−
538−config ARCH_IXP2000
539− bool "IXP2400/2800-based"
540− depends on MMU
541− select CPU_XSCALE
542− select PCI
543− select ARCH_USES_GETTIMEOFFSET
544− select NEED_MACH_IO_H
545− select NEED_MACH_MEMORY_H
546− help
547− Support for Intel's IXP2400/2800 (XScale) family of processors.
548−
549527 config ARCH_IXP4XX
550528 bool "IXP4xx-based"
551529 depends on MMU
@@ -1039,10 +1017,6 @@ source "arch/arm/mach-iop13xx/Kconfig" · 487 unmodified lines
10391017
10401018 source "arch/arm/mach-ixp4xx/Kconfig"
10411019
1042−source "arch/arm/mach-ixp2000/Kconfig"
1043−
1044−source "arch/arm/mach-ixp23xx/Kconfig"
1045−
10461020 source "arch/arm/mach-kirkwood/Kconfig"
10471021
10481022 source "arch/arm/mach-ks8695/Kconfig"
arch/arm/Makefile+0−2
@@ -147,8 +147,6 @@ machine-$(CONFIG_ARCH_INTEGRATOR) := integrator · 146 unmodified lines
147147 machine-$(CONFIG_ARCH_IOP13XX) := iop13xx
148148 machine-$(CONFIG_ARCH_IOP32X) := iop32x
149149 machine-$(CONFIG_ARCH_IOP33X) := iop33x
150−machine-$(CONFIG_ARCH_IXP2000) := ixp2000
151−machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx
152150 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
153151 machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
154152 machine-$(CONFIG_ARCH_KS8695) := ks8695
arch/arm/boot/compressed/head-xscale.S+0−7
@@ -32,10 +32,3 @@ __XScale_start: · 31 unmodified lines
3232 bic r0, r0, #0x1000 @ clear Icache
3333 mcr p15, 0, r0, c1, c0, 0
3434
35−#ifdef CONFIG_ARCH_IXP2000
36− mov r1, #-1
37− mov r0, #0xd6000000
38− str r1, [r0, #0x14]
39− str r1, [r0, #0x18]
40−#endif
41−
arch/arm/common/Makefile+0−2
@@ -11,7 +11,5 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o · 10 unmodified lines
1111 obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
1212 obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
1313 obj-$(CONFIG_SHARP_SCOOP) += scoop.o
14−obj-$(CONFIG_ARCH_IXP2000) += uengine.o
15−obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
1614 obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
1715 obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
arch/arm/common/uengine.c+0−507
@@ -1,507 +0,0 @@
1−/*
2− * Generic library functions for the microengines found on the Intel
3− * IXP2000 series of network processors.
4− *
5− * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org>
6− * Dedicated to Marija Kulikova.
7− *
8− * This program is free software; you can redistribute it and/or modify
9− * it under the terms of the GNU Lesser General Public License as
10− * published by the Free Software Foundation; either version 2.1 of the
11− * License, or (at your option) any later version.
12− */
13−
14−#include <linux/kernel.h>
15−#include <linux/init.h>
16−#include <linux/slab.h>
17−#include <linux/module.h>
18−#include <linux/string.h>
19−#include <linux/io.h>
20−#include <mach/hardware.h>
21−#include <asm/hardware/uengine.h>
22−
23−#if defined(CONFIG_ARCH_IXP2000)
24−#define IXP_UENGINE_CSR_VIRT_BASE IXP2000_UENGINE_CSR_VIRT_BASE
25−#define IXP_PRODUCT_ID IXP2000_PRODUCT_ID
26−#define IXP_MISC_CONTROL IXP2000_MISC_CONTROL
27−#define IXP_RESET1 IXP2000_RESET1
28−#else
29−#if defined(CONFIG_ARCH_IXP23XX)
30−#define IXP_UENGINE_CSR_VIRT_BASE IXP23XX_UENGINE_CSR_VIRT_BASE
31−#define IXP_PRODUCT_ID IXP23XX_PRODUCT_ID
32−#define IXP_MISC_CONTROL IXP23XX_MISC_CONTROL
33−#define IXP_RESET1 IXP23XX_RESET1
34−#else
35−#error unknown platform
36−#endif
37−#endif
38−
39−#define USTORE_ADDRESS 0x000
40−#define USTORE_DATA_LOWER 0x004
41−#define USTORE_DATA_UPPER 0x008
42−#define CTX_ENABLES 0x018
43−#define CC_ENABLE 0x01c
44−#define CSR_CTX_POINTER 0x020
45−#define INDIRECT_CTX_STS 0x040
46−#define ACTIVE_CTX_STS 0x044
47−#define INDIRECT_CTX_SIG_EVENTS 0x048
48−#define INDIRECT_CTX_WAKEUP_EVENTS 0x050
49−#define NN_PUT 0x080
50−#define NN_GET 0x084
51−#define TIMESTAMP_LOW 0x0c0
52−#define TIMESTAMP_HIGH 0x0c4
53−#define T_INDEX_BYTE_INDEX 0x0f4
54−#define LOCAL_CSR_STATUS 0x180
55−
56−u32 ixp2000_uengine_mask;
57−
58−static void *ixp2000_uengine_csr_area(int uengine)
59−{
60− return ((void *)IXP_UENGINE_CSR_VIRT_BASE) + (uengine << 10);
61−}
62−
63−/*
64− * LOCAL_CSR_STATUS=1 after a read or write to a microengine's CSR
65− * space means that the microengine we tried to access was also trying
66− * to access its own CSR space on the same clock cycle as we did. When
67− * this happens, we lose the arbitration process by default, and the
68− * read or write we tried to do was not actually performed, so we try
69− * again until it succeeds.
70− */
71−u32 ixp2000_uengine_csr_read(int uengine, int offset)
72−{
73− void *uebase;
74− u32 *local_csr_status;
75− u32 *reg;
76− u32 value;
77−
78− uebase = ixp2000_uengine_csr_area(uengine);
79−
80− local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS);
81− reg = (u32 *)(uebase + offset);
82− do {
83− value = ixp2000_reg_read(reg);
84− } while (ixp2000_reg_read(local_csr_status) & 1);
85−
86− return value;
87−}
88−EXPORT_SYMBOL(ixp2000_uengine_csr_read);
89−
90−void ixp2000_uengine_csr_write(int uengine, int offset, u32 value)
91−{
92− void *uebase;
93− u32 *local_csr_status;
94− u32 *reg;
95−
96− uebase = ixp2000_uengine_csr_area(uengine);
97−
98− local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS);
99− reg = (u32 *)(uebase + offset);
100− do {
101− ixp2000_reg_write(reg, value);
102− } while (ixp2000_reg_read(local_csr_status) & 1);
103−}
104−EXPORT_SYMBOL(ixp2000_uengine_csr_write);
105−
106−void ixp2000_uengine_reset(u32 uengine_mask)
107−{
108− u32 value;
109−
110− value = ixp2000_reg_read(IXP_RESET1) & ~ixp2000_uengine_mask;
111−
112− uengine_mask &= ixp2000_uengine_mask;
113− ixp2000_reg_wrb(IXP_RESET1, value | uengine_mask);
114− ixp2000_reg_wrb(IXP_RESET1, value);
115−}
116−EXPORT_SYMBOL(ixp2000_uengine_reset);
117−
118−void ixp2000_uengine_set_mode(int uengine, u32 mode)
119−{
120− /*
121− * CTL_STR_PAR_EN: unconditionally enable parity checking on
122− * control store.
123− */
124− mode |= 0x10000000;
125− ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mode);
126−
127− /*
128− * Enable updating of condition codes.
129− */
130− ixp2000_uengine_csr_write(uengine, CC_ENABLE, 0x00002000);
131−
132− /*
133− * Initialise other per-microengine registers.
134− */
135− ixp2000_uengine_csr_write(uengine, NN_PUT, 0x00);
136− ixp2000_uengine_csr_write(uengine, NN_GET, 0x00);
137− ixp2000_uengine_csr_write(uengine, T_INDEX_BYTE_INDEX, 0);
138−}
139−EXPORT_SYMBOL(ixp2000_uengine_set_mode);
140−
141−static int make_even_parity(u32 x)
142−{
143− return hweight32(x) & 1;
144−}
145−
146−static void ustore_write(int uengine, u64 insn)
147−{
148− /*
149− * Generate even parity for top and bottom 20 bits.
150− */
151− insn |= (u64)make_even_parity((insn >> 20) & 0x000fffff) << 41;
152− insn |= (u64)make_even_parity(insn & 0x000fffff) << 40;
153−
154− /*
155− * Write to microstore. The second write auto-increments
156− * the USTORE_ADDRESS index register.
157− */
158− ixp2000_uengine_csr_write(uengine, USTORE_DATA_LOWER, (u32)insn);
159− ixp2000_uengine_csr_write(uengine, USTORE_DATA_UPPER, (u32)(insn >> 32));
160−}
161−
162−void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns)
163−{
164− int i;
165−
166− /*
167− * Start writing to microstore at address 0.
168− */
169− ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x80000000);
170− for (i = 0; i < insns; i++) {
171− u64 insn;
172−
173− insn = (((u64)ucode[0]) << 32) |
174− (((u64)ucode[1]) << 24) |
175− (((u64)ucode[2]) << 16) |
176− (((u64)ucode[3]) << 8) |
177− ((u64)ucode[4]);
178− ucode += 5;
179−
180− ustore_write(uengine, insn);
181− }
182−
183− /*
184− * Pad with a few NOPs at the end (to avoid the microengine
185− * aborting as it prefetches beyond the last instruction), unless
186− * we run off the end of the instruction store first, at which
187− * point the address register will wrap back to zero.
188− */
189− for (i = 0; i < 4; i++) {
190− u32 addr;
191−
192− addr = ixp2000_uengine_csr_read(uengine, USTORE_ADDRESS);
193− if (addr == 0x80000000)
194− break;
195− ustore_write(uengine, 0xf0000c0300ULL);
196− }
197−
198− /*
199− * End programming.
200− */
201− ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x00000000);
202−}
203−EXPORT_SYMBOL(ixp2000_uengine_load_microcode);
204−
205−void ixp2000_uengine_init_context(int uengine, int context, int pc)
206−{
207− /*
208− * Select the right context for indirect access.
209− */
210− ixp2000_uengine_csr_write(uengine, CSR_CTX_POINTER, context);
211−
212− /*
213− * Initialise signal masks to immediately go to Ready state.
214− */
215− ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_SIG_EVENTS, 1);
216− ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_WAKEUP_EVENTS, 1);
217−
218− /*
219− * Set program counter.
220− */
221− ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_STS, pc);
222−}
223−EXPORT_SYMBOL(ixp2000_uengine_init_context);
224−
225−void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask)
226−{
227− u32 mask;
228−
229− /*
230− * Enable the specified context to go to Executing state.
231− */
232− mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES);
233− mask |= ctx_mask << 8;
234− ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask);
235−}
236−EXPORT_SYMBOL(ixp2000_uengine_start_contexts);
237−
238−void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask)
239−{
240− u32 mask;
241−
242− /*
243− * Disable the Ready->Executing transition. Note that this
244− * does not stop the context until it voluntarily yields.
245− */
246− mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES);
247− mask &= ~(ctx_mask << 8);
248− ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask);
249−}
250−EXPORT_SYMBOL(ixp2000_uengine_stop_contexts);
251−
252−static int check_ixp_type(struct ixp2000_uengine_code *c)
253−{
254− u32 product_id;
255− u32 rev;
256−
257− product_id = ixp2000_reg_read(IXP_PRODUCT_ID);
258− if (((product_id >> 16) & 0x1f) != 0)
259− return 0;
260−
261− switch ((product_id >> 8) & 0xff) {
262−#ifdef CONFIG_ARCH_IXP2000
263− case 0: /* IXP2800 */
264− if (!(c->cpu_model_bitmask & 4))
265− return 0;
266− break;
267−
268− case 1: /* IXP2850 */
269− if (!(c->cpu_model_bitmask & 8))
270− return 0;
271− break;
272−
273− case 2: /* IXP2400 */
274− if (!(c->cpu_model_bitmask & 2))
275− return 0;
276− break;
277−#endif
278−
279−#ifdef CONFIG_ARCH_IXP23XX
280− case 4: /* IXP23xx */
281− if (!(c->cpu_model_bitmask & 0x3f0))
282− return 0;
283− break;
284−#endif
285−
286− default:
287− return 0;
288− }
289−
290− rev = product_id & 0xff;
291− if (rev < c->cpu_min_revision || rev > c->cpu_max_revision)
292− return 0;
293−
294− return 1;
295−}
296−
297−static void generate_ucode(u8 *ucode, u32 *gpr_a, u32 *gpr_b)
298−{
299− int offset;
300− int i;
301−
302− offset = 0;
303−
304− for (i = 0; i < 128; i++) {
305− u8 b3;
306− u8 b2;
307− u8 b1;
308− u8 b0;
309−
310− b3 = (gpr_a[i] >> 24) & 0xff;
311− b2 = (gpr_a[i] >> 16) & 0xff;
312− b1 = (gpr_a[i] >> 8) & 0xff;
313− b0 = gpr_a[i] & 0xff;
314−
315− /* immed[@ai, (b1 << 8) | b0] */
316− /* 11110000 0000VVVV VVVV11VV VVVVVV00 1IIIIIII */
317− ucode[offset++] = 0xf0;
318− ucode[offset++] = (b1 >> 4);
319− ucode[offset++] = (b1 << 4) | 0x0c | (b0 >> 6);
320− ucode[offset++] = (b0 << 2);
321− ucode[offset++] = 0x80 | i;
322−
323− /* immed_w1[@ai, (b3 << 8) | b2] */
324− /* 11110100 0100VVVV VVVV11VV VVVVVV00 1IIIIIII */
325− ucode[offset++] = 0xf4;
326− ucode[offset++] = 0x40 | (b3 >> 4);
327− ucode[offset++] = (b3 << 4) | 0x0c | (b2 >> 6);
328− ucode[offset++] = (b2 << 2);
329− ucode[offset++] = 0x80 | i;
330− }
331−
332− for (i = 0; i < 128; i++) {
333− u8 b3;
334− u8 b2;
335− u8 b1;
336− u8 b0;
337−
338− b3 = (gpr_b[i] >> 24) & 0xff;
339− b2 = (gpr_b[i] >> 16) & 0xff;
340− b1 = (gpr_b[i] >> 8) & 0xff;
341− b0 = gpr_b[i] & 0xff;
342−
343− /* immed[@bi, (b1 << 8) | b0] */
344− /* 11110000 0000VVVV VVVV001I IIIIII11 VVVVVVVV */
345− ucode[offset++] = 0xf0;
346− ucode[offset++] = (b1 >> 4);
347− ucode[offset++] = (b1 << 4) | 0x02 | (i >> 6);
348− ucode[offset++] = (i << 2) | 0x03;
349− ucode[offset++] = b0;
350−
351− /* immed_w1[@bi, (b3 << 8) | b2] */
352− /* 11110100 0100VVVV VVVV001I IIIIII11 VVVVVVVV */
353− ucode[offset++] = 0xf4;
354− ucode[offset++] = 0x40 | (b3 >> 4);
355− ucode[offset++] = (b3 << 4) | 0x02 | (i >> 6);
356− ucode[offset++] = (i << 2) | 0x03;
357− ucode[offset++] = b2;
358− }
359−
360− /* ctx_arb[kill] */
361− ucode[offset++] = 0xe0;
362− ucode[offset++] = 0x00;
363− ucode[offset++] = 0x01;
364− ucode[offset++] = 0x00;
365− ucode[offset++] = 0x00;
366−}
367−
368−static int set_initial_registers(int uengine, struct ixp2000_uengine_code *c)
369−{
370− int per_ctx_regs;
371− u32 *gpr_a;
372− u32 *gpr_b;
373− u8 *ucode;
374− int i;
375−
376− gpr_a = kzalloc(128 * sizeof(u32), GFP_KERNEL);
377− gpr_b = kzalloc(128 * sizeof(u32), GFP_KERNEL);
378− ucode = kmalloc(513 * 5, GFP_KERNEL);
379− if (gpr_a == NULL || gpr_b == NULL || ucode == NULL) {
380− kfree(ucode);
381− kfree(gpr_b);
382− kfree(gpr_a);
383− return 1;
384− }
385−
386− per_ctx_regs = 16;
387− if (c->uengine_parameters & IXP2000_UENGINE_4_CONTEXTS)
388− per_ctx_regs = 32;
389−
390− for (i = 0; i < 256; i++) {
391− struct ixp2000_reg_value *r = c->initial_reg_values + i;
392− u32 *bank;
393− int inc;
394− int j;
395−
396− if (r->reg == -1)
397− break;
398−
399− bank = (r->reg & 0x400) ? gpr_b : gpr_a;
400− inc = (r->reg & 0x80) ? 128 : per_ctx_regs;
401−
402− j = r->reg & 0x7f;
403− while (j < 128) {
404− bank[j] = r->value;
405− j += inc;
406− }
407− }
408−
409− generate_ucode(ucode, gpr_a, gpr_b);
410− ixp2000_uengine_load_microcode(uengine, ucode, 513);
411− ixp2000_uengine_init_context(uengine, 0, 0);
412− ixp2000_uengine_start_contexts(uengine, 0x01);
413− for (i = 0; i < 100; i++) {
414− u32 status;
415−
416− status = ixp2000_uengine_csr_read(uengine, ACTIVE_CTX_STS);
417− if (!(status & 0x80000000))
418− break;
419− }
420− ixp2000_uengine_stop_contexts(uengine, 0x01);
421−
422− kfree(ucode);
423− kfree(gpr_b);
424− kfree(gpr_a);
425−
426− return !!(i == 100);
427−}
428−
429−int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c)
430−{
431− int ctx;
432−
433− if (!check_ixp_type(c))
434− return 1;
435−
436− if (!(ixp2000_uengine_mask & (1 << uengine)))
437− return 1;
438−
439− ixp2000_uengine_reset(1 << uengine);
440− ixp2000_uengine_set_mode(uengine, c->uengine_parameters);
441− if (set_initial_registers(uengine, c))
442− return 1;
443− ixp2000_uengine_load_microcode(uengine, c->insns, c->num_insns);
444−
445− for (ctx = 0; ctx < 8; ctx++)
446− ixp2000_uengine_init_context(uengine, ctx, 0);
447−
448− return 0;
449−}
450−EXPORT_SYMBOL(ixp2000_uengine_load);
451−
452−
453−static int __init ixp2000_uengine_init(void)
454−{
455− int uengine;
456− u32 value;
457−
458− /*
459− * Determine number of microengines present.
460− */
461− switch ((ixp2000_reg_read(IXP_PRODUCT_ID) >> 8) & 0x1fff) {
462−#ifdef CONFIG_ARCH_IXP2000
463− case 0: /* IXP2800 */
464− case 1: /* IXP2850 */
465− ixp2000_uengine_mask = 0x00ff00ff;
466− break;
467−
468− case 2: /* IXP2400 */
469− ixp2000_uengine_mask = 0x000f000f;
470− break;
471−#endif
472−
473−#ifdef CONFIG_ARCH_IXP23XX
474− case 4: /* IXP23xx */
475− ixp2000_uengine_mask = (*IXP23XX_EXP_CFG_FUSE >> 8) & 0xf;
476− break;
477−#endif
478−
479− default:
480− printk(KERN_INFO "Detected unknown IXP2000 model (%.8x)\n",
481− (unsigned int)ixp2000_reg_read(IXP_PRODUCT_ID));
482− ixp2000_uengine_mask = 0x00000000;
483− break;
484− }
485−
486− /*
487− * Reset microengines.
488− */
489− ixp2000_uengine_reset(ixp2000_uengine_mask);
490−
491− /*
492− * Synchronise timestamp counters across all microengines.
493− */
494− value = ixp2000_reg_read(IXP_MISC_CONTROL);
495− ixp2000_reg_wrb(IXP_MISC_CONTROL, value & ~0x80);
496− for (uengine = 0; uengine < 32; uengine++) {
497− if (ixp2000_uengine_mask & (1 << uengine)) {
498− ixp2000_uengine_csr_write(uengine, TIMESTAMP_LOW, 0);
499− ixp2000_uengine_csr_write(uengine, TIMESTAMP_HIGH, 0);
500− }
501− }
502− ixp2000_reg_wrb(IXP_MISC_CONTROL, value | 0x80);
503−
504− return 0;
505−}
506−
507−subsys_initcall(ixp2000_uengine_init);
arch/arm/configs/at91_dt_defconfig+196−0
@@ -0,0 +1,196 @@
1+CONFIG_EXPERIMENTAL=y
2+# CONFIG_LOCALVERSION_AUTO is not set
3+# CONFIG_SWAP is not set
4+CONFIG_SYSVIPC=y
5+CONFIG_LOG_BUF_SHIFT=14
6+CONFIG_BLK_DEV_INITRD=y
7+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
8+CONFIG_KALLSYMS_ALL=y
9+CONFIG_EMBEDDED=y
10+CONFIG_SLAB=y
11+CONFIG_MODULES=y
12+CONFIG_MODULE_UNLOAD=y
13+# CONFIG_LBDAF is not set
14+# CONFIG_BLK_DEV_BSG is not set
15+# CONFIG_IOSCHED_DEADLINE is not set
16+# CONFIG_IOSCHED_CFQ is not set
17+CONFIG_ARCH_AT91=y
18+CONFIG_SOC_AT91SAM9260=y
19+CONFIG_SOC_AT91SAM9263=y
20+CONFIG_SOC_AT91SAM9G45=y
21+CONFIG_SOC_AT91SAM9X5=y
22+CONFIG_MACH_AT91SAM_DT=y
23+CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
24+CONFIG_AT91_TIMER_HZ=128
25+CONFIG_AEABI=y
26+# CONFIG_OABI_COMPAT is not set
27+CONFIG_LEDS=y
28+CONFIG_LEDS_CPU=y
29+CONFIG_UACCESS_WITH_MEMCPY=y
30+CONFIG_ZBOOT_ROM_TEXT=0x0
31+CONFIG_ZBOOT_ROM_BSS=0x0
32+CONFIG_ARM_APPENDED_DTB=y
33+CONFIG_ARM_ATAG_DTB_COMPAT=y
34+CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
35+CONFIG_KEXEC=y
36+CONFIG_AUTO_ZRELADDR=y
37+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
38+CONFIG_NET=y
39+CONFIG_PACKET=y
40+CONFIG_UNIX=y
41+CONFIG_INET=y
42+CONFIG_IP_MULTICAST=y
43+CONFIG_IP_PNP=y
44+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
45+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
46+# CONFIG_INET_XFRM_MODE_BEET is not set
47+# CONFIG_INET_DIAG is not set
48+CONFIG_IPV6=y
49+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
50+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
51+# CONFIG_INET6_XFRM_MODE_BEET is not set
52+CONFIG_IPV6_SIT_6RD=y
53+# CONFIG_WIRELESS is not set
54+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
55+CONFIG_DEVTMPFS=y
56+CONFIG_DEVTMPFS_MOUNT=y
57+# CONFIG_STANDALONE is not set
58+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
59+CONFIG_MTD=y
60+CONFIG_MTD_CMDLINE_PARTS=y
61+CONFIG_MTD_CHAR=y
62+CONFIG_MTD_BLOCK=y
63+CONFIG_MTD_NAND=y
64+CONFIG_MTD_NAND_ATMEL=y
65+CONFIG_MTD_UBI=y
66+CONFIG_MTD_UBI_GLUEBI=y
67+CONFIG_PROC_DEVICETREE=y
68+CONFIG_BLK_DEV_LOOP=y
69+CONFIG_BLK_DEV_RAM=y
70+CONFIG_BLK_DEV_RAM_COUNT=4
71+CONFIG_BLK_DEV_RAM_SIZE=8192
72+CONFIG_ATMEL_PWM=y
73+CONFIG_ATMEL_TCLIB=y
74+CONFIG_EEPROM_93CX6=m
75+CONFIG_SCSI=y
76+CONFIG_BLK_DEV_SD=y
77+CONFIG_SCSI_MULTI_LUN=y
78+# CONFIG_SCSI_LOWLEVEL is not set
79+CONFIG_NETDEVICES=y
80+CONFIG_MII=y
81+CONFIG_MACB=y
82+# CONFIG_NET_VENDOR_BROADCOM is not set
83+# CONFIG_NET_VENDOR_CHELSIO is not set
84+# CONFIG_NET_VENDOR_FARADAY is not set
85+# CONFIG_NET_VENDOR_INTEL is not set
86+# CONFIG_NET_VENDOR_MARVELL is not set
87+# CONFIG_NET_VENDOR_MICREL is not set
88+# CONFIG_NET_VENDOR_NATSEMI is not set
89+# CONFIG_NET_VENDOR_SEEQ is not set
90+# CONFIG_NET_VENDOR_SMSC is not set
91+# CONFIG_NET_VENDOR_STMICRO is not set
92+CONFIG_DAVICOM_PHY=y
93+CONFIG_MICREL_PHY=y
94+# CONFIG_WLAN is not set
95+CONFIG_INPUT_POLLDEV=y
96+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
97+CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
98+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272
99+CONFIG_INPUT_JOYDEV=y
100+CONFIG_INPUT_EVDEV=y
101+# CONFIG_KEYBOARD_ATKBD is not set
102+CONFIG_KEYBOARD_GPIO=y
103+# CONFIG_INPUT_MOUSE is not set
104+CONFIG_INPUT_TOUCHSCREEN=y
105+# CONFIG_SERIO is not set
106+CONFIG_LEGACY_PTY_COUNT=4
107+CONFIG_SERIAL_ATMEL=y
108+CONFIG_SERIAL_ATMEL_CONSOLE=y
109+CONFIG_HW_RANDOM=y
110+CONFIG_I2C=y
111+CONFIG_I2C_GPIO=y
112+CONFIG_SPI=y
113+CONFIG_SPI_ATMEL=y
114+# CONFIG_HWMON is not set
115+CONFIG_WATCHDOG=y
116+CONFIG_AT91SAM9X_WATCHDOG=y
117+CONFIG_SSB=m
118+CONFIG_FB=y
119+CONFIG_FB_MODE_HELPERS=y
120+CONFIG_FB_ATMEL=y
121+CONFIG_BACKLIGHT_LCD_SUPPORT=y
122+# CONFIG_LCD_CLASS_DEVICE is not set
123+CONFIG_BACKLIGHT_CLASS_DEVICE=y
124+CONFIG_BACKLIGHT_ATMEL_LCDC=y
125+# CONFIG_BACKLIGHT_GENERIC is not set
126+CONFIG_FRAMEBUFFER_CONSOLE=y
127+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
128+CONFIG_FONTS=y
129+CONFIG_FONT_8x8=y
130+CONFIG_FONT_ACORN_8x8=y
131+CONFIG_FONT_MINI_4x6=y
132+CONFIG_LOGO=y
133+# CONFIG_HID_SUPPORT is not set
134+CONFIG_USB=y
135+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
136+CONFIG_USB_DEVICEFS=y
137+# CONFIG_USB_DEVICE_CLASS is not set
138+CONFIG_USB_EHCI_HCD=y
139+CONFIG_USB_OHCI_HCD=y
140+CONFIG_USB_ACM=y
141+CONFIG_USB_STORAGE=y
142+CONFIG_USB_SERIAL=y
143+CONFIG_USB_SERIAL_GENERIC=y
144+CONFIG_USB_SERIAL_FTDI_SIO=y
145+CONFIG_USB_SERIAL_PL2303=y
146+CONFIG_USB_GADGET=y
147+CONFIG_USB_AT91=m
148+CONFIG_USB_ATMEL_USBA=m
149+CONFIG_USB_ETH=m
150+CONFIG_USB_GADGETFS=m
151+CONFIG_USB_CDC_COMPOSITE=m
152+CONFIG_USB_G_ACM_MS=m
153+CONFIG_USB_G_MULTI=m
154+CONFIG_USB_G_MULTI_CDC=y
155+CONFIG_MMC=y
156+CONFIG_MMC_ATMELMCI=y
157+CONFIG_NEW_LEDS=y
158+CONFIG_LEDS_CLASS=y
159+CONFIG_LEDS_GPIO=y
160+CONFIG_LEDS_TRIGGERS=y
161+CONFIG_LEDS_TRIGGER_TIMER=y
162+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
163+CONFIG_LEDS_TRIGGER_GPIO=y
164+CONFIG_RTC_CLASS=y
165+CONFIG_RTC_DRV_AT91RM9200=y
166+CONFIG_RTC_DRV_AT91SAM9=y
167+CONFIG_DMADEVICES=y
168+# CONFIG_IOMMU_SUPPORT is not set
169+CONFIG_EXT2_FS=y
170+CONFIG_FANOTIFY=y
171+CONFIG_VFAT_FS=y
172+CONFIG_TMPFS=y
173+CONFIG_NFS_FS=y
174+CONFIG_NFS_V3=y
175+CONFIG_ROOT_NFS=y
176+CONFIG_NLS_CODEPAGE_437=y
177+CONFIG_NLS_CODEPAGE_850=y
178+CONFIG_NLS_ISO8859_1=y
179+CONFIG_STRIP_ASM_SYMS=y
180+CONFIG_DEBUG_FS=y
181+# CONFIG_SCHED_DEBUG is not set
182+# CONFIG_DEBUG_BUGVERBOSE is not set
183+# CONFIG_FTRACE is not set
184+CONFIG_DEBUG_USER=y
185+CONFIG_CRYPTO=y
186+CONFIG_CRYPTO_ECB=y
187+CONFIG_CRYPTO_AES=y
188+CONFIG_CRYPTO_ARC4=y
189+# CONFIG_CRYPTO_ANSI_CPRNG is not set
190+CONFIG_CRYPTO_USER_API_HASH=m
191+CONFIG_CRYPTO_USER_API_SKCIPHER=m
192+# CONFIG_CRYPTO_HW is not set
193+CONFIG_CRC_CCITT=m
194+CONFIG_CRC_ITU_T=m
195+CONFIG_CRC7=m
196+CONFIG_AVERAGE=y
arch/arm/configs/at91rm9200_defconfig+1−0
@@ -14,6 +14,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y · 13 unmodified lines
1414 # CONFIG_BLK_DEV_BSG is not set
1515 # CONFIG_IOSCHED_CFQ is not set
1616 CONFIG_ARCH_AT91=y
17+CONFIG_ARCH_AT91RM9200=y
1718 CONFIG_MACH_ONEARM=y
1819 CONFIG_ARCH_AT91RM9200DK=y
1920 CONFIG_MACH_AT91RM9200EK=y
arch/arm/configs/ixp2000_defconfig+0−99
@@ -1,99 +0,0 @@
1−CONFIG_EXPERIMENTAL=y
2−CONFIG_SYSVIPC=y
3−CONFIG_BSD_PROCESS_ACCT=y
4−CONFIG_LOG_BUF_SHIFT=14
5−CONFIG_BLK_DEV_INITRD=y
6−CONFIG_EXPERT=y
7−# CONFIG_HOTPLUG is not set
8−CONFIG_SLAB=y
9−CONFIG_MODULES=y
10−CONFIG_MODULE_UNLOAD=y
11−CONFIG_ARCH_IXP2000=y
12−CONFIG_ARCH_ENP2611=y
13−CONFIG_ARCH_IXDP2400=y
14−CONFIG_ARCH_IXDP2800=y
15−CONFIG_ARCH_IXDP2401=y
16−CONFIG_ARCH_IXDP2801=y
17−# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
18−# CONFIG_ARM_THUMB is not set
19−CONFIG_CPU_BIG_ENDIAN=y
20−CONFIG_ZBOOT_ROM_TEXT=0x0
21−CONFIG_ZBOOT_ROM_BSS=0x0
22−CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0"
23−CONFIG_FPE_NWFPE=y
24−CONFIG_FPE_NWFPE_XP=y
25−CONFIG_NET=y
26−CONFIG_PACKET=y
27−CONFIG_UNIX=y
28−CONFIG_INET=y
29−CONFIG_IP_PNP=y
30−CONFIG_IP_PNP_DHCP=y
31−CONFIG_IP_PNP_BOOTP=y
32−CONFIG_SYN_COOKIES=y
33−CONFIG_IPV6=y
34−# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
35−# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
36−# CONFIG_INET6_XFRM_MODE_BEET is not set
37−# CONFIG_IPV6_SIT is not set
38−# CONFIG_PREVENT_FIRMWARE_BUILD is not set
39−CONFIG_MTD=y
40−CONFIG_MTD_PARTITIONS=y
41−CONFIG_MTD_REDBOOT_PARTS=y
42−CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
43−CONFIG_MTD_REDBOOT_PARTS_READONLY=y
44−CONFIG_MTD_CHAR=y
45−CONFIG_MTD_BLOCK=y
46−CONFIG_MTD_CFI=y
47−CONFIG_MTD_CFI_INTELEXT=y
48−CONFIG_MTD_COMPLEX_MAPPINGS=y
49−CONFIG_MTD_IXP2000=y
50−CONFIG_BLK_DEV_LOOP=y
51−CONFIG_BLK_DEV_NBD=y
52−CONFIG_BLK_DEV_RAM=y
53−CONFIG_BLK_DEV_RAM_SIZE=8192
54−CONFIG_EEPROM_LEGACY=y
55−CONFIG_NETDEVICES=y
56−CONFIG_DUMMY=y
57−CONFIG_NET_ETHERNET=y
58−CONFIG_NET_PCI=y
59−CONFIG_CS89x0=y
60−CONFIG_E100=y
61−CONFIG_ENP2611_MSF_NET=y
62−CONFIG_WAN=y
63−CONFIG_HDLC=y
64−CONFIG_HDLC_RAW=y
65−CONFIG_HDLC_CISCO=y
66−CONFIG_HDLC_FR=y
67−CONFIG_HDLC_PPP=y
68−CONFIG_DLCI=y
69−# CONFIG_INPUT_KEYBOARD is not set
70−# CONFIG_INPUT_MOUSE is not set
71−# CONFIG_SERIO is not set
72−# CONFIG_VT is not set
73−CONFIG_SERIAL_8250=y
74−CONFIG_SERIAL_8250_CONSOLE=y
75−CONFIG_SERIAL_8250_NR_UARTS=3
76−# CONFIG_HW_RANDOM is not set
77−CONFIG_I2C=y
78−CONFIG_I2C_CHARDEV=y
79−CONFIG_I2C_IXP2000=y
80−CONFIG_WATCHDOG=y
81−CONFIG_IXP2000_WATCHDOG=y
82−CONFIG_EXT2_FS=y
83−CONFIG_EXT2_FS_XATTR=y
84−CONFIG_EXT2_FS_POSIX_ACL=y
85−CONFIG_EXT3_FS=y
86−CONFIG_EXT3_FS_POSIX_ACL=y
87−CONFIG_INOTIFY=y
88−CONFIG_TMPFS=y
89−CONFIG_JFFS2_FS=y
90−CONFIG_NFS_FS=y
91−CONFIG_NFS_V3=y
92−CONFIG_ROOT_NFS=y
93−CONFIG_PARTITION_ADVANCED=y
94−CONFIG_MAGIC_SYSRQ=y
95−CONFIG_DEBUG_KERNEL=y
96−CONFIG_DEBUG_MUTEXES=y
97−CONFIG_DEBUG_USER=y
98−CONFIG_DEBUG_ERRORS=y
99−CONFIG_DEBUG_LL=y
arch/arm/configs/ixp23xx_defconfig+0−105
@@ -1,105 +0,0 @@
1−CONFIG_EXPERIMENTAL=y
2−CONFIG_SYSVIPC=y
3−CONFIG_BSD_PROCESS_ACCT=y
4−CONFIG_LOG_BUF_SHIFT=14
5−CONFIG_BLK_DEV_INITRD=y
6−CONFIG_EXPERT=y
7−CONFIG_SLAB=y
8−CONFIG_MODULES=y
9−CONFIG_MODULE_UNLOAD=y
10−CONFIG_ARCH_IXP23XX=y
11−CONFIG_MACH_ESPRESSO=y
12−CONFIG_MACH_IXDP2351=y
13−CONFIG_MACH_ROADRUNNER=y
14−# CONFIG_ARM_THUMB is not set
15−CONFIG_CPU_BIG_ENDIAN=y
16−CONFIG_ZBOOT_ROM_TEXT=0x0
17−CONFIG_ZBOOT_ROM_BSS=0x0
18−CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp"
19−CONFIG_FPE_NWFPE=y
20−CONFIG_FPE_NWFPE_XP=y
21−CONFIG_NET=y
22−CONFIG_PACKET=y
23−CONFIG_UNIX=y
24−CONFIG_INET=y
25−CONFIG_IP_PNP=y
26−CONFIG_IP_PNP_DHCP=y
27−CONFIG_IP_PNP_BOOTP=y
28−CONFIG_SYN_COOKIES=y
29−CONFIG_IPV6=y
30−# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
31−# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
32−# CONFIG_INET6_XFRM_MODE_BEET is not set
33−# CONFIG_IPV6_SIT is not set
34−# CONFIG_PREVENT_FIRMWARE_BUILD is not set
35−# CONFIG_FW_LOADER is not set
36−CONFIG_MTD=y
37−CONFIG_MTD_PARTITIONS=y
38−CONFIG_MTD_REDBOOT_PARTS=y
39−CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
40−CONFIG_MTD_REDBOOT_PARTS_READONLY=y
41−CONFIG_MTD_CHAR=y
42−CONFIG_MTD_BLOCK=y
43−CONFIG_MTD_CFI=y
44−CONFIG_MTD_CFI_INTELEXT=y
45−CONFIG_MTD_COMPLEX_MAPPINGS=y
46−CONFIG_MTD_PHYSMAP=y
47−CONFIG_BLK_DEV_LOOP=y
48−CONFIG_BLK_DEV_NBD=y
49−CONFIG_BLK_DEV_RAM=y
50−CONFIG_BLK_DEV_RAM_SIZE=8192
51−CONFIG_EEPROM_LEGACY=y
52−CONFIG_IDE=y
53−CONFIG_BLK_DEV_SIIMAGE=y
54−CONFIG_SCSI=y
55−CONFIG_BLK_DEV_SD=y
56−CONFIG_NETDEVICES=y
57−CONFIG_DUMMY=y
58−CONFIG_NET_ETHERNET=y
59−CONFIG_NET_PCI=y
60−CONFIG_E100=y
61−CONFIG_E1000=y
62−CONFIG_WAN=y
63−CONFIG_HDLC=y
64−CONFIG_HDLC_RAW=y
65−CONFIG_HDLC_CISCO=y
66−CONFIG_HDLC_FR=y
67−CONFIG_HDLC_PPP=y
68−CONFIG_DLCI=y
69−# CONFIG_INPUT_KEYBOARD is not set
70−# CONFIG_INPUT_MOUSE is not set
71−# CONFIG_SERIO is not set
72−# CONFIG_VT is not set
73−CONFIG_SERIAL_8250=y
74−CONFIG_SERIAL_8250_CONSOLE=y
75−# CONFIG_HW_RANDOM is not set
76−CONFIG_I2C=y
77−CONFIG_I2C_CHARDEV=y
78−CONFIG_WATCHDOG=y
79−# CONFIG_USB_HID is not set
80−CONFIG_USB=y
81−CONFIG_USB_MON=y
82−CONFIG_USB_EHCI_HCD=y
83−CONFIG_USB_OHCI_HCD=y
84−CONFIG_USB_UHCI_HCD=y
85−CONFIG_USB_STORAGE=y
86−CONFIG_EXT2_FS=y
87−CONFIG_EXT2_FS_XATTR=y
88−CONFIG_EXT2_FS_POSIX_ACL=y
89−CONFIG_EXT3_FS=y
90−CONFIG_EXT3_FS_POSIX_ACL=y
91−CONFIG_INOTIFY=y
92−CONFIG_MSDOS_FS=y
93−CONFIG_TMPFS=y
94−CONFIG_JFFS2_FS=y
95−CONFIG_NFS_FS=y
96−CONFIG_NFS_V3=y
97−CONFIG_ROOT_NFS=y
98−CONFIG_PARTITION_ADVANCED=y
99−CONFIG_NLS_CODEPAGE_437=y
100−CONFIG_MAGIC_SYSRQ=y
101−CONFIG_DEBUG_KERNEL=y
102−CONFIG_DEBUG_MUTEXES=y
103−CONFIG_DEBUG_USER=y
104−CONFIG_DEBUG_ERRORS=y
105−CONFIG_DEBUG_LL=y
arch/arm/include/asm/hardware/cs89712.h+0−49
@@ -1,49 +0,0 @@
1−/*
2− * arch/arm/include/asm/hardware/cs89712.h
3− *
4− * This file contains the hardware definitions of the CS89712
5− * additional internal registers.
6− *
7− * Copyright (C) 2001 Thomas Gleixner autronix automation <gleixner@autronix.de>
8− *
9− *
10− * This program is free software; you can redistribute it and/or modify
11− * it under the terms of the GNU General Public License as published by
12− * the Free Software Foundation; either version 2 of the License, or
13− * (at your option) any later version.
14− *
15− * This program is distributed in the hope that it will be useful,
16− * but WITHOUT ANY WARRANTY; without even the implied warranty of
17− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18− * GNU General Public License for more details.
19− *
20− * You should have received a copy of the GNU General Public License
21− * along with this program; if not, write to the Free Software
22− * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23− */
24−#ifndef __ASM_HARDWARE_CS89712_H
25−#define __ASM_HARDWARE_CS89712_H
26−
27−/*
28−* CS89712 additional registers
29−*/
30−
31−#define PCDR 0x0002 /* Port C Data register ---------------------------- */
32−#define PCDDR 0x0042 /* Port C Data Direction register ------------------ */
33−#define SDCONF 0x2300 /* SDRAM Configuration register ---------------------*/
34−#define SDRFPR 0x2340 /* SDRAM Refresh period register --------------------*/
35−
36−#define SDCONF_ACTIVE (1 << 10)
37−#define SDCONF_CLKCTL (1 << 9)
38−#define SDCONF_WIDTH_4 (0 << 7)
39−#define SDCONF_WIDTH_8 (1 << 7)
40−#define SDCONF_WIDTH_16 (2 << 7)
41−#define SDCONF_WIDTH_32 (3 << 7)
42−#define SDCONF_SIZE_16 (0 << 5)
43−#define SDCONF_SIZE_64 (1 << 5)
44−#define SDCONF_SIZE_128 (2 << 5)
45−#define SDCONF_SIZE_256 (3 << 5)
46−#define SDCONF_CASLAT_2 (2)
47−#define SDCONF_CASLAT_3 (3)
48−
49−#endif /* __ASM_HARDWARE_CS89712_H */
arch/arm/include/asm/hardware/ep7211.h+0−40
@@ -1,40 +0,0 @@
1−/*
2− * arch/arm/include/asm/hardware/ep7211.h
3− *
4− * This file contains the hardware definitions of the EP7211 internal
5− * registers.
6− *
7− * Copyright (C) 2001 Blue Mug, Inc. All Rights Reserved.
8− *
9− * This program is free software; you can redistribute it and/or modify
10− * it under the terms of the GNU General Public License as published by
11− * the Free Software Foundation; either version 2 of the License, or
12− * (at your option) any later version.
13− *
14− * This program is distributed in the hope that it will be useful,
15− * but WITHOUT ANY WARRANTY; without even the implied warranty of
16− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17− * GNU General Public License for more details.
18− *
19− * You should have received a copy of the GNU General Public License
20− * along with this program; if not, write to the Free Software
21− * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22− */
23−#ifndef __ASM_HARDWARE_EP7211_H
24−#define __ASM_HARDWARE_EP7211_H
25−
26−#include <asm/hardware/clps7111.h>
27−
28−/*
29− * define EP7211_BASE to be the base address of the region
30− * you want to access.
31− */
32−
33−#define EP7211_PHYS_BASE (0x80000000)
34−
35−/*
36− * XXX miket@bluemug.com: need to introduce EP7211 registers (those not
37− * present in 7212) here.
38− */
39−
40−#endif /* __ASM_HARDWARE_EP7211_H */
arch/arm/include/asm/hardware/ep7212.h+0−83
@@ -1,83 +0,0 @@
1−/*
2− * arch/arm/include/asm/hardware/ep7212.h
3− *
4− * This file contains the hardware definitions of the EP7212 internal
5− * registers.
6− *
7− * Copyright (C) 2000 Deep Blue Solutions Ltd.
8− *
9− * This program is free software; you can redistribute it and/or modify
10− * it under the terms of the GNU General Public License as published by
11− * the Free Software Foundation; either version 2 of the License, or
12− * (at your option) any later version.
13− *
14− * This program is distributed in the hope that it will be useful,
15− * but WITHOUT ANY WARRANTY; without even the implied warranty of
16− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17− * GNU General Public License for more details.
18− *
19− * You should have received a copy of the GNU General Public License
20− * along with this program; if not, write to the Free Software
21− * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22− */
23−#ifndef __ASM_HARDWARE_EP7212_H
24−#define __ASM_HARDWARE_EP7212_H
25−
26−/*
27− * define EP7212_BASE to be the base address of the region
28− * you want to access.
29− */
30−
31−#define EP7212_PHYS_BASE (0x80000000)
32−
33−#ifndef __ASSEMBLY__
34−#define ep_readl(off) __raw_readl(EP7212_BASE + (off))
35−#define ep_writel(val,off) __raw_writel(val, EP7212_BASE + (off))
36−#endif
37−
38−/*
39− * These registers are specific to the EP7212 only
40− */
41−#define DAIR 0x2000
42−#define DAIR0 0x2040
43−#define DAIDR1 0x2080
44−#define DAIDR2 0x20c0
45−#define DAISR 0x2100
46−#define SYSCON3 0x2200
47−#define INTSR3 0x2240
48−#define INTMR3 0x2280
49−#define LEDFLSH 0x22c0
50−
51−#define DAIR_DAIEN (1 << 16)
52−#define DAIR_ECS (1 << 17)
53−#define DAIR_LCTM (1 << 19)
54−#define DAIR_LCRM (1 << 20)
55−#define DAIR_RCTM (1 << 21)
56−#define DAIR_RCRM (1 << 22)
57−#define DAIR_LBM (1 << 23)
58−
59−#define DAIDR2_FIFOEN (1 << 15)
60−#define DAIDR2_FIFOLEFT (0x0d << 16)
61−#define DAIDR2_FIFORIGHT (0x11 << 16)
62−
63−#define DAISR_RCTS (1 << 0)
64−#define DAISR_RCRS (1 << 1)
65−#define DAISR_LCTS (1 << 2)
66−#define DAISR_LCRS (1 << 3)
67−#define DAISR_RCTU (1 << 4)
68−#define DAISR_RCRO (1 << 5)
69−#define DAISR_LCTU (1 << 6)
70−#define DAISR_LCRO (1 << 7)
71−#define DAISR_RCNF (1 << 8)
72−#define DAISR_RCNE (1 << 9)
73−#define DAISR_LCNF (1 << 10)
74−#define DAISR_LCNE (1 << 11)
75−#define DAISR_FIFO (1 << 12)
76−
77−#define SYSCON3_ADCCON (1 << 0)
78−#define SYSCON3_DAISEL (1 << 3)
79−#define SYSCON3_ADCCKNSEN (1 << 4)
80−#define SYSCON3_FASTWAKE (1 << 8)
81−#define SYSCON3_DAIEN (1 << 9)
82−
83−#endif /* __ASM_HARDWARE_EP7212_H */
arch/arm/include/asm/hardware/uengine.h+0−62
@@ -1,62 +0,0 @@
1−/*
2− * Generic library functions for the microengines found on the Intel
3− * IXP2000 series of network processors.
4− *
5− * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org>
6− * Dedicated to Marija Kulikova.
7− *
8− * This program is free software; you can redistribute it and/or modify
9− * it under the terms of the GNU Lesser General Public License as
10− * published by the Free Software Foundation; either version 2.1 of the
11− * License, or (at your option) any later version.
12− */
13−
14−#ifndef __IXP2000_UENGINE_H
15−#define __IXP2000_UENGINE_H
16−
17−extern u32 ixp2000_uengine_mask;
18−
19−struct ixp2000_uengine_code
20−{
21− u32 cpu_model_bitmask;
22− u8 cpu_min_revision;
23− u8 cpu_max_revision;
24−
25− u32 uengine_parameters;
26−
27− struct ixp2000_reg_value {
28− int reg;
29− u32 value;
30− } *initial_reg_values;
31−
32− int num_insns;
33− u8 *insns;
34−};
35−
36−u32 ixp2000_uengine_csr_read(int uengine, int offset);
37−void ixp2000_uengine_csr_write(int uengine, int offset, u32 value);
38−void ixp2000_uengine_reset(u32 uengine_mask);
39−void ixp2000_uengine_set_mode(int uengine, u32 mode);
40−void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns);
41−void ixp2000_uengine_init_context(int uengine, int context, int pc);
42−void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask);
43−void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask);
44−int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c);
45−
46−#define IXP2000_UENGINE_8_CONTEXTS 0x00000000
47−#define IXP2000_UENGINE_4_CONTEXTS 0x80000000
48−#define IXP2000_UENGINE_PRN_UPDATE_EVERY 0x40000000
49−#define IXP2000_UENGINE_PRN_UPDATE_ON_ACCESS 0x00000000
50−#define IXP2000_UENGINE_NN_FROM_SELF 0x00100000
51−#define IXP2000_UENGINE_NN_FROM_PREVIOUS 0x00000000
52−#define IXP2000_UENGINE_ASSERT_EMPTY_AT_3 0x000c0000
53−#define IXP2000_UENGINE_ASSERT_EMPTY_AT_2 0x00080000
54−#define IXP2000_UENGINE_ASSERT_EMPTY_AT_1 0x00040000
55−#define IXP2000_UENGINE_ASSERT_EMPTY_AT_0 0x00000000
56−#define IXP2000_UENGINE_LM_ADDR1_GLOBAL 0x00020000
57−#define IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT 0x00000000
58−#define IXP2000_UENGINE_LM_ADDR0_GLOBAL 0x00010000
59−#define IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT 0x00000000
60−
61−
62−#endif
arch/arm/mach-at91/Kconfig+89−97
@@ -9,15 +9,6 @@ config HAVE_AT91_DBGU0 · 8 unmodified lines
99 config HAVE_AT91_DBGU1
1010 bool
1111
12−config HAVE_AT91_USART3
13− bool
14−
15−config HAVE_AT91_USART4
16− bool
17−
18−config HAVE_AT91_USART5
19− bool
20−
2112 config AT91_SAM9_ALT_RESET
2213 bool
2314 default !ARCH_AT91X40
@@ -26,87 +17,121 @@ config AT91_SAM9G45_RESET · 2 unmodified lines
2617 bool
2718 default !ARCH_AT91X40
2819
20+config SOC_AT91SAM9
21+ bool
22+ select GENERIC_CLOCKEVENTS
23+ select CPU_ARM926T
24+
2925 menu "Atmel AT91 System-on-Chip"
3026
31−choice
32− prompt "Atmel AT91 Processor"
27+comment "Atmel AT91 Processor"
3328
34−config ARCH_AT91RM9200
29+config SOC_AT91SAM9
30+ bool
31+ select CPU_ARM926T
32+ select AT91_SAM9_TIME
33+ select AT91_SAM9_SMC
34+
35+config SOC_AT91RM9200
3536 bool "AT91RM9200"
3637 select CPU_ARM920T
3738 select GENERIC_CLOCKEVENTS
3839 select HAVE_AT91_DBGU0
39− select HAVE_AT91_USART3
4040
41−config ARCH_AT91SAM9260
42− bool "AT91SAM9260 or AT91SAM9XE"
43− select CPU_ARM926T
44− select GENERIC_CLOCKEVENTS
41+config SOC_AT91SAM9260
42+ bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
43+ select SOC_AT91SAM9
4544 select HAVE_AT91_DBGU0
46− select HAVE_AT91_USART3
47− select HAVE_AT91_USART4
48− select HAVE_AT91_USART5
4945 select HAVE_NET_MACB
46+ help
47+ Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
48+ or AT91SAM9G20 SoC.
5049
51−config ARCH_AT91SAM9261
52− bool "AT91SAM9261"
53− select CPU_ARM926T
54− select GENERIC_CLOCKEVENTS
50+config SOC_AT91SAM9261
51+ bool "AT91SAM9261 or AT91SAM9G10"
52+ select SOC_AT91SAM9
53+ select HAVE_AT91_DBGU0
5554 select HAVE_FB_ATMEL
55+ help
56+ Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
57+
58+config SOC_AT91SAM9263
59+ bool "AT91SAM9263"
60+ select SOC_AT91SAM9
61+ select HAVE_AT91_DBGU1
62+ select HAVE_FB_ATMEL
63+ select HAVE_NET_MACB
64+
65+config SOC_AT91SAM9RL
66+ bool "AT91SAM9RL"
67+ select SOC_AT91SAM9
5668 select HAVE_AT91_DBGU0
69+ select HAVE_FB_ATMEL
5770
58−config ARCH_AT91SAM9G10
59− bool "AT91SAM9G10"
60− select CPU_ARM926T
61− select GENERIC_CLOCKEVENTS
71+config SOC_AT91SAM9G45
72+ bool "AT91SAM9G45 or AT91SAM9M10 families"
73+ select SOC_AT91SAM9
74+ select HAVE_AT91_DBGU1
75+ select HAVE_FB_ATMEL
76+ select HAVE_NET_MACB
77+ help
78+ Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
79+ This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
80+
81+config SOC_AT91SAM9X5
82+ bool "AT91SAM9x5 family"
83+ select SOC_AT91SAM9
6284 select HAVE_AT91_DBGU0
6385 select HAVE_FB_ATMEL
86+ select HAVE_NET_MACB
87+ help
88+ Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
89+ This means that your SAM9 name finishes with a '5' (except if it is
90+ AT91SAM9G45!).
91+ This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35
92+ and AT91SAM9X35.
93+
94+choice
95+ prompt "Atmel AT91 Processor Devices for non DT boards"
96+
97+config ARCH_AT91_NONE
98+ bool "None"
99+
100+config ARCH_AT91RM9200
101+ bool "AT91RM9200"
102+ select SOC_AT91RM9200
103+
104+config ARCH_AT91SAM9260
105+ bool "AT91SAM9260 or AT91SAM9XE"
106+ select SOC_AT91SAM9260
107+
108+config ARCH_AT91SAM9261
109+ bool "AT91SAM9261"
110+ select SOC_AT91SAM9261
111+
112+config ARCH_AT91SAM9G10
113+ bool "AT91SAM9G10"
114+ select SOC_AT91SAM9261
64115
65116 config ARCH_AT91SAM9263
66117 bool "AT91SAM9263"
67− select CPU_ARM926T
68− select GENERIC_CLOCKEVENTS
69− select HAVE_FB_ATMEL
70− select HAVE_NET_MACB
71− select HAVE_AT91_DBGU1
118+ select SOC_AT91SAM9263
72119
73120 config ARCH_AT91SAM9RL
74121 bool "AT91SAM9RL"
75− select CPU_ARM926T
76− select GENERIC_CLOCKEVENTS
77− select HAVE_AT91_USART3
78− select HAVE_FB_ATMEL
79− select HAVE_AT91_DBGU0
122+ select SOC_AT91SAM9RL
80123
81124 config ARCH_AT91SAM9G20
82125 bool "AT91SAM9G20"
83− select CPU_ARM926T
84− select GENERIC_CLOCKEVENTS
85− select HAVE_AT91_DBGU0
86− select HAVE_AT91_USART3
87− select HAVE_AT91_USART4
88− select HAVE_AT91_USART5
89− select HAVE_NET_MACB
126+ select SOC_AT91SAM9260
90127
91128 config ARCH_AT91SAM9G45
92129 bool "AT91SAM9G45"
93− select CPU_ARM926T
94− select GENERIC_CLOCKEVENTS
95− select HAVE_AT91_USART3
96− select HAVE_FB_ATMEL
97− select HAVE_NET_MACB
98− select HAVE_AT91_DBGU1
99−
100−config ARCH_AT91SAM9X5
101− bool "AT91SAM9x5 family"
102− select CPU_ARM926T
103− select GENERIC_CLOCKEVENTS
104− select HAVE_FB_ATMEL
105− select HAVE_NET_MACB
106− select HAVE_AT91_DBGU0
130+ select SOC_AT91SAM9G45
107131
108132 config ARCH_AT91X40
109133 bool "AT91x40"
134+ depends on !MMU
110135 select ARCH_USES_GETTIMEOFFSET
111136
112137 endchoice
@@ -364,6 +389,7 @@ config MACH_AT91SAM9G20EK_2MMC · 251 unmodified lines
364389 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
365390 with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
366391 onwards.
392+ <http://www.atmel.com/tools/SAM9G20-EK.aspx>
367393
368394 config MACH_CPU9G20
369395 bool "Eukrea CPU9G20 board"
@@ -433,9 +459,10 @@ comment "AT91SAM9G45 Board Type" · 63 unmodified lines
433459 config MACH_AT91SAM9M10G45EK
434460 bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"
435461 help
436− Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit.
437− "ES" at the end of the name means that this board is an
438− Engineering Sample.
462+ Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit.
463+ Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10
464+ families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
465+ <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx>
439466
440467 endif
441468
@@ -515,41 +542,6 @@ config AT91_TIMER_HZ · 73 unmodified lines
515542 system clock (of at least several MHz), rounding is less of a
516543 problem so it can be safer to use a decimal values like 100.
517544
518−choice
519− prompt "Select a UART for early kernel messages"
520−
521−config AT91_EARLY_DBGU0
522− bool "DBGU on rm9200, 9260/9g20, 9261/9g10 and 9rl"
523− depends on HAVE_AT91_DBGU0
524−
525−config AT91_EARLY_DBGU1
526− bool "DBGU on 9263 and 9g45"
527− depends on HAVE_AT91_DBGU1
528−
529−config AT91_EARLY_USART0
530− bool "USART0"
531−
532−config AT91_EARLY_USART1
533− bool "USART1"
534−
535−config AT91_EARLY_USART2
536− bool "USART2"
537− depends on ! ARCH_AT91X40
538−
539−config AT91_EARLY_USART3
540− bool "USART3"
541− depends on HAVE_AT91_USART3
542−
543−config AT91_EARLY_USART4
544− bool "USART4"
545− depends on HAVE_AT91_USART4
546−
547−config AT91_EARLY_USART5
548− bool "USART5"
549− depends on HAVE_AT91_USART5
550−
551−endchoice
552−
553545 endmenu
554546
555547 endif
arch/arm/mach-at91/Makefile+17−9
@@ -10,17 +10,25 @@ obj- := · 9 unmodified lines
1010 obj-$(CONFIG_AT91_PMC_UNIT) += clock.o
1111 obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
1212 obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
13+obj-$(CONFIG_SOC_AT91SAM9) += at91sam926x_time.o sam9_smc.o
1314
1415 # CPU-specific support
15−obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
16−obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
17−obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
18−obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
19−obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o
20−obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o
21−obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
22−obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o
23−obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.o at91sam926x_time.o sam9_smc.o
16+obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o
17+obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o
18+obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o
19+obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o
20+obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o
21+obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o
22+obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o
23+
24+obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o
25+obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o
26+obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o
27+obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o
28+obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o
29+obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o
30+obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o
31+obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o
2432 obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
2533
2634 # AT91RM9200 board-specific support
arch/arm/mach-at91/at91rm9200.c+0−12
@@ -249,18 +249,6 @@ static void __init at91rm9200_register_clocks(void) · 248 unmodified lines
249249 clk_register(&pck3);
250250 }
251251
252−static struct clk_lookup console_clock_lookup;
253−
254−void __init at91rm9200_set_console_clock(int id)
255−{
256− if (id >= ARRAY_SIZE(usart_clocks_lookups))
257− return;
258−
259− console_clock_lookup.con_id = "usart";
260− console_clock_lookup.clk = usart_clocks_lookups[id].clk;
261− clkdev_add(&console_clock_lookup);
262−}
263−
264252 /* --------------------------------------------------------------------
265253 * GPIO
266254 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91rm9200_devices.c+0−12
@@ -1152,14 +1152,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) · 1151 unmodified lines
11521152 at91_uarts[portnr] = pdev;
11531153 }
11541154
1155−void __init at91_set_serial_console(unsigned portnr)
1156−{
1157− if (portnr < ATMEL_MAX_UART) {
1158− atmel_default_console_device = at91_uarts[portnr];
1159− at91rm9200_set_console_clock(at91_uarts[portnr]->id);
1160− }
1161−}
1162−
11631155 void __init at91_add_device_serial(void)
11641156 {
11651157 int i;
@@ -1168,13 +1160,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
11681160 if (at91_uarts[i])
11691161 platform_device_register(at91_uarts[i]);
11701162 }
1171−
1172− if (!atmel_default_console_device)
1173− printk(KERN_INFO "AT91: No default serial console defined.\n");
11741163 }
11751164 #else
11761165 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1177−void __init at91_set_serial_console(unsigned portnr) {}
11781166 void __init at91_add_device_serial(void) {}
11791167 #endif
11801168
arch/arm/mach-at91/at91sam9260.c+0−12
@@ -268,18 +268,6 @@ static void __init at91sam9260_register_clocks(void) · 267 unmodified lines
268268 clk_register(&pck1);
269269 }
270270
271−static struct clk_lookup console_clock_lookup;
272−
273−void __init at91sam9260_set_console_clock(int id)
274−{
275− if (id >= ARRAY_SIZE(usart_clocks_lookups))
276− return;
277−
278− console_clock_lookup.con_id = "usart";
279− console_clock_lookup.clk = usart_clocks_lookups[id].clk;
280− clkdev_add(&console_clock_lookup);
281−}
282−
283271 /* --------------------------------------------------------------------
284272 * GPIO
285273 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9260_devices.c+0−12
@@ -1229,14 +1229,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) · 1228 unmodified lines
12291229 at91_uarts[portnr] = pdev;
12301230 }
12311231
1232−void __init at91_set_serial_console(unsigned portnr)
1233−{
1234− if (portnr < ATMEL_MAX_UART) {
1235− atmel_default_console_device = at91_uarts[portnr];
1236− at91sam9260_set_console_clock(at91_uarts[portnr]->id);
1237− }
1238−}
1239−
12401232 void __init at91_add_device_serial(void)
12411233 {
12421234 int i;
@@ -1245,13 +1237,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
12451237 if (at91_uarts[i])
12461238 platform_device_register(at91_uarts[i]);
12471239 }
1248−
1249− if (!atmel_default_console_device)
1250− printk(KERN_INFO "AT91: No default serial console defined.\n");
12511240 }
12521241 #else
12531242 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1254−void __init at91_set_serial_console(unsigned portnr) {}
12551243 void __init at91_add_device_serial(void) {}
12561244 #endif
12571245
arch/arm/mach-at91/at91sam9261.c+0−12
@@ -239,18 +239,6 @@ static void __init at91sam9261_register_clocks(void) · 238 unmodified lines
239239 clk_register(&hck1);
240240 }
241241
242−static struct clk_lookup console_clock_lookup;
243−
244−void __init at91sam9261_set_console_clock(int id)
245−{
246− if (id >= ARRAY_SIZE(usart_clocks_lookups))
247− return;
248−
249− console_clock_lookup.con_id = "usart";
250− console_clock_lookup.clk = usart_clocks_lookups[id].clk;
251− clkdev_add(&console_clock_lookup);
252−}
253−
254242 /* --------------------------------------------------------------------
255243 * GPIO
256244 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9261_devices.c+0−12
@@ -1051,14 +1051,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) · 1050 unmodified lines
10511051 at91_uarts[portnr] = pdev;
10521052 }
10531053
1054−void __init at91_set_serial_console(unsigned portnr)
1055−{
1056− if (portnr < ATMEL_MAX_UART) {
1057− atmel_default_console_device = at91_uarts[portnr];
1058− at91sam9261_set_console_clock(at91_uarts[portnr]->id);
1059− }
1060−}
1061−
10621054 void __init at91_add_device_serial(void)
10631055 {
10641056 int i;
@@ -1067,13 +1059,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
10671059 if (at91_uarts[i])
10681060 platform_device_register(at91_uarts[i]);
10691061 }
1070−
1071− if (!atmel_default_console_device)
1072− printk(KERN_INFO "AT91: No default serial console defined.\n");
10731062 }
10741063 #else
10751064 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1076−void __init at91_set_serial_console(unsigned portnr) {}
10771065 void __init at91_add_device_serial(void) {}
10781066 #endif
10791067
arch/arm/mach-at91/at91sam9263.c+0−12
@@ -255,18 +255,6 @@ static void __init at91sam9263_register_clocks(void) · 254 unmodified lines
255255 clk_register(&pck3);
256256 }
257257
258−static struct clk_lookup console_clock_lookup;
259−
260−void __init at91sam9263_set_console_clock(int id)
261−{
262− if (id >= ARRAY_SIZE(usart_clocks_lookups))
263− return;
264−
265− console_clock_lookup.con_id = "usart";
266− console_clock_lookup.clk = usart_clocks_lookups[id].clk;
267− clkdev_add(&console_clock_lookup);
268−}
269−
270258 /* --------------------------------------------------------------------
271259 * GPIO
272260 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9263_devices.c+0−12
@@ -1461,14 +1461,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) · 1460 unmodified lines
14611461 at91_uarts[portnr] = pdev;
14621462 }
14631463
1464−void __init at91_set_serial_console(unsigned portnr)
1465−{
1466− if (portnr < ATMEL_MAX_UART) {
1467− atmel_default_console_device = at91_uarts[portnr];
1468− at91sam9263_set_console_clock(at91_uarts[portnr]->id);
1469− }
1470−}
1471−
14721464 void __init at91_add_device_serial(void)
14731465 {
14741466 int i;
@@ -1477,13 +1469,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
14771469 if (at91_uarts[i])
14781470 platform_device_register(at91_uarts[i]);
14791471 }
1480−
1481− if (!atmel_default_console_device)
1482− printk(KERN_INFO "AT91: No default serial console defined.\n");
14831472 }
14841473 #else
14851474 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1486−void __init at91_set_serial_console(unsigned portnr) {}
14871475 void __init at91_add_device_serial(void) {}
14881476 #endif
14891477
arch/arm/mach-at91/at91sam9g45.c+0−12
@@ -288,18 +288,6 @@ static void __init at91sam9g45_register_clocks(void) · 287 unmodified lines
288288 clk_register(&pck1);
289289 }
290290
291−static struct clk_lookup console_clock_lookup;
292−
293−void __init at91sam9g45_set_console_clock(int id)
294−{
295− if (id >= ARRAY_SIZE(usart_clocks_lookups))
296− return;
297−
298− console_clock_lookup.con_id = "usart";
299− console_clock_lookup.clk = usart_clocks_lookups[id].clk;
300− clkdev_add(&console_clock_lookup);
301−}
302−
303291 /* --------------------------------------------------------------------
304292 * GPIO
305293 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9g45_devices.c+0−12
@@ -1741,14 +1741,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) · 1740 unmodified lines
17411741 at91_uarts[portnr] = pdev;
17421742 }
17431743
1744−void __init at91_set_serial_console(unsigned portnr)
1745−{
1746− if (portnr < ATMEL_MAX_UART) {
1747− atmel_default_console_device = at91_uarts[portnr];
1748− at91sam9g45_set_console_clock(at91_uarts[portnr]->id);
1749− }
1750−}
1751−
17521744 void __init at91_add_device_serial(void)
17531745 {
17541746 int i;
@@ -1757,13 +1749,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
17571749 if (at91_uarts[i])
17581750 platform_device_register(at91_uarts[i]);
17591751 }
1760−
1761− if (!atmel_default_console_device)
1762− printk(KERN_INFO "AT91: No default serial console defined.\n");
17631752 }
17641753 #else
17651754 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1766−void __init at91_set_serial_console(unsigned portnr) {}
17671755 void __init at91_add_device_serial(void) {}
17681756 #endif
17691757
arch/arm/mach-at91/at91sam9rl.c+0−12
@@ -232,18 +232,6 @@ static void __init at91sam9rl_register_clocks(void) · 231 unmodified lines
232232 clk_register(&pck1);
233233 }
234234
235−static struct clk_lookup console_clock_lookup;
236−
237−void __init at91sam9rl_set_console_clock(int id)
238−{
239− if (id >= ARRAY_SIZE(usart_clocks_lookups))
240− return;
241−
242− console_clock_lookup.con_id = "usart";
243− console_clock_lookup.clk = usart_clocks_lookups[id].clk;
244− clkdev_add(&console_clock_lookup);
245−}
246−
247235 /* --------------------------------------------------------------------
248236 * GPIO
249237 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9rl_devices.c+0−12
@@ -1192,14 +1192,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) · 1191 unmodified lines
11921192 at91_uarts[portnr] = pdev;
11931193 }
11941194
1195−void __init at91_set_serial_console(unsigned portnr)
1196−{
1197− if (portnr < ATMEL_MAX_UART) {
1198− atmel_default_console_device = at91_uarts[portnr];
1199− at91sam9rl_set_console_clock(at91_uarts[portnr]->id);
1200− }
1201−}
1202−
12031195 void __init at91_add_device_serial(void)
12041196 {
12051197 int i;
@@ -1208,13 +1200,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
12081200 if (at91_uarts[i])
12091201 platform_device_register(at91_uarts[i]);
12101202 }
1211−
1212− if (!atmel_default_console_device)
1213− printk(KERN_INFO "AT91: No default serial console defined.\n");
12141203 }
12151204 #else
12161205 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1217−void __init at91_set_serial_console(unsigned portnr) {}
12181206 void __init at91_add_device_serial(void) {}
12191207 #endif
12201208
arch/arm/mach-at91/board-1arm.c+10−14
@@ -47,20 +47,6 @@ static void __init onearm_init_early(void) · 46 unmodified lines
4747
4848 /* Initialize processor: 18.432 MHz crystal */
4949 at91_initialize(18432000);
50−
51− /* DBGU on ttyS0. (Rx & Tx only) */
52− at91_register_uart(0, 0, 0);
53−
54− /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
55− at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
56−
57− /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
58− at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
59− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
60− | ATMEL_UART_RI);
61−
62− /* set serial console to ttyS0 (ie, DBGU) */
63− at91_set_serial_console(0);
6450 }
6551
6652 static struct macb_platform_data __initdata onearm_eth_data = {
@@ -82,6 +68,16 @@ static struct at91_udc_data __initdata onearm_udc_data = { · 15 unmodified lines
8268 static void __init onearm_board_init(void)
8369 {
8470 /* Serial */
71+ /* DBGU on ttyS0. (Rx & Tx only) */
72+ at91_register_uart(0, 0, 0);
73+
74+ /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
75+ at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
76+
77+ /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
78+ at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
79+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
80+ | ATMEL_UART_RI);
8581 at91_add_device_serial();
8682 /* Ethernet */
8783 at91_add_device_eth(&onearm_eth_data);
arch/arm/mach-at91/board-afeb-9260v1.c+12−16
@@ -52,22 +52,6 @@ static void __init afeb9260_init_early(void) · 51 unmodified lines
5252 {
5353 /* Initialize processor: 18.432 MHz crystal */
5454 at91_initialize(18432000);
55−
56− /* DBGU on ttyS0. (Rx & Tx only) */
57− at91_register_uart(0, 0, 0);
58−
59− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
60− at91_register_uart(AT91SAM9260_ID_US0, 1,
61− ATMEL_UART_CTS | ATMEL_UART_RTS
62− | ATMEL_UART_DTR | ATMEL_UART_DSR
63− | ATMEL_UART_DCD | ATMEL_UART_RI);
64−
65− /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
66− at91_register_uart(AT91SAM9260_ID_US1, 2,
67− ATMEL_UART_CTS | ATMEL_UART_RTS);
68−
69− /* set serial console to ttyS0 (ie, DBGU) */
70− at91_set_serial_console(0);
7155 }
7256
7357 /*
@@ -183,6 +167,18 @@ static struct at91_cf_data afeb9260_cf_data = { · 109 unmodified lines
183167 static void __init afeb9260_board_init(void)
184168 {
185169 /* Serial */
170+ /* DBGU on ttyS0. (Rx & Tx only) */
171+ at91_register_uart(0, 0, 0);
172+
173+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
174+ at91_register_uart(AT91SAM9260_ID_US0, 1,
175+ ATMEL_UART_CTS | ATMEL_UART_RTS
176+ | ATMEL_UART_DTR | ATMEL_UART_DSR
177+ | ATMEL_UART_DCD | ATMEL_UART_RI);
178+
179+ /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
180+ at91_register_uart(AT91SAM9260_ID_US1, 2,
181+ ATMEL_UART_CTS | ATMEL_UART_RTS);
186182 at91_add_device_serial();
187183 /* USB Host */
188184 at91_add_device_usbh(&afeb9260_usbh_data);
arch/arm/mach-at91/board-cam60.c+2−6
@@ -49,12 +49,6 @@ static void __init cam60_init_early(void) · 48 unmodified lines
4949 {
5050 /* Initialize processor: 10 MHz crystal */
5151 at91_initialize(10000000);
52−
53− /* DBGU on ttyS0. (Rx & Tx only) */
54− at91_register_uart(0, 0, 0);
55−
56− /* set serial console to ttyS0 (ie, DBGU) */
57− at91_set_serial_console(0);
5852 }
5953
6054 /*
@@ -175,6 +169,8 @@ static void __init cam60_add_device_nand(void) · 114 unmodified lines
175169 static void __init cam60_board_init(void)
176170 {
177171 /* Serial */
172+ /* DBGU on ttyS0. (Rx & Tx only) */
173+ at91_register_uart(0, 0, 0);
178174 at91_add_device_serial();
179175 /* SPI */
180176 at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
arch/arm/mach-at91/board-carmeva.c+7−11
@@ -44,17 +44,6 @@ static void __init carmeva_init_early(void) · 43 unmodified lines
4444 {
4545 /* Initialize processor: 20.000 MHz crystal */
4646 at91_initialize(20000000);
47−
48− /* DBGU on ttyS0. (Rx & Tx only) */
49− at91_register_uart(0, 0, 0);
50−
51− /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
52− at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
53− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
54− | ATMEL_UART_RI);
55−
56− /* set serial console to ttyS0 (ie, DBGU) */
57− at91_set_serial_console(0);
5847 }
5948
6049 static struct macb_platform_data __initdata carmeva_eth_data = {
@@ -139,6 +128,13 @@ static struct gpio_led carmeva_leds[] = { · 78 unmodified lines
139128 static void __init carmeva_board_init(void)
140129 {
141130 /* Serial */
131+ /* DBGU on ttyS0. (Rx & Tx only) */
132+ at91_register_uart(0, 0, 0);
133+
134+ /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
135+ at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
136+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
137+ | ATMEL_UART_RI);
142138 at91_add_device_serial();
143139 /* Ethernet */
144140 at91_add_device_eth(&carmeva_eth_data);
arch/arm/mach-at91/board-cpu9krea.c+24−28
@@ -52,34 +52,6 @@ static void __init cpu9krea_init_early(void) · 51 unmodified lines
5252 {
5353 /* Initialize processor: 18.432 MHz crystal */
5454 at91_initialize(18432000);
55−
56− /* DGBU on ttyS0. (Rx & Tx only) */
57− at91_register_uart(0, 0, 0);
58−
59− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
60− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS |
61− ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
62− ATMEL_UART_DCD | ATMEL_UART_RI);
63−
64− /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
65− at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS |
66− ATMEL_UART_RTS);
67−
68− /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */
69− at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS |
70− ATMEL_UART_RTS);
71−
72− /* USART3 on ttyS4. (Rx, Tx) */
73− at91_register_uart(AT91SAM9260_ID_US3, 4, 0);
74−
75− /* USART4 on ttyS5. (Rx, Tx) */
76− at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
77−
78− /* USART5 on ttyS6. (Rx, Tx) */
79− at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
80−
81− /* set serial console to ttyS0 (ie, DBGU) */
82− at91_set_serial_console(0);
8355 }
8456
8557 /*
@@ -352,6 +324,30 @@ static void __init cpu9krea_board_init(void) · 266 unmodified lines
352324 /* NOR */
353325 cpu9krea_add_device_nor();
354326 /* Serial */
327+ /* DGBU on ttyS0. (Rx & Tx only) */
328+ at91_register_uart(0, 0, 0);
329+
330+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
331+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS |
332+ ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
333+ ATMEL_UART_DCD | ATMEL_UART_RI);
334+
335+ /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
336+ at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS |
337+ ATMEL_UART_RTS);
338+
339+ /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */
340+ at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS |
341+ ATMEL_UART_RTS);
342+
343+ /* USART3 on ttyS4. (Rx, Tx) */
344+ at91_register_uart(AT91SAM9260_ID_US3, 4, 0);
345+
346+ /* USART4 on ttyS5. (Rx, Tx) */
347+ at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
348+
349+ /* USART5 on ttyS6. (Rx, Tx) */
350+ at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
355351 at91_add_device_serial();
356352 /* USB Host */
357353 at91_add_device_usbh(&cpu9krea_usbh_data);
arch/arm/mach-at91/board-cpuat91.c+18−22
@@ -59,28 +59,6 @@ static void __init cpuat91_init_early(void) · 58 unmodified lines
5959
6060 /* Initialize processor: 18.432 MHz crystal */
6161 at91_initialize(18432000);
62−
63− /* DBGU on ttyS0. (Rx & Tx only) */
64− at91_register_uart(0, 0, 0);
65−
66− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
67− at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS |
68− ATMEL_UART_RTS);
69−
70− /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
71− at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS |
72− ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
73− ATMEL_UART_DCD | ATMEL_UART_RI);
74−
75− /* USART2 on ttyS3 (Rx, Tx) */
76− at91_register_uart(AT91RM9200_ID_US2, 3, 0);
77−
78− /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
79− at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
80− ATMEL_UART_RTS);
81−
82− /* set serial console to ttyS0 (ie, DBGU) */
83− at91_set_serial_console(0);
8462 }
8563
8664 static struct macb_platform_data __initdata cpuat91_eth_data = {
@@ -161,6 +139,24 @@ static struct platform_device *platform_devices[] __initdata = { · 74 unmodified lines
161139 static void __init cpuat91_board_init(void)
162140 {
163141 /* Serial */
142+ /* DBGU on ttyS0. (Rx & Tx only) */
143+ at91_register_uart(0, 0, 0);
144+
145+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
146+ at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS |
147+ ATMEL_UART_RTS);
148+
149+ /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
150+ at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS |
151+ ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
152+ ATMEL_UART_DCD | ATMEL_UART_RI);
153+
154+ /* USART2 on ttyS3 (Rx, Tx) */
155+ at91_register_uart(AT91RM9200_ID_US2, 3, 0);
156+
157+ /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
158+ at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
159+ ATMEL_UART_RTS);
164160 at91_add_device_serial();
165161 /* LEDs. */
166162 at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds));
arch/arm/mach-at91/board-csb337.c+4−9
@@ -47,15 +47,6 @@ static void __init csb337_init_early(void) · 46 unmodified lines
4747 {
4848 /* Initialize processor: 3.6864 MHz crystal */
4949 at91_initialize(3686400);
50−
51− /* Setup the LEDs */
52− at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
53−
54− /* DBGU on ttyS0 */
55− at91_register_uart(0, 0, 0);
56−
57− /* make console=ttyS0 the default */
58− at91_set_serial_console(0);
5950 }
6051
6152 static struct macb_platform_data __initdata csb337_eth_data = {
@@ -228,7 +219,11 @@ static struct gpio_led csb_leds[] = { · 166 unmodified lines
228219
229220 static void __init csb337_board_init(void)
230221 {
222+ /* Setup the LEDs */
223+ at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
231224 /* Serial */
225+ /* DBGU on ttyS0 */
226+ at91_register_uart(0, 0, 0);
232227 at91_add_device_serial();
233228 /* Ethernet */
234229 at91_add_device_eth(&csb337_eth_data);
arch/arm/mach-at91/board-csb637.c+2−6
@@ -44,12 +44,6 @@ static void __init csb637_init_early(void) · 43 unmodified lines
4444 {
4545 /* Initialize processor: 3.6864 MHz crystal */
4646 at91_initialize(3686400);
47−
48− /* DBGU on ttyS0. (Rx & Tx only) */
49− at91_register_uart(0, 0, 0);
50−
51− /* make console=ttyS0 (ie, DBGU) the default */
52− at91_set_serial_console(0);
5347 }
5448
5549 static struct macb_platform_data __initdata csb637_eth_data = {
@@ -118,6 +112,8 @@ static void __init csb637_board_init(void) · 62 unmodified lines
118112 /* LED(s) */
119113 at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
120114 /* Serial */
115+ /* DBGU on ttyS0. (Rx & Tx only) */
116+ at91_register_uart(0, 0, 0);
121117 at91_add_device_serial();
122118 /* Ethernet */
123119 at91_add_device_eth(&csb637_eth_data);
arch/arm/mach-at91/board-dt.c+1−7
@@ -1,10 +1,6 @@
11 /*
22 * Setup code for AT91SAM Evaluation Kits with Device Tree support
33 *
4− * Covers: * AT91SAM9G45-EKES board
5− * * AT91SAM9M10-EKES board
6− * * AT91SAM9M10G45-EK board
7− *
84 * Copyright (C) 2011 Atmel,
95 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
106 *
@@ -49,9 +45,7 @@ static void __init at91_dt_device_init(void) · 38 unmodified lines
4945 }
5046
5147 static const char *at91_dt_board_compat[] __initdata = {
52− "atmel,at91sam9m10g45ek",
53− "atmel,at91sam9x5ek",
54− "calao,usb-a9g20",
48+ "atmel,at91sam9",
5549 NULL
5650 };
5751
arch/arm/mach-at91/board-eb9200.c+10−14
@@ -44,20 +44,6 @@ static void __init eb9200_init_early(void) · 43 unmodified lines
4444 {
4545 /* Initialize processor: 18.432 MHz crystal */
4646 at91_initialize(18432000);
47−
48− /* DBGU on ttyS0. (Rx & Tx only) */
49− at91_register_uart(0, 0, 0);
50−
51− /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
52− at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
53− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
54− | ATMEL_UART_RI);
55−
56− /* USART2 on ttyS2. (Rx, Tx) - IRDA */
57− at91_register_uart(AT91RM9200_ID_US2, 2, 0);
58−
59− /* set serial console to ttyS0 (ie, DBGU) */
60− at91_set_serial_console(0);
6147 }
6248
6349 static struct macb_platform_data __initdata eb9200_eth_data = {
@@ -101,6 +87,16 @@ static struct i2c_board_info __initdata eb9200_i2c_devices[] = { · 37 unmodified lines
10187 static void __init eb9200_board_init(void)
10288 {
10389 /* Serial */
90+ /* DBGU on ttyS0. (Rx & Tx only) */
91+ at91_register_uart(0, 0, 0);
92+
93+ /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
94+ at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
95+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
96+ | ATMEL_UART_RI);
97+
98+ /* USART2 on ttyS2. (Rx, Tx) - IRDA */
99+ at91_register_uart(AT91RM9200_ID_US2, 2, 0);
104100 at91_add_device_serial();
105101 /* Ethernet */
106102 at91_add_device_eth(&eb9200_eth_data);
arch/arm/mach-at91/board-ecbat91.c+8−12
@@ -50,18 +50,6 @@ static void __init ecb_at91init_early(void) · 49 unmodified lines
5050
5151 /* Initialize processor: 18.432 MHz crystal */
5252 at91_initialize(18432000);
53−
54− /* Setup the LEDs */
55− at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
56−
57− /* DBGU on ttyS0. (Rx & Tx only) */
58− at91_register_uart(0, 0, 0);
59−
60− /* USART0 on ttyS1. (Rx & Tx only) */
61− at91_register_uart(AT91RM9200_ID_US0, 1, 0);
62−
63− /* set serial console to ttyS0 (ie, DBGU) */
64− at91_set_serial_console(0);
6553 }
6654
6755 static struct macb_platform_data __initdata ecb_at91eth_data = {
@@ -151,7 +139,15 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = { · 83 unmodified lines
151139
152140 static void __init ecb_at91board_init(void)
153141 {
142+ /* Setup the LEDs */
143+ at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
144+
154145 /* Serial */
146+ /* DBGU on ttyS0. (Rx & Tx only) */
147+ at91_register_uart(0, 0, 0);
148+
149+ /* USART0 on ttyS1. (Rx & Tx only) */
150+ at91_register_uart(AT91RM9200_ID_US0, 1, 0);
155151 at91_add_device_serial();
156152
157153 /* Ethernet */
arch/arm/mach-at91/board-eco920.c+4−9
@@ -37,15 +37,6 @@ static void __init eco920_init_early(void) · 36 unmodified lines
3737 at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
3838
3939 at91_initialize(18432000);
40−
41− /* Setup the LEDs */
42− at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
43−
44− /* DBGU on ttyS0. (Rx & Tx only */
45− at91_register_uart(0, 0, 0);
46−
47− /* set serial console to ttyS0 (ie, DBGU) */
48− at91_set_serial_console(0);
4940 }
5041
5142 static struct macb_platform_data __initdata eco920_eth_data = {
@@ -103,6 +94,10 @@ static struct spi_board_info eco920_spi_devices[] = { · 51 unmodified lines
10394
10495 static void __init eco920_board_init(void)
10596 {
97+ /* Setup the LEDs */
98+ at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
99+ /* DBGU on ttyS0. (Rx & Tx only */
100+ at91_register_uart(0, 0, 0);
106101 at91_add_device_serial();
107102 at91_add_device_eth(&eco920_eth_data);
108103 at91_add_device_usbh(&eco920_usbh_data);
arch/arm/mach-at91/board-flexibity.c+2−6
@@ -41,12 +41,6 @@ static void __init flexibity_init_early(void) · 40 unmodified lines
4141 {
4242 /* Initialize processor: 18.432 MHz crystal */
4343 at91_initialize(18432000);
44−
45− /* DBGU on ttyS0. (Rx & Tx only) */
46− at91_register_uart(0, 0, 0);
47−
48− /* set serial console to ttyS0 (ie, DBGU) */
49− at91_set_serial_console(0);
5044 }
5145
5246 /* USB Host port */
@@ -143,6 +137,8 @@ static struct gpio_led flexibity_leds[] = { · 90 unmodified lines
143137 static void __init flexibity_board_init(void)
144138 {
145139 /* Serial */
140+ /* DBGU on ttyS0. (Rx & Tx only) */
141+ at91_register_uart(0, 0, 0);
146142 at91_add_device_serial();
147143 /* USB Host */
148144 at91_add_device_usbh(&flexibity_usbh_data);
arch/arm/mach-at91/board-foxg20.c+33−38
@@ -61,44 +61,6 @@ static void __init foxg20_init_early(void) · 60 unmodified lines
6161 {
6262 /* Initialize processor: 18.432 MHz crystal */
6363 at91_initialize(18432000);
64−
65− /* DBGU on ttyS0. (Rx & Tx only) */
66− at91_register_uart(0, 0, 0);
67−
68− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
69− at91_register_uart(AT91SAM9260_ID_US0, 1,
70− ATMEL_UART_CTS
71− | ATMEL_UART_RTS
72− | ATMEL_UART_DTR
73− | ATMEL_UART_DSR
74− | ATMEL_UART_DCD
75− | ATMEL_UART_RI);
76−
77− /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
78− at91_register_uart(AT91SAM9260_ID_US1, 2,
79− ATMEL_UART_CTS
80− | ATMEL_UART_RTS);
81−
82− /* USART2 on ttyS3. (Rx & Tx only) */
83− at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
84−
85− /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
86− at91_register_uart(AT91SAM9260_ID_US3, 4,
87− ATMEL_UART_CTS
88− | ATMEL_UART_RTS);
89−
90− /* USART4 on ttyS5. (Rx & Tx only) */
91− at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
92−
93− /* USART5 on ttyS6. (Rx & Tx only) */
94− at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
95−
96− /* set serial console to ttyS0 (ie, DBGU) */
97− at91_set_serial_console(0);
98−
99− /* Set the internal pull-up resistor on DRXD */
100− at91_set_A_periph(AT91_PIN_PB14, 1);
101−
10264 }
10365
10466 /*
@@ -241,6 +203,39 @@ static struct i2c_board_info __initdata foxg20_i2c_devices[] = { · 136 unmodified lines
241203 static void __init foxg20_board_init(void)
242204 {
243205 /* Serial */
206+ /* DBGU on ttyS0. (Rx & Tx only) */
207+ at91_register_uart(0, 0, 0);
208+
209+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
210+ at91_register_uart(AT91SAM9260_ID_US0, 1,
211+ ATMEL_UART_CTS
212+ | ATMEL_UART_RTS
213+ | ATMEL_UART_DTR
214+ | ATMEL_UART_DSR
215+ | ATMEL_UART_DCD
216+ | ATMEL_UART_RI);
217+
218+ /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
219+ at91_register_uart(AT91SAM9260_ID_US1, 2,
220+ ATMEL_UART_CTS
221+ | ATMEL_UART_RTS);
222+
223+ /* USART2 on ttyS3. (Rx & Tx only) */
224+ at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
225+
226+ /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
227+ at91_register_uart(AT91SAM9260_ID_US3, 4,
228+ ATMEL_UART_CTS
229+ | ATMEL_UART_RTS);
230+
231+ /* USART4 on ttyS5. (Rx & Tx only) */
232+ at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
233+
234+ /* USART5 on ttyS6. (Rx & Tx only) */
235+ at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
236+
237+ /* Set the internal pull-up resistor on DRXD */
238+ at91_set_A_periph(AT91_PIN_PB14, 1);
244239 at91_add_device_serial();
245240 /* USB Host */
246241 at91_add_device_usbh(&foxg20_usbh_data);
arch/arm/mach-at91/board-gsia18s.c+31−32
@@ -41,38 +41,6 @@ · 40 unmodified lines
4141 static void __init gsia18s_init_early(void)
4242 {
4343 stamp9g20_init_early();
44−
45− /*
46− * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI).
47− * Used for Internal Analog Modem.
48− */
49− at91_register_uart(AT91SAM9260_ID_US0, 1,
50− ATMEL_UART_CTS | ATMEL_UART_RTS |
51− ATMEL_UART_DTR | ATMEL_UART_DSR |
52− ATMEL_UART_DCD | ATMEL_UART_RI);
53− /*
54− * USART1 on ttyS2 (Rx, Tx, CTS, RTS).
55− * Used for GPS or WiFi or Data stream.
56− */
57− at91_register_uart(AT91SAM9260_ID_US1, 2,
58− ATMEL_UART_CTS | ATMEL_UART_RTS);
59− /*
60− * USART2 on ttyS3 (Rx, Tx, CTS, RTS).
61− * Used for External Modem.
62− */
63− at91_register_uart(AT91SAM9260_ID_US2, 3,
64− ATMEL_UART_CTS | ATMEL_UART_RTS);
65− /*
66− * USART3 on ttyS4 (Rx, Tx, RTS).
67− * Used for RS-485.
68− */
69− at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS);
70−
71− /*
72− * USART4 on ttyS5 (Rx, Tx).
73− * Used for TRX433 Radio Module.
74− */
75− at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
7644 }
7745
7846 /*
@@ -558,6 +526,37 @@ static int __init gsia18s_power_off_init(void) · 479 unmodified lines
558526
559527 static void __init gsia18s_board_init(void)
560528 {
529+ /*
530+ * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI).
531+ * Used for Internal Analog Modem.
532+ */
533+ at91_register_uart(AT91SAM9260_ID_US0, 1,
534+ ATMEL_UART_CTS | ATMEL_UART_RTS |
535+ ATMEL_UART_DTR | ATMEL_UART_DSR |
536+ ATMEL_UART_DCD | ATMEL_UART_RI);
537+ /*
538+ * USART1 on ttyS2 (Rx, Tx, CTS, RTS).
539+ * Used for GPS or WiFi or Data stream.
540+ */
541+ at91_register_uart(AT91SAM9260_ID_US1, 2,
542+ ATMEL_UART_CTS | ATMEL_UART_RTS);
543+ /*
544+ * USART2 on ttyS3 (Rx, Tx, CTS, RTS).
545+ * Used for External Modem.
546+ */
547+ at91_register_uart(AT91SAM9260_ID_US2, 3,
548+ ATMEL_UART_CTS | ATMEL_UART_RTS);
549+ /*
550+ * USART3 on ttyS4 (Rx, Tx, RTS).
551+ * Used for RS-485.
552+ */
553+ at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS);
554+
555+ /*
556+ * USART4 on ttyS5 (Rx, Tx).
557+ * Used for TRX433 Radio Module.
558+ */
559+ at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
561560 stamp9g20_board_init();
562561 at91_add_device_usbh(&usbh_data);
563562 at91_add_device_udc(&udc_data);
arch/arm/mach-at91/board-kafa.c+8−12
@@ -47,18 +47,6 @@ static void __init kafa_init_early(void) · 46 unmodified lines
4747
4848 /* Initialize processor: 18.432 MHz crystal */
4949 at91_initialize(18432000);
50−
51− /* Set up the LEDs */
52− at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
53−
54− /* DBGU on ttyS0. (Rx & Tx only) */
55− at91_register_uart(0, 0, 0);
56−
57− /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
58− at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
59−
60− /* set serial console to ttyS0 (ie, DBGU) */
61− at91_set_serial_console(0);
6250 }
6351
6452 static struct macb_platform_data __initdata kafa_eth_data = {
@@ -79,7 +67,15 @@ static struct at91_udc_data __initdata kafa_udc_data = { · 14 unmodified lines
7967
8068 static void __init kafa_board_init(void)
8169 {
70+ /* Set up the LEDs */
71+ at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
72+
8273 /* Serial */
74+ /* DBGU on ttyS0. (Rx & Tx only) */
75+ at91_register_uart(0, 0, 0);
76+
77+ /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
78+ at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
8379 at91_add_device_serial();
8480 /* Ethernet */
8581 at91_add_device_eth(&kafa_eth_data);
arch/arm/mach-at91/board-kb9202.c+14−18
@@ -50,24 +50,6 @@ static void __init kb9202_init_early(void) · 49 unmodified lines
5050
5151 /* Initialize processor: 10 MHz crystal */
5252 at91_initialize(10000000);
53−
54− /* Set up the LEDs */
55− at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
56−
57− /* DBGU on ttyS0. (Rx & Tx only) */
58− at91_register_uart(0, 0, 0);
59−
60− /* USART0 on ttyS1 (Rx & Tx only) */
61− at91_register_uart(AT91RM9200_ID_US0, 1, 0);
62−
63− /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
64− at91_register_uart(AT91RM9200_ID_US1, 2, 0);
65−
66− /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
67− at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
68−
69− /* set serial console to ttyS0 (ie, DBGU) */
70− at91_set_serial_console(0);
7153 }
7254
7355 static struct macb_platform_data __initdata kb9202_eth_data = {
@@ -115,7 +97,21 @@ static struct atmel_nand_data __initdata kb9202_nand_data = { · 41 unmodified lines
11597
11698 static void __init kb9202_board_init(void)
11799 {
100+ /* Set up the LEDs */
101+ at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
102+
118103 /* Serial */
104+ /* DBGU on ttyS0. (Rx & Tx only) */
105+ at91_register_uart(0, 0, 0);
106+
107+ /* USART0 on ttyS1 (Rx & Tx only) */
108+ at91_register_uart(AT91RM9200_ID_US0, 1, 0);
109+
110+ /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
111+ at91_register_uart(AT91RM9200_ID_US1, 2, 0);
112+
113+ /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
114+ at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
119115 at91_add_device_serial();
120116 /* Ethernet */
121117 at91_add_device_eth(&kb9202_eth_data);
arch/arm/mach-at91/board-neocore926.c+5−9
@@ -55,15 +55,6 @@ static void __init neocore926_init_early(void) · 54 unmodified lines
5555 {
5656 /* Initialize processor: 20 MHz crystal */
5757 at91_initialize(20000000);
58−
59− /* DBGU on ttyS0. (Rx & Tx only) */
60− at91_register_uart(0, 0, 0);
61−
62− /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
63− at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
64−
65− /* set serial console to ttyS0 (ie, DBGU) */
66− at91_set_serial_console(0);
6758 }
6859
6960 /*
@@ -341,6 +332,11 @@ static struct ac97c_platform_data neocore926_ac97_data = { · 271 unmodified lines
341332 static void __init neocore926_board_init(void)
342333 {
343334 /* Serial */
335+ /* DBGU on ttyS0. (Rx & Tx only) */
336+ at91_register_uart(0, 0, 0);
337+
338+ /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
339+ at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
344340 at91_add_device_serial();
345341
346342 /* USB Host */
arch/arm/mach-at91/board-pcontrol-g20.c+10−11
@@ -40,17 +40,6 @@ · 39 unmodified lines
4040 static void __init pcontrol_g20_init_early(void)
4141 {
4242 stamp9g20_init_early();
43−
44− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */
45− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
46− | ATMEL_UART_RTS);
47−
48− /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */
49− at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS
50− | ATMEL_UART_RTS);
51−
52− /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */
53− at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
5443 }
5544
5645 static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { {
@@ -199,6 +188,16 @@ static struct spi_board_info pcontrol_g20_spi_devices[] = { · 142 unmodified lines
199188
200189 static void __init pcontrol_g20_board_init(void)
201190 {
191+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */
192+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
193+ | ATMEL_UART_RTS);
194+
195+ /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */
196+ at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS
197+ | ATMEL_UART_RTS);
198+
199+ /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */
200+ at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
202201 stamp9g20_board_init();
203202 at91_add_device_usbh(&usbh_data);
204203 at91_add_device_eth(&macb_data);
arch/arm/mach-at91/board-picotux200.c+7−11
@@ -48,17 +48,6 @@ static void __init picotux200_init_early(void) · 47 unmodified lines
4848 {
4949 /* Initialize processor: 18.432 MHz crystal */
5050 at91_initialize(18432000);
51−
52− /* DBGU on ttyS0. (Rx & Tx only) */
53− at91_register_uart(0, 0, 0);
54−
55− /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
56− at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
57− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
58− | ATMEL_UART_RI);
59−
60− /* set serial console to ttyS0 (ie, DBGU) */
61− at91_set_serial_console(0);
6251 }
6352
6453 static struct macb_platform_data __initdata picotux200_eth_data = {
@@ -106,6 +95,13 @@ static struct platform_device picotux200_flash = { · 41 unmodified lines
10695 static void __init picotux200_board_init(void)
10796 {
10897 /* Serial */
98+ /* DBGU on ttyS0. (Rx & Tx only) */
99+ at91_register_uart(0, 0, 0);
100+
101+ /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
102+ at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
103+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
104+ | ATMEL_UART_RI);
109105 at91_add_device_serial();
110106 /* Ethernet */
111107 at91_add_device_eth(&picotux200_eth_data);
arch/arm/mach-at91/board-qil-a9260.c+13−18
@@ -52,24 +52,6 @@ static void __init ek_init_early(void) · 51 unmodified lines
5252 {
5353 /* Initialize processor: 12.000 MHz crystal */
5454 at91_initialize(12000000);
55−
56− /* DBGU on ttyS0. (Rx & Tx only) */
57− at91_register_uart(0, 0, 0);
58−
59− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
60− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
61− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
62− | ATMEL_UART_RI);
63−
64− /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
65− at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
66−
67− /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
68− at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
69−
70− /* set serial console to ttyS1 (ie, USART0) */
71− at91_set_serial_console(1);
72−
7355 }
7456
7557 /*
@@ -235,6 +217,19 @@ static struct gpio_led ek_leds[] = { · 159 unmodified lines
235217 static void __init ek_board_init(void)
236218 {
237219 /* Serial */
220+ /* DBGU on ttyS0. (Rx & Tx only) */
221+ at91_register_uart(0, 0, 0);
222+
223+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
224+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
225+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
226+ | ATMEL_UART_RI);
227+
228+ /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
229+ at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
230+
231+ /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
232+ at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
238233 at91_add_device_serial();
239234 /* USB Host */
240235 at91_add_device_usbh(&ek_usbh_data);
arch/arm/mach-at91/board-rm9200dk.c+10−14
@@ -50,20 +50,6 @@ static void __init dk_init_early(void) · 49 unmodified lines
5050 {
5151 /* Initialize processor: 18.432 MHz crystal */
5252 at91_initialize(18432000);
53−
54− /* Setup the LEDs */
55− at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
56−
57− /* DBGU on ttyS0. (Rx & Tx only) */
58− at91_register_uart(0, 0, 0);
59−
60− /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
61− at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
62− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
63− | ATMEL_UART_RI);
64−
65− /* set serial console to ttyS0 (ie, DBGU) */
66− at91_set_serial_console(0);
6753 }
6854
6955 static struct macb_platform_data __initdata dk_eth_data = {
@@ -190,7 +176,17 @@ static struct gpio_led dk_leds[] = { · 120 unmodified lines
190176
191177 static void __init dk_board_init(void)
192178 {
179+ /* Setup the LEDs */
180+ at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
181+
193182 /* Serial */
183+ /* DBGU on ttyS0. (Rx & Tx only) */
184+ at91_register_uart(0, 0, 0);
185+
186+ /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
187+ at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
188+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
189+ | ATMEL_UART_RI);
194190 at91_add_device_serial();
195191 /* Ethernet */
196192 at91_add_device_eth(&dk_eth_data);
arch/arm/mach-at91/board-rm9200ek.c+10−14
@@ -50,20 +50,6 @@ static void __init ek_init_early(void) · 49 unmodified lines
5050 {
5151 /* Initialize processor: 18.432 MHz crystal */
5252 at91_initialize(18432000);
53−
54− /* Setup the LEDs */
55− at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
56−
57− /* DBGU on ttyS0. (Rx & Tx only) */
58− at91_register_uart(0, 0, 0);
59−
60− /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
61− at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
62− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
63− | ATMEL_UART_RI);
64−
65− /* set serial console to ttyS0 (ie, DBGU) */
66− at91_set_serial_console(0);
6753 }
6854
6955 static struct macb_platform_data __initdata ek_eth_data = {
@@ -161,7 +147,17 @@ static struct gpio_led ek_leds[] = { · 91 unmodified lines
161147
162148 static void __init ek_board_init(void)
163149 {
150+ /* Setup the LEDs */
151+ at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
152+
164153 /* Serial */
154+ /* DBGU on ttyS0. (Rx & Tx only) */
155+ at91_register_uart(0, 0, 0);
156+
157+ /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
158+ at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
159+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
160+ | ATMEL_UART_RI);
165161 at91_add_device_serial();
166162 /* Ethernet */
167163 at91_add_device_eth(&ek_eth_data);
arch/arm/mach-at91/board-rsi-ews.c+16−20
@@ -35,26 +35,6 @@ static void __init rsi_ews_init_early(void) · 34 unmodified lines
3535 {
3636 /* Initialize processor: 18.432 MHz crystal */
3737 at91_initialize(18432000);
38−
39− /* Setup the LEDs */
40− at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9);
41−
42− /* DBGU on ttyS0. (Rx & Tx only) */
43− /* This one is for debugging */
44− at91_register_uart(0, 0, 0);
45−
46− /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
47− /* Dialin/-out modem interface */
48− at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
49− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
50− | ATMEL_UART_RI);
51−
52− /* USART3 on ttyS4. (Rx, Tx, RTS) */
53− /* RS485 communication */
54− at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS);
55−
56− /* set serial console to ttyS0 (ie, DBGU) */
57− at91_set_serial_console(0);
5838 }
5939
6040 /*
@@ -204,7 +184,23 @@ static struct platform_device rsiews_nor_flash = { · 143 unmodified lines
204184 */
205185 static void __init rsi_ews_board_init(void)
206186 {
187+ /* Setup the LEDs */
188+ at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9);
189+
207190 /* Serial */
191+ /* DBGU on ttyS0. (Rx & Tx only) */
192+ /* This one is for debugging */
193+ at91_register_uart(0, 0, 0);
194+
195+ /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
196+ /* Dialin/-out modem interface */
197+ at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
198+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
199+ | ATMEL_UART_RI);
200+
201+ /* USART3 on ttyS4. (Rx, Tx, RTS) */
202+ /* RS485 communication */
203+ at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS);
208204 at91_add_device_serial();
209205 at91_set_gpio_output(AT91_PIN_PA21, 0);
210206 /* Ethernet */
arch/arm/mach-at91/board-sam9-l9260.c+13−17
@@ -48,23 +48,6 @@ static void __init ek_init_early(void) · 47 unmodified lines
4848 {
4949 /* Initialize processor: 18.432 MHz crystal */
5050 at91_initialize(18432000);
51−
52− /* Setup the LEDs */
53− at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
54−
55− /* DBGU on ttyS0. (Rx & Tx only) */
56− at91_register_uart(0, 0, 0);
57−
58− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
59− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
60− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
61− | ATMEL_UART_RI);
62−
63− /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
64− at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
65−
66− /* set serial console to ttyS0 (ie, DBGU) */
67− at91_set_serial_console(0);
6851 }
6952
7053 /*
@@ -184,7 +167,20 @@ static struct at91_mmc_data __initdata ek_mmc_data = { · 113 unmodified lines
184167
185168 static void __init ek_board_init(void)
186169 {
170+ /* Setup the LEDs */
171+ at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
172+
187173 /* Serial */
174+ /* DBGU on ttyS0. (Rx & Tx only) */
175+ at91_register_uart(0, 0, 0);
176+
177+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
178+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
179+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
180+ | ATMEL_UART_RI);
181+
182+ /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
183+ at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
188184 at91_add_device_serial();
189185 /* USB Host */
190186 at91_add_device_usbh(&ek_usbh_data);
arch/arm/mach-at91/board-sam9260ek.c+10−14
@@ -54,20 +54,6 @@ static void __init ek_init_early(void) · 53 unmodified lines
5454 {
5555 /* Initialize processor: 18.432 MHz crystal */
5656 at91_initialize(18432000);
57−
58− /* DBGU on ttyS0. (Rx & Tx only) */
59− at91_register_uart(0, 0, 0);
60−
61− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
62− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
63− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
64− | ATMEL_UART_RI);
65−
66− /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
67− at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
68−
69− /* set serial console to ttyS0 (ie, DBGU) */
70− at91_set_serial_console(0);
7157 }
7258
7359 /*
@@ -320,6 +306,16 @@ static void __init ek_add_device_buttons(void) {} · 246 unmodified lines
320306 static void __init ek_board_init(void)
321307 {
322308 /* Serial */
309+ /* DBGU on ttyS0. (Rx & Tx only) */
310+ at91_register_uart(0, 0, 0);
311+
312+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
313+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
314+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
315+ | ATMEL_UART_RI);
316+
317+ /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
318+ at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
323319 at91_add_device_serial();
324320 /* USB Host */
325321 at91_add_device_usbh(&ek_usbh_data);
arch/arm/mach-at91/board-sam9261ek.c+5−9
@@ -58,15 +58,6 @@ static void __init ek_init_early(void) · 57 unmodified lines
5858 {
5959 /* Initialize processor: 18.432 MHz crystal */
6060 at91_initialize(18432000);
61−
62− /* Setup the LEDs */
63− at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
64−
65− /* DBGU on ttyS0. (Rx & Tx only) */
66− at91_register_uart(0, 0, 0);
67−
68− /* set serial console to ttyS0 (ie, DBGU) */
69− at91_set_serial_console(0);
7061 }
7162
7263 /*
@@ -577,7 +568,12 @@ static struct gpio_led ek_leds[] = { · 504 unmodified lines
577568
578569 static void __init ek_board_init(void)
579570 {
571+ /* Setup the LEDs */
572+ at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
573+
580574 /* Serial */
575+ /* DBGU on ttyS0. (Rx & Tx only) */
576+ at91_register_uart(0, 0, 0);
581577 at91_add_device_serial();
582578 /* USB Host */
583579 at91_add_device_usbh(&ek_usbh_data);
arch/arm/mach-at91/board-sam9263ek.c+5−9
@@ -57,15 +57,6 @@ static void __init ek_init_early(void) · 56 unmodified lines
5757 {
5858 /* Initialize processor: 16.367 MHz crystal */
5959 at91_initialize(16367660);
60−
61− /* DBGU on ttyS0. (Rx & Tx only) */
62− at91_register_uart(0, 0, 0);
63−
64− /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
65− at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
66−
67− /* set serial console to ttyS0 (ie, DBGU) */
68− at91_set_serial_console(0);
6960 }
7061
7162 /*
@@ -412,6 +403,11 @@ static struct at91_can_data ek_can_data = { · 340 unmodified lines
412403 static void __init ek_board_init(void)
413404 {
414405 /* Serial */
406+ /* DBGU on ttyS0. (Rx & Tx only) */
407+ at91_register_uart(0, 0, 0);
408+
409+ /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
410+ at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
415411 at91_add_device_serial();
416412 /* USB Host */
417413 at91_add_device_usbh(&ek_usbh_data);
arch/arm/mach-at91/board-sam9g20ek.c+10−14
@@ -65,20 +65,6 @@ static void __init ek_init_early(void) · 64 unmodified lines
6565 {
6666 /* Initialize processor: 18.432 MHz crystal */
6767 at91_initialize(18432000);
68−
69− /* DBGU on ttyS0. (Rx & Tx only) */
70− at91_register_uart(0, 0, 0);
71−
72− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
73− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
74− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
75− | ATMEL_UART_RI);
76−
77− /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
78− at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
79−
80− /* set serial console to ttyS0 (ie, DBGU) */
81− at91_set_serial_console(0);
8268 }
8369
8470 /*
@@ -372,6 +358,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { · 287 unmodified lines
372358 static void __init ek_board_init(void)
373359 {
374360 /* Serial */
361+ /* DBGU on ttyS0. (Rx & Tx only) */
362+ at91_register_uart(0, 0, 0);
363+
364+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
365+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
366+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
367+ | ATMEL_UART_RI);
368+
369+ /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
370+ at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
375371 at91_add_device_serial();
376372 /* USB Host */
377373 at91_add_device_usbh(&ek_usbh_data);
arch/arm/mach-at91/board-sam9m10g45ek.c+6−10
@@ -53,16 +53,6 @@ static void __init ek_init_early(void) · 52 unmodified lines
5353 {
5454 /* Initialize processor: 12.000 MHz crystal */
5555 at91_initialize(12000000);
56−
57− /* DGBU on ttyS0. (Rx & Tx only) */
58− at91_register_uart(0, 0, 0);
59−
60− /* USART0 not connected on the -EK board */
61− /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
62− at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
63−
64− /* set serial console to ttyS0 (ie, DBGU) */
65− at91_set_serial_console(0);
6656 }
6757
6858 /*
@@ -457,6 +447,12 @@ static struct platform_device *devices[] __initdata = { · 388 unmodified lines
457447 static void __init ek_board_init(void)
458448 {
459449 /* Serial */
450+ /* DGBU on ttyS0. (Rx & Tx only) */
451+ at91_register_uart(0, 0, 0);
452+
453+ /* USART0 not connected on the -EK board */
454+ /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
455+ at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
460456 at91_add_device_serial();
461457 /* USB HS Host */
462458 at91_add_device_usbh_ohci(&ek_usbh_hs_data);
arch/arm/mach-at91/board-sam9rlek.c+5−9
@@ -42,15 +42,6 @@ static void __init ek_init_early(void) · 41 unmodified lines
4242 {
4343 /* Initialize processor: 12.000 MHz crystal */
4444 at91_initialize(12000000);
45−
46− /* DBGU on ttyS0. (Rx & Tx only) */
47− at91_register_uart(0, 0, 0);
48−
49− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
50− at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
51−
52− /* set serial console to ttyS0 (ie, DBGU) */
53− at91_set_serial_console(0);
5445 }
5546
5647 /*
@@ -296,6 +287,11 @@ static void __init ek_add_device_buttons(void) {} · 239 unmodified lines
296287 static void __init ek_board_init(void)
297288 {
298289 /* Serial */
290+ /* DBGU on ttyS0. (Rx & Tx only) */
291+ at91_register_uart(0, 0, 0);
292+
293+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
294+ at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
299295 at91_add_device_serial();
300296 /* USB HS */
301297 at91_add_device_usba(&ek_usba_udc_data);
arch/arm/mach-at91/board-snapper9260.c+8−10
@@ -43,16 +43,6 @@ · 42 unmodified lines
4343 static void __init snapper9260_init_early(void)
4444 {
4545 at91_initialize(18432000);
46−
47− /* Debug on ttyS0 */
48− at91_register_uart(0, 0, 0);
49− at91_set_serial_console(0);
50−
51− at91_register_uart(AT91SAM9260_ID_US0, 1,
52− ATMEL_UART_CTS | ATMEL_UART_RTS);
53− at91_register_uart(AT91SAM9260_ID_US1, 2,
54− ATMEL_UART_CTS | ATMEL_UART_RTS);
55− at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
5646 }
5747
5848 static struct at91_usbh_data __initdata snapper9260_usbh_data = {
@@ -168,6 +158,14 @@ static void __init snapper9260_board_init(void) · 109 unmodified lines
168158 snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31);
169159 i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1);
170160
161+ /* Debug on ttyS0 */
162+ at91_register_uart(0, 0, 0);
163+
164+ at91_register_uart(AT91SAM9260_ID_US0, 1,
165+ ATMEL_UART_CTS | ATMEL_UART_RTS);
166+ at91_register_uart(AT91SAM9260_ID_US1, 2,
167+ ATMEL_UART_CTS | ATMEL_UART_RTS);
168+ at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
171169 at91_add_device_serial();
172170 at91_add_device_usbh(&snapper9260_usbh_data);
173171 at91_add_device_udc(&snapper9260_udc_data);
arch/arm/mach-at91/board-stamp9g20.c+24−40
@@ -36,44 +36,6 @@ void __init stamp9g20_init_early(void) · 35 unmodified lines
3636 {
3737 /* Initialize processor: 18.432 MHz crystal */
3838 at91_initialize(18432000);
39−
40− /* DGBU on ttyS0. (Rx & Tx only) */
41− at91_register_uart(0, 0, 0);
42−
43− /* set serial console to ttyS0 (ie, DBGU) */
44− at91_set_serial_console(0);
45−}
46−
47−static void __init stamp9g20evb_init_early(void)
48−{
49− stamp9g20_init_early();
50−
51− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
52− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
53− | ATMEL_UART_DTR | ATMEL_UART_DSR
54− | ATMEL_UART_DCD | ATMEL_UART_RI);
55−}
56−
57−static void __init portuxg20_init_early(void)
58−{
59− stamp9g20_init_early();
60−
61− /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
62− at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
63− | ATMEL_UART_DTR | ATMEL_UART_DSR
64− | ATMEL_UART_DCD | ATMEL_UART_RI);
65−
66− /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
67− at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
68−
69− /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
70− at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
71−
72− /* USART4 on ttyS5. (Rx, Tx only) */
73− at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
74−
75− /* USART5 on ttyS6. (Rx, Tx only) */
76− at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
7739 }
7840
7941 /*
@@ -254,6 +216,8 @@ void add_w1(void) · 174 unmodified lines
254216 void __init stamp9g20_board_init(void)
255217 {
256218 /* Serial */
219+ /* DGBU on ttyS0. (Rx & Tx only) */
220+ at91_register_uart(0, 0, 0);
257221 at91_add_device_serial();
258222 /* NAND */
259223 add_device_nand();
@@ -269,6 +233,22 @@ void __init stamp9g20_board_init(void) · 9 unmodified lines
269233
270234 static void __init portuxg20_board_init(void)
271235 {
236+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
237+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
238+ | ATMEL_UART_DTR | ATMEL_UART_DSR
239+ | ATMEL_UART_DCD | ATMEL_UART_RI);
240+
241+ /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
242+ at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
243+
244+ /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
245+ at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
246+
247+ /* USART4 on ttyS5. (Rx, Tx only) */
248+ at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
249+
250+ /* USART5 on ttyS6. (Rx, Tx only) */
251+ at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
272252 stamp9g20_board_init();
273253 /* USB Host */
274254 at91_add_device_usbh(&usbh_data);
@@ -286,6 +266,10 @@ static void __init portuxg20_board_init(void) · 11 unmodified lines
286266
287267 static void __init stamp9g20evb_board_init(void)
288268 {
269+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
270+ at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
271+ | ATMEL_UART_DTR | ATMEL_UART_DSR
272+ | ATMEL_UART_DCD | ATMEL_UART_RI);
289273 stamp9g20_board_init();
290274 /* USB Host */
291275 at91_add_device_usbh(&usbh_data);
@@ -303,7 +287,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20") · 11 unmodified lines
303287 /* Maintainer: taskit GmbH */
304288 .timer = &at91sam926x_timer,
305289 .map_io = at91_map_io,
306− .init_early = portuxg20_init_early,
290+ .init_early = stamp9g20_init_early,
307291 .init_irq = at91_init_irq_default,
308292 .init_machine = portuxg20_board_init,
309293 MACHINE_END
@@ -312,7 +296,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20") · 2 unmodified lines
312296 /* Maintainer: taskit GmbH */
313297 .timer = &at91sam926x_timer,
314298 .map_io = at91_map_io,
315− .init_early = stamp9g20evb_init_early,
299+ .init_early = stamp9g20_init_early,
316300 .init_irq = at91_init_irq_default,
317301 .init_machine = stamp9g20evb_board_init,
318302 MACHINE_END
arch/arm/mach-at91/board-usb-a926x.c+2−6
@@ -53,12 +53,6 @@ static void __init ek_init_early(void) · 52 unmodified lines
5353 {
5454 /* Initialize processor: 12.00 MHz crystal */
5555 at91_initialize(12000000);
56−
57− /* DBGU on ttyS0. (Rx & Tx only) */
58− at91_register_uart(0, 0, 0);
59−
60− /* set serial console to ttyS0 (ie, DBGU) */
61− at91_set_serial_console(0);
6256 }
6357
6458 /*
@@ -325,6 +319,8 @@ static void __init ek_add_device_leds(void) · 260 unmodified lines
325319 static void __init ek_board_init(void)
326320 {
327321 /* Serial */
322+ /* DBGU on ttyS0. (Rx & Tx only) */
323+ at91_register_uart(0, 0, 0);
328324 at91_add_device_serial();
329325 /* USB Host */
330326 at91_add_device_usbh(&ek_usbh_data);
arch/arm/mach-at91/board-yl-9200.c+16−20
@@ -58,26 +58,6 @@ static void __init yl9200_init_early(void) · 57 unmodified lines
5858
5959 /* Initialize processor: 18.432 MHz crystal */
6060 at91_initialize(18432000);
61−
62− /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
63− at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
64−
65− /* DBGU on ttyS0. (Rx & Tx only) */
66− at91_register_uart(0, 0, 0);
67−
68− /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
69− at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
70− | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
71− | ATMEL_UART_RI);
72−
73− /* USART0 on ttyS2. (Rx & Tx only to JP3) */
74− at91_register_uart(AT91RM9200_ID_US0, 2, 0);
75−
76− /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
77− at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
78−
79− /* set serial console to ttyS0 (ie, DBGU) */
80− at91_set_serial_console(0);
8161 }
8262
8363 /*
@@ -560,7 +540,23 @@ void __init yl9200_add_device_video(void) {} · 476 unmodified lines
560540
561541 static void __init yl9200_board_init(void)
562542 {
543+ /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
544+ at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
545+
563546 /* Serial */
547+ /* DBGU on ttyS0. (Rx & Tx only) */
548+ at91_register_uart(0, 0, 0);
549+
550+ /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
551+ at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
552+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
553+ | ATMEL_UART_RI);
554+
555+ /* USART0 on ttyS2. (Rx & Tx only to JP3) */
556+ at91_register_uart(AT91RM9200_ID_US0, 2, 0);
557+
558+ /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
559+ at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
564560 at91_add_device_serial();
565561 /* Ethernet */
566562 at91_add_device_eth(&yl9200_eth_data);
arch/arm/mach-at91/cpuidle.c+7−1
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 #include <linux/export.h>
2222 #include <asm/proc-fns.h>
2323 #include <asm/cpuidle.h>
24+#include <mach/cpu.h>
2425
2526 #include "pm.h"
2627
@@ -33,7 +34,12 @@ static int at91_enter_idle(struct cpuidle_device *dev, · 6 unmodified lines
3334 struct cpuidle_driver *drv,
3435 int index)
3536 {
36− at91_standby();
37+ if (cpu_is_at91rm9200())
38+ at91rm9200_standby();
39+ else if (cpu_is_at91sam9g45())
40+ at91sam9g45_standby();
41+ else
42+ at91sam9_standby();
3743
3844 return index;
3945 }
arch/arm/mach-at91/generic.h+0−11
@@ -40,17 +40,6 @@ extern struct sys_timer at91sam926x_timer; · 39 unmodified lines
4040 extern struct sys_timer at91x40_timer;
4141
4242 /* Clocks */
43−/*
44− * function to specify the clock of the default console. As we do not
45− * use the device/driver bus, the dev_name is not intialize. So we need
46− * to link the clock to a specific con_id only "usart"
47− */
48−extern void __init at91rm9200_set_console_clock(int id);
49−extern void __init at91sam9260_set_console_clock(int id);
50−extern void __init at91sam9261_set_console_clock(int id);
51−extern void __init at91sam9263_set_console_clock(int id);
52−extern void __init at91sam9rl_set_console_clock(int id);
53−extern void __init at91sam9g45_set_console_clock(int id);
5443 #ifdef CONFIG_AT91_PMC_UNIT
5544 extern int __init at91_clock_init(unsigned long main_clock);
5645 extern int __init at91_dt_clock_init(void);
arch/arm/mach-at91/include/mach/at91rm9200.h+0−5
@@ -88,11 +88,6 @@ · 87 unmodified lines
8888 #define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */
8989 #define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */
9090
91−#define AT91_USART0 AT91RM9200_BASE_US0
92−#define AT91_USART1 AT91RM9200_BASE_US1
93−#define AT91_USART2 AT91RM9200_BASE_US2
94−#define AT91_USART3 AT91RM9200_BASE_US3
95−
9691 /*
9792 * Internal Memory.
9893 */
arch/arm/mach-at91/include/mach/at91sam9260.h+0−7
@@ -95,13 +95,6 @@ · 94 unmodified lines
9595 #define AT91SAM9260_BASE_WDT 0xfffffd40
9696 #define AT91SAM9260_BASE_GPBR 0xfffffd50
9797
98−#define AT91_USART0 AT91SAM9260_BASE_US0
99−#define AT91_USART1 AT91SAM9260_BASE_US1
100−#define AT91_USART2 AT91SAM9260_BASE_US2
101−#define AT91_USART3 AT91SAM9260_BASE_US3
102−#define AT91_USART4 AT91SAM9260_BASE_US4
103−#define AT91_USART5 AT91SAM9260_BASE_US5
104−
10598
10699 /*
107100 * Internal Memory.
arch/arm/mach-at91/include/mach/at91sam9261.h+0−4
@@ -79,10 +79,6 @@ · 78 unmodified lines
7979 #define AT91SAM9261_BASE_WDT 0xfffffd40
8080 #define AT91SAM9261_BASE_GPBR 0xfffffd50
8181
82−#define AT91_USART0 AT91SAM9261_BASE_US0
83−#define AT91_USART1 AT91SAM9261_BASE_US1
84−#define AT91_USART2 AT91SAM9261_BASE_US2
85−
8682
8783 /*
8884 * Internal Memory.
arch/arm/mach-at91/include/mach/at91sam9263.h+0−4
@@ -95,10 +95,6 @@ · 94 unmodified lines
9595 #define AT91SAM9263_BASE_RTT1 0xfffffd50
9696 #define AT91SAM9263_BASE_GPBR 0xfffffd60
9797
98−#define AT91_USART0 AT91SAM9263_BASE_US0
99−#define AT91_USART1 AT91SAM9263_BASE_US1
100−#define AT91_USART2 AT91SAM9263_BASE_US2
101−
10298 #define AT91_SMC AT91_SMC0
10399
104100 /*
arch/arm/mach-at91/include/mach/at91sam9g45.h+0−5
@@ -106,11 +106,6 @@ · 105 unmodified lines
106106 #define AT91SAM9G45_BASE_RTC 0xfffffdb0
107107 #define AT91SAM9G45_BASE_GPBR 0xfffffd60
108108
109−#define AT91_USART0 AT91SAM9G45_BASE_US0
110−#define AT91_USART1 AT91SAM9G45_BASE_US1
111−#define AT91_USART2 AT91SAM9G45_BASE_US2
112−#define AT91_USART3 AT91SAM9G45_BASE_US3
113−
114109 /*
115110 * Internal Memory.
116111 */
arch/arm/mach-at91/include/mach/at91sam9rl.h+0−5
@@ -89,11 +89,6 @@ · 88 unmodified lines
8989 #define AT91SAM9RL_BASE_GPBR 0xfffffd60
9090 #define AT91SAM9RL_BASE_RTC 0xfffffe00
9191
92−#define AT91_USART0 AT91SAM9RL_BASE_US0
93−#define AT91_USART1 AT91SAM9RL_BASE_US1
94−#define AT91_USART2 AT91SAM9RL_BASE_US2
95−#define AT91_USART3 AT91SAM9RL_BASE_US3
96−
9792
9893 /*
9994 * Internal Memory.
arch/arm/mach-at91/include/mach/at91sam9x5.h+0−8
@@ -54,14 +54,6 @@ · 53 unmodified lines
5454 #define AT91SAM9X5_BASE_USART1 0xf8020000
5555 #define AT91SAM9X5_BASE_USART2 0xf8024000
5656
57−/*
58− * Base addresses for early serial code (uncompress.h)
59− */
60−#define AT91_DBGU AT91_BASE_DBGU0
61−#define AT91_USART0 AT91SAM9X5_BASE_USART0
62−#define AT91_USART1 AT91SAM9X5_BASE_USART1
63−#define AT91_USART2 AT91SAM9X5_BASE_USART2
64−
6557 /*
6658 * Internal Memory.
6759 */
arch/arm/mach-at91/include/mach/board.h+0−1
@@ -121,7 +121,6 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de · 120 unmodified lines
121121 #define ATMEL_UART_RI 0x20
122122
123123 extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
124−extern void __init at91_set_serial_console(unsigned portnr);
125124
126125 extern struct platform_device *atmel_default_console_device;
127126
arch/arm/mach-at91/include/mach/cpu.h+11−17
@@ -54,6 +54,7 @@ · 53 unmodified lines
5454 #define ARCH_REVISON_9200_BGA (0 << 0)
5555 #define ARCH_REVISON_9200_PQFP (1 << 0)
5656
57+#ifndef __ASSEMBLY__
5758 enum at91_soc_type {
5859 /* 920T */
5960 AT91_SOC_RM9200,
@@ -106,7 +107,7 @@ static inline int at91_soc_is_detected(void) · 46 unmodified lines
106107 return at91_soc_initdata.type != AT91_SOC_NONE;
107108 }
108109
109−#ifdef CONFIG_ARCH_AT91RM9200
110+#ifdef CONFIG_SOC_AT91RM9200
110111 #define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200)
111112 #define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA)
112113 #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP)
@@ -116,45 +117,37 @@ static inline int at91_soc_is_detected(void) · 3 unmodified lines
116117 #define cpu_is_at91rm9200_pqfp() (0)
117118 #endif
118119
119−#ifdef CONFIG_ARCH_AT91SAM9260
120+#ifdef CONFIG_SOC_AT91SAM9260
120121 #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE)
121122 #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260)
123+#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
122124 #else
123125 #define cpu_is_at91sam9xe() (0)
124126 #define cpu_is_at91sam9260() (0)
125−#endif
126−
127−#ifdef CONFIG_ARCH_AT91SAM9G20
128−#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
129−#else
130127 #define cpu_is_at91sam9g20() (0)
131128 #endif
132129
133−#ifdef CONFIG_ARCH_AT91SAM9261
130+#ifdef CONFIG_SOC_AT91SAM9261
134131 #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261)
135−#else
136−#define cpu_is_at91sam9261() (0)
137−#endif
138−
139−#ifdef CONFIG_ARCH_AT91SAM9G10
140132 #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10)
141133 #else
134+#define cpu_is_at91sam9261() (0)
142135 #define cpu_is_at91sam9g10() (0)
143136 #endif
144137
145−#ifdef CONFIG_ARCH_AT91SAM9263
138+#ifdef CONFIG_SOC_AT91SAM9263
146139 #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263)
147140 #else
148141 #define cpu_is_at91sam9263() (0)
149142 #endif
150143
151−#ifdef CONFIG_ARCH_AT91SAM9RL
144+#ifdef CONFIG_SOC_AT91SAM9RL
152145 #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL)
153146 #else
154147 #define cpu_is_at91sam9rl() (0)
155148 #endif
156149
157−#ifdef CONFIG_ARCH_AT91SAM9G45
150+#ifdef CONFIG_SOC_AT91SAM9G45
158151 #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45)
159152 #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES)
160153 #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10)
@@ -168,7 +161,7 @@ static inline int at91_soc_is_detected(void) · 7 unmodified lines
168161 #define cpu_is_at91sam9m11() (0)
169162 #endif
170163
171−#ifdef CONFIG_ARCH_AT91SAM9X5
164+#ifdef CONFIG_SOC_AT91SAM9X5
172165 #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5)
173166 #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15)
174167 #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35)
@@ -189,5 +182,6 @@ static inline int at91_soc_is_detected(void) · 14 unmodified lines
189182 * definitions may reduce clutter in common drivers.
190183 */
191184 #define cpu_is_at32ap7000() (0)
185+#endif /* __ASSEMBLY__ */
192186
193187 #endif /* __MACH_CPU_H__ */
arch/arm/mach-at91/include/mach/hardware.h+3−13
@@ -22,27 +22,17 @@ · 21 unmodified lines
2222 /* 9263, 9g45 */
2323 #define AT91_BASE_DBGU1 0xffffee00
2424
25−#if defined(CONFIG_ARCH_AT91RM9200)
25+#if defined(CONFIG_ARCH_AT91X40)
26+#include <mach/at91x40.h>
27+#else
2628 #include <mach/at91rm9200.h>
27−#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
2829 #include <mach/at91sam9260.h>
29−#elif defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)
3030 #include <mach/at91sam9261.h>
31−#elif defined(CONFIG_ARCH_AT91SAM9263)
3231 #include <mach/at91sam9263.h>
33−#elif defined(CONFIG_ARCH_AT91SAM9RL)
3432 #include <mach/at91sam9rl.h>
35−#elif defined(CONFIG_ARCH_AT91SAM9G45)
3633 #include <mach/at91sam9g45.h>
37−#elif defined(CONFIG_ARCH_AT91SAM9X5)
3834 #include <mach/at91sam9x5.h>
39−#elif defined(CONFIG_ARCH_AT91X40)
40−#include <mach/at91x40.h>
41−#else
42−#error "Unsupported AT91 processor"
43−#endif
4435
45−#if !defined(CONFIG_ARCH_AT91X40)
4636 /*
4737 * On all at91 except rm9200 and x40 have the System Controller starts
4838 * at address 0xffffc000 and has a size of 16KiB.
arch/arm/mach-at91/include/mach/uncompress.h+150−28
@@ -1,7 +1,8 @@
11 /*
22 * arch/arm/mach-at91/include/mach/uncompress.h
33 *
4− * Copyright (C) 2003 SAN People
4+ * Copyright (C) 2003 SAN People
5+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
56 *
67 * This program is free software; you can redistribute it and/or modify
78 * it under the terms of the GNU General Public License as published by
@@ -25,22 +26,147 @@ · 17 unmodified lines
2526 #include <linux/atmel_serial.h>
2627 #include <mach/hardware.h>
2728
28−#if defined(CONFIG_AT91_EARLY_DBGU0)
29−#define UART_OFFSET AT91_BASE_DBGU0
30−#elif defined(CONFIG_AT91_EARLY_DBGU1)
31−#define UART_OFFSET AT91_BASE_DBGU1
32−#elif defined(CONFIG_AT91_EARLY_USART0)
33−#define UART_OFFSET AT91_USART0
34−#elif defined(CONFIG_AT91_EARLY_USART1)
35−#define UART_OFFSET AT91_USART1
36−#elif defined(CONFIG_AT91_EARLY_USART2)
37−#define UART_OFFSET AT91_USART2
38−#elif defined(CONFIG_AT91_EARLY_USART3)
39−#define UART_OFFSET AT91_USART3
40−#elif defined(CONFIG_AT91_EARLY_USART4)
41−#define UART_OFFSET AT91_USART4
42−#elif defined(CONFIG_AT91_EARLY_USART5)
43−#define UART_OFFSET AT91_USART5
29+#include <mach/at91_dbgu.h>
30+#include <mach/cpu.h>
31+
32+void __iomem *at91_uart;
33+
34+#if !defined(CONFIG_ARCH_AT91X40)
35+static const u32 uarts_rm9200[] = {
36+ AT91_BASE_DBGU0,
37+ AT91RM9200_BASE_US0,
38+ AT91RM9200_BASE_US1,
39+ AT91RM9200_BASE_US2,
40+ AT91RM9200_BASE_US3,
41+ 0,
42+};
43+
44+static const u32 uarts_sam9260[] = {
45+ AT91_BASE_DBGU0,
46+ AT91SAM9260_BASE_US0,
47+ AT91SAM9260_BASE_US1,
48+ AT91SAM9260_BASE_US2,
49+ AT91SAM9260_BASE_US3,
50+ AT91SAM9260_BASE_US4,
51+ AT91SAM9260_BASE_US5,
52+ 0,
53+};
54+
55+static const u32 uarts_sam9261[] = {
56+ AT91_BASE_DBGU0,
57+ AT91SAM9261_BASE_US0,
58+ AT91SAM9261_BASE_US1,
59+ AT91SAM9261_BASE_US2,
60+ 0,
61+};
62+
63+static const u32 uarts_sam9263[] = {
64+ AT91_BASE_DBGU1,
65+ AT91SAM9263_BASE_US0,
66+ AT91SAM9263_BASE_US1,
67+ AT91SAM9263_BASE_US2,
68+ 0,
69+};
70+
71+static const u32 uarts_sam9g45[] = {
72+ AT91_BASE_DBGU1,
73+ AT91SAM9G45_BASE_US0,
74+ AT91SAM9G45_BASE_US1,
75+ AT91SAM9G45_BASE_US2,
76+ AT91SAM9G45_BASE_US3,
77+ 0,
78+};
79+
80+static const u32 uarts_sam9rl[] = {
81+ AT91_BASE_DBGU0,
82+ AT91SAM9RL_BASE_US0,
83+ AT91SAM9RL_BASE_US1,
84+ AT91SAM9RL_BASE_US2,
85+ AT91SAM9RL_BASE_US3,
86+ 0,
87+};
88+
89+static const u32 uarts_sam9x5[] = {
90+ AT91_BASE_DBGU0,
91+ AT91SAM9X5_BASE_USART0,
92+ AT91SAM9X5_BASE_USART1,
93+ AT91SAM9X5_BASE_USART2,
94+ 0,
95+};
96+
97+static inline const u32* decomp_soc_detect(u32 dbgu_base)
98+{
99+ u32 cidr, socid;
100+
101+ cidr = __raw_readl(dbgu_base + AT91_DBGU_CIDR);
102+ socid = cidr & ~AT91_CIDR_VERSION;
103+
104+ switch (socid) {
105+ case ARCH_ID_AT91RM9200:
106+ return uarts_rm9200;
107+
108+ case ARCH_ID_AT91SAM9G20:
109+ case ARCH_ID_AT91SAM9260:
110+ return uarts_sam9260;
111+
112+ case ARCH_ID_AT91SAM9261:
113+ return uarts_sam9261;
114+
115+ case ARCH_ID_AT91SAM9263:
116+ return uarts_sam9263;
117+
118+ case ARCH_ID_AT91SAM9G45:
119+ return uarts_sam9g45;
120+
121+ case ARCH_ID_AT91SAM9RL64:
122+ return uarts_sam9rl;
123+
124+ case ARCH_ID_AT91SAM9X5:
125+ return uarts_sam9x5;
126+ }
127+
128+ /* at91sam9g10 */
129+ if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
130+ return uarts_sam9261;
131+ }
132+ /* at91sam9xe */
133+ else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) {
134+ return uarts_sam9260;
135+ }
136+
137+ return NULL;
138+}
139+
140+static inline void arch_decomp_setup(void)
141+{
142+ int i = 0;
143+ const u32* usarts;
144+
145+ usarts = decomp_soc_detect(AT91_BASE_DBGU0);
146+
147+ if (!usarts)
148+ usarts = decomp_soc_detect(AT91_BASE_DBGU1);
149+ if (!usarts) {
150+ at91_uart = NULL;
151+ return;
152+ }
153+
154+ do {
155+ /* physical address */
156+ at91_uart = (void __iomem *)usarts[i];
157+
158+ if (__raw_readl(at91_uart + ATMEL_US_BRGR))
159+ return;
160+ i++;
161+ } while (usarts[i]);
162+
163+ at91_uart = NULL;
164+}
165+#else
166+static inline void arch_decomp_setup(void)
167+{
168+ at91_uart = NULL;
169+}
44170 #endif
45171
46172 /*
@@ -52,28 +178,24 @@ · 5 unmodified lines
52178 */
53179 static void putc(int c)
54180 {
55−#ifdef UART_OFFSET
56− void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
181+ if (!at91_uart)
182+ return;
57183
58− while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY))
184+ while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXRDY))
59185 barrier();
60− __raw_writel(c, sys + ATMEL_US_THR);
61−#endif
186+ __raw_writel(c, at91_uart + ATMEL_US_THR);
62187 }
63188
64189 static inline void flush(void)
65190 {
66−#ifdef UART_OFFSET
67− void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
191+ if (!at91_uart)
192+ return;
68193
69194 /* wait for transmission to complete */
70− while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
195+ while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
71196 barrier();
72−#endif
73197 }
74198
75−#define arch_decomp_setup()
76−
77199 #define arch_decomp_wdog()
78200
79201 #endif
arch/arm/mach-at91/pm.c+8−4
@@ -261,7 +261,12 @@ static int at91_pm_enter(suspend_state_t state) · 260 unmodified lines
261261 * For ARM 926 based chips, this requirement is weaker
262262 * as at91sam9 can access a RAM in self-refresh mode.
263263 */
264− at91_standby();
264+ if (cpu_is_at91rm9200())
265+ at91rm9200_standby();
266+ else if (cpu_is_at91sam9g45())
267+ at91sam9g45_standby();
268+ else
269+ at91sam9_standby();
265270 break;
266271
267272 case PM_SUSPEND_ON:
@@ -307,10 +312,9 @@ static int __init at91_pm_init(void) · 39 unmodified lines
307312
308313 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
309314
310−#ifdef CONFIG_ARCH_AT91RM9200
311315 /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */
312− at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);
313−#endif
316+ if (cpu_is_at91rm9200())
317+ at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);
314318
315319 suspend_set_ops(&at91_pm_ops);
316320
arch/arm/mach-at91/pm.h+1−14
@@ -12,7 +12,6 @@ · 11 unmodified lines
1212 #define __ARCH_ARM_MACH_AT91_PM
1313
1414 #include <mach/at91_ramc.h>
15−#ifdef CONFIG_ARCH_AT91RM9200
1615 #include <mach/at91rm9200_sdramc.h>
1716
1817 /*
@@ -43,10 +42,6 @@ static inline void at91rm9200_standby(void) · 24 unmodified lines
4342 "r" (lpr));
4443 }
4544
46−#define at91_standby at91rm9200_standby
47−
48−#elif defined(CONFIG_ARCH_AT91SAM9G45)
49−
5045 /* We manage both DDRAM/SDRAM controllers, we need more than one value to
5146 * remember.
5247 */
@@ -75,11 +70,7 @@ static inline void at91sam9g45_standby(void) · 22 unmodified lines
7570 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
7671 }
7772
78−#define at91_standby at91sam9g45_standby
79−
80−#else
81−
82−#ifdef CONFIG_ARCH_AT91SAM9263
73+#ifdef CONFIG_SOC_AT91SAM9263
8374 /*
8475 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
8576 * handle those cases both here and in the Suspend-To-RAM support.
@@ -102,8 +93,4 @@ static inline void at91sam9_standby(void) · 16 unmodified lines
10293 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr);
10394 }
10495
105−#define at91_standby at91sam9_standby
106−
107−#endif
108−
10996 #endif
arch/arm/mach-at91/pm_slowclock.S+1−1
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 #include <mach/at91_ramc.h>
1919
2020
21−#ifdef CONFIG_ARCH_AT91SAM9263
21+#ifdef CONFIG_SOC_AT91SAM9263
2222 /*
2323 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
2424 * handle those cases both here and in the Suspend-To-RAM support.
arch/arm/mach-at91/soc.h+7−7
@@ -26,30 +26,30 @@ static inline int at91_soc_is_enabled(void) · 25 unmodified lines
2626 return at91_boot_soc.init != NULL;
2727 }
2828
29−#if !defined(CONFIG_ARCH_AT91RM9200)
29+#if !defined(CONFIG_SOC_AT91RM9200)
3030 #define at91rm9200_soc at91_boot_soc
3131 #endif
3232
33−#if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20))
33+#if !defined(CONFIG_SOC_AT91SAM9260)
3434 #define at91sam9260_soc at91_boot_soc
3535 #endif
3636
37−#if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10))
37+#if !defined(CONFIG_SOC_AT91SAM9261)
3838 #define at91sam9261_soc at91_boot_soc
3939 #endif
4040
41−#if !defined(CONFIG_ARCH_AT91SAM9263)
41+#if !defined(CONFIG_SOC_AT91SAM9263)
4242 #define at91sam9263_soc at91_boot_soc
4343 #endif
4444
45−#if !defined(CONFIG_ARCH_AT91SAM9G45)
45+#if !defined(CONFIG_SOC_AT91SAM9G45)
4646 #define at91sam9g45_soc at91_boot_soc
4747 #endif
4848
49−#if !defined(CONFIG_ARCH_AT91SAM9RL)
49+#if !defined(CONFIG_SOC_AT91SAM9RL)
5050 #define at91sam9rl_soc at91_boot_soc
5151 #endif
5252
53−#if !defined(CONFIG_ARCH_AT91SAM9X5)
53+#if !defined(CONFIG_SOC_AT91SAM9X5)
5454 #define at91sam9x5_soc at91_boot_soc
5555 #endif
arch/arm/mach-clps711x/Kconfig+4−17
@@ -1,6 +1,6 @@
11 if ARCH_CLPS711X
22
3−menu "CLPS711X/EP721X Implementations"
3+menu "CLPS711X/EP721X/EP731X Implementations"
44
55 config ARCH_AUTCPU12
66 bool "AUTCPU12"
@@ -45,26 +45,13 @@ config ARCH_P720T · 38 unmodified lines
4545 config ARCH_FORTUNET
4646 bool "FORTUNET"
4747
48−# XXX Maybe these should indicate register compatibility
49−# instead of being mutually exclusive.
50−config ARCH_EP7211
51− bool
52− depends on ARCH_EDB7211
53− default y
54−
55−config ARCH_EP7212
56− bool
57− depends on ARCH_P720T || ARCH_CEIVA
58− default y
59−
6048 config EP72XX_ROM_BOOT
61− bool "EP72xx ROM boot"
62− depends on ARCH_EP7211 || ARCH_EP7212
63− ---help---
49+ bool "EP721x/EP731x ROM boot"
50+ help
6451 If you say Y here, your CLPS711x-based kernel will use the bootstrap
6552 mode memory map instead of the normal memory map.
6653
67− Processors derived from the Cirrus CLPS-711X core support two boot
54+ Processors derived from the Cirrus CLPS711X core support two boot
6855 modes. Normal mode boots from the external memory device at CS0.
6956 Bootstrap mode rearranges parts of the memory map, placing an
7057 internal 128 byte bootstrap ROM at CS0. This option performs the
arch/arm/mach-clps711x/common.c+2−15
@@ -36,7 +36,6 @@ · 35 unmodified lines
3636 #include <asm/page.h>
3737 #include <asm/mach/map.h>
3838 #include <asm/mach/time.h>
39−#include <asm/hardware/clps7111.h>
4039 #include <asm/system_misc.h>
4140
4241 /*
@@ -44,8 +43,8 @@ · 1 unmodified line
4443 */
4544 static struct map_desc clps711x_io_desc[] __initdata = {
4645 {
47− .virtual = CLPS7111_VIRT_BASE,
48− .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
46+ .virtual = (unsigned long)CLPS711X_VIRT_BASE,
47+ .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE),
4948 .length = SZ_1M,
5049 .type = MT_DEVICE
5150 }
@@ -67,12 +66,6 @@ static void int1_mask(struct irq_data *d) · 15 unmodified lines
6766
6867 static void int1_ack(struct irq_data *d)
6968 {
70− u32 intmr1;
71−
72− intmr1 = clps_readl(INTMR1);
73− intmr1 &= ~(1 << d->irq);
74− clps_writel(intmr1, INTMR1);
75−
7669 switch (d->irq) {
7770 case IRQ_CSINT: clps_writel(0, COEOI); break;
7871 case IRQ_TC1OI: clps_writel(0, TC1EOI); break;
@@ -109,12 +102,6 @@ static void int2_mask(struct irq_data *d) · 30 unmodified lines
109102
110103 static void int2_ack(struct irq_data *d)
111104 {
112− u32 intmr2;
113−
114− intmr2 = clps_readl(INTMR2);
115− intmr2 &= ~(1 << (d->irq - 16));
116− clps_writel(intmr2, INTMR2);
117−
118105 switch (d->irq) {
119106 case IRQ_KBDINT: clps_writel(0, KBDEOI); break;
120107 }
arch/arm/mach-clps711x/include/mach/clps711x.hrenamed from arch/arm/include/asm/hardware/clps7111.h+112−18
@@ -1,8 +1,6 @@
11 /*
2− * arch/arm/include/asm/hardware/clps7111.h
3− *
4− * This file contains the hardware definitions of the CLPS7111 internal
5− * registers.
2+ * This file contains the hardware definitions of the Cirrus Logic
3+ * ARM7 CLPS711X internal registers.
64 *
75 * Copyright (C) 2000 Deep Blue Solutions Ltd.
86 *
@@ -20,25 +18,18 @@ · 11 unmodified lines
2018 * along with this program; if not, write to the Free Software
2119 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2220 */
23−#ifndef __ASM_HARDWARE_CLPS7111_H
24−#define __ASM_HARDWARE_CLPS7111_H
25−
26−#define CLPS7111_PHYS_BASE (0x80000000)
21+#ifndef __MACH_CLPS711X_H
22+#define __MACH_CLPS711X_H
2723
28−#ifndef __ASSEMBLY__
29−#define clps_readb(off) __raw_readb(CLPS7111_BASE + (off))
30−#define clps_readw(off) __raw_readw(CLPS7111_BASE + (off))
31−#define clps_readl(off) __raw_readl(CLPS7111_BASE + (off))
32−#define clps_writeb(val,off) __raw_writeb(val, CLPS7111_BASE + (off))
33−#define clps_writew(val,off) __raw_writew(val, CLPS7111_BASE + (off))
34−#define clps_writel(val,off) __raw_writel(val, CLPS7111_BASE + (off))
35−#endif
24+#define CLPS711X_PHYS_BASE (0x80000000)
3625
3726 #define PADR (0x0000)
3827 #define PBDR (0x0001)
28+#define PCDR (0x0002)
3929 #define PDDR (0x0003)
4030 #define PADDR (0x0040)
4131 #define PBDDR (0x0041)
32+#define PCDDR (0x0042)
4233 #define PDDDR (0x0043)
4334 #define PEDR (0x0080)
4435 #define PEDDR (0x00c0)
@@ -50,7 +41,7 @@ · 5 unmodified lines
5041 #define INTSR1 (0x0240)
5142 #define INTMR1 (0x0280)
5243 #define LCDCON (0x02c0)
53−#define TC1D (0x0300)
44+#define TC1D (0x0300)
5445 #define TC2D (0x0340)
5546 #define RTCDR (0x0380)
5647 #define RTCMR (0x03c0)
@@ -85,6 +76,26 @@ · 28 unmodified lines
8576 #define SS2POP (0x16c0)
8677 #define KBDEOI (0x1700)
8778
79+#define DAIR (0x2000)
80+#define DAIR0 (0x2040)
81+#define DAIDR1 (0x2080)
82+#define DAIDR2 (0x20c0)
83+#define DAISR (0x2100)
84+#define SYSCON3 (0x2200)
85+#define INTSR3 (0x2240)
86+#define INTMR3 (0x2280)
87+#define LEDFLSH (0x22c0)
88+#define SDCONF (0x2300)
89+#define SDRFPR (0x2340)
90+#define UNIQID (0x2440)
91+#define DAI64FS (0x2600)
92+#define PLLW (0x2610)
93+#define PLLR (0xa5a8)
94+#define RANDID0 (0x2700)
95+#define RANDID1 (0x2704)
96+#define RANDID2 (0x2708)
97+#define RANDID3 (0x270c)
98+
8899 /* common bits: SYSCON1 / SYSCON2 */
89100 #define SYSCON_UARTEN (1 << 8)
90101
@@ -131,6 +142,8 @@ · 40 unmodified lines
131142 #define SYSFLG1_CTXFF (1 << 25)
132143 #define SYSFLG1_SSIBUSY (1 << 26)
133144 #define SYSFLG1_ID (1 << 29)
145+#define SYSFLG1_VERID(x) (((x) >> 30) & 3)
146+#define SYSFLG1_VERID_MASK (3 << 30)
134147
135148 #define SYSFLG2_SSRXOF (1 << 0)
136149 #define SYSFLG2_RESVAL (1 << 1)
@@ -178,7 +191,88 @@ · 41 unmodified lines
178191 #define UBRLCR_WRDLEN8 (3 << 17)
179192 #define UBRLCR_WRDLEN_MASK (3 << 17)
180193
194+#define SYNCIO_FRMLEN(x) (((x) & 0x3f) << 7)
195+#define SYNCIO_CFGLEN(x) ((x) & 0x7f)
181196 #define SYNCIO_SMCKEN (1 << 13)
182197 #define SYNCIO_TXFRMEN (1 << 14)
183198
184−#endif /* __ASM_HARDWARE_CLPS7111_H */
199+#define DAIR_RESERVED (0x0404)
200+#define DAIR_DAIEN (1 << 16)
201+#define DAIR_ECS (1 << 17)
202+#define DAIR_LCTM (1 << 19)
203+#define DAIR_LCRM (1 << 20)
204+#define DAIR_RCTM (1 << 21)
205+#define DAIR_RCRM (1 << 22)
206+#define DAIR_LBM (1 << 23)
207+
208+#define DAIDR2_FIFOEN (1 << 15)
209+#define DAIDR2_FIFOLEFT (0x0d << 16)
210+#define DAIDR2_FIFORIGHT (0x11 << 16)
211+
212+#define DAISR_RCTS (1 << 0)
213+#define DAISR_RCRS (1 << 1)
214+#define DAISR_LCTS (1 << 2)
215+#define DAISR_LCRS (1 << 3)
216+#define DAISR_RCTU (1 << 4)
217+#define DAISR_RCRO (1 << 5)
218+#define DAISR_LCTU (1 << 6)
219+#define DAISR_LCRO (1 << 7)
220+#define DAISR_RCNF (1 << 8)
221+#define DAISR_RCNE (1 << 9)
222+#define DAISR_LCNF (1 << 10)
223+#define DAISR_LCNE (1 << 11)
224+#define DAISR_FIFO (1 << 12)
225+
226+#define DAI64FS_I2SF64 (1 << 0)
227+#define DAI64FS_AUDIOCLKEN (1 << 1)
228+#define DAI64FS_AUDIOCLKSRC (1 << 2)
229+#define DAI64FS_MCLK256EN (1 << 3)
230+#define DAI64FS_LOOPBACK (1 << 5)
231+
232+#define SYSCON3_ADCCON (1 << 0)
233+#define SYSCON3_CLKCTL0 (1 << 1)
234+#define SYSCON3_CLKCTL1 (1 << 2)
235+#define SYSCON3_DAISEL (1 << 3)
236+#define SYSCON3_ADCCKNSEN (1 << 4)
237+#define SYSCON3_VERSN(x) (((x) >> 5) & 7)
238+#define SYSCON3_VERSN_MASK (7 << 5)
239+#define SYSCON3_FASTWAKE (1 << 8)
240+#define SYSCON3_DAIEN (1 << 9)
241+#define SYSCON3_128FS SYSCON3_DAIEN
242+#define SYSCON3_ENPD67 (1 << 10)
243+
244+#define SDCONF_ACTIVE (1 << 10)
245+#define SDCONF_CLKCTL (1 << 9)
246+#define SDCONF_WIDTH_4 (0 << 7)
247+#define SDCONF_WIDTH_8 (1 << 7)
248+#define SDCONF_WIDTH_16 (2 << 7)
249+#define SDCONF_WIDTH_32 (3 << 7)
250+#define SDCONF_SIZE_16 (0 << 5)
251+#define SDCONF_SIZE_64 (1 << 5)
252+#define SDCONF_SIZE_128 (2 << 5)
253+#define SDCONF_SIZE_256 (3 << 5)
254+#define SDCONF_CASLAT_2 (2)
255+#define SDCONF_CASLAT_3 (3)
256+
257+#define MEMCFG_BUS_WIDTH_32 (1)
258+#define MEMCFG_BUS_WIDTH_16 (0)
259+#define MEMCFG_BUS_WIDTH_8 (3)
260+
261+#define MEMCFG_WAITSTATE_8_3 (0 << 2)
262+#define MEMCFG_WAITSTATE_7_3 (1 << 2)
263+#define MEMCFG_WAITSTATE_6_3 (2 << 2)
264+#define MEMCFG_WAITSTATE_5_3 (3 << 2)
265+#define MEMCFG_WAITSTATE_4_2 (4 << 2)
266+#define MEMCFG_WAITSTATE_3_2 (5 << 2)
267+#define MEMCFG_WAITSTATE_2_2 (6 << 2)
268+#define MEMCFG_WAITSTATE_1_2 (7 << 2)
269+#define MEMCFG_WAITSTATE_8_1 (8 << 2)
270+#define MEMCFG_WAITSTATE_7_1 (9 << 2)
271+#define MEMCFG_WAITSTATE_6_1 (10 << 2)
272+#define MEMCFG_WAITSTATE_5_1 (11 << 2)
273+#define MEMCFG_WAITSTATE_4_0 (12 << 2)
274+#define MEMCFG_WAITSTATE_3_0 (13 << 2)
275+#define MEMCFG_WAITSTATE_2_0 (14 << 2)
276+#define MEMCFG_WAITSTATE_1_0 (15 << 2)
277+
278+#endif /* __MACH_CLPS711X_H */
arch/arm/mach-clps711x/include/mach/debug-macro.S+2−3
@@ -12,7 +12,6 @@ · 11 unmodified lines
1212 */
1313
1414 #include <mach/hardware.h>
15−#include <asm/hardware/clps7111.h>
1615
1716 .macro addruart, rp, rv, tmp
1817 #ifndef CONFIG_DEBUG_CLPS711X_UART2
@@ -20,8 +19,8 @@ · 1 unmodified line
2019 #else
2120 mov \rp, #0x1000 @ UART2
2221 #endif
23− orr \rv, \rp, #CLPS7111_VIRT_BASE
24− orr \rp, \rp, #CLPS7111_PHYS_BASE
22+ orr \rv, \rp, #CLPS711X_VIRT_BASE
23+ orr \rp, \rp, #CLPS711X_PHYS_BASE
2524 .endm
2625
2726 .macro senduart,rd,rx
arch/arm/mach-clps711x/include/mach/entry-macro.S+1−2
@@ -8,7 +8,6 @@ · 7 unmodified lines
88 * warranty of any kind, whether express or implied.
99 */
1010 #include <mach/hardware.h>
11−#include <asm/hardware/clps7111.h>
1211
1312 .macro get_irqnr_preamble, base, tmp
1413 .endm
@@ -18,7 +17,7 @@ · 3 unmodified lines
1817 #endif
1918
2019 .macro get_irqnr_and_base, irqnr, stat, base, mask
21− mov \base, #CLPS7111_BASE
20+ mov \base, #CLPS711X_VIRT_BASE
2221 ldr \stat, [\base, #INTSR1]
2322 ldr \mask, [\base, #INTMR1]
2423 mov \irqnr, #4
arch/arm/mach-clps711x/include/mach/hardware.h+13−46
@@ -19,12 +19,21 @@ · 18 unmodified lines
1919 * along with this program; if not, write to the Free Software
2020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2121 */
22−#ifndef __ASM_ARCH_HARDWARE_H
23−#define __ASM_ARCH_HARDWARE_H
22+#ifndef __MACH_HARDWARE_H
23+#define __MACH_HARDWARE_H
2424
25+#include <mach/clps711x.h>
2526
26−#define CLPS7111_VIRT_BASE 0xff000000
27−#define CLPS7111_BASE CLPS7111_VIRT_BASE
27+#define CLPS711X_VIRT_BASE IOMEM(0xff000000)
28+
29+#ifndef __ASSEMBLY__
30+#define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off))
31+#define clps_readw(off) readw(CLPS711X_VIRT_BASE + (off))
32+#define clps_readl(off) readl(CLPS711X_VIRT_BASE + (off))
33+#define clps_writeb(val,off) writeb(val, CLPS711X_VIRT_BASE + (off))
34+#define clps_writew(val,off) writew(val, CLPS711X_VIRT_BASE + (off))
35+#define clps_writel(val,off) writel(val, CLPS711X_VIRT_BASE + (off))
36+#endif
2837
2938 /*
3039 * The physical addresses that the external chip select signals map to is
@@ -52,46 +61,11 @@ · 21 unmodified lines
5261 #define CS7_PHYS_BASE (0x00000000)
5362 #endif
5463
55−#if defined (CONFIG_ARCH_EP7211)
56−
57−#define EP7211_VIRT_BASE CLPS7111_VIRT_BASE
58−#define EP7211_BASE CLPS7111_VIRT_BASE
59−#include <asm/hardware/ep7211.h>
60−
61−#elif defined (CONFIG_ARCH_EP7212)
62−
63−#define EP7212_VIRT_BASE CLPS7111_VIRT_BASE
64−#define EP7212_BASE CLPS7111_VIRT_BASE
65−#include <asm/hardware/ep7212.h>
66−
67−#endif
68−
6964 #define SYSPLD_VIRT_BASE 0xfe000000
7065 #define SYSPLD_BASE SYSPLD_VIRT_BASE
7166
72−#if defined (CONFIG_ARCH_AUTCPU12)
73−
74−#define CS89712_VIRT_BASE CLPS7111_VIRT_BASE
75−#define CS89712_BASE CLPS7111_VIRT_BASE
76−
77−#include <asm/hardware/clps7111.h>
78−#include <asm/hardware/ep7212.h>
79−#include <asm/hardware/cs89712.h>
80−
81−#endif
82−
83−
8467 #if defined (CONFIG_ARCH_CDB89712)
8568
86−#include <asm/hardware/clps7111.h>
87−#include <asm/hardware/ep7212.h>
88−#include <asm/hardware/cs89712.h>
89−
90−/* static cdb89712_map_io() areas */
91−#define REGISTER_START 0x80000000
92−#define REGISTER_SIZE 0x4000
93−#define REGISTER_BASE 0xff000000
94−
9569 #define ETHER_START 0x20000000
9670 #define ETHER_SIZE 0x1000
9771 #define ETHER_BASE 0xfe000000
@@ -154,13 +128,6 @@ · 56 unmodified lines
154128
155129 #if defined (CONFIG_ARCH_CEIVA)
156130
157−#define CEIVA_VIRT_BASE CLPS7111_VIRT_BASE
158−#define CEIVA_BASE CLPS7111_VIRT_BASE
159−
160−#include <asm/hardware/clps7111.h>
161−#include <asm/hardware/ep7212.h>
162−
163−
164131 /*
165132 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
166133 * for them.
arch/arm/mach-clps711x/include/mach/irqs.h+1−4
@@ -35,7 +35,6 @@ · 34 unmodified lines
3535 #define IRQ_SSEOTI 15
3636
3737 #define INT1_IRQS (0x0000fff0)
38−#define INT1_ACK_IRQS (0x00004f10)
3938
4039 /*
4140 * Interrupts from INTSR2
@@ -47,7 +46,5 @@ · 5 unmodified lines
4746 #define IRQ_URXINT2 (16+13) /* bit 13 */
4847
4948 #define INT2_IRQS (0x30070000)
50−#define INT2_ACK_IRQS (0x00010000)
51−
52−#define NR_IRQS 30
5349
50+#define NR_IRQS 30
arch/arm/mach-clps711x/include/mach/time.h+0−49
@@ -1,49 +0,0 @@
1−/*
2− * arch/arm/mach-clps711x/include/mach/time.h
3− *
4− * Copyright (C) 2000 Deep Blue Solutions Ltd.
5− *
6− * This program is free software; you can redistribute it and/or modify
7− * it under the terms of the GNU General Public License as published by
8− * the Free Software Foundation; either version 2 of the License, or
9− * (at your option) any later version.
10− *
11− * This program is distributed in the hope that it will be useful,
12− * but WITHOUT ANY WARRANTY; without even the implied warranty of
13− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14− * GNU General Public License for more details.
15− *
16− * You should have received a copy of the GNU General Public License
17− * along with this program; if not, write to the Free Software
18− * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19− */
20−#include <asm/leds.h>
21−#include <asm/hardware/clps7111.h>
22−
23−extern void clps711x_setup_timer(void);
24−
25−/*
26− * IRQ handler for the timer
27− */
28−static irqreturn_t
29−p720t_timer_interrupt(int irq, void *dev_id)
30−{
31− struct pt_regs *regs = get_irq_regs();
32− do_leds();
33− xtime_update(1);
34−#ifndef CONFIG_SMP
35− update_process_times(user_mode(regs));
36−#endif
37− do_profile(regs);
38− return IRQ_HANDLED;
39−}
40−
41−/*
42− * Set up timer interrupt, and return the current time in seconds.
43− */
44−void __init time_init(void)
45−{
46− clps711x_setup_timer();
47− timer_irq.handler = p720t_timer_interrupt;
48− setup_irq(IRQ_TC2OI, &timer_irq);
49−}
arch/arm/mach-clps711x/include/mach/uncompress.h+10−11
@@ -17,14 +17,7 @@ · 16 unmodified lines
1717 * along with this program; if not, write to the Free Software
1818 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1919 */
20−#include <mach/hardware.h>
21−#include <asm/hardware/clps7111.h>
22−
23−#undef CLPS7111_BASE
24−#define CLPS7111_BASE CLPS7111_PHYS_BASE
25−
26−#define __raw_readl(p) (*(unsigned long *)(p))
27−#define __raw_writel(v,p) (*(unsigned long *)(p) = (v))
20+#include <mach/clps711x.h>
2821
2922 #ifdef CONFIG_DEBUG_CLPS711X_UART2
3023 #define SYSFLGx SYSFLG2
@@ -34,19 +27,25 @@ · 3 unmodified lines
3427 #define UARTDRx UARTDR1
3528 #endif
3629
30+#define phys_reg(x) (*(volatile u32 *)(CLPS711X_PHYS_BASE + (x)))
31+
3732 /*
33+ * The following code assumes the serial port has already been
34+ * initialized by the bootloader. If you didn't setup a port in
35+ * your bootloader then nothing will appear (which might be desired).
36+ *
3837 * This does not append a newline
3938 */
4039 static inline void putc(int c)
4140 {
42− while (clps_readl(SYSFLGx) & SYSFLG_UTXFF)
41+ while (phys_reg(SYSFLGx) & SYSFLG_UTXFF)
4342 barrier();
44− clps_writel(c, UARTDRx);
43+ phys_reg(UARTDRx) = c;
4544 }
4645
4746 static inline void flush(void)
4847 {
49− while (clps_readl(SYSFLGx) & SYSFLG_UBUSY)
48+ while (phys_reg(SYSFLGx) & SYSFLG_UBUSY)
5049 barrier();
5150 }
5251
arch/arm/mach-clps711x/p720t-leds.c+0−3
@@ -27,9 +27,6 @@ · 26 unmodified lines
2727 #include <asm/leds.h>
2828 #include <asm/mach-types.h>
2929
30−#include <asm/hardware/clps7111.h>
31−#include <asm/hardware/ep7212.h>
32−
3330 static void p720t_leds_event(led_event_t ledevt)
3431 {
3532 unsigned long flags;
arch/arm/mach-dove/common.c+1−1
@@ -181,7 +181,7 @@ static int get_tclk(void) · 180 unmodified lines
181181 return 166666667;
182182 }
183183
184−static void dove_timer_init(void)
184+static void __init dove_timer_init(void)
185185 {
186186 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
187187 IRQ_DOVE_BRIDGE, get_tclk());
arch/arm/mach-dove/mpp.c+4−4
@@ -56,7 +56,7 @@ static void dove_mpp_gpio_mode(int start, int end, int gpio_mode) · 55 unmodified lines
5656
5757 /* Dump all the extra MPP registers. The platform code will dump the
5858 registers for pins 0-23. */
59−static void dove_mpp_dump_regs(void)
59+static void __init dove_mpp_dump_regs(void)
6060 {
6161 pr_debug("PMU_CTRL4_CTRL: %08x\n",
6262 readl(DOVE_MPP_CTRL4_VIRT_BASE));
@@ -67,7 +67,7 @@ static void dove_mpp_dump_regs(void) · 4 unmodified lines
6767 pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE));
6868 }
6969
70−static void dove_mpp_cfg_nfc(int sel)
70+static void __init dove_mpp_cfg_nfc(int sel)
7171 {
7272 u32 mpp_gen_cfg = readl(DOVE_MPP_GENERAL_VIRT_BASE);
7373
@@ -78,7 +78,7 @@ static void dove_mpp_cfg_nfc(int sel) · 4 unmodified lines
7878 dove_mpp_gpio_mode(64, 71, GPIO_OUTPUT_OK);
7979 }
8080
81−static void dove_mpp_cfg_au1(int sel)
81+static void __init dove_mpp_cfg_au1(int sel)
8282 {
8383 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);
8484 u32 ssp_ctrl1 = readl(DOVE_SSP_CTRL_STATUS_1);
@@ -118,7 +118,7 @@ static void dove_mpp_cfg_au1(int sel) · 33 unmodified lines
118118
119119 /* Configure the group registers, enabling GPIO if sel indicates the
120120 pin is to be used for GPIO */
121−static void dove_mpp_conf_grp(unsigned int *mpp_grp_list)
121+static void __init dove_mpp_conf_grp(unsigned int *mpp_grp_list)
122122 {
123123 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);
124124 int gpio_mode;
arch/arm/mach-ep93xx/Kconfig+5−0
@@ -2,6 +2,11 @@ if ARCH_EP93XX · 1 unmodified line
22
33 menu "Cirrus EP93xx Implementation Options"
44
5+config EP93XX_SOC_COMMON
6+ bool
7+ default y
8+ select LEDS_GPIO_REGISTER
9+
510 config CRUNCH
611 bool "Support for MaverickCrunch"
712 help
arch/arm/mach-ep93xx/core.c+20−90
@@ -241,11 +241,7 @@ unsigned int ep93xx_chip_revision(void) · 240 unmodified lines
241241 * EP93xx GPIO
242242 *************************************************************************/
243243 static struct resource ep93xx_gpio_resource[] = {
244− {
245− .start = EP93XX_GPIO_PHYS_BASE,
246− .end = EP93XX_GPIO_PHYS_BASE + 0xcc - 1,
247− .flags = IORESOURCE_MEM,
248− },
244+ DEFINE_RES_MEM(EP93XX_GPIO_PHYS_BASE, 0xcc),
249245 };
250246
251247 static struct platform_device ep93xx_gpio_device = {
@@ -288,11 +284,7 @@ static AMBA_APB_DEVICE(uart3, "apb:uart3", 0x00041010, EP93XX_UART3_PHYS_BASE, · 36 unmodified lines
288284 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);
289285
290286 static struct resource ep93xx_rtc_resource[] = {
291− {
292− .start = EP93XX_RTC_PHYS_BASE,
293− .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1,
294− .flags = IORESOURCE_MEM,
295− },
287+ DEFINE_RES_MEM(EP93XX_RTC_PHYS_BASE, 0x10c),
296288 };
297289
298290 static struct platform_device ep93xx_rtc_device = {
@@ -304,16 +296,8 @@ static struct platform_device ep93xx_rtc_device = { · 5 unmodified lines
304296
305297
306298 static struct resource ep93xx_ohci_resources[] = {
307− [0] = {
308− .start = EP93XX_USB_PHYS_BASE,
309− .end = EP93XX_USB_PHYS_BASE + 0x0fff,
310− .flags = IORESOURCE_MEM,
311− },
312− [1] = {
313− .start = IRQ_EP93XX_USB,
314− .end = IRQ_EP93XX_USB,
315− .flags = IORESOURCE_IRQ,
316− },
299+ DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000),
300+ DEFINE_RES_IRQ(IRQ_EP93XX_USB),
317301 };
318302
319303
@@ -372,15 +356,8 @@ void __init ep93xx_register_flash(unsigned int width, · 52 unmodified lines
372356 static struct ep93xx_eth_data ep93xx_eth_data;
373357
374358 static struct resource ep93xx_eth_resource[] = {
375− {
376− .start = EP93XX_ETHERNET_PHYS_BASE,
377− .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
378− .flags = IORESOURCE_MEM,
379− }, {
380− .start = IRQ_EP93XX_ETHERNET,
381− .end = IRQ_EP93XX_ETHERNET,
382− .flags = IORESOURCE_IRQ,
383− }
359+ DEFINE_RES_MEM(EP93XX_ETHERNET_PHYS_BASE, 0x10000),
360+ DEFINE_RES_IRQ(IRQ_EP93XX_ETHERNET),
384361 };
385362
386363 static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32);
@@ -461,16 +438,8 @@ void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data, · 74 unmodified lines
461438 static struct ep93xx_spi_info ep93xx_spi_master_data;
462439
463440 static struct resource ep93xx_spi_resources[] = {
464− {
465− .start = EP93XX_SPI_PHYS_BASE,
466− .end = EP93XX_SPI_PHYS_BASE + 0x18 - 1,
467− .flags = IORESOURCE_MEM,
468− },
469− {
470− .start = IRQ_EP93XX_SSP,
471− .end = IRQ_EP93XX_SSP,
472− .flags = IORESOURCE_IRQ,
473− },
441+ DEFINE_RES_MEM(EP93XX_SPI_PHYS_BASE, 0x18),
442+ DEFINE_RES_IRQ(IRQ_EP93XX_SSP),
474443 };
475444
476445 static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32);
@@ -513,7 +482,7 @@ void __init ep93xx_register_spi(struct ep93xx_spi_info *info, · 36 unmodified lines
513482 /*************************************************************************
514483 * EP93xx LEDs
515484 *************************************************************************/
516−static struct gpio_led ep93xx_led_pins[] = {
485+static const struct gpio_led ep93xx_led_pins[] __initconst = {
517486 {
518487 .name = "platform:grled",
519488 .gpio = EP93XX_GPIO_LINE_GRLED,
@@ -523,29 +492,16 @@ static struct gpio_led ep93xx_led_pins[] = { · 3 unmodified lines
523492 },
524493 };
525494
526−static struct gpio_led_platform_data ep93xx_led_data = {
495+static const struct gpio_led_platform_data ep93xx_led_data __initconst = {
527496 .num_leds = ARRAY_SIZE(ep93xx_led_pins),
528497 .leds = ep93xx_led_pins,
529498 };
530499
531−static struct platform_device ep93xx_leds = {
532− .name = "leds-gpio",
533− .id = -1,
534− .dev = {
535− .platform_data = &ep93xx_led_data,
536− },
537−};
538−
539−
540500 /*************************************************************************
541501 * EP93xx pwm peripheral handling
542502 *************************************************************************/
543503 static struct resource ep93xx_pwm0_resource[] = {
544− {
545− .start = EP93XX_PWM_PHYS_BASE,
546− .end = EP93XX_PWM_PHYS_BASE + 0x10 - 1,
547− .flags = IORESOURCE_MEM,
548− },
504+ DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE, 0x10),
549505 };
550506
551507 static struct platform_device ep93xx_pwm0_device = {
@@ -556,11 +512,7 @@ static struct platform_device ep93xx_pwm0_device = { · 4 unmodified lines
556512 };
557513
558514 static struct resource ep93xx_pwm1_resource[] = {
559− {
560− .start = EP93XX_PWM_PHYS_BASE + 0x20,
561− .end = EP93XX_PWM_PHYS_BASE + 0x30 - 1,
562− .flags = IORESOURCE_MEM,
563− },
515+ DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE + 0x20, 0x10),
564516 };
565517
566518 static struct platform_device ep93xx_pwm1_device = {
@@ -628,11 +580,7 @@ EXPORT_SYMBOL(ep93xx_pwm_release_gpio); · 61 unmodified lines
628580 static struct ep93xxfb_mach_info ep93xxfb_data;
629581
630582 static struct resource ep93xx_fb_resource[] = {
631− {
632− .start = EP93XX_RASTER_PHYS_BASE,
633− .end = EP93XX_RASTER_PHYS_BASE + 0x800 - 1,
634− .flags = IORESOURCE_MEM,
635− },
583+ DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE, 0x800),
636584 };
637585
638586 static struct platform_device ep93xx_fb_device = {
@@ -680,15 +628,8 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) · 41 unmodified lines
680628 static struct ep93xx_keypad_platform_data ep93xx_keypad_data;
681629
682630 static struct resource ep93xx_keypad_resource[] = {
683− {
684− .start = EP93XX_KEY_MATRIX_PHYS_BASE,
685− .end = EP93XX_KEY_MATRIX_PHYS_BASE + 0x0c - 1,
686− .flags = IORESOURCE_MEM,
687− }, {
688− .start = IRQ_EP93XX_KEY,
689− .end = IRQ_EP93XX_KEY,
690− .flags = IORESOURCE_IRQ,
691− },
631+ DEFINE_RES_MEM(EP93XX_KEY_MATRIX_PHYS_BASE, 0x0c),
632+ DEFINE_RES_IRQ(IRQ_EP93XX_KEY),
692633 };
693634
694635 static struct platform_device ep93xx_keypad_device = {
@@ -761,11 +702,7 @@ EXPORT_SYMBOL(ep93xx_keypad_release_gpio); · 66 unmodified lines
761702 * EP93xx I2S audio peripheral handling
762703 *************************************************************************/
763704 static struct resource ep93xx_i2s_resource[] = {
764− {
765− .start = EP93XX_I2S_PHYS_BASE,
766− .end = EP93XX_I2S_PHYS_BASE + 0x100 - 1,
767− .flags = IORESOURCE_MEM,
768− },
705+ DEFINE_RES_MEM(EP93XX_I2S_PHYS_BASE, 0x100),
769706 };
770707
771708 static struct platform_device ep93xx_i2s_device = {
@@ -824,16 +761,8 @@ EXPORT_SYMBOL(ep93xx_i2s_release); · 52 unmodified lines
824761 * EP93xx AC97 audio peripheral handling
825762 *************************************************************************/
826763 static struct resource ep93xx_ac97_resources[] = {
827− {
828− .start = EP93XX_AAC_PHYS_BASE,
829− .end = EP93XX_AAC_PHYS_BASE + 0xac - 1,
830− .flags = IORESOURCE_MEM,
831− },
832− {
833− .start = IRQ_EP93XX_AACINTR,
834− .end = IRQ_EP93XX_AACINTR,
835− .flags = IORESOURCE_IRQ,
836− },
764+ DEFINE_RES_MEM(EP93XX_AAC_PHYS_BASE, 0xac),
765+ DEFINE_RES_IRQ(IRQ_EP93XX_AACINTR),
837766 };
838767
839768 static struct platform_device ep93xx_ac97_device = {
@@ -889,8 +818,9 @@ void __init ep93xx_init_devices(void) · 49 unmodified lines
889818
890819 platform_device_register(&ep93xx_rtc_device);
891820 platform_device_register(&ep93xx_ohci_device);
892− platform_device_register(&ep93xx_leds);
893821 platform_device_register(&ep93xx_wdt_device);
822+
823+ gpio_led_register_device(-1, &ep93xx_led_data);
894824 }
895825
896826 void ep93xx_restart(char mode, const char *cmd)
arch/arm/mach-exynos/cpuidle.c+6−47
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 #include <asm/smp_scu.h>
2121 #include <asm/suspend.h>
2222 #include <asm/unified.h>
23+#include <asm/cpuidle.h>
2324 #include <mach/regs-pmu.h>
2425 #include <mach/pmu.h>
2526
@@ -34,22 +35,12 @@ · 8 unmodified lines
3435
3536 #define S5P_CHECK_AFTR 0xFCBA0D10
3637
37−static int exynos4_enter_idle(struct cpuidle_device *dev,
38− struct cpuidle_driver *drv,
39− int index);
4038 static int exynos4_enter_lowpower(struct cpuidle_device *dev,
4139 struct cpuidle_driver *drv,
4240 int index);
4341
4442 static struct cpuidle_state exynos4_cpuidle_set[] __initdata = {
45− [0] = {
46− .enter = exynos4_enter_idle,
47− .exit_latency = 1,
48− .target_residency = 100000,
49− .flags = CPUIDLE_FLAG_TIME_VALID,
50− .name = "C0",
51− .desc = "ARM clock gating(WFI)",
52− },
43+ [0] = ARM_CPUIDLE_WFI_STATE,
5344 [1] = {
5445 .enter = exynos4_enter_lowpower,
5546 .exit_latency = 300,
@@ -63,8 +54,9 @@ static struct cpuidle_state exynos4_cpuidle_set[] __initdata = { · 7 unmodified lines
6354 static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
6455
6556 static struct cpuidle_driver exynos4_idle_driver = {
66− .name = "exynos4_idle",
67− .owner = THIS_MODULE,
57+ .name = "exynos4_idle",
58+ .owner = THIS_MODULE,
59+ .en_core_tk_irqen = 1,
6860 };
6961
7062 /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
@@ -103,13 +95,8 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev, · 32 unmodified lines
10395 struct cpuidle_driver *drv,
10496 int index)
10597 {
106− struct timeval before, after;
107− int idle_time;
10898 unsigned long tmp;
10999
110− local_irq_disable();
111− do_gettimeofday(&before);
112−
113100 exynos4_set_wakeupmask();
114101
115102 /* Set value of power down register for aftr mode */
@@ -150,34 +137,6 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev, · 34 unmodified lines
150137 /* Clear wakeup state register */
151138 __raw_writel(0x0, S5P_WAKEUP_STAT);
152139
153− do_gettimeofday(&after);
154−
155− local_irq_enable();
156− idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
157− (after.tv_usec - before.tv_usec);
158−
159− dev->last_residency = idle_time;
160− return index;
161−}
162−
163−static int exynos4_enter_idle(struct cpuidle_device *dev,
164− struct cpuidle_driver *drv,
165− int index)
166−{
167− struct timeval before, after;
168− int idle_time;
169−
170− local_irq_disable();
171− do_gettimeofday(&before);
172−
173− cpu_do_idle();
174−
175− do_gettimeofday(&after);
176− local_irq_enable();
177− idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
178− (after.tv_usec - before.tv_usec);
179−
180− dev->last_residency = idle_time;
181140 return index;
182141 }
183142
@@ -192,7 +151,7 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev, · 8 unmodified lines
192151 new_index = drv->safe_state_index;
193152
194153 if (new_index == 0)
195− return exynos4_enter_idle(dev, drv, new_index);
154+ return arm_cpuidle_simple_enter(dev, drv, new_index);
196155 else
197156 return exynos4_enter_core0_aftr(dev, drv, new_index);
198157 }
arch/arm/mach-exynos/dev-ahci.c+2−10
@@ -236,16 +236,8 @@ static struct ahci_platform_data exynos4_ahci_pdata = { · 235 unmodified lines
236236 };
237237
238238 static struct resource exynos4_ahci_resource[] = {
239− [0] = {
240− .start = EXYNOS4_PA_SATA,
241− .end = EXYNOS4_PA_SATA + SZ_64K - 1,
242− .flags = IORESOURCE_MEM,
243− },
244− [1] = {
245− .start = EXYNOS4_IRQ_SATA,
246− .end = EXYNOS4_IRQ_SATA,
247− .flags = IORESOURCE_IRQ,
248− },
239+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_SATA, SZ_64K),
240+ [1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_SATA),
249241 };
250242
251243 static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32);
arch/arm/mach-exynos/dev-audio.c+26−130
@@ -62,26 +62,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { · 61 unmodified lines
6262 };
6363
6464 static struct resource exynos4_i2s0_resource[] = {
65− [0] = {
66− .start = EXYNOS4_PA_I2S0,
67− .end = EXYNOS4_PA_I2S0 + 0x100 - 1,
68− .flags = IORESOURCE_MEM,
69− },
70− [1] = {
71− .start = DMACH_I2S0_TX,
72− .end = DMACH_I2S0_TX,
73− .flags = IORESOURCE_DMA,
74− },
75− [2] = {
76− .start = DMACH_I2S0_RX,
77− .end = DMACH_I2S0_RX,
78− .flags = IORESOURCE_DMA,
79− },
80− [3] = {
81− .start = DMACH_I2S0S_TX,
82− .end = DMACH_I2S0S_TX,
83− .flags = IORESOURCE_DMA,
84− },
65+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256),
66+ [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
67+ [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
68+ [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
8569 };
8670
8771 struct platform_device exynos4_device_i2s0 = {
@@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { · 22 unmodified lines
11094 };
11195
11296 static struct resource exynos4_i2s1_resource[] = {
113− [0] = {
114− .start = EXYNOS4_PA_I2S1,
115− .end = EXYNOS4_PA_I2S1 + 0x100 - 1,
116− .flags = IORESOURCE_MEM,
117− },
118− [1] = {
119− .start = DMACH_I2S1_TX,
120− .end = DMACH_I2S1_TX,
121− .flags = IORESOURCE_DMA,
122− },
123− [2] = {
124− .start = DMACH_I2S1_RX,
125− .end = DMACH_I2S1_RX,
126− .flags = IORESOURCE_DMA,
127− },
97+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256),
98+ [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
99+ [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
128100 };
129101
130102 struct platform_device exynos4_device_i2s1 = {
@@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = { · 7 unmodified lines
138110 };
139111
140112 static struct resource exynos4_i2s2_resource[] = {
141− [0] = {
142− .start = EXYNOS4_PA_I2S2,
143− .end = EXYNOS4_PA_I2S2 + 0x100 - 1,
144− .flags = IORESOURCE_MEM,
145− },
146− [1] = {
147− .start = DMACH_I2S2_TX,
148− .end = DMACH_I2S2_TX,
149− .flags = IORESOURCE_DMA,
150− },
151− [2] = {
152− .start = DMACH_I2S2_RX,
153− .end = DMACH_I2S2_RX,
154− .flags = IORESOURCE_DMA,
155− },
113+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256),
114+ [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
115+ [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
156116 };
157117
158118 struct platform_device exynos4_device_i2s2 = {
@@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { · 33 unmodified lines
192152 };
193153
194154 static struct resource exynos4_pcm0_resource[] = {
195− [0] = {
196− .start = EXYNOS4_PA_PCM0,
197− .end = EXYNOS4_PA_PCM0 + 0x100 - 1,
198− .flags = IORESOURCE_MEM,
199− },
200− [1] = {
201− .start = DMACH_PCM0_TX,
202− .end = DMACH_PCM0_TX,
203− .flags = IORESOURCE_DMA,
204− },
205− [2] = {
206− .start = DMACH_PCM0_RX,
207− .end = DMACH_PCM0_RX,
208− .flags = IORESOURCE_DMA,
209− },
155+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256),
156+ [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
157+ [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
210158 };
211159
212160 struct platform_device exynos4_device_pcm0 = {
@@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = { · 7 unmodified lines
220168 };
221169
222170 static struct resource exynos4_pcm1_resource[] = {
223− [0] = {
224− .start = EXYNOS4_PA_PCM1,
225− .end = EXYNOS4_PA_PCM1 + 0x100 - 1,
226− .flags = IORESOURCE_MEM,
227− },
228− [1] = {
229− .start = DMACH_PCM1_TX,
230− .end = DMACH_PCM1_TX,
231− .flags = IORESOURCE_DMA,
232− },
233− [2] = {
234− .start = DMACH_PCM1_RX,
235− .end = DMACH_PCM1_RX,
236− .flags = IORESOURCE_DMA,
237− },
171+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256),
172+ [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
173+ [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
238174 };
239175
240176 struct platform_device exynos4_device_pcm1 = {
@@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = { · 7 unmodified lines
248184 };
249185
250186 static struct resource exynos4_pcm2_resource[] = {
251− [0] = {
252− .start = EXYNOS4_PA_PCM2,
253− .end = EXYNOS4_PA_PCM2 + 0x100 - 1,
254− .flags = IORESOURCE_MEM,
255− },
256− [1] = {
257− .start = DMACH_PCM2_TX,
258− .end = DMACH_PCM2_TX,
259− .flags = IORESOURCE_DMA,
260− },
261− [2] = {
262− .start = DMACH_PCM2_RX,
263− .end = DMACH_PCM2_RX,
264− .flags = IORESOURCE_DMA,
265− },
187+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256),
188+ [1] = DEFINE_RES_DMA(DMACH_PCM2_TX),
189+ [2] = DEFINE_RES_DMA(DMACH_PCM2_RX),
266190 };
267191
268192 struct platform_device exynos4_device_pcm2 = {
@@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev) · 14 unmodified lines
283207 }
284208
285209 static struct resource exynos4_ac97_resource[] = {
286− [0] = {
287− .start = EXYNOS4_PA_AC97,
288− .end = EXYNOS4_PA_AC97 + 0x100 - 1,
289− .flags = IORESOURCE_MEM,
290− },
291− [1] = {
292− .start = DMACH_AC97_PCMOUT,
293− .end = DMACH_AC97_PCMOUT,
294− .flags = IORESOURCE_DMA,
295− },
296− [2] = {
297− .start = DMACH_AC97_PCMIN,
298− .end = DMACH_AC97_PCMIN,
299− .flags = IORESOURCE_DMA,
300− },
301− [3] = {
302− .start = DMACH_AC97_MICIN,
303− .end = DMACH_AC97_MICIN,
304− .flags = IORESOURCE_DMA,
305− },
306− [4] = {
307− .start = EXYNOS4_IRQ_AC97,
308− .end = EXYNOS4_IRQ_AC97,
309− .flags = IORESOURCE_IRQ,
310− },
210+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256),
211+ [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
212+ [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
213+ [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
214+ [4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97),
311215 };
312216
313217 static struct s3c_audio_pdata s3c_ac97_pdata = {
@@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) · 24 unmodified lines
338242 }
339243
340244 static struct resource exynos4_spdif_resource[] = {
341− [0] = {
342− .start = EXYNOS4_PA_SPDIF,
343− .end = EXYNOS4_PA_SPDIF + 0x100 - 1,
344− .flags = IORESOURCE_MEM,
345− },
346− [1] = {
347− .start = DMACH_SPDIF,
348− .end = DMACH_SPDIF,
349− .flags = IORESOURCE_DMA,
350− },
245+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256),
246+ [1] = DEFINE_RES_DMA(DMACH_SPDIF),
351247 };
352248
353249 static struct s3c_audio_pdata samsung_spdif_pdata = {
arch/arm/mach-exynos/mach-armlex4210.c+3−13
@@ -77,7 +77,6 @@ static struct s3c2410_uartcfg armlex4210_uartcfgs[] __initdata = { · 76 unmodified lines
7777
7878 static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {
7979 .cd_type = S3C_SDHCI_CD_PERMANENT,
80− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
8180 #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
8281 .max_width = 8,
8382 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -88,13 +87,11 @@ static struct s3c_sdhci_platdata armlex4210_hsmmc2_pdata __initdata = { · 4 unmodified lines
8887 .cd_type = S3C_SDHCI_CD_GPIO,
8988 .ext_cd_gpio = EXYNOS4_GPX2(5),
9089 .ext_cd_gpio_invert = 1,
91− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
9290 .max_width = 4,
9391 };
9492
9593 static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {
9694 .cd_type = S3C_SDHCI_CD_PERMANENT,
97− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
9895 .max_width = 4,
9996 };
10097
@@ -121,16 +118,9 @@ static void __init armlex4210_wlan_init(void) · 20 unmodified lines
121118 }
122119
123120 static struct resource armlex4210_smsc911x_resources[] = {
124− [0] = {
125− .start = EXYNOS4_PA_SROM_BANK(3),
126− .end = EXYNOS4_PA_SROM_BANK(3) + SZ_64K - 1,
127− .flags = IORESOURCE_MEM,
128− },
129− [1] = {
130− .start = IRQ_EINT(27),
131− .end = IRQ_EINT(27),
132− .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
133− },
121+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(3), SZ_64K),
122+ [1] = DEFINE_RES_NAMED(IRQ_EINT(27), 1, NULL, IORESOURCE_IRQ \
123+ | IRQF_TRIGGER_HIGH),
134124 };
135125
136126 static struct smsc911x_platform_config smsc9215_config = {
arch/arm/mach-exynos/mach-nuri.c+0−3
@@ -114,7 +114,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = { · 113 unmodified lines
114114 MMC_CAP_ERASE),
115115 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
116116 .cd_type = S3C_SDHCI_CD_PERMANENT,
117− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
118117 };
119118
120119 static struct regulator_consumer_supply emmc_supplies[] = {
@@ -155,7 +154,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = { · 34 unmodified lines
155154 .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */
156155 .ext_cd_gpio_invert = 1,
157156 .cd_type = S3C_SDHCI_CD_GPIO,
158− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
159157 };
160158
161159 /* WLAN */
@@ -164,7 +162,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = { · 2 unmodified lines
164162 .host_caps = MMC_CAP_4_BIT_DATA |
165163 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
166164 .cd_type = S3C_SDHCI_CD_EXTERNAL,
167− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
168165 };
169166
170167 static void __init nuri_sdhci_init(void)
arch/arm/mach-exynos/mach-origen.c+0−2
@@ -472,12 +472,10 @@ static struct i2c_board_info i2c0_devs[] __initdata = { · 471 unmodified lines
472472
473473 static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
474474 .cd_type = S3C_SDHCI_CD_INTERNAL,
475− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
476475 };
477476
478477 static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
479478 .cd_type = S3C_SDHCI_CD_INTERNAL,
480− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
481479 };
482480
483481 /* USB EHCI */
arch/arm/mach-exynos/mach-smdk4x12.c+0−2
@@ -85,7 +85,6 @@ static struct s3c2410_uartcfg smdk4x12_uartcfgs[] __initdata = { · 84 unmodified lines
8585
8686 static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {
8787 .cd_type = S3C_SDHCI_CD_INTERNAL,
88− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
8988 #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
9089 .max_width = 8,
9190 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -94,7 +93,6 @@ static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = { · 2 unmodified lines
9493
9594 static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = {
9695 .cd_type = S3C_SDHCI_CD_INTERNAL,
97− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
9896 };
9997
10098 static struct regulator_consumer_supply max8997_buck1 =
arch/arm/mach-exynos/mach-smdkv310.c+3−14
@@ -93,7 +93,6 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = { · 92 unmodified lines
9393
9494 static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
9595 .cd_type = S3C_SDHCI_CD_INTERNAL,
96− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
9796 #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
9897 .max_width = 8,
9998 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -104,12 +103,10 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = { · 4 unmodified lines
104103 .cd_type = S3C_SDHCI_CD_GPIO,
105104 .ext_cd_gpio = EXYNOS4_GPK0(2),
106105 .ext_cd_gpio_invert = 1,
107− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
108106 };
109107
110108 static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
111109 .cd_type = S3C_SDHCI_CD_INTERNAL,
112− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
113110 #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
114111 .max_width = 8,
115112 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -120,7 +117,6 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = { · 4 unmodified lines
120117 .cd_type = S3C_SDHCI_CD_GPIO,
121118 .ext_cd_gpio = EXYNOS4_GPK2(2),
122119 .ext_cd_gpio_invert = 1,
123− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
124120 };
125121
126122 static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
@@ -183,16 +179,9 @@ static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = { · 56 unmodified lines
183179 };
184180
185181 static struct resource smdkv310_smsc911x_resources[] = {
186− [0] = {
187− .start = EXYNOS4_PA_SROM_BANK(1),
188− .end = EXYNOS4_PA_SROM_BANK(1) + SZ_64K - 1,
189− .flags = IORESOURCE_MEM,
190− },
191− [1] = {
192− .start = IRQ_EINT(5),
193− .end = IRQ_EINT(5),
194− .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
195− },
182+ [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(1), SZ_64K),
183+ [1] = DEFINE_RES_NAMED(IRQ_EINT(5), 1, NULL, IORESOURCE_IRQ \
184+ | IRQF_TRIGGER_LOW),
196185 };
197186
198187 static struct smsc911x_platform_config smsc9215_config = {
arch/arm/mach-exynos/mach-universal_c210.c+0−2
@@ -750,7 +750,6 @@ static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = { · 749 unmodified lines
750750 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
751751 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
752752 .cd_type = S3C_SDHCI_CD_PERMANENT,
753− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
754753 };
755754
756755 static struct regulator_consumer_supply mmc0_supplies[] = {
@@ -790,7 +789,6 @@ static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = { · 33 unmodified lines
790789 .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */
791790 .ext_cd_gpio_invert = 1,
792791 .cd_type = S3C_SDHCI_CD_GPIO,
793− .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
794792 };
795793
796794 /* WiFi */
arch/arm/mach-imx/Kconfig+2−0
@@ -571,8 +571,10 @@ config MACH_MX35_3DS · 570 unmodified lines
571571 select MXC_DEBUG_BOARD
572572 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
573573 select IMX_HAVE_PLATFORM_IMX2_WDT
574+ select IMX_HAVE_PLATFORM_IMX_FB
574575 select IMX_HAVE_PLATFORM_IMX_I2C
575576 select IMX_HAVE_PLATFORM_IMX_UART
577+ select IMX_HAVE_PLATFORM_IPU_CORE
576578 select IMX_HAVE_PLATFORM_MXC_EHCI
577579 select IMX_HAVE_PLATFORM_MXC_NAND
578580 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c+1−1
@@ -243,7 +243,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = { · 242 unmodified lines
243243 static void __maybe_unused ads7846_dev_init(void)
244244 {
245245 if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
246− printk(KERN_ERR "can't get ads746 pen down GPIO\n");
246+ printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
247247 return;
248248 }
249249 gpio_direction_input(ADS7846_PENDOWN);
arch/arm/mach-imx/mach-cpuimx35.c+1−1
@@ -194,7 +194,7 @@ static void __init eukrea_cpuimx35_timer_init(void) · 193 unmodified lines
194194 mx35_clocks_init();
195195 }
196196
197−struct sys_timer eukrea_cpuimx35_timer = {
197+static struct sys_timer eukrea_cpuimx35_timer = {
198198 .init = eukrea_cpuimx35_timer_init,
199199 };
200200
arch/arm/mach-imx/mach-mx1ads.c+1−1
@@ -134,7 +134,7 @@ static void __init mx1ads_timer_init(void) · 133 unmodified lines
134134 mx1_clocks_init(32000);
135135 }
136136
137−struct sys_timer mx1ads_timer = {
137+static struct sys_timer mx1ads_timer = {
138138 .init = mx1ads_timer_init,
139139 };
140140
arch/arm/mach-imx/mach-mx21ads.c+1−2
@@ -304,8 +304,7 @@ static void __init mx21ads_board_init(void) · 303 unmodified lines
304304 imx21_add_mxc_nand(&mx21ads_nand_board_info);
305305
306306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
307− platform_device_register_full(
308− (struct platform_device_info *)&mx21ads_cs8900_devinfo);
307+ platform_device_register_full(&mx21ads_cs8900_devinfo);
309308 }
310309
311310 static void __init mx21ads_timer_init(void)
arch/arm/mach-imx/mach-mx31lite.c+1−1
@@ -283,7 +283,7 @@ static void __init mx31lite_timer_init(void) · 282 unmodified lines
283283 mx31_clocks_init(26000000);
284284 }
285285
286−struct sys_timer mx31lite_timer = {
286+static struct sys_timer mx31lite_timer = {
287287 .init = mx31lite_timer_init,
288288 };
289289
arch/arm/mach-imx/mach-mx31moboard.c+1−1
@@ -580,7 +580,7 @@ static void __init mx31moboard_timer_init(void) · 579 unmodified lines
580580 mx31_clocks_init(26000000);
581581 }
582582
583−struct sys_timer mx31moboard_timer = {
583+static struct sys_timer mx31moboard_timer = {
584584 .init = mx31moboard_timer_init,
585585 };
586586
arch/arm/mach-imx/mach-mx35_3ds.c+1−1
@@ -419,7 +419,7 @@ static void __init mx35pdk_timer_init(void) · 418 unmodified lines
419419 mx35_clocks_init();
420420 }
421421
422−struct sys_timer mx35pdk_timer = {
422+static struct sys_timer mx35pdk_timer = {
423423 .init = mx35pdk_timer_init,
424424 };
425425
arch/arm/mach-imx/mach-mx51_efikamx.c+1−2
@@ -284,8 +284,7 @@ static struct sys_timer mx51_efikamx_timer = { · 283 unmodified lines
284284 .init = mx51_efikamx_timer_init,
285285 };
286286
287−MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
288− /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */
287+MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)")
289288 .atag_offset = 0x100,
290289 .map_io = mx51_map_io,
291290 .init_early = imx51_init_early,
arch/arm/mach-imx/mach-mx51_efikasb.c+1−1
@@ -280,7 +280,7 @@ static struct sys_timer mx51_efikasb_timer = { · 279 unmodified lines
280280 .init = mx51_efikasb_timer_init,
281281 };
282282
283−MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
283+MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)")
284284 .atag_offset = 0x100,
285285 .map_io = mx51_map_io,
286286 .init_early = imx51_init_early,
arch/arm/mach-imx/mach-pcm037.c+1−1
@@ -683,7 +683,7 @@ static void __init pcm037_timer_init(void) · 682 unmodified lines
683683 mx31_clocks_init(26000000);
684684 }
685685
686−struct sys_timer pcm037_timer = {
686+static struct sys_timer pcm037_timer = {
687687 .init = pcm037_timer_init,
688688 };
689689
arch/arm/mach-imx/mach-pcm043.c+1−1
@@ -399,7 +399,7 @@ static void __init pcm043_timer_init(void) · 398 unmodified lines
399399 mx35_clocks_init();
400400 }
401401
402−struct sys_timer pcm043_timer = {
402+static struct sys_timer pcm043_timer = {
403403 .init = pcm043_timer_init,
404404 };
405405
arch/arm/mach-imx/mach-vpr200.c+1−1
@@ -310,7 +310,7 @@ static void __init vpr200_timer_init(void) · 309 unmodified lines
310310 mx35_clocks_init();
311311 }
312312
313−struct sys_timer vpr200_timer = {
313+static struct sys_timer vpr200_timer = {
314314 .init = vpr200_timer_init,
315315 };
316316
arch/arm/mach-ixp2000/Kconfig+0−72
@@ -1,72 +0,0 @@
1−
2−if ARCH_IXP2000
3−
4−config ARCH_SUPPORTS_BIG_ENDIAN
5− bool
6− default y
7−
8−menu "Intel IXP2400/2800 Implementation Options"
9−
10−comment "IXP2400/2800 Platforms"
11−
12−config ARCH_ENP2611
13− bool "Support Radisys ENP-2611"
14− help
15− Say 'Y' here if you want your kernel to support the Radisys
16− ENP2611 PCI network processing card. For more information on
17− this card, see <file:Documentation/arm/IXP2000>.
18−
19−config ARCH_IXDP2400
20− bool "Support Intel IXDP2400"
21− help
22− Say 'Y' here if you want your kernel to support the Intel
23− IXDP2400 reference platform. For more information on
24− this platform, see <file:Documentation/arm/IXP2000>.
25−
26−config ARCH_IXDP2800
27− bool "Support Intel IXDP2800"
28− help
29− Say 'Y' here if you want your kernel to support the Intel
30− IXDP2800 reference platform. For more information on
31− this platform, see <file:Documentation/arm/IXP2000>.
32−
33−config ARCH_IXDP2X00
34− bool
35− depends on ARCH_IXDP2400 || ARCH_IXDP2800
36− default y
37−
38−config ARCH_IXDP2401
39− bool "Support Intel IXDP2401"
40− help
41− Say 'Y' here if you want your kernel to support the Intel
42− IXDP2401 reference platform. For more information on
43− this platform, see <file:Documentation/arm/IXP2000>.
44−
45−config ARCH_IXDP2801
46− bool "Support Intel IXDP2801 and IXDP28x5"
47− help
48− Say 'Y' here if you want your kernel to support the Intel
49− IXDP2801/2805/2855 reference platforms. For more information on
50− this platform, see <file:Documentation/arm/IXP2000>.
51−
52−config MACH_IXDP28X5
53− bool
54− depends on ARCH_IXDP2801
55− default y
56−
57−config ARCH_IXDP2X01
58− bool
59− depends on ARCH_IXDP2401 || ARCH_IXDP2801
60− default y
61−
62−config IXP2000_SUPPORT_BROKEN_PCI_IO
63− bool "Support broken PCI I/O on older IXP2000s"
64− default y
65− help
66− Say 'N' here if you only intend to run your kernel on an
67− IXP2000 B0 or later model and do not need the PCI I/O
68− byteswap workaround. Say 'Y' otherwise.
69−
70−endmenu
71−
72−endif
arch/arm/mach-ixp2000/Makefile+0−14
@@ -1,14 +0,0 @@
1−#
2−# Makefile for the linux kernel.
3−#
4−obj-y := core.o pci.o
5−obj-m :=
6−obj-n :=
7−obj- :=
8−
9−obj-$(CONFIG_ARCH_ENP2611) += enp2611.o
10−obj-$(CONFIG_ARCH_IXDP2400) += ixdp2400.o
11−obj-$(CONFIG_ARCH_IXDP2800) += ixdp2800.o
12−obj-$(CONFIG_ARCH_IXDP2X00) += ixdp2x00.o
13−obj-$(CONFIG_ARCH_IXDP2X01) += ixdp2x01.o
14−
arch/arm/mach-ixp2000/Makefile.boot+0−3
@@ -1,3 +0,0 @@
1− zreladdr-y += 0x00008000
2−params_phys-y := 0x00000100
3−
arch/arm/mach-ixp2000/core.c+0−520
@@ -1,520 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/core.c
3− *
4− * Common routines used by all IXP2400/2800 based platforms.
5− *
6− * Author: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2004 (C) MontaVista Software, Inc.
9− *
10− * Based on work Copyright (C) 2002-2003 Intel Corporation
11− *
12− * This file is licensed under the terms of the GNU General Public
13− * License version 2. This program is licensed "as is" without any
14− * warranty of any kind, whether express or implied.
15− */
16−#include <linux/gpio.h>
17−#include <linux/kernel.h>
18−#include <linux/init.h>
19−#include <linux/spinlock.h>
20−#include <linux/sched.h>
21−#include <linux/interrupt.h>
22−#include <linux/irq.h>
23−#include <linux/serial.h>
24−#include <linux/tty.h>
25−#include <linux/bitops.h>
26−#include <linux/serial_8250.h>
27−#include <linux/mm.h>
28−#include <linux/export.h>
29−
30−#include <asm/types.h>
31−#include <asm/setup.h>
32−#include <asm/memory.h>
33−#include <mach/hardware.h>
34−#include <asm/irq.h>
35−#include <asm/tlbflush.h>
36−#include <asm/pgtable.h>
37−
38−#include <asm/mach/map.h>
39−#include <asm/mach/time.h>
40−#include <asm/mach/irq.h>
41−
42−#include <mach/gpio-ixp2000.h>
43−
44−static DEFINE_SPINLOCK(ixp2000_slowport_lock);
45−static unsigned long ixp2000_slowport_irq_flags;
46−
47−/*************************************************************************
48− * Slowport access routines
49− *************************************************************************/
50−void ixp2000_acquire_slowport(struct slowport_cfg *new_cfg, struct slowport_cfg *old_cfg)
51−{
52− spin_lock_irqsave(&ixp2000_slowport_lock, ixp2000_slowport_irq_flags);
53−
54− old_cfg->CCR = *IXP2000_SLOWPORT_CCR;
55− old_cfg->WTC = *IXP2000_SLOWPORT_WTC2;
56− old_cfg->RTC = *IXP2000_SLOWPORT_RTC2;
57− old_cfg->PCR = *IXP2000_SLOWPORT_PCR;
58− old_cfg->ADC = *IXP2000_SLOWPORT_ADC;
59−
60− ixp2000_reg_write(IXP2000_SLOWPORT_CCR, new_cfg->CCR);
61− ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, new_cfg->WTC);
62− ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, new_cfg->RTC);
63− ixp2000_reg_write(IXP2000_SLOWPORT_PCR, new_cfg->PCR);
64− ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, new_cfg->ADC);
65−}
66−
67−void ixp2000_release_slowport(struct slowport_cfg *old_cfg)
68−{
69− ixp2000_reg_write(IXP2000_SLOWPORT_CCR, old_cfg->CCR);
70− ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, old_cfg->WTC);
71− ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, old_cfg->RTC);
72− ixp2000_reg_write(IXP2000_SLOWPORT_PCR, old_cfg->PCR);
73− ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, old_cfg->ADC);
74−
75− spin_unlock_irqrestore(&ixp2000_slowport_lock,
76− ixp2000_slowport_irq_flags);
77−}
78−
79−/*************************************************************************
80− * Chip specific mappings shared by all IXP2000 systems
81− *************************************************************************/
82−static struct map_desc ixp2000_io_desc[] __initdata = {
83− {
84− .virtual = IXP2000_CAP_VIRT_BASE,
85− .pfn = __phys_to_pfn(IXP2000_CAP_PHYS_BASE),
86− .length = IXP2000_CAP_SIZE,
87− .type = MT_DEVICE,
88− }, {
89− .virtual = IXP2000_INTCTL_VIRT_BASE,
90− .pfn = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE),
91− .length = IXP2000_INTCTL_SIZE,
92− .type = MT_DEVICE,
93− }, {
94− .virtual = IXP2000_PCI_CREG_VIRT_BASE,
95− .pfn = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE),
96− .length = IXP2000_PCI_CREG_SIZE,
97− .type = MT_DEVICE,
98− }, {
99− .virtual = IXP2000_PCI_CSR_VIRT_BASE,
100− .pfn = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE),
101− .length = IXP2000_PCI_CSR_SIZE,
102− .type = MT_DEVICE,
103− }, {
104− .virtual = IXP2000_MSF_VIRT_BASE,
105− .pfn = __phys_to_pfn(IXP2000_MSF_PHYS_BASE),
106− .length = IXP2000_MSF_SIZE,
107− .type = MT_DEVICE,
108− }, {
109− .virtual = IXP2000_SCRATCH_RING_VIRT_BASE,
110− .pfn = __phys_to_pfn(IXP2000_SCRATCH_RING_PHYS_BASE),
111− .length = IXP2000_SCRATCH_RING_SIZE,
112− .type = MT_DEVICE,
113− }, {
114− .virtual = IXP2000_SRAM0_VIRT_BASE,
115− .pfn = __phys_to_pfn(IXP2000_SRAM0_PHYS_BASE),
116− .length = IXP2000_SRAM0_SIZE,
117− .type = MT_DEVICE,
118− }, {
119− .virtual = IXP2000_PCI_IO_VIRT_BASE,
120− .pfn = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE),
121− .length = IXP2000_PCI_IO_SIZE,
122− .type = MT_DEVICE,
123− }, {
124− .virtual = IXP2000_PCI_CFG0_VIRT_BASE,
125− .pfn = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE),
126− .length = IXP2000_PCI_CFG0_SIZE,
127− .type = MT_DEVICE,
128− }, {
129− .virtual = IXP2000_PCI_CFG1_VIRT_BASE,
130− .pfn = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE),
131− .length = IXP2000_PCI_CFG1_SIZE,
132− .type = MT_DEVICE,
133− }
134−};
135−
136−void __init ixp2000_map_io(void)
137−{
138− iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
139−
140− /* Set slowport to 8-bit mode. */
141− ixp2000_reg_wrb(IXP2000_SLOWPORT_FRM, 1);
142−}
143−
144−
145−/*************************************************************************
146− * Serial port support for IXP2000
147− *************************************************************************/
148−static struct plat_serial8250_port ixp2000_serial_port[] = {
149− {
150− .mapbase = IXP2000_UART_PHYS_BASE,
151− .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
152− .irq = IRQ_IXP2000_UART,
153− .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
154− .iotype = UPIO_MEM,
155− .regshift = 2,
156− .uartclk = 50000000,
157− },
158− { },
159−};
160−
161−static struct resource ixp2000_uart_resource = {
162− .start = IXP2000_UART_PHYS_BASE,
163− .end = IXP2000_UART_PHYS_BASE + 0x1f,
164− .flags = IORESOURCE_MEM,
165−};
166−
167−static struct platform_device ixp2000_serial_device = {
168− .name = "serial8250",
169− .id = PLAT8250_DEV_PLATFORM,
170− .dev = {
171− .platform_data = ixp2000_serial_port,
172− },
173− .num_resources = 1,
174− .resource = &ixp2000_uart_resource,
175−};
176−
177−void __init ixp2000_uart_init(void)
178−{
179− platform_device_register(&ixp2000_serial_device);
180−}
181−
182−
183−/*************************************************************************
184− * Timer-tick functions for IXP2000
185− *************************************************************************/
186−static unsigned ticks_per_jiffy;
187−static unsigned ticks_per_usec;
188−static unsigned next_jiffy_time;
189−static volatile unsigned long *missing_jiffy_timer_csr;
190−
191−unsigned long ixp2000_gettimeoffset (void)
192−{
193− unsigned long offset;
194−
195− offset = next_jiffy_time - *missing_jiffy_timer_csr;
196−
197− return offset / ticks_per_usec;
198−}
199−
200−static irqreturn_t ixp2000_timer_interrupt(int irq, void *dev_id)
201−{
202− /* clear timer 1 */
203− ixp2000_reg_wrb(IXP2000_T1_CLR, 1);
204−
205− while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr)
206− >= ticks_per_jiffy) {
207− timer_tick();
208− next_jiffy_time -= ticks_per_jiffy;
209− }
210−
211− return IRQ_HANDLED;
212−}
213−
214−static struct irqaction ixp2000_timer_irq = {
215− .name = "IXP2000 Timer Tick",
216− .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
217− .handler = ixp2000_timer_interrupt,
218−};
219−
220−void __init ixp2000_init_time(unsigned long tick_rate)
221−{
222− ticks_per_jiffy = (tick_rate + HZ/2) / HZ;
223− ticks_per_usec = tick_rate / 1000000;
224−
225− /*
226− * We use timer 1 as our timer interrupt.
227− */
228− ixp2000_reg_write(IXP2000_T1_CLR, 0);
229− ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy - 1);
230− ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7));
231−
232− /*
233− * We use a second timer as a monotonic counter for tracking
234− * missed jiffies. The IXP2000 has four timers, but if we're
235− * on an A-step IXP2800, timer 2 and 3 don't work, so on those
236− * chips we use timer 4. Timer 4 is the only timer that can
237− * be used for the watchdog, so we use timer 2 if we're on a
238− * non-buggy chip.
239− */
240− if ((*IXP2000_PRODUCT_ID & 0x001ffef0) == 0x00000000) {
241− printk(KERN_INFO "Enabling IXP2800 erratum #25 workaround\n");
242−
243− ixp2000_reg_write(IXP2000_T4_CLR, 0);
244− ixp2000_reg_write(IXP2000_T4_CLD, -1);
245− ixp2000_reg_wrb(IXP2000_T4_CTL, (1 << 7));
246− missing_jiffy_timer_csr = IXP2000_T4_CSR;
247− } else {
248− ixp2000_reg_write(IXP2000_T2_CLR, 0);
249− ixp2000_reg_write(IXP2000_T2_CLD, -1);
250− ixp2000_reg_wrb(IXP2000_T2_CTL, (1 << 7));
251− missing_jiffy_timer_csr = IXP2000_T2_CSR;
252− }
253− next_jiffy_time = 0xffffffff;
254−
255− /* register for interrupt */
256− setup_irq(IRQ_IXP2000_TIMER1, &ixp2000_timer_irq);
257−}
258−
259−/*************************************************************************
260− * GPIO helpers
261− *************************************************************************/
262−static unsigned long GPIO_IRQ_falling_edge;
263−static unsigned long GPIO_IRQ_rising_edge;
264−static unsigned long GPIO_IRQ_level_low;
265−static unsigned long GPIO_IRQ_level_high;
266−
267−static void update_gpio_int_csrs(void)
268−{
269− ixp2000_reg_write(IXP2000_GPIO_FEDR, GPIO_IRQ_falling_edge);
270− ixp2000_reg_write(IXP2000_GPIO_REDR, GPIO_IRQ_rising_edge);
271− ixp2000_reg_write(IXP2000_GPIO_LSLR, GPIO_IRQ_level_low);
272− ixp2000_reg_wrb(IXP2000_GPIO_LSHR, GPIO_IRQ_level_high);
273−}
274−
275−void gpio_line_config(int line, int direction)
276−{
277− unsigned long flags;
278−
279− local_irq_save(flags);
280− if (direction == GPIO_OUT) {
281− /* if it's an output, it ain't an interrupt anymore */
282− GPIO_IRQ_falling_edge &= ~(1 << line);
283− GPIO_IRQ_rising_edge &= ~(1 << line);
284− GPIO_IRQ_level_low &= ~(1 << line);
285− GPIO_IRQ_level_high &= ~(1 << line);
286− update_gpio_int_csrs();
287−
288− ixp2000_reg_wrb(IXP2000_GPIO_PDSR, 1 << line);
289− } else if (direction == GPIO_IN) {
290− ixp2000_reg_wrb(IXP2000_GPIO_PDCR, 1 << line);
291− }
292− local_irq_restore(flags);
293−}
294−EXPORT_SYMBOL(gpio_line_config);
295−
296−
297−/*************************************************************************
298− * IRQ handling IXP2000
299− *************************************************************************/
300−static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc)
301−{
302− int i;
303− unsigned long status = *IXP2000_GPIO_INST;
304−
305− for (i = 0; i <= 7; i++) {
306− if (status & (1<<i)) {
307− generic_handle_irq(i + IRQ_IXP2000_GPIO0);
308− }
309− }
310−}
311−
312−static int ixp2000_GPIO_irq_type(struct irq_data *d, unsigned int type)
313−{
314− int line = d->irq - IRQ_IXP2000_GPIO0;
315−
316− /*
317− * First, configure this GPIO line as an input.
318− */
319− ixp2000_reg_write(IXP2000_GPIO_PDCR, 1 << line);
320−
321− /*
322− * Then, set the proper trigger type.
323− */
324− if (type & IRQ_TYPE_EDGE_FALLING)
325− GPIO_IRQ_falling_edge |= 1 << line;
326− else
327− GPIO_IRQ_falling_edge &= ~(1 << line);
328− if (type & IRQ_TYPE_EDGE_RISING)
329− GPIO_IRQ_rising_edge |= 1 << line;
330− else
331− GPIO_IRQ_rising_edge &= ~(1 << line);
332− if (type & IRQ_TYPE_LEVEL_LOW)
333− GPIO_IRQ_level_low |= 1 << line;
334− else
335− GPIO_IRQ_level_low &= ~(1 << line);
336− if (type & IRQ_TYPE_LEVEL_HIGH)
337− GPIO_IRQ_level_high |= 1 << line;
338− else
339− GPIO_IRQ_level_high &= ~(1 << line);
340− update_gpio_int_csrs();
341−
342− return 0;
343−}
344−
345−static void ixp2000_GPIO_irq_mask_ack(struct irq_data *d)
346−{
347− unsigned int irq = d->irq;
348−
349− ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0)));
350−
351− ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
352− ixp2000_reg_write(IXP2000_GPIO_LDSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
353− ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0)));
354−}
355−
356−static void ixp2000_GPIO_irq_mask(struct irq_data *d)
357−{
358− unsigned int irq = d->irq;
359−
360− ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0)));
361−}
362−
363−static void ixp2000_GPIO_irq_unmask(struct irq_data *d)
364−{
365− unsigned int irq = d->irq;
366−
367− ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
368−}
369−
370−static struct irq_chip ixp2000_GPIO_irq_chip = {
371− .irq_ack = ixp2000_GPIO_irq_mask_ack,
372− .irq_mask = ixp2000_GPIO_irq_mask,
373− .irq_unmask = ixp2000_GPIO_irq_unmask,
374− .irq_set_type = ixp2000_GPIO_irq_type,
375−};
376−
377−static void ixp2000_pci_irq_mask(struct irq_data *d)
378−{
379− unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE;
380− if (d->irq == IRQ_IXP2000_PCIA)
381− ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26)));
382− else if (d->irq == IRQ_IXP2000_PCIB)
383− ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27)));
384−}
385−
386−static void ixp2000_pci_irq_unmask(struct irq_data *d)
387−{
388− unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE;
389− if (d->irq == IRQ_IXP2000_PCIA)
390− ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26)));
391− else if (d->irq == IRQ_IXP2000_PCIB)
392− ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27)));
393−}
394−
395−/*
396− * Error interrupts. These are used extensively by the microengine drivers
397− */
398−static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc)
399−{
400− int i;
401− unsigned long status = *IXP2000_IRQ_ERR_STATUS;
402−
403− for(i = 31; i >= 0; i--) {
404− if(status & (1 << i)) {
405− generic_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i);
406− }
407− }
408−}
409−
410−static void ixp2000_err_irq_mask(struct irq_data *d)
411−{
412− ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR,
413− (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR)));
414−}
415−
416−static void ixp2000_err_irq_unmask(struct irq_data *d)
417−{
418− ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET,
419− (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR)));
420−}
421−
422−static struct irq_chip ixp2000_err_irq_chip = {
423− .irq_ack = ixp2000_err_irq_mask,
424− .irq_mask = ixp2000_err_irq_mask,
425− .irq_unmask = ixp2000_err_irq_unmask
426−};
427−
428−static struct irq_chip ixp2000_pci_irq_chip = {
429− .irq_ack = ixp2000_pci_irq_mask,
430− .irq_mask = ixp2000_pci_irq_mask,
431− .irq_unmask = ixp2000_pci_irq_unmask
432−};
433−
434−static void ixp2000_irq_mask(struct irq_data *d)
435−{
436− ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << d->irq));
437−}
438−
439−static void ixp2000_irq_unmask(struct irq_data *d)
440−{
441− ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << d->irq));
442−}
443−
444−static struct irq_chip ixp2000_irq_chip = {
445− .irq_ack = ixp2000_irq_mask,
446− .irq_mask = ixp2000_irq_mask,
447− .irq_unmask = ixp2000_irq_unmask
448−};
449−
450−void __init ixp2000_init_irq(void)
451−{
452− int irq;
453−
454− /*
455− * Mask all sources
456− */
457− ixp2000_reg_write(IXP2000_IRQ_ENABLE_CLR, 0xffffffff);
458− ixp2000_reg_write(IXP2000_FIQ_ENABLE_CLR, 0xffffffff);
459−
460− /* clear all GPIO edge/level detects */
461− ixp2000_reg_write(IXP2000_GPIO_REDR, 0);
462− ixp2000_reg_write(IXP2000_GPIO_FEDR, 0);
463− ixp2000_reg_write(IXP2000_GPIO_LSHR, 0);
464− ixp2000_reg_write(IXP2000_GPIO_LSLR, 0);
465− ixp2000_reg_write(IXP2000_GPIO_INCR, -1);
466−
467− /* clear PCI interrupt sources */
468− ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, 0);
469−
470− /*
471− * Certain bits in the IRQ status register of the
472− * IXP2000 are reserved. Instead of trying to map
473− * things non 1:1 from bit position to IRQ number,
474− * we mark the reserved IRQs as invalid. This makes
475− * our mask/unmask code much simpler.
476− */
477− for (irq = IRQ_IXP2000_SOFT_INT; irq <= IRQ_IXP2000_THDB3; irq++) {
478− if ((1 << irq) & IXP2000_VALID_IRQ_MASK) {
479− irq_set_chip_and_handler(irq, &ixp2000_irq_chip,
480− handle_level_irq);
481− set_irq_flags(irq, IRQF_VALID);
482− } else set_irq_flags(irq, 0);
483− }
484−
485− for (irq = IRQ_IXP2000_DRAM0_MIN_ERR; irq <= IRQ_IXP2000_SP_INT; irq++) {
486− if((1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)) &
487− IXP2000_VALID_ERR_IRQ_MASK) {
488− irq_set_chip_and_handler(irq, &ixp2000_err_irq_chip,
489− handle_level_irq);
490− set_irq_flags(irq, IRQF_VALID);
491− }
492− else
493− set_irq_flags(irq, 0);
494− }
495− irq_set_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler);
496−
497− for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) {
498− irq_set_chip_and_handler(irq, &ixp2000_GPIO_irq_chip,
499− handle_level_irq);
500− set_irq_flags(irq, IRQF_VALID);
501− }
502− irq_set_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler);
503−
504− /*
505− * Enable PCI irqs. The actual PCI[AB] decoding is done in
506− * entry-macro.S, so we don't need a chained handler for the
507− * PCI interrupt source.
508− */
509− ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << IRQ_IXP2000_PCI));
510− for (irq = IRQ_IXP2000_PCIA; irq <= IRQ_IXP2000_PCIB; irq++) {
511− irq_set_chip_and_handler(irq, &ixp2000_pci_irq_chip,
512− handle_level_irq);
513− set_irq_flags(irq, IRQF_VALID);
514− }
515−}
516−
517−void ixp2000_restart(char mode, const char *cmd)
518−{
519− ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
520−}
arch/arm/mach-ixp2000/enp2611.c+0−258
@@ -1,258 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/enp2611.c
3− *
4− * Radisys ENP-2611 support.
5− *
6− * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The
7− * original version carries the following notices:
8− *
9− * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com>
10− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
11− *
12− * Copyright (C) 2002-2003 Intel Corp.
13− * Copyright (C) 2003-2004 MontaVista Software, Inc.
14− *
15− * This program is free software; you can redistribute it and/or modify it
16− * under the terms of the GNU General Public License as published by the
17− * Free Software Foundation; either version 2 of the License, or (at your
18− * option) any later version.
19− */
20−
21−#include <linux/kernel.h>
22−#include <linux/init.h>
23−#include <linux/mm.h>
24−#include <linux/sched.h>
25−#include <linux/interrupt.h>
26−#include <linux/bitops.h>
27−#include <linux/pci.h>
28−#include <linux/ioport.h>
29−#include <linux/delay.h>
30−#include <linux/serial.h>
31−#include <linux/tty.h>
32−#include <linux/serial_core.h>
33−#include <linux/platform_device.h>
34−#include <linux/io.h>
35−
36−#include <asm/irq.h>
37−#include <asm/pgtable.h>
38−#include <asm/page.h>
39−#include <mach/hardware.h>
40−#include <asm/mach-types.h>
41−
42−#include <asm/mach/pci.h>
43−#include <asm/mach/map.h>
44−#include <asm/mach/irq.h>
45−#include <asm/mach/time.h>
46−#include <asm/mach/arch.h>
47−#include <asm/mach/flash.h>
48−
49−/*************************************************************************
50− * ENP-2611 timer tick configuration
51− *************************************************************************/
52−static void __init enp2611_timer_init(void)
53−{
54− ixp2000_init_time(50 * 1000 * 1000);
55−}
56−
57−static struct sys_timer enp2611_timer = {
58− .init = enp2611_timer_init,
59− .offset = ixp2000_gettimeoffset,
60−};
61−
62−
63−/*************************************************************************
64− * ENP-2611 I/O
65− *************************************************************************/
66−static struct map_desc enp2611_io_desc[] __initdata = {
67− {
68− .virtual = ENP2611_CALEB_VIRT_BASE,
69− .pfn = __phys_to_pfn(ENP2611_CALEB_PHYS_BASE),
70− .length = ENP2611_CALEB_SIZE,
71− .type = MT_DEVICE,
72− }, {
73− .virtual = ENP2611_PM3386_0_VIRT_BASE,
74− .pfn = __phys_to_pfn(ENP2611_PM3386_0_PHYS_BASE),
75− .length = ENP2611_PM3386_0_SIZE,
76− .type = MT_DEVICE,
77− }, {
78− .virtual = ENP2611_PM3386_1_VIRT_BASE,
79− .pfn = __phys_to_pfn(ENP2611_PM3386_1_PHYS_BASE),
80− .length = ENP2611_PM3386_1_SIZE,
81− .type = MT_DEVICE,
82− }
83−};
84−
85−void __init enp2611_map_io(void)
86−{
87− ixp2000_map_io();
88− iotable_init(enp2611_io_desc, ARRAY_SIZE(enp2611_io_desc));
89−}
90−
91−
92−/*************************************************************************
93− * ENP-2611 PCI
94− *************************************************************************/
95−static int enp2611_pci_setup(int nr, struct pci_sys_data *sys)
96−{
97− sys->mem_offset = 0xe0000000;
98− ixp2000_pci_setup(nr, sys);
99− return 1;
100−}
101−
102−static void __init enp2611_pci_preinit(void)
103−{
104− ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
105− ixp2000_pci_preinit();
106− pcibios_setup("firmware");
107−}
108−
109−static inline int enp2611_pci_valid_device(struct pci_bus *bus,
110− unsigned int devfn)
111−{
112− /* The 82559 ethernet controller appears at both PCI:1:0:0 and
113− * PCI:1:2:0, so let's pretend the second one isn't there.
114− */
115− if (bus->number == 0x01 && devfn == 0x10)
116− return 0;
117−
118− return 1;
119−}
120−
121−static int enp2611_pci_read_config(struct pci_bus *bus, unsigned int devfn,
122− int where, int size, u32 *value)
123−{
124− if (enp2611_pci_valid_device(bus, devfn))
125− return ixp2000_pci_read_config(bus, devfn, where, size, value);
126−
127− return PCIBIOS_DEVICE_NOT_FOUND;
128−}
129−
130−static int enp2611_pci_write_config(struct pci_bus *bus, unsigned int devfn,
131− int where, int size, u32 value)
132−{
133− if (enp2611_pci_valid_device(bus, devfn))
134− return ixp2000_pci_write_config(bus, devfn, where, size, value);
135−
136− return PCIBIOS_DEVICE_NOT_FOUND;
137−}
138−
139−static struct pci_ops enp2611_pci_ops = {
140− .read = enp2611_pci_read_config,
141− .write = enp2611_pci_write_config
142−};
143−
144−static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot,
145− u8 pin)
146−{
147− int irq;
148−
149− if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) {
150− /* IXP2400. */
151− irq = IRQ_IXP2000_PCIA;
152− } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) {
153− /* 21555 non-transparent bridge. */
154− irq = IRQ_IXP2000_PCIB;
155− } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) {
156− /* PCI2050B transparent bridge. */
157− irq = -1;
158− } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) {
159− /* 82559 ethernet. */
160− irq = IRQ_IXP2000_PCIA;
161− } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) {
162− /* SPI-3 option board. */
163− irq = IRQ_IXP2000_PCIB;
164− } else {
165− printk(KERN_ERR "enp2611_pci_map_irq() called for unknown "
166− "device PCI:%d:%d:%d\n", dev->bus->number,
167− PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
168− irq = -1;
169− }
170−
171− return irq;
172−}
173−
174−struct hw_pci enp2611_pci __initdata = {
175− .nr_controllers = 1,
176− .ops = &enp2611_pci_ops,
177− .setup = enp2611_pci_setup,
178− .preinit = enp2611_pci_preinit,
179− .map_irq = enp2611_pci_map_irq,
180−};
181−
182−int __init enp2611_pci_init(void)
183−{
184− if (machine_is_enp2611())
185− pci_common_init(&enp2611_pci);
186−
187− return 0;
188−}
189−
190−subsys_initcall(enp2611_pci_init);
191−
192−
193−/*************************************************************************
194− * ENP-2611 Machine Initialization
195− *************************************************************************/
196−static struct flash_platform_data enp2611_flash_platform_data = {
197− .map_name = "cfi_probe",
198− .width = 1,
199−};
200−
201−static struct ixp2000_flash_data enp2611_flash_data = {
202− .platform_data = &enp2611_flash_platform_data,
203− .nr_banks = 1
204−};
205−
206−static struct resource enp2611_flash_resource = {
207− .start = 0xc4000000,
208− .end = 0xc4000000 + 0x00ffffff,
209− .flags = IORESOURCE_MEM,
210−};
211−
212−static struct platform_device enp2611_flash = {
213− .name = "IXP2000-Flash",
214− .id = 0,
215− .dev = {
216− .platform_data = &enp2611_flash_data,
217− },
218− .num_resources = 1,
219− .resource = &enp2611_flash_resource,
220−};
221−
222−static struct ixp2000_i2c_pins enp2611_i2c_gpio_pins = {
223− .sda_pin = ENP2611_GPIO_SDA,
224− .scl_pin = ENP2611_GPIO_SCL,
225−};
226−
227−static struct platform_device enp2611_i2c_controller = {
228− .name = "IXP2000-I2C",
229− .id = 0,
230− .dev = {
231− .platform_data = &enp2611_i2c_gpio_pins
232− },
233− .num_resources = 0
234−};
235−
236−static struct platform_device *enp2611_devices[] __initdata = {
237− &enp2611_flash,
238− &enp2611_i2c_controller
239−};
240−
241−static void __init enp2611_init_machine(void)
242−{
243− platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices));
244− ixp2000_uart_init();
245−}
246−
247−
248−MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board")
249− /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
250− .atag_offset = 0x100,
251− .map_io = enp2611_map_io,
252− .init_irq = ixp2000_init_irq,
253− .timer = &enp2611_timer,
254− .init_machine = enp2611_init_machine,
255− .restart = ixp2000_restart,
256−MACHINE_END
257−
258−
arch/arm/mach-ixp2000/include/mach/debug-macro.S+0−25
@@ -1,25 +0,0 @@
1−/* arch/arm/mach-ixp2000/include/mach/debug-macro.S
2− *
3− * Debugging macro include header
4− *
5− * Copyright (C) 1994-1999 Russell King
6− * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7− *
8− * This program is free software; you can redistribute it and/or modify
9− * it under the terms of the GNU General Public License version 2 as
10− * published by the Free Software Foundation.
11− *
12−*/
13−
14− .macro addruart, rp, rv, tmp
15− mov \rp, #0x00030000
16−#ifdef __ARMEB__
17− orr \rp, \rp, #0x00000003
18−#endif
19− orr \rv, \rp, #0xfe000000 @ virtual base
20− orr \rv, \rv, #0x00f00000
21− orr \rp, \rp, #0xc0000000 @ Physical base
22− .endm
23−
24−#define UART_SHIFT 2
25−#include <asm/hardware/debug-8250.S>
arch/arm/mach-ixp2000/include/mach/enp2611.h+0−46
@@ -1,46 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/enp2611.h
3− *
4− * Register and other defines for Radisys ENP-2611
5− *
6− * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The
7− * original version carries the following notices:
8− *
9− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
10− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
11− *
12− * Copyright (C) 2002 Intel Corp.
13− * Copyright (C) 2003-2004 MontaVista Software, Inc.
14− *
15− * This program is free software; you can redistribute it and/or modify it
16− * under the terms of the GNU General Public License as published by the
17− * Free Software Foundation; either version 2 of the License, or (at your
18− * option) any later version.
19− */
20−
21−#ifndef __ENP2611_H
22−#define __ENP2611_H
23−
24−#define ENP2611_CALEB_PHYS_BASE 0xc5000000
25−#define ENP2611_CALEB_VIRT_BASE 0xfe000000
26−#define ENP2611_CALEB_SIZE 0x00100000
27−
28−#define ENP2611_PM3386_0_PHYS_BASE 0xc6000000
29−#define ENP2611_PM3386_0_VIRT_BASE 0xfe100000
30−#define ENP2611_PM3386_0_SIZE 0x00100000
31−
32−#define ENP2611_PM3386_1_PHYS_BASE 0xc6400000
33−#define ENP2611_PM3386_1_VIRT_BASE 0xfe200000
34−#define ENP2611_PM3386_1_SIZE 0x00100000
35−
36−#define ENP2611_GPIO_SCL 7
37−#define ENP2611_GPIO_SDA 6
38−
39−#define IRQ_ENP2611_THERMAL IRQ_IXP2000_GPIO4
40−#define IRQ_ENP2611_OPTION_BOARD IRQ_IXP2000_GPIO3
41−#define IRQ_ENP2611_CALEB IRQ_IXP2000_GPIO2
42−#define IRQ_ENP2611_PM3386_1 IRQ_IXP2000_GPIO1
43−#define IRQ_ENP2611_PM3386_0 IRQ_IXP2000_GPIO0
44−
45−
46−#endif
arch/arm/mach-ixp2000/include/mach/entry-macro.S+0−54
@@ -1,54 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/entry-macro.S
3− *
4− * Low-level IRQ helper macros for IXP2000-based platforms
5− *
6− * This file is licensed under the terms of the GNU General Public
7− * License version 2. This program is licensed "as is" without any
8− * warranty of any kind, whether express or implied.
9− */
10−#include <mach/irqs.h>
11−
12− .macro get_irqnr_preamble, base, tmp
13− .endm
14−
15− .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
16−
17− mov \irqnr, #0x0 @clear out irqnr as default
18− mov \base, #0xfe000000
19− orr \base, \base, #0x00e00000
20− orr \base, \base, #0x08
21− ldr \irqstat, [\base] @ get interrupts
22−
23− cmp \irqstat, #0
24− beq 1001f
25−
26− clz \irqnr, \irqstat
27− mov \base, #31
28− subs \irqnr, \base, \irqnr
29−
30− /*
31− * We handle PCIA and PCIB here so we don't have an
32− * extra layer of code just to check these two bits.
33− */
34− cmp \irqnr, #IRQ_IXP2000_PCI
35− bne 1001f
36−
37− mov \base, #0xfe000000
38− orr \base, \base, #0x00c00000
39− orr \base, \base, #0x00000100
40− orr \base, \base, #0x00000058
41− ldr \irqstat, [\base]
42−
43− mov \tmp, #(1<<26)
44− tst \irqstat, \tmp
45− movne \irqnr, #IRQ_IXP2000_PCIA
46− bne 1001f
47−
48− mov \tmp, #(1<<27)
49− tst \irqstat, \tmp
50− movne \irqnr, #IRQ_IXP2000_PCIB
51−
52−1001:
53− .endm
54−
arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h+0−48
@@ -1,48 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/gpio.h
3− *
4− * Copyright (C) 2002 Intel Corporation.
5− *
6− * This program is free software, you can redistribute it and/or modify
7− * it under the terms of the GNU General Public License version 2 as
8− * published by the Free Software Foundation.
9− */
10−
11−/*
12− * IXP2000 GPIO in/out, edge/level detection for IRQs:
13− * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High
14− * or both Falling-edge and Rising-edge.
15− * This must be called *before* the corresponding IRQ is registerd.
16− * Use this instead of directly setting the GPIO registers.
17− * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
18− */
19−#ifndef __ASM_ARCH_GPIO_H
20−#define __ASM_ARCH_GPIO_H
21−
22−#ifndef __ASSEMBLY__
23−
24−#define GPIO_IN 0
25−#define GPIO_OUT 1
26−
27−#define IXP2000_GPIO_LOW 0
28−#define IXP2000_GPIO_HIGH 1
29−
30−extern void gpio_line_config(int line, int direction);
31−
32−static inline int gpio_line_get(int line)
33−{
34− return (((*IXP2000_GPIO_PLR) >> line) & 1);
35−}
36−
37−static inline void gpio_line_set(int line, int value)
38−{
39− if (value == IXP2000_GPIO_HIGH) {
40− ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line);
41− } else if (value == IXP2000_GPIO_LOW) {
42− ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line);
43− }
44−}
45−
46−#endif /* !__ASSEMBLY__ */
47−
48−#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
arch/arm/mach-ixp2000/include/mach/hardware.h+0−36
@@ -1,36 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/hardware.h
3− *
4− * Hardware definitions for IXP2400/2800 based systems
5− *
6− * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
7− *
8− * Maintainer: Deepak Saxena <dsaxena@mvista.com>
9− *
10− * Copyright (C) 2001-2002 Intel Corp.
11− * Copyright (C) 2003-2004 MontaVista Software, Inc.
12− *
13− * This program is free software; you can redistribute it and/or modify it
14− * under the terms of the GNU General Public License as published by the
15− * Free Software Foundation; either version 2 of the License, or (at your
16− * option) any later version.
17− */
18−
19−#ifndef __ASM_ARCH_HARDWARE_H__
20−#define __ASM_ARCH_HARDWARE_H__
21−
22−#include "ixp2000-regs.h" /* Chipset Registers */
23−
24−/*
25− * Platform helper functions
26− */
27−#include "platform.h"
28−
29−/*
30− * Platform-specific bits
31− */
32−#include "enp2611.h" /* ENP-2611 */
33−#include "ixdp2x00.h" /* IXDP2400/2800 */
34−#include "ixdp2x01.h" /* IXDP2401/2801 */
35−
36−#endif /* _ASM_ARCH_HARDWARE_H__ */
arch/arm/mach-ixp2000/include/mach/io.h+0−133
@@ -1,133 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/io.h
3− *
4− * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6− *
7− * Copyright (C) 2002 Intel Corp.
8− * Copyrgiht (C) 2003-2004 MontaVista Software, Inc.
9− *
10− * This program is free software; you can redistribute it and/or modify
11− * it under the terms of the GNU General Public License version 2 as
12− * published by the Free Software Foundation.
13− */
14−
15−#ifndef __ASM_ARM_ARCH_IO_H
16−#define __ASM_ARM_ARCH_IO_H
17−
18−#include <mach/hardware.h>
19−
20−#define IO_SPACE_LIMIT 0xffffffff
21−
22−/*
23− * The A? revisions of the IXP2000s assert byte lanes for PCI I/O
24− * transactions the other way round (MEM transactions don't have this
25− * issue), so if we want to support those models, we need to override
26− * the standard I/O functions.
27− *
28− * B0 and later have a bit that can be set to 1 to get the proper
29− * behavior for I/O transactions, which then allows us to use the
30− * standard I/O functions. This is what we do if the user does not
31− * explicitly ask for support for pre-B0.
32− */
33−#ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
34−#define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
35−
36−#define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3)
37−#define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2)
38−
39−#define outb(v,p) __raw_writeb((v),alignb(___io(p)))
40−#define outw(v,p) __raw_writew((v),alignw(___io(p)))
41−#define outl(v,p) __raw_writel((v),___io(p))
42−
43−#define inb(p) ({ unsigned int __v = __raw_readb(alignb(___io(p))); __v; })
44−#define inw(p) \
45− ({ unsigned int __v = (__raw_readw(alignw(___io(p)))); __v; })
46−#define inl(p) \
47− ({ unsigned int __v = (__raw_readl(___io(p))); __v; })
48−
49−#define outsb(p,d,l) __raw_writesb(alignb(___io(p)),d,l)
50−#define outsw(p,d,l) __raw_writesw(alignw(___io(p)),d,l)
51−#define outsl(p,d,l) __raw_writesl(___io(p),d,l)
52−
53−#define insb(p,d,l) __raw_readsb(alignb(___io(p)),d,l)
54−#define insw(p,d,l) __raw_readsw(alignw(___io(p)),d,l)
55−#define insl(p,d,l) __raw_readsl(___io(p),d,l)
56−
57−#define __is_io_address(p) ((((unsigned long)(p)) & ~(IXP2000_PCI_IO_SIZE - 1)) == IXP2000_PCI_IO_VIRT_BASE)
58−
59−#define ioread8(p) \
60− ({ \
61− unsigned int __v; \
62− \
63− if (__is_io_address(p)) { \
64− __v = __raw_readb(alignb(p)); \
65− } else { \
66− __v = __raw_readb(p); \
67− } \
68− \
69− __v; \
70− }) \
71−
72−#define ioread16(p) \
73− ({ \
74− unsigned int __v; \
75− \
76− if (__is_io_address(p)) { \
77− __v = __raw_readw(alignw(p)); \
78− } else { \
79− __v = le16_to_cpu(__raw_readw(p)); \
80− } \
81− \
82− __v; \
83− })
84−
85−#define ioread32(p) \
86− ({ \
87− unsigned int __v; \
88− \
89− if (__is_io_address(p)) { \
90− __v = __raw_readl(p); \
91− } else { \
92− __v = le32_to_cpu(__raw_readl(p)); \
93− } \
94− \
95− __v; \
96− })
97−
98−#define iowrite8(v,p) \
99− ({ \
100− if (__is_io_address(p)) { \
101− __raw_writeb((v), alignb(p)); \
102− } else { \
103− __raw_writeb((v), p); \
104− } \
105− })
106−
107−#define iowrite16(v,p) \
108− ({ \
109− if (__is_io_address(p)) { \
110− __raw_writew((v), alignw(p)); \
111− } else { \
112− __raw_writew(cpu_to_le16(v), p); \
113− } \
114− })
115−
116−#define iowrite32(v,p) \
117− ({ \
118− if (__is_io_address(p)) { \
119− __raw_writel((v), p); \
120− } else { \
121− __raw_writel(cpu_to_le32(v), p); \
122− } \
123− })
124−
125−#define ioport_map(port, nr) ___io(port)
126−
127−#define ioport_unmap(addr)
128−#else
129−#define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
130−#endif
131−
132−
133−#endif
arch/arm/mach-ixp2000/include/mach/irqs.h+0−207
@@ -1,207 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/irqs.h
3− *
4− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
5− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6− *
7− * Copyright (C) 2002 Intel Corp.
8− * Copyright (C) 2003-2004 MontaVista Software, Inc.
9− *
10− * This program is free software; you can redistribute it and/or modify
11− * it under the terms of the GNU General Public License version 2 as
12− * published by the Free Software Foundation.
13− */
14−
15−#ifndef _IRQS_H
16−#define _IRQS_H
17−
18−/*
19− * Do NOT add #ifdef MACHINE_FOO in here.
20− * Simpy add your machine IRQs here and increase NR_IRQS if needed to
21− * hold your machine's IRQ table.
22− */
23−
24−/*
25− * Some interrupt numbers go unused b/c the IRQ mask/ummask/status
26− * register has those bit reserved. We just mark those interrupts
27− * as invalid and this allows us to do mask/unmask with a single
28− * shift operation instead of having to map the IRQ number to
29− * a HW IRQ number.
30− */
31−#define IRQ_IXP2000_SOFT_INT 0 /* soft interrupt */
32−#define IRQ_IXP2000_ERRSUM 1 /* OR of all bits in ErrorStatus reg*/
33−#define IRQ_IXP2000_UART 2
34−#define IRQ_IXP2000_GPIO 3
35−#define IRQ_IXP2000_TIMER1 4
36−#define IRQ_IXP2000_TIMER2 5
37−#define IRQ_IXP2000_TIMER3 6
38−#define IRQ_IXP2000_TIMER4 7
39−#define IRQ_IXP2000_PMU 8
40−#define IRQ_IXP2000_SPF 9 /* Slow port framer IRQ */
41−#define IRQ_IXP2000_DMA1 10
42−#define IRQ_IXP2000_DMA2 11
43−#define IRQ_IXP2000_DMA3 12
44−#define IRQ_IXP2000_PCI_DOORBELL 13
45−#define IRQ_IXP2000_ME_ATTN 14
46−#define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */
47−#define IRQ_IXP2000_THDA0 16 /* thread 0-31A */
48−#define IRQ_IXP2000_THDA1 17 /* thread 32-63A, IXP2800 only */
49−#define IRQ_IXP2000_THDA2 18 /* thread 64-95A */
50−#define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */
51−#define IRQ_IXP2000_THDB0 24 /* thread 0-31B */
52−#define IRQ_IXP2000_THDB1 25 /* thread 32-63B, IXP2800 only */
53−#define IRQ_IXP2000_THDB2 26 /* thread 64-95B */
54−#define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */
55−
56−/* define generic GPIOs */
57−#define IRQ_IXP2000_GPIO0 32
58−#define IRQ_IXP2000_GPIO1 33
59−#define IRQ_IXP2000_GPIO2 34
60−#define IRQ_IXP2000_GPIO3 35
61−#define IRQ_IXP2000_GPIO4 36
62−#define IRQ_IXP2000_GPIO5 37
63−#define IRQ_IXP2000_GPIO6 38
64−#define IRQ_IXP2000_GPIO7 39
65−
66−/* split off the 2 PCI sources */
67−#define IRQ_IXP2000_PCIA 40
68−#define IRQ_IXP2000_PCIB 41
69−
70−/* Int sources from IRQ_ERROR_STATUS */
71−#define IRQ_IXP2000_DRAM0_MIN_ERR 42
72−#define IRQ_IXP2000_DRAM0_MAJ_ERR 43
73−#define IRQ_IXP2000_DRAM1_MIN_ERR 44
74−#define IRQ_IXP2000_DRAM1_MAJ_ERR 45
75−#define IRQ_IXP2000_DRAM2_MIN_ERR 46
76−#define IRQ_IXP2000_DRAM2_MAJ_ERR 47
77−/* 48-57 reserved */
78−#define IRQ_IXP2000_SRAM0_ERR 58
79−#define IRQ_IXP2000_SRAM1_ERR 59
80−#define IRQ_IXP2000_SRAM2_ERR 60
81−#define IRQ_IXP2000_SRAM3_ERR 61
82−/* 62-65 reserved */
83−#define IRQ_IXP2000_MEDIA_ERR 66
84−#define IRQ_IXP2000_PCI_ERR 67
85−#define IRQ_IXP2000_SP_INT 68
86−
87−#define NR_IXP2000_IRQS 69
88−
89−#define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x))
90−
91−#define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS))
92−
93−#define IXP2000_ERR_IRQ_MASK(irq) ( 1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))
94−#define IXP2000_VALID_ERR_IRQ_MASK (\
95− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MIN_ERR) | \
96− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MAJ_ERR) | \
97− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MIN_ERR) | \
98− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MAJ_ERR) | \
99− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MIN_ERR) | \
100− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MAJ_ERR) | \
101− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM0_ERR) | \
102− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM1_ERR) | \
103− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM2_ERR) | \
104− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM3_ERR) | \
105− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_MEDIA_ERR) | \
106− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_PCI_ERR) | \
107− IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SP_INT) )
108−
109−/*
110− * This allows for all the on-chip sources plus up to 32 CPLD based
111− * IRQs. Should be more than enough.
112− */
113−#define IXP2000_BOARD_IRQS 32
114−#define NR_IRQS (NR_IXP2000_IRQS + IXP2000_BOARD_IRQS)
115−
116−
117−/*
118− * IXDP2400 specific IRQs
119− */
120−#define IRQ_IXDP2400_INGRESS_NPU IXP2000_BOARD_IRQ(0)
121−#define IRQ_IXDP2400_ENET IXP2000_BOARD_IRQ(1)
122−#define IRQ_IXDP2400_MEDIA_PCI IXP2000_BOARD_IRQ(2)
123−#define IRQ_IXDP2400_MEDIA_SP IXP2000_BOARD_IRQ(3)
124−#define IRQ_IXDP2400_SF_PCI IXP2000_BOARD_IRQ(4)
125−#define IRQ_IXDP2400_SF_SP IXP2000_BOARD_IRQ(5)
126−#define IRQ_IXDP2400_PMC IXP2000_BOARD_IRQ(6)
127−#define IRQ_IXDP2400_TVM IXP2000_BOARD_IRQ(7)
128−
129−#define NR_IXDP2400_IRQS ((IRQ_IXDP2400_TVM)+1)
130−#define IXDP2400_NR_IRQS NR_IXDP2400_IRQS - NR_IXP2000_IRQS
131−
132−/* IXDP2800 specific IRQs */
133−#define IRQ_IXDP2800_EGRESS_ENET IXP2000_BOARD_IRQ(0)
134−#define IRQ_IXDP2800_INGRESS_NPU IXP2000_BOARD_IRQ(1)
135−#define IRQ_IXDP2800_PMC IXP2000_BOARD_IRQ(2)
136−#define IRQ_IXDP2800_FABRIC_PCI IXP2000_BOARD_IRQ(3)
137−#define IRQ_IXDP2800_FABRIC IXP2000_BOARD_IRQ(4)
138−#define IRQ_IXDP2800_MEDIA IXP2000_BOARD_IRQ(5)
139−
140−#define NR_IXDP2800_IRQS ((IRQ_IXDP2800_MEDIA)+1)
141−#define IXDP2800_NR_IRQS NR_IXDP2800_IRQS - NR_IXP2000_IRQS
142−
143−/*
144− * IRQs on both IXDP2x01 boards
145− */
146−#define IRQ_IXDP2X01_SPCI_DB_0 IXP2000_BOARD_IRQ(2)
147−#define IRQ_IXDP2X01_SPCI_DB_1 IXP2000_BOARD_IRQ(3)
148−#define IRQ_IXDP2X01_SPCI_PMC_INTA IXP2000_BOARD_IRQ(4)
149−#define IRQ_IXDP2X01_SPCI_PMC_INTB IXP2000_BOARD_IRQ(5)
150−#define IRQ_IXDP2X01_SPCI_PMC_INTC IXP2000_BOARD_IRQ(6)
151−#define IRQ_IXDP2X01_SPCI_PMC_INTD IXP2000_BOARD_IRQ(7)
152−#define IRQ_IXDP2X01_SPCI_FIC_INT IXP2000_BOARD_IRQ(8)
153−#define IRQ_IXDP2X01_IPMI_FROM IXP2000_BOARD_IRQ(16)
154−#define IRQ_IXDP2X01_125US IXP2000_BOARD_IRQ(17)
155−#define IRQ_IXDP2X01_DB_0_ADD IXP2000_BOARD_IRQ(18)
156−#define IRQ_IXDP2X01_DB_1_ADD IXP2000_BOARD_IRQ(19)
157−#define IRQ_IXDP2X01_UART1 IXP2000_BOARD_IRQ(21)
158−#define IRQ_IXDP2X01_UART2 IXP2000_BOARD_IRQ(22)
159−#define IRQ_IXDP2X01_FIC_ADD_INT IXP2000_BOARD_IRQ(24)
160−#define IRQ_IXDP2X01_CS8900 IXP2000_BOARD_IRQ(25)
161−#define IRQ_IXDP2X01_BBSRAM IXP2000_BOARD_IRQ(26)
162−
163−#define IXDP2X01_VALID_IRQ_MASK ( \
164− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_0) | \
165− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_1) | \
166− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTA) | \
167− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTB) | \
168− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTC) | \
169− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTD) | \
170− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_FIC_INT) | \
171− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_IPMI_FROM) | \
172− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_125US) | \
173− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_0_ADD) | \
174− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_1_ADD) | \
175− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART1) | \
176− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART2) | \
177− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_FIC_ADD_INT) | \
178− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_CS8900) | \
179− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_BBSRAM) )
180−
181−/*
182− * IXDP2401 specific IRQs
183− */
184−#define IRQ_IXDP2401_INTA_82546 IXP2000_BOARD_IRQ(0)
185−#define IRQ_IXDP2401_INTB_82546 IXP2000_BOARD_IRQ(1)
186−
187−#define IXDP2401_VALID_IRQ_MASK ( \
188− IXDP2X01_VALID_IRQ_MASK | \
189− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTA_82546) |\
190− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTB_82546))
191−
192−/*
193− * IXDP2801-specific IRQs
194− */
195−#define IRQ_IXDP2801_RIV IXP2000_BOARD_IRQ(0)
196−#define IRQ_IXDP2801_CNFG_MEDIA IXP2000_BOARD_IRQ(27)
197−#define IRQ_IXDP2801_CLOCK_REF IXP2000_BOARD_IRQ(28)
198−
199−#define IXDP2801_VALID_IRQ_MASK ( \
200− IXDP2X01_VALID_IRQ_MASK | \
201− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_RIV) |\
202− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CNFG_MEDIA) |\
203− IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CLOCK_REF))
204−
205−#define NR_IXDP2X01_IRQS ((IRQ_IXDP2801_CLOCK_REF) + 1)
206−
207−#endif /*_IRQS_H*/
arch/arm/mach-ixp2000/include/mach/ixdp2x00.h+0−92
@@ -1,92 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
3− *
4− * Register and other defines for IXDP2[48]00 platforms
5− *
6− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8− *
9− * Copyright (C) 2002 Intel Corp.
10− * Copyright (C) 2003-2004 MontaVista Software, Inc.
11− *
12− * This program is free software; you can redistribute it and/or modify it
13− * under the terms of the GNU General Public License as published by the
14− * Free Software Foundation; either version 2 of the License, or (at your
15− * option) any later version.
16− */
17−#ifndef _IXDP2X00_H_
18−#define _IXDP2X00_H_
19−
20−/*
21− * On board CPLD memory map
22− */
23−#define IXDP2X00_PHYS_CPLD_BASE 0xc7000000
24−#define IXDP2X00_VIRT_CPLD_BASE 0xfe000000
25−#define IXDP2X00_CPLD_SIZE 0x00100000
26−
27−
28−#define IXDP2X00_CPLD_REG(x) \
29− (volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x)
30−
31−/*
32− * IXDP2400 CPLD registers
33− */
34−#define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0)
35−#define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4)
36−#define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8)
37−#define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc)
38−#define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10)
39−#define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14)
40−#define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18)
41−#define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48)
42−
43−/*
44− * IXDP2800 CPLD registers
45− */
46−#define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0)
47−#define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140)
48−
49−
50−#define IXDP2X00_GPIO_I2C_ENABLE 0x02
51−#define IXDP2X00_GPIO_SCL 0x07
52−#define IXDP2X00_GPIO_SDA 0x06
53−
54−/*
55− * PCI devfns for on-board devices. We need these to be able to
56− * properly translate IRQs and for device removal.
57− */
58−#define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */
59−#define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */
60−#define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */
61−#define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
62−
63−#define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */
64−#define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */
65−#define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
66−
67−#define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */
68−#define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */
69−#define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */
70−#define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */
71−#define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */
72−
73−#ifndef __ASSEMBLY__
74−/*
75− * The master NPU is always PCI master.
76− */
77−static inline unsigned int ixdp2x00_master_npu(void)
78−{
79− return !!ixp2000_is_pcimaster();
80−}
81−
82−/*
83− * Helper functions used by ixdp2400 and ixdp2800 specific code
84− */
85−void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long);
86−void ixdp2x00_slave_pci_postinit(void);
87−void ixdp2x00_init_machine(void);
88−void ixdp2x00_map_io(void);
89−
90−#endif
91−
92−#endif /*_IXDP2X00_H_ */
arch/arm/mach-ixp2000/include/mach/ixdp2x01.h+0−57
@@ -1,57 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/ixdp2x01.h
3− *
4− * Platform definitions for IXDP2X01 && IXDP2801 systems
5− *
6− * Author: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2004 (c) MontaVista Software, Inc.
9− *
10− * Based on original code Copyright (c) 2002-2003 Intel Corporation
11− *
12− * This file is licensed under the terms of the GNU General Public
13− * License version 2. This program is licensed "as is" without any
14− * warranty of any kind, whether express or implied.
15− */
16−
17−#ifndef __IXDP2X01_H__
18−#define __IXDP2X01_H__
19−
20−#define IXDP2X01_PHYS_CPLD_BASE 0xc6024000
21−#define IXDP2X01_VIRT_CPLD_BASE 0xfe000000
22−#define IXDP2X01_CPLD_REGION_SIZE 0x00100000
23−
24−#define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg)
25−#define IXDP2X01_CPLD_PHYS_REG(reg) (IXDP2X01_PHYS_CPLD_BASE | reg)
26−
27−#define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40)
28−#define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40)
29−
30−#define IXDP2X01_UART2_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x60)
31−#define IXDP2X01_UART2_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x60)
32−
33−#define IXDP2X01_CS8900_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x80)
34−#define IXDP2X01_CS8900_VIRT_END (IXDP2X01_CS8900_VIRT_BASE + 16)
35−
36−#define IXDP2X01_CPLD_RESET_REG IXDP2X01_CPLD_VIRT_REG(0x00)
37−#define IXDP2X01_INT_MASK_SET_REG IXDP2X01_CPLD_VIRT_REG(0x08)
38−#define IXDP2X01_INT_STAT_REG IXDP2X01_CPLD_VIRT_REG(0x0C)
39−#define IXDP2X01_INT_RAW_REG IXDP2X01_CPLD_VIRT_REG(0x10)
40−#define IXDP2X01_INT_MASK_CLR_REG IXDP2X01_INT_RAW_REG
41−#define IXDP2X01_INT_SIM_REG IXDP2X01_CPLD_VIRT_REG(0x14)
42−
43−#define IXDP2X01_CPLD_FLASH_REG IXDP2X01_CPLD_VIRT_REG(0x20)
44−
45−#define IXDP2X01_CPLD_FLASH_INTERN 0x8000
46−#define IXDP2X01_CPLD_FLASH_BANK_MASK 0xF
47−#define IXDP2X01_FLASH_WINDOW_BITS 25
48−#define IXDP2X01_FLASH_WINDOW_SIZE (1 << IXDP2X01_FLASH_WINDOW_BITS)
49−#define IXDP2X01_FLASH_WINDOW_MASK (IXDP2X01_FLASH_WINDOW_SIZE - 1)
50−
51−#define IXDP2X01_UART_CLK 1843200
52−
53−#define IXDP2X01_GPIO_I2C_ENABLE 0x02
54−#define IXDP2X01_GPIO_SCL 0x07
55−#define IXDP2X01_GPIO_SDA 0x06
56−
57−#endif /* __IXDP2x01_H__ */
arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h+0−451
@@ -1,451 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
3− *
4− * Chipset register definitions for IXP2400/2800 based systems.
5− *
6− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7− *
8− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
9− *
10− * Copyright (C) 2002 Intel Corp.
11− * Copyright (C) 2003-2004 MontaVista Software, Inc.
12− *
13− * This program is free software; you can redistribute it and/or modify it
14− * under the terms of the GNU General Public License as published by the
15− * Free Software Foundation; either version 2 of the License, or (at your
16− * option) any later version.
17− */
18−#ifndef _IXP2000_REGS_H_
19−#define _IXP2000_REGS_H_
20−
21−/*
22− * IXP2000 linux memory map:
23− *
24− * virt phys size
25− * fb000000 db000000 16M PCI CFG1
26− * fc000000 da000000 16M PCI CFG0
27− * fd000000 d8000000 16M PCI I/O
28− * fe[0-7]00000 8M per-platform mappings
29− * fe900000 80000000 1M SRAM #0 (first MB)
30− * fea00000 cb400000 1M SCRATCH ring get/put
31− * feb00000 c8000000 1M MSF
32− * fec00000 df000000 1M PCI CSRs
33− * fed00000 de000000 1M PCI CREG
34− * fee00000 d6000000 1M INTCTL
35− * fef00000 c0000000 1M CAP
36− */
37−
38−/*
39− * Static I/O regions.
40− *
41− * Most of the registers are clumped in 4K regions spread throughout
42− * the 0xc0000000 -> 0xc0100000 address range, but we just map in
43− * the whole range using a single 1 MB section instead of small
44− * 4K pages.
45− *
46− * CAP stands for CSR Access Proxy.
47− *
48− * If you change the virtual address of this mapping, please propagate
49− * the change to arch/arm/kernel/debug.S, which hardcodes the virtual
50− * address of the UART located in this region.
51− */
52−
53−#define IXP2000_CAP_PHYS_BASE 0xc0000000
54−#define IXP2000_CAP_VIRT_BASE 0xfef00000
55−#define IXP2000_CAP_SIZE 0x00100000
56−
57−/*
58− * Addresses for specific on-chip peripherals.
59− */
60−#define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000
61−#define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000
62−#define IXP2000_UART_PHYS_BASE 0xc0030000
63−#define IXP2000_UART_VIRT_BASE 0xfef30000
64−#define IXP2000_TIMER_VIRT_BASE 0xfef20000
65−#define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000
66−#define IXP2000_GPIO_VIRT_BASE 0xfef10000
67−
68−/*
69− * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual
70− * addresses of the INTCTL and PCI_CSR mappings are hardcoded in
71− * entry-macro.S, so if you ever change these please propagate
72− * the change.
73− */
74−#define IXP2000_INTCTL_PHYS_BASE 0xd6000000
75−#define IXP2000_INTCTL_VIRT_BASE 0xfee00000
76−#define IXP2000_INTCTL_SIZE 0x00100000
77−
78−#define IXP2000_PCI_CREG_PHYS_BASE 0xde000000
79−#define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000
80−#define IXP2000_PCI_CREG_SIZE 0x00100000
81−
82−#define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000
83−#define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000
84−#define IXP2000_PCI_CSR_SIZE 0x00100000
85−
86−#define IXP2000_MSF_PHYS_BASE 0xc8000000
87−#define IXP2000_MSF_VIRT_BASE 0xfeb00000
88−#define IXP2000_MSF_SIZE 0x00100000
89−
90−#define IXP2000_SCRATCH_RING_PHYS_BASE 0xcb400000
91−#define IXP2000_SCRATCH_RING_VIRT_BASE 0xfea00000
92−#define IXP2000_SCRATCH_RING_SIZE 0x00100000
93−
94−#define IXP2000_SRAM0_PHYS_BASE 0x80000000
95−#define IXP2000_SRAM0_VIRT_BASE 0xfe900000
96−#define IXP2000_SRAM0_SIZE 0x00100000
97−
98−#define IXP2000_PCI_IO_PHYS_BASE 0xd8000000
99−#define IXP2000_PCI_IO_VIRT_BASE 0xfd000000
100−#define IXP2000_PCI_IO_SIZE 0x01000000
101−
102−#define IXP2000_PCI_CFG0_PHYS_BASE 0xda000000
103−#define IXP2000_PCI_CFG0_VIRT_BASE 0xfc000000
104−#define IXP2000_PCI_CFG0_SIZE 0x01000000
105−
106−#define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000
107−#define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000
108−#define IXP2000_PCI_CFG1_SIZE 0x01000000
109−
110−/*
111− * Timers
112− */
113−#define IXP2000_TIMER_REG(x) ((volatile unsigned long*)(IXP2000_TIMER_VIRT_BASE | (x)))
114−/* Timer control */
115−#define IXP2000_T1_CTL IXP2000_TIMER_REG(0x00)
116−#define IXP2000_T2_CTL IXP2000_TIMER_REG(0x04)
117−#define IXP2000_T3_CTL IXP2000_TIMER_REG(0x08)
118−#define IXP2000_T4_CTL IXP2000_TIMER_REG(0x0c)
119−/* Store initial value */
120−#define IXP2000_T1_CLD IXP2000_TIMER_REG(0x10)
121−#define IXP2000_T2_CLD IXP2000_TIMER_REG(0x14)
122−#define IXP2000_T3_CLD IXP2000_TIMER_REG(0x18)
123−#define IXP2000_T4_CLD IXP2000_TIMER_REG(0x1c)
124−/* Read current value */
125−#define IXP2000_T1_CSR IXP2000_TIMER_REG(0x20)
126−#define IXP2000_T2_CSR IXP2000_TIMER_REG(0x24)
127−#define IXP2000_T3_CSR IXP2000_TIMER_REG(0x28)
128−#define IXP2000_T4_CSR IXP2000_TIMER_REG(0x2c)
129−/* Clear associated timer interrupt */
130−#define IXP2000_T1_CLR IXP2000_TIMER_REG(0x30)
131−#define IXP2000_T2_CLR IXP2000_TIMER_REG(0x34)
132−#define IXP2000_T3_CLR IXP2000_TIMER_REG(0x38)
133−#define IXP2000_T4_CLR IXP2000_TIMER_REG(0x3c)
134−/* Timer watchdog enable for T4 */
135−#define IXP2000_TWDE IXP2000_TIMER_REG(0x40)
136−
137−#define WDT_ENABLE 0x00000001
138−#define TIMER_DIVIDER_256 0x00000008
139−#define TIMER_ENABLE 0x00000080
140−#define IRQ_MASK_TIMER1 (1 << 4)
141−
142−/*
143− * Interrupt controller registers
144− */
145−#define IXP2000_INTCTL_REG(x) (volatile unsigned long*)(IXP2000_INTCTL_VIRT_BASE | (x))
146−#define IXP2000_IRQ_STATUS IXP2000_INTCTL_REG(0x08)
147−#define IXP2000_IRQ_ENABLE IXP2000_INTCTL_REG(0x10)
148−#define IXP2000_IRQ_ENABLE_SET IXP2000_INTCTL_REG(0x10)
149−#define IXP2000_IRQ_ENABLE_CLR IXP2000_INTCTL_REG(0x18)
150−#define IXP2000_FIQ_ENABLE_CLR IXP2000_INTCTL_REG(0x14)
151−#define IXP2000_IRQ_ERR_STATUS IXP2000_INTCTL_REG(0x24)
152−#define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c)
153−#define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30)
154−#define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34)
155−#define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60)
156−#define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64)
157−#define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68)
158−#define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c)
159−#define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80)
160−#define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84)
161−#define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88)
162−#define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c)
163−#define IXP2000_IRQ_THD_STATUS_A_0 IXP2000_INTCTL_REG(0xe0)
164−#define IXP2000_IRQ_THD_STATUS_A_1 IXP2000_INTCTL_REG(0xe4)
165−#define IXP2000_IRQ_THD_STATUS_A_2 IXP2000_INTCTL_REG(0xe8)
166−#define IXP2000_IRQ_THD_STATUS_A_3 IXP2000_INTCTL_REG(0xec)
167−#define IXP2000_IRQ_THD_STATUS_B_0 IXP2000_INTCTL_REG(0x100)
168−#define IXP2000_IRQ_THD_STATUS_B_1 IXP2000_INTCTL_REG(0x104)
169−#define IXP2000_IRQ_THD_STATUS_B_2 IXP2000_INTCTL_REG(0x108)
170−#define IXP2000_IRQ_THD_STATUS_B_3 IXP2000_INTCTL_REG(0x10c)
171−#define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160)
172−#define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164)
173−#define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168)
174−#define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c)
175−#define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180)
176−#define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184)
177−#define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188)
178−#define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c)
179−#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0)
180−#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4)
181−#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8)
182−#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec)
183−#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200)
184−#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204)
185−#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208)
186−#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c)
187−
188−/*
189− * Mask of valid IRQs in the 32-bit IRQ register. We use
190− * this to mark certain IRQs as being invalid.
191− */
192−#define IXP2000_VALID_IRQ_MASK 0x0f0fffff
193−
194−/*
195− * PCI config register access from core
196− */
197−#define IXP2000_PCI_CREG(x) (volatile unsigned long*)(IXP2000_PCI_CREG_VIRT_BASE | (x))
198−#define IXP2000_PCI_CMDSTAT IXP2000_PCI_CREG(0x04)
199−#define IXP2000_PCI_CSR_BAR IXP2000_PCI_CREG(0x10)
200−#define IXP2000_PCI_SRAM_BAR IXP2000_PCI_CREG(0x14)
201−#define IXP2000_PCI_SDRAM_BAR IXP2000_PCI_CREG(0x18)
202−
203−/*
204− * PCI CSRs
205− */
206−#define IXP2000_PCI_CSR(x) (volatile unsigned long*)(IXP2000_PCI_CSR_VIRT_BASE | (x))
207−
208−/*
209− * PCI outbound interrupts
210− */
211−#define IXP2000_PCI_OUT_INT_STATUS IXP2000_PCI_CSR(0x30)
212−#define IXP2000_PCI_OUT_INT_MASK IXP2000_PCI_CSR(0x34)
213−/*
214− * PCI communications
215− */
216−#define IXP2000_PCI_MAILBOX0 IXP2000_PCI_CSR(0x50)
217−#define IXP2000_PCI_MAILBOX1 IXP2000_PCI_CSR(0x54)
218−#define IXP2000_PCI_MAILBOX2 IXP2000_PCI_CSR(0x58)
219−#define IXP2000_PCI_MAILBOX3 IXP2000_PCI_CSR(0x5C)
220−#define IXP2000_XSCALE_DOORBELL IXP2000_PCI_CSR(0x60)
221−#define IXP2000_XSCALE_DOORBELL_SETUP IXP2000_PCI_CSR(0x64)
222−#define IXP2000_PCI_DOORBELL IXP2000_PCI_CSR(0x70)
223−#define IXP2000_PCI_DOORBELL_SETUP IXP2000_PCI_CSR(0x74)
224−
225−/*
226− * DMA engines
227− */
228−#define IXP2000_PCI_CH1_BYTE_CNT IXP2000_PCI_CSR(0x80)
229−#define IXP2000_PCI_CH1_ADDR IXP2000_PCI_CSR(0x84)
230−#define IXP2000_PCI_CH1_DRAM_ADDR IXP2000_PCI_CSR(0x88)
231−#define IXP2000_PCI_CH1_DESC_PTR IXP2000_PCI_CSR(0x8C)
232−#define IXP2000_PCI_CH1_CNTRL IXP2000_PCI_CSR(0x90)
233−#define IXP2000_PCI_CH1_ME_PARAM IXP2000_PCI_CSR(0x94)
234−#define IXP2000_PCI_CH2_BYTE_CNT IXP2000_PCI_CSR(0xA0)
235−#define IXP2000_PCI_CH2_ADDR IXP2000_PCI_CSR(0xA4)
236−#define IXP2000_PCI_CH2_DRAM_ADDR IXP2000_PCI_CSR(0xA8)
237−#define IXP2000_PCI_CH2_DESC_PTR IXP2000_PCI_CSR(0xAC)
238−#define IXP2000_PCI_CH2_CNTRL IXP2000_PCI_CSR(0xB0)
239−#define IXP2000_PCI_CH2_ME_PARAM IXP2000_PCI_CSR(0xB4)
240−#define IXP2000_PCI_CH3_BYTE_CNT IXP2000_PCI_CSR(0xC0)
241−#define IXP2000_PCI_CH3_ADDR IXP2000_PCI_CSR(0xC4)
242−#define IXP2000_PCI_CH3_DRAM_ADDR IXP2000_PCI_CSR(0xC8)
243−#define IXP2000_PCI_CH3_DESC_PTR IXP2000_PCI_CSR(0xCC)
244−#define IXP2000_PCI_CH3_CNTRL IXP2000_PCI_CSR(0xD0)
245−#define IXP2000_PCI_CH3_ME_PARAM IXP2000_PCI_CSR(0xD4)
246−#define IXP2000_DMA_INF_MODE IXP2000_PCI_CSR(0xE0)
247−/*
248− * Size masks for BARs
249− */
250−#define IXP2000_PCI_SRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0xFC)
251−#define IXP2000_PCI_DRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0x100)
252−/*
253− * Control and uEngine related
254− */
255−#define IXP2000_PCI_CONTROL IXP2000_PCI_CSR(0x13C)
256−#define IXP2000_PCI_ADDR_EXT IXP2000_PCI_CSR(0x140)
257−#define IXP2000_PCI_ME_PUSH_STATUS IXP2000_PCI_CSR(0x148)
258−#define IXP2000_PCI_ME_PUSH_EN IXP2000_PCI_CSR(0x14C)
259−#define IXP2000_PCI_ERR_STATUS IXP2000_PCI_CSR(0x150)
260−#define IXP2000_PCI_ERR_ENABLE IXP2000_PCI_CSR(0x154)
261−/*
262− * Inbound PCI interrupt control
263− */
264−#define IXP2000_PCI_XSCALE_INT_STATUS IXP2000_PCI_CSR(0x158)
265−#define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C)
266−
267−#define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */
268−#define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */
269−#define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */
270−
271−/* These are from the IRQ register in the PCI ISR register */
272−#define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */
273−#define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */
274−#define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */
275−#define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */
276−#define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */
277−
278−#define IXP2000_PCI_RST_REL (1 << 2)
279−#define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF)
280−#define CFG_PCI_BOOT_HOST (1 << 2)
281−#define CFG_BOOT_PROM (1 << 1)
282−
283−/*
284− * SlowPort CSRs
285− *
286− * The slowport is used to access things like flash, SONET framer control
287− * ports, slave microprocessors, CPLDs, and others of chip memory mapped
288− * peripherals.
289− */
290−#define SLOWPORT_CSR(x) (volatile unsigned long*)(IXP2000_SLOWPORT_CSR_VIRT_BASE | (x))
291−
292−#define IXP2000_SLOWPORT_CCR SLOWPORT_CSR(0x00)
293−#define IXP2000_SLOWPORT_WTC1 SLOWPORT_CSR(0x04)
294−#define IXP2000_SLOWPORT_WTC2 SLOWPORT_CSR(0x08)
295−#define IXP2000_SLOWPORT_RTC1 SLOWPORT_CSR(0x0c)
296−#define IXP2000_SLOWPORT_RTC2 SLOWPORT_CSR(0x10)
297−#define IXP2000_SLOWPORT_FSR SLOWPORT_CSR(0x14)
298−#define IXP2000_SLOWPORT_PCR SLOWPORT_CSR(0x18)
299−#define IXP2000_SLOWPORT_ADC SLOWPORT_CSR(0x1C)
300−#define IXP2000_SLOWPORT_FAC SLOWPORT_CSR(0x20)
301−#define IXP2000_SLOWPORT_FRM SLOWPORT_CSR(0x24)
302−#define IXP2000_SLOWPORT_FIN SLOWPORT_CSR(0x28)
303−
304−/*
305− * CCR values.
306− * The CCR configures the clock division for the slowport interface.
307− */
308−#define SLOWPORT_CCR_DIV_1 0x00
309−#define SLOWPORT_CCR_DIV_2 0x01
310−#define SLOWPORT_CCR_DIV_4 0x02
311−#define SLOWPORT_CCR_DIV_6 0x03
312−#define SLOWPORT_CCR_DIV_8 0x04
313−#define SLOWPORT_CCR_DIV_10 0x05
314−#define SLOWPORT_CCR_DIV_12 0x06
315−#define SLOWPORT_CCR_DIV_14 0x07
316−#define SLOWPORT_CCR_DIV_16 0x08
317−#define SLOWPORT_CCR_DIV_18 0x09
318−#define SLOWPORT_CCR_DIV_20 0x0a
319−#define SLOWPORT_CCR_DIV_22 0x0b
320−#define SLOWPORT_CCR_DIV_24 0x0c
321−#define SLOWPORT_CCR_DIV_26 0x0d
322−#define SLOWPORT_CCR_DIV_28 0x0e
323−#define SLOWPORT_CCR_DIV_30 0x0f
324−
325−/*
326− * PCR values. PCR configure the mode of the interface.
327− */
328−#define SLOWPORT_MODE_FLASH 0x00
329−#define SLOWPORT_MODE_LUCENT 0x01
330−#define SLOWPORT_MODE_PMC_SIERRA 0x02
331−#define SLOWPORT_MODE_INTEL_UP 0x03
332−#define SLOWPORT_MODE_MOTOROLA_UP 0x04
333−
334−/*
335− * ADC values. Defines data and address bus widths.
336− */
337−#define SLOWPORT_ADDR_WIDTH_8 0x00
338−#define SLOWPORT_ADDR_WIDTH_16 0x01
339−#define SLOWPORT_ADDR_WIDTH_24 0x02
340−#define SLOWPORT_ADDR_WIDTH_32 0x03
341−#define SLOWPORT_DATA_WIDTH_8 0x00
342−#define SLOWPORT_DATA_WIDTH_16 0x10
343−#define SLOWPORT_DATA_WIDTH_24 0x20
344−#define SLOWPORT_DATA_WIDTH_32 0x30
345−
346−/*
347− * Masks and shifts for various fields in the WTC and RTC registers.
348− */
349−#define SLOWPORT_WRTC_MASK_HD 0x0003
350−#define SLOWPORT_WRTC_MASK_PW 0x003c
351−#define SLOWPORT_WRTC_MASK_SU 0x03c0
352−
353−#define SLOWPORT_WRTC_SHIFT_HD 0x00
354−#define SLOWPORT_WRTC_SHIFT_SU 0x02
355−#define SLOWPORT_WRTC_SHFIT_PW 0x06
356−
357−
358−/*
359− * GPIO registers & GPIO interface.
360− */
361−#define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x)))
362−#define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00)
363−#define IXP2000_GPIO_PDPR IXP2000_GPIO_REG(0x04)
364−#define IXP2000_GPIO_PDSR IXP2000_GPIO_REG(0x08)
365−#define IXP2000_GPIO_PDCR IXP2000_GPIO_REG(0x0c)
366−#define IXP2000_GPIO_POPR IXP2000_GPIO_REG(0x10)
367−#define IXP2000_GPIO_POSR IXP2000_GPIO_REG(0x14)
368−#define IXP2000_GPIO_POCR IXP2000_GPIO_REG(0x18)
369−#define IXP2000_GPIO_REDR IXP2000_GPIO_REG(0x1c)
370−#define IXP2000_GPIO_FEDR IXP2000_GPIO_REG(0x20)
371−#define IXP2000_GPIO_EDSR IXP2000_GPIO_REG(0x24)
372−#define IXP2000_GPIO_LSHR IXP2000_GPIO_REG(0x28)
373−#define IXP2000_GPIO_LSLR IXP2000_GPIO_REG(0x2c)
374−#define IXP2000_GPIO_LDSR IXP2000_GPIO_REG(0x30)
375−#define IXP2000_GPIO_INER IXP2000_GPIO_REG(0x34)
376−#define IXP2000_GPIO_INSR IXP2000_GPIO_REG(0x38)
377−#define IXP2000_GPIO_INCR IXP2000_GPIO_REG(0x3c)
378−#define IXP2000_GPIO_INST IXP2000_GPIO_REG(0x40)
379−
380−/*
381− * "Global" registers...whatever that's supposed to mean.
382− */
383−#define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00)
384−#define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x))
385−
386−#define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000
387−#define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000
388−#define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00
389−#define IXP2000_MIN_PROD_TYPE_IXP2400 0x00000200
390−#define IXP2000_MIN_PROD_TYPE_IXP2850 0x00000100
391−#define IXP2000_MIN_PROD_TYPE_IXP2800 0x00000000
392−#define IXP2000_MAJ_REV_MASK 0x000000F0
393−#define IXP2000_MIN_REV_MASK 0x0000000F
394−#define IXP2000_PROD_ID_MASK 0xFFFFFFFF
395−
396−#define IXP2000_PRODUCT_ID GLOBAL_REG(0x00)
397−#define IXP2000_MISC_CONTROL GLOBAL_REG(0x04)
398−#define IXP2000_MSF_CLK_CNTRL GLOBAL_REG(0x08)
399−#define IXP2000_RESET0 GLOBAL_REG(0x0c)
400−#define IXP2000_RESET1 GLOBAL_REG(0x10)
401−#define IXP2000_CCR GLOBAL_REG(0x14)
402−#define IXP2000_STRAP_OPTIONS GLOBAL_REG(0x18)
403−
404−#define RSTALL (1 << 16)
405−#define WDT_RESET_ENABLE 0x01000000
406−
407−
408−/*
409− * MSF registers. The IXP2400 and IXP2800 have somewhat different MSF
410− * units, but the registers that differ between the two don't overlap,
411− * so we can have one register list for both.
412− */
413−#define IXP2000_MSF_REG(x) ((volatile unsigned long*)(IXP2000_MSF_VIRT_BASE + (x)))
414−#define IXP2000_MSF_RX_CONTROL IXP2000_MSF_REG(0x0000)
415−#define IXP2000_MSF_TX_CONTROL IXP2000_MSF_REG(0x0004)
416−#define IXP2000_MSF_INTERRUPT_STATUS IXP2000_MSF_REG(0x0008)
417−#define IXP2000_MSF_INTERRUPT_ENABLE IXP2000_MSF_REG(0x000c)
418−#define IXP2000_MSF_CSIX_TYPE_MAP IXP2000_MSF_REG(0x0010)
419−#define IXP2000_MSF_FC_EGRESS_STATUS IXP2000_MSF_REG(0x0014)
420−#define IXP2000_MSF_FC_INGRESS_STATUS IXP2000_MSF_REG(0x0018)
421−#define IXP2000_MSF_HWM_CONTROL IXP2000_MSF_REG(0x0024)
422−#define IXP2000_MSF_FC_STATUS_OVERRIDE IXP2000_MSF_REG(0x0028)
423−#define IXP2000_MSF_CLOCK_CONTROL IXP2000_MSF_REG(0x002c)
424−#define IXP2000_MSF_RX_PORT_MAP IXP2000_MSF_REG(0x0040)
425−#define IXP2000_MSF_RBUF_ELEMENT_DONE IXP2000_MSF_REG(0x0044)
426−#define IXP2000_MSF_RX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0048)
427−#define IXP2000_MSF_RX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0048)
428−#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_0 IXP2000_MSF_REG(0x0050)
429−#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_1 IXP2000_MSF_REG(0x0054)
430−#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_2 IXP2000_MSF_REG(0x0058)
431−#define IXP2000_MSF_TX_SEQUENCE_0 IXP2000_MSF_REG(0x0060)
432−#define IXP2000_MSF_TX_SEQUENCE_1 IXP2000_MSF_REG(0x0064)
433−#define IXP2000_MSF_TX_SEQUENCE_2 IXP2000_MSF_REG(0x0068)
434−#define IXP2000_MSF_TX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0070)
435−#define IXP2000_MSF_TX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0070)
436−#define IXP2000_MSF_RX_UP_CONTROL_0 IXP2000_MSF_REG(0x0080)
437−#define IXP2000_MSF_RX_UP_CONTROL_1 IXP2000_MSF_REG(0x0084)
438−#define IXP2000_MSF_RX_UP_CONTROL_2 IXP2000_MSF_REG(0x0088)
439−#define IXP2000_MSF_RX_UP_CONTROL_3 IXP2000_MSF_REG(0x008c)
440−#define IXP2000_MSF_TX_UP_CONTROL_0 IXP2000_MSF_REG(0x0090)
441−#define IXP2000_MSF_TX_UP_CONTROL_1 IXP2000_MSF_REG(0x0094)
442−#define IXP2000_MSF_TX_UP_CONTROL_2 IXP2000_MSF_REG(0x0098)
443−#define IXP2000_MSF_TX_UP_CONTROL_3 IXP2000_MSF_REG(0x009c)
444−#define IXP2000_MSF_TRAIN_DATA IXP2000_MSF_REG(0x00a0)
445−#define IXP2000_MSF_TRAIN_CALENDAR IXP2000_MSF_REG(0x00a4)
446−#define IXP2000_MSF_TRAIN_FLOW_CONTROL IXP2000_MSF_REG(0x00a8)
447−#define IXP2000_MSF_TX_CALENDAR_0 IXP2000_MSF_REG(0x1000)
448−#define IXP2000_MSF_RX_PORT_CALENDAR_STATUS IXP2000_MSF_REG(0x1400)
449−
450−
451−#endif /* _IXP2000_H_ */
arch/arm/mach-ixp2000/include/mach/memory.h+0−31
@@ -1,31 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/memory.h
3− *
4− * Copyright (c) 2002 Intel Corp.
5− * Copyright (c) 2003-2004 MontaVista Software, Inc.
6− *
7− * This program is free software; you can redistribute it and/or modify it
8− * under the terms of the GNU General Public License as published by the
9− * Free Software Foundation; either version 2 of the License, or (at your
10− * option) any later version.
11− */
12−
13−#ifndef __ASM_ARCH_MEMORY_H
14−#define __ASM_ARCH_MEMORY_H
15−
16−#define PLAT_PHYS_OFFSET UL(0x00000000)
17−
18−#include <mach/ixp2000-regs.h>
19−
20−#define IXP2000_PCI_SDRAM_OFFSET (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)
21−
22−#define __phys_to_bus(x) ((x) + (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET))
23−#define __bus_to_phys(x) ((x) - (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET))
24−
25−#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))
26−#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))
27−#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))
28−#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))
29−
30−#endif
31−
arch/arm/mach-ixp2000/include/mach/platform.h+0−153
@@ -1,153 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/platform.h
3− *
4− * Various bits of code used by platform-level code.
5− *
6− * Author: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2004 (c) MontaVista Software, Inc.
9− *
10− * This file is licensed under the terms of the GNU General Public
11− * License version 2. This program is licensed "as is" without any
12− * warranty of any kind, whether express or implied.
13− */
14−
15−
16−#ifndef __ASSEMBLY__
17−
18−static inline unsigned long ixp2000_reg_read(volatile void *reg)
19−{
20− return *((volatile unsigned long *)reg);
21−}
22−
23−static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
24−{
25− *((volatile unsigned long *)reg) = val;
26−}
27−
28−/*
29− * On the IXP2400, we can't use XCB=000 due to chip bugs. We use
30− * XCB=101 instead, but that makes all I/O accesses bufferable. This
31− * is not a problem in general, but we do have to be slightly more
32− * careful because I/O writes are no longer automatically flushed out
33− * of the write buffer.
34− *
35− * In cases where we want to make sure that a write has been flushed
36− * out of the write buffer before we proceed, for example when masking
37− * a device interrupt before re-enabling IRQs in CPSR, we can use this
38− * function, ixp2000_reg_wrb, which performs a write, a readback, and
39− * issues a dummy instruction dependent on the value of the readback
40− * (mov rX, rX) to make sure that the readback has completed before we
41− * continue.
42− */
43−static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
44−{
45− unsigned long dummy;
46−
47− *((volatile unsigned long *)reg) = val;
48−
49− dummy = *((volatile unsigned long *)reg);
50− __asm__ __volatile__("mov %0, %0" : "+r" (dummy));
51−}
52−
53−/*
54− * Boards may multiplex different devices on the 2nd channel of
55− * the slowport interface that each need different configuration
56− * settings. For example, the IXDP2400 uses channel 2 on the interface
57− * to access the CPLD, the switch fabric card, and the media card. Each
58− * one needs a different mode so drivers must save/restore the mode
59− * before and after each operation.
60− *
61− * acquire_slowport(&your_config);
62− * ...
63− * do slowport operations
64− * ...
65− * release_slowport();
66− *
67− * Note that while you have the slowport, you are holding a spinlock,
68− * so your code should be written as if you explicitly acquired a lock.
69− *
70− * The configuration only affects device 2 on the slowport, so the
71− * MTD map driver does not acquire/release the slowport.
72− */
73−struct slowport_cfg {
74− unsigned long CCR; /* Clock divide */
75− unsigned long WTC; /* Write Timing Control */
76− unsigned long RTC; /* Read Timing Control */
77− unsigned long PCR; /* Protocol Control Register */
78− unsigned long ADC; /* Address/Data Width Control */
79−};
80−
81−
82−void ixp2000_acquire_slowport(struct slowport_cfg *, struct slowport_cfg *);
83−void ixp2000_release_slowport(struct slowport_cfg *);
84−
85−/*
86− * IXP2400 A0/A1 and IXP2800 A0/A1/A2 have broken slowport that requires
87− * tweaking of addresses in the MTD driver.
88− */
89−static inline unsigned ixp2000_has_broken_slowport(void)
90−{
91− unsigned long id = *IXP2000_PRODUCT_ID;
92− unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK |
93− IXP2000_MIN_PROD_TYPE_MASK);
94− return (((id_prod ==
95− /* fixed in IXP2400-B0 */
96− (IXP2000_MAJ_PROD_TYPE_IXP2000 |
97− IXP2000_MIN_PROD_TYPE_IXP2400)) &&
98− ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
99− ((id_prod ==
100− /* fixed in IXP2800-B0 */
101− (IXP2000_MAJ_PROD_TYPE_IXP2000 |
102− IXP2000_MIN_PROD_TYPE_IXP2800)) &&
103− ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
104− ((id_prod ==
105− /* fixed in IXP2850-B0 */
106− (IXP2000_MAJ_PROD_TYPE_IXP2000 |
107− IXP2000_MIN_PROD_TYPE_IXP2850)) &&
108− ((id & IXP2000_MAJ_REV_MASK) == 0)));
109−}
110−
111−static inline unsigned int ixp2000_has_flash(void)
112−{
113− return ((*IXP2000_STRAP_OPTIONS) & (CFG_BOOT_PROM));
114−}
115−
116−static inline unsigned int ixp2000_is_pcimaster(void)
117−{
118− return ((*IXP2000_STRAP_OPTIONS) & (CFG_PCI_BOOT_HOST));
119−}
120−
121−void ixp2000_map_io(void);
122−void ixp2000_uart_init(void);
123−void ixp2000_init_irq(void);
124−void ixp2000_init_time(unsigned long);
125−void ixp2000_restart(char, const char *);
126−unsigned long ixp2000_gettimeoffset(void);
127−
128−struct pci_sys_data;
129−
130−extern struct pci_ops ixp2000_pci_ops;
131−u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where);
132−void ixp2000_pci_preinit(void);
133−int ixp2000_pci_setup(int, struct pci_sys_data*);
134−int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *);
135−int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32);
136−
137−/*
138− * Several of the IXP2000 systems have banked flash so we need to extend the
139− * flash_platform_data structure with some private pointers
140− */
141−struct ixp2000_flash_data {
142− struct flash_platform_data *platform_data;
143− int nr_banks;
144− unsigned long (*bank_setup)(unsigned long);
145−};
146−
147−struct ixp2000_i2c_pins {
148− unsigned long sda_pin;
149− unsigned long scl_pin;
150−};
151−
152−
153−#endif /* !__ASSEMBLY__ */
arch/arm/mach-ixp2000/include/mach/timex.h+0−13
@@ -1,13 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/timex.h
3− *
4− * IXP2000 architecture timex specifications
5− */
6−
7−
8−/*
9− * Default clock is 50MHz APB, but platform code can override this
10− */
11−#define CLOCK_TICK_RATE 50000000
12−
13−
arch/arm/mach-ixp2000/include/mach/uncompress.h+0−47
@@ -1,47 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/include/mach/uncompress.h
3− *
4− *
5− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
6− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2002 Intel Corp.
9− *
10− * This program is free software; you can redistribute it and/or modify it
11− * under the terms of the GNU General Public License as published by the
12− * Free Software Foundation; either version 2 of the License, or (at your
13− * option) any later version.
14− *
15− */
16−
17−#include <linux/serial_reg.h>
18−
19−#define UART_BASE 0xc0030000
20−
21−#define PHYS(x) ((volatile unsigned long *)(UART_BASE + x))
22−
23−#define UARTDR PHYS(0x00) /* Transmit reg dlab=0 */
24−#define UARTDLL PHYS(0x00) /* Divisor Latch reg dlab=1*/
25−#define UARTDLM PHYS(0x04) /* Divisor Latch reg dlab=1*/
26−#define UARTIER PHYS(0x04) /* Interrupt enable reg */
27−#define UARTFCR PHYS(0x08) /* FIFO control reg dlab =0*/
28−#define UARTLCR PHYS(0x0c) /* Control reg */
29−#define UARTSR PHYS(0x14) /* Status reg */
30−
31−
32−static inline void putc(int c)
33−{
34− int j = 0x1000;
35−
36− while (--j && !(*UARTSR & UART_LSR_THRE))
37− barrier();
38−
39− *UARTDR = c;
40−}
41−
42−static inline void flush(void)
43−{
44−}
45−
46−#define arch_decomp_setup()
47−#define arch_decomp_wdog()
arch/arm/mach-ixp2000/ixdp2400.c+0−180
@@ -1,180 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/ixdp2400.c
3− *
4− * IXDP2400 platform support
5− *
6− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8− *
9− * Copyright (C) 2002 Intel Corp.
10− * Copyright (C) 2003-2004 MontaVista Software, Inc.
11− *
12− * This program is free software; you can redistribute it and/or modify it
13− * under the terms of the GNU General Public License as published by the
14− * Free Software Foundation; either version 2 of the License, or (at your
15− * option) any later version.
16− */
17−#include <linux/kernel.h>
18−#include <linux/init.h>
19−#include <linux/mm.h>
20−#include <linux/sched.h>
21−#include <linux/interrupt.h>
22−#include <linux/device.h>
23−#include <linux/bitops.h>
24−#include <linux/pci.h>
25−#include <linux/ioport.h>
26−#include <linux/delay.h>
27−#include <linux/io.h>
28−
29−#include <asm/irq.h>
30−#include <asm/pgtable.h>
31−#include <asm/page.h>
32−#include <mach/hardware.h>
33−#include <asm/mach-types.h>
34−
35−#include <asm/mach/pci.h>
36−#include <asm/mach/map.h>
37−#include <asm/mach/irq.h>
38−#include <asm/mach/time.h>
39−#include <asm/mach/flash.h>
40−#include <asm/mach/arch.h>
41−
42−/*************************************************************************
43− * IXDP2400 timer tick
44− *************************************************************************/
45−static void __init ixdp2400_timer_init(void)
46−{
47− int numerator, denominator;
48− int denom_array[] = {2, 4, 8, 16, 1, 2, 4, 8};
49−
50− numerator = (*(IXDP2400_CPLD_SYS_CLK_M) & 0xFF) *2;
51− denominator = denom_array[(*(IXDP2400_CPLD_SYS_CLK_N) & 0x7)];
52−
53− ixp2000_init_time(((3125000 * numerator) / (denominator)) / 2);
54−}
55−
56−static struct sys_timer ixdp2400_timer = {
57− .init = ixdp2400_timer_init,
58− .offset = ixp2000_gettimeoffset,
59−};
60−
61−/*************************************************************************
62− * IXDP2400 PCI
63− *************************************************************************/
64−void __init ixdp2400_pci_preinit(void)
65−{
66− ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
67− ixp2000_pci_preinit();
68− pcibios_setup("firmware");
69−}
70−
71−int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys)
72−{
73− sys->mem_offset = 0xe0000000;
74−
75− ixp2000_pci_setup(nr, sys);
76−
77− return 1;
78−}
79−
80−static int __init ixdp2400_pci_map_irq(const struct pci_dev *dev, u8 slot,
81− u8 pin)
82−{
83− if (ixdp2x00_master_npu()) {
84−
85− /*
86− * Root bus devices. Slave NPU is only one with interrupt.
87− * Everything else, we just return -1 b/c nothing else
88− * on the root bus has interrupts.
89− */
90− if(!dev->bus->self) {
91− if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN )
92− return IRQ_IXDP2400_INGRESS_NPU;
93−
94− return -1;
95− }
96−
97− /*
98− * Bridge behind the PMC slot.
99− * NOTE: Only INTA from the PMC slot is routed. VERY BAD.
100− */
101− if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN &&
102− dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN &&
103− !dev->bus->parent->self->bus->parent)
104− return IRQ_IXDP2400_PMC;
105−
106− /*
107− * Device behind the first bridge
108− */
109− if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) {
110− switch(dev->devfn) {
111− case IXDP2400_MASTER_ENET_DEVFN:
112− return IRQ_IXDP2400_ENET;
113−
114− case IXDP2400_MEDIA_DEVFN:
115− return IRQ_IXDP2400_MEDIA_PCI;
116−
117− case IXDP2400_SWITCH_FABRIC_DEVFN:
118− return IRQ_IXDP2400_SF_PCI;
119−
120− case IXDP2X00_PMC_DEVFN:
121− return IRQ_IXDP2400_PMC;
122− }
123− }
124−
125− return -1;
126− } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */
127−}
128−
129−
130−static void ixdp2400_pci_postinit(void)
131−{
132− struct pci_dev *dev;
133−
134− if (ixdp2x00_master_npu()) {
135− dev = pci_get_bus_and_slot(1, IXDP2400_SLAVE_ENET_DEVFN);
136− pci_stop_and_remove_bus_device(dev);
137− pci_dev_put(dev);
138− } else {
139− dev = pci_get_bus_and_slot(1, IXDP2400_MASTER_ENET_DEVFN);
140− pci_stop_and_remove_bus_device(dev);
141− pci_dev_put(dev);
142−
143− ixdp2x00_slave_pci_postinit();
144− }
145−}
146−
147−static struct hw_pci ixdp2400_pci __initdata = {
148− .nr_controllers = 1,
149− .ops = &ixp2000_pci_ops,
150− .setup = ixdp2400_pci_setup,
151− .preinit = ixdp2400_pci_preinit,
152− .postinit = ixdp2400_pci_postinit,
153− .map_irq = ixdp2400_pci_map_irq,
154−};
155−
156−int __init ixdp2400_pci_init(void)
157−{
158− if (machine_is_ixdp2400())
159− pci_common_init(&ixdp2400_pci);
160−
161− return 0;
162−}
163−
164−subsys_initcall(ixdp2400_pci_init);
165−
166−void __init ixdp2400_init_irq(void)
167−{
168− ixdp2x00_init_irq(IXDP2400_CPLD_INT_STAT, IXDP2400_CPLD_INT_MASK, IXDP2400_NR_IRQS);
169−}
170−
171−MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform")
172− /* Maintainer: MontaVista Software, Inc. */
173− .atag_offset = 0x100,
174− .map_io = ixdp2x00_map_io,
175− .init_irq = ixdp2400_init_irq,
176− .timer = &ixdp2400_timer,
177− .init_machine = ixdp2x00_init_machine,
178− .restart = ixp2000_restart,
179−MACHINE_END
180−
arch/arm/mach-ixp2000/ixdp2800.c+0−295
@@ -1,295 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/ixdp2800.c
3− *
4− * IXDP2800 platform support
5− *
6− * Original Author: Jeffrey Daly <jeffrey.daly@intel.com>
7− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8− *
9− * Copyright (C) 2002 Intel Corp.
10− * Copyright (C) 2003-2004 MontaVista Software, Inc.
11− *
12− * This program is free software; you can redistribute it and/or modify it
13− * under the terms of the GNU General Public License as published by the
14− * Free Software Foundation; either version 2 of the License, or (at your
15− * option) any later version.
16− */
17−#include <linux/kernel.h>
18−#include <linux/init.h>
19−#include <linux/mm.h>
20−#include <linux/sched.h>
21−#include <linux/interrupt.h>
22−#include <linux/device.h>
23−#include <linux/bitops.h>
24−#include <linux/pci.h>
25−#include <linux/ioport.h>
26−#include <linux/delay.h>
27−#include <linux/io.h>
28−
29−#include <asm/irq.h>
30−#include <asm/pgtable.h>
31−#include <asm/page.h>
32−#include <mach/hardware.h>
33−#include <asm/mach-types.h>
34−
35−#include <asm/mach/pci.h>
36−#include <asm/mach/map.h>
37−#include <asm/mach/irq.h>
38−#include <asm/mach/time.h>
39−#include <asm/mach/flash.h>
40−#include <asm/mach/arch.h>
41−
42−/*************************************************************************
43− * IXDP2800 timer tick
44− *************************************************************************/
45−
46−static void __init ixdp2800_timer_init(void)
47−{
48− ixp2000_init_time(50000000);
49−}
50−
51−static struct sys_timer ixdp2800_timer = {
52− .init = ixdp2800_timer_init,
53− .offset = ixp2000_gettimeoffset,
54−};
55−
56−/*************************************************************************
57− * IXDP2800 PCI
58− *************************************************************************/
59−static void __init ixdp2800_slave_disable_pci_master(void)
60−{
61− *IXP2000_PCI_CMDSTAT &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
62−}
63−
64−static void __init ixdp2800_master_wait_for_slave(void)
65−{
66− volatile u32 *addr;
67−
68− printk(KERN_INFO "IXDP2800: waiting for slave NPU to configure "
69− "its BAR sizes\n");
70−
71− addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN,
72− PCI_BASE_ADDRESS_1);
73− do {
74− *addr = 0xffffffff;
75− cpu_relax();
76− } while (*addr != 0xfe000008);
77−
78− addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN,
79− PCI_BASE_ADDRESS_2);
80− do {
81− *addr = 0xffffffff;
82− cpu_relax();
83− } while (*addr != 0xc0000008);
84−
85− /*
86− * Configure the slave's SDRAM BAR by hand.
87− */
88− *addr = 0x40000008;
89−}
90−
91−static void __init ixdp2800_slave_wait_for_master_enable(void)
92−{
93− printk(KERN_INFO "IXDP2800: waiting for master NPU to enable us\n");
94−
95− while ((*IXP2000_PCI_CMDSTAT & PCI_COMMAND_MASTER) == 0)
96− cpu_relax();
97−}
98−
99−void __init ixdp2800_pci_preinit(void)
100−{
101− printk("ixdp2x00_pci_preinit called\n");
102−
103− *IXP2000_PCI_ADDR_EXT = 0x0001e000;
104−
105− if (!ixdp2x00_master_npu())
106− ixdp2800_slave_disable_pci_master();
107−
108− *IXP2000_PCI_SRAM_BASE_ADDR_MASK = (0x2000000 - 1) & ~0x3ffff;
109− *IXP2000_PCI_DRAM_BASE_ADDR_MASK = (0x40000000 - 1) & ~0xfffff;
110−
111− ixp2000_pci_preinit();
112−
113− if (ixdp2x00_master_npu()) {
114− /*
115− * Wait until the slave set its SRAM/SDRAM BAR sizes
116− * correctly before we proceed to scan and enumerate
117− * the bus.
118− */
119− ixdp2800_master_wait_for_slave();
120−
121− /*
122− * We configure the SDRAM BARs by hand because they
123− * are 1G and fall outside of the regular allocated
124− * PCI address space.
125− */
126− *IXP2000_PCI_SDRAM_BAR = 0x00000008;
127− } else {
128− /*
129− * Wait for the master to complete scanning the bus
130− * and assigning resources before we proceed to scan
131− * the bus ourselves. Set pci=firmware to honor the
132− * master's resource assignment.
133− */
134− ixdp2800_slave_wait_for_master_enable();
135− pcibios_setup("firmware");
136− }
137−}
138−
139−/*
140− * We assign the SDRAM BARs for the two IXP2800 CPUs by hand, outside
141− * of the regular PCI window, because there's only 512M of outbound PCI
142− * memory window on each IXP, while we need 1G for each of the BARs.
143− */
144−static void __devinit ixp2800_pci_fixup(struct pci_dev *dev)
145−{
146− if (machine_is_ixdp2800()) {
147− dev->resource[2].start = 0;
148− dev->resource[2].end = 0;
149− dev->resource[2].flags = 0;
150− }
151−}
152−DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IXP2800, ixp2800_pci_fixup);
153−
154−static int __init ixdp2800_pci_setup(int nr, struct pci_sys_data *sys)
155−{
156− sys->mem_offset = 0x00000000;
157−
158− ixp2000_pci_setup(nr, sys);
159−
160− return 1;
161−}
162−
163−static int __init ixdp2800_pci_map_irq(const struct pci_dev *dev, u8 slot,
164− u8 pin)
165−{
166− if (ixdp2x00_master_npu()) {
167−
168− /*
169− * Root bus devices. Slave NPU is only one with interrupt.
170− * Everything else, we just return -1 which is invalid.
171− */
172− if(!dev->bus->self) {
173− if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN )
174− return IRQ_IXDP2800_INGRESS_NPU;
175−
176− return -1;
177− }
178−
179− /*
180− * Bridge behind the PMC slot.
181− */
182− if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN &&
183− dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN &&
184− !dev->bus->parent->self->bus->parent)
185− return IRQ_IXDP2800_PMC;
186−
187− /*
188− * Device behind the first bridge
189− */
190− if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) {
191− switch(dev->devfn) {
192− case IXDP2X00_PMC_DEVFN:
193− return IRQ_IXDP2800_PMC;
194−
195− case IXDP2800_MASTER_ENET_DEVFN:
196− return IRQ_IXDP2800_EGRESS_ENET;
197−
198− case IXDP2800_SWITCH_FABRIC_DEVFN:
199− return IRQ_IXDP2800_FABRIC;
200− }
201− }
202−
203− return -1;
204− } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */
205−}
206−
207−static void __init ixdp2800_master_enable_slave(void)
208−{
209− volatile u32 *addr;
210−
211− printk(KERN_INFO "IXDP2800: enabling slave NPU\n");
212−
213− addr = (volatile u32 *)ixp2000_pci_config_addr(0,
214− IXDP2X00_SLAVE_NPU_DEVFN,
215− PCI_COMMAND);
216−
217− *addr |= PCI_COMMAND_MASTER;
218−}
219−
220−static void __init ixdp2800_master_wait_for_slave_bus_scan(void)
221−{
222− volatile u32 *addr;
223−
224− printk(KERN_INFO "IXDP2800: waiting for slave to finish bus scan\n");
225−
226− addr = (volatile u32 *)ixp2000_pci_config_addr(0,
227− IXDP2X00_SLAVE_NPU_DEVFN,
228− PCI_COMMAND);
229− while ((*addr & PCI_COMMAND_MEMORY) == 0)
230− cpu_relax();
231−}
232−
233−static void __init ixdp2800_slave_signal_bus_scan_completion(void)
234−{
235− printk(KERN_INFO "IXDP2800: bus scan done, signaling master\n");
236− *IXP2000_PCI_CMDSTAT |= PCI_COMMAND_MEMORY;
237−}
238−
239−static void __init ixdp2800_pci_postinit(void)
240−{
241− if (!ixdp2x00_master_npu()) {
242− ixdp2x00_slave_pci_postinit();
243− ixdp2800_slave_signal_bus_scan_completion();
244− }
245−}
246−
247−struct __initdata hw_pci ixdp2800_pci __initdata = {
248− .nr_controllers = 1,
249− .ops = &ixp2000_pci_ops,
250− .setup = ixdp2800_pci_setup,
251− .preinit = ixdp2800_pci_preinit,
252− .postinit = ixdp2800_pci_postinit,
253− .map_irq = ixdp2800_pci_map_irq,
254−};
255−
256−int __init ixdp2800_pci_init(void)
257−{
258− if (machine_is_ixdp2800()) {
259− struct pci_dev *dev;
260−
261− pci_common_init(&ixdp2800_pci);
262− if (ixdp2x00_master_npu()) {
263− dev = pci_get_bus_and_slot(1, IXDP2800_SLAVE_ENET_DEVFN);
264− pci_stop_and_remove_bus_device(dev);
265− pci_dev_put(dev);
266−
267− ixdp2800_master_enable_slave();
268− ixdp2800_master_wait_for_slave_bus_scan();
269− } else {
270− dev = pci_get_bus_and_slot(1, IXDP2800_MASTER_ENET_DEVFN);
271− pci_stop_and_remove_bus_device(dev);
272− pci_dev_put(dev);
273− }
274− }
275−
276− return 0;
277−}
278−
279−subsys_initcall(ixdp2800_pci_init);
280−
281−void __init ixdp2800_init_irq(void)
282−{
283− ixdp2x00_init_irq(IXDP2800_CPLD_INT_STAT, IXDP2800_CPLD_INT_MASK, IXDP2800_NR_IRQS);
284−}
285−
286−MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform")
287− /* Maintainer: MontaVista Software, Inc. */
288− .atag_offset = 0x100,
289− .map_io = ixdp2x00_map_io,
290− .init_irq = ixdp2800_init_irq,
291− .timer = &ixdp2800_timer,
292− .init_machine = ixdp2x00_init_machine,
293− .restart = ixp2000_restart,
294−MACHINE_END
295−
arch/arm/mach-ixp2000/ixdp2x00.c+0−306
@@ -1,306 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/ixdp2x00.c
3− *
4− * Code common to IXDP2400 and IXDP2800 platforms.
5− *
6− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8− *
9− * Copyright (C) 2002 Intel Corp.
10− * Copyright (C) 2003-2004 MontaVista Software, Inc.
11− *
12− * This program is free software; you can redistribute it and/or modify it
13− * under the terms of the GNU General Public License as published by the
14− * Free Software Foundation; either version 2 of the License, or (at your
15− * option) any later version.
16− */
17−#include <linux/gpio.h>
18−#include <linux/kernel.h>
19−#include <linux/init.h>
20−#include <linux/mm.h>
21−#include <linux/sched.h>
22−#include <linux/interrupt.h>
23−#include <linux/platform_device.h>
24−#include <linux/bitops.h>
25−#include <linux/pci.h>
26−#include <linux/ioport.h>
27−#include <linux/delay.h>
28−#include <linux/io.h>
29−
30−#include <asm/irq.h>
31−#include <asm/pgtable.h>
32−#include <asm/page.h>
33−#include <mach/hardware.h>
34−#include <asm/mach-types.h>
35−
36−#include <asm/mach/pci.h>
37−#include <asm/mach/map.h>
38−#include <asm/mach/irq.h>
39−#include <asm/mach/time.h>
40−#include <asm/mach/flash.h>
41−#include <asm/mach/arch.h>
42−
43−#include <mach/gpio-ixp2000.h>
44−
45−/*************************************************************************
46− * IXDP2x00 IRQ Initialization
47− *************************************************************************/
48−static volatile unsigned long *board_irq_mask;
49−static volatile unsigned long *board_irq_stat;
50−static unsigned long board_irq_count;
51−
52−#ifdef CONFIG_ARCH_IXDP2400
53−/*
54− * Slowport configuration for accessing CPLD registers on IXDP2x00
55− */
56−static struct slowport_cfg slowport_cpld_cfg = {
57− .CCR = SLOWPORT_CCR_DIV_2,
58− .WTC = 0x00000070,
59− .RTC = 0x00000070,
60− .PCR = SLOWPORT_MODE_FLASH,
61− .ADC = SLOWPORT_ADDR_WIDTH_24 | SLOWPORT_DATA_WIDTH_8
62−};
63−#endif
64−
65−static void ixdp2x00_irq_mask(struct irq_data *d)
66−{
67− unsigned long dummy;
68− static struct slowport_cfg old_cfg;
69−
70− /*
71− * This is ugly in common code but really don't know
72− * of a better way to handle it. :(
73− */
74−#ifdef CONFIG_ARCH_IXDP2400
75− if (machine_is_ixdp2400())
76− ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg);
77−#endif
78−
79− dummy = *board_irq_mask;
80− dummy |= IXP2000_BOARD_IRQ_MASK(d->irq);
81− ixp2000_reg_wrb(board_irq_mask, dummy);
82−
83−#ifdef CONFIG_ARCH_IXDP2400
84− if (machine_is_ixdp2400())
85− ixp2000_release_slowport(&old_cfg);
86−#endif
87−}
88−
89−static void ixdp2x00_irq_unmask(struct irq_data *d)
90−{
91− unsigned long dummy;
92− static struct slowport_cfg old_cfg;
93−
94−#ifdef CONFIG_ARCH_IXDP2400
95− if (machine_is_ixdp2400())
96− ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg);
97−#endif
98−
99− dummy = *board_irq_mask;
100− dummy &= ~IXP2000_BOARD_IRQ_MASK(d->irq);
101− ixp2000_reg_wrb(board_irq_mask, dummy);
102−
103− if (machine_is_ixdp2400())
104− ixp2000_release_slowport(&old_cfg);
105−}
106−
107−static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc)
108−{
109− volatile u32 ex_interrupt = 0;
110− static struct slowport_cfg old_cfg;
111− int i;
112−
113− desc->irq_data.chip->irq_mask(&desc->irq_data);
114−
115−#ifdef CONFIG_ARCH_IXDP2400
116− if (machine_is_ixdp2400())
117− ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg);
118−#endif
119− ex_interrupt = *board_irq_stat & 0xff;
120− if (machine_is_ixdp2400())
121− ixp2000_release_slowport(&old_cfg);
122−
123− if(!ex_interrupt) {
124− printk(KERN_ERR "Spurious IXDP2x00 CPLD interrupt!\n");
125− return;
126− }
127−
128− for(i = 0; i < board_irq_count; i++) {
129− if(ex_interrupt & (1 << i)) {
130− int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
131− generic_handle_irq(cpld_irq);
132− }
133− }
134−
135− desc->irq_data.chip->irq_unmask(&desc->irq_data);
136−}
137−
138−static struct irq_chip ixdp2x00_cpld_irq_chip = {
139− .irq_ack = ixdp2x00_irq_mask,
140− .irq_mask = ixdp2x00_irq_mask,
141− .irq_unmask = ixdp2x00_irq_unmask
142−};
143−
144−void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs)
145−{
146− unsigned int irq;
147−
148− ixp2000_init_irq();
149−
150− if (!ixdp2x00_master_npu())
151− return;
152−
153− board_irq_stat = stat_reg;
154− board_irq_mask = mask_reg;
155− board_irq_count = nr_of_irqs;
156−
157− *board_irq_mask = 0xffffffff;
158−
159− for(irq = IXP2000_BOARD_IRQ(0); irq < IXP2000_BOARD_IRQ(board_irq_count); irq++) {
160− irq_set_chip_and_handler(irq, &ixdp2x00_cpld_irq_chip,
161− handle_level_irq);
162− set_irq_flags(irq, IRQF_VALID);
163− }
164−
165− /* Hook into PCI interrupt */
166− irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler);
167−}
168−
169−/*************************************************************************
170− * IXDP2x00 memory map
171− *************************************************************************/
172−static struct map_desc ixdp2x00_io_desc __initdata = {
173− .virtual = IXDP2X00_VIRT_CPLD_BASE,
174− .pfn = __phys_to_pfn(IXDP2X00_PHYS_CPLD_BASE),
175− .length = IXDP2X00_CPLD_SIZE,
176− .type = MT_DEVICE
177−};
178−
179−void __init ixdp2x00_map_io(void)
180−{
181− ixp2000_map_io();
182−
183− iotable_init(&ixdp2x00_io_desc, 1);
184−}
185−
186−/*************************************************************************
187− * IXDP2x00-common PCI init
188− *
189− * The IXDP2[48]00 has a horrid PCI bus layout. Basically the board
190− * contains two NPUs (ingress and egress) connected over PCI, both running
191− * instances of the kernel. So far so good. Peers on the PCI bus running
192− * Linux is a common design in telecom systems. The problem is that instead
193− * of all the devices being controlled by a single host, different
194− * devices are controlled by different NPUs on the same bus, leading to
195− * multiple hosts on the bus. The exact bus layout looks like:
196− *
197− * Bus 0
198− * Master NPU <-------------------+-------------------> Slave NPU
199− * |
200− * |
201− * P2P
202− * |
203− *
204− * Bus 1 |
205− * <--+------+---------+---------+------+-->
206− * | | | | |
207− * | | | | |
208− * ... Dev PMC Media Eth0 Eth1 ...
209− *
210− * The master controls all but Eth1, which is controlled by the
211− * slave. What this means is that the both the master and the slave
212− * have to scan the bus, but only one of them can enumerate the bus.
213− * In addition, after the bus is scanned, each kernel must remove
214− * the device(s) it does not control from the PCI dev list otherwise
215− * a driver on each NPU will try to manage it and we will have horrible
216− * conflicts. Oh..and the slave NPU needs to see the master NPU
217− * for Intel's drivers to work properly. Closed source drivers...
218− *
219− * The way we deal with this is fairly simple but ugly:
220− *
221− * 1) Let master scan and enumerate the bus completely.
222− * 2) Master deletes Eth1 from device list.
223− * 3) Slave scans bus and then deletes all but Eth1 (Eth0 on slave)
224− * from device list.
225− * 4) Find HW designers and LART them.
226− *
227− * The boards also do not do normal PCI IRQ routing, or any sort of
228− * sensical swizzling, so we just need to check where on the bus a
229− * device sits and figure out to which CPLD pin the interrupt is routed.
230− * See ixdp2[48]00.c files.
231− *
232− *************************************************************************/
233−void ixdp2x00_slave_pci_postinit(void)
234−{
235− struct pci_dev *dev;
236−
237− /*
238− * Remove PMC device is there is one
239− */
240− if((dev = pci_get_bus_and_slot(1, IXDP2X00_PMC_DEVFN))) {
241− pci_stop_and_remove_bus_device(dev);
242− pci_dev_put(dev);
243− }
244−
245− dev = pci_get_bus_and_slot(0, IXDP2X00_21555_DEVFN);
246− pci_stop_and_remove_bus_device(dev);
247− pci_dev_put(dev);
248−}
249−
250−/**************************************************************************
251− * IXDP2x00 Machine Setup
252− *************************************************************************/
253−static struct flash_platform_data ixdp2x00_platform_data = {
254− .map_name = "cfi_probe",
255− .width = 1,
256−};
257−
258−static struct ixp2000_flash_data ixdp2x00_flash_data = {
259− .platform_data = &ixdp2x00_platform_data,
260− .nr_banks = 1
261−};
262−
263−static struct resource ixdp2x00_flash_resource = {
264− .start = 0xc4000000,
265− .end = 0xc4000000 + 0x00ffffff,
266− .flags = IORESOURCE_MEM,
267−};
268−
269−static struct platform_device ixdp2x00_flash = {
270− .name = "IXP2000-Flash",
271− .id = 0,
272− .dev = {
273− .platform_data = &ixdp2x00_flash_data,
274− },
275− .num_resources = 1,
276− .resource = &ixdp2x00_flash_resource,
277−};
278−
279−static struct ixp2000_i2c_pins ixdp2x00_i2c_gpio_pins = {
280− .sda_pin = IXDP2X00_GPIO_SDA,
281− .scl_pin = IXDP2X00_GPIO_SCL,
282−};
283−
284−static struct platform_device ixdp2x00_i2c_controller = {
285− .name = "IXP2000-I2C",
286− .id = 0,
287− .dev = {
288− .platform_data = &ixdp2x00_i2c_gpio_pins,
289− },
290− .num_resources = 0
291−};
292−
293−static struct platform_device *ixdp2x00_devices[] __initdata = {
294− &ixdp2x00_flash,
295− &ixdp2x00_i2c_controller
296−};
297−
298−void __init ixdp2x00_init_machine(void)
299−{
300− gpio_line_set(IXDP2X00_GPIO_I2C_ENABLE, 1);
301− gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT);
302−
303− platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices));
304− ixp2000_uart_init();
305−}
306−
arch/arm/mach-ixp2000/ixdp2x01.c+0−483
@@ -1,483 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/ixdp2x01.c
3− *
4− * Code common to Intel IXDP2401 and IXDP2801 platforms
5− *
6− * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com>
7− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8− *
9− * Copyright (C) 2002-2003 Intel Corp.
10− * Copyright (C) 2003-2004 MontaVista Software, Inc.
11− *
12− * This program is free software; you can redistribute it and/or modify it
13− * under the terms of the GNU General Public License as published by the
14− * Free Software Foundation; either version 2 of the License, or (at your
15− * option) any later version.
16− */
17−
18−#include <linux/kernel.h>
19−#include <linux/init.h>
20−#include <linux/mm.h>
21−#include <linux/sched.h>
22−#include <linux/interrupt.h>
23−#include <linux/bitops.h>
24−#include <linux/pci.h>
25−#include <linux/ioport.h>
26−#include <linux/delay.h>
27−#include <linux/serial.h>
28−#include <linux/tty.h>
29−#include <linux/serial_core.h>
30−#include <linux/platform_device.h>
31−#include <linux/serial_8250.h>
32−#include <linux/io.h>
33−
34−#include <asm/irq.h>
35−#include <asm/pgtable.h>
36−#include <asm/page.h>
37−#include <mach/hardware.h>
38−#include <asm/mach-types.h>
39−
40−#include <asm/mach/pci.h>
41−#include <asm/mach/map.h>
42−#include <asm/mach/irq.h>
43−#include <asm/mach/time.h>
44−#include <asm/mach/arch.h>
45−#include <asm/mach/flash.h>
46−
47−/*************************************************************************
48− * IXDP2x01 IRQ Handling
49− *************************************************************************/
50−static void ixdp2x01_irq_mask(struct irq_data *d)
51−{
52− ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG,
53− IXP2000_BOARD_IRQ_MASK(d->irq));
54−}
55−
56−static void ixdp2x01_irq_unmask(struct irq_data *d)
57−{
58− ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG,
59− IXP2000_BOARD_IRQ_MASK(d->irq));
60−}
61−
62−static u32 valid_irq_mask;
63−
64−static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc)
65−{
66− u32 ex_interrupt;
67− int i;
68−
69− desc->irq_data.chip->irq_mask(&desc->irq_data);
70−
71− ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask;
72−
73− if (!ex_interrupt) {
74− printk(KERN_ERR "Spurious IXDP2X01 CPLD interrupt!\n");
75− return;
76− }
77−
78− for (i = 0; i < IXP2000_BOARD_IRQS; i++) {
79− if (ex_interrupt & (1 << i)) {
80− int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
81− generic_handle_irq(cpld_irq);
82− }
83− }
84−
85− desc->irq_data.chip->irq_unmask(&desc->irq_data);
86−}
87−
88−static struct irq_chip ixdp2x01_irq_chip = {
89− .irq_mask = ixdp2x01_irq_mask,
90− .irq_ack = ixdp2x01_irq_mask,
91− .irq_unmask = ixdp2x01_irq_unmask
92−};
93−
94−/*
95− * We only do anything if we are the master NPU on the board.
96− * The slave NPU only has the ethernet chip going directly to
97− * the PCIB interrupt input.
98− */
99−void __init ixdp2x01_init_irq(void)
100−{
101− int irq = 0;
102−
103− /* initialize chip specific interrupts */
104− ixp2000_init_irq();
105−
106− if (machine_is_ixdp2401())
107− valid_irq_mask = IXDP2401_VALID_IRQ_MASK;
108− else
109− valid_irq_mask = IXDP2801_VALID_IRQ_MASK;
110−
111− /* Mask all interrupts from CPLD, disable simulation */
112− ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, 0xffffffff);
113− ixp2000_reg_wrb(IXDP2X01_INT_SIM_REG, 0);
114−
115− for (irq = NR_IXP2000_IRQS; irq < NR_IXDP2X01_IRQS; irq++) {
116− if (irq & valid_irq_mask) {
117− irq_set_chip_and_handler(irq, &ixdp2x01_irq_chip,
118− handle_level_irq);
119− set_irq_flags(irq, IRQF_VALID);
120− } else {
121− set_irq_flags(irq, 0);
122− }
123− }
124−
125− /* Hook into PCI interrupts */
126− irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler);
127−}
128−
129−
130−/*************************************************************************
131− * IXDP2x01 memory map
132− *************************************************************************/
133−static struct map_desc ixdp2x01_io_desc __initdata = {
134− .virtual = IXDP2X01_VIRT_CPLD_BASE,
135− .pfn = __phys_to_pfn(IXDP2X01_PHYS_CPLD_BASE),
136− .length = IXDP2X01_CPLD_REGION_SIZE,
137− .type = MT_DEVICE
138−};
139−
140−static void __init ixdp2x01_map_io(void)
141−{
142− ixp2000_map_io();
143− iotable_init(&ixdp2x01_io_desc, 1);
144−}
145−
146−
147−/*************************************************************************
148− * IXDP2x01 serial ports
149− *************************************************************************/
150−static struct plat_serial8250_port ixdp2x01_serial_port1[] = {
151− {
152− .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE,
153− .membase = (char *)IXDP2X01_UART1_VIRT_BASE,
154− .irq = IRQ_IXDP2X01_UART1,
155− .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
156− .iotype = UPIO_MEM32,
157− .regshift = 2,
158− .uartclk = IXDP2X01_UART_CLK,
159− },
160− { }
161−};
162−
163−static struct resource ixdp2x01_uart_resource1 = {
164− .start = IXDP2X01_UART1_PHYS_BASE,
165− .end = IXDP2X01_UART1_PHYS_BASE + 0xffff,
166− .flags = IORESOURCE_MEM,
167−};
168−
169−static struct platform_device ixdp2x01_serial_device1 = {
170− .name = "serial8250",
171− .id = PLAT8250_DEV_PLATFORM1,
172− .dev = {
173− .platform_data = ixdp2x01_serial_port1,
174− },
175− .num_resources = 1,
176− .resource = &ixdp2x01_uart_resource1,
177−};
178−
179−static struct plat_serial8250_port ixdp2x01_serial_port2[] = {
180− {
181− .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE,
182− .membase = (char *)IXDP2X01_UART2_VIRT_BASE,
183− .irq = IRQ_IXDP2X01_UART2,
184− .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
185− .iotype = UPIO_MEM32,
186− .regshift = 2,
187− .uartclk = IXDP2X01_UART_CLK,
188− },
189− { }
190−};
191−
192−static struct resource ixdp2x01_uart_resource2 = {
193− .start = IXDP2X01_UART2_PHYS_BASE,
194− .end = IXDP2X01_UART2_PHYS_BASE + 0xffff,
195− .flags = IORESOURCE_MEM,
196−};
197−
198−static struct platform_device ixdp2x01_serial_device2 = {
199− .name = "serial8250",
200− .id = PLAT8250_DEV_PLATFORM2,
201− .dev = {
202− .platform_data = ixdp2x01_serial_port2,
203− },
204− .num_resources = 1,
205− .resource = &ixdp2x01_uart_resource2,
206−};
207−
208−static void ixdp2x01_uart_init(void)
209−{
210− platform_device_register(&ixdp2x01_serial_device1);
211− platform_device_register(&ixdp2x01_serial_device2);
212−}
213−
214−
215−/*************************************************************************
216− * IXDP2x01 timer tick configuration
217− *************************************************************************/
218−static unsigned int ixdp2x01_clock;
219−
220−static int __init ixdp2x01_clock_setup(char *str)
221−{
222− ixdp2x01_clock = simple_strtoul(str, NULL, 10);
223−
224− return 1;
225−}
226−
227−__setup("ixdp2x01_clock=", ixdp2x01_clock_setup);
228−
229−static void __init ixdp2x01_timer_init(void)
230−{
231− if (!ixdp2x01_clock)
232− ixdp2x01_clock = 50000000;
233−
234− ixp2000_init_time(ixdp2x01_clock);
235−}
236−
237−static struct sys_timer ixdp2x01_timer = {
238− .init = ixdp2x01_timer_init,
239− .offset = ixp2000_gettimeoffset,
240−};
241−
242−/*************************************************************************
243− * IXDP2x01 PCI
244− *************************************************************************/
245−void __init ixdp2x01_pci_preinit(void)
246−{
247− ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000);
248− ixp2000_pci_preinit();
249− pcibios_setup("firmware");
250−}
251−
252−#define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
253−
254−static int __init ixdp2x01_pci_map_irq(const struct pci_dev *dev, u8 slot,
255− u8 pin)
256−{
257− u8 bus = dev->bus->number;
258− u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin);
259− struct pci_bus *tmp_bus = dev->bus;
260−
261− /* Primary bus, no interrupts here */
262− if (bus == 0) {
263− return -1;
264− }
265−
266− /* Lookup first leaf in bus tree */
267− while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL)) {
268− tmp_bus = tmp_bus->parent;
269− }
270−
271− /* Select between known bridges */
272− switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) {
273− /* Device is located after first MB bridge */
274− case 0x0008:
275− if (tmp_bus == dev->bus) {
276− /* Device is located directly after first MB bridge */
277− switch (devpin) {
278− case DEVPIN(1, 1): /* Onboard 82546 ch 0 */
279− if (machine_is_ixdp2401())
280− return IRQ_IXDP2401_INTA_82546;
281− return -1;
282− case DEVPIN(1, 2): /* Onboard 82546 ch 1 */
283− if (machine_is_ixdp2401())
284− return IRQ_IXDP2401_INTB_82546;
285− return -1;
286− case DEVPIN(0, 1): /* PMC INTA# */
287− return IRQ_IXDP2X01_SPCI_PMC_INTA;
288− case DEVPIN(0, 2): /* PMC INTB# */
289− return IRQ_IXDP2X01_SPCI_PMC_INTB;
290− case DEVPIN(0, 3): /* PMC INTC# */
291− return IRQ_IXDP2X01_SPCI_PMC_INTC;
292− case DEVPIN(0, 4): /* PMC INTD# */
293− return IRQ_IXDP2X01_SPCI_PMC_INTD;
294− }
295− }
296− break;
297− case 0x0010:
298− if (tmp_bus == dev->bus) {
299− /* Device is located directly after second MB bridge */
300− /* Secondary bus of second bridge */
301− switch (devpin) {
302− case DEVPIN(0, 1): /* DB#0 */
303− return IRQ_IXDP2X01_SPCI_DB_0;
304− case DEVPIN(1, 1): /* DB#1 */
305− return IRQ_IXDP2X01_SPCI_DB_1;
306− }
307− } else {
308− /* Device is located indirectly after second MB bridge */
309− /* Not supported now */
310− }
311− break;
312− }
313−
314− return -1;
315−}
316−
317−
318−static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys)
319−{
320− sys->mem_offset = 0xe0000000;
321−
322− if (machine_is_ixdp2801() || machine_is_ixdp28x5())
323− sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16);
324−
325− return ixp2000_pci_setup(nr, sys);
326−}
327−
328−struct hw_pci ixdp2x01_pci __initdata = {
329− .nr_controllers = 1,
330− .ops = &ixp2000_pci_ops,
331− .setup = ixdp2x01_pci_setup,
332− .preinit = ixdp2x01_pci_preinit,
333− .map_irq = ixdp2x01_pci_map_irq,
334−};
335−
336−int __init ixdp2x01_pci_init(void)
337−{
338− if (machine_is_ixdp2401() || machine_is_ixdp2801() ||\
339− machine_is_ixdp28x5())
340− pci_common_init(&ixdp2x01_pci);
341−
342− return 0;
343−}
344−
345−subsys_initcall(ixdp2x01_pci_init);
346−
347−/*************************************************************************
348− * IXDP2x01 Machine Initialization
349− *************************************************************************/
350−static struct flash_platform_data ixdp2x01_flash_platform_data = {
351− .map_name = "cfi_probe",
352− .width = 1,
353−};
354−
355−static unsigned long ixdp2x01_flash_bank_setup(unsigned long ofs)
356−{
357− ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG,
358− ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN));
359− return (ofs & IXDP2X01_FLASH_WINDOW_MASK);
360−}
361−
362−static struct ixp2000_flash_data ixdp2x01_flash_data = {
363− .platform_data = &ixdp2x01_flash_platform_data,
364− .bank_setup = ixdp2x01_flash_bank_setup
365−};
366−
367−static struct resource ixdp2x01_flash_resource = {
368− .start = 0xc4000000,
369− .end = 0xc4000000 + 0x01ffffff,
370− .flags = IORESOURCE_MEM,
371−};
372−
373−static struct platform_device ixdp2x01_flash = {
374− .name = "IXP2000-Flash",
375− .id = 0,
376− .dev = {
377− .platform_data = &ixdp2x01_flash_data,
378− },
379− .num_resources = 1,
380− .resource = &ixdp2x01_flash_resource,
381−};
382−
383−static struct ixp2000_i2c_pins ixdp2x01_i2c_gpio_pins = {
384− .sda_pin = IXDP2X01_GPIO_SDA,
385− .scl_pin = IXDP2X01_GPIO_SCL,
386−};
387−
388−static struct platform_device ixdp2x01_i2c_controller = {
389− .name = "IXP2000-I2C",
390− .id = 0,
391− .dev = {
392− .platform_data = &ixdp2x01_i2c_gpio_pins,
393− },
394− .num_resources = 0
395−};
396−
397−static struct platform_device *ixdp2x01_devices[] __initdata = {
398− &ixdp2x01_flash,
399− &ixdp2x01_i2c_controller
400−};
401−
402−static void __init ixdp2x01_init_machine(void)
403−{
404− ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG,
405− (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN));
406−
407− ixdp2x01_flash_data.nr_banks =
408− ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1);
409−
410− platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices));
411− ixp2000_uart_init();
412− ixdp2x01_uart_init();
413−}
414−
415−static void ixdp2401_restart(char mode, const char *cmd)
416−{
417− /*
418− * Reset flash banking register so that we are pointing at
419− * RedBoot bank.
420− */
421− ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
422− ((0 >> IXDP2X01_FLASH_WINDOW_BITS)
423− | IXDP2X01_CPLD_FLASH_INTERN));
424− ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
425−
426− ixp2000_restart(mode, cmd);
427−}
428−
429−static void ixdp280x_restart(char mode, const char *cmd)
430−{
431− /*
432− * On IXDP2801 we need to write this magic sequence to the CPLD
433− * to cause a complete reset of the CPU and all external devices
434− * and move the flash bank register back to 0.
435− */
436− unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
437−
438− reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
439− ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
440− ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
441−
442− ixp2000_restart(mode, cmd);
443−}
444−
445−#ifdef CONFIG_ARCH_IXDP2401
446−MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform")
447− /* Maintainer: MontaVista Software, Inc. */
448− .atag_offset = 0x100,
449− .map_io = ixdp2x01_map_io,
450− .init_irq = ixdp2x01_init_irq,
451− .timer = &ixdp2x01_timer,
452− .init_machine = ixdp2x01_init_machine,
453− .restart = ixdp2401_restart,
454−MACHINE_END
455−#endif
456−
457−#ifdef CONFIG_ARCH_IXDP2801
458−MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform")
459− /* Maintainer: MontaVista Software, Inc. */
460− .atag_offset = 0x100,
461− .map_io = ixdp2x01_map_io,
462− .init_irq = ixdp2x01_init_irq,
463− .timer = &ixdp2x01_timer,
464− .init_machine = ixdp2x01_init_machine,
465− .restart = ixdp280x_restart,
466−MACHINE_END
467−
468−/*
469− * IXDP28x5 is basically an IXDP2801 with a different CPU but Intel
470− * changed the machine ID in the bootloader
471− */
472−MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform")
473− /* Maintainer: MontaVista Software, Inc. */
474− .atag_offset = 0x100,
475− .map_io = ixdp2x01_map_io,
476− .init_irq = ixdp2x01_init_irq,
477− .timer = &ixdp2x01_timer,
478− .init_machine = ixdp2x01_init_machine,
479− .restart = ixdp280x_restart,
480−MACHINE_END
481−#endif
482−
483−
arch/arm/mach-ixp2000/pci.c+0−246
@@ -1,246 +0,0 @@
1−/*
2− * arch/arm/mach-ixp2000/pci.c
3− *
4− * PCI routines for IXDP2400/IXDP2800 boards
5− *
6− * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7− * Maintained by: Deepak Saxena <dsaxena@plexity.net>
8− *
9− * Copyright 2002 Intel Corp.
10− * Copyright (C) 2003-2004 MontaVista Software, Inc.
11− *
12− * This program is free software; you can redistribute it and/or modify it
13− * under the terms of the GNU General Public License as published by the
14− * Free Software Foundation; either version 2 of the License, or (at your
15− * option) any later version.
16− */
17−
18−#include <linux/sched.h>
19−#include <linux/kernel.h>
20−#include <linux/pci.h>
21−#include <linux/interrupt.h>
22−#include <linux/mm.h>
23−#include <linux/init.h>
24−#include <linux/ioport.h>
25−#include <linux/delay.h>
26−#include <linux/io.h>
27−
28−#include <asm/irq.h>
29−#include <mach/hardware.h>
30−
31−#include <asm/mach/pci.h>
32−
33−static volatile int pci_master_aborts = 0;
34−
35−static int clear_master_aborts(void);
36−
37−u32 *
38−ixp2000_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where)
39−{
40− u32 *paddress;
41−
42− if (PCI_SLOT(devfn) > 7)
43− return 0;
44−
45− /* Must be dword aligned */
46− where &= ~3;
47−
48− /*
49− * For top bus, generate type 0, else type 1
50− */
51− if (!bus_nr) {
52− /* only bits[23:16] are used for IDSEL */
53− paddress = (u32 *) (IXP2000_PCI_CFG0_VIRT_BASE
54− | (1 << (PCI_SLOT(devfn) + 16))
55− | (PCI_FUNC(devfn) << 8) | where);
56− } else {
57− paddress = (u32 *) (IXP2000_PCI_CFG1_VIRT_BASE
58− | (bus_nr << 16)
59− | (PCI_SLOT(devfn) << 11)
60− | (PCI_FUNC(devfn) << 8) | where);
61− }
62−
63− return paddress;
64−}
65−
66−/*
67− * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes.
68− * 0 and 3 are not valid indexes...
69− */
70−static u32 bytemask[] = {
71− /*0*/ 0,
72− /*1*/ 0xff,
73− /*2*/ 0xffff,
74− /*3*/ 0,
75− /*4*/ 0xffffffff,
76−};
77−
78−
79−int ixp2000_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where,
80− int size, u32 *value)
81−{
82− u32 n;
83− u32 *addr;
84−
85− n = where % 4;
86−
87− addr = ixp2000_pci_config_addr(bus->number, devfn, where);
88− if (!addr)
89− return PCIBIOS_DEVICE_NOT_FOUND;
90−
91− pci_master_aborts = 0;
92− *value = (*addr >> (8*n)) & bytemask[size];
93− if (pci_master_aborts) {
94− pci_master_aborts = 0;
95− *value = 0xffffffff;
96− return PCIBIOS_DEVICE_NOT_FOUND;
97− }
98−
99− return PCIBIOS_SUCCESSFUL;
100−}
101−
102−/*
103− * We don't do error checks by calling clear_master_aborts() b/c the
104− * assumption is that the caller did a read first to make sure a device
105− * exists.
106− */
107−int ixp2000_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where,
108− int size, u32 value)
109−{
110− u32 mask;
111− u32 *addr;
112− u32 temp;
113−
114− mask = ~(bytemask[size] << ((where % 0x4) * 8));
115− addr = ixp2000_pci_config_addr(bus->number, devfn, where);
116− if (!addr)
117− return PCIBIOS_DEVICE_NOT_FOUND;
118− temp = (u32) (value) << ((where % 0x4) * 8);
119− *addr = (*addr & mask) | temp;
120−
121− clear_master_aborts();
122−
123− return PCIBIOS_SUCCESSFUL;
124−}
125−
126−
127−struct pci_ops ixp2000_pci_ops = {
128− .read = ixp2000_pci_read_config,
129− .write = ixp2000_pci_write_config
130−};
131−
132−
133−int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
134−{
135−
136− volatile u32 temp;
137− unsigned long flags;
138−
139− pci_master_aborts = 1;
140−
141− local_irq_save(flags);
142− temp = *(IXP2000_PCI_CONTROL);
143− if (temp & ((1 << 8) | (1 << 5))) {
144− ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp);
145− }
146−
147− temp = *(IXP2000_PCI_CMDSTAT);
148− if (temp & (1 << 29)) {
149− while (temp & (1 << 29)) {
150− ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp);
151− temp = *(IXP2000_PCI_CMDSTAT);
152− }
153− }
154− local_irq_restore(flags);
155−
156− /*
157− * If it was an imprecise abort, then we need to correct the
158− * return address to be _after_ the instruction.
159− */
160− if (fsr & (1 << 10))
161− regs->ARM_pc += 4;
162−
163− return 0;
164−}
165−
166−int
167−clear_master_aborts(void)
168−{
169− volatile u32 temp;
170− unsigned long flags;
171−
172− local_irq_save(flags);
173− temp = *(IXP2000_PCI_CONTROL);
174− if (temp & ((1 << 8) | (1 << 5))) {
175− ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp);
176− }
177−
178− temp = *(IXP2000_PCI_CMDSTAT);
179− if (temp & (1 << 29)) {
180− while (temp & (1 << 29)) {
181− ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp);
182− temp = *(IXP2000_PCI_CMDSTAT);
183− }
184− }
185− local_irq_restore(flags);
186−
187− return 0;
188−}
189−
190−void __init
191−ixp2000_pci_preinit(void)
192−{
193− pci_set_flags(0);
194−
195− pcibios_min_io = 0;
196− pcibios_min_mem = 0;
197−
198−#ifndef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
199− /*
200− * Configure the PCI unit to properly byteswap I/O transactions,
201− * and verify that it worked.
202− */
203− ixp2000_reg_write(IXP2000_PCI_CONTROL,
204− (*IXP2000_PCI_CONTROL | PCI_CONTROL_IEE));
205−
206− if ((*IXP2000_PCI_CONTROL & PCI_CONTROL_IEE) == 0)
207− panic("IXP2000: PCI I/O is broken on this ixp model, and "
208− "the needed workaround has not been configured in");
209−#endif
210−
211− hook_fault_code(16+6, ixp2000_pci_abort_handler, SIGBUS, 0,
212− "PCI config cycle to non-existent device");
213−}
214−
215−
216−/*
217− * IXP2000 systems often have large resource requirements, so we just
218− * use our own resource space.
219− */
220−static struct resource ixp2000_pci_mem_space = {
221− .start = 0xe0000000,
222− .end = 0xffffffff,
223− .flags = IORESOURCE_MEM,
224− .name = "PCI Mem Space"
225−};
226−
227−static struct resource ixp2000_pci_io_space = {
228− .start = 0x00010000,
229− .end = 0x0001ffff,
230− .flags = IORESOURCE_IO,
231− .name = "PCI I/O Space"
232−};
233−
234−int ixp2000_pci_setup(int nr, struct pci_sys_data *sys)
235−{
236− if (nr >= 1)
237− return 0;
238−
239− pci_add_resource_offset(&sys->resources,
240− &ixp2000_pci_io_space, sys->io_offset);
241− pci_add_resource_offset(&sys->resources,
242− &ixp2000_pci_mem_space, sys->mem_offset);
243−
244− return 1;
245−}
246−
arch/arm/mach-ixp23xx/Kconfig+0−25
@@ -1,25 +0,0 @@
1−if ARCH_IXP23XX
2−
3−config ARCH_SUPPORTS_BIG_ENDIAN
4− bool
5− default y
6−
7−menu "Intel IXP23xx Implementation Options"
8−
9−comment "IXP23xx Platforms"
10−
11−config MACH_ESPRESSO
12− bool "Support IP Fabrics Double Espresso platform"
13− help
14−
15−config MACH_IXDP2351
16− bool "Support Intel IXDP2351 platform"
17− help
18−
19−config MACH_ROADRUNNER
20− bool "Support ADI RoadRunner platform"
21− help
22−
23−endmenu
24−
25−endif
arch/arm/mach-ixp23xx/Makefile+0−11
@@ -1,11 +0,0 @@
1−#
2−# Makefile for the linux kernel.
3−#
4−obj-y := core.o pci.o
5−obj-m :=
6−obj-n :=
7−obj- :=
8−
9−obj-$(CONFIG_MACH_ESPRESSO) += espresso.o
10−obj-$(CONFIG_MACH_IXDP2351) += ixdp2351.o
11−obj-$(CONFIG_MACH_ROADRUNNER) += roadrunner.o
arch/arm/mach-ixp23xx/Makefile.boot+0−2
@@ -1,2 +0,0 @@
1− zreladdr-y += 0x00008000
2−params_phys-y := 0x00000100
arch/arm/mach-ixp23xx/core.c+0−455
@@ -1,455 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/core.c
3− *
4− * Core routines for IXP23xx chips
5− *
6− * Author: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2005 (c) MontaVista Software, Inc.
9− *
10− * Based on 2.4 code Copyright 2004 (c) Intel Corporation
11− *
12− * This file is licensed under the terms of the GNU General Public
13− * License version 2. This program is licensed "as is" without any
14− * warranty of any kind, whether express or implied.
15− */
16−
17−#include <linux/kernel.h>
18−#include <linux/init.h>
19−#include <linux/spinlock.h>
20−#include <linux/sched.h>
21−#include <linux/interrupt.h>
22−#include <linux/serial.h>
23−#include <linux/tty.h>
24−#include <linux/bitops.h>
25−#include <linux/serial_8250.h>
26−#include <linux/serial_core.h>
27−#include <linux/device.h>
28−#include <linux/mm.h>
29−#include <linux/time.h>
30−#include <linux/timex.h>
31−
32−#include <asm/types.h>
33−#include <asm/setup.h>
34−#include <asm/memory.h>
35−#include <mach/hardware.h>
36−#include <asm/irq.h>
37−#include <asm/tlbflush.h>
38−#include <asm/pgtable.h>
39−#include <asm/system_misc.h>
40−
41−#include <asm/mach/map.h>
42−#include <asm/mach/time.h>
43−#include <asm/mach/irq.h>
44−#include <asm/mach/arch.h>
45−
46−
47−/*************************************************************************
48− * Chip specific mappings shared by all IXP23xx systems
49− *************************************************************************/
50−static struct map_desc ixp23xx_io_desc[] __initdata = {
51− { /* XSI-CPP CSRs */
52− .virtual = IXP23XX_XSI2CPP_CSR_VIRT,
53− .pfn = __phys_to_pfn(IXP23XX_XSI2CPP_CSR_PHYS),
54− .length = IXP23XX_XSI2CPP_CSR_SIZE,
55− .type = MT_DEVICE,
56− }, { /* Expansion Bus Config */
57− .virtual = IXP23XX_EXP_CFG_VIRT,
58− .pfn = __phys_to_pfn(IXP23XX_EXP_CFG_PHYS),
59− .length = IXP23XX_EXP_CFG_SIZE,
60− .type = MT_DEVICE,
61− }, { /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACS,.... */
62− .virtual = IXP23XX_PERIPHERAL_VIRT,
63− .pfn = __phys_to_pfn(IXP23XX_PERIPHERAL_PHYS),
64− .length = IXP23XX_PERIPHERAL_SIZE,
65− .type = MT_DEVICE,
66− }, { /* CAP CSRs */
67− .virtual = IXP23XX_CAP_CSR_VIRT,
68− .pfn = __phys_to_pfn(IXP23XX_CAP_CSR_PHYS),
69− .length = IXP23XX_CAP_CSR_SIZE,
70− .type = MT_DEVICE,
71− }, { /* MSF CSRs */
72− .virtual = IXP23XX_MSF_CSR_VIRT,
73− .pfn = __phys_to_pfn(IXP23XX_MSF_CSR_PHYS),
74− .length = IXP23XX_MSF_CSR_SIZE,
75− .type = MT_DEVICE,
76− }, { /* PCI I/O Space */
77− .virtual = IXP23XX_PCI_IO_VIRT,
78− .pfn = __phys_to_pfn(IXP23XX_PCI_IO_PHYS),
79− .length = IXP23XX_PCI_IO_SIZE,
80− .type = MT_DEVICE,
81− }, { /* PCI Config Space */
82− .virtual = IXP23XX_PCI_CFG_VIRT,
83− .pfn = __phys_to_pfn(IXP23XX_PCI_CFG_PHYS),
84− .length = IXP23XX_PCI_CFG_SIZE,
85− .type = MT_DEVICE,
86− }, { /* PCI local CFG CSRs */
87− .virtual = IXP23XX_PCI_CREG_VIRT,
88− .pfn = __phys_to_pfn(IXP23XX_PCI_CREG_PHYS),
89− .length = IXP23XX_PCI_CREG_SIZE,
90− .type = MT_DEVICE,
91− }, { /* PCI MEM Space */
92− .virtual = IXP23XX_PCI_MEM_VIRT,
93− .pfn = __phys_to_pfn(IXP23XX_PCI_MEM_PHYS),
94− .length = IXP23XX_PCI_MEM_SIZE,
95− .type = MT_DEVICE,
96− }
97−};
98−
99−void __init ixp23xx_map_io(void)
100−{
101− iotable_init(ixp23xx_io_desc, ARRAY_SIZE(ixp23xx_io_desc));
102−}
103−
104−
105−/***************************************************************************
106− * IXP23xx Interrupt Handling
107− ***************************************************************************/
108−enum ixp23xx_irq_type {
109− IXP23XX_IRQ_LEVEL, IXP23XX_IRQ_EDGE
110−};
111−
112−static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type);
113−
114−static int ixp23xx_irq_set_type(struct irq_data *d, unsigned int type)
115−{
116− int line = d->irq - IRQ_IXP23XX_GPIO6 + 6;
117− u32 int_style;
118− enum ixp23xx_irq_type irq_type;
119− volatile u32 *int_reg;
120−
121− /*
122− * Only GPIOs 6-15 are wired to interrupts on IXP23xx
123− */
124− if (line < 6 || line > 15)
125− return -EINVAL;
126−
127− switch (type) {
128− case IRQ_TYPE_EDGE_BOTH:
129− int_style = IXP23XX_GPIO_STYLE_TRANSITIONAL;
130− irq_type = IXP23XX_IRQ_EDGE;
131− break;
132− case IRQ_TYPE_EDGE_RISING:
133− int_style = IXP23XX_GPIO_STYLE_RISING_EDGE;
134− irq_type = IXP23XX_IRQ_EDGE;
135− break;
136− case IRQ_TYPE_EDGE_FALLING:
137− int_style = IXP23XX_GPIO_STYLE_FALLING_EDGE;
138− irq_type = IXP23XX_IRQ_EDGE;
139− break;
140− case IRQ_TYPE_LEVEL_HIGH:
141− int_style = IXP23XX_GPIO_STYLE_ACTIVE_HIGH;
142− irq_type = IXP23XX_IRQ_LEVEL;
143− break;
144− case IRQ_TYPE_LEVEL_LOW:
145− int_style = IXP23XX_GPIO_STYLE_ACTIVE_LOW;
146− irq_type = IXP23XX_IRQ_LEVEL;
147− break;
148− default:
149− return -EINVAL;
150− }
151−
152− ixp23xx_config_irq(d->irq, irq_type);
153−
154− if (line >= 8) { /* pins 8-15 */
155− line -= 8;
156− int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT2R;
157− } else { /* pins 0-7 */
158− int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT1R;
159− }
160−
161− /*
162− * Clear pending interrupts
163− */
164− *IXP23XX_GPIO_GPISR = (1 << line);
165−
166− /* Clear the style for the appropriate pin */
167− *int_reg &= ~(IXP23XX_GPIO_STYLE_MASK <<
168− (line * IXP23XX_GPIO_STYLE_SIZE));
169−
170− /* Set the new style */
171− *int_reg |= (int_style << (line * IXP23XX_GPIO_STYLE_SIZE));
172−
173− return 0;
174−}
175−
176−static void ixp23xx_irq_mask(struct irq_data *d)
177−{
178− volatile unsigned long *intr_reg;
179− unsigned int irq = d->irq;
180−
181− if (irq >= 56)
182− irq += 8;
183−
184− intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
185− *intr_reg &= ~(1 << (irq % 32));
186−}
187−
188−static void ixp23xx_irq_ack(struct irq_data *d)
189−{
190− int line = d->irq - IRQ_IXP23XX_GPIO6 + 6;
191−
192− if ((line < 6) || (line > 15))
193− return;
194−
195− *IXP23XX_GPIO_GPISR = (1 << line);
196−}
197−
198−/*
199− * Level triggered interrupts on GPIO lines can only be cleared when the
200− * interrupt condition disappears.
201− */
202−static void ixp23xx_irq_level_unmask(struct irq_data *d)
203−{
204− volatile unsigned long *intr_reg;
205− unsigned int irq = d->irq;
206−
207− ixp23xx_irq_ack(d);
208−
209− if (irq >= 56)
210− irq += 8;
211−
212− intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
213− *intr_reg |= (1 << (irq % 32));
214−}
215−
216−static void ixp23xx_irq_edge_unmask(struct irq_data *d)
217−{
218− volatile unsigned long *intr_reg;
219− unsigned int irq = d->irq;
220−
221− if (irq >= 56)
222− irq += 8;
223−
224− intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
225− *intr_reg |= (1 << (irq % 32));
226−}
227−
228−static struct irq_chip ixp23xx_irq_level_chip = {
229− .irq_ack = ixp23xx_irq_mask,
230− .irq_mask = ixp23xx_irq_mask,
231− .irq_unmask = ixp23xx_irq_level_unmask,
232− .irq_set_type = ixp23xx_irq_set_type
233−};
234−
235−static struct irq_chip ixp23xx_irq_edge_chip = {
236− .irq_ack = ixp23xx_irq_ack,
237− .irq_mask = ixp23xx_irq_mask,
238− .irq_unmask = ixp23xx_irq_edge_unmask,
239− .irq_set_type = ixp23xx_irq_set_type
240−};
241−
242−static void ixp23xx_pci_irq_mask(struct irq_data *d)
243−{
244− unsigned int irq = d->irq;
245−
246− *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA + 27 - irq));
247−}
248−
249−static void ixp23xx_pci_irq_unmask(struct irq_data *d)
250−{
251− unsigned int irq = d->irq;
252−
253− *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA + 27 - irq));
254−}
255−
256−/*
257− * TODO: Should this just be done at ASM level?
258− */
259−static void pci_handler(unsigned int irq, struct irq_desc *desc)
260−{
261− u32 pci_interrupt;
262− unsigned int irqno;
263−
264− pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS;
265−
266− desc->irq_data.chip->irq_ack(&desc->irq_data);
267−
268− /* See which PCI_INTA, or PCI_INTB interrupted */
269− if (pci_interrupt & (1 << 26)) {
270− irqno = IRQ_IXP23XX_INTB;
271− } else if (pci_interrupt & (1 << 27)) {
272− irqno = IRQ_IXP23XX_INTA;
273− } else {
274− BUG();
275− }
276−
277− generic_handle_irq(irqno);
278−
279− desc->irq_data.chip->irq_unmask(&desc->irq_data);
280−}
281−
282−static struct irq_chip ixp23xx_pci_irq_chip = {
283− .irq_ack = ixp23xx_pci_irq_mask,
284− .irq_mask = ixp23xx_pci_irq_mask,
285− .irq_unmask = ixp23xx_pci_irq_unmask
286−};
287−
288−static void ixp23xx_config_irq(unsigned int irq, enum ixp23xx_irq_type type)
289−{
290− switch (type) {
291− case IXP23XX_IRQ_LEVEL:
292− irq_set_chip_and_handler(irq, &ixp23xx_irq_level_chip,
293− handle_level_irq);
294− break;
295− case IXP23XX_IRQ_EDGE:
296− irq_set_chip_and_handler(irq, &ixp23xx_irq_edge_chip,
297− handle_edge_irq);
298− break;
299− }
300− set_irq_flags(irq, IRQF_VALID);
301−}
302−
303−void __init ixp23xx_init_irq(void)
304−{
305− int irq;
306−
307− /* Route everything to IRQ */
308− *IXP23XX_INTR_SEL1 = 0x0;
309− *IXP23XX_INTR_SEL2 = 0x0;
310− *IXP23XX_INTR_SEL3 = 0x0;
311− *IXP23XX_INTR_SEL4 = 0x0;
312−
313− /* Mask all sources */
314− *IXP23XX_INTR_EN1 = 0x0;
315− *IXP23XX_INTR_EN2 = 0x0;
316− *IXP23XX_INTR_EN3 = 0x0;
317− *IXP23XX_INTR_EN4 = 0x0;
318−
319− /*
320− * Configure all IRQs for level-sensitive operation
321− */
322− for (irq = 0; irq <= NUM_IXP23XX_RAW_IRQS; irq++) {
323− ixp23xx_config_irq(irq, IXP23XX_IRQ_LEVEL);
324− }
325−
326− for (irq = IRQ_IXP23XX_INTA; irq <= IRQ_IXP23XX_INTB; irq++) {
327− irq_set_chip_and_handler(irq, &ixp23xx_pci_irq_chip,
328− handle_level_irq);
329− set_irq_flags(irq, IRQF_VALID);
330− }
331−
332− irq_set_chained_handler(IRQ_IXP23XX_PCI_INT_RPH, pci_handler);
333−}
334−
335−
336−/*************************************************************************
337− * Timer-tick functions for IXP23xx
338− *************************************************************************/
339−#define CLOCK_TICKS_PER_USEC (CLOCK_TICK_RATE / USEC_PER_SEC)
340−
341−static unsigned long next_jiffy_time;
342−
343−static unsigned long
344−ixp23xx_gettimeoffset(void)
345−{
346− unsigned long elapsed;
347−
348− elapsed = *IXP23XX_TIMER_CONT - (next_jiffy_time - LATCH);
349−
350− return elapsed / CLOCK_TICKS_PER_USEC;
351−}
352−
353−static irqreturn_t
354−ixp23xx_timer_interrupt(int irq, void *dev_id)
355−{
356− /* Clear Pending Interrupt by writing '1' to it */
357− *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND;
358− while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) {
359− timer_tick();
360− next_jiffy_time += LATCH;
361− }
362−
363− return IRQ_HANDLED;
364−}
365−
366−static struct irqaction ixp23xx_timer_irq = {
367− .name = "IXP23xx Timer Tick",
368− .handler = ixp23xx_timer_interrupt,
369− .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
370−};
371−
372−void __init ixp23xx_init_timer(void)
373−{
374− /* Clear Pending Interrupt by writing '1' to it */
375− *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND;
376−
377− /* Setup the Timer counter value */
378− *IXP23XX_TIMER1_RELOAD =
379− (LATCH & ~IXP23XX_TIMER_RELOAD_MASK) | IXP23XX_TIMER_ENABLE;
380−
381− *IXP23XX_TIMER_CONT = 0;
382− next_jiffy_time = LATCH;
383−
384− /* Connect the interrupt handler and enable the interrupt */
385− setup_irq(IRQ_IXP23XX_TIMER1, &ixp23xx_timer_irq);
386−}
387−
388−struct sys_timer ixp23xx_timer = {
389− .init = ixp23xx_init_timer,
390− .offset = ixp23xx_gettimeoffset,
391−};
392−
393−
394−/*************************************************************************
395− * IXP23xx Platform Initialization
396− *************************************************************************/
397−static struct resource ixp23xx_uart_resources[] = {
398− {
399− .start = IXP23XX_UART1_PHYS,
400− .end = IXP23XX_UART1_PHYS + 0x0fff,
401− .flags = IORESOURCE_MEM
402− }, {
403− .start = IXP23XX_UART2_PHYS,
404− .end = IXP23XX_UART2_PHYS + 0x0fff,
405− .flags = IORESOURCE_MEM
406− }
407−};
408−
409−static struct plat_serial8250_port ixp23xx_uart_data[] = {
410− {
411− .mapbase = IXP23XX_UART1_PHYS,
412− .membase = (char *)(IXP23XX_UART1_VIRT + 3),
413− .irq = IRQ_IXP23XX_UART1,
414− .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
415− .iotype = UPIO_MEM,
416− .regshift = 2,
417− .uartclk = IXP23XX_UART_XTAL,
418− }, {
419− .mapbase = IXP23XX_UART2_PHYS,
420− .membase = (char *)(IXP23XX_UART2_VIRT + 3),
421− .irq = IRQ_IXP23XX_UART2,
422− .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
423− .iotype = UPIO_MEM,
424− .regshift = 2,
425− .uartclk = IXP23XX_UART_XTAL,
426− },
427− { },
428−};
429−
430−static struct platform_device ixp23xx_uart = {
431− .name = "serial8250",
432− .id = 0,
433− .dev.platform_data = ixp23xx_uart_data,
434− .num_resources = 2,
435− .resource = ixp23xx_uart_resources,
436−};
437−
438−static struct platform_device *ixp23xx_devices[] __initdata = {
439− &ixp23xx_uart,
440−};
441−
442−void __init ixp23xx_sys_init(void)
443−{
444− /* by default, the idle code is disabled */
445− disable_hlt();
446−
447− *IXP23XX_EXP_UNIT_FUSE |= 0xf;
448− platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices));
449−}
450−
451−void ixp23xx_restart(char mode, const char *cmd)
452−{
453− /* Use on-chip reset capability */
454− *IXP23XX_RESET0 |= IXP23XX_RST_ALL;
455−}
arch/arm/mach-ixp23xx/espresso.c+0−93
@@ -1,93 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/espresso.c
3− *
4− * Double Espresso-specific routines
5− *
6− * Author: Lennert Buytenhek <buytenh@wantstofly.org>
7− *
8− * This file is licensed under the terms of the GNU General Public
9− * License version 2. This program is licensed "as is" without any
10− * warranty of any kind, whether express or implied.
11− */
12−
13−#include <linux/kernel.h>
14−#include <linux/init.h>
15−#include <linux/spinlock.h>
16−#include <linux/sched.h>
17−#include <linux/interrupt.h>
18−#include <linux/serial.h>
19−#include <linux/tty.h>
20−#include <linux/bitops.h>
21−#include <linux/ioport.h>
22−#include <linux/serial_8250.h>
23−#include <linux/serial_core.h>
24−#include <linux/device.h>
25−#include <linux/mm.h>
26−#include <linux/pci.h>
27−#include <linux/mtd/physmap.h>
28−
29−#include <asm/types.h>
30−#include <asm/setup.h>
31−#include <asm/memory.h>
32−#include <mach/hardware.h>
33−#include <asm/mach-types.h>
34−#include <asm/irq.h>
35−#include <asm/tlbflush.h>
36−#include <asm/pgtable.h>
37−
38−#include <asm/mach/map.h>
39−#include <asm/mach/irq.h>
40−#include <asm/mach/arch.h>
41−#include <asm/mach/pci.h>
42−
43−static int __init espresso_pci_init(void)
44−{
45− if (machine_is_espresso())
46− ixp23xx_pci_slave_init();
47−
48− return 0;
49−};
50−subsys_initcall(espresso_pci_init);
51−
52−static struct physmap_flash_data espresso_flash_data = {
53− .width = 2,
54−};
55−
56−static struct resource espresso_flash_resource = {
57− .start = 0x90000000,
58− .end = 0x91ffffff,
59− .flags = IORESOURCE_MEM,
60−};
61−
62−static struct platform_device espresso_flash = {
63− .name = "physmap-flash",
64− .id = 0,
65− .dev = {
66− .platform_data = &espresso_flash_data,
67− },
68− .num_resources = 1,
69− .resource = &espresso_flash_resource,
70−};
71−
72−static void __init espresso_init(void)
73−{
74− platform_device_register(&espresso_flash);
75−
76− /*
77− * Mark flash as writeable.
78− */
79− IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE;
80− IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE;
81−
82− ixp23xx_sys_init();
83−}
84−
85−MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso")
86− /* Maintainer: Lennert Buytenhek */
87− .map_io = ixp23xx_map_io,
88− .init_irq = ixp23xx_init_irq,
89− .timer = &ixp23xx_timer,
90− .atag_offset = 0x100,
91− .init_machine = espresso_init,
92− .restart = ixp23xx_restart,
93−MACHINE_END
arch/arm/mach-ixp23xx/include/mach/debug-macro.S+0−25
@@ -1,25 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/debug-macro.S
3− *
4− * Debugging macro include header
5− *
6− * Copyright (C) 1994-1999 Russell King
7− * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8− *
9− * This program is free software; you can redistribute it and/or modify
10− * it under the terms of the GNU General Public License version 2 as
11− * published by the Free Software Foundation.
12− */
13−#include <mach/ixp23xx.h>
14−
15− .macro addruart, rp, rv, tmp
16− ldr \rp, =IXP23XX_PERIPHERAL_PHYS @ physical
17− ldr \rv, =IXP23XX_PERIPHERAL_VIRT @ virtual
18−#ifdef __ARMEB__
19− orr \rp, \rp, #0x00000003
20− orr \rv, \rv, #0x00000003
21−#endif
22− .endm
23−
24−#define UART_SHIFT 2
25−#include <asm/hardware/debug-8250.S>
arch/arm/mach-ixp23xx/include/mach/entry-macro.S+0−31
@@ -1,31 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/entry-macro.S
3− */
4−
5− .macro get_irqnr_preamble, base, tmp
6− .endm
7−
8− .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
9− ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET)
10− ldr \irqnr, [\irqnr] @ get interrupt number
11− cmp \irqnr, #0x0 @ spurious interrupt ?
12− movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits
13− subne \irqnr, \irqnr, #1 @ convert to 0 based
14−
15−#if 0
16− cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH
17− bne 1001f
18− mov \irqnr, #IRQ_IXP23XX_INTA
19−
20− ldr \irqnr, =0xf5000030
21−
22− mov \tmp, #(1<<26)
23− tst \irqnr, \tmp
24− movne \irqnr, #IRQ_IXP23XX_INTB
25−
26− mov \tmp, #(1<<27)
27− tst \irqnr, \tmp
28− movne \irqnr, #IRQ_IXP23XX_INTA
29−1001:
30−#endif
31− .endm
arch/arm/mach-ixp23xx/include/mach/hardware.h+0−32
@@ -1,32 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/hardware.h
3− *
4− * Copyright (C) 2002-2004 Intel Corporation.
5− * Copyricht (C) 2005 MontaVista Software, Inc.
6− *
7− * This program is free software; you can redistribute it and/or modify
8− * it under the terms of the GNU General Public License version 2 as
9− * published by the Free Software Foundation.
10− *
11− * Hardware definitions for IXP23XX based systems
12− */
13−
14−#ifndef __ASM_ARCH_HARDWARE_H
15−#define __ASM_ARCH_HARDWARE_H
16−
17−/* PCI IO info */
18−
19−#include "ixp23xx.h"
20−
21−/*
22− * Platform helper functions
23− */
24−#include "platform.h"
25−
26−/*
27− * Platform-specific headers
28− */
29−#include "ixdp2351.h"
30−
31−
32−#endif
arch/arm/mach-ixp23xx/include/mach/io.h+0−22
@@ -1,22 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/io.h
3− *
4− * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6− *
7− * Copyright (C) 2003-2005 Intel Corp.
8− * Copyright (C) 2005 MontaVista Software, Inc
9− *
10− * This program is free software; you can redistribute it and/or modify
11− * it under the terms of the GNU General Public License version 2 as
12− * published by the Free Software Foundation.
13− */
14−
15−#ifndef __ASM_ARCH_IO_H
16−#define __ASM_ARCH_IO_H
17−
18−#define IO_SPACE_LIMIT 0xffffffff
19−
20−#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
21−
22−#endif
arch/arm/mach-ixp23xx/include/mach/irqs.h+0−223
@@ -1,223 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/irqs.h
3− *
4− * IRQ definitions for IXP23XX based systems
5− *
6− * Author: Naeem Afzal <naeem.m.afzal@intel.com>
7− *
8− * Copyright (C) 2003-2004 Intel Corporation.
9− *
10− * This program is free software; you can redistribute it and/or modify
11− * it under the terms of the GNU General Public License version 2 as
12− * published by the Free Software Foundation.
13− */
14−
15−#ifndef __ASM_ARCH_IRQS_H
16−#define __ASM_ARCH_IRQS_H
17−
18−#define NR_IXP23XX_IRQS IRQ_IXP23XX_INTB+1
19−#define IRQ_IXP23XX_EXTIRQS NR_IXP23XX_IRQS
20−
21−
22−#define IRQ_IXP23XX_DBG0 0 /* Debug/Execution/MBox */
23−#define IRQ_IXP23XX_DBG1 1 /* Debug/Execution/MBox */
24−#define IRQ_IXP23XX_NPE_TRG 2 /* npe_trigger */
25−#define IRQ_IXP23XX_TIMER1 3 /* Timer[0] */
26−#define IRQ_IXP23XX_TIMER2 4 /* Timer[1] */
27−#define IRQ_IXP23XX_TIMESTAMP 5 /* Timer[2], Time-stamp */
28−#define IRQ_IXP23XX_WDOG 6 /* Time[3], Watchdog Timer */
29−#define IRQ_IXP23XX_PCI_DBELL 7 /* PCI Doorbell */
30−#define IRQ_IXP23XX_PCI_DMA1 8 /* PCI DMA Channel 1 */
31−#define IRQ_IXP23XX_PCI_DMA2 9 /* PCI DMA Channel 2 */
32−#define IRQ_IXP23XX_PCI_DMA3 10 /* PCI DMA Channel 3 */
33−#define IRQ_IXP23XX_PCI_INT_RPH 11 /* pcxg_pci_int_rph */
34−#define IRQ_IXP23XX_CPP_PMU 12 /* xpxg_pm_int_rpl */
35−#define IRQ_IXP23XX_SWINT0 13 /* S/W Interrupt0 */
36−#define IRQ_IXP23XX_SWINT1 14 /* S/W Interrupt1 */
37−#define IRQ_IXP23XX_UART2 15 /* UART1 Interrupt */
38−#define IRQ_IXP23XX_UART1 16 /* UART0 Interrupt */
39−#define IRQ_IXP23XX_XSI_PMU_ROLLOVER 17 /* AHB Performance M. Unit counter rollover */
40−#define IRQ_IXP23XX_XSI_AHB_PM0 18 /* intr_pm_o */
41−#define IRQ_IXP23XX_XSI_AHB_ECE0 19 /* intr_ece_o */
42−#define IRQ_IXP23XX_XSI_AHB_GASKET 20 /* gas_intr_o */
43−#define IRQ_IXP23XX_XSI_CPP 21 /* xsi2cpp_int */
44−#define IRQ_IXP23XX_CPP_XSI 22 /* cpp2xsi_int */
45−#define IRQ_IXP23XX_ME_ATTN0 23 /* ME_ATTN */
46−#define IRQ_IXP23XX_ME_ATTN1 24 /* ME_ATTN */
47−#define IRQ_IXP23XX_ME_ATTN2 25 /* ME_ATTN */
48−#define IRQ_IXP23XX_ME_ATTN3 26 /* ME_ATTN */
49−#define IRQ_IXP23XX_PCI_ERR_RPH 27 /* PCXG_PCI_ERR_RPH */
50−#define IRQ_IXP23XX_D0XG_ECC_CORR 28 /* D0XG_DRAM_ECC_CORR */
51−#define IRQ_IXP23XX_D0XG_ECC_UNCORR 29 /* D0XG_DRAM_ECC_UNCORR */
52−#define IRQ_IXP23XX_SRAM_ERR1 30 /* SRAM1_ERR */
53−#define IRQ_IXP23XX_SRAM_ERR0 31 /* SRAM0_ERR */
54−#define IRQ_IXP23XX_MEDIA_ERR 32 /* MEDIA_ERR */
55−#define IRQ_IXP23XX_STH_DRAM_ECC_MAJ 33 /* STH_DRAM0_ECC_MAJ */
56−#define IRQ_IXP23XX_GPIO6 34 /* GPIO0 interrupts */
57−#define IRQ_IXP23XX_GPIO7 35 /* GPIO1 interrupts */
58−#define IRQ_IXP23XX_GPIO8 36 /* GPIO2 interrupts */
59−#define IRQ_IXP23XX_GPIO9 37 /* GPIO3 interrupts */
60−#define IRQ_IXP23XX_GPIO10 38 /* GPIO4 interrupts */
61−#define IRQ_IXP23XX_GPIO11 39 /* GPIO5 interrupts */
62−#define IRQ_IXP23XX_GPIO12 40 /* GPIO6 interrupts */
63−#define IRQ_IXP23XX_GPIO13 41 /* GPIO7 interrupts */
64−#define IRQ_IXP23XX_GPIO14 42 /* GPIO8 interrupts */
65−#define IRQ_IXP23XX_GPIO15 43 /* GPIO9 interrupts */
66−#define IRQ_IXP23XX_SHAC_RING0 44 /* SHAC Ring Full */
67−#define IRQ_IXP23XX_SHAC_RING1 45 /* SHAC Ring Full */
68−#define IRQ_IXP23XX_SHAC_RING2 46 /* SHAC Ring Full */
69−#define IRQ_IXP23XX_SHAC_RING3 47 /* SHAC Ring Full */
70−#define IRQ_IXP23XX_SHAC_RING4 48 /* SHAC Ring Full */
71−#define IRQ_IXP23XX_SHAC_RING5 49 /* SHAC Ring Full */
72−#define IRQ_IXP23XX_SHAC_RING6 50 /* SHAC RING Full */
73−#define IRQ_IXP23XX_SHAC_RING7 51 /* SHAC Ring Full */
74−#define IRQ_IXP23XX_SHAC_RING8 52 /* SHAC Ring Full */
75−#define IRQ_IXP23XX_SHAC_RING9 53 /* SHAC Ring Full */
76−#define IRQ_IXP23XX_SHAC_RING10 54 /* SHAC Ring Full */
77−#define IRQ_IXP23XX_SHAC_RING11 55 /* SHAC Ring Full */
78−#define IRQ_IXP23XX_ME_THREAD_A0_ME0 56 /* ME_THREAD_A */
79−#define IRQ_IXP23XX_ME_THREAD_A1_ME0 57 /* ME_THREAD_A */
80−#define IRQ_IXP23XX_ME_THREAD_A2_ME0 58 /* ME_THREAD_A */
81−#define IRQ_IXP23XX_ME_THREAD_A3_ME0 59 /* ME_THREAD_A */
82−#define IRQ_IXP23XX_ME_THREAD_A4_ME0 60 /* ME_THREAD_A */
83−#define IRQ_IXP23XX_ME_THREAD_A5_ME0 61 /* ME_THREAD_A */
84−#define IRQ_IXP23XX_ME_THREAD_A6_ME0 62 /* ME_THREAD_A */
85−#define IRQ_IXP23XX_ME_THREAD_A7_ME0 63 /* ME_THREAD_A */
86−#define IRQ_IXP23XX_ME_THREAD_A8_ME1 64 /* ME_THREAD_A */
87−#define IRQ_IXP23XX_ME_THREAD_A9_ME1 65 /* ME_THREAD_A */
88−#define IRQ_IXP23XX_ME_THREAD_A10_ME1 66 /* ME_THREAD_A */
89−#define IRQ_IXP23XX_ME_THREAD_A11_ME1 67 /* ME_THREAD_A */
90−#define IRQ_IXP23XX_ME_THREAD_A12_ME1 68 /* ME_THREAD_A */
91−#define IRQ_IXP23XX_ME_THREAD_A13_ME1 69 /* ME_THREAD_A */
92−#define IRQ_IXP23XX_ME_THREAD_A14_ME1 70 /* ME_THREAD_A */
93−#define IRQ_IXP23XX_ME_THREAD_A15_ME1 71 /* ME_THREAD_A */
94−#define IRQ_IXP23XX_ME_THREAD_A16_ME2 72 /* ME_THREAD_A */
95−#define IRQ_IXP23XX_ME_THREAD_A17_ME2 73 /* ME_THREAD_A */
96−#define IRQ_IXP23XX_ME_THREAD_A18_ME2 74 /* ME_THREAD_A */
97−#define IRQ_IXP23XX_ME_THREAD_A19_ME2 75 /* ME_THREAD_A */
98−#define IRQ_IXP23XX_ME_THREAD_A20_ME2 76 /* ME_THREAD_A */
99−#define IRQ_IXP23XX_ME_THREAD_A21_ME2 77 /* ME_THREAD_A */
100−#define IRQ_IXP23XX_ME_THREAD_A22_ME2 78 /* ME_THREAD_A */
101−#define IRQ_IXP23XX_ME_THREAD_A23_ME2 79 /* ME_THREAD_A */
102−#define IRQ_IXP23XX_ME_THREAD_A24_ME3 80 /* ME_THREAD_A */
103−#define IRQ_IXP23XX_ME_THREAD_A25_ME3 81 /* ME_THREAD_A */
104−#define IRQ_IXP23XX_ME_THREAD_A26_ME3 82 /* ME_THREAD_A */
105−#define IRQ_IXP23XX_ME_THREAD_A27_ME3 83 /* ME_THREAD_A */
106−#define IRQ_IXP23XX_ME_THREAD_A28_ME3 84 /* ME_THREAD_A */
107−#define IRQ_IXP23XX_ME_THREAD_A29_ME3 85 /* ME_THREAD_A */
108−#define IRQ_IXP23XX_ME_THREAD_A30_ME3 86 /* ME_THREAD_A */
109−#define IRQ_IXP23XX_ME_THREAD_A31_ME3 87 /* ME_THREAD_A */
110−#define IRQ_IXP23XX_ME_THREAD_B0_ME0 88 /* ME_THREAD_B */
111−#define IRQ_IXP23XX_ME_THREAD_B1_ME0 89 /* ME_THREAD_B */
112−#define IRQ_IXP23XX_ME_THREAD_B2_ME0 90 /* ME_THREAD_B */
113−#define IRQ_IXP23XX_ME_THREAD_B3_ME0 91 /* ME_THREAD_B */
114−#define IRQ_IXP23XX_ME_THREAD_B4_ME0 92 /* ME_THREAD_B */
115−#define IRQ_IXP23XX_ME_THREAD_B5_ME0 93 /* ME_THREAD_B */
116−#define IRQ_IXP23XX_ME_THREAD_B6_ME0 94 /* ME_THREAD_B */
117−#define IRQ_IXP23XX_ME_THREAD_B7_ME0 95 /* ME_THREAD_B */
118−#define IRQ_IXP23XX_ME_THREAD_B8_ME1 96 /* ME_THREAD_B */
119−#define IRQ_IXP23XX_ME_THREAD_B9_ME1 97 /* ME_THREAD_B */
120−#define IRQ_IXP23XX_ME_THREAD_B10_ME1 98 /* ME_THREAD_B */
121−#define IRQ_IXP23XX_ME_THREAD_B11_ME1 99 /* ME_THREAD_B */
122−#define IRQ_IXP23XX_ME_THREAD_B12_ME1 100 /* ME_THREAD_B */
123−#define IRQ_IXP23XX_ME_THREAD_B13_ME1 101 /* ME_THREAD_B */
124−#define IRQ_IXP23XX_ME_THREAD_B14_ME1 102 /* ME_THREAD_B */
125−#define IRQ_IXP23XX_ME_THREAD_B15_ME1 103 /* ME_THREAD_B */
126−#define IRQ_IXP23XX_ME_THREAD_B16_ME2 104 /* ME_THREAD_B */
127−#define IRQ_IXP23XX_ME_THREAD_B17_ME2 105 /* ME_THREAD_B */
128−#define IRQ_IXP23XX_ME_THREAD_B18_ME2 106 /* ME_THREAD_B */
129−#define IRQ_IXP23XX_ME_THREAD_B19_ME2 107 /* ME_THREAD_B */
130−#define IRQ_IXP23XX_ME_THREAD_B20_ME2 108 /* ME_THREAD_B */
131−#define IRQ_IXP23XX_ME_THREAD_B21_ME2 109 /* ME_THREAD_B */
132−#define IRQ_IXP23XX_ME_THREAD_B22_ME2 110 /* ME_THREAD_B */
133−#define IRQ_IXP23XX_ME_THREAD_B23_ME2 111 /* ME_THREAD_B */
134−#define IRQ_IXP23XX_ME_THREAD_B24_ME3 112 /* ME_THREAD_B */
135−#define IRQ_IXP23XX_ME_THREAD_B25_ME3 113 /* ME_THREAD_B */
136−#define IRQ_IXP23XX_ME_THREAD_B26_ME3 114 /* ME_THREAD_B */
137−#define IRQ_IXP23XX_ME_THREAD_B27_ME3 115 /* ME_THREAD_B */
138−#define IRQ_IXP23XX_ME_THREAD_B28_ME3 116 /* ME_THREAD_B */
139−#define IRQ_IXP23XX_ME_THREAD_B29_ME3 117 /* ME_THREAD_B */
140−#define IRQ_IXP23XX_ME_THREAD_B30_ME3 118 /* ME_THREAD_B */
141−#define IRQ_IXP23XX_ME_THREAD_B31_ME3 119 /* ME_THREAD_B */
142−
143−#define NUM_IXP23XX_RAW_IRQS 120
144−
145−#define IRQ_IXP23XX_INTA 120 /* Indirect pcxg_pci_int_rph */
146−#define IRQ_IXP23XX_INTB 121 /* Indirect pcxg_pci_int_rph */
147−
148−#define NR_IXP23XX_IRQ (IRQ_IXP23XX_INTB + 1)
149−
150−/*
151− * We default to 32 per-board IRQs. Increase this number if you need
152− * more, but keep it realistic.
153− */
154−#define NR_IXP23XX_MACH_IRQS 32
155−
156−#define NR_IRQS (NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS)
157−
158−#define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq))
159−
160−
161−/*
162− * IXDP2351-specific interrupts
163− */
164−
165−/*
166− * External PCI interrupts signaled through INTB
167− *
168− */
169−#define IXDP2351_INTB_IRQ_BASE 0
170−#define IRQ_IXDP2351_INTA_82546 IXP23XX_MACH_IRQ(0)
171−#define IRQ_IXDP2351_INTB_82546 IXP23XX_MACH_IRQ(1)
172−#define IRQ_IXDP2351_SPCI_DB_0 IXP23XX_MACH_IRQ(2)
173−#define IRQ_IXDP2351_SPCI_DB_1 IXP23XX_MACH_IRQ(3)
174−#define IRQ_IXDP2351_SPCI_PMC_INTA IXP23XX_MACH_IRQ(4)
175−#define IRQ_IXDP2351_SPCI_PMC_INTB IXP23XX_MACH_IRQ(5)
176−#define IRQ_IXDP2351_SPCI_PMC_INTC IXP23XX_MACH_IRQ(6)
177−#define IRQ_IXDP2351_SPCI_PMC_INTD IXP23XX_MACH_IRQ(7)
178−#define IRQ_IXDP2351_SPCI_FIC IXP23XX_MACH_IRQ(8)
179−
180−#define IXDP2351_INTB_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(0))
181−#define IXDP2351_INTB_IRQ_MASK(irq) (1 << IXDP2351_INTB_IRQ_BIT(irq))
182−#define IXDP2351_INTB_IRQ_VALID 0x01FF
183−#define IXDP2351_INTB_IRQ_NUM 16
184−
185−/*
186− * Other external interrupts signaled through INTA
187− */
188−#define IXDP2351_INTA_IRQ_BASE 16
189−#define IRQ_IXDP2351_IPMI_FROM IXP23XX_MACH_IRQ(16)
190−#define IRQ_IXDP2351_125US IXP23XX_MACH_IRQ(17)
191−#define IRQ_IXDP2351_DB_0_ADD IXP23XX_MACH_IRQ(18)
192−#define IRQ_IXDP2351_DB_1_ADD IXP23XX_MACH_IRQ(19)
193−#define IRQ_IXDP2351_DEBUG1 IXP23XX_MACH_IRQ(20)
194−#define IRQ_IXDP2351_ADD_UART IXP23XX_MACH_IRQ(21)
195−#define IRQ_IXDP2351_FIC_ADD IXP23XX_MACH_IRQ(24)
196−#define IRQ_IXDP2351_CS8900 IXP23XX_MACH_IRQ(25)
197−#define IRQ_IXDP2351_BBSRAM IXP23XX_MACH_IRQ(26)
198−#define IRQ_IXDP2351_CONFIG_MEDIA IXP23XX_MACH_IRQ(27)
199−#define IRQ_IXDP2351_CLOCK_REF IXP23XX_MACH_IRQ(28)
200−#define IRQ_IXDP2351_A10_NP IXP23XX_MACH_IRQ(29)
201−#define IRQ_IXDP2351_A11_NP IXP23XX_MACH_IRQ(30)
202−#define IRQ_IXDP2351_DEBUG_NP IXP23XX_MACH_IRQ(31)
203−
204−#define IXDP2351_INTA_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(16))
205−#define IXDP2351_INTA_IRQ_MASK(irq) (1 << IXDP2351_INTA_IRQ_BIT(irq))
206−#define IXDP2351_INTA_IRQ_VALID 0xFF3F
207−#define IXDP2351_INTA_IRQ_NUM 16
208−
209−
210−/*
211− * ADI RoadRunner IRQs
212− */
213−#define IRQ_ROADRUNNER_PCI_INTA IRQ_IXP23XX_INTA
214−#define IRQ_ROADRUNNER_PCI_INTB IRQ_IXP23XX_INTB
215−#define IRQ_ROADRUNNER_PCI_INTC IRQ_IXP23XX_GPIO11
216−#define IRQ_ROADRUNNER_PCI_INTD IRQ_IXP23XX_GPIO12
217−
218−/*
219− * Put new board definitions here
220− */
221−
222−
223−#endif
arch/arm/mach-ixp23xx/include/mach/ixdp2351.h+0−89
@@ -1,89 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/ixdp2351.h
3− *
4− * Register and other defines for IXDP2351
5− *
6− * Copyright (c) 2002-2004 Intel Corp.
7− * Copytight (c) 2005 MontaVista Software, Inc.
8− *
9− * This program is free software; you can redistribute it and/or modify it
10− * under the terms of the GNU General Public License as published by the
11− * Free Software Foundation; either version 2 of the License, or (at your
12− * option) any later version.
13− */
14−
15−#ifndef __ASM_ARCH_IXDP2351_H
16−#define __ASM_ARCH_IXDP2351_H
17−
18−/*
19− * NP module memory map
20− */
21−#define IXDP2351_NP_PHYS_BASE (IXP23XX_EXP_BUS_CS4_BASE)
22−#define IXDP2351_NP_PHYS_SIZE 0x00100000
23−#define IXDP2351_NP_VIRT_BASE 0xeff00000
24−
25−#define IXDP2351_VIRT_CS8900_BASE (IXDP2351_NP_VIRT_BASE)
26−#define IXDP2351_VIRT_CS8900_END (IXDP2351_VIRT_CS8900_BASE + 16)
27−
28−#define IXDP2351_VIRT_NP_CPLD_BASE (IXP23XX_EXP_BUS_CS4_BASE_VIRT + 0x00010000)
29−
30−#define IXDP2351_NP_CPLD_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_NP_CPLD_BASE + reg))
31−
32−#define IXDP2351_NP_CPLD_RESET1_REG IXDP2351_NP_CPLD_REG(0x00)
33−#define IXDP2351_NP_CPLD_LED_REG IXDP2351_NP_CPLD_REG(0x02)
34−#define IXDP2351_NP_CPLD_VERSION_REG IXDP2351_NP_CPLD_REG(0x04)
35−
36−/*
37− * Base board module memory map
38− */
39−
40−#define IXDP2351_BB_BASE_PHYS (IXP23XX_EXP_BUS_CS5_BASE)
41−#define IXDP2351_BB_SIZE 0x01000000
42−#define IXDP2351_BB_BASE_VIRT (0xee000000)
43−
44−#define IXDP2351_BB_AREA_BASE(offset) (IXDP2351_BB_BASE_VIRT + offset)
45−
46−#define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0)
47−#define IXDP2351_NVRAM_SIZE (0x20000)
48−
49−#define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000)
50−#define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0)
51−#define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000)
52−#define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000)
53−#define IXDP2351_VIRT_DB1_BASE IXDP2351_BB_AREA_BASE(0x00600000)
54−#define IXDP2351_VIRT_CPLD_BASE IXDP2351_BB_AREA_BASE(0x00024000)
55−
56−/*
57− * On board CPLD registers
58− */
59−#define IXDP2351_CPLD_BB_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_CPLD_BASE + reg))
60−
61−#define IXDP2351_CPLD_RESET0_REG IXDP2351_CPLD_BB_REG(0x00)
62−#define IXDP2351_CPLD_RESET1_REG IXDP2351_CPLD_BB_REG(0x04)
63−
64−#define IXDP2351_CPLD_RESET1_MAGIC 0x55AA
65−#define IXDP2351_CPLD_RESET1_ENABLE 0x8000
66−
67−#define IXDP2351_CPLD_FPGA_CONFIG_REG IXDP2351_CPLD_BB_REG(0x08)
68−#define IXDP2351_CPLD_INTB_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x10)
69−#define IXDP2351_CPLD_INTA_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x14)
70−#define IXDP2351_CPLD_INTB_STAT_REG IXDP2351_CPLD_BB_REG(0x18)
71−#define IXDP2351_CPLD_INTA_STAT_REG IXDP2351_CPLD_BB_REG(0x1C)
72−#define IXDP2351_CPLD_INTB_RAW_REG IXDP2351_CPLD_BB_REG(0x20) /* read */
73−#define IXDP2351_CPLD_INTA_RAW_REG IXDP2351_CPLD_BB_REG(0x24) /* read */
74−#define IXDP2351_CPLD_INTB_MASK_CLR_REG IXDP2351_CPLD_INTB_RAW_REG /* write */
75−#define IXDP2351_CPLD_INTA_MASK_CLR_REG IXDP2351_CPLD_INTA_RAW_REG /* write */
76−#define IXDP2351_CPLD_INTB_SIM_REG IXDP2351_CPLD_BB_REG(0x28)
77−#define IXDP2351_CPLD_INTA_SIM_REG IXDP2351_CPLD_BB_REG(0x2C)
78− /* Interrupt bits are defined in irqs.h */
79−#define IXDP2351_CPLD_BB_GBE0_REG IXDP2351_CPLD_BB_REG(0x30)
80−#define IXDP2351_CPLD_BB_GBE1_REG IXDP2351_CPLD_BB_REG(0x34)
81−
82−/* #define IXDP2351_CPLD_BB_MISC_REG IXDP2351_CPLD_REG(0x1C) */
83−/* #define IXDP2351_CPLD_BB_MISC_REV_MASK 0xFF */
84−/* #define IXDP2351_CPLD_BB_GDXCS0_REG IXDP2351_CPLD_REG(0x24) */
85−/* #define IXDP2351_CPLD_BB_GDXCS1_REG IXDP2351_CPLD_REG(0x28) */
86−/* #define IXDP2351_CPLD_BB_CLOCK_REG IXDP2351_CPLD_REG(0x04) */
87−
88−
89−#endif
arch/arm/mach-ixp23xx/include/mach/ixp23xx.h+0−298
@@ -1,298 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
3− *
4− * Register definitions for IXP23XX
5− *
6− * Copyright (C) 2003-2005 Intel Corporation.
7− * Copyright (C) 2005 MontaVista Software, Inc.
8− *
9− * Maintainer: Deepak Saxena <dsaxena@plexity.net>
10− *
11− * This program is free software; you can redistribute it and/or modify
12− * it under the terms of the GNU General Public License version 2 as
13− * published by the Free Software Foundation.
14− */
15−
16−#ifndef __ASM_ARCH_IXP23XX_H
17−#define __ASM_ARCH_IXP23XX_H
18−
19−/*
20− * IXP2300 linux memory map:
21− *
22− * virt phys size
23− * fffd0000 a0000000 64K XSI2CPP_CSR
24− * fffc0000 c4000000 4K EXP_CFG
25− * fff00000 c8000000 64K PERIPHERAL
26− * fe000000 1c0000000 16M CAP_CSR
27− * fd000000 1c8000000 16M MSF_CSR
28− * fb000000 16M ---
29− * fa000000 1d8000000 32M PCI_IO
30− * f8000000 1da000000 32M PCI_CFG
31− * f6000000 1de000000 32M PCI_CREG
32− * f4000000 32M ---
33− * f0000000 1e0000000 64M PCI_MEM
34− * e[c-f]000000 per-platform mappings
35− */
36−
37−
38−/****************************************************************************
39− * Static mappings.
40− ****************************************************************************/
41−#define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000
42−#define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000
43−#define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000
44−
45−#define IXP23XX_EXP_CFG_PHYS 0xc4000000
46−#define IXP23XX_EXP_CFG_VIRT 0xfffc0000
47−#define IXP23XX_EXP_CFG_SIZE 0x00001000
48−
49−#define IXP23XX_PERIPHERAL_PHYS 0xc8000000
50−#define IXP23XX_PERIPHERAL_VIRT 0xfff00000
51−#define IXP23XX_PERIPHERAL_SIZE 0x00010000
52−
53−#define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL
54−#define IXP23XX_CAP_CSR_VIRT 0xfe000000
55−#define IXP23XX_CAP_CSR_SIZE 0x01000000
56−
57−#define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL
58−#define IXP23XX_MSF_CSR_VIRT 0xfd000000
59−#define IXP23XX_MSF_CSR_SIZE 0x01000000
60−
61−#define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL
62−#define IXP23XX_PCI_IO_VIRT 0xfa000000
63−#define IXP23XX_PCI_IO_SIZE 0x02000000
64−
65−#define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL
66−#define IXP23XX_PCI_CFG_VIRT 0xf8000000
67−#define IXP23XX_PCI_CFG_SIZE 0x02000000
68−#define IXP23XX_PCI_CFG0_VIRT IXP23XX_PCI_CFG_VIRT
69−#define IXP23XX_PCI_CFG1_VIRT (IXP23XX_PCI_CFG_VIRT + 0x01000000)
70−
71−#define IXP23XX_PCI_CREG_PHYS 0x1de000000ULL
72−#define IXP23XX_PCI_CREG_VIRT 0xf6000000
73−#define IXP23XX_PCI_CREG_SIZE 0x02000000
74−#define IXP23XX_PCI_CSR_VIRT (IXP23XX_PCI_CREG_VIRT + 0x01000000)
75−
76−#define IXP23XX_PCI_MEM_START 0xe0000000
77−#define IXP23XX_PCI_MEM_PHYS 0x1e0000000ULL
78−#define IXP23XX_PCI_MEM_VIRT 0xf0000000
79−#define IXP23XX_PCI_MEM_SIZE 0x04000000
80−
81−
82−/****************************************************************************
83− * XSI2CPP CSRs.
84− ****************************************************************************/
85−#define IXP23XX_XSI2CPP_REG(x) ((volatile unsigned long *)(IXP23XX_XSI2CPP_CSR_VIRT + (x)))
86−#define IXP23XX_CPP2XSI_CURR_XFER_REG3 IXP23XX_XSI2CPP_REG(0xf8)
87−#define IXP23XX_CPP2XSI_ADDR_31 (1 << 19)
88−#define IXP23XX_CPP2XSI_PSH_OFF (1 << 20)
89−#define IXP23XX_CPP2XSI_COH_OFF (1 << 21)
90−
91−
92−/****************************************************************************
93− * Expansion Bus Config.
94− ****************************************************************************/
95−#define IXP23XX_EXP_CFG_REG(x) ((volatile unsigned long *)(IXP23XX_EXP_CFG_VIRT + (x)))
96−#define IXP23XX_EXP_CS0 IXP23XX_EXP_CFG_REG(0x00)
97−#define IXP23XX_EXP_CS1 IXP23XX_EXP_CFG_REG(0x04)
98−#define IXP23XX_EXP_CS2 IXP23XX_EXP_CFG_REG(0x08)
99−#define IXP23XX_EXP_CS3 IXP23XX_EXP_CFG_REG(0x0c)
100−#define IXP23XX_EXP_CS4 IXP23XX_EXP_CFG_REG(0x10)
101−#define IXP23XX_EXP_CS5 IXP23XX_EXP_CFG_REG(0x14)
102−#define IXP23XX_EXP_CS6 IXP23XX_EXP_CFG_REG(0x18)
103−#define IXP23XX_EXP_CS7 IXP23XX_EXP_CFG_REG(0x1c)
104−#define IXP23XX_FLASH_WRITABLE (0x2)
105−#define IXP23XX_FLASH_BUS8 (0x1)
106−
107−#define IXP23XX_EXP_CFG0 IXP23XX_EXP_CFG_REG(0x20)
108−#define IXP23XX_EXP_CFG1 IXP23XX_EXP_CFG_REG(0x24)
109−#define IXP23XX_EXP_CFG0_MEM_MAP (1 << 31)
110−#define IXP23XX_EXP_CFG0_XSCALE_SPEED_SEL (3 << 22)
111−#define IXP23XX_EXP_CFG0_XSCALE_SPEED_EN (1 << 21)
112−#define IXP23XX_EXP_CFG0_CPP_SPEED_SEL (3 << 19)
113−#define IXP23XX_EXP_CFG0_CPP_SPEED_EN (1 << 18)
114−#define IXP23XX_EXP_CFG0_PCI_SWIN (3 << 16)
115−#define IXP23XX_EXP_CFG0_PCI_DWIN (3 << 14)
116−#define IXP23XX_EXP_CFG0_PCI33_MODE (1 << 13)
117−#define IXP23XX_EXP_CFG0_QDR_SPEED_SEL (1 << 12)
118−#define IXP23XX_EXP_CFG0_CPP_DIV_SEL (1 << 5)
119−#define IXP23XX_EXP_CFG0_XSI_NOT_PRES (1 << 4)
120−#define IXP23XX_EXP_CFG0_PROM_BOOT (1 << 3)
121−#define IXP23XX_EXP_CFG0_PCI_ARB (1 << 2)
122−#define IXP23XX_EXP_CFG0_PCI_HOST (1 << 1)
123−#define IXP23XX_EXP_CFG0_FLASH_WIDTH (1 << 0)
124−
125−#define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28)
126−#define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30)
127−#define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34)
128−
129−#define IXP23XX_EXP_BUS_PHYS 0x90000000
130−#define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000
131−
132−#define IXP23XX_EXP_BUS_CS0_BASE (IXP23XX_EXP_BUS_PHYS + 0x00000000)
133−#define IXP23XX_EXP_BUS_CS1_BASE (IXP23XX_EXP_BUS_PHYS + 0x01000000)
134−#define IXP23XX_EXP_BUS_CS2_BASE (IXP23XX_EXP_BUS_PHYS + 0x02000000)
135−#define IXP23XX_EXP_BUS_CS3_BASE (IXP23XX_EXP_BUS_PHYS + 0x03000000)
136−#define IXP23XX_EXP_BUS_CS4_BASE (IXP23XX_EXP_BUS_PHYS + 0x04000000)
137−#define IXP23XX_EXP_BUS_CS5_BASE (IXP23XX_EXP_BUS_PHYS + 0x05000000)
138−#define IXP23XX_EXP_BUS_CS6_BASE (IXP23XX_EXP_BUS_PHYS + 0x06000000)
139−#define IXP23XX_EXP_BUS_CS7_BASE (IXP23XX_EXP_BUS_PHYS + 0x07000000)
140−
141−
142−/****************************************************************************
143− * Peripherals.
144− ****************************************************************************/
145−#define IXP23XX_UART1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x0000)
146−#define IXP23XX_UART2_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x1000)
147−#define IXP23XX_PMU_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x2000)
148−#define IXP23XX_INTC_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x3000)
149−#define IXP23XX_GPIO_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x4000)
150−#define IXP23XX_TIMER_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x5000)
151−#define IXP23XX_NPE0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x6000)
152−#define IXP23XX_DSR_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x7000)
153−#define IXP23XX_NPE1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x8000)
154−#define IXP23XX_ETH0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x9000)
155−#define IXP23XX_ETH1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xA000)
156−#define IXP23XX_GIG0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xB000)
157−#define IXP23XX_GIG1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xC000)
158−#define IXP23XX_DDRS_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xD000)
159−
160−#define IXP23XX_UART1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x0000)
161−#define IXP23XX_UART2_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x1000)
162−#define IXP23XX_PMU_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x2000)
163−#define IXP23XX_INTC_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x3000)
164−#define IXP23XX_GPIO_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x4000)
165−#define IXP23XX_TIMER_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x5000)
166−#define IXP23XX_NPE0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x6000)
167−#define IXP23XX_DSR_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x7000)
168−#define IXP23XX_NPE1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x8000)
169−#define IXP23XX_ETH0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x9000)
170−#define IXP23XX_ETH1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xA000)
171−#define IXP23XX_GIG0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xB000)
172−#define IXP23XX_GIG1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xC000)
173−#define IXP23XX_DDRS_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xD000)
174−
175−
176−/****************************************************************************
177− * Interrupt controller.
178− ****************************************************************************/
179−#define IXP23XX_INTC_REG(x) ((volatile unsigned long *)(IXP23XX_INTC_VIRT + (x)))
180−#define IXP23XX_INTR_ST1 IXP23XX_INTC_REG(0x00)
181−#define IXP23XX_INTR_ST2 IXP23XX_INTC_REG(0x04)
182−#define IXP23XX_INTR_ST3 IXP23XX_INTC_REG(0x08)
183−#define IXP23XX_INTR_ST4 IXP23XX_INTC_REG(0x0c)
184−#define IXP23XX_INTR_EN1 IXP23XX_INTC_REG(0x10)
185−#define IXP23XX_INTR_EN2 IXP23XX_INTC_REG(0x14)
186−#define IXP23XX_INTR_EN3 IXP23XX_INTC_REG(0x18)
187−#define IXP23XX_INTR_EN4 IXP23XX_INTC_REG(0x1c)
188−#define IXP23XX_INTR_SEL1 IXP23XX_INTC_REG(0x20)
189−#define IXP23XX_INTR_SEL2 IXP23XX_INTC_REG(0x24)
190−#define IXP23XX_INTR_SEL3 IXP23XX_INTC_REG(0x28)
191−#define IXP23XX_INTR_SEL4 IXP23XX_INTC_REG(0x2c)
192−#define IXP23XX_INTR_IRQ_ST1 IXP23XX_INTC_REG(0x30)
193−#define IXP23XX_INTR_IRQ_ST2 IXP23XX_INTC_REG(0x34)
194−#define IXP23XX_INTR_IRQ_ST3 IXP23XX_INTC_REG(0x38)
195−#define IXP23XX_INTR_IRQ_ST4 IXP23XX_INTC_REG(0x3c)
196−#define IXP23XX_INTR_IRQ_ENC_ST_OFFSET 0x54
197−
198−
199−/****************************************************************************
200− * GPIO.
201− ****************************************************************************/
202−#define IXP23XX_GPIO_REG(x) ((volatile unsigned long *)(IXP23XX_GPIO_VIRT + (x)))
203−#define IXP23XX_GPIO_GPOUTR IXP23XX_GPIO_REG(0x00)
204−#define IXP23XX_GPIO_GPOER IXP23XX_GPIO_REG(0x04)
205−#define IXP23XX_GPIO_GPINR IXP23XX_GPIO_REG(0x08)
206−#define IXP23XX_GPIO_GPISR IXP23XX_GPIO_REG(0x0c)
207−#define IXP23XX_GPIO_GPIT1R IXP23XX_GPIO_REG(0x10)
208−#define IXP23XX_GPIO_GPIT2R IXP23XX_GPIO_REG(0x14)
209−#define IXP23XX_GPIO_GPCLKR IXP23XX_GPIO_REG(0x18)
210−#define IXP23XX_GPIO_GPDBSELR IXP23XX_GPIO_REG(0x1c)
211−
212−#define IXP23XX_GPIO_STYLE_MASK 0x7
213−#define IXP23XX_GPIO_STYLE_ACTIVE_HIGH 0x0
214−#define IXP23XX_GPIO_STYLE_ACTIVE_LOW 0x1
215−#define IXP23XX_GPIO_STYLE_RISING_EDGE 0x2
216−#define IXP23XX_GPIO_STYLE_FALLING_EDGE 0x3
217−#define IXP23XX_GPIO_STYLE_TRANSITIONAL 0x4
218−
219−#define IXP23XX_GPIO_STYLE_SIZE 3
220−
221−
222−/****************************************************************************
223− * Timer.
224− ****************************************************************************/
225−#define IXP23XX_TIMER_REG(x) ((volatile unsigned long *)(IXP23XX_TIMER_VIRT + (x)))
226−#define IXP23XX_TIMER_CONT IXP23XX_TIMER_REG(0x00)
227−#define IXP23XX_TIMER1_TIMESTAMP IXP23XX_TIMER_REG(0x04)
228−#define IXP23XX_TIMER1_RELOAD IXP23XX_TIMER_REG(0x08)
229−#define IXP23XX_TIMER2_TIMESTAMP IXP23XX_TIMER_REG(0x0c)
230−#define IXP23XX_TIMER2_RELOAD IXP23XX_TIMER_REG(0x10)
231−#define IXP23XX_TIMER_WDOG IXP23XX_TIMER_REG(0x14)
232−#define IXP23XX_TIMER_WDOG_EN IXP23XX_TIMER_REG(0x18)
233−#define IXP23XX_TIMER_WDOG_KEY IXP23XX_TIMER_REG(0x1c)
234−#define IXP23XX_TIMER_WDOG_KEY_MAGIC 0x482e
235−#define IXP23XX_TIMER_STATUS IXP23XX_TIMER_REG(0x20)
236−#define IXP23XX_TIMER_SOFT_RESET IXP23XX_TIMER_REG(0x24)
237−#define IXP23XX_TIMER_SOFT_RESET_EN IXP23XX_TIMER_REG(0x28)
238−
239−#define IXP23XX_TIMER_ENABLE (1 << 0)
240−#define IXP23XX_TIMER_ONE_SHOT (1 << 1)
241−/* Low order bits of reload value ignored */
242−#define IXP23XX_TIMER_RELOAD_MASK (0x3)
243−#define IXP23XX_TIMER_DISABLED (0x0)
244−#define IXP23XX_TIMER1_INT_PEND (1 << 0)
245−#define IXP23XX_TIMER2_INT_PEND (1 << 1)
246−#define IXP23XX_TIMER_STATUS_TS_PEND (1 << 2)
247−#define IXP23XX_TIMER_STATUS_WDOG_PEND (1 << 3)
248−#define IXP23XX_TIMER_STATUS_WARM_RESET (1 << 4)
249−
250−
251−/****************************************************************************
252− * CAP CSRs.
253− ****************************************************************************/
254−#define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x)))
255−#define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00)
256−#define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04)
257−#define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08)
258−#define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c)
259−#define IXP23XX_RESET1 IXP23XX_GLOBAL_REG(0x10)
260−#define IXP23XX_STRAP_OPTIONS IXP23XX_GLOBAL_REG(0x18)
261−
262−#define IXP23XX_ENABLE_WATCHDOG (1 << 24)
263−#define IXP23XX_SHPC_INIT_COMP (1 << 21)
264−#define IXP23XX_RST_ALL (1 << 16)
265−#define IXP23XX_RESET_PCI (1 << 2)
266−#define IXP23XX_PCI_UNIT_RESET (1 << 1)
267−#define IXP23XX_XSCALE_RESET (1 << 0)
268−
269−#define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000)
270−
271−
272−/****************************************************************************
273− * PCI CSRs.
274− ****************************************************************************/
275−#define IXP23XX_PCI_CREG(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + (x)))
276−#define IXP23XX_PCI_CMDSTAT IXP23XX_PCI_CREG(0x04)
277−#define IXP23XX_PCI_SRAM_BAR IXP23XX_PCI_CREG(0x14)
278−#define IXP23XX_PCI_SDRAM_BAR IXP23XX_PCI_CREG(0x18)
279−
280−
281−#define IXP23XX_PCI_CSR(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + 0x01000000 + (x)))
282−#define IXP23XX_PCI_OUT_INT_STATUS IXP23XX_PCI_CSR(0x0030)
283−#define IXP23XX_PCI_OUT_INT_MASK IXP23XX_PCI_CSR(0x0034)
284−#define IXP23XX_PCI_SRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x00fc)
285−#define IXP23XX_PCI_DRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x0100)
286−#define IXP23XX_PCI_CONTROL IXP23XX_PCI_CSR(0x013c)
287−#define IXP23XX_PCI_ADDR_EXT IXP23XX_PCI_CSR(0x0140)
288−#define IXP23XX_PCI_ME_PUSH_STATUS IXP23XX_PCI_CSR(0x0148)
289−#define IXP23XX_PCI_ME_PUSH_EN IXP23XX_PCI_CSR(0x014c)
290−#define IXP23XX_PCI_ERR_STATUS IXP23XX_PCI_CSR(0x0150)
291−#define IXP23XX_PCI_ERROR_STATUS IXP23XX_PCI_CSR(0x0150)
292−#define IXP23XX_PCI_ERR_ENABLE IXP23XX_PCI_CSR(0x0154)
293−#define IXP23XX_PCI_XSCALE_INT_STATUS IXP23XX_PCI_CSR(0x0158)
294−#define IXP23XX_PCI_XSCALE_INT_ENABLE IXP23XX_PCI_CSR(0x015c)
295−#define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160)
296−
297−
298−#endif
arch/arm/mach-ixp23xx/include/mach/memory.h+0−34
@@ -1,34 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/memory.h
3− *
4− * Copyright (c) 2003-2004 Intel Corp.
5− *
6− * This program is free software; you can redistribute it and/or modify it
7− * under the terms of the GNU General Public License as published by the
8− * Free Software Foundation; either version 2 of the License, or (at your
9− * option) any later version.
10− */
11−
12−#ifndef __ASM_ARCH_MEMORY_H
13−#define __ASM_ARCH_MEMORY_H
14−
15−#include <mach/hardware.h>
16−
17−/*
18− * Physical DRAM offset.
19− */
20−#define PLAT_PHYS_OFFSET (0x00000000)
21−
22−#define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)
23−
24−#define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
25−#define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
26−
27−#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))
28−#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))
29−#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))
30−#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))
31−
32−#define arch_is_coherent() 1
33−
34−#endif
arch/arm/mach-ixp23xx/include/mach/platform.h+0−58
@@ -1,58 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/platform.h
3− *
4− * Various bits of code used by platform-level code.
5− *
6− * Author: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2005 (c) MontaVista Software, Inc.
9− *
10− * This file is licensed under the terms of the GNU General Public
11− * License version 2. This program is licensed "as is" without any
12− * warranty of any kind, whether express or implied.
13− */
14−
15−#ifndef __ASSEMBLY__
16−
17−static inline unsigned long ixp2000_reg_read(volatile void *reg)
18−{
19− return *((volatile unsigned long *)reg);
20−}
21−
22−static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
23−{
24− *((volatile unsigned long *)reg) = val;
25−}
26−
27−static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
28−{
29− *((volatile unsigned long *)reg) = val;
30−}
31−
32−struct pci_sys_data;
33−
34−void ixp23xx_map_io(void);
35−void ixp23xx_init_irq(void);
36−void ixp23xx_sys_init(void);
37−void ixp23xx_restart(char, const char *);
38−int ixp23xx_pci_setup(int, struct pci_sys_data *);
39−void ixp23xx_pci_preinit(void);
40−extern struct pci_ops ixp23xx_pci_ops;
41−void ixp23xx_pci_slave_init(void);
42−
43−extern struct sys_timer ixp23xx_timer;
44−
45−#define IXP23XX_UART_XTAL 14745600
46−
47−#ifndef __ASSEMBLY__
48−/*
49− * Is system memory on the XSI or CPP bus?
50− */
51−static inline unsigned ixp23xx_cpp_boot(void)
52−{
53− return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
54−}
55−#endif
56−
57−
58−#endif
arch/arm/mach-ixp23xx/include/mach/time.h+0−3
@@ -1,3 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/time.h
3− */
arch/arm/mach-ixp23xx/include/mach/timex.h+0−7
@@ -1,7 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/timex.h
3− *
4− * XScale architecture timex specifications
5− */
6−
7−#define CLOCK_TICK_RATE 75000000
arch/arm/mach-ixp23xx/include/mach/uncompress.h+0−40
@@ -1,40 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/include/mach/uncompress.h
3− *
4− * Copyright (C) 2002-2004 Intel Corporation.
5− *
6− * This program is free software; you can redistribute it and/or modify
7− * it under the terms of the GNU General Public License version 2 as
8− * published by the Free Software Foundation.
9− */
10−
11−#ifndef __ASM_ARCH_UNCOMPRESS_H
12−#define __ASM_ARCH_UNCOMPRESS_H
13−
14−#include <mach/ixp23xx.h>
15−#include <linux/serial_reg.h>
16−
17−#define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS)
18−
19−static inline void putc(char c)
20−{
21− int j;
22−
23− for (j = 0; j < 0x1000; j++) {
24− if (UART_BASE[UART_LSR] & UART_LSR_THRE)
25− break;
26− barrier();
27− }
28−
29− UART_BASE[UART_TX] = c;
30−}
31−
32−static inline void flush(void)
33−{
34−}
35−
36−#define arch_decomp_setup()
37−#define arch_decomp_wdog()
38−
39−
40−#endif
arch/arm/mach-ixp23xx/ixdp2351.c+0−347
@@ -1,347 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/ixdp2351.c
3− *
4− * IXDP2351 board-specific routines
5− *
6− * Author: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2005 (c) MontaVista Software, Inc.
9− *
10− * Based on 2.4 code Copyright 2004 (c) Intel Corporation
11− *
12− * This file is licensed under the terms of the GNU General Public
13− * License version 2. This program is licensed "as is" without any
14− * warranty of any kind, whether express or implied.
15− */
16−
17−#include <linux/kernel.h>
18−#include <linux/init.h>
19−#include <linux/spinlock.h>
20−#include <linux/sched.h>
21−#include <linux/interrupt.h>
22−#include <linux/irq.h>
23−#include <linux/serial.h>
24−#include <linux/tty.h>
25−#include <linux/bitops.h>
26−#include <linux/ioport.h>
27−#include <linux/serial_8250.h>
28−#include <linux/serial_core.h>
29−#include <linux/device.h>
30−#include <linux/mm.h>
31−#include <linux/pci.h>
32−#include <linux/mtd/physmap.h>
33−
34−#include <asm/types.h>
35−#include <asm/setup.h>
36−#include <asm/memory.h>
37−#include <mach/hardware.h>
38−#include <asm/mach-types.h>
39−#include <asm/tlbflush.h>
40−#include <asm/pgtable.h>
41−
42−#include <asm/mach/map.h>
43−#include <asm/mach/irq.h>
44−#include <asm/mach/arch.h>
45−#include <asm/mach/pci.h>
46−
47−/*
48− * IXDP2351 Interrupt Handling
49− */
50−static void ixdp2351_inta_mask(struct irq_data *d)
51−{
52− *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(d->irq);
53−}
54−
55−static void ixdp2351_inta_unmask(struct irq_data *d)
56−{
57− *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(d->irq);
58−}
59−
60−static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc)
61−{
62− u16 ex_interrupt =
63− *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID;
64− int i;
65−
66− desc->irq_data.chip->irq_mask(&desc->irq_data);
67−
68− for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) {
69− if (ex_interrupt & (1 << i)) {
70− int cpld_irq =
71− IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i);
72− generic_handle_irq(cpld_irq);
73− }
74− }
75−
76− desc->irq_data.chip->irq_unmask(&desc->irq_data);
77−}
78−
79−static struct irq_chip ixdp2351_inta_chip = {
80− .irq_ack = ixdp2351_inta_mask,
81− .irq_mask = ixdp2351_inta_mask,
82− .irq_unmask = ixdp2351_inta_unmask
83−};
84−
85−static void ixdp2351_intb_mask(struct irq_data *d)
86−{
87− *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(d->irq);
88−}
89−
90−static void ixdp2351_intb_unmask(struct irq_data *d)
91−{
92− *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(d->irq);
93−}
94−
95−static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc)
96−{
97− u16 ex_interrupt =
98− *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID;
99− int i;
100−
101− desc->irq_data.chip->irq_ack(&desc->irq_data);
102−
103− for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) {
104− if (ex_interrupt & (1 << i)) {
105− int cpld_irq =
106− IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i);
107− generic_handle_irq(cpld_irq);
108− }
109− }
110−
111− desc->irq_data.chip->irq_unmask(&desc->irq_data);
112−}
113−
114−static struct irq_chip ixdp2351_intb_chip = {
115− .irq_ack = ixdp2351_intb_mask,
116− .irq_mask = ixdp2351_intb_mask,
117− .irq_unmask = ixdp2351_intb_unmask
118−};
119−
120−void __init ixdp2351_init_irq(void)
121−{
122− int irq;
123−
124− /* Mask all interrupts from CPLD, disable simulation */
125− *IXDP2351_CPLD_INTA_MASK_SET_REG = (u16) -1;
126− *IXDP2351_CPLD_INTB_MASK_SET_REG = (u16) -1;
127− *IXDP2351_CPLD_INTA_SIM_REG = 0;
128− *IXDP2351_CPLD_INTB_SIM_REG = 0;
129−
130− ixp23xx_init_irq();
131−
132− for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE);
133− irq <
134− IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + IXDP2351_INTA_IRQ_NUM);
135− irq++) {
136− if (IXDP2351_INTA_IRQ_MASK(irq) & IXDP2351_INTA_IRQ_VALID) {
137− set_irq_flags(irq, IRQF_VALID);
138− irq_set_chip_and_handler(irq, &ixdp2351_inta_chip,
139− handle_level_irq);
140− }
141− }
142−
143− for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE);
144− irq <
145− IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + IXDP2351_INTB_IRQ_NUM);
146− irq++) {
147− if (IXDP2351_INTB_IRQ_MASK(irq) & IXDP2351_INTB_IRQ_VALID) {
148− set_irq_flags(irq, IRQF_VALID);
149− irq_set_chip_and_handler(irq, &ixdp2351_intb_chip,
150− handle_level_irq);
151− }
152− }
153−
154− irq_set_chained_handler(IRQ_IXP23XX_INTA, ixdp2351_inta_handler);
155− irq_set_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler);
156−}
157−
158−/*
159− * IXDP2351 PCI
160− */
161−
162−/*
163− * This board does not do normal PCI IRQ routing, or any
164− * sort of swizzling, so we just need to check where on the
165− * bus the device is and figure out what CPLD pin it is
166− * being routed to.
167− */
168−#define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
169−
170−static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
171−{
172− u8 bus = dev->bus->number;
173− u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin);
174− struct pci_bus *tmp_bus = dev->bus;
175−
176− /* Primary bus, no interrupts here */
177− if (!bus)
178− return -1;
179−
180− /* Lookup first leaf in bus tree */
181− while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL))
182− tmp_bus = tmp_bus->parent;
183−
184− /* Select between known bridges */
185− switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) {
186− /* Device is located after first bridge */
187− case 0x0008:
188− if (tmp_bus == dev->bus) {
189− /* Device is located directy after first bridge */
190− switch (devpin) {
191− /* Onboard 82546 */
192− case DEVPIN(1, 1): /* Onboard 82546 ch 0 */
193− return IRQ_IXDP2351_INTA_82546;
194− case DEVPIN(1, 2): /* Onboard 82546 ch 1 */
195− return IRQ_IXDP2351_INTB_82546;
196− /* PMC SLOT */
197− case DEVPIN(0, 1): /* PMCP INTA# */
198− case DEVPIN(2, 4): /* PMCS INTD# */
199− return IRQ_IXDP2351_SPCI_PMC_INTA;
200− case DEVPIN(0, 2): /* PMCP INTB# */
201− case DEVPIN(2, 1): /* PMCS INTA# */
202− return IRQ_IXDP2351_SPCI_PMC_INTB;
203− case DEVPIN(0, 3): /* PMCP INTC# */
204− case DEVPIN(2, 2): /* PMCS INTB# */
205− return IRQ_IXDP2351_SPCI_PMC_INTC;
206− case DEVPIN(0, 4): /* PMCP INTD# */
207− case DEVPIN(2, 3): /* PMCS INTC# */
208− return IRQ_IXDP2351_SPCI_PMC_INTD;
209− }
210− } else {
211− /* Device is located indirectly after first bridge */
212− /* Not supported now */
213− return -1;
214− }
215− break;
216− case 0x0010:
217− if (tmp_bus == dev->bus) {
218− /* Device is located directy after second bridge */
219− /* Secondary bus of second bridge */
220− switch (devpin) {
221− case DEVPIN(0, 1): /* DB#0 */
222− case DEVPIN(0, 2):
223− case DEVPIN(0, 3):
224− case DEVPIN(0, 4):
225− return IRQ_IXDP2351_SPCI_DB_0;
226− case DEVPIN(1, 1): /* DB#1 */
227− case DEVPIN(1, 2):
228− case DEVPIN(1, 3):
229− case DEVPIN(1, 4):
230− return IRQ_IXDP2351_SPCI_DB_1;
231− case DEVPIN(2, 1): /* FIC1 */
232− case DEVPIN(2, 2):
233− case DEVPIN(2, 3):
234− case DEVPIN(2, 4):
235− case DEVPIN(3, 1): /* FIC2 */
236− case DEVPIN(3, 2):
237− case DEVPIN(3, 3):
238− case DEVPIN(3, 4):
239− return IRQ_IXDP2351_SPCI_FIC;
240− }
241− } else {
242− /* Device is located indirectly after second bridge */
243− /* Not supported now */
244− return -1;
245− }
246− break;
247− }
248−
249− return -1;
250−}
251−
252−struct hw_pci ixdp2351_pci __initdata = {
253− .nr_controllers = 1,
254− .ops = &ixp23xx_pci_ops,
255− .preinit = ixp23xx_pci_preinit,
256− .setup = ixp23xx_pci_setup,
257− .map_irq = ixdp2351_map_irq,
258−};
259−
260−int __init ixdp2351_pci_init(void)
261−{
262− if (machine_is_ixdp2351())
263− pci_common_init(&ixdp2351_pci);
264−
265− return 0;
266−}
267−
268−subsys_initcall(ixdp2351_pci_init);
269−
270−/*
271− * IXDP2351 Static Mapped I/O
272− */
273−static struct map_desc ixdp2351_io_desc[] __initdata = {
274− {
275− .virtual = IXDP2351_NP_VIRT_BASE,
276− .pfn = __phys_to_pfn((u64)IXDP2351_NP_PHYS_BASE),
277− .length = IXDP2351_NP_PHYS_SIZE,
278− .type = MT_DEVICE
279− }, {
280− .virtual = IXDP2351_BB_BASE_VIRT,
281− .pfn = __phys_to_pfn((u64)IXDP2351_BB_BASE_PHYS),
282− .length = IXDP2351_BB_SIZE,
283− .type = MT_DEVICE
284− }
285−};
286−
287−static void __init ixdp2351_map_io(void)
288−{
289− ixp23xx_map_io();
290− iotable_init(ixdp2351_io_desc, ARRAY_SIZE(ixdp2351_io_desc));
291−}
292−
293−static struct physmap_flash_data ixdp2351_flash_data = {
294− .width = 1,
295−};
296−
297−static struct resource ixdp2351_flash_resource = {
298− .start = 0x90000000,
299− .end = 0x93ffffff,
300− .flags = IORESOURCE_MEM,
301−};
302−
303−static struct platform_device ixdp2351_flash = {
304− .name = "physmap-flash",
305− .id = 0,
306− .dev = {
307− .platform_data = &ixdp2351_flash_data,
308− },
309− .num_resources = 1,
310− .resource = &ixdp2351_flash_resource,
311−};
312−
313−static void __init ixdp2351_init(void)
314−{
315− platform_device_register(&ixdp2351_flash);
316−
317− /*
318− * Mark flash as writeable
319− */
320− IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE;
321− IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE;
322− IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE;
323− IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE;
324−
325− ixp23xx_sys_init();
326−}
327−
328−static void ixdp2351_restart(char mode, const char *cmd)
329−{
330− /* First try machine specific support */
331−
332− *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
333− (void) *IXDP2351_CPLD_RESET1_REG;
334− *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
335−
336− ixp23xx_restart(mode, cmd);
337−}
338−
339−MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform")
340− /* Maintainer: MontaVista Software, Inc. */
341− .map_io = ixdp2351_map_io,
342− .init_irq = ixdp2351_init_irq,
343− .timer = &ixp23xx_timer,
344− .atag_offset = 0x100,
345− .init_machine = ixdp2351_init,
346− .restart = ixdp2351_restart,
347−MACHINE_END
arch/arm/mach-ixp23xx/pci.c+0−288
@@ -1,288 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/pci.c
3− *
4− * PCI routines for IXP23XX based systems
5− *
6− * Copyright (c) 2005 MontaVista Software, Inc.
7− *
8− * based on original code:
9− *
10− * Author: Naeem Afzal <naeem.m.afzal@intel.com>
11− * Copyright 2002-2005 Intel Corp.
12− *
13− * This program is free software; you can redistribute it and/or modify it
14− * under the terms of the GNU General Public License as published by the
15− * Free Software Foundation; either version 2 of the License, or (at your
16− * option) any later version.
17− */
18−
19−#include <linux/sched.h>
20−#include <linux/kernel.h>
21−#include <linux/pci.h>
22−#include <linux/interrupt.h>
23−#include <linux/mm.h>
24−#include <linux/init.h>
25−#include <linux/ioport.h>
26−#include <linux/delay.h>
27−#include <linux/io.h>
28−
29−#include <asm/irq.h>
30−#include <asm/sizes.h>
31−#include <asm/mach/pci.h>
32−#include <mach/hardware.h>
33−
34−extern int (*external_fault) (unsigned long, struct pt_regs *);
35−
36−static volatile int pci_master_aborts = 0;
37−
38−#ifdef DEBUG
39−#define DBG(x...) printk(x)
40−#else
41−#define DBG(x...)
42−#endif
43−
44−int clear_master_aborts(void);
45−
46−static u32
47−*ixp23xx_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where)
48−{
49− u32 *paddress;
50−
51− /*
52− * Must be dword aligned
53− */
54− where &= ~3;
55−
56− /*
57− * For top bus, generate type 0, else type 1
58− */
59− if (!bus_nr) {
60− if (PCI_SLOT(devfn) >= 8)
61− return 0;
62−
63− paddress = (u32 *) (IXP23XX_PCI_CFG0_VIRT
64− | (1 << (PCI_SLOT(devfn) + 16))
65− | (PCI_FUNC(devfn) << 8) | where);
66− } else {
67− paddress = (u32 *) (IXP23XX_PCI_CFG1_VIRT
68− | (bus_nr << 16)
69− | (PCI_SLOT(devfn) << 11)
70− | (PCI_FUNC(devfn) << 8) | where);
71− }
72−
73− return paddress;
74−}
75−
76−/*
77− * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes.
78− * 0 and 3 are not valid indexes...
79− */
80−static u32 bytemask[] = {
81− /*0*/ 0,
82− /*1*/ 0xff,
83− /*2*/ 0xffff,
84− /*3*/ 0,
85− /*4*/ 0xffffffff,
86−};
87−
88−static int ixp23xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
89− int where, int size, u32 *value)
90−{
91− u32 n;
92− u32 *addr;
93−
94− n = where % 4;
95−
96− DBG("In config_read(%d) %d from dev %d:%d:%d\n", size, where,
97− bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
98−
99− addr = ixp23xx_pci_config_addr(bus->number, devfn, where);
100− if (!addr)
101− return PCIBIOS_DEVICE_NOT_FOUND;
102−
103− pci_master_aborts = 0;
104− *value = (*addr >> (8*n)) & bytemask[size];
105− if (pci_master_aborts) {
106− pci_master_aborts = 0;
107− *value = 0xffffffff;
108− return PCIBIOS_DEVICE_NOT_FOUND;
109− }
110−
111− return PCIBIOS_SUCCESSFUL;
112−}
113−
114−/*
115− * We don't do error checking on the address for writes.
116− * It's assumed that the user checked for the device existing first
117− * by doing a read first.
118− */
119−static int ixp23xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
120− int where, int size, u32 value)
121−{
122− u32 mask;
123− u32 *addr;
124− u32 temp;
125−
126− mask = ~(bytemask[size] << ((where % 0x4) * 8));
127− addr = ixp23xx_pci_config_addr(bus->number, devfn, where);
128− if (!addr)
129− return PCIBIOS_DEVICE_NOT_FOUND;
130− temp = (u32) (value) << ((where % 0x4) * 8);
131− *addr = (*addr & mask) | temp;
132−
133− clear_master_aborts();
134−
135− return PCIBIOS_SUCCESSFUL;
136−}
137−
138−struct pci_ops ixp23xx_pci_ops = {
139− .read = ixp23xx_pci_read_config,
140− .write = ixp23xx_pci_write_config,
141−};
142−
143−int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
144−{
145− volatile unsigned long temp;
146− unsigned long flags;
147−
148− pci_master_aborts = 1;
149−
150− local_irq_save(flags);
151− temp = *IXP23XX_PCI_CONTROL;
152−
153− /*
154− * master abort and cmd tgt err
155− */
156− if (temp & ((1 << 8) | (1 << 5)))
157− *IXP23XX_PCI_CONTROL = temp;
158−
159− temp = *IXP23XX_PCI_CMDSTAT;
160−
161− if (temp & (1 << 29))
162− *IXP23XX_PCI_CMDSTAT = temp;
163− local_irq_restore(flags);
164−
165− /*
166− * If it was an imprecise abort, then we need to correct the
167− * return address to be _after_ the instruction.
168− */
169− if (fsr & (1 << 10))
170− regs->ARM_pc += 4;
171−
172− return 0;
173−}
174−
175−int clear_master_aborts(void)
176−{
177− volatile u32 temp;
178−
179− temp = *IXP23XX_PCI_CONTROL;
180−
181− /*
182− * master abort and cmd tgt err
183− */
184− if (temp & ((1 << 8) | (1 << 5)))
185− *IXP23XX_PCI_CONTROL = temp;
186−
187− temp = *IXP23XX_PCI_CMDSTAT;
188−
189− if (temp & (1 << 29))
190− *IXP23XX_PCI_CMDSTAT = temp;
191−
192− return 0;
193−}
194−
195−static void __init ixp23xx_pci_common_init(void)
196−{
197−#ifdef __ARMEB__
198− *IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */
199−#endif
200− /*
201− * ADDR_31 needs to be clear for PCI memory access to CPP memory
202− */
203− *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_ADDR_31;
204− *IXP23XX_CPP2XSI_CURR_XFER_REG3 |= IXP23XX_CPP2XSI_PSH_OFF;
205−
206− /*
207− * Select correct memory for PCI inbound transactions
208− */
209− if (ixp23xx_cpp_boot()) {
210− *IXP23XX_PCI_CPP_ADDR_BITS &= ~(1 << 1);
211− } else {
212− *IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1);
213−
214− /*
215− * Enable coherency on A2 silicon.
216− */
217− if (arch_is_coherent())
218− *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_COH_OFF;
219− }
220−}
221−
222−void __init ixp23xx_pci_preinit(void)
223−{
224− pcibios_min_io = 0;
225− pcibios_min_mem = 0xe0000000;
226−
227− pci_set_flags(0);
228−
229− ixp23xx_pci_common_init();
230−
231− hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS, 0,
232− "PCI config cycle to non-existent device");
233−
234− *IXP23XX_PCI_ADDR_EXT = 0x0000e000;
235−}
236−
237−/*
238− * Prevent PCI layer from seeing the inbound host-bridge resources
239− */
240−static void __devinit pci_fixup_ixp23xx(struct pci_dev *dev)
241−{
242− int i;
243−
244− dev->class &= 0xff;
245− dev->class |= PCI_CLASS_BRIDGE_HOST << 8;
246− for (i = 0; i < PCI_NUM_RESOURCES; i++) {
247− dev->resource[i].start = 0;
248− dev->resource[i].end = 0;
249− dev->resource[i].flags = 0;
250− }
251−}
252−DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9002, pci_fixup_ixp23xx);
253−
254−/*
255− * IXP2300 systems often have large resource requirements, so we just
256− * use our own resource space.
257− */
258−static struct resource ixp23xx_pci_mem_space = {
259− .start = IXP23XX_PCI_MEM_START,
260− .end = IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE - 1,
261− .flags = IORESOURCE_MEM,
262− .name = "PCI Mem Space"
263−};
264−
265−static struct resource ixp23xx_pci_io_space = {
266− .start = 0x00000100,
267− .end = 0x01ffffff,
268− .flags = IORESOURCE_IO,
269− .name = "PCI I/O Space"
270−};
271−
272−int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys)
273−{
274− if (nr >= 1)
275− return 0;
276−
277− pci_add_resource_offset(&sys->resources,
278− &ixp23xx_pci_io_space, sys->io_offset);
279− pci_add_resource_offset(&sys->resources,
280− &ixp23xx_pci_mem_space, sys->mem_offset);
281−
282− return 1;
283−}
284−
285−void __init ixp23xx_pci_slave_init(void)
286−{
287− ixp23xx_pci_common_init();
288−}
arch/arm/mach-ixp23xx/roadrunner.c+0−180
@@ -1,180 +0,0 @@
1−/*
2− * arch/arm/mach-ixp23xx/roadrunner.c
3− *
4− * RoadRunner board-specific routines
5− *
6− * Author: Deepak Saxena <dsaxena@plexity.net>
7− *
8− * Copyright 2005 (c) MontaVista Software, Inc.
9− *
10− * Based on 2.4 code Copyright 2005 (c) ADI Engineering Corporation
11− *
12− * This file is licensed under the terms of the GNU General Public
13− * License version 2. This program is licensed "as is" without any
14− * warranty of any kind, whether express or implied.
15− */
16−
17−#include <linux/kernel.h>
18−#include <linux/init.h>
19−#include <linux/spinlock.h>
20−#include <linux/sched.h>
21−#include <linux/interrupt.h>
22−#include <linux/serial.h>
23−#include <linux/tty.h>
24−#include <linux/bitops.h>
25−#include <linux/ioport.h>
26−#include <linux/serial_8250.h>
27−#include <linux/serial_core.h>
28−#include <linux/device.h>
29−#include <linux/mm.h>
30−#include <linux/pci.h>
31−#include <linux/mtd/physmap.h>
32−
33−#include <asm/types.h>
34−#include <asm/setup.h>
35−#include <asm/memory.h>
36−#include <mach/hardware.h>
37−#include <asm/mach-types.h>
38−#include <asm/irq.h>
39−#include <asm/tlbflush.h>
40−#include <asm/pgtable.h>
41−
42−#include <asm/mach/map.h>
43−#include <asm/mach/irq.h>
44−#include <asm/mach/arch.h>
45−#include <asm/mach/pci.h>
46−
47−/*
48− * Interrupt mapping
49− */
50−#define INTA IRQ_ROADRUNNER_PCI_INTA
51−#define INTB IRQ_ROADRUNNER_PCI_INTB
52−#define INTC IRQ_ROADRUNNER_PCI_INTC
53−#define INTD IRQ_ROADRUNNER_PCI_INTD
54−
55−#define INTC_PIN IXP23XX_GPIO_PIN_11
56−#define INTD_PIN IXP23XX_GPIO_PIN_12
57−
58−static int __init roadrunner_map_irq(const struct pci_dev *dev, u8 idsel,
59− u8 pin)
60−{
61− static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA};
62− static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD};
63− static int usb_irq[] = {INTB, INTC, INTD, -1};
64− static int mini_pci_1_irq[] = {INTB, INTC, -1, -1};
65− static int mini_pci_2_irq[] = {INTC, INTD, -1, -1};
66−
67− switch(dev->bus->number) {
68− case 0:
69− switch(dev->devfn) {
70− case 0x0: // PCI-PCI bridge
71− break;
72− case 0x8: // PCI Card Slot
73− return pci_card_slot_irq[pin - 1];
74− case 0x10: // PMC Slot
75− return pmc_card_slot_irq[pin - 1];
76− case 0x18: // PMC Slot Secondary Agent
77− break;
78− case 0x20: // IXP Processor
79− break;
80− default:
81− return NO_IRQ;
82− }
83− break;
84−
85− case 1:
86− switch(dev->devfn) {
87− case 0x0: // IDE Controller
88− return (pin == 1) ? INTC : -1;
89− case 0x8: // USB fun 0
90− case 0x9: // USB fun 1
91− case 0xa: // USB fun 2
92− return usb_irq[pin - 1];
93− case 0x10: // Mini PCI 1
94− return mini_pci_1_irq[pin-1];
95− case 0x18: // Mini PCI 2
96− return mini_pci_2_irq[pin-1];
97− case 0x20: // MEM slot
98− return (pin == 1) ? INTA : -1;
99− default:
100− return NO_IRQ;
101− }
102− break;
103−
104− default:
105− return NO_IRQ;
106− }
107−
108− return NO_IRQ;
109−}
110−
111−static void __init roadrunner_pci_preinit(void)
112−{
113− irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTC, IRQ_TYPE_LEVEL_LOW);
114− irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTD, IRQ_TYPE_LEVEL_LOW);
115−
116− ixp23xx_pci_preinit();
117−}
118−
119−static struct hw_pci roadrunner_pci __initdata = {
120− .nr_controllers = 1,
121− .ops = &ixp23xx_pci_ops,
122− .preinit = roadrunner_pci_preinit,
123− .setup = ixp23xx_pci_setup,
124− .map_irq = roadrunner_map_irq,
125−};
126−
127−static int __init roadrunner_pci_init(void)
128−{
129− if (machine_is_roadrunner())
130− pci_common_init(&roadrunner_pci);
131−
132− return 0;
133−};
134−
135−subsys_initcall(roadrunner_pci_init);
136−
137−static struct physmap_flash_data roadrunner_flash_data = {
138− .width = 2,
139−};
140−
141−static struct resource roadrunner_flash_resource = {
142− .start = 0x90000000,
143− .end = 0x93ffffff,
144− .flags = IORESOURCE_MEM,
145−};
146−
147−static struct platform_device roadrunner_flash = {
148− .name = "physmap-flash",
149− .id = 0,
150− .dev = {
151− .platform_data = &roadrunner_flash_data,
152− },
153− .num_resources = 1,
154− .resource = &roadrunner_flash_resource,
155−};
156−
157−static void __init roadrunner_init(void)
158−{
159− platform_device_register(&roadrunner_flash);
160−
161− /*
162− * Mark flash as writeable
163− */
164− IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE;
165− IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE;
166− IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE;
167− IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE;
168−
169− ixp23xx_sys_init();
170−}
171−
172−MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform")
173− /* Maintainer: Deepak Saxena */
174− .map_io = ixp23xx_map_io,
175− .init_irq = ixp23xx_init_irq,
176− .timer = &ixp23xx_timer,
177− .atag_offset = 0x100,
178− .init_machine = roadrunner_init,
179− .restart = ixp23xx_restart,
180−MACHINE_END
arch/arm/mach-msm/board-msm7x30.c+0−1
@@ -17,7 +17,6 @@ · 16 unmodified lines
1717 #include <linux/gpio.h>
1818 #include <linux/kernel.h>
1919 #include <linux/irq.h>
20−#include <linux/gpio.h>
2120 #include <linux/platform_device.h>
2221 #include <linux/delay.h>
2322 #include <linux/io.h>
arch/arm/mach-msm/board-qsd8x50.c+0−1
@@ -17,7 +17,6 @@ · 16 unmodified lines
1717 #include <linux/gpio.h>
1818 #include <linux/kernel.h>
1919 #include <linux/irq.h>
20−#include <linux/gpio.h>
2120 #include <linux/platform_device.h>
2221 #include <linux/delay.h>
2322 #include <linux/usb/msm_hsusb.h>
arch/arm/mach-msm/include/mach/debug-macro.S+1−2
@@ -30,8 +30,7 @@ · 29 unmodified lines
3030 @ Write the 1 character to UARTDM_TF
3131 str \rd, [\rx, #0x70]
3232 #else
33− teq \rx, #0
34− strne \rd, [\rx, #0x0C]
33+ str \rd, [\rx, #0x0C]
3534 #endif
3635 .endm
3736
arch/arm/mach-msm/scm.c+3−0
@@ -282,6 +282,9 @@ u32 scm_get_version(void) · 281 unmodified lines
282282 __asmeq("%1", "r1")
283283 __asmeq("%2", "r0")
284284 __asmeq("%3", "r1")
285+#ifdef REQUIRES_SEC
286+ ".arch_extension sec\n"
287+#endif
285288 "smc #0 @ switch to secure world\n"
286289 : "=r" (r0), "=r" (r1)
287290 : "r" (r0), "r" (r1)
arch/arm/mach-omap1/Makefile+9−4
@@ -12,6 +12,9 @@ endif · 11 unmodified lines
1212
1313 obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
1414
15+# OCPI interconnect support for 1710, 1610 and 5912
16+obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
17+
1518 # Power Management
1619 obj-$(CONFIG_PM) += pm.o sleep.o
1720
@@ -28,13 +31,15 @@ usb-fs-$(CONFIG_USB) := usb.o · 10 unmodified lines
2831 obj-y += $(usb-fs-m) $(usb-fs-y)
2932
3033 # Specific board support
31−obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o
34+obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o \
35+ board-nand.o
3236 obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
3337 obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
34−obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
35−obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o
38+obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o board-nand.o
39+obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o board-nand.o
3640 obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
37−obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o
41+obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o \
42+ board-nand.o
3843 obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
3944 obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o
4045 obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o
arch/arm/mach-omap1/ams-delta-fiq.c+1−1
@@ -102,7 +102,7 @@ void __init ams_delta_init_fiq(void) · 101 unmodified lines
102102 }
103103
104104 retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq,
105− IRQ_TYPE_EDGE_RISING, "deferred_fiq", 0);
105+ IRQ_TYPE_EDGE_RISING, "deferred_fiq", NULL);
106106 if (retval < 0) {
107107 pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval);
108108 release_fiq(&fh);
arch/arm/mach-omap1/board-fsample.c+1−15
@@ -185,20 +185,6 @@ static struct platform_device nor_device = { · 184 unmodified lines
185185 .resource = &nor_resource,
186186 };
187187
188−static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
189−{
190− struct nand_chip *this = mtd->priv;
191− unsigned long mask;
192−
193− if (cmd == NAND_CMD_NONE)
194− return;
195−
196− mask = (ctrl & NAND_CLE) ? 0x02 : 0;
197− if (ctrl & NAND_ALE)
198− mask |= 0x04;
199− writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
200−}
201−
202188 #define FSAMPLE_NAND_RB_GPIO_PIN 62
203189
204190 static int nand_dev_ready(struct mtd_info *mtd)
@@ -216,7 +202,7 @@ static struct platform_nand_data nand_data = { · 11 unmodified lines
216202 .part_probe_types = part_probes,
217203 },
218204 .ctrl = {
219− .cmd_ctrl = nand_cmd_ctl,
205+ .cmd_ctrl = omap1_nand_cmd_ctl,
220206 .dev_ready = nand_dev_ready,
221207 },
222208 };
arch/arm/mach-omap1/board-h2.c+1−16
@@ -179,20 +179,6 @@ static struct mtd_partition h2_nand_partitions[] = { · 178 unmodified lines
179179 },
180180 };
181181
182−static void h2_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
183−{
184− struct nand_chip *this = mtd->priv;
185− unsigned long mask;
186−
187− if (cmd == NAND_CMD_NONE)
188− return;
189−
190− mask = (ctrl & NAND_CLE) ? 0x02 : 0;
191− if (ctrl & NAND_ALE)
192− mask |= 0x04;
193− writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
194−}
195−
196182 #define H2_NAND_RB_GPIO_PIN 62
197183
198184 static int h2_nand_dev_ready(struct mtd_info *mtd)
@@ -212,9 +198,8 @@ static struct platform_nand_data h2_nand_platdata = { · 13 unmodified lines
212198 .part_probe_types = h2_part_probes,
213199 },
214200 .ctrl = {
215− .cmd_ctrl = h2_nand_cmd_ctl,
201+ .cmd_ctrl = omap1_nand_cmd_ctl,
216202 .dev_ready = h2_nand_dev_ready,
217−
218203 },
219204 };
220205
arch/arm/mach-omap1/board-h3.c+1−15
@@ -181,20 +181,6 @@ static struct mtd_partition nand_partitions[] = { · 180 unmodified lines
181181 },
182182 };
183183
184−static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
185−{
186− struct nand_chip *this = mtd->priv;
187− unsigned long mask;
188−
189− if (cmd == NAND_CMD_NONE)
190− return;
191−
192− mask = (ctrl & NAND_CLE) ? 0x02 : 0;
193− if (ctrl & NAND_ALE)
194− mask |= 0x04;
195− writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
196−}
197−
198184 #define H3_NAND_RB_GPIO_PIN 10
199185
200186 static int nand_dev_ready(struct mtd_info *mtd)
@@ -214,7 +200,7 @@ static struct platform_nand_data nand_platdata = { · 13 unmodified lines
214200 .part_probe_types = part_probes,
215201 },
216202 .ctrl = {
217− .cmd_ctrl = nand_cmd_ctl,
203+ .cmd_ctrl = omap1_nand_cmd_ctl,
218204 .dev_ready = nand_dev_ready,
219205
220206 },
arch/arm/mach-omap1/board-nand.c+37−0
@@ -0,0 +1,37 @@
1+/*
2+ * linux/arch/arm/mach-omap1/board-nand.c
3+ *
4+ * Common OMAP1 board NAND code
5+ *
6+ * Copyright (C) 2004, 2012 Texas Instruments, Inc.
7+ * Copyright (C) 2002 MontaVista Software, Inc.
8+ * Copyright (C) 2001 RidgeRun, Inc.
9+ * Author: RidgeRun, Inc.
10+ * Greg Lonnon (glonnon@ridgerun.com) or info@ridgerun.com
11+ *
12+ * This program is free software; you can redistribute it and/or modify
13+ * it under the terms of the GNU General Public License version 2 as
14+ * published by the Free Software Foundation.
15+ */
16+#include <linux/kernel.h>
17+#include <linux/io.h>
18+#include <linux/mtd/mtd.h>
19+#include <linux/mtd/nand.h>
20+
21+#include "common.h"
22+
23+void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
24+{
25+ struct nand_chip *this = mtd->priv;
26+ unsigned long mask;
27+
28+ if (cmd == NAND_CMD_NONE)
29+ return;
30+
31+ mask = (ctrl & NAND_CLE) ? 0x02 : 0;
32+ if (ctrl & NAND_ALE)
33+ mask |= 0x04;
34+
35+ writeb(cmd, this->IO_ADDR_W + mask);
36+}
37+
arch/arm/mach-omap1/board-palmz71.c+2−2
@@ -289,10 +289,10 @@ palmz71_gpio_setup(int early) · 288 unmodified lines
289289 gpio_direction_input(PALMZ71_USBDETECT_GPIO);
290290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
291291 palmz71_powercable, IRQF_SAMPLE_RANDOM,
292− "palmz71-cable", 0))
292+ "palmz71-cable", NULL))
293293 printk(KERN_ERR
294294 "IRQ request for power cable failed!\n");
295− palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0);
295+ palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL);
296296 }
297297 }
298298
arch/arm/mach-omap1/board-perseus2.c+1−15
@@ -143,20 +143,6 @@ static struct platform_device nor_device = { · 142 unmodified lines
143143 .resource = &nor_resource,
144144 };
145145
146−static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
147−{
148− struct nand_chip *this = mtd->priv;
149− unsigned long mask;
150−
151− if (cmd == NAND_CMD_NONE)
152− return;
153−
154− mask = (ctrl & NAND_CLE) ? 0x02 : 0;
155− if (ctrl & NAND_ALE)
156− mask |= 0x04;
157− writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
158−}
159−
160146 #define P2_NAND_RB_GPIO_PIN 62
161147
162148 static int nand_dev_ready(struct mtd_info *mtd)
@@ -174,7 +160,7 @@ static struct platform_nand_data nand_data = { · 11 unmodified lines
174160 .part_probe_types = part_probes,
175161 },
176162 .ctrl = {
177− .cmd_ctrl = nand_cmd_ctl,
163+ .cmd_ctrl = omap1_nand_cmd_ctl,
178164 .dev_ready = nand_dev_ready,
179165 },
180166 };
arch/arm/mach-omap1/clock.c+1−2
@@ -194,9 +194,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) · 193 unmodified lines
194194 {
195195 /* Find the highest supported frequency <= rate and switch to it */
196196 struct mpu_rate * ptr;
197− unsigned long dpll1_rate, ref_rate;
197+ unsigned long ref_rate;
198198
199− dpll1_rate = ck_dpll1_p->rate;
200199 ref_rate = ck_ref_p->rate;
201200
202201 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
arch/arm/mach-omap1/common.h+14−1
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #define __ARCH_ARM_MACH_OMAP1_COMMON_H
2828
2929 #include <plat/common.h>
30+#include <linux/mtd/mtd.h>
3031
3132 #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
3233 void omap7xx_map_io(void);
@@ -56,8 +57,20 @@ void omap1_init_early(void); · 23 unmodified lines
5657 void omap1_init_irq(void);
5758 void omap1_restart(char, const char *);
5859
60+extern void __init omap_check_revision(void);
61+
62+extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
63+ unsigned int ctrl);
64+
5965 extern struct sys_timer omap1_timer;
6066 extern bool omap_32k_timer_init(void);
61−extern void __init omap_init_consistent_dma_size(void);
67+
68+extern u32 omap_irq_flags;
69+
70+#ifdef CONFIG_ARCH_OMAP16XX
71+extern int ocpi_enable(void);
72+#else
73+static inline int ocpi_enable(void) { return 0; }
74+#endif
6275
6376 #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
arch/arm/mach-omap1/fpga.c+1−1
@@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d) · 86 unmodified lines
8787 fpga_ack_irq(d);
8888 }
8989
90−void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
90+static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
9191 {
9292 u32 stat;
9393 int fpga_irq;
arch/arm/mach-omap1/id.c+2−0
@@ -21,6 +21,8 @@ · 20 unmodified lines
2121
2222 #include <mach/hardware.h>
2323
24+#include "common.h"
25+
2426 #define OMAP_DIE_ID_0 0xfffe1800
2527 #define OMAP_DIE_ID_1 0xfffe1804
2628 #define OMAP_PRODUCTION_ID_0 0xfffe2000
arch/arm/mach-omap1/io.c+1−2
@@ -18,13 +18,12 @@ · 17 unmodified lines
1818
1919 #include <plat/mux.h>
2020 #include <plat/tc.h>
21+#include <plat/dma.h>
2122
2223 #include "iomap.h"
2324 #include "common.h"
2425 #include "clock.h"
2526
26−extern void omap_check_revision(void);
27−
2827 /*
2928 * The machine specific code may provide the extra mapping besides the
3029 * default mapping provided here.
arch/arm/mach-omap1/irq.c+2−0
@@ -49,6 +49,8 @@ · 48 unmodified lines
4949
5050 #include <mach/hardware.h>
5151
52+#include "common.h"
53+
5254 #define IRQ_BANK(irq) ((irq) >> 5)
5355 #define IRQ_BIT(irq) ((irq) & 0x1f)
5456
arch/arm/mach-omap1/lcd_dma.c+1−6
@@ -57,7 +57,7 @@ static struct lcd_dma_info { · 56 unmodified lines
5757 void *cb_data;
5858
5959 int active;
60− unsigned long addr, size;
60+ unsigned long addr;
6161 int rotate, data_type, xres, yres;
6262 int vxres;
6363 int mirror;
@@ -77,11 +77,6 @@ void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, · 13 unmodified lines
7777 }
7878 EXPORT_SYMBOL(omap_set_lcd_dma_b1);
7979
80−void omap_set_lcd_dma_src_port(int port)
81−{
82− lcd_dma.src_port = port;
83−}
84−
8580 void omap_set_lcd_dma_ext_controller(int external)
8681 {
8782 lcd_dma.ext_ctrl = external;
arch/arm/mach-omap1/ocpi.crenamed from arch/arm/plat-omap/ocpi.c+5−2
@@ -4,6 +4,7 @@ · 3 unmodified lines
44 * Minimal OCP bus support for omap16xx
55 *
66 * Copyright (C) 2003 - 2005 Nokia Corporation
7+ * Copyright (C) 2012 Texas Instruments, Inc.
78 * Written by Tony Lindgren <tony@atomide.com>
89 *
910 * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>.
@@ -35,6 +36,8 @@ · 25 unmodified lines
3536
3637 #include <mach/hardware.h>
3738
39+#include "common.h"
40+
3841 #define OCPI_BASE 0xfffec320
3942 #define OCPI_FAULT (OCPI_BASE + 0x00)
4043 #define OCPI_CMD_FAULT (OCPI_BASE + 0x04)
@@ -64,7 +67,7 @@ int ocpi_enable(void) · 23 unmodified lines
6467 /* Enable access for OHCI in OCPI */
6568 val = omap_readl(OCPI_PROT);
6669 val &= ~0xff;
67− //val &= (1 << 0); /* Allow access only to EMIFS */
70+ /* val &= (1 << 0); Allow access only to EMIFS */
6871 omap_writel(val, OCPI_PROT);
6972
7073 val = omap_readl(OCPI_SEC);
@@ -86,7 +89,7 @@ static int __init omap_ocpi_init(void) · 15 unmodified lines
8689
8790 clk_enable(ocpi_ck);
8891 ocpi_enable();
89− printk("OMAP OCPI interconnect driver loaded\n");
92+ pr_info("OMAP OCPI interconnect driver loaded\n");
9093
9194 return 0;
9295 }
arch/arm/mach-omap1/pm.c+4−5
@@ -569,11 +569,10 @@ static int omap_pm_read_proc( · 568 unmodified lines
569569
570570 static void omap_pm_init_proc(void)
571571 {
572− struct proc_dir_entry *entry;
573−
574− entry = create_proc_read_entry("driver/omap_pm",
575− S_IWUSR | S_IRUGO, NULL,
576− omap_pm_read_proc, NULL);
572+ /* XXX Appears to leak memory */
573+ create_proc_read_entry("driver/omap_pm",
574+ S_IWUSR | S_IRUGO, NULL,
575+ omap_pm_read_proc, NULL);
577576 }
578577
579578 #endif /* DEBUG && CONFIG_PROC_FS */
arch/arm/mach-omap1/reset.c+2−0
@@ -8,6 +8,8 @@ · 7 unmodified lines
88
99 #include <mach/hardware.h>
1010
11+#include "common.h"
12+
1113 void omap1_restart(char mode, const char *cmd)
1214 {
1315 /*
arch/arm/mach-omap1/timer.c+1−2
@@ -54,8 +54,7 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev, · 53 unmodified lines
5454 return 0;
5555 }
5656
57−
58−int __init omap1_dm_timer_init(void)
57+static int __init omap1_dm_timer_init(void)
5958 {
6059 int i;
6160 int ret;
arch/arm/mach-omap1/usb.c+3−0
@@ -29,6 +29,8 @@ · 28 unmodified lines
2929 #include <plat/mux.h>
3030 #include <plat/usb.h>
3131
32+#include "common.h"
33+
3234 /* These routines should handle the standard chip-specific modes
3335 * for usb0/1/2 ports, covering basic mux and transceiver setup.
3436 *
@@ -138,6 +140,7 @@ static inline void ohci_device_init(struct omap_usb_config *pdata) · 103 unmodified lines
138140 if (cpu_is_omap7xx())
139141 ohci_resources[1].start = INT_7XX_USB_HHC_1;
140142 pdata->ohci_device = &ohci_device;
143+ pdata->ocpi_enable = &ocpi_enable;
141144 }
142145
143146 #else
arch/arm/mach-omap2/am35xx-emac.c+17−20
@@ -39,26 +39,23 @@ static struct platform_device am35xx_emac_mdio_device = { · 38 unmodified lines
3939
4040 static void am35xx_enable_emac_int(void)
4141 {
42− u32 regval;
43−
44− regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
45− regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
46− AM35XX_CPGMAC_C0_TX_PULSE_CLR |
47− AM35XX_CPGMAC_C0_MISC_PULSE_CLR |
48− AM35XX_CPGMAC_C0_RX_THRESH_CLR);
49− omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
50− regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
42+ u32 v;
43+
44+ v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
45+ v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
46+ AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
47+ omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
48+ omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
5149 }
5250
5351 static void am35xx_disable_emac_int(void)
5452 {
55− u32 regval;
53+ u32 v;
5654
57− regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
58− regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
59− AM35XX_CPGMAC_C0_TX_PULSE_CLR);
60− omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
61− regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
55+ v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
56+ v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
57+ omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
58+ omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
6259 }
6360
6461 static struct emac_platform_data am35xx_emac_pdata = {
@@ -92,7 +89,7 @@ static struct platform_device am35xx_emac_device = { · 27 unmodified lines
9289
9390 void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
9491 {
95− unsigned int regval;
92+ u32 v;
9693 int err;
9794
9895 am35xx_emac_pdata.rmii_en = rmii_en;
@@ -110,8 +107,8 @@ void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) · 11 unmodified lines
110107 return;
111108 }
112109
113− regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
114− regval = regval & (~(AM35XX_CPGMACSS_SW_RST));
115− omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
116− regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
110+ v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
111+ v &= ~AM35XX_CPGMACSS_SW_RST;
112+ omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
113+ omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
117114 }
arch/arm/mach-omap2/board-3430sdp.c+4−34
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 #include <plat/dma.h>
3838 #include <plat/gpmc.h>
3939 #include <video/omapdss.h>
40−#include <video/omap-panel-dvi.h>
40+#include <video/omap-panel-tfp410.h>
4141
4242 #include <plat/gpmc-smc91x.h>
4343
@@ -113,9 +113,6 @@ static struct gpio sdp3430_dss_gpios[] __initdata = { · 69 unmodified lines
113113 {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
114114 };
115115
116−static int lcd_enabled;
117−static int dvi_enabled;
118−
119116 static void __init sdp3430_display_init(void)
120117 {
121118 int r;
@@ -129,44 +126,18 @@ static void __init sdp3430_display_init(void) · 7 unmodified lines
129126
130127 static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
131128 {
132− if (dvi_enabled) {
133− printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
134− return -EINVAL;
135− }
136−
137129 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
138130 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
139131
140− lcd_enabled = 1;
141−
142132 return 0;
143133 }
144134
145135 static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
146136 {
147− lcd_enabled = 0;
148−
149137 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
150138 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
151139 }
152140
153−static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev)
154−{
155− if (lcd_enabled) {
156− printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
157− return -EINVAL;
158− }
159−
160− dvi_enabled = 1;
161−
162− return 0;
163−}
164−
165−static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)
166−{
167− dvi_enabled = 0;
168−}
169−
170141 static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
171142 {
172143 return 0;
@@ -186,15 +157,14 @@ static struct omap_dss_device sdp3430_lcd_device = { · 13 unmodified lines
186157 .platform_disable = sdp3430_panel_disable_lcd,
187158 };
188159
189−static struct panel_dvi_platform_data dvi_panel = {
190− .platform_enable = sdp3430_panel_enable_dvi,
191− .platform_disable = sdp3430_panel_disable_dvi,
160+static struct tfp410_platform_data dvi_panel = {
161+ .power_down_gpio = -1,
192162 };
193163
194164 static struct omap_dss_device sdp3430_dvi_device = {
195165 .name = "dvi",
196166 .type = OMAP_DISPLAY_TYPE_DPI,
197− .driver_name = "dvi",
167+ .driver_name = "tfp410",
198168 .data = &dvi_panel,
199169 .phy.dpi.data_lines = 24,
200170 };
arch/arm/mach-omap2/board-4430sdp.c+8−29
@@ -666,6 +666,10 @@ static struct nokia_dsi_panel_data dsi1_panel = { · 665 unmodified lines
666666 .use_ext_te = false,
667667 .ext_te_gpio = 101,
668668 .esd_interval = 0,
669+ .pin_config = {
670+ .num_pins = 6,
671+ .pins = { 0, 1, 2, 3, 4, 5 },
672+ },
669673 };
670674
671675 static struct omap_dss_device sdp4430_lcd_device = {
@@ -674,13 +678,6 @@ static struct omap_dss_device sdp4430_lcd_device = { · 2 unmodified lines
674678 .type = OMAP_DISPLAY_TYPE_DSI,
675679 .data = &dsi1_panel,
676680 .phy.dsi = {
677− .clk_lane = 1,
678− .clk_pol = 0,
679− .data1_lane = 2,
680− .data1_pol = 0,
681− .data2_lane = 3,
682− .data2_pol = 0,
683−
684681 .module = 0,
685682 },
686683
@@ -715,6 +712,10 @@ static struct nokia_dsi_panel_data dsi2_panel = { · 28 unmodified lines
715712 .use_ext_te = false,
716713 .ext_te_gpio = 103,
717714 .esd_interval = 0,
715+ .pin_config = {
716+ .num_pins = 6,
717+ .pins = { 0, 1, 2, 3, 4, 5 },
718+ },
718719 };
719720
720721 static struct omap_dss_device sdp4430_lcd2_device = {
@@ -723,12 +724,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { · 2 unmodified lines
723724 .type = OMAP_DISPLAY_TYPE_DSI,
724725 .data = &dsi2_panel,
725726 .phy.dsi = {
726− .clk_lane = 1,
727− .clk_pol = 0,
728− .data1_lane = 2,
729− .data1_pol = 0,
730− .data2_lane = 3,
731− .data2_pol = 0,
732727
733728 .module = 1,
734729 },
@@ -758,21 +753,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { · 23 unmodified lines
758753 .channel = OMAP_DSS_CHANNEL_LCD2,
759754 };
760755
761−static void sdp4430_lcd_init(void)
762−{
763− int r;
764−
765− r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT,
766− "lcd1_reset_gpio");
767− if (r)
768− pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
769−
770− r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT,
771− "lcd2_reset_gpio");
772− if (r)
773− pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
774−}
775−
776756 static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
777757 .hpd_gpio = HDMI_GPIO_HPD,
778758 };
@@ -858,7 +838,6 @@ static void __init omap_4430sdp_display_init(void) · 79 unmodified lines
858838 if (r)
859839 pr_err("%s: Could not get display_sel GPIO\n", __func__);
860840
861− sdp4430_lcd_init();
862841 sdp4430_picodlp_init();
863842 omap_display_init(&sdp4430_dss_data);
864843 /*
arch/arm/mach-omap2/board-am3517evm.c+4−21
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 #include <plat/usb.h>
3838 #include <video/omapdss.h>
3939 #include <video/omap-panel-generic-dpi.h>
40−#include <video/omap-panel-dvi.h>
40+#include <video/omap-panel-tfp410.h>
4141
4242 #include "am35xx-emac.h"
4343 #include "mux.h"
@@ -207,31 +207,14 @@ static struct omap_dss_device am3517_evm_tv_device = { · 163 unmodified lines
207207 .platform_disable = am3517_evm_panel_disable_tv,
208208 };
209209
210−static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev)
211−{
212− if (lcd_enabled) {
213− printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
214− return -EINVAL;
215− }
216− dvi_enabled = 1;
217−
218− return 0;
219−}
220−
221−static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev)
222−{
223− dvi_enabled = 0;
224−}
225−
226−static struct panel_dvi_platform_data dvi_panel = {
227− .platform_enable = am3517_evm_panel_enable_dvi,
228− .platform_disable = am3517_evm_panel_disable_dvi,
210+static struct tfp410_platform_data dvi_panel = {
211+ .power_down_gpio = -1,
229212 };
230213
231214 static struct omap_dss_device am3517_evm_dvi_device = {
232215 .type = OMAP_DISPLAY_TYPE_DPI,
233216 .name = "dvi",
234− .driver_name = "dvi",
217+ .driver_name = "tfp410",
235218 .data = &dvi_panel,
236219 .phy.dpi.data_lines = 24,
237220 };
arch/arm/mach-omap2/board-cm-t35.c+4−26
@@ -44,7 +44,7 @@ · 43 unmodified lines
4444 #include <plat/usb.h>
4545 #include <video/omapdss.h>
4646 #include <video/omap-panel-generic-dpi.h>
47−#include <video/omap-panel-dvi.h>
47+#include <video/omap-panel-tfp410.h>
4848 #include <plat/mcspi.h>
4949
5050 #include <mach/hardware.h>
@@ -218,25 +218,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev) · 167 unmodified lines
218218 gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
219219 }
220220
221−static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev)
222−{
223− if (lcd_enabled) {
224− printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
225− return -EINVAL;
226− }
227−
228− gpio_set_value(CM_T35_DVI_EN_GPIO, 0);
229− dvi_enabled = 1;
230−
231− return 0;
232−}
233−
234−static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev)
235−{
236− gpio_set_value(CM_T35_DVI_EN_GPIO, 1);
237− dvi_enabled = 0;
238−}
239−
240221 static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
241222 {
242223 return 0;
@@ -260,15 +241,14 @@ static struct omap_dss_device cm_t35_lcd_device = { · 17 unmodified lines
260241 .phy.dpi.data_lines = 18,
261242 };
262243
263−static struct panel_dvi_platform_data dvi_panel = {
264− .platform_enable = cm_t35_panel_enable_dvi,
265− .platform_disable = cm_t35_panel_disable_dvi,
244+static struct tfp410_platform_data dvi_panel = {
245+ .power_down_gpio = CM_T35_DVI_EN_GPIO,
266246 };
267247
268248 static struct omap_dss_device cm_t35_dvi_device = {
269249 .name = "dvi",
270250 .type = OMAP_DISPLAY_TYPE_DPI,
271− .driver_name = "dvi",
251+ .driver_name = "tfp410",
272252 .data = &dvi_panel,
273253 .phy.dpi.data_lines = 24,
274254 };
@@ -316,7 +296,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = { · 41 unmodified lines
316296 static struct gpio cm_t35_dss_gpios[] __initdata = {
317297 { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" },
318298 { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" },
319− { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" },
320299 };
321300
322301 static void __init cm_t35_init_display(void)
@@ -335,7 +314,6 @@ static void __init cm_t35_init_display(void) · 12 unmodified lines
335314
336315 gpio_export(CM_T35_LCD_EN_GPIO, 0);
337316 gpio_export(CM_T35_LCD_BL_GPIO, 0);
338− gpio_export(CM_T35_DVI_EN_GPIO, 0);
339317
340318 msleep(50);
341319 gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
arch/arm/mach-omap2/board-devkit8000.c+5−25
@@ -47,7 +47,7 @@ · 46 unmodified lines
4747 #include <plat/usb.h>
4848 #include <video/omapdss.h>
4949 #include <video/omap-panel-generic-dpi.h>
50−#include <video/omap-panel-dvi.h>
50+#include <video/omap-panel-tfp410.h>
5151
5252 #include <plat/mcspi.h>
5353 #include <linux/input/matrix_keypad.h>
@@ -118,19 +118,6 @@ static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev) · 64 unmodified lines
118118 gpio_set_value_cansleep(dssdev->reset_gpio, 0);
119119 }
120120
121−static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev)
122−{
123− if (gpio_is_valid(dssdev->reset_gpio))
124− gpio_set_value_cansleep(dssdev->reset_gpio, 1);
125− return 0;
126−}
127−
128−static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
129−{
130− if (gpio_is_valid(dssdev->reset_gpio))
131− gpio_set_value_cansleep(dssdev->reset_gpio, 0);
132−}
133−
134121 static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
135122 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
136123 };
@@ -154,15 +141,14 @@ static struct omap_dss_device devkit8000_lcd_device = { · 17 unmodified lines
154141 .phy.dpi.data_lines = 24,
155142 };
156143
157−static struct panel_dvi_platform_data dvi_panel = {
158− .platform_enable = devkit8000_panel_enable_dvi,
159− .platform_disable = devkit8000_panel_disable_dvi,
144+static struct tfp410_platform_data dvi_panel = {
145+ .power_down_gpio = -1,
160146 };
161147
162148 static struct omap_dss_device devkit8000_dvi_device = {
163149 .name = "dvi",
164150 .type = OMAP_DISPLAY_TYPE_DPI,
165− .driver_name = "dvi",
151+ .driver_name = "tfp410",
166152 .data = &dvi_panel,
167153 .phy.dpi.data_lines = 24,
168154 };
@@ -244,13 +230,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev, · 75 unmodified lines
244230 }
245231
246232 /* gpio + 7 is "DVI_PD" (out, active low) */
247− devkit8000_dvi_device.reset_gpio = gpio + 7;
248− ret = gpio_request_one(devkit8000_dvi_device.reset_gpio,
249− GPIOF_OUT_INIT_LOW, "DVI PowerDown");
250− if (ret < 0) {
251− devkit8000_dvi_device.reset_gpio = -EINVAL;
252− printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n");
253− }
233+ dvi_panel.power_down_gpio = gpio + 7;
254234
255235 return 0;
256236 }
arch/arm/mach-omap2/board-igep0020.c+5−27
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 #include <plat/gpmc.h>
3333 #include <plat/usb.h>
3434 #include <video/omapdss.h>
35−#include <video/omap-panel-dvi.h>
35+#include <video/omap-panel-tfp410.h>
3636 #include <plat/onenand.h>
3737
3838 #include "mux.h"
@@ -444,28 +444,15 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { · 405 unmodified lines
444444 .setup = igep_twl_gpio_setup,
445445 };
446446
447−static int igep2_enable_dvi(struct omap_dss_device *dssdev)
448−{
449− gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
450−
451− return 0;
452−}
453−
454−static void igep2_disable_dvi(struct omap_dss_device *dssdev)
455−{
456− gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
457−}
458−
459−static struct panel_dvi_platform_data dvi_panel = {
460− .platform_enable = igep2_enable_dvi,
461− .platform_disable = igep2_disable_dvi,
462− .i2c_bus_num = 3,
447+static struct tfp410_platform_data dvi_panel = {
448+ .i2c_bus_num = 3,
449+ .power_down_gpio = IGEP2_GPIO_DVI_PUP,
463450 };
464451
465452 static struct omap_dss_device igep2_dvi_device = {
466453 .type = OMAP_DISPLAY_TYPE_DPI,
467454 .name = "dvi",
468− .driver_name = "dvi",
455+ .driver_name = "tfp410",
469456 .data = &dvi_panel,
470457 .phy.dpi.data_lines = 24,
471458 };
@@ -480,14 +467,6 @@ static struct omap_dss_board_info igep2_dss_data = { · 8 unmodified lines
480467 .default_device = &igep2_dvi_device,
481468 };
482469
483−static void __init igep2_display_init(void)
484−{
485− int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
486− "GPIO_DVI_PUP");
487− if (err)
488− pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
489−}
490−
491470 static struct platform_device *igep_devices[] __initdata = {
492471 &igep_vwlan_device,
493472 };
@@ -668,7 +647,6 @@ static void __init igep_init(void) · 174 unmodified lines
668647
669648 if (machine_is_igep0020()) {
670649 omap_display_init(&igep2_dss_data);
671− igep2_display_init();
672650 igep2_init_smsc911x();
673651 usbhs_init(&igep2_usbhs_bdata);
674652 } else {
arch/arm/mach-omap2/board-omap3beagle.c+5−32
@@ -42,7 +42,7 @@ · 41 unmodified lines
4242 #include <plat/board.h>
4343 #include "common.h"
4444 #include <video/omapdss.h>
45−#include <video/omap-panel-dvi.h>
45+#include <video/omap-panel-tfp410.h>
4646 #include <plat/gpmc.h>
4747 #include <plat/nand.h>
4848 #include <plat/usb.h>
@@ -189,33 +189,17 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { · 140 unmodified lines
189189
190190 /* DSS */
191191
192−static int beagle_enable_dvi(struct omap_dss_device *dssdev)
193−{
194− if (gpio_is_valid(dssdev->reset_gpio))
195− gpio_set_value(dssdev->reset_gpio, 1);
196−
197− return 0;
198−}
199−
200−static void beagle_disable_dvi(struct omap_dss_device *dssdev)
201−{
202− if (gpio_is_valid(dssdev->reset_gpio))
203− gpio_set_value(dssdev->reset_gpio, 0);
204−}
205−
206−static struct panel_dvi_platform_data dvi_panel = {
207− .platform_enable = beagle_enable_dvi,
208− .platform_disable = beagle_disable_dvi,
192+static struct tfp410_platform_data dvi_panel = {
209193 .i2c_bus_num = 3,
194+ .power_down_gpio = -1,
210195 };
211196
212197 static struct omap_dss_device beagle_dvi_device = {
213198 .type = OMAP_DISPLAY_TYPE_DPI,
214199 .name = "dvi",
215− .driver_name = "dvi",
200+ .driver_name = "tfp410",
216201 .data = &dvi_panel,
217202 .phy.dpi.data_lines = 24,
218− .reset_gpio = -EINVAL,
219203 };
220204
221205 static struct omap_dss_device beagle_tv_device = {
@@ -236,16 +220,6 @@ static struct omap_dss_board_info beagle_dss_data = { · 14 unmodified lines
236220 .default_device = &beagle_dvi_device,
237221 };
238222
239−static void __init beagle_display_init(void)
240−{
241− int r;
242−
243− r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW,
244− "DVI reset");
245− if (r < 0)
246− printk(KERN_ERR "Unable to get DVI reset GPIO\n");
247−}
248−
249223 #include "sdram-micron-mt46h32m32lf-6.h"
250224
251225 static struct omap2_hsmmc_info mmc[] = {
@@ -309,7 +283,7 @@ static int beagle_twl_gpio_setup(struct device *dev, · 57 unmodified lines
309283 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
310284 pr_err("%s: unable to configure EHCI_nOC\n", __func__);
311285 }
312− beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;
286+ dvi_panel.power_down_gpio = beagle_config.reset_gpio;
313287
314288 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
315289 "nEN_USB_PWR");
@@ -552,7 +526,6 @@ static void __init omap3_beagle_init(void) · 236 unmodified lines
552526 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
553527 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
554528
555− beagle_display_init();
556529 beagle_opp_init();
557530 }
558531
arch/arm/mach-omap2/board-omap3evm.c+8−29
@@ -46,7 +46,7 @@ · 45 unmodified lines
4646 #include "common.h"
4747 #include <plat/mcspi.h>
4848 #include <video/omapdss.h>
49−#include <video/omap-panel-dvi.h>
49+#include <video/omap-panel-tfp410.h>
5050
5151 #include "mux.h"
5252 #include "sdram-micron-mt46h32m32lf-6.h"
@@ -219,35 +219,14 @@ static struct omap_dss_device omap3_evm_tv_device = { · 166 unmodified lines
219219 .platform_disable = omap3_evm_disable_tv,
220220 };
221221
222−static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
223−{
224− if (lcd_enabled) {
225− printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
226− return -EINVAL;
227− }
228−
229− gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
230−
231− dvi_enabled = 1;
232− return 0;
233−}
234−
235−static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
236−{
237− gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
238−
239− dvi_enabled = 0;
240−}
241−
242−static struct panel_dvi_platform_data dvi_panel = {
243− .platform_enable = omap3_evm_enable_dvi,
244− .platform_disable = omap3_evm_disable_dvi,
222+static struct tfp410_platform_data dvi_panel = {
223+ .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO,
245224 };
246225
247226 static struct omap_dss_device omap3_evm_dvi_device = {
248227 .name = "dvi",
249228 .type = OMAP_DISPLAY_TYPE_DPI,
250− .driver_name = "dvi",
229+ .driver_name = "tfp410",
251230 .data = &dvi_panel,
252231 .phy.dpi.data_lines = 24,
253232 };
@@ -630,13 +609,13 @@ static struct regulator_consumer_supply dummy_supplies[] = { · 376 unmodified lines
630609
631610 static void __init omap3_evm_init(void)
632611 {
612+ struct omap_board_mux *obm;
613+
633614 omap3_evm_get_revision();
634615 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
635616
636− if (cpu_is_omap3630())
637− omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
638− else
639− omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
617+ obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
618+ omap3_mux_init(obm, OMAP_PACKAGE_CBB);
640619
641620 omap_board_config = omap3_evm_config;
642621 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
arch/arm/mach-omap2/board-omap3stalker.c+4−25
@@ -42,7 +42,7 @@ · 41 unmodified lines
4242 #include <plat/usb.h>
4343 #include <video/omapdss.h>
4444 #include <video/omap-panel-generic-dpi.h>
45−#include <video/omap-panel-dvi.h>
45+#include <video/omap-panel-tfp410.h>
4646
4747 #include <plat/mcspi.h>
4848 #include <linux/input/matrix_keypad.h>
@@ -92,9 +92,6 @@ static inline void __init omap3stalker_init_eth(void) · 43 unmodified lines
9292 #define LCD_PANEL_BKLIGHT_GPIO 210
9393 #define ENABLE_VPLL2_DEV_GRP 0xE0
9494
95−static int lcd_enabled;
96−static int dvi_enabled;
97−
9895 static void __init omap3_stalker_display_init(void)
9996 {
10097 return;
@@ -122,32 +119,14 @@ static struct omap_dss_device omap3_stalker_tv_device = { · 21 unmodified lines
122119 .platform_disable = omap3_stalker_disable_tv,
123120 };
124121
125−static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev)
126−{
127− if (lcd_enabled) {
128− printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
129− return -EINVAL;
130− }
131− gpio_set_value(DSS_ENABLE_GPIO, 1);
132− dvi_enabled = 1;
133− return 0;
134−}
135−
136−static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev)
137−{
138− gpio_set_value(DSS_ENABLE_GPIO, 0);
139− dvi_enabled = 0;
140−}
141−
142−static struct panel_dvi_platform_data dvi_panel = {
143− .platform_enable = omap3_stalker_enable_dvi,
144− .platform_disable = omap3_stalker_disable_dvi,
122+static struct tfp410_platform_data dvi_panel = {
123+ .power_down_gpio = DSS_ENABLE_GPIO,
145124 };
146125
147126 static struct omap_dss_device omap3_stalker_dvi_device = {
148127 .name = "dvi",
149128 .type = OMAP_DISPLAY_TYPE_DPI,
150− .driver_name = "dvi",
129+ .driver_name = "tfp410",
151130 .data = &dvi_panel,
152131 .phy.dpi.data_lines = 24,
153132 };
arch/arm/mach-omap2/board-omap4panda.c+8−38
@@ -42,7 +42,7 @@ · 41 unmodified lines
4242 #include "common.h"
4343 #include <plat/usb.h>
4444 #include <plat/mmc.h>
45−#include <video/omap-panel-dvi.h>
45+#include <video/omap-panel-tfp410.h>
4646
4747 #include "hsmmc.h"
4848 #include "control.h"
@@ -231,7 +231,7 @@ static struct platform_device omap_vwlan_device = { · 182 unmodified lines
231231 },
232232 };
233233
234−struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
234+static struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
235235 /* PANDA ref clock is 38.4 MHz */
236236 .board_ref_clock = 2,
237237 };
@@ -420,47 +420,22 @@ static struct omap_board_mux board_mux[] __initdata = { · 182 unmodified lines
420420 /* Display DVI */
421421 #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
422422
423−static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev)
424−{
425− gpio_set_value(dssdev->reset_gpio, 1);
426− return 0;
427−}
428−
429−static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
430−{
431− gpio_set_value(dssdev->reset_gpio, 0);
432−}
433−
434423 /* Using generic display panel */
435−static struct panel_dvi_platform_data omap4_dvi_panel = {
436− .platform_enable = omap4_panda_enable_dvi,
437− .platform_disable = omap4_panda_disable_dvi,
438− .i2c_bus_num = 3,
424+static struct tfp410_platform_data omap4_dvi_panel = {
425+ .i2c_bus_num = 3,
426+ .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
439427 };
440428
441−struct omap_dss_device omap4_panda_dvi_device = {
429+static struct omap_dss_device omap4_panda_dvi_device = {
442430 .type = OMAP_DISPLAY_TYPE_DPI,
443431 .name = "dvi",
444− .driver_name = "dvi",
432+ .driver_name = "tfp410",
445433 .data = &omap4_dvi_panel,
446434 .phy.dpi.data_lines = 24,
447435 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
448436 .channel = OMAP_DSS_CHANNEL_LCD2,
449437 };
450438
451−int __init omap4_panda_dvi_init(void)
452−{
453− int r;
454−
455− /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
456− r = gpio_request_one(omap4_panda_dvi_device.reset_gpio,
457− GPIOF_OUT_INIT_LOW, "DVI PD");
458− if (r)
459− pr_err("Failed to get DVI powerdown GPIO\n");
460−
461− return r;
462−}
463−
464439 static struct gpio panda_hdmi_gpios[] = {
465440 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
466441 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
@@ -509,13 +484,8 @@ static struct omap_dss_board_info omap4_panda_dss_data = { · 42 unmodified lines
509484 .default_device = &omap4_panda_dvi_device,
510485 };
511486
512−void __init omap4_panda_display_init(void)
487+static void __init omap4_panda_display_init(void)
513488 {
514− int r;
515−
516− r = omap4_panda_dvi_init();
517− if (r)
518− pr_err("error initializing panda DVI\n");
519489
520490 omap_display_init(&omap4_panda_dss_data);
521491
arch/arm/mach-omap2/board-overo.c+4−21
@@ -46,7 +46,7 @@ · 45 unmodified lines
4646 #include "common.h"
4747 #include <video/omapdss.h>
4848 #include <video/omap-panel-generic-dpi.h>
49−#include <video/omap-panel-dvi.h>
49+#include <video/omap-panel-tfp410.h>
5050 #include <plat/gpmc.h>
5151 #include <mach/hardware.h>
5252 #include <plat/nand.h>
@@ -167,32 +167,15 @@ static void __init overo_display_init(void) · 114 unmodified lines
167167 gpio_export(OVERO_GPIO_LCD_BL, 0);
168168 }
169169
170−static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)
171−{
172− if (lcd_enabled) {
173− printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
174− return -EINVAL;
175− }
176− dvi_enabled = 1;
177−
178− return 0;
179−}
180−
181−static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
182−{
183− dvi_enabled = 0;
184−}
185−
186−static struct panel_dvi_platform_data dvi_panel = {
187− .platform_enable = overo_panel_enable_dvi,
188− .platform_disable = overo_panel_disable_dvi,
170+static struct tfp410_platform_data dvi_panel = {
189171 .i2c_bus_num = 3,
172+ .power_down_gpio = -1,
190173 };
191174
192175 static struct omap_dss_device overo_dvi_device = {
193176 .name = "dvi",
194177 .type = OMAP_DISPLAY_TYPE_DPI,
195− .driver_name = "dvi",
178+ .driver_name = "tfp410",
196179 .data = &dvi_panel,
197180 .phy.dpi.data_lines = 24,
198181 };
arch/arm/mach-omap2/board-rx51-peripherals.c+2−2
@@ -872,11 +872,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { · 871 unmodified lines
872872 .resource_config = twl4030_rconfig,
873873 };
874874
875−struct twl4030_vibra_data rx51_vibra_data __initdata = {
875+static struct twl4030_vibra_data rx51_vibra_data __initdata = {
876876 .coexist = 0,
877877 };
878878
879−struct twl4030_audio_data rx51_audio_data __initdata = {
879+static struct twl4030_audio_data rx51_audio_data __initdata = {
880880 .audio_mclk = 26000000,
881881 .vibra = &rx51_vibra_data,
882882 };
arch/arm/mach-omap2/board-rx51.c+18−20
@@ -59,25 +59,24 @@ static struct platform_device leds_gpio = { · 58 unmodified lines
5959 };
6060
6161 /*
62− * cpuidle C-states definition override from the default values.
63− * The 'exit_latency' field is the sum of sleep and wake-up latencies.
64− */
65−static struct cpuidle_params rx51_cpuidle_params[] = {
66− /* C1 */
67− {110 + 162, 5 , 1},
68− /* C2 */
69− {106 + 180, 309, 1},
70− /* C3 */
71− {107 + 410, 46057, 0},
72− /* C4 */
73− {121 + 3374, 46057, 0},
74− /* C5 */
75− {855 + 1146, 46057, 1},
76− /* C6 */
77− {7580 + 4134, 484329, 0},
78− /* C7 */
79− {7505 + 15274, 484329, 1},
80−};
62+ * cpuidle C-states definition for rx51.
63+ *
64+ * The 'exit_latency' field is the sum of sleep
65+ * and wake-up latencies.
66+
67+ ---------------------------------------------
68+ | state | exit_latency | target_residency |
69+ ---------------------------------------------
70+ | C1 | 110 + 162 | 5 |
71+ | C2 | 106 + 180 | 309 |
72+ | C3 | 107 + 410 | 46057 |
73+ | C4 | 121 + 3374 | 46057 |
74+ | C5 | 855 + 1146 | 46057 |
75+ | C6 | 7580 + 4134 | 484329 |
76+ | C7 | 7505 + 15274 | 484329 |
77+ ---------------------------------------------
78+
79+*/
8180
8281 extern void __init rx51_peripherals_init(void);
8382
@@ -98,7 +97,6 @@ static void __init rx51_init(void) · 14 unmodified lines
9897 struct omap_sdrc_params *sdrc_params;
9998
10099 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
101− omap3_pm_init_cpuidle(rx51_cpuidle_params);
102100 omap_serial_init();
103101
104102 sdrc_params = nokia_get_sdram_timings();
arch/arm/mach-omap2/board-zoom-display.c+1−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 #include <linux/spi/spi.h>
1717 #include <plat/mcspi.h>
1818 #include <video/omapdss.h>
19+#include <mach/board-zoom.h>
1920
2021 #define LCD_PANEL_RESET_GPIO_PROD 96
2122 #define LCD_PANEL_RESET_GPIO_PILOT 55
arch/arm/mach-omap2/common.h+0−2
@@ -134,8 +134,6 @@ void omap4_map_io(void); · 133 unmodified lines
134134 void ti81xx_map_io(void);
135135 void omap_barriers_init(void);
136136
137−extern void __init omap_init_consistent_dma_size(void);
138−
139137 /**
140138 * omap_test_timeout - busy-loop, testing a condition
141139 * @cond: condition to test until it evaluates to true
arch/arm/mach-omap2/cpuidle34xx.c+120−178
@@ -38,40 +38,44 @@ · 37 unmodified lines
3838
3939 #ifdef CONFIG_CPU_IDLE
4040
41−/*
42− * The latencies/thresholds for various C states have
43− * to be configured from the respective board files.
44− * These are some default values (which might not provide
45− * the best power savings) used on boards which do not
46− * pass these details from the board file.
47− */
48−static struct cpuidle_params cpuidle_params_table[] = {
49− /* C1 */
50− {2 + 2, 5, 1},
51− /* C2 */
52− {10 + 10, 30, 1},
53− /* C3 */
54− {50 + 50, 300, 1},
55− /* C4 */
56− {1500 + 1800, 4000, 1},
57− /* C5 */
58− {2500 + 7500, 12000, 1},
59− /* C6 */
60− {3000 + 8500, 15000, 1},
61− /* C7 */
62− {10000 + 30000, 300000, 1},
63−};
64−#define OMAP3_NUM_STATES ARRAY_SIZE(cpuidle_params_table)
65−
6641 /* Mach specific information to be recorded in the C-state driver_data */
6742 struct omap3_idle_statedata {
6843 u32 mpu_state;
6944 u32 core_state;
70− u8 valid;
7145 };
72−struct omap3_idle_statedata omap3_idle_data[OMAP3_NUM_STATES];
7346
74−struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
47+static struct omap3_idle_statedata omap3_idle_data[] = {
48+ {
49+ .mpu_state = PWRDM_POWER_ON,
50+ .core_state = PWRDM_POWER_ON,
51+ },
52+ {
53+ .mpu_state = PWRDM_POWER_ON,
54+ .core_state = PWRDM_POWER_ON,
55+ },
56+ {
57+ .mpu_state = PWRDM_POWER_RET,
58+ .core_state = PWRDM_POWER_ON,
59+ },
60+ {
61+ .mpu_state = PWRDM_POWER_OFF,
62+ .core_state = PWRDM_POWER_ON,
63+ },
64+ {
65+ .mpu_state = PWRDM_POWER_RET,
66+ .core_state = PWRDM_POWER_RET,
67+ },
68+ {
69+ .mpu_state = PWRDM_POWER_OFF,
70+ .core_state = PWRDM_POWER_RET,
71+ },
72+ {
73+ .mpu_state = PWRDM_POWER_OFF,
74+ .core_state = PWRDM_POWER_OFF,
75+ },
76+};
77+
78+static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
7579
7680 static int _cpuidle_allow_idle(struct powerdomain *pwrdm,
7781 struct clockdomain *clkdm)
@@ -91,8 +95,7 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, · 13 unmodified lines
9195 struct cpuidle_driver *drv,
9296 int index)
9397 {
94− struct omap3_idle_statedata *cx =
95− cpuidle_get_statedata(&dev->states_usage[index]);
98+ struct omap3_idle_statedata *cx = &omap3_idle_data[index];
9699 u32 mpu_state = cx->mpu_state, core_state = cx->core_state;
97100
98101 local_fiq_disable();
@@ -169,14 +172,12 @@ static inline int omap3_enter_idle(struct cpuidle_device *dev, · 70 unmodified lines
169172 * if it satisfies the enable_off_mode condition.
170173 */
171174 static int next_valid_state(struct cpuidle_device *dev,
172− struct cpuidle_driver *drv,
173− int index)
175+ struct cpuidle_driver *drv, int index)
174176 {
175− struct cpuidle_state_usage *curr_usage = &dev->states_usage[index];
176− struct cpuidle_state *curr = &drv->states[index];
177− struct omap3_idle_statedata *cx = cpuidle_get_statedata(curr_usage);
177+ struct omap3_idle_statedata *cx = &omap3_idle_data[index];
178178 u32 mpu_deepest_state = PWRDM_POWER_RET;
179179 u32 core_deepest_state = PWRDM_POWER_RET;
180+ int idx;
180181 int next_index = -1;
181182
182183 if (enable_off_mode) {
@@ -191,45 +192,29 @@ static int next_valid_state(struct cpuidle_device *dev, · 8 unmodified lines
191192 }
192193
193194 /* Check if current state is valid */
194− if ((cx->valid) &&
195− (cx->mpu_state >= mpu_deepest_state) &&
196− (cx->core_state >= core_deepest_state)) {
195+ if ((cx->mpu_state >= mpu_deepest_state) &&
196+ (cx->core_state >= core_deepest_state))
197197 return index;
198− } else {
199− int idx = OMAP3_NUM_STATES - 1;
200−
201− /* Reach the current state starting at highest C-state */
202− for (; idx >= 0; idx--) {
203− if (&drv->states[idx] == curr) {
204− next_index = idx;
205− break;
206− }
207− }
208−
209− /* Should never hit this condition */
210− WARN_ON(next_index == -1);
211198
212− /*
213− * Drop to next valid state.
214− * Start search from the next (lower) state.
215− */
216− idx--;
217− for (; idx >= 0; idx--) {
218− cx = cpuidle_get_statedata(&dev->states_usage[idx]);
219− if ((cx->valid) &&
220− (cx->mpu_state >= mpu_deepest_state) &&
221− (cx->core_state >= core_deepest_state)) {
222− next_index = idx;
223− break;
224− }
199+ /*
200+ * Drop to next valid state.
201+ * Start search from the next (lower) state.
202+ */
203+ for (idx = index - 1; idx >= 0; idx--) {
204+ cx = &omap3_idle_data[idx];
205+ if ((cx->mpu_state >= mpu_deepest_state) &&
206+ (cx->core_state >= core_deepest_state)) {
207+ next_index = idx;
208+ break;
225209 }
226− /*
227− * C1 is always valid.
228− * So, no need to check for 'next_index == -1' outside
229− * this loop.
230− */
231210 }
232211
212+ /*
213+ * C1 is always valid.
214+ * So, no need to check for 'next_index == -1' outside
215+ * this loop.
216+ */
217+
233218 return next_index;
234219 }
235220
@@ -273,7 +258,7 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, · 37 unmodified lines
273258 * Prevent PER off if CORE is not in retention or off as this
274259 * would disable PER wakeups completely.
275260 */
276− cx = cpuidle_get_statedata(&dev->states_usage[index]);
261+ cx = &omap3_idle_data[index];
277262 core_next_state = cx->core_state;
278263 per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd);
279264 if ((per_next_state == PWRDM_POWER_OFF) &&
@@ -298,57 +283,71 @@ select_state: · 18 unmodified lines
298283
299284 DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
300285
301−void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
302−{
303− int i;
304−
305− if (!cpuidle_board_params)
306− return;
307−
308− for (i = 0; i < OMAP3_NUM_STATES; i++) {
309− cpuidle_params_table[i].valid = cpuidle_board_params[i].valid;
310− cpuidle_params_table[i].exit_latency =
311− cpuidle_board_params[i].exit_latency;
312− cpuidle_params_table[i].target_residency =
313− cpuidle_board_params[i].target_residency;
314− }
315− return;
316−}
317−
318286 struct cpuidle_driver omap3_idle_driver = {
319287 .name = "omap3_idle",
320288 .owner = THIS_MODULE,
289+ .states = {
290+ {
291+ .enter = omap3_enter_idle,
292+ .exit_latency = 2 + 2,
293+ .target_residency = 5,
294+ .flags = CPUIDLE_FLAG_TIME_VALID,
295+ .name = "C1",
296+ .desc = "MPU ON + CORE ON",
297+ },
298+ {
299+ .enter = omap3_enter_idle_bm,
300+ .exit_latency = 10 + 10,
301+ .target_residency = 30,
302+ .flags = CPUIDLE_FLAG_TIME_VALID,
303+ .name = "C2",
304+ .desc = "MPU ON + CORE ON",
305+ },
306+ {
307+ .enter = omap3_enter_idle_bm,
308+ .exit_latency = 50 + 50,
309+ .target_residency = 300,
310+ .flags = CPUIDLE_FLAG_TIME_VALID,
311+ .name = "C3",
312+ .desc = "MPU RET + CORE ON",
313+ },
314+ {
315+ .enter = omap3_enter_idle_bm,
316+ .exit_latency = 1500 + 1800,
317+ .target_residency = 4000,
318+ .flags = CPUIDLE_FLAG_TIME_VALID,
319+ .name = "C4",
320+ .desc = "MPU OFF + CORE ON",
321+ },
322+ {
323+ .enter = omap3_enter_idle_bm,
324+ .exit_latency = 2500 + 7500,
325+ .target_residency = 12000,
326+ .flags = CPUIDLE_FLAG_TIME_VALID,
327+ .name = "C5",
328+ .desc = "MPU RET + CORE RET",
329+ },
330+ {
331+ .enter = omap3_enter_idle_bm,
332+ .exit_latency = 3000 + 8500,
333+ .target_residency = 15000,
334+ .flags = CPUIDLE_FLAG_TIME_VALID,
335+ .name = "C6",
336+ .desc = "MPU OFF + CORE RET",
337+ },
338+ {
339+ .enter = omap3_enter_idle_bm,
340+ .exit_latency = 10000 + 30000,
341+ .target_residency = 30000,
342+ .flags = CPUIDLE_FLAG_TIME_VALID,
343+ .name = "C7",
344+ .desc = "MPU OFF + CORE OFF",
345+ },
346+ },
347+ .state_count = ARRAY_SIZE(omap3_idle_data),
348+ .safe_state_index = 0,
321349 };
322350
323−/* Helper to fill the C-state common data*/
324−static inline void _fill_cstate(struct cpuidle_driver *drv,
325− int idx, const char *descr)
326−{
327− struct cpuidle_state *state = &drv->states[idx];
328−
329− state->exit_latency = cpuidle_params_table[idx].exit_latency;
330− state->target_residency = cpuidle_params_table[idx].target_residency;
331− state->flags = CPUIDLE_FLAG_TIME_VALID;
332− state->enter = omap3_enter_idle_bm;
333− sprintf(state->name, "C%d", idx + 1);
334− strncpy(state->desc, descr, CPUIDLE_DESC_LEN);
335−
336−}
337−
338−/* Helper to register the driver_data */
339−static inline struct omap3_idle_statedata *_fill_cstate_usage(
340− struct cpuidle_device *dev,
341− int idx)
342−{
343− struct omap3_idle_statedata *cx = &omap3_idle_data[idx];
344− struct cpuidle_state_usage *state_usage = &dev->states_usage[idx];
345−
346− cx->valid = cpuidle_params_table[idx].valid;
347− cpuidle_set_statedata(state_usage, cx);
348−
349− return cx;
350−}
351−
352351 /**
353352 * omap3_idle_init - Init routine for OMAP3 idle
354353 *
@@ -358,77 +357,20 @@ static inline struct omap3_idle_statedata *_fill_cstate_usage( · 3 unmodified lines
358357 int __init omap3_idle_init(void)
359358 {
360359 struct cpuidle_device *dev;
361− struct cpuidle_driver *drv = &omap3_idle_driver;
362− struct omap3_idle_statedata *cx;
363360
364361 mpu_pd = pwrdm_lookup("mpu_pwrdm");
365362 core_pd = pwrdm_lookup("core_pwrdm");
366363 per_pd = pwrdm_lookup("per_pwrdm");
367364 cam_pd = pwrdm_lookup("cam_pwrdm");
368365
366+ if (!mpu_pd || !core_pd || !per_pd || !cam_pd)
367+ return -ENODEV;
369368
370− drv->safe_state_index = -1;
371− dev = &per_cpu(omap3_idle_dev, smp_processor_id());
372−
373− /* C1 . MPU WFI + Core active */
374− _fill_cstate(drv, 0, "MPU ON + CORE ON");
375− (&drv->states[0])->enter = omap3_enter_idle;
376− drv->safe_state_index = 0;
377− cx = _fill_cstate_usage(dev, 0);
378− cx->valid = 1; /* C1 is always valid */
379− cx->mpu_state = PWRDM_POWER_ON;
380− cx->core_state = PWRDM_POWER_ON;
381−
382− /* C2 . MPU WFI + Core inactive */
383− _fill_cstate(drv, 1, "MPU ON + CORE ON");
384− cx = _fill_cstate_usage(dev, 1);
385− cx->mpu_state = PWRDM_POWER_ON;
386− cx->core_state = PWRDM_POWER_ON;
387−
388− /* C3 . MPU CSWR + Core inactive */
389− _fill_cstate(drv, 2, "MPU RET + CORE ON");
390− cx = _fill_cstate_usage(dev, 2);
391− cx->mpu_state = PWRDM_POWER_RET;
392− cx->core_state = PWRDM_POWER_ON;
393−
394− /* C4 . MPU OFF + Core inactive */
395− _fill_cstate(drv, 3, "MPU OFF + CORE ON");
396− cx = _fill_cstate_usage(dev, 3);
397− cx->mpu_state = PWRDM_POWER_OFF;
398− cx->core_state = PWRDM_POWER_ON;
399−
400− /* C5 . MPU RET + Core RET */
401− _fill_cstate(drv, 4, "MPU RET + CORE RET");
402− cx = _fill_cstate_usage(dev, 4);
403− cx->mpu_state = PWRDM_POWER_RET;
404− cx->core_state = PWRDM_POWER_RET;
405−
406− /* C6 . MPU OFF + Core RET */
407− _fill_cstate(drv, 5, "MPU OFF + CORE RET");
408− cx = _fill_cstate_usage(dev, 5);
409− cx->mpu_state = PWRDM_POWER_OFF;
410− cx->core_state = PWRDM_POWER_RET;
411−
412− /* C7 . MPU OFF + Core OFF */
413− _fill_cstate(drv, 6, "MPU OFF + CORE OFF");
414− cx = _fill_cstate_usage(dev, 6);
415− /*
416− * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
417− * enable OFF mode in a stable form for previous revisions.
418− * We disable C7 state as a result.
419− */
420− if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583)) {
421− cx->valid = 0;
422− pr_warn("%s: core off state C7 disabled due to i583\n",
423− __func__);
424− }
425− cx->mpu_state = PWRDM_POWER_OFF;
426− cx->core_state = PWRDM_POWER_OFF;
427−
428− drv->state_count = OMAP3_NUM_STATES;
429369 cpuidle_register_driver(&omap3_idle_driver);
430370
431− dev->state_count = OMAP3_NUM_STATES;
371+ dev = &per_cpu(omap3_idle_dev, smp_processor_id());
372+ dev->cpu = 0;
373+
432374 if (cpuidle_register_device(dev)) {
433375 printk(KERN_ERR "%s: CPUidle register device failed\n",
434376 __func__);
arch/arm/mach-omap2/cpuidle44xx.c+52−74
@@ -24,26 +24,31 @@ · 23 unmodified lines
2424
2525 #ifdef CONFIG_CPU_IDLE
2626
27−/* Machine specific information to be recorded in the C-state driver_data */
27+/* Machine specific information */
2828 struct omap4_idle_statedata {
2929 u32 cpu_state;
3030 u32 mpu_logic_state;
3131 u32 mpu_state;
32− u8 valid;
3332 };
3433
35−static struct cpuidle_params cpuidle_params_table[] = {
36− /* C1 - CPU0 ON + CPU1 ON + MPU ON */
37− {.exit_latency = 2 + 2 , .target_residency = 5, .valid = 1},
38− /* C2- CPU0 OFF + CPU1 OFF + MPU CSWR */
39− {.exit_latency = 328 + 440 , .target_residency = 960, .valid = 1},
40− /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
41− {.exit_latency = 460 + 518 , .target_residency = 1100, .valid = 1},
34+static struct omap4_idle_statedata omap4_idle_data[] = {
35+ {
36+ .cpu_state = PWRDM_POWER_ON,
37+ .mpu_state = PWRDM_POWER_ON,
38+ .mpu_logic_state = PWRDM_POWER_RET,
39+ },
40+ {
41+ .cpu_state = PWRDM_POWER_OFF,
42+ .mpu_state = PWRDM_POWER_RET,
43+ .mpu_logic_state = PWRDM_POWER_RET,
44+ },
45+ {
46+ .cpu_state = PWRDM_POWER_OFF,
47+ .mpu_state = PWRDM_POWER_RET,
48+ .mpu_logic_state = PWRDM_POWER_OFF,
49+ },
4250 };
4351
44−#define OMAP4_NUM_STATES ARRAY_SIZE(cpuidle_params_table)
45−
46−struct omap4_idle_statedata omap4_idle_data[OMAP4_NUM_STATES];
4752 static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd;
4853
4954 /**
@@ -60,8 +65,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, · 10 unmodified lines
6065 struct cpuidle_driver *drv,
6166 int index)
6267 {
63− struct omap4_idle_statedata *cx =
64− cpuidle_get_statedata(&dev->states_usage[index]);
68+ struct omap4_idle_statedata *cx = &omap4_idle_data[index];
6569 u32 cpu1_state;
6670 int cpu_id = smp_processor_id();
6771
@@ -78,7 +82,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, · 10 unmodified lines
7882 cpu1_state = pwrdm_read_pwrst(cpu1_pd);
7983 if (cpu1_state != PWRDM_POWER_OFF) {
8084 index = drv->safe_state_index;
81− cx = cpuidle_get_statedata(&dev->states_usage[index]);
85+ cx = &omap4_idle_data[index];
8286 }
8387
8488 if (index > 0)
@@ -133,36 +137,39 @@ struct cpuidle_driver omap4_idle_driver = { · 48 unmodified lines
133137 .name = "omap4_idle",
134138 .owner = THIS_MODULE,
135139 .en_core_tk_irqen = 1,
140+ .states = {
141+ {
142+ /* C1 - CPU0 ON + CPU1 ON + MPU ON */
143+ .exit_latency = 2 + 2,
144+ .target_residency = 5,
145+ .flags = CPUIDLE_FLAG_TIME_VALID,
146+ .enter = omap4_enter_idle,
147+ .name = "C1",
148+ .desc = "MPUSS ON"
149+ },
150+ {
151+ /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
152+ .exit_latency = 328 + 440,
153+ .target_residency = 960,
154+ .flags = CPUIDLE_FLAG_TIME_VALID,
155+ .enter = omap4_enter_idle,
156+ .name = "C2",
157+ .desc = "MPUSS CSWR",
158+ },
159+ {
160+ /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
161+ .exit_latency = 460 + 518,
162+ .target_residency = 1100,
163+ .flags = CPUIDLE_FLAG_TIME_VALID,
164+ .enter = omap4_enter_idle,
165+ .name = "C3",
166+ .desc = "MPUSS OSWR",
167+ },
168+ },
169+ .state_count = ARRAY_SIZE(omap4_idle_data),
170+ .safe_state_index = 0,
136171 };
137172
138−static inline void _fill_cstate(struct cpuidle_driver *drv,
139− int idx, const char *descr)
140−{
141− struct cpuidle_state *state = &drv->states[idx];
142−
143− state->exit_latency = cpuidle_params_table[idx].exit_latency;
144− state->target_residency = cpuidle_params_table[idx].target_residency;
145− state->flags = CPUIDLE_FLAG_TIME_VALID;
146− state->enter = omap4_enter_idle;
147− sprintf(state->name, "C%d", idx + 1);
148− strncpy(state->desc, descr, CPUIDLE_DESC_LEN);
149−}
150−
151−static inline struct omap4_idle_statedata *_fill_cstate_usage(
152− struct cpuidle_device *dev,
153− int idx)
154−{
155− struct omap4_idle_statedata *cx = &omap4_idle_data[idx];
156− struct cpuidle_state_usage *state_usage = &dev->states_usage[idx];
157−
158− cx->valid = cpuidle_params_table[idx].valid;
159− cpuidle_set_statedata(state_usage, cx);
160−
161− return cx;
162−}
163−
164−
165−
166173 /**
167174 * omap4_idle_init - Init routine for OMAP4 idle
168175 *
@@ -171,9 +178,7 @@ static inline struct omap4_idle_statedata *_fill_cstate_usage( · 2 unmodified lines
171178 */
172179 int __init omap4_idle_init(void)
173180 {
174− struct omap4_idle_statedata *cx;
175181 struct cpuidle_device *dev;
176− struct cpuidle_driver *drv = &omap4_idle_driver;
177182 unsigned int cpu_id = 0;
178183
179184 mpu_pd = pwrdm_lookup("mpu_pwrdm");
@@ -182,42 +187,15 @@ int __init omap4_idle_init(void) · 2 unmodified lines
182187 if ((!mpu_pd) || (!cpu0_pd) || (!cpu1_pd))
183188 return -ENODEV;
184189
185−
186− drv->safe_state_index = -1;
187190 dev = &per_cpu(omap4_idle_dev, cpu_id);
188191 dev->cpu = cpu_id;
189192
190− /* C1 - CPU0 ON + CPU1 ON + MPU ON */
191− _fill_cstate(drv, 0, "MPUSS ON");
192− drv->safe_state_index = 0;
193− cx = _fill_cstate_usage(dev, 0);
194− cx->valid = 1; /* C1 is always valid */
195− cx->cpu_state = PWRDM_POWER_ON;
196− cx->mpu_state = PWRDM_POWER_ON;
197− cx->mpu_logic_state = PWRDM_POWER_RET;
198−
199− /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
200− _fill_cstate(drv, 1, "MPUSS CSWR");
201− cx = _fill_cstate_usage(dev, 1);
202− cx->cpu_state = PWRDM_POWER_OFF;
203− cx->mpu_state = PWRDM_POWER_RET;
204− cx->mpu_logic_state = PWRDM_POWER_RET;
205−
206− /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
207− _fill_cstate(drv, 2, "MPUSS OSWR");
208− cx = _fill_cstate_usage(dev, 2);
209− cx->cpu_state = PWRDM_POWER_OFF;
210− cx->mpu_state = PWRDM_POWER_RET;
211− cx->mpu_logic_state = PWRDM_POWER_OFF;
212−
213− drv->state_count = OMAP4_NUM_STATES;
214193 cpuidle_register_driver(&omap4_idle_driver);
215194
216− dev->state_count = OMAP4_NUM_STATES;
217195 if (cpuidle_register_device(dev)) {
218196 pr_err("%s: CPUidle register device failed\n", __func__);
219− return -EIO;
220− }
197+ return -EIO;
198+ }
221199
222200 return 0;
223201 }
arch/arm/mach-omap2/devices.c+3−4
@@ -42,7 +42,6 @@ · 41 unmodified lines
4242
4343 static int __init omap3_l3_init(void)
4444 {
45− int l;
4645 struct omap_hwmod *oh;
4746 struct platform_device *pdev;
4847 char oh_name[L3_MODULES_MAX_LEN];
@@ -54,7 +53,7 @@ static int __init omap3_l3_init(void) · 5 unmodified lines
5453 if (!(cpu_is_omap34xx()))
5554 return -ENODEV;
5655
57− l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
56+ snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
5857
5958 oh = omap_hwmod_lookup(oh_name);
6059
@@ -72,7 +71,7 @@ postcore_initcall(omap3_l3_init); · 11 unmodified lines
7271
7372 static int __init omap4_l3_init(void)
7473 {
75− int l, i;
74+ int i;
7675 struct omap_hwmod *oh[3];
7776 struct platform_device *pdev;
7877 char oh_name[L3_MODULES_MAX_LEN];
@@ -89,7 +88,7 @@ static int __init omap4_l3_init(void) · 10 unmodified lines
8988 return -ENODEV;
9089
9190 for (i = 0; i < L3_MODULES; i++) {
92− l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1);
91+ snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1);
9392
9493 oh[i] = omap_hwmod_lookup(oh_name);
9594 if (!(oh[i]))
arch/arm/mach-omap2/gpio.c+1−1
@@ -58,7 +58,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) · 57 unmodified lines
5858 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1);
5959 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
6060 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);
61− if (!pdata) {
61+ if (!pdata->regs) {
6262 pr_err("gpio%d: Memory allocation failed\n", id);
6363 return -ENOMEM;
6464 }
arch/arm/mach-omap2/gpmc-onenand.c+1−2
@@ -176,7 +176,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, · 175 unmodified lines
176176 const int t_wpl = 40;
177177 const int t_wph = 30;
178178 int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo;
179− int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
179+ int div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
180180 int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0;
181181 int err, ticks_cez;
182182 int cs = cfg->cs, freq = *freq_ptr;
@@ -240,7 +240,6 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, · 57 unmodified lines
240240 break;
241241 }
242242
243− tick_ns = gpmc_ticks_to_ns(1);
244243 div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period);
245244 gpmc_clk_ns = gpmc_ticks_to_ns(div);
246245 if (gpmc_clk_ns < 15) /* >66Mhz */
arch/arm/mach-omap2/gpmc.c+1−2
@@ -755,8 +755,7 @@ static int __init gpmc_init(void) · 754 unmodified lines
755755 irq++;
756756 }
757757
758− ret = request_irq(gpmc_irq,
759− gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
758+ ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL);
760759 if (ret)
761760 pr_err("gpmc: irq-%d could not claim: err %d\n",
762761 gpmc_irq, ret);
arch/arm/mach-omap2/hwspinlock.c+1−1
@@ -28,7 +28,7 @@ static struct hwspinlock_pdata omap_hwspinlock_pdata __initdata = { · 27 unmodified lines
2828 .base_id = 0,
2929 };
3030
31−int __init hwspinlocks_init(void)
31+static int __init hwspinlocks_init(void)
3232 {
3333 int retval = 0;
3434 struct omap_hwmod *oh;
arch/arm/mach-omap2/io.c+1−0
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 #include <plat/omap-pm.h>
3232 #include <plat/omap_hwmod.h>
3333 #include <plat/multi.h>
34+#include <plat/dma.h>
3435
3536 #include "iomap.h"
3637 #include "voltage.h"
arch/arm/mach-omap2/irq.c+2−1
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include <mach/hardware.h>
2626
2727 #include "iomap.h"
28+#include "common.h"
2829
2930 /* selected INTC register offsets */
3031
@@ -334,7 +335,7 @@ void omap_intc_restore_context(void) · 303 unmodified lines
334335 void omap3_intc_suspend(void)
335336 {
336337 /* A pending interrupt would prevent OMAP from entering suspend */
337− omap_ack_irq(0);
338+ omap_ack_irq(NULL);
338339 }
339340
340341 void omap3_intc_prepare_idle(void)
arch/arm/mach-omap2/mux.c+1−1
@@ -247,7 +247,7 @@ int __init omap_mux_init_signal(const char *muxname, int val) · 246 unmodified lines
247247 int mux_mode;
248248
249249 mux_mode = omap_mux_get_by_name(muxname, &partition, &mux);
250− if (mux_mode < 0)
250+ if (mux_mode < 0 || !mux)
251251 return mux_mode;
252252
253253 old_mode = omap_mux_read(partition, mux->reg_offset);
arch/arm/mach-omap2/omap-secure.c+1−0
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 #include <asm/cacheflush.h>
1919 #include <asm/memblock.h>
2020
21+#include <plat/omap-secure.h>
2122 #include <mach/omap-secure.h>
2223
2324 static phys_addr_t omap_secure_memblock_base;
arch/arm/mach-omap2/omap-wakeupgen.c+1−1
@@ -259,7 +259,7 @@ static void irq_save_context(void) · 258 unmodified lines
259259 /*
260260 * Clear WakeupGen SAR backup status.
261261 */
262−void irq_sar_clear(void)
262+static void irq_sar_clear(void)
263263 {
264264 u32 val;
265265 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET);
arch/arm/mach-omap2/omap_hwmod.c+878−265
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * omap_hwmod implementation for OMAP2/3/4
33 *
44 * Copyright (C) 2009-2011 Nokia Corporation
5− * Copyright (C) 2011 Texas Instruments, Inc.
5+ * Copyright (C) 2011-2012 Texas Instruments, Inc.
66 *
77 * Paul Walmsley, Benoît Cousson, Kevin Hilman
88 *
@@ -137,6 +137,7 @@ · 128 unmodified lines
137137 #include <linux/mutex.h>
138138 #include <linux/spinlock.h>
139139 #include <linux/slab.h>
140+#include <linux/bootmem.h>
140141
141142 #include "common.h"
142143 #include <plat/cpu.h>
@@ -159,15 +160,57 @@ · 16 unmodified lines
159160 /* Name of the OMAP hwmod for the MPU */
160161 #define MPU_INITIATOR_NAME "mpu"
161162
163+/*
164+ * Number of struct omap_hwmod_link records per struct
165+ * omap_hwmod_ocp_if record (master->slave and slave->master)
166+ */
167+#define LINKS_PER_OCP_IF 2
168+
162169 /* omap_hwmod_list contains all registered struct omap_hwmods */
163170 static LIST_HEAD(omap_hwmod_list);
164171
165172 /* mpu_oh: used to add/remove MPU initiator from sleepdep list */
166173 static struct omap_hwmod *mpu_oh;
167174
175+/*
176+ * linkspace: ptr to a buffer that struct omap_hwmod_link records are
177+ * allocated from - used to reduce the number of small memory
178+ * allocations, which has a significant impact on performance
179+ */
180+static struct omap_hwmod_link *linkspace;
181+
182+/*
183+ * free_ls, max_ls: array indexes into linkspace; representing the
184+ * next free struct omap_hwmod_link index, and the maximum number of
185+ * struct omap_hwmod_link records allocated (respectively)
186+ */
187+static unsigned short free_ls, max_ls, ls_supp;
168188
169189 /* Private functions */
170190
191+/**
192+ * _fetch_next_ocp_if - return the next OCP interface in a list
193+ * @p: ptr to a ptr to the list_head inside the ocp_if to return
194+ * @i: pointer to the index of the element pointed to by @p in the list
195+ *
196+ * Return a pointer to the struct omap_hwmod_ocp_if record
197+ * containing the struct list_head pointed to by @p, and increment
198+ * @p such that a future call to this routine will return the next
199+ * record.
200+ */
201+static struct omap_hwmod_ocp_if *_fetch_next_ocp_if(struct list_head **p,
202+ int *i)
203+{
204+ struct omap_hwmod_ocp_if *oi;
205+
206+ oi = list_entry(*p, struct omap_hwmod_link, node)->ocp_if;
207+ *p = (*p)->next;
208+
209+ *i = *i + 1;
210+
211+ return oi;
212+}
213+
171214 /**
172215 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy
173216 * @oh: struct omap_hwmod *
@@ -582,16 +625,16 @@ static int _init_main_clk(struct omap_hwmod *oh) · 408 unmodified lines
582625 */
583626 static int _init_interface_clks(struct omap_hwmod *oh)
584627 {
628+ struct omap_hwmod_ocp_if *os;
629+ struct list_head *p;
585630 struct clk *c;
586− int i;
631+ int i = 0;
587632 int ret = 0;
588633
589− if (oh->slaves_cnt == 0)
590− return 0;
591−
592− for (i = 0; i < oh->slaves_cnt; i++) {
593− struct omap_hwmod_ocp_if *os = oh->slaves[i];
634+ p = oh->slave_ports.next;
594635
636+ while (i < oh->slaves_cnt) {
637+ os = _fetch_next_ocp_if(&p, &i);
595638 if (!os->clk)
596639 continue;
597640
@@ -643,21 +686,22 @@ static int _init_opt_clks(struct omap_hwmod *oh) · 45 unmodified lines
643686 */
644687 static int _enable_clocks(struct omap_hwmod *oh)
645688 {
646− int i;
689+ struct omap_hwmod_ocp_if *os;
690+ struct list_head *p;
691+ int i = 0;
647692
648693 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);
649694
650695 if (oh->_clk)
651696 clk_enable(oh->_clk);
652697
653− if (oh->slaves_cnt > 0) {
654− for (i = 0; i < oh->slaves_cnt; i++) {
655− struct omap_hwmod_ocp_if *os = oh->slaves[i];
656− struct clk *c = os->_clk;
698+ p = oh->slave_ports.next;
657699
658− if (c && (os->flags & OCPIF_SWSUP_IDLE))
659− clk_enable(c);
660− }
700+ while (i < oh->slaves_cnt) {
701+ os = _fetch_next_ocp_if(&p, &i);
702+
703+ if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
704+ clk_enable(os->_clk);
661705 }
662706
663707 /* The opt clocks are controlled by the device driver. */
@@ -673,21 +717,22 @@ static int _enable_clocks(struct omap_hwmod *oh) · 9 unmodified lines
673717 */
674718 static int _disable_clocks(struct omap_hwmod *oh)
675719 {
676− int i;
720+ struct omap_hwmod_ocp_if *os;
721+ struct list_head *p;
722+ int i = 0;
677723
678724 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);
679725
680726 if (oh->_clk)
681727 clk_disable(oh->_clk);
682728
683− if (oh->slaves_cnt > 0) {
684− for (i = 0; i < oh->slaves_cnt; i++) {
685− struct omap_hwmod_ocp_if *os = oh->slaves[i];
686− struct clk *c = os->_clk;
729+ p = oh->slave_ports.next;
687730
688− if (c && (os->flags & OCPIF_SWSUP_IDLE))
689− clk_disable(c);
690− }
731+ while (i < oh->slaves_cnt) {
732+ os = _fetch_next_ocp_if(&p, &i);
733+
734+ if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
735+ clk_disable(os->_clk);
691736 }
692737
693738 /* The opt clocks are controlled by the device driver. */
@@ -780,39 +825,6 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh) · 86 unmodified lines
780825 oh->prcm.omap4.clkctrl_offs);
781826 }
782827
783−/**
784− * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
785− * @oh: struct omap_hwmod *
786− *
787− * Disable the PRCM module mode related to the hwmod @oh.
788− * Return EINVAL if the modulemode is not supported and 0 in case of success.
789− */
790−static int _omap4_disable_module(struct omap_hwmod *oh)
791−{
792− int v;
793−
794− /* The module mode does not exist prior OMAP4 */
795− if (!cpu_is_omap44xx())
796− return -EINVAL;
797−
798− if (!oh->clkdm || !oh->prcm.omap4.modulemode)
799− return -EINVAL;
800−
801− pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
802−
803− omap4_cminst_module_disable(oh->clkdm->prcm_partition,
804− oh->clkdm->cm_inst,
805− oh->clkdm->clkdm_offs,
806− oh->prcm.omap4.clkctrl_offs);
807−
808− v = _omap4_wait_target_disable(oh);
809− if (v)
810− pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
811− oh->name);
812−
813− return 0;
814−}
815−
816828 /**
817829 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
818830 * @oh: struct omap_hwmod *oh
@@ -883,59 +895,220 @@ static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os) · 64 unmodified lines
883895 }
884896
885897 /**
886− * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use
887− * @oh: struct omap_hwmod *
898+ * _get_mpu_irq_by_name - fetch MPU interrupt line number by name
899+ * @oh: struct omap_hwmod * to operate on
900+ * @name: pointer to the name of the MPU interrupt number to fetch (optional)
901+ * @irq: pointer to an unsigned int to store the MPU IRQ number to
888902 *
889− * Returns the array index of the OCP slave port that the MPU
890− * addresses the device on, or -EINVAL upon error or not found.
903+ * Retrieve a MPU hardware IRQ line number named by @name associated
904+ * with the IP block pointed to by @oh. The IRQ number will be filled
905+ * into the address pointed to by @dma. When @name is non-null, the
906+ * IRQ line number associated with the named entry will be returned.
907+ * If @name is null, the first matching entry will be returned. Data
908+ * order is not meaningful in hwmod data, so callers are strongly
909+ * encouraged to use a non-null @name whenever possible to avoid
910+ * unpredictable effects if hwmod data is later added that causes data
911+ * ordering to change. Returns 0 upon success or a negative error
912+ * code upon error.
891913 */
892−static int __init _find_mpu_port_index(struct omap_hwmod *oh)
914+static int _get_mpu_irq_by_name(struct omap_hwmod *oh, const char *name,
915+ unsigned int *irq)
893916 {
894917 int i;
895− int found = 0;
918+ bool found = false;
896919
897− if (!oh || oh->slaves_cnt == 0)
898− return -EINVAL;
920+ if (!oh->mpu_irqs)
921+ return -ENOENT;
899922
900− for (i = 0; i < oh->slaves_cnt; i++) {
901− struct omap_hwmod_ocp_if *os = oh->slaves[i];
923+ i = 0;
924+ while (oh->mpu_irqs[i].irq != -1) {
925+ if (name == oh->mpu_irqs[i].name ||
926+ !strcmp(name, oh->mpu_irqs[i].name)) {
927+ found = true;
928+ break;
929+ }
930+ i++;
931+ }
902932
903− if (os->user & OCP_USER_MPU) {
904− found = 1;
933+ if (!found)
934+ return -ENOENT;
935+
936+ *irq = oh->mpu_irqs[i].irq;
937+
938+ return 0;
939+}
940+
941+/**
942+ * _get_sdma_req_by_name - fetch SDMA request line ID by name
943+ * @oh: struct omap_hwmod * to operate on
944+ * @name: pointer to the name of the SDMA request line to fetch (optional)
945+ * @dma: pointer to an unsigned int to store the request line ID to
946+ *
947+ * Retrieve an SDMA request line ID named by @name on the IP block
948+ * pointed to by @oh. The ID will be filled into the address pointed
949+ * to by @dma. When @name is non-null, the request line ID associated
950+ * with the named entry will be returned. If @name is null, the first
951+ * matching entry will be returned. Data order is not meaningful in
952+ * hwmod data, so callers are strongly encouraged to use a non-null
953+ * @name whenever possible to avoid unpredictable effects if hwmod
954+ * data is later added that causes data ordering to change. Returns 0
955+ * upon success or a negative error code upon error.
956+ */
957+static int _get_sdma_req_by_name(struct omap_hwmod *oh, const char *name,
958+ unsigned int *dma)
959+{
960+ int i;
961+ bool found = false;
962+
963+ if (!oh->sdma_reqs)
964+ return -ENOENT;
965+
966+ i = 0;
967+ while (oh->sdma_reqs[i].dma_req != -1) {
968+ if (name == oh->sdma_reqs[i].name ||
969+ !strcmp(name, oh->sdma_reqs[i].name)) {
970+ found = true;
905971 break;
906972 }
973+ i++;
907974 }
908975
909− if (found)
910− pr_debug("omap_hwmod: %s: MPU OCP slave port ID %d\n",
911− oh->name, i);
912− else
913− pr_debug("omap_hwmod: %s: no MPU OCP slave port found\n",
914− oh->name);
976+ if (!found)
977+ return -ENOENT;
978+
979+ *dma = oh->sdma_reqs[i].dma_req;
915980
916− return (found) ? i : -EINVAL;
981+ return 0;
917982 }
918983
919984 /**
920− * _find_mpu_rt_base - find hwmod register target base addr accessible by MPU
921− * @oh: struct omap_hwmod *
985+ * _get_addr_space_by_name - fetch address space start & end by name
986+ * @oh: struct omap_hwmod * to operate on
987+ * @name: pointer to the name of the address space to fetch (optional)
988+ * @pa_start: pointer to a u32 to store the starting address to
989+ * @pa_end: pointer to a u32 to store the ending address to
922990 *
923− * Return the virtual address of the base of the register target of
924− * device @oh, or NULL on error.
991+ * Retrieve address space start and end addresses for the IP block
992+ * pointed to by @oh. The data will be filled into the addresses
993+ * pointed to by @pa_start and @pa_end. When @name is non-null, the
994+ * address space data associated with the named entry will be
995+ * returned. If @name is null, the first matching entry will be
996+ * returned. Data order is not meaningful in hwmod data, so callers
997+ * are strongly encouraged to use a non-null @name whenever possible
998+ * to avoid unpredictable effects if hwmod data is later added that
999+ * causes data ordering to change. Returns 0 upon success or a
1000+ * negative error code upon error.
9251001 */
926−static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
1002+static int _get_addr_space_by_name(struct omap_hwmod *oh, const char *name,
1003+ u32 *pa_start, u32 *pa_end)
9271004 {
1005+ int i, j;
9281006 struct omap_hwmod_ocp_if *os;
929− struct omap_hwmod_addr_space *mem;
930− int i = 0, found = 0;
931− void __iomem *va_start;
1007+ struct list_head *p = NULL;
1008+ bool found = false;
1009+
1010+ p = oh->slave_ports.next;
1011+
1012+ i = 0;
1013+ while (i < oh->slaves_cnt) {
1014+ os = _fetch_next_ocp_if(&p, &i);
1015+
1016+ if (!os->addr)
1017+ return -ENOENT;
1018+
1019+ j = 0;
1020+ while (os->addr[j].pa_start != os->addr[j].pa_end) {
1021+ if (name == os->addr[j].name ||
1022+ !strcmp(name, os->addr[j].name)) {
1023+ found = true;
1024+ break;
1025+ }
1026+ j++;
1027+ }
1028+
1029+ if (found)
1030+ break;
1031+ }
1032+
1033+ if (!found)
1034+ return -ENOENT;
1035+
1036+ *pa_start = os->addr[j].pa_start;
1037+ *pa_end = os->addr[j].pa_end;
1038+
1039+ return 0;
1040+}
1041+
1042+/**
1043+ * _save_mpu_port_index - find and save the index to @oh's MPU port
1044+ * @oh: struct omap_hwmod *
1045+ *
1046+ * Determines the array index of the OCP slave port that the MPU uses
1047+ * to address the device, and saves it into the struct omap_hwmod.
1048+ * Intended to be called during hwmod registration only. No return
1049+ * value.
1050+ */
1051+static void __init _save_mpu_port_index(struct omap_hwmod *oh)
1052+{
1053+ struct omap_hwmod_ocp_if *os = NULL;
1054+ struct list_head *p;
1055+ int i = 0;
1056+
1057+ if (!oh)
1058+ return;
9321059
933− if (!oh || oh->slaves_cnt == 0)
1060+ oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1061+
1062+ p = oh->slave_ports.next;
1063+
1064+ while (i < oh->slaves_cnt) {
1065+ os = _fetch_next_ocp_if(&p, &i);
1066+ if (os->user & OCP_USER_MPU) {
1067+ oh->_mpu_port = os;
1068+ oh->_int_flags &= ~_HWMOD_NO_MPU_PORT;
1069+ break;
1070+ }
1071+ }
1072+
1073+ return;
1074+}
1075+
1076+/**
1077+ * _find_mpu_rt_port - return omap_hwmod_ocp_if accessible by the MPU
1078+ * @oh: struct omap_hwmod *
1079+ *
1080+ * Given a pointer to a struct omap_hwmod record @oh, return a pointer
1081+ * to the struct omap_hwmod_ocp_if record that is used by the MPU to
1082+ * communicate with the IP block. This interface need not be directly
1083+ * connected to the MPU (and almost certainly is not), but is directly
1084+ * connected to the IP block represented by @oh. Returns a pointer
1085+ * to the struct omap_hwmod_ocp_if * upon success, or returns NULL upon
1086+ * error or if there does not appear to be a path from the MPU to this
1087+ * IP block.
1088+ */
1089+static struct omap_hwmod_ocp_if *_find_mpu_rt_port(struct omap_hwmod *oh)
1090+{
1091+ if (!oh || oh->_int_flags & _HWMOD_NO_MPU_PORT || oh->slaves_cnt == 0)
9341092 return NULL;
9351093
936− os = oh->slaves[index];
1094+ return oh->_mpu_port;
1095+};
1096+
1097+/**
1098+ * _find_mpu_rt_addr_space - return MPU register target address space for @oh
1099+ * @oh: struct omap_hwmod *
1100+ *
1101+ * Returns a pointer to the struct omap_hwmod_addr_space record representing
1102+ * the register target MPU address space; or returns NULL upon error.
1103+ */
1104+static struct omap_hwmod_addr_space * __init _find_mpu_rt_addr_space(struct omap_hwmod *oh)
1105+{
1106+ struct omap_hwmod_ocp_if *os;
1107+ struct omap_hwmod_addr_space *mem;
1108+ int found = 0, i = 0;
9371109
938− if (!os->addr)
1110+ os = _find_mpu_rt_port(oh);
1111+ if (!os || !os->addr)
9391112 return NULL;
9401113
9411114 do {
@@ -944,20 +1117,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) · 2 unmodified lines
9441117 found = 1;
9451118 } while (!found && mem->pa_start != mem->pa_end);
9461119
947− if (found) {
948− va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
949− if (!va_start) {
950− pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
951− return NULL;
952− }
953− pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
954− oh->name, va_start);
955− } else {
956− pr_debug("omap_hwmod: %s: no MPU register target found\n",
957− oh->name);
958− }
959−
960− return (found) ? va_start : NULL;
1120+ return (found) ? mem : NULL;
9611121 }
9621122
9631123 /**
@@ -1205,12 +1365,11 @@ static int _wait_target_ready(struct omap_hwmod *oh) · 241 unmodified lines
12051365 if (!oh)
12061366 return -EINVAL;
12071367
1208− if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
1368+ if (oh->flags & HWMOD_NO_IDLEST)
12091369 return 0;
12101370
1211− os = oh->slaves[oh->_mpu_port_index];
1212−
1213− if (oh->flags & HWMOD_NO_IDLEST)
1371+ os = _find_mpu_rt_port(oh);
1372+ if (!os)
12141373 return 0;
12151374
12161375 /* XXX check module SIDLEMODE */
@@ -1377,14 +1536,74 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name) · 160 unmodified lines
13771536 }
13781537 }
13791538
1539+/**
1540+ * _are_any_hardreset_lines_asserted - return true if part of @oh is hard-reset
1541+ * @oh: struct omap_hwmod *
1542+ *
1543+ * If any hardreset line associated with @oh is asserted, then return true.
1544+ * Otherwise, if @oh has no hardreset lines associated with it, or if
1545+ * no hardreset lines associated with @oh are asserted, then return false.
1546+ * This function is used to avoid executing some parts of the IP block
1547+ * enable/disable sequence if a hardreset line is set.
1548+ */
1549+static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh)
1550+{
1551+ int i;
1552+
1553+ if (oh->rst_lines_cnt == 0)
1554+ return false;
1555+
1556+ for (i = 0; i < oh->rst_lines_cnt; i++)
1557+ if (_read_hardreset(oh, oh->rst_lines[i].name) > 0)
1558+ return true;
1559+
1560+ return false;
1561+}
1562+
1563+/**
1564+ * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
1565+ * @oh: struct omap_hwmod *
1566+ *
1567+ * Disable the PRCM module mode related to the hwmod @oh.
1568+ * Return EINVAL if the modulemode is not supported and 0 in case of success.
1569+ */
1570+static int _omap4_disable_module(struct omap_hwmod *oh)
1571+{
1572+ int v;
1573+
1574+ /* The module mode does not exist prior OMAP4 */
1575+ if (!cpu_is_omap44xx())
1576+ return -EINVAL;
1577+
1578+ if (!oh->clkdm || !oh->prcm.omap4.modulemode)
1579+ return -EINVAL;
1580+
1581+ pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
1582+
1583+ omap4_cminst_module_disable(oh->clkdm->prcm_partition,
1584+ oh->clkdm->cm_inst,
1585+ oh->clkdm->clkdm_offs,
1586+ oh->prcm.omap4.clkctrl_offs);
1587+
1588+ if (_are_any_hardreset_lines_asserted(oh))
1589+ return 0;
1590+
1591+ v = _omap4_wait_target_disable(oh);
1592+ if (v)
1593+ pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1594+ oh->name);
1595+
1596+ return 0;
1597+}
1598+
13801599 /**
13811600 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit
13821601 * @oh: struct omap_hwmod *
13831602 *
13841603 * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be
1385− * enabled for this to work. Returns -EINVAL if the hwmod cannot be
1386− * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if
1387− * the module did not reset in time, or 0 upon success.
1604+ * enabled for this to work. Returns -ENOENT if the hwmod cannot be
1605+ * reset this way, -EINVAL if the hwmod is in the wrong state,
1606+ * -ETIMEDOUT if the module did not reset in time, or 0 upon success.
13881607 *
13891608 * In OMAP3 a specific SYSSTATUS register is used to get the reset status.
13901609 * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead
@@ -1401,7 +1620,7 @@ static int _ocp_softreset(struct omap_hwmod *oh) · 10 unmodified lines
14011620
14021621 if (!oh->class->sysc ||
14031622 !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET))
1404− return -EINVAL;
1623+ return -ENOENT;
14051624
14061625 /* clocks must be on for this operation */
14071626 if (oh->_state != _HWMOD_STATE_ENABLED) {
@@ -1462,32 +1681,60 @@ dis_opt_clks: · 54 unmodified lines
14621681 * _reset - reset an omap_hwmod
14631682 * @oh: struct omap_hwmod *
14641683 *
1465− * Resets an omap_hwmod @oh. The default software reset mechanism for
1466− * most OMAP IP blocks is triggered via the OCP_SYSCONFIG.SOFTRESET
1467− * bit. However, some hwmods cannot be reset via this method: some
1468− * are not targets and therefore have no OCP header registers to
1469− * access; others (like the IVA) have idiosyncratic reset sequences.
1470− * So for these relatively rare cases, custom reset code can be
1471− * supplied in the struct omap_hwmod_class .reset function pointer.
1472− * Passes along the return value from either _reset() or the custom
1473− * reset function - these must return -EINVAL if the hwmod cannot be
1474− * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if
1475− * the module did not reset in time, or 0 upon success.
1684+ * Resets an omap_hwmod @oh. If the module has a custom reset
1685+ * function pointer defined, then call it to reset the IP block, and
1686+ * pass along its return value to the caller. Otherwise, if the IP
1687+ * block has an OCP_SYSCONFIG register with a SOFTRESET bitfield
1688+ * associated with it, call a function to reset the IP block via that
1689+ * method, and pass along the return value to the caller. Finally, if
1690+ * the IP block has some hardreset lines associated with it, assert
1691+ * all of those, but do _not_ deassert them. (This is because driver
1692+ * authors have expressed an apparent requirement to control the
1693+ * deassertion of the hardreset lines themselves.)
1694+ *
1695+ * The default software reset mechanism for most OMAP IP blocks is
1696+ * triggered via the OCP_SYSCONFIG.SOFTRESET bit. However, some
1697+ * hwmods cannot be reset via this method. Some are not targets and
1698+ * therefore have no OCP header registers to access. Others (like the
1699+ * IVA) have idiosyncratic reset sequences. So for these relatively
1700+ * rare cases, custom reset code can be supplied in the struct
1701+ * omap_hwmod_class .reset function pointer. Passes along the return
1702+ * value from either _ocp_softreset() or the custom reset function -
1703+ * these must return -EINVAL if the hwmod cannot be reset this way or
1704+ * if the hwmod is in the wrong state, -ETIMEDOUT if the module did
1705+ * not reset in time, or 0 upon success.
14761706 */
14771707 static int _reset(struct omap_hwmod *oh)
14781708 {
1479− int ret;
1709+ int i, r;
14801710
14811711 pr_debug("omap_hwmod: %s: resetting\n", oh->name);
14821712
1483− ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh);
1713+ if (oh->class->reset) {
1714+ r = oh->class->reset(oh);
1715+ } else {
1716+ if (oh->rst_lines_cnt > 0) {
1717+ for (i = 0; i < oh->rst_lines_cnt; i++)
1718+ _assert_hardreset(oh, oh->rst_lines[i].name);
1719+ return 0;
1720+ } else {
1721+ r = _ocp_softreset(oh);
1722+ if (r == -ENOENT)
1723+ r = 0;
1724+ }
1725+ }
14841726
1727+ /*
1728+ * OCP_SYSCONFIG bits need to be reprogrammed after a
1729+ * softreset. The _enable() function should be split to avoid
1730+ * the rewrite of the OCP_SYSCONFIG register.
1731+ */
14851732 if (oh->class->sysc) {
14861733 _update_sysc_cache(oh);
14871734 _enable_sysc(oh);
14881735 }
14891736
1490− return ret;
1737+ return r;
14911738 }
14921739
14931740 /**
@@ -1506,10 +1753,9 @@ static int _enable(struct omap_hwmod *oh) · 12 unmodified lines
15061753 pr_debug("omap_hwmod: %s: enabling\n", oh->name);
15071754
15081755 /*
1509− * hwmods with HWMOD_INIT_NO_IDLE flag set are left
1510− * in enabled state at init.
1511− * Now that someone is really trying to enable them,
1512− * just ensure that the hwmod mux is set.
1756+ * hwmods with HWMOD_INIT_NO_IDLE flag set are left in enabled
1757+ * state at init. Now that someone is really trying to enable
1758+ * them, just ensure that the hwmod mux is set.
15131759 */
15141760 if (oh->_int_flags & _HWMOD_SKIP_ENABLE) {
15151761 /*
@@ -1532,15 +1778,17 @@ static int _enable(struct omap_hwmod *oh) · 16 unmodified lines
15321778 return -EINVAL;
15331779 }
15341780
1535−
15361781 /*
1537− * If an IP contains only one HW reset line, then de-assert it in order
1538− * to allow the module state transition. Otherwise the PRCM will return
1539− * Intransition status, and the init will failed.
1782+ * If an IP block contains HW reset lines and any of them are
1783+ * asserted, we let integration code associated with that
1784+ * block handle the enable. We've received very little
1785+ * information on what those driver authors need, and until
1786+ * detailed information is provided and the driver code is
1787+ * posted to the public lists, this is probably the best we
1788+ * can do.
15401789 */
1541− if ((oh->_state == _HWMOD_STATE_INITIALIZED ||
1542− oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1)
1543− _deassert_hardreset(oh, oh->rst_lines[0].name);
1790+ if (_are_any_hardreset_lines_asserted(oh))
1791+ return 0;
15441792
15451793 /* Mux pins for device runtime if populated */
15461794 if (oh->mux && (!oh->mux->enabled ||
@@ -1615,6 +1863,9 @@ static int _idle(struct omap_hwmod *oh) · 68 unmodified lines
16151863 return -EINVAL;
16161864 }
16171865
1866+ if (_are_any_hardreset_lines_asserted(oh))
1867+ return 0;
1868+
16181869 if (oh->class->sysc)
16191870 _idle_sysc(oh);
16201871 _del_initiator_dep(oh, mpu_oh);
@@ -1687,7 +1938,7 @@ int omap_hwmod_set_ocp_autoidle(struct omap_hwmod *oh, u8 autoidle) · 66 unmodified lines
16871938 */
16881939 static int _shutdown(struct omap_hwmod *oh)
16891940 {
1690− int ret;
1941+ int ret, i;
16911942 u8 prev_state;
16921943
16931944 if (oh->_state != _HWMOD_STATE_IDLE &&
@@ -1697,6 +1948,9 @@ static int _shutdown(struct omap_hwmod *oh) · 3 unmodified lines
16971948 return -EINVAL;
16981949 }
16991950
1951+ if (_are_any_hardreset_lines_asserted(oh))
1952+ return 0;
1953+
17001954 pr_debug("omap_hwmod: %s: disabling\n", oh->name);
17011955
17021956 if (oh->class->pre_shutdown) {
@@ -1728,12 +1982,8 @@ static int _shutdown(struct omap_hwmod *oh) · 25 unmodified lines
17281982 }
17291983 /* XXX Should this code also force-disable the optional clocks? */
17301984
1731− /*
1732− * If an IP contains only one HW reset line, then assert it
1733− * after disabling the clocks and before shutting down the IP.
1734− */
1735− if (oh->rst_lines_cnt == 1)
1736− _assert_hardreset(oh, oh->rst_lines[0].name);
1985+ for (i = 0; i < oh->rst_lines_cnt; i++)
1986+ _assert_hardreset(oh, oh->rst_lines[i].name);
17371987
17381988 /* Mux pins to safe mode or use populated off mode values */
17391989 if (oh->mux)
@@ -1745,59 +1995,186 @@ static int _shutdown(struct omap_hwmod *oh) · 5 unmodified lines
17451995 }
17461996
17471997 /**
1748− * _setup - do initial configuration of omap_hwmod
1749− * @oh: struct omap_hwmod *
1998+ * _init_mpu_rt_base - populate the virtual address for a hwmod
1999+ * @oh: struct omap_hwmod * to locate the virtual address
17502000 *
1751− * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh
1752− * OCP_SYSCONFIG register. Returns 0.
2001+ * Cache the virtual address used by the MPU to access this IP block's
2002+ * registers. This address is needed early so the OCP registers that
2003+ * are part of the device's address space can be ioremapped properly.
2004+ * No return value.
17532005 */
1754−static int _setup(struct omap_hwmod *oh, void *data)
2006+static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
17552007 {
1756− int i, r;
1757− u8 postsetup_state;
2008+ struct omap_hwmod_addr_space *mem;
2009+ void __iomem *va_start;
2010+
2011+ if (!oh)
2012+ return;
2013+
2014+ _save_mpu_port_index(oh);
17582015
1759− if (oh->_state != _HWMOD_STATE_CLKS_INITED)
2016+ if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
2017+ return;
2018+
2019+ mem = _find_mpu_rt_addr_space(oh);
2020+ if (!mem) {
2021+ pr_debug("omap_hwmod: %s: no MPU register target found\n",
2022+ oh->name);
2023+ return;
2024+ }
2025+
2026+ va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
2027+ if (!va_start) {
2028+ pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
2029+ return;
2030+ }
2031+
2032+ pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
2033+ oh->name, va_start);
2034+
2035+ oh->_mpu_rt_va = va_start;
2036+}
2037+
2038+/**
2039+ * _init - initialize internal data for the hwmod @oh
2040+ * @oh: struct omap_hwmod *
2041+ * @n: (unused)
2042+ *
2043+ * Look up the clocks and the address space used by the MPU to access
2044+ * registers belonging to the hwmod @oh. @oh must already be
2045+ * registered at this point. This is the first of two phases for
2046+ * hwmod initialization. Code called here does not touch any hardware
2047+ * registers, it simply prepares internal data structures. Returns 0
2048+ * upon success or if the hwmod isn't registered, or -EINVAL upon
2049+ * failure.
2050+ */
2051+static int __init _init(struct omap_hwmod *oh, void *data)
2052+{
2053+ int r;
2054+
2055+ if (oh->_state != _HWMOD_STATE_REGISTERED)
17602056 return 0;
17612057
1762− /* Set iclk autoidle mode */
1763− if (oh->slaves_cnt > 0) {
1764− for (i = 0; i < oh->slaves_cnt; i++) {
1765− struct omap_hwmod_ocp_if *os = oh->slaves[i];
1766− struct clk *c = os->_clk;
2058+ _init_mpu_rt_base(oh, NULL);
17672059
1768− if (!c)
1769− continue;
2060+ r = _init_clocks(oh, NULL);
2061+ if (IS_ERR_VALUE(r)) {
2062+ WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
2063+ return -EINVAL;
2064+ }
17702065
1771− if (os->flags & OCPIF_SWSUP_IDLE) {
1772− /* XXX omap_iclk_deny_idle(c); */
1773− } else {
1774− /* XXX omap_iclk_allow_idle(c); */
1775− clk_enable(c);
1776− }
2066+ oh->_state = _HWMOD_STATE_INITIALIZED;
2067+
2068+ return 0;
2069+}
2070+
2071+/**
2072+ * _setup_iclk_autoidle - configure an IP block's interface clocks
2073+ * @oh: struct omap_hwmod *
2074+ *
2075+ * Set up the module's interface clocks. XXX This function is still mostly
2076+ * a stub; implementing this properly requires iclk autoidle usecounting in
2077+ * the clock code. No return value.
2078+ */
2079+static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
2080+{
2081+ struct omap_hwmod_ocp_if *os;
2082+ struct list_head *p;
2083+ int i = 0;
2084+ if (oh->_state != _HWMOD_STATE_INITIALIZED)
2085+ return;
2086+
2087+ p = oh->slave_ports.next;
2088+
2089+ while (i < oh->slaves_cnt) {
2090+ os = _fetch_next_ocp_if(&p, &i);
2091+ if (!os->_clk)
2092+ continue;
2093+
2094+ if (os->flags & OCPIF_SWSUP_IDLE) {
2095+ /* XXX omap_iclk_deny_idle(c); */
2096+ } else {
2097+ /* XXX omap_iclk_allow_idle(c); */
2098+ clk_enable(os->_clk);
17772099 }
17782100 }
17792101
1780− oh->_state = _HWMOD_STATE_INITIALIZED;
2102+ return;
2103+}
17812104
1782− /*
1783− * In the case of hwmod with hardreset that should not be
1784− * de-assert at boot time, we have to keep the module
1785− * initialized, because we cannot enable it properly with the
1786− * reset asserted. Exit without warning because that behavior is
1787− * expected.
1788− */
1789− if ((oh->flags & HWMOD_INIT_NO_RESET) && oh->rst_lines_cnt == 1)
1790− return 0;
2105+/**
2106+ * _setup_reset - reset an IP block during the setup process
2107+ * @oh: struct omap_hwmod *
2108+ *
2109+ * Reset the IP block corresponding to the hwmod @oh during the setup
2110+ * process. The IP block is first enabled so it can be successfully
2111+ * reset. Returns 0 upon success or a negative error code upon
2112+ * failure.
2113+ */
2114+static int __init _setup_reset(struct omap_hwmod *oh)
2115+{
2116+ int r;
17912117
1792− r = _enable(oh);
1793− if (r) {
1794− pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n",
1795− oh->name, oh->_state);
1796− return 0;
2118+ if (oh->_state != _HWMOD_STATE_INITIALIZED)
2119+ return -EINVAL;
2120+
2121+ if (oh->rst_lines_cnt == 0) {
2122+ r = _enable(oh);
2123+ if (r) {
2124+ pr_warning("omap_hwmod: %s: cannot be enabled for reset (%d)\n",
2125+ oh->name, oh->_state);
2126+ return -EINVAL;
2127+ }
17972128 }
17982129
17992130 if (!(oh->flags & HWMOD_INIT_NO_RESET))
1800− _reset(oh);
2131+ r = _reset(oh);
2132+
2133+ return r;
2134+}
2135+
2136+/**
2137+ * _setup_postsetup - transition to the appropriate state after _setup
2138+ * @oh: struct omap_hwmod *
2139+ *
2140+ * Place an IP block represented by @oh into a "post-setup" state --
2141+ * either IDLE, ENABLED, or DISABLED. ("post-setup" simply means that
2142+ * this function is called at the end of _setup().) The postsetup
2143+ * state for an IP block can be changed by calling
2144+ * omap_hwmod_enter_postsetup_state() early in the boot process,
2145+ * before one of the omap_hwmod_setup*() functions are called for the
2146+ * IP block.
2147+ *
2148+ * The IP block stays in this state until a PM runtime-based driver is
2149+ * loaded for that IP block. A post-setup state of IDLE is
2150+ * appropriate for almost all IP blocks with runtime PM-enabled
2151+ * drivers, since those drivers are able to enable the IP block. A
2152+ * post-setup state of ENABLED is appropriate for kernels with PM
2153+ * runtime disabled. The DISABLED state is appropriate for unusual IP
2154+ * blocks such as the MPU WDTIMER on kernels without WDTIMER drivers
2155+ * included, since the WDTIMER starts running on reset and will reset
2156+ * the MPU if left active.
2157+ *
2158+ * This post-setup mechanism is deprecated. Once all of the OMAP
2159+ * drivers have been converted to use PM runtime, and all of the IP
2160+ * block data and interconnect data is available to the hwmod code, it
2161+ * should be possible to replace this mechanism with a "lazy reset"
2162+ * arrangement. In a "lazy reset" setup, each IP block is enabled
2163+ * when the driver first probes, then all remaining IP blocks without
2164+ * drivers are either shut down or enabled after the drivers have
2165+ * loaded. However, this cannot take place until the above
2166+ * preconditions have been met, since otherwise the late reset code
2167+ * has no way of knowing which IP blocks are in use by drivers, and
2168+ * which ones are unused.
2169+ *
2170+ * No return value.
2171+ */
2172+static void __init _setup_postsetup(struct omap_hwmod *oh)
2173+{
2174+ u8 postsetup_state;
2175+
2176+ if (oh->rst_lines_cnt > 0)
2177+ return;
18012178
18022179 postsetup_state = oh->_postsetup_state;
18032180 if (postsetup_state == _HWMOD_STATE_UNKNOWN)
@@ -1821,6 +2198,35 @@ static int _setup(struct omap_hwmod *oh, void *data) · 17 unmodified lines
18212198 WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n",
18222199 oh->name, postsetup_state);
18232200
2201+ return;
2202+}
2203+
2204+/**
2205+ * _setup - prepare IP block hardware for use
2206+ * @oh: struct omap_hwmod *
2207+ * @n: (unused, pass NULL)
2208+ *
2209+ * Configure the IP block represented by @oh. This may include
2210+ * enabling the IP block, resetting it, and placing it into a
2211+ * post-setup state, depending on the type of IP block and applicable
2212+ * flags. IP blocks are reset to prevent any previous configuration
2213+ * by the bootloader or previous operating system from interfering
2214+ * with power management or other parts of the system. The reset can
2215+ * be avoided; see omap_hwmod_no_setup_reset(). This is the second of
2216+ * two phases for hwmod initialization. Code called here generally
2217+ * affects the IP block hardware, or system integration hardware
2218+ * associated with the IP block. Returns 0.
2219+ */
2220+static int __init _setup(struct omap_hwmod *oh, void *data)
2221+{
2222+ if (oh->_state != _HWMOD_STATE_INITIALIZED)
2223+ return 0;
2224+
2225+ _setup_iclk_autoidle(oh);
2226+
2227+ if (!_setup_reset(oh))
2228+ _setup_postsetup(oh);
2229+
18242230 return 0;
18252231 }
18262232
@@ -1843,8 +2249,6 @@ static int _setup(struct omap_hwmod *oh, void *data) · 16 unmodified lines
18432249 */
18442250 static int __init _register(struct omap_hwmod *oh)
18452251 {
1846− int ms_id;
1847−
18482252 if (!oh || !oh->name || !oh->class || !oh->class->name ||
18492253 (oh->_state != _HWMOD_STATE_UNKNOWN))
18502254 return -EINVAL;
@@ -1854,14 +2258,10 @@ static int __init _register(struct omap_hwmod *oh) · 3 unmodified lines
18542258 if (_lookup(oh->name))
18552259 return -EEXIST;
18562260
1857− ms_id = _find_mpu_port_index(oh);
1858− if (!IS_ERR_VALUE(ms_id))
1859− oh->_mpu_port_index = ms_id;
1860− else
1861− oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1862−
18632261 list_add_tail(&oh->node, &omap_hwmod_list);
18642262
2263+ INIT_LIST_HEAD(&oh->master_ports);
2264+ INIT_LIST_HEAD(&oh->slave_ports);
18652265 spin_lock_init(&oh->_lock);
18662266
18672267 oh->_state = _HWMOD_STATE_REGISTERED;
@@ -1876,6 +2276,160 @@ static int __init _register(struct omap_hwmod *oh) · 8 unmodified lines
18762276 return 0;
18772277 }
18782278
2279+/**
2280+ * _alloc_links - return allocated memory for hwmod links
2281+ * @ml: pointer to a struct omap_hwmod_link * for the master link
2282+ * @sl: pointer to a struct omap_hwmod_link * for the slave link
2283+ *
2284+ * Return pointers to two struct omap_hwmod_link records, via the
2285+ * addresses pointed to by @ml and @sl. Will first attempt to return
2286+ * memory allocated as part of a large initial block, but if that has
2287+ * been exhausted, will allocate memory itself. Since ideally this
2288+ * second allocation path will never occur, the number of these
2289+ * 'supplemental' allocations will be logged when debugging is
2290+ * enabled. Returns 0.
2291+ */
2292+static int __init _alloc_links(struct omap_hwmod_link **ml,
2293+ struct omap_hwmod_link **sl)
2294+{
2295+ unsigned int sz;
2296+
2297+ if ((free_ls + LINKS_PER_OCP_IF) <= max_ls) {
2298+ *ml = &linkspace[free_ls++];
2299+ *sl = &linkspace[free_ls++];
2300+ return 0;
2301+ }
2302+
2303+ sz = sizeof(struct omap_hwmod_link) * LINKS_PER_OCP_IF;
2304+
2305+ *sl = NULL;
2306+ *ml = alloc_bootmem(sz);
2307+
2308+ memset(*ml, 0, sz);
2309+
2310+ *sl = (void *)(*ml) + sizeof(struct omap_hwmod_link);
2311+
2312+ ls_supp++;
2313+ pr_debug("omap_hwmod: supplemental link allocations needed: %d\n",
2314+ ls_supp * LINKS_PER_OCP_IF);
2315+
2316+ return 0;
2317+};
2318+
2319+/**
2320+ * _add_link - add an interconnect between two IP blocks
2321+ * @oi: pointer to a struct omap_hwmod_ocp_if record
2322+ *
2323+ * Add struct omap_hwmod_link records connecting the master IP block
2324+ * specified in @oi->master to @oi, and connecting the slave IP block
2325+ * specified in @oi->slave to @oi. This code is assumed to run before
2326+ * preemption or SMP has been enabled, thus avoiding the need for
2327+ * locking in this code. Changes to this assumption will require
2328+ * additional locking. Returns 0.
2329+ */
2330+static int __init _add_link(struct omap_hwmod_ocp_if *oi)
2331+{
2332+ struct omap_hwmod_link *ml, *sl;
2333+
2334+ pr_debug("omap_hwmod: %s -> %s: adding link\n", oi->master->name,
2335+ oi->slave->name);
2336+
2337+ _alloc_links(&ml, &sl);
2338+
2339+ ml->ocp_if = oi;
2340+ INIT_LIST_HEAD(&ml->node);
2341+ list_add(&ml->node, &oi->master->master_ports);
2342+ oi->master->masters_cnt++;
2343+
2344+ sl->ocp_if = oi;
2345+ INIT_LIST_HEAD(&sl->node);
2346+ list_add(&sl->node, &oi->slave->slave_ports);
2347+ oi->slave->slaves_cnt++;
2348+
2349+ return 0;
2350+}
2351+
2352+/**
2353+ * _register_link - register a struct omap_hwmod_ocp_if
2354+ * @oi: struct omap_hwmod_ocp_if *
2355+ *
2356+ * Registers the omap_hwmod_ocp_if record @oi. Returns -EEXIST if it
2357+ * has already been registered; -EINVAL if @oi is NULL or if the
2358+ * record pointed to by @oi is missing required fields; or 0 upon
2359+ * success.
2360+ *
2361+ * XXX The data should be copied into bootmem, so the original data
2362+ * should be marked __initdata and freed after init. This would allow
2363+ * unneeded omap_hwmods to be freed on multi-OMAP configurations.
2364+ */
2365+static int __init _register_link(struct omap_hwmod_ocp_if *oi)
2366+{
2367+ if (!oi || !oi->master || !oi->slave || !oi->user)
2368+ return -EINVAL;
2369+
2370+ if (oi->_int_flags & _OCPIF_INT_FLAGS_REGISTERED)
2371+ return -EEXIST;
2372+
2373+ pr_debug("omap_hwmod: registering link from %s to %s\n",
2374+ oi->master->name, oi->slave->name);
2375+
2376+ /*
2377+ * Register the connected hwmods, if they haven't been
2378+ * registered already
2379+ */
2380+ if (oi->master->_state != _HWMOD_STATE_REGISTERED)
2381+ _register(oi->master);
2382+
2383+ if (oi->slave->_state != _HWMOD_STATE_REGISTERED)
2384+ _register(oi->slave);
2385+
2386+ _add_link(oi);
2387+
2388+ oi->_int_flags |= _OCPIF_INT_FLAGS_REGISTERED;
2389+
2390+ return 0;
2391+}
2392+
2393+/**
2394+ * _alloc_linkspace - allocate large block of hwmod links
2395+ * @ois: pointer to an array of struct omap_hwmod_ocp_if records to count
2396+ *
2397+ * Allocate a large block of struct omap_hwmod_link records. This
2398+ * improves boot time significantly by avoiding the need to allocate
2399+ * individual records one by one. If the number of records to
2400+ * allocate in the block hasn't been manually specified, this function
2401+ * will count the number of struct omap_hwmod_ocp_if records in @ois
2402+ * and use that to determine the allocation size. For SoC families
2403+ * that require multiple list registrations, such as OMAP3xxx, this
2404+ * estimation process isn't optimal, so manual estimation is advised
2405+ * in those cases. Returns -EEXIST if the allocation has already occurred
2406+ * or 0 upon success.
2407+ */
2408+static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois)
2409+{
2410+ unsigned int i = 0;
2411+ unsigned int sz;
2412+
2413+ if (linkspace) {
2414+ WARN(1, "linkspace already allocated\n");
2415+ return -EEXIST;
2416+ }
2417+
2418+ if (max_ls == 0)
2419+ while (ois[i++])
2420+ max_ls += LINKS_PER_OCP_IF;
2421+
2422+ sz = sizeof(struct omap_hwmod_link) * max_ls;
2423+
2424+ pr_debug("omap_hwmod: %s: allocating %d byte linkspace (%d links)\n",
2425+ __func__, sz, max_ls);
2426+
2427+ linkspace = alloc_bootmem(sz);
2428+
2429+ memset(linkspace, 0, sz);
2430+
2431+ return 0;
2432+}
18792433
18802434 /* Public functions */
18812435
@@ -2004,120 +2558,101 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), · 122 unmodified lines
20042558 }
20052559
20062560 /**
2007− * omap_hwmod_register - register an array of hwmods
2008− * @ohs: pointer to an array of omap_hwmods to register
2561+ * omap_hwmod_register_links - register an array of hwmod links
2562+ * @ois: pointer to an array of omap_hwmod_ocp_if to register
20092563 *
20102564 * Intended to be called early in boot before the clock framework is
2011− * initialized. If @ohs is not null, will register all omap_hwmods
2012− * listed in @ohs that are valid for this chip. Returns 0.
2565+ * initialized. If @ois is not null, will register all omap_hwmods
2566+ * listed in @ois that are valid for this chip. Returns 0.
20132567 */
2014−int __init omap_hwmod_register(struct omap_hwmod **ohs)
2568+int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
20152569 {
20162570 int r, i;
20172571
2018− if (!ohs)
2572+ if (!ois)
20192573 return 0;
20202574
2575+ if (!linkspace) {
2576+ if (_alloc_linkspace(ois)) {
2577+ pr_err("omap_hwmod: could not allocate link space\n");
2578+ return -ENOMEM;
2579+ }
2580+ }
2581+
20212582 i = 0;
20222583 do {
2023− r = _register(ohs[i]);
2024− WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name,
2025− r);
2026− } while (ohs[++i]);
2584+ r = _register_link(ois[i]);
2585+ WARN(r && r != -EEXIST,
2586+ "omap_hwmod: _register_link(%s -> %s) returned %d\n",
2587+ ois[i]->master->name, ois[i]->slave->name, r);
2588+ } while (ois[++i]);
20272589
20282590 return 0;
20292591 }
20302592
2031−/*
2032− * _populate_mpu_rt_base - populate the virtual address for a hwmod
2593+/**
2594+ * _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up
2595+ * @oh: pointer to the hwmod currently being set up (usually not the MPU)
20332596 *
2034− * Must be called only from omap_hwmod_setup_*() so ioremap works properly.
2035− * Assumes the caller takes care of locking if needed.
2597+ * If the hwmod data corresponding to the MPU subsystem IP block
2598+ * hasn't been initialized and set up yet, do so now. This must be
2599+ * done first since sleep dependencies may be added from other hwmods
2600+ * to the MPU. Intended to be called only by omap_hwmod_setup*(). No
2601+ * return value.
20362602 */
2037−static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data)
2603+static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
20382604 {
2039− if (oh->_state != _HWMOD_STATE_REGISTERED)
2040− return 0;
2041−
2042− if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
2043− return 0;
2044−
2045− oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
2046−
2047− return 0;
2605+ if (!mpu_oh || mpu_oh->_state == _HWMOD_STATE_UNKNOWN)
2606+ pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
2607+ __func__, MPU_INITIATOR_NAME);
2608+ else if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh)
2609+ omap_hwmod_setup_one(MPU_INITIATOR_NAME);
20482610 }
20492611
20502612 /**
20512613 * omap_hwmod_setup_one - set up a single hwmod
20522614 * @oh_name: const char * name of the already-registered hwmod to set up
20532615 *
2054− * Must be called after omap2_clk_init(). Resolves the struct clk
2055− * names to struct clk pointers for each registered omap_hwmod. Also
2056− * calls _setup() on each hwmod. Returns -EINVAL upon error or 0 upon
2057− * success.
2616+ * Initialize and set up a single hwmod. Intended to be used for a
2617+ * small number of early devices, such as the timer IP blocks used for
2618+ * the scheduler clock. Must be called after omap2_clk_init().
2619+ * Resolves the struct clk names to struct clk pointers for each
2620+ * registered omap_hwmod. Also calls _setup() on each hwmod. Returns
2621+ * -EINVAL upon error or 0 upon success.
20582622 */
20592623 int __init omap_hwmod_setup_one(const char *oh_name)
20602624 {
20612625 struct omap_hwmod *oh;
2062− int r;
20632626
20642627 pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__);
20652628
2066− if (!mpu_oh) {
2067− pr_err("omap_hwmod: %s: cannot setup_one: MPU initiator hwmod %s not yet registered\n",
2068− oh_name, MPU_INITIATOR_NAME);
2069− return -EINVAL;
2070− }
2071−
20722629 oh = _lookup(oh_name);
20732630 if (!oh) {
20742631 WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name);
20752632 return -EINVAL;
20762633 }
20772634
2078− if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh)
2079− omap_hwmod_setup_one(MPU_INITIATOR_NAME);
2080−
2081− r = _populate_mpu_rt_base(oh, NULL);
2082− if (IS_ERR_VALUE(r)) {
2083− WARN(1, "omap_hwmod: %s: couldn't set mpu_rt_base\n", oh_name);
2084− return -EINVAL;
2085− }
2086−
2087− r = _init_clocks(oh, NULL);
2088− if (IS_ERR_VALUE(r)) {
2089− WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh_name);
2090− return -EINVAL;
2091− }
2635+ _ensure_mpu_hwmod_is_setup(oh);
20922636
2637+ _init(oh, NULL);
20932638 _setup(oh, NULL);
20942639
20952640 return 0;
20962641 }
20972642
20982643 /**
2099− * omap_hwmod_setup - do some post-clock framework initialization
2644+ * omap_hwmod_setup_all - set up all registered IP blocks
21002645 *
2101− * Must be called after omap2_clk_init(). Resolves the struct clk names
2102− * to struct clk pointers for each registered omap_hwmod. Also calls
2103− * _setup() on each hwmod. Returns 0 upon success.
2646+ * Initialize and set up all IP blocks registered with the hwmod code.
2647+ * Must be called after omap2_clk_init(). Resolves the struct clk
2648+ * names to struct clk pointers for each registered omap_hwmod. Also
2649+ * calls _setup() on each hwmod. Returns 0 upon success.
21042650 */
21052651 static int __init omap_hwmod_setup_all(void)
21062652 {
2107− int r;
2108−
2109− if (!mpu_oh) {
2110− pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
2111− __func__, MPU_INITIATOR_NAME);
2112− return -EINVAL;
2113− }
2114−
2115− r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL);
2116−
2117− r = omap_hwmod_for_each(_init_clocks, NULL);
2118− WARN(IS_ERR_VALUE(r),
2119− "omap_hwmod: %s: _init_clocks failed\n", __func__);
2653+ _ensure_mpu_hwmod_is_setup(NULL);
21202654
2655+ omap_hwmod_for_each(_init, NULL);
21212656 omap_hwmod_for_each(_setup, NULL);
21222657
21232658 return 0;
@@ -2274,6 +2809,10 @@ int omap_hwmod_reset(struct omap_hwmod *oh) · 150 unmodified lines
22742809 return r;
22752810 }
22762811
2812+/*
2813+ * IP block data retrieval functions
2814+ */
2815+
22772816 /**
22782817 * omap_hwmod_count_resources - count number of struct resources needed by hwmod
22792818 * @oh: struct omap_hwmod *
@@ -2292,12 +2831,19 @@ int omap_hwmod_reset(struct omap_hwmod *oh) · 12 unmodified lines
22922831 */
22932832 int omap_hwmod_count_resources(struct omap_hwmod *oh)
22942833 {
2295− int ret, i;
2834+ struct omap_hwmod_ocp_if *os;
2835+ struct list_head *p;
2836+ int ret;
2837+ int i = 0;
22962838
22972839 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
22982840
2299− for (i = 0; i < oh->slaves_cnt; i++)
2300− ret += _count_ocp_if_addr_spaces(oh->slaves[i]);
2841+ p = oh->slave_ports.next;
2842+
2843+ while (i < oh->slaves_cnt) {
2844+ os = _fetch_next_ocp_if(&p, &i);
2845+ ret += _count_ocp_if_addr_spaces(os);
2846+ }
23012847
23022848 return ret;
23032849 }
@@ -2314,7 +2860,9 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh) · 10 unmodified lines
23142860 */
23152861 int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
23162862 {
2317− int i, j, mpu_irqs_cnt, sdma_reqs_cnt;
2863+ struct omap_hwmod_ocp_if *os;
2864+ struct list_head *p;
2865+ int i, j, mpu_irqs_cnt, sdma_reqs_cnt, addr_cnt;
23182866 int r = 0;
23192867
23202868 /* For each IRQ, DMA, memory area, fill in array.*/
@@ -2337,11 +2885,11 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) · 16 unmodified lines
23372885 r++;
23382886 }
23392887
2340− for (i = 0; i < oh->slaves_cnt; i++) {
2341− struct omap_hwmod_ocp_if *os;
2342− int addr_cnt;
2888+ p = oh->slave_ports.next;
23432889
2344− os = oh->slaves[i];
2890+ i = 0;
2891+ while (i < oh->slaves_cnt) {
2892+ os = _fetch_next_ocp_if(&p, &i);
23452893 addr_cnt = _count_ocp_if_addr_spaces(os);
23462894
23472895 for (j = 0; j < addr_cnt; j++) {
@@ -2356,6 +2904,69 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) · 8 unmodified lines
23562904 return r;
23572905 }
23582906
2907+/**
2908+ * omap_hwmod_get_resource_byname - fetch IP block integration data by name
2909+ * @oh: struct omap_hwmod * to operate on
2910+ * @type: one of the IORESOURCE_* constants from include/linux/ioport.h
2911+ * @name: pointer to the name of the data to fetch (optional)
2912+ * @rsrc: pointer to a struct resource, allocated by the caller
2913+ *
2914+ * Retrieve MPU IRQ, SDMA request line, or address space start/end
2915+ * data for the IP block pointed to by @oh. The data will be filled
2916+ * into a struct resource record pointed to by @rsrc. The struct
2917+ * resource must be allocated by the caller. When @name is non-null,
2918+ * the data associated with the matching entry in the IRQ/SDMA/address
2919+ * space hwmod data arrays will be returned. If @name is null, the
2920+ * first array entry will be returned. Data order is not meaningful
2921+ * in hwmod data, so callers are strongly encouraged to use a non-null
2922+ * @name whenever possible to avoid unpredictable effects if hwmod
2923+ * data is later added that causes data ordering to change. This
2924+ * function is only intended for use by OMAP core code. Device
2925+ * drivers should not call this function - the appropriate bus-related
2926+ * data accessor functions should be used instead. Returns 0 upon
2927+ * success or a negative error code upon error.
2928+ */
2929+int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
2930+ const char *name, struct resource *rsrc)
2931+{
2932+ int r;
2933+ unsigned int irq, dma;
2934+ u32 pa_start, pa_end;
2935+
2936+ if (!oh || !rsrc)
2937+ return -EINVAL;
2938+
2939+ if (type == IORESOURCE_IRQ) {
2940+ r = _get_mpu_irq_by_name(oh, name, &irq);
2941+ if (r)
2942+ return r;
2943+
2944+ rsrc->start = irq;
2945+ rsrc->end = irq;
2946+ } else if (type == IORESOURCE_DMA) {
2947+ r = _get_sdma_req_by_name(oh, name, &dma);
2948+ if (r)
2949+ return r;
2950+
2951+ rsrc->start = dma;
2952+ rsrc->end = dma;
2953+ } else if (type == IORESOURCE_MEM) {
2954+ r = _get_addr_space_by_name(oh, name, &pa_start, &pa_end);
2955+ if (r)
2956+ return r;
2957+
2958+ rsrc->start = pa_start;
2959+ rsrc->end = pa_end;
2960+ } else {
2961+ return -EINVAL;
2962+ }
2963+
2964+ rsrc->flags = type;
2965+ rsrc->name = name;
2966+
2967+ return 0;
2968+}
2969+
23592970 /**
23602971 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain
23612972 * @oh: struct omap_hwmod *
@@ -2370,6 +2981,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) · 8 unmodified lines
23702981 struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
23712982 {
23722983 struct clk *c;
2984+ struct omap_hwmod_ocp_if *oi;
23732985
23742986 if (!oh)
23752987 return NULL;
@@ -2377,9 +2989,10 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) · 1 unmodified line
23772989 if (oh->_clk) {
23782990 c = oh->_clk;
23792991 } else {
2380− if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
2992+ oi = _find_mpu_rt_port(oh);
2993+ if (!oi)
23812994 return NULL;
2382− c = oh->slaves[oh->_mpu_port_index]->_clk;
2995+ c = oi->_clk;
23832996 }
23842997
23852998 if (!c->clkdm)
@@ -2653,10 +3266,10 @@ int omap_hwmod_for_each_by_class(const char *classname, · 267 unmodified lines
26533266 * @state: state that _setup() should leave the hwmod in
26543267 *
26553268 * Sets the hwmod state that @oh will enter at the end of _setup()
2656− * (called by omap_hwmod_setup_*()). Only valid to call between
2657− * calling omap_hwmod_register() and omap_hwmod_setup_*(). Returns
2658− * 0 upon success or -EINVAL if there is a problem with the arguments
2659− * or if the hwmod is in the wrong state.
3269+ * (called by omap_hwmod_setup_*()). See also the documentation
3270+ * for _setup_postsetup(), above. Returns 0 upon success or
3271+ * -EINVAL if there is a problem with the arguments or if the hwmod is
3272+ * in the wrong state.
26603273 */
26613274 int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state)
26623275 {
arch/arm/mach-omap2/omap_hwmod_2420_data.c+233−1329
@@ -2,6 +2,7 @@ · 1 unmodified line
22 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
33 *
44 * Copyright (C) 2009-2011 Nokia Corporation
5+ * Copyright (C) 2012 Texas Instruments, Inc.
56 * Paul Walmsley
67 *
78 * This program is free software; you can redistribute it and/or modify
@@ -32,1073 +33,284 @@ · 24 unmodified lines
3233 /*
3334 * OMAP2420 hardware module integration data
3435 *
35− * ALl of the data in this section should be autogeneratable from the
36+ * All of the data in this section should be autogeneratable from the
3637 * TI hardware database or other technical documentation. Data that
3738 * is driver-specific or driver-kernel integration-specific belongs
3839 * elsewhere.
3940 */
4041
41−static struct omap_hwmod omap2420_mpu_hwmod;
42−static struct omap_hwmod omap2420_iva_hwmod;
43−static struct omap_hwmod omap2420_l3_main_hwmod;
44−static struct omap_hwmod omap2420_l4_core_hwmod;
45−static struct omap_hwmod omap2420_dss_core_hwmod;
46−static struct omap_hwmod omap2420_dss_dispc_hwmod;
47−static struct omap_hwmod omap2420_dss_rfbi_hwmod;
48−static struct omap_hwmod omap2420_dss_venc_hwmod;
49−static struct omap_hwmod omap2420_wd_timer2_hwmod;
50−static struct omap_hwmod omap2420_gpio1_hwmod;
51−static struct omap_hwmod omap2420_gpio2_hwmod;
52−static struct omap_hwmod omap2420_gpio3_hwmod;
53−static struct omap_hwmod omap2420_gpio4_hwmod;
54−static struct omap_hwmod omap2420_dma_system_hwmod;
55−static struct omap_hwmod omap2420_mcspi1_hwmod;
56−static struct omap_hwmod omap2420_mcspi2_hwmod;
57−
58−/* L3 -> L4_CORE interface */
59−static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
60− .master = &omap2420_l3_main_hwmod,
61− .slave = &omap2420_l4_core_hwmod,
62− .user = OCP_USER_MPU | OCP_USER_SDMA,
63−};
64−
65−/* MPU -> L3 interface */
66−static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
67− .master = &omap2420_mpu_hwmod,
68− .slave = &omap2420_l3_main_hwmod,
69− .user = OCP_USER_MPU,
70−};
71−
72−/* Slave interfaces on the L3 interconnect */
73−static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
74− &omap2420_mpu__l3_main,
75−};
76−
77−/* DSS -> l3 */
78−static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
79− .master = &omap2420_dss_core_hwmod,
80− .slave = &omap2420_l3_main_hwmod,
81− .fw = {
82− .omap2 = {
83− .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
84− .flags = OMAP_FIREWALL_L3,
85− }
86− },
87− .user = OCP_USER_MPU | OCP_USER_SDMA,
88−};
89−
90−/* Master interfaces on the L3 interconnect */
91−static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
92− &omap2420_l3_main__l4_core,
93−};
94−
95−/* L3 */
96−static struct omap_hwmod omap2420_l3_main_hwmod = {
97− .name = "l3_main",
98− .class = &l3_hwmod_class,
99− .masters = omap2420_l3_main_masters,
100− .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
101− .slaves = omap2420_l3_main_slaves,
102− .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
103− .flags = HWMOD_NO_IDLEST,
104−};
105−
106−static struct omap_hwmod omap2420_l4_wkup_hwmod;
107−static struct omap_hwmod omap2420_uart1_hwmod;
108−static struct omap_hwmod omap2420_uart2_hwmod;
109−static struct omap_hwmod omap2420_uart3_hwmod;
110−static struct omap_hwmod omap2420_i2c1_hwmod;
111−static struct omap_hwmod omap2420_i2c2_hwmod;
112−static struct omap_hwmod omap2420_mcbsp1_hwmod;
113−static struct omap_hwmod omap2420_mcbsp2_hwmod;
114−
115−/* l4 core -> mcspi1 interface */
116−static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
117− .master = &omap2420_l4_core_hwmod,
118− .slave = &omap2420_mcspi1_hwmod,
119− .clk = "mcspi1_ick",
120− .addr = omap2_mcspi1_addr_space,
121− .user = OCP_USER_MPU | OCP_USER_SDMA,
122−};
123−
124−/* l4 core -> mcspi2 interface */
125−static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
126− .master = &omap2420_l4_core_hwmod,
127− .slave = &omap2420_mcspi2_hwmod,
128− .clk = "mcspi2_ick",
129− .addr = omap2_mcspi2_addr_space,
130− .user = OCP_USER_MPU | OCP_USER_SDMA,
131−};
132−
133−/* L4_CORE -> L4_WKUP interface */
134−static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
135− .master = &omap2420_l4_core_hwmod,
136− .slave = &omap2420_l4_wkup_hwmod,
137− .user = OCP_USER_MPU | OCP_USER_SDMA,
138−};
139−
140−/* L4 CORE -> UART1 interface */
141−static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
142− .master = &omap2420_l4_core_hwmod,
143− .slave = &omap2420_uart1_hwmod,
144− .clk = "uart1_ick",
145− .addr = omap2xxx_uart1_addr_space,
146− .user = OCP_USER_MPU | OCP_USER_SDMA,
147−};
148−
149−/* L4 CORE -> UART2 interface */
150−static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
151− .master = &omap2420_l4_core_hwmod,
152− .slave = &omap2420_uart2_hwmod,
153− .clk = "uart2_ick",
154− .addr = omap2xxx_uart2_addr_space,
155− .user = OCP_USER_MPU | OCP_USER_SDMA,
156−};
157−
158−/* L4 PER -> UART3 interface */
159−static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
160− .master = &omap2420_l4_core_hwmod,
161− .slave = &omap2420_uart3_hwmod,
162− .clk = "uart3_ick",
163− .addr = omap2xxx_uart3_addr_space,
164− .user = OCP_USER_MPU | OCP_USER_SDMA,
165−};
166−
167−/* L4 CORE -> I2C1 interface */
168−static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
169− .master = &omap2420_l4_core_hwmod,
170− .slave = &omap2420_i2c1_hwmod,
171− .clk = "i2c1_ick",
172− .addr = omap2_i2c1_addr_space,
173− .user = OCP_USER_MPU | OCP_USER_SDMA,
174−};
175−
176−/* L4 CORE -> I2C2 interface */
177−static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
178− .master = &omap2420_l4_core_hwmod,
179− .slave = &omap2420_i2c2_hwmod,
180− .clk = "i2c2_ick",
181− .addr = omap2_i2c2_addr_space,
182− .user = OCP_USER_MPU | OCP_USER_SDMA,
183−};
184−
185−/* Slave interfaces on the L4_CORE interconnect */
186−static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
187− &omap2420_l3_main__l4_core,
188−};
189−
190−/* Master interfaces on the L4_CORE interconnect */
191−static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
192− &omap2420_l4_core__l4_wkup,
193− &omap2_l4_core__uart1,
194− &omap2_l4_core__uart2,
195− &omap2_l4_core__uart3,
196− &omap2420_l4_core__i2c1,
197− &omap2420_l4_core__i2c2
198−};
199−
200−/* L4 CORE */
201−static struct omap_hwmod omap2420_l4_core_hwmod = {
202− .name = "l4_core",
203− .class = &l4_hwmod_class,
204− .masters = omap2420_l4_core_masters,
205− .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
206− .slaves = omap2420_l4_core_slaves,
207− .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
208− .flags = HWMOD_NO_IDLEST,
209−};
210−
211−/* Slave interfaces on the L4_WKUP interconnect */
212−static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
213− &omap2420_l4_core__l4_wkup,
214−};
215−
216−/* Master interfaces on the L4_WKUP interconnect */
217−static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
218−};
219−
220−/* L4 WKUP */
221−static struct omap_hwmod omap2420_l4_wkup_hwmod = {
222− .name = "l4_wkup",
223− .class = &l4_hwmod_class,
224− .masters = omap2420_l4_wkup_masters,
225− .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
226− .slaves = omap2420_l4_wkup_slaves,
227− .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
228− .flags = HWMOD_NO_IDLEST,
229−};
230−
231−/* Master interfaces on the MPU device */
232−static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
233− &omap2420_mpu__l3_main,
234−};
235−
236−/* MPU */
237−static struct omap_hwmod omap2420_mpu_hwmod = {
238− .name = "mpu",
239− .class = &mpu_hwmod_class,
240− .main_clk = "mpu_ck",
241− .masters = omap2420_mpu_masters,
242− .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
243−};
244−
24542 /*
246− * IVA1 interface data
43+ * IP blocks
24744 */
24845
249−/* IVA <- L3 interface */
250−static struct omap_hwmod_ocp_if omap2420_l3__iva = {
251− .master = &omap2420_l3_main_hwmod,
252− .slave = &omap2420_iva_hwmod,
253− .clk = "iva1_ifck",
254− .user = OCP_USER_MPU | OCP_USER_SDMA,
46+/* IVA1 (IVA1) */
47+static struct omap_hwmod_class iva1_hwmod_class = {
48+ .name = "iva1",
25549 };
25650
257−static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
258− &omap2420_l3__iva,
51+static struct omap_hwmod_rst_info omap2420_iva_resets[] = {
52+ { .name = "iva", .rst_shift = 8 },
25953 };
26054
261−/*
262− * IVA2 (IVA2)
263− */
264−
26555 static struct omap_hwmod omap2420_iva_hwmod = {
26656 .name = "iva",
267− .class = &iva_hwmod_class,
268− .masters = omap2420_iva_masters,
269− .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
57+ .class = &iva1_hwmod_class,
58+ .clkdm_name = "iva1_clkdm",
59+ .rst_lines = omap2420_iva_resets,
60+ .rst_lines_cnt = ARRAY_SIZE(omap2420_iva_resets),
61+ .main_clk = "iva1_ifck",
27062 };
27163
272−/* always-on timers dev attribute */
273−static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
274− .timer_capability = OMAP_TIMER_ALWON,
64+/* DSP */
65+static struct omap_hwmod_class dsp_hwmod_class = {
66+ .name = "dsp",
27567 };
27668
277−/* pwm timers dev attribute */
278−static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
279− .timer_capability = OMAP_TIMER_HAS_PWM,
69+static struct omap_hwmod_rst_info omap2420_dsp_resets[] = {
70+ { .name = "logic", .rst_shift = 0 },
71+ { .name = "mmu", .rst_shift = 1 },
28072 };
28173
282−/* timer1 */
283−static struct omap_hwmod omap2420_timer1_hwmod;
284−
285−static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
286− {
287− .pa_start = 0x48028000,
288− .pa_end = 0x48028000 + SZ_1K - 1,
289− .flags = ADDR_TYPE_RT
290− },
291− { }
74+static struct omap_hwmod omap2420_dsp_hwmod = {
75+ .name = "dsp",
76+ .class = &dsp_hwmod_class,
77+ .clkdm_name = "dsp_clkdm",
78+ .rst_lines = omap2420_dsp_resets,
79+ .rst_lines_cnt = ARRAY_SIZE(omap2420_dsp_resets),
80+ .main_clk = "dsp_fck",
29281 };
29382
294−/* l4_wkup -> timer1 */
295−static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
296− .master = &omap2420_l4_wkup_hwmod,
297− .slave = &omap2420_timer1_hwmod,
298− .clk = "gpt1_ick",
299− .addr = omap2420_timer1_addrs,
300− .user = OCP_USER_MPU | OCP_USER_SDMA,
301−};
302−
303−/* timer1 slave port */
304−static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
305− &omap2420_l4_wkup__timer1,
306−};
307−
308−/* timer1 hwmod */
309−static struct omap_hwmod omap2420_timer1_hwmod = {
310− .name = "timer1",
311− .mpu_irqs = omap2_timer1_mpu_irqs,
312− .main_clk = "gpt1_fck",
313− .prcm = {
314− .omap2 = {
315− .prcm_reg_id = 1,
316− .module_bit = OMAP24XX_EN_GPT1_SHIFT,
317− .module_offs = WKUP_MOD,
318− .idlest_reg_id = 1,
319− .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
320− },
321− },
322− .dev_attr = &capability_alwon_dev_attr,
323− .slaves = omap2420_timer1_slaves,
324− .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
325− .class = &omap2xxx_timer_hwmod_class,
326−};
327−
328−/* timer2 */
329−static struct omap_hwmod omap2420_timer2_hwmod;
330−
331−/* l4_core -> timer2 */
332−static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
333− .master = &omap2420_l4_core_hwmod,
334− .slave = &omap2420_timer2_hwmod,
335− .clk = "gpt2_ick",
336− .addr = omap2xxx_timer2_addrs,
337− .user = OCP_USER_MPU | OCP_USER_SDMA,
338−};
339−
340−/* timer2 slave port */
341−static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
342− &omap2420_l4_core__timer2,
343−};
344−
345−/* timer2 hwmod */
346−static struct omap_hwmod omap2420_timer2_hwmod = {
347− .name = "timer2",
348− .mpu_irqs = omap2_timer2_mpu_irqs,
349− .main_clk = "gpt2_fck",
350− .prcm = {
351− .omap2 = {
352− .prcm_reg_id = 1,
353− .module_bit = OMAP24XX_EN_GPT2_SHIFT,
354− .module_offs = CORE_MOD,
355− .idlest_reg_id = 1,
356− .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
357− },
358− },
359− .dev_attr = &capability_alwon_dev_attr,
360− .slaves = omap2420_timer2_slaves,
361− .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
362− .class = &omap2xxx_timer_hwmod_class,
363−};
364−
365−/* timer3 */
366−static struct omap_hwmod omap2420_timer3_hwmod;
367−
368−/* l4_core -> timer3 */
369−static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
370− .master = &omap2420_l4_core_hwmod,
371− .slave = &omap2420_timer3_hwmod,
372− .clk = "gpt3_ick",
373− .addr = omap2xxx_timer3_addrs,
374− .user = OCP_USER_MPU | OCP_USER_SDMA,
375−};
376−
377−/* timer3 slave port */
378−static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
379− &omap2420_l4_core__timer3,
380−};
381−
382−/* timer3 hwmod */
383−static struct omap_hwmod omap2420_timer3_hwmod = {
384− .name = "timer3",
385− .mpu_irqs = omap2_timer3_mpu_irqs,
386− .main_clk = "gpt3_fck",
387− .prcm = {
388− .omap2 = {
389− .prcm_reg_id = 1,
390− .module_bit = OMAP24XX_EN_GPT3_SHIFT,
391− .module_offs = CORE_MOD,
392− .idlest_reg_id = 1,
393− .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
394− },
395− },
396− .dev_attr = &capability_alwon_dev_attr,
397− .slaves = omap2420_timer3_slaves,
398− .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves),
399− .class = &omap2xxx_timer_hwmod_class,
400−};
401−
402−/* timer4 */
403−static struct omap_hwmod omap2420_timer4_hwmod;
404−
405−/* l4_core -> timer4 */
406−static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
407− .master = &omap2420_l4_core_hwmod,
408− .slave = &omap2420_timer4_hwmod,
409− .clk = "gpt4_ick",
410− .addr = omap2xxx_timer4_addrs,
411− .user = OCP_USER_MPU | OCP_USER_SDMA,
412−};
413−
414−/* timer4 slave port */
415−static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
416− &omap2420_l4_core__timer4,
417−};
418−
419−/* timer4 hwmod */
420−static struct omap_hwmod omap2420_timer4_hwmod = {
421− .name = "timer4",
422− .mpu_irqs = omap2_timer4_mpu_irqs,
423− .main_clk = "gpt4_fck",
424− .prcm = {
425− .omap2 = {
426− .prcm_reg_id = 1,
427− .module_bit = OMAP24XX_EN_GPT4_SHIFT,
428− .module_offs = CORE_MOD,
429− .idlest_reg_id = 1,
430− .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
431− },
432− },
433− .dev_attr = &capability_alwon_dev_attr,
434− .slaves = omap2420_timer4_slaves,
435− .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
436− .class = &omap2xxx_timer_hwmod_class,
437−};
438−
439−/* timer5 */
440−static struct omap_hwmod omap2420_timer5_hwmod;
441−
442−/* l4_core -> timer5 */
443−static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
444− .master = &omap2420_l4_core_hwmod,
445− .slave = &omap2420_timer5_hwmod,
446− .clk = "gpt5_ick",
447− .addr = omap2xxx_timer5_addrs,
448− .user = OCP_USER_MPU | OCP_USER_SDMA,
449−};
450−
451−/* timer5 slave port */
452−static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
453− &omap2420_l4_core__timer5,
454−};
455−
456−/* timer5 hwmod */
457−static struct omap_hwmod omap2420_timer5_hwmod = {
458− .name = "timer5",
459− .mpu_irqs = omap2_timer5_mpu_irqs,
460− .main_clk = "gpt5_fck",
461− .prcm = {
462− .omap2 = {
463− .prcm_reg_id = 1,
464− .module_bit = OMAP24XX_EN_GPT5_SHIFT,
465− .module_offs = CORE_MOD,
466− .idlest_reg_id = 1,
467− .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
468− },
469− },
470− .dev_attr = &capability_alwon_dev_attr,
471− .slaves = omap2420_timer5_slaves,
472− .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves),
473− .class = &omap2xxx_timer_hwmod_class,
474−};
475−
476−
477−/* timer6 */
478−static struct omap_hwmod omap2420_timer6_hwmod;
479−
480−/* l4_core -> timer6 */
481−static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
482− .master = &omap2420_l4_core_hwmod,
483− .slave = &omap2420_timer6_hwmod,
484− .clk = "gpt6_ick",
485− .addr = omap2xxx_timer6_addrs,
486− .user = OCP_USER_MPU | OCP_USER_SDMA,
487−};
488−
489−/* timer6 slave port */
490−static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
491− &omap2420_l4_core__timer6,
492−};
493−
494−/* timer6 hwmod */
495−static struct omap_hwmod omap2420_timer6_hwmod = {
496− .name = "timer6",
497− .mpu_irqs = omap2_timer6_mpu_irqs,
498− .main_clk = "gpt6_fck",
499− .prcm = {
500− .omap2 = {
501− .prcm_reg_id = 1,
502− .module_bit = OMAP24XX_EN_GPT6_SHIFT,
503− .module_offs = CORE_MOD,
504− .idlest_reg_id = 1,
505− .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
506− },
507− },
508− .dev_attr = &capability_alwon_dev_attr,
509− .slaves = omap2420_timer6_slaves,
510− .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
511− .class = &omap2xxx_timer_hwmod_class,
83+/* I2C common */
84+static struct omap_hwmod_class_sysconfig i2c_sysc = {
85+ .rev_offs = 0x00,
86+ .sysc_offs = 0x20,
87+ .syss_offs = 0x10,
88+ .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
89+ .sysc_fields = &omap_hwmod_sysc_type1,
51290 };
51391
514−/* timer7 */
515−static struct omap_hwmod omap2420_timer7_hwmod;
516−
517−/* l4_core -> timer7 */
518−static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
519− .master = &omap2420_l4_core_hwmod,
520− .slave = &omap2420_timer7_hwmod,
521− .clk = "gpt7_ick",
522− .addr = omap2xxx_timer7_addrs,
523− .user = OCP_USER_MPU | OCP_USER_SDMA,
92+static struct omap_hwmod_class i2c_class = {
93+ .name = "i2c",
94+ .sysc = &i2c_sysc,
95+ .rev = OMAP_I2C_IP_VERSION_1,
96+ .reset = &omap_i2c_reset,
52497 };
52598
526−/* timer7 slave port */
527−static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
528− &omap2420_l4_core__timer7,
99+static struct omap_i2c_dev_attr i2c_dev_attr = {
100+ .flags = OMAP_I2C_FLAG_NO_FIFO |
101+ OMAP_I2C_FLAG_SIMPLE_CLOCK |
102+ OMAP_I2C_FLAG_16BIT_DATA_REG |
103+ OMAP_I2C_FLAG_BUS_SHIFT_2,
529104 };
530105
531−/* timer7 hwmod */
532−static struct omap_hwmod omap2420_timer7_hwmod = {
533− .name = "timer7",
534− .mpu_irqs = omap2_timer7_mpu_irqs,
535− .main_clk = "gpt7_fck",
106+/* I2C1 */
107+static struct omap_hwmod omap2420_i2c1_hwmod = {
108+ .name = "i2c1",
109+ .mpu_irqs = omap2_i2c1_mpu_irqs,
110+ .sdma_reqs = omap2_i2c1_sdma_reqs,
111+ .main_clk = "i2c1_fck",
536112 .prcm = {
537113 .omap2 = {
538− .prcm_reg_id = 1,
539− .module_bit = OMAP24XX_EN_GPT7_SHIFT,
540114 .module_offs = CORE_MOD,
541− .idlest_reg_id = 1,
542− .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
543− },
544− },
545− .dev_attr = &capability_alwon_dev_attr,
546− .slaves = omap2420_timer7_slaves,
547− .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
548− .class = &omap2xxx_timer_hwmod_class,
549−};
550−
551−/* timer8 */
552−static struct omap_hwmod omap2420_timer8_hwmod;
553−
554−/* l4_core -> timer8 */
555−static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
556− .master = &omap2420_l4_core_hwmod,
557− .slave = &omap2420_timer8_hwmod,
558− .clk = "gpt8_ick",
559− .addr = omap2xxx_timer8_addrs,
560− .user = OCP_USER_MPU | OCP_USER_SDMA,
561−};
562−
563−/* timer8 slave port */
564−static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
565− &omap2420_l4_core__timer8,
566−};
567−
568−/* timer8 hwmod */
569−static struct omap_hwmod omap2420_timer8_hwmod = {
570− .name = "timer8",
571− .mpu_irqs = omap2_timer8_mpu_irqs,
572− .main_clk = "gpt8_fck",
573− .prcm = {
574− .omap2 = {
575115 .prcm_reg_id = 1,
576− .module_bit = OMAP24XX_EN_GPT8_SHIFT,
577− .module_offs = CORE_MOD,
116+ .module_bit = OMAP2420_EN_I2C1_SHIFT,
578117 .idlest_reg_id = 1,
579− .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
118+ .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
580119 },
581120 },
582− .dev_attr = &capability_alwon_dev_attr,
583− .slaves = omap2420_timer8_slaves,
584− .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
585− .class = &omap2xxx_timer_hwmod_class,
586−};
587−
588−/* timer9 */
589−static struct omap_hwmod omap2420_timer9_hwmod;
590−
591−/* l4_core -> timer9 */
592−static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
593− .master = &omap2420_l4_core_hwmod,
594− .slave = &omap2420_timer9_hwmod,
595− .clk = "gpt9_ick",
596− .addr = omap2xxx_timer9_addrs,
597− .user = OCP_USER_MPU | OCP_USER_SDMA,
598−};
599−
600−/* timer9 slave port */
601−static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
602− &omap2420_l4_core__timer9,
121+ .class = &i2c_class,
122+ .dev_attr = &i2c_dev_attr,
123+ .flags = HWMOD_16BIT_REG,
603124 };
604125
605−/* timer9 hwmod */
606−static struct omap_hwmod omap2420_timer9_hwmod = {
607− .name = "timer9",
608− .mpu_irqs = omap2_timer9_mpu_irqs,
609− .main_clk = "gpt9_fck",
126+/* I2C2 */
127+static struct omap_hwmod omap2420_i2c2_hwmod = {
128+ .name = "i2c2",
129+ .mpu_irqs = omap2_i2c2_mpu_irqs,
130+ .sdma_reqs = omap2_i2c2_sdma_reqs,
131+ .main_clk = "i2c2_fck",
610132 .prcm = {
611133 .omap2 = {
612− .prcm_reg_id = 1,
613− .module_bit = OMAP24XX_EN_GPT9_SHIFT,
614134 .module_offs = CORE_MOD,
615− .idlest_reg_id = 1,
616− .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
617− },
618− },
619− .dev_attr = &capability_pwm_dev_attr,
620− .slaves = omap2420_timer9_slaves,
621− .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
622− .class = &omap2xxx_timer_hwmod_class,
623−};
624−
625−/* timer10 */
626−static struct omap_hwmod omap2420_timer10_hwmod;
627−
628−/* l4_core -> timer10 */
629−static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
630− .master = &omap2420_l4_core_hwmod,
631− .slave = &omap2420_timer10_hwmod,
632− .clk = "gpt10_ick",
633− .addr = omap2_timer10_addrs,
634− .user = OCP_USER_MPU | OCP_USER_SDMA,
635−};
636−
637−/* timer10 slave port */
638−static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
639− &omap2420_l4_core__timer10,
640−};
641−
642−/* timer10 hwmod */
643−static struct omap_hwmod omap2420_timer10_hwmod = {
644− .name = "timer10",
645− .mpu_irqs = omap2_timer10_mpu_irqs,
646− .main_clk = "gpt10_fck",
647− .prcm = {
648− .omap2 = {
649135 .prcm_reg_id = 1,
650− .module_bit = OMAP24XX_EN_GPT10_SHIFT,
651− .module_offs = CORE_MOD,
136+ .module_bit = OMAP2420_EN_I2C2_SHIFT,
652137 .idlest_reg_id = 1,
653− .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
138+ .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
654139 },
655140 },
656− .dev_attr = &capability_pwm_dev_attr,
657− .slaves = omap2420_timer10_slaves,
658− .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
659− .class = &omap2xxx_timer_hwmod_class,
660−};
661−
662−/* timer11 */
663−static struct omap_hwmod omap2420_timer11_hwmod;
664−
665−/* l4_core -> timer11 */
666−static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
667− .master = &omap2420_l4_core_hwmod,
668− .slave = &omap2420_timer11_hwmod,
669− .clk = "gpt11_ick",
670− .addr = omap2_timer11_addrs,
671− .user = OCP_USER_MPU | OCP_USER_SDMA,
672−};
673−
674−/* timer11 slave port */
675−static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
676− &omap2420_l4_core__timer11,
141+ .class = &i2c_class,
142+ .dev_attr = &i2c_dev_attr,
143+ .flags = HWMOD_16BIT_REG,
677144 };
678145
679−/* timer11 hwmod */
680−static struct omap_hwmod omap2420_timer11_hwmod = {
681− .name = "timer11",
682− .mpu_irqs = omap2_timer11_mpu_irqs,
683− .main_clk = "gpt11_fck",
684− .prcm = {
685− .omap2 = {
686− .prcm_reg_id = 1,
687− .module_bit = OMAP24XX_EN_GPT11_SHIFT,
688− .module_offs = CORE_MOD,
689− .idlest_reg_id = 1,
690− .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
691− },
692− },
693− .dev_attr = &capability_pwm_dev_attr,
694− .slaves = omap2420_timer11_slaves,
695− .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
696− .class = &omap2xxx_timer_hwmod_class,
146+/* dma attributes */
147+static struct omap_dma_dev_attr dma_dev_attr = {
148+ .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
149+ IS_CSSA_32 | IS_CDSA_32,
150+ .lch_count = 32,
697151 };
698152
699−/* timer12 */
700−static struct omap_hwmod omap2420_timer12_hwmod;
701−
702−/* l4_core -> timer12 */
703−static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
704− .master = &omap2420_l4_core_hwmod,
705− .slave = &omap2420_timer12_hwmod,
706− .clk = "gpt12_ick",
707− .addr = omap2xxx_timer12_addrs,
708− .user = OCP_USER_MPU | OCP_USER_SDMA,
153+static struct omap_hwmod omap2420_dma_system_hwmod = {
154+ .name = "dma",
155+ .class = &omap2xxx_dma_hwmod_class,
156+ .mpu_irqs = omap2_dma_system_irqs,
157+ .main_clk = "core_l3_ck",
158+ .dev_attr = &dma_dev_attr,
159+ .flags = HWMOD_NO_IDLEST,
709160 };
710161
711−/* timer12 slave port */
712−static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
713− &omap2420_l4_core__timer12,
162+/* mailbox */
163+static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
164+ { .name = "dsp", .irq = 26 },
165+ { .name = "iva", .irq = 34 },
166+ { .irq = -1 }
714167 };
715168
716−/* timer12 hwmod */
717−static struct omap_hwmod omap2420_timer12_hwmod = {
718− .name = "timer12",
719− .mpu_irqs = omap2xxx_timer12_mpu_irqs,
720− .main_clk = "gpt12_fck",
169+static struct omap_hwmod omap2420_mailbox_hwmod = {
170+ .name = "mailbox",
171+ .class = &omap2xxx_mailbox_hwmod_class,
172+ .mpu_irqs = omap2420_mailbox_irqs,
173+ .main_clk = "mailboxes_ick",
721174 .prcm = {
722175 .omap2 = {
723176 .prcm_reg_id = 1,
724− .module_bit = OMAP24XX_EN_GPT12_SHIFT,
177+ .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
725178 .module_offs = CORE_MOD,
726179 .idlest_reg_id = 1,
727− .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
180+ .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
728181 },
729182 },
730− .dev_attr = &capability_pwm_dev_attr,
731− .slaves = omap2420_timer12_slaves,
732− .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
733− .class = &omap2xxx_timer_hwmod_class,
734−};
735−
736−/* l4_wkup -> wd_timer2 */
737−static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
738− {
739− .pa_start = 0x48022000,
740− .pa_end = 0x4802207f,
741− .flags = ADDR_TYPE_RT
742− },
743− { }
744183 };
745184
746−static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
747− .master = &omap2420_l4_wkup_hwmod,
748− .slave = &omap2420_wd_timer2_hwmod,
749− .clk = "mpu_wdt_ick",
750− .addr = omap2420_wd_timer2_addrs,
751− .user = OCP_USER_MPU | OCP_USER_SDMA,
752−};
753−
754−/* wd_timer2 */
755−static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
756− &omap2420_l4_wkup__wd_timer2,
757−};
185+/*
186+ * 'mcbsp' class
187+ * multi channel buffered serial port controller
188+ */
758189
759−static struct omap_hwmod omap2420_wd_timer2_hwmod = {
760− .name = "wd_timer2",
761− .class = &omap2xxx_wd_timer_hwmod_class,
762− .main_clk = "mpu_wdt_fck",
763− .prcm = {
764− .omap2 = {
765− .prcm_reg_id = 1,
766− .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
767− .module_offs = WKUP_MOD,
768− .idlest_reg_id = 1,
769− .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
770− },
771− },
772− .slaves = omap2420_wd_timer2_slaves,
773− .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
190+static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
191+ .name = "mcbsp",
774192 };
775193
776−/* UART1 */
777−
778−static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
779− &omap2_l4_core__uart1,
194+/* mcbsp1 */
195+static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
196+ { .name = "tx", .irq = 59 },
197+ { .name = "rx", .irq = 60 },
198+ { .irq = -1 }
780199 };
781200
782−static struct omap_hwmod omap2420_uart1_hwmod = {
783− .name = "uart1",
784− .mpu_irqs = omap2_uart1_mpu_irqs,
785− .sdma_reqs = omap2_uart1_sdma_reqs,
786− .main_clk = "uart1_fck",
201+static struct omap_hwmod omap2420_mcbsp1_hwmod = {
202+ .name = "mcbsp1",
203+ .class = &omap2420_mcbsp_hwmod_class,
204+ .mpu_irqs = omap2420_mcbsp1_irqs,
205+ .sdma_reqs = omap2_mcbsp1_sdma_reqs,
206+ .main_clk = "mcbsp1_fck",
787207 .prcm = {
788208 .omap2 = {
789− .module_offs = CORE_MOD,
790209 .prcm_reg_id = 1,
791− .module_bit = OMAP24XX_EN_UART1_SHIFT,
792− .idlest_reg_id = 1,
793− .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
794− },
795− },
796− .slaves = omap2420_uart1_slaves,
797− .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
798− .class = &omap2_uart_class,
799−};
800−
801−/* UART2 */
802−
803−static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
804− &omap2_l4_core__uart2,
805−};
806−
807−static struct omap_hwmod omap2420_uart2_hwmod = {
808− .name = "uart2",
809− .mpu_irqs = omap2_uart2_mpu_irqs,
810− .sdma_reqs = omap2_uart2_sdma_reqs,
811− .main_clk = "uart2_fck",
812− .prcm = {
813− .omap2 = {
210+ .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
814211 .module_offs = CORE_MOD,
815− .prcm_reg_id = 1,
816− .module_bit = OMAP24XX_EN_UART2_SHIFT,
817212 .idlest_reg_id = 1,
818− .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
819− },
820− },
821− .slaves = omap2420_uart2_slaves,
822− .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
823− .class = &omap2_uart_class,
824−};
825−
826−/* UART3 */
827−
828−static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
829− &omap2_l4_core__uart3,
830−};
831−
832−static struct omap_hwmod omap2420_uart3_hwmod = {
833− .name = "uart3",
834− .mpu_irqs = omap2_uart3_mpu_irqs,
835− .sdma_reqs = omap2_uart3_sdma_reqs,
836− .main_clk = "uart3_fck",
837− .prcm = {
838− .omap2 = {
839− .module_offs = CORE_MOD,
840− .prcm_reg_id = 2,
841− .module_bit = OMAP24XX_EN_UART3_SHIFT,
842− .idlest_reg_id = 2,
843− .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
213+ .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
844214 },
845215 },
846− .slaves = omap2420_uart3_slaves,
847− .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
848− .class = &omap2_uart_class,
849−};
850−
851−/* dss */
852−/* dss master ports */
853−static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
854− &omap2420_dss__l3,
855216 };
856217
857−/* l4_core -> dss */
858−static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
859− .master = &omap2420_l4_core_hwmod,
860− .slave = &omap2420_dss_core_hwmod,
861− .clk = "dss_ick",
862− .addr = omap2_dss_addrs,
863− .fw = {
864− .omap2 = {
865− .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
866− .flags = OMAP_FIREWALL_L4,
867− }
868− },
869− .user = OCP_USER_MPU | OCP_USER_SDMA,
870−};
871−
872−/* dss slave ports */
873−static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
874− &omap2420_l4_core__dss,
875−};
876−
877−static struct omap_hwmod_opt_clk dss_opt_clks[] = {
878− /*
879− * The DSS HW needs all DSS clocks enabled during reset. The dss_core
880− * driver does not use these clocks.
881− */
882− { .role = "tv_clk", .clk = "dss_54m_fck" },
883− { .role = "sys_clk", .clk = "dss2_fck" },
218+/* mcbsp2 */
219+static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
220+ { .name = "tx", .irq = 62 },
221+ { .name = "rx", .irq = 63 },
222+ { .irq = -1 }
884223 };
885224
886−static struct omap_hwmod omap2420_dss_core_hwmod = {
887− .name = "dss_core",
888− .class = &omap2_dss_hwmod_class,
889− .main_clk = "dss1_fck", /* instead of dss_fck */
890− .sdma_reqs = omap2xxx_dss_sdma_chs,
225+static struct omap_hwmod omap2420_mcbsp2_hwmod = {
226+ .name = "mcbsp2",
227+ .class = &omap2420_mcbsp_hwmod_class,
228+ .mpu_irqs = omap2420_mcbsp2_irqs,
229+ .sdma_reqs = omap2_mcbsp2_sdma_reqs,
230+ .main_clk = "mcbsp2_fck",
891231 .prcm = {
892232 .omap2 = {
893233 .prcm_reg_id = 1,
894− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
234+ .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
895235 .module_offs = CORE_MOD,
896236 .idlest_reg_id = 1,
897− .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
237+ .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
898238 },
899239 },
900− .opt_clks = dss_opt_clks,
901− .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
902− .slaves = omap2420_dss_slaves,
903− .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
904− .masters = omap2420_dss_masters,
905− .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
906− .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
907240 };
908241
909−/* l4_core -> dss_dispc */
910−static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
911− .master = &omap2420_l4_core_hwmod,
912− .slave = &omap2420_dss_dispc_hwmod,
913− .clk = "dss_ick",
914− .addr = omap2_dss_dispc_addrs,
915− .fw = {
916− .omap2 = {
917− .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
918− .flags = OMAP_FIREWALL_L4,
919− }
920− },
921− .user = OCP_USER_MPU | OCP_USER_SDMA,
922−};
923−
924−/* dss_dispc slave ports */
925−static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
926− &omap2420_l4_core__dss_dispc,
927−};
928−
929−static struct omap_hwmod omap2420_dss_dispc_hwmod = {
930− .name = "dss_dispc",
931− .class = &omap2_dispc_hwmod_class,
932− .mpu_irqs = omap2_dispc_irqs,
933− .main_clk = "dss1_fck",
934− .prcm = {
935− .omap2 = {
936− .prcm_reg_id = 1,
937− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
938− .module_offs = CORE_MOD,
939− .idlest_reg_id = 1,
940− .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
941− },
942− },
943− .slaves = omap2420_dss_dispc_slaves,
944− .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
945− .flags = HWMOD_NO_IDLEST,
946− .dev_attr = &omap2_3_dss_dispc_dev_attr
947−};
242+/*
243+ * interfaces
244+ */
948245
949−/* l4_core -> dss_rfbi */
950−static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
951− .master = &omap2420_l4_core_hwmod,
952− .slave = &omap2420_dss_rfbi_hwmod,
953− .clk = "dss_ick",
954− .addr = omap2_dss_rfbi_addrs,
955− .fw = {
956− .omap2 = {
957− .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
958− .flags = OMAP_FIREWALL_L4,
959− }
960− },
246+/* L4 CORE -> I2C1 interface */
247+static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
248+ .master = &omap2xxx_l4_core_hwmod,
249+ .slave = &omap2420_i2c1_hwmod,
250+ .clk = "i2c1_ick",
251+ .addr = omap2_i2c1_addr_space,
961252 .user = OCP_USER_MPU | OCP_USER_SDMA,
962253 };
963254
964−/* dss_rfbi slave ports */
965−static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
966− &omap2420_l4_core__dss_rfbi,
967−};
968−
969−static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
970− { .role = "ick", .clk = "dss_ick" },
971−};
972−
973−static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
974− .name = "dss_rfbi",
975− .class = &omap2_rfbi_hwmod_class,
976− .main_clk = "dss1_fck",
977− .prcm = {
978− .omap2 = {
979− .prcm_reg_id = 1,
980− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
981− .module_offs = CORE_MOD,
982− },
983− },
984− .opt_clks = dss_rfbi_opt_clks,
985− .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
986− .slaves = omap2420_dss_rfbi_slaves,
987− .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
988− .flags = HWMOD_NO_IDLEST,
989−};
990−
991−/* l4_core -> dss_venc */
992−static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
993− .master = &omap2420_l4_core_hwmod,
994− .slave = &omap2420_dss_venc_hwmod,
995− .clk = "dss_ick",
996− .addr = omap2_dss_venc_addrs,
997− .fw = {
998− .omap2 = {
999− .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
1000− .flags = OMAP_FIREWALL_L4,
1001− }
1002− },
255+/* L4 CORE -> I2C2 interface */
256+static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
257+ .master = &omap2xxx_l4_core_hwmod,
258+ .slave = &omap2420_i2c2_hwmod,
259+ .clk = "i2c2_ick",
260+ .addr = omap2_i2c2_addr_space,
1003261 .user = OCP_USER_MPU | OCP_USER_SDMA,
1004262 };
1005263
1006−/* dss_venc slave ports */
1007−static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1008− &omap2420_l4_core__dss_venc,
1009−};
1010−
1011−static struct omap_hwmod omap2420_dss_venc_hwmod = {
1012− .name = "dss_venc",
1013− .class = &omap2_venc_hwmod_class,
1014− .main_clk = "dss_54m_fck",
1015− .prcm = {
1016− .omap2 = {
1017− .prcm_reg_id = 1,
1018− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1019− .module_offs = CORE_MOD,
1020− },
1021− },
1022− .slaves = omap2420_dss_venc_slaves,
1023− .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
1024− .flags = HWMOD_NO_IDLEST,
1025−};
1026−
1027−/* I2C common */
1028−static struct omap_hwmod_class_sysconfig i2c_sysc = {
1029− .rev_offs = 0x00,
1030− .sysc_offs = 0x20,
1031− .syss_offs = 0x10,
1032− .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1033− .sysc_fields = &omap_hwmod_sysc_type1,
1034−};
1035−
1036−static struct omap_hwmod_class i2c_class = {
1037− .name = "i2c",
1038− .sysc = &i2c_sysc,
1039− .rev = OMAP_I2C_IP_VERSION_1,
1040− .reset = &omap_i2c_reset,
1041−};
1042−
1043−static struct omap_i2c_dev_attr i2c_dev_attr = {
1044− .flags = OMAP_I2C_FLAG_NO_FIFO |
1045− OMAP_I2C_FLAG_SIMPLE_CLOCK |
1046− OMAP_I2C_FLAG_16BIT_DATA_REG |
1047− OMAP_I2C_FLAG_BUS_SHIFT_2,
1048−};
1049−
1050−/* I2C1 */
1051−
1052−static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1053− &omap2420_l4_core__i2c1,
1054−};
1055−
1056−static struct omap_hwmod omap2420_i2c1_hwmod = {
1057− .name = "i2c1",
1058− .mpu_irqs = omap2_i2c1_mpu_irqs,
1059− .sdma_reqs = omap2_i2c1_sdma_reqs,
1060− .main_clk = "i2c1_fck",
1061− .prcm = {
1062− .omap2 = {
1063− .module_offs = CORE_MOD,
1064− .prcm_reg_id = 1,
1065− .module_bit = OMAP2420_EN_I2C1_SHIFT,
1066− .idlest_reg_id = 1,
1067− .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
1068− },
1069− },
1070− .slaves = omap2420_i2c1_slaves,
1071− .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
1072− .class = &i2c_class,
1073− .dev_attr = &i2c_dev_attr,
1074− .flags = HWMOD_16BIT_REG,
264+/* IVA <- L3 interface */
265+static struct omap_hwmod_ocp_if omap2420_l3__iva = {
266+ .master = &omap2xxx_l3_main_hwmod,
267+ .slave = &omap2420_iva_hwmod,
268+ .clk = "core_l3_ck",
269+ .user = OCP_USER_MPU | OCP_USER_SDMA,
1075270 };
1076271
1077−/* I2C2 */
272+/* DSP <- L3 interface */
273+static struct omap_hwmod_ocp_if omap2420_l3__dsp = {
274+ .master = &omap2xxx_l3_main_hwmod,
275+ .slave = &omap2420_dsp_hwmod,
276+ .clk = "dsp_ick",
277+ .user = OCP_USER_MPU | OCP_USER_SDMA,
278+};
1078279
1079−static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1080− &omap2420_l4_core__i2c2,
280+static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
281+ {
282+ .pa_start = 0x48028000,
283+ .pa_end = 0x48028000 + SZ_1K - 1,
284+ .flags = ADDR_TYPE_RT
285+ },
286+ { }
1081287 };
1082288
1083−static struct omap_hwmod omap2420_i2c2_hwmod = {
1084− .name = "i2c2",
1085− .mpu_irqs = omap2_i2c2_mpu_irqs,
1086− .sdma_reqs = omap2_i2c2_sdma_reqs,
1087− .main_clk = "i2c2_fck",
1088− .prcm = {
1089− .omap2 = {
1090− .module_offs = CORE_MOD,
1091− .prcm_reg_id = 1,
1092− .module_bit = OMAP2420_EN_I2C2_SHIFT,
1093− .idlest_reg_id = 1,
1094− .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
1095− },
289+/* l4_wkup -> timer1 */
290+static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
291+ .master = &omap2xxx_l4_wkup_hwmod,
292+ .slave = &omap2xxx_timer1_hwmod,
293+ .clk = "gpt1_ick",
294+ .addr = omap2420_timer1_addrs,
295+ .user = OCP_USER_MPU | OCP_USER_SDMA,
296+};
297+
298+/* l4_wkup -> wd_timer2 */
299+static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
300+ {
301+ .pa_start = 0x48022000,
302+ .pa_end = 0x4802207f,
303+ .flags = ADDR_TYPE_RT
1096304 },
1097− .slaves = omap2420_i2c2_slaves,
1098− .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
1099− .class = &i2c_class,
1100− .dev_attr = &i2c_dev_attr,
1101− .flags = HWMOD_16BIT_REG,
305+ { }
306+};
307+
308+static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
309+ .master = &omap2xxx_l4_wkup_hwmod,
310+ .slave = &omap2xxx_wd_timer2_hwmod,
311+ .clk = "mpu_wdt_ick",
312+ .addr = omap2420_wd_timer2_addrs,
313+ .user = OCP_USER_MPU | OCP_USER_SDMA,
1102314 };
1103315
1104316 /* l4_wkup -> gpio1 */
@@ -1112,8 +324,8 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { · 7 unmodified lines
1112324 };
1113325
1114326 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1115− .master = &omap2420_l4_wkup_hwmod,
1116− .slave = &omap2420_gpio1_hwmod,
327+ .master = &omap2xxx_l4_wkup_hwmod,
328+ .slave = &omap2xxx_gpio1_hwmod,
1117329 .clk = "gpios_ick",
1118330 .addr = omap2420_gpio1_addr_space,
1119331 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1130,8 +342,8 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = { · 10 unmodified lines
1130342 };
1131343
1132344 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1133− .master = &omap2420_l4_wkup_hwmod,
1134− .slave = &omap2420_gpio2_hwmod,
345+ .master = &omap2xxx_l4_wkup_hwmod,
346+ .slave = &omap2xxx_gpio2_hwmod,
1135347 .clk = "gpios_ick",
1136348 .addr = omap2420_gpio2_addr_space,
1137349 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1148,8 +360,8 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = { · 10 unmodified lines
1148360 };
1149361
1150362 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1151− .master = &omap2420_l4_wkup_hwmod,
1152− .slave = &omap2420_gpio3_hwmod,
363+ .master = &omap2xxx_l4_wkup_hwmod,
364+ .slave = &omap2xxx_gpio3_hwmod,
1153365 .clk = "gpios_ick",
1154366 .addr = omap2420_gpio3_addr_space,
1155367 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1166,408 +378,100 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = { · 10 unmodified lines
1166378 };
1167379
1168380 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1169− .master = &omap2420_l4_wkup_hwmod,
1170− .slave = &omap2420_gpio4_hwmod,
381+ .master = &omap2xxx_l4_wkup_hwmod,
382+ .slave = &omap2xxx_gpio4_hwmod,
1171383 .clk = "gpios_ick",
1172384 .addr = omap2420_gpio4_addr_space,
1173385 .user = OCP_USER_MPU | OCP_USER_SDMA,
1174386 };
1175387
1176−/* gpio dev_attr */
1177−static struct omap_gpio_dev_attr gpio_dev_attr = {
1178− .bank_width = 32,
1179− .dbck_flag = false,
1180−};
1181−
1182−/* gpio1 */
1183−static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1184− &omap2420_l4_wkup__gpio1,
1185−};
1186−
1187−static struct omap_hwmod omap2420_gpio1_hwmod = {
1188− .name = "gpio1",
1189− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1190− .mpu_irqs = omap2_gpio1_irqs,
1191− .main_clk = "gpios_fck",
1192− .prcm = {
1193− .omap2 = {
1194− .prcm_reg_id = 1,
1195− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1196− .module_offs = WKUP_MOD,
1197− .idlest_reg_id = 1,
1198− .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1199− },
1200− },
1201− .slaves = omap2420_gpio1_slaves,
1202− .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
1203− .class = &omap2xxx_gpio_hwmod_class,
1204− .dev_attr = &gpio_dev_attr,
1205−};
1206−
1207−/* gpio2 */
1208−static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1209− &omap2420_l4_wkup__gpio2,
1210−};
1211−
1212−static struct omap_hwmod omap2420_gpio2_hwmod = {
1213− .name = "gpio2",
1214− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1215− .mpu_irqs = omap2_gpio2_irqs,
1216− .main_clk = "gpios_fck",
1217− .prcm = {
1218− .omap2 = {
1219− .prcm_reg_id = 1,
1220− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1221− .module_offs = WKUP_MOD,
1222− .idlest_reg_id = 1,
1223− .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1224− },
1225− },
1226− .slaves = omap2420_gpio2_slaves,
1227− .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
1228− .class = &omap2xxx_gpio_hwmod_class,
1229− .dev_attr = &gpio_dev_attr,
1230−};
1231−
1232−/* gpio3 */
1233−static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1234− &omap2420_l4_wkup__gpio3,
1235−};
1236−
1237−static struct omap_hwmod omap2420_gpio3_hwmod = {
1238− .name = "gpio3",
1239− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1240− .mpu_irqs = omap2_gpio3_irqs,
1241− .main_clk = "gpios_fck",
1242− .prcm = {
1243− .omap2 = {
1244− .prcm_reg_id = 1,
1245− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1246− .module_offs = WKUP_MOD,
1247− .idlest_reg_id = 1,
1248− .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1249− },
1250− },
1251− .slaves = omap2420_gpio3_slaves,
1252− .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
1253− .class = &omap2xxx_gpio_hwmod_class,
1254− .dev_attr = &gpio_dev_attr,
1255−};
1256−
1257−/* gpio4 */
1258−static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1259− &omap2420_l4_wkup__gpio4,
1260−};
1261−
1262−static struct omap_hwmod omap2420_gpio4_hwmod = {
1263− .name = "gpio4",
1264− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1265− .mpu_irqs = omap2_gpio4_irqs,
1266− .main_clk = "gpios_fck",
1267− .prcm = {
1268− .omap2 = {
1269− .prcm_reg_id = 1,
1270− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1271− .module_offs = WKUP_MOD,
1272− .idlest_reg_id = 1,
1273− .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1274− },
1275− },
1276− .slaves = omap2420_gpio4_slaves,
1277− .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
1278− .class = &omap2xxx_gpio_hwmod_class,
1279− .dev_attr = &gpio_dev_attr,
1280−};
1281−
1282−/* dma attributes */
1283−static struct omap_dma_dev_attr dma_dev_attr = {
1284− .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1285− IS_CSSA_32 | IS_CDSA_32,
1286− .lch_count = 32,
1287−};
1288−
1289388 /* dma_system -> L3 */
1290389 static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1291390 .master = &omap2420_dma_system_hwmod,
1292− .slave = &omap2420_l3_main_hwmod,
391+ .slave = &omap2xxx_l3_main_hwmod,
1293392 .clk = "core_l3_ck",
1294393 .user = OCP_USER_MPU | OCP_USER_SDMA,
1295394 };
1296395
1297−/* dma_system master ports */
1298−static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1299− &omap2420_dma_system__l3,
1300−};
1301−
1302396 /* l4_core -> dma_system */
1303397 static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1304− .master = &omap2420_l4_core_hwmod,
398+ .master = &omap2xxx_l4_core_hwmod,
1305399 .slave = &omap2420_dma_system_hwmod,
1306400 .clk = "sdma_ick",
1307401 .addr = omap2_dma_system_addrs,
1308402 .user = OCP_USER_MPU | OCP_USER_SDMA,
1309403 };
1310404
1311−/* dma_system slave ports */
1312−static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1313− &omap2420_l4_core__dma_system,
1314−};
1315−
1316−static struct omap_hwmod omap2420_dma_system_hwmod = {
1317− .name = "dma",
1318− .class = &omap2xxx_dma_hwmod_class,
1319− .mpu_irqs = omap2_dma_system_irqs,
1320− .main_clk = "core_l3_ck",
1321− .slaves = omap2420_dma_system_slaves,
1322− .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
1323− .masters = omap2420_dma_system_masters,
1324− .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
1325− .dev_attr = &dma_dev_attr,
1326− .flags = HWMOD_NO_IDLEST,
1327−};
1328−
1329−/* mailbox */
1330−static struct omap_hwmod omap2420_mailbox_hwmod;
1331−static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1332− { .name = "dsp", .irq = 26 },
1333− { .name = "iva", .irq = 34 },
1334− { .irq = -1 }
1335−};
1336−
1337405 /* l4_core -> mailbox */
1338406 static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1339− .master = &omap2420_l4_core_hwmod,
407+ .master = &omap2xxx_l4_core_hwmod,
1340408 .slave = &omap2420_mailbox_hwmod,
1341409 .addr = omap2_mailbox_addrs,
1342410 .user = OCP_USER_MPU | OCP_USER_SDMA,
1343411 };
1344412
1345−/* mailbox slave ports */
1346−static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1347− &omap2420_l4_core__mailbox,
1348−};
1349−
1350−static struct omap_hwmod omap2420_mailbox_hwmod = {
1351− .name = "mailbox",
1352− .class = &omap2xxx_mailbox_hwmod_class,
1353− .mpu_irqs = omap2420_mailbox_irqs,
1354− .main_clk = "mailboxes_ick",
1355− .prcm = {
1356− .omap2 = {
1357− .prcm_reg_id = 1,
1358− .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1359− .module_offs = CORE_MOD,
1360− .idlest_reg_id = 1,
1361− .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1362− },
1363− },
1364− .slaves = omap2420_mailbox_slaves,
1365− .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
1366−};
1367−
1368−/* mcspi1 */
1369−static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1370− &omap2420_l4_core__mcspi1,
1371−};
1372−
1373−static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1374− .num_chipselect = 4,
1375−};
1376−
1377−static struct omap_hwmod omap2420_mcspi1_hwmod = {
1378− .name = "mcspi1_hwmod",
1379− .mpu_irqs = omap2_mcspi1_mpu_irqs,
1380− .sdma_reqs = omap2_mcspi1_sdma_reqs,
1381− .main_clk = "mcspi1_fck",
1382− .prcm = {
1383− .omap2 = {
1384− .module_offs = CORE_MOD,
1385− .prcm_reg_id = 1,
1386− .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1387− .idlest_reg_id = 1,
1388− .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1389− },
1390− },
1391− .slaves = omap2420_mcspi1_slaves,
1392− .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
1393− .class = &omap2xxx_mcspi_class,
1394− .dev_attr = &omap_mcspi1_dev_attr,
1395−};
1396−
1397−/* mcspi2 */
1398−static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1399− &omap2420_l4_core__mcspi2,
1400−};
1401−
1402−static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1403− .num_chipselect = 2,
1404−};
1405−
1406−static struct omap_hwmod omap2420_mcspi2_hwmod = {
1407− .name = "mcspi2_hwmod",
1408− .mpu_irqs = omap2_mcspi2_mpu_irqs,
1409− .sdma_reqs = omap2_mcspi2_sdma_reqs,
1410− .main_clk = "mcspi2_fck",
1411− .prcm = {
1412− .omap2 = {
1413− .module_offs = CORE_MOD,
1414− .prcm_reg_id = 1,
1415− .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1416− .idlest_reg_id = 1,
1417− .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1418− },
1419− },
1420− .slaves = omap2420_mcspi2_slaves,
1421− .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
1422− .class = &omap2xxx_mcspi_class,
1423− .dev_attr = &omap_mcspi2_dev_attr,
1424−};
1425−
1426−/*
1427− * 'mcbsp' class
1428− * multi channel buffered serial port controller
1429− */
1430−
1431−static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1432− .name = "mcbsp",
1433−};
1434−
1435−/* mcbsp1 */
1436−static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1437− { .name = "tx", .irq = 59 },
1438− { .name = "rx", .irq = 60 },
1439− { .irq = -1 }
1440−};
1441−
1442413 /* l4_core -> mcbsp1 */
1443414 static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1444− .master = &omap2420_l4_core_hwmod,
415+ .master = &omap2xxx_l4_core_hwmod,
1445416 .slave = &omap2420_mcbsp1_hwmod,
1446417 .clk = "mcbsp1_ick",
1447418 .addr = omap2_mcbsp1_addrs,
1448419 .user = OCP_USER_MPU | OCP_USER_SDMA,
1449420 };
1450421
1451−/* mcbsp1 slave ports */
1452−static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1453− &omap2420_l4_core__mcbsp1,
1454−};
1455−
1456−static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1457− .name = "mcbsp1",
1458− .class = &omap2420_mcbsp_hwmod_class,
1459− .mpu_irqs = omap2420_mcbsp1_irqs,
1460− .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1461− .main_clk = "mcbsp1_fck",
1462− .prcm = {
1463− .omap2 = {
1464− .prcm_reg_id = 1,
1465− .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1466− .module_offs = CORE_MOD,
1467− .idlest_reg_id = 1,
1468− .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1469− },
1470− },
1471− .slaves = omap2420_mcbsp1_slaves,
1472− .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
1473−};
1474−
1475−/* mcbsp2 */
1476−static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1477− { .name = "tx", .irq = 62 },
1478− { .name = "rx", .irq = 63 },
1479− { .irq = -1 }
1480−};
1481−
1482422 /* l4_core -> mcbsp2 */
1483423 static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1484− .master = &omap2420_l4_core_hwmod,
424+ .master = &omap2xxx_l4_core_hwmod,
1485425 .slave = &omap2420_mcbsp2_hwmod,
1486426 .clk = "mcbsp2_ick",
1487427 .addr = omap2xxx_mcbsp2_addrs,
1488428 .user = OCP_USER_MPU | OCP_USER_SDMA,
1489429 };
1490430
1491−/* mcbsp2 slave ports */
1492−static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
431+static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
432+ &omap2xxx_l3_main__l4_core,
433+ &omap2xxx_mpu__l3_main,
434+ &omap2xxx_dss__l3,
435+ &omap2xxx_l4_core__mcspi1,
436+ &omap2xxx_l4_core__mcspi2,
437+ &omap2xxx_l4_core__l4_wkup,
438+ &omap2_l4_core__uart1,
439+ &omap2_l4_core__uart2,
440+ &omap2_l4_core__uart3,
441+ &omap2420_l4_core__i2c1,
442+ &omap2420_l4_core__i2c2,
443+ &omap2420_l3__iva,
444+ &omap2420_l3__dsp,
445+ &omap2420_l4_wkup__timer1,
446+ &omap2xxx_l4_core__timer2,
447+ &omap2xxx_l4_core__timer3,
448+ &omap2xxx_l4_core__timer4,
449+ &omap2xxx_l4_core__timer5,
450+ &omap2xxx_l4_core__timer6,
451+ &omap2xxx_l4_core__timer7,
452+ &omap2xxx_l4_core__timer8,
453+ &omap2xxx_l4_core__timer9,
454+ &omap2xxx_l4_core__timer10,
455+ &omap2xxx_l4_core__timer11,
456+ &omap2xxx_l4_core__timer12,
457+ &omap2420_l4_wkup__wd_timer2,
458+ &omap2xxx_l4_core__dss,
459+ &omap2xxx_l4_core__dss_dispc,
460+ &omap2xxx_l4_core__dss_rfbi,
461+ &omap2xxx_l4_core__dss_venc,
462+ &omap2420_l4_wkup__gpio1,
463+ &omap2420_l4_wkup__gpio2,
464+ &omap2420_l4_wkup__gpio3,
465+ &omap2420_l4_wkup__gpio4,
466+ &omap2420_dma_system__l3,
467+ &omap2420_l4_core__dma_system,
468+ &omap2420_l4_core__mailbox,
469+ &omap2420_l4_core__mcbsp1,
1493470 &omap2420_l4_core__mcbsp2,
1494−};
1495−
1496−static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1497− .name = "mcbsp2",
1498− .class = &omap2420_mcbsp_hwmod_class,
1499− .mpu_irqs = omap2420_mcbsp2_irqs,
1500− .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1501− .main_clk = "mcbsp2_fck",
1502− .prcm = {
1503− .omap2 = {
1504− .prcm_reg_id = 1,
1505− .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1506− .module_offs = CORE_MOD,
1507− .idlest_reg_id = 1,
1508− .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1509− },
1510− },
1511− .slaves = omap2420_mcbsp2_slaves,
1512− .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
1513−};
1514−
1515−static __initdata struct omap_hwmod *omap2420_hwmods[] = {
1516− &omap2420_l3_main_hwmod,
1517− &omap2420_l4_core_hwmod,
1518− &omap2420_l4_wkup_hwmod,
1519− &omap2420_mpu_hwmod,
1520− &omap2420_iva_hwmod,
1521−
1522− &omap2420_timer1_hwmod,
1523− &omap2420_timer2_hwmod,
1524− &omap2420_timer3_hwmod,
1525− &omap2420_timer4_hwmod,
1526− &omap2420_timer5_hwmod,
1527− &omap2420_timer6_hwmod,
1528− &omap2420_timer7_hwmod,
1529− &omap2420_timer8_hwmod,
1530− &omap2420_timer9_hwmod,
1531− &omap2420_timer10_hwmod,
1532− &omap2420_timer11_hwmod,
1533− &omap2420_timer12_hwmod,
1534−
1535− &omap2420_wd_timer2_hwmod,
1536− &omap2420_uart1_hwmod,
1537− &omap2420_uart2_hwmod,
1538− &omap2420_uart3_hwmod,
1539− /* dss class */
1540− &omap2420_dss_core_hwmod,
1541− &omap2420_dss_dispc_hwmod,
1542− &omap2420_dss_rfbi_hwmod,
1543− &omap2420_dss_venc_hwmod,
1544− /* i2c class */
1545− &omap2420_i2c1_hwmod,
1546− &omap2420_i2c2_hwmod,
1547−
1548− /* gpio class */
1549− &omap2420_gpio1_hwmod,
1550− &omap2420_gpio2_hwmod,
1551− &omap2420_gpio3_hwmod,
1552− &omap2420_gpio4_hwmod,
1553−
1554− /* dma_system class*/
1555− &omap2420_dma_system_hwmod,
1556−
1557− /* mailbox class */
1558− &omap2420_mailbox_hwmod,
1559−
1560− /* mcbsp class */
1561− &omap2420_mcbsp1_hwmod,
1562− &omap2420_mcbsp2_hwmod,
1563−
1564− /* mcspi class */
1565− &omap2420_mcspi1_hwmod,
1566− &omap2420_mcspi2_hwmod,
1567471 NULL,
1568472 };
1569473
1570474 int __init omap2420_hwmod_init(void)
1571475 {
1572− return omap_hwmod_register(omap2420_hwmods);
476+ return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs);
1573477 }
arch/arm/mach-omap2/omap_hwmod_2430_data.c+569−1746
@@ -2,6 +2,7 @@ · 1 unmodified line
22 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
33 *
44 * Copyright (C) 2009-2011 Nokia Corporation
5+ * Copyright (C) 2012 Texas Instruments, Inc.
56 * Paul Walmsley
67 *
78 * This program is free software; you can redistribute it and/or modify
@@ -33,777 +34,600 @@ · 25 unmodified lines
3334 /*
3435 * OMAP2430 hardware module integration data
3536 *
36− * ALl of the data in this section should be autogeneratable from the
37+ * All of the data in this section should be autogeneratable from the
3738 * TI hardware database or other technical documentation. Data that
3839 * is driver-specific or driver-kernel integration-specific belongs
3940 * elsewhere.
4041 */
4142
42−static struct omap_hwmod omap2430_mpu_hwmod;
43−static struct omap_hwmod omap2430_iva_hwmod;
44−static struct omap_hwmod omap2430_l3_main_hwmod;
45−static struct omap_hwmod omap2430_l4_core_hwmod;
46−static struct omap_hwmod omap2430_dss_core_hwmod;
47−static struct omap_hwmod omap2430_dss_dispc_hwmod;
48−static struct omap_hwmod omap2430_dss_rfbi_hwmod;
49−static struct omap_hwmod omap2430_dss_venc_hwmod;
50−static struct omap_hwmod omap2430_wd_timer2_hwmod;
51−static struct omap_hwmod omap2430_gpio1_hwmod;
52−static struct omap_hwmod omap2430_gpio2_hwmod;
53−static struct omap_hwmod omap2430_gpio3_hwmod;
54−static struct omap_hwmod omap2430_gpio4_hwmod;
55−static struct omap_hwmod omap2430_gpio5_hwmod;
56−static struct omap_hwmod omap2430_dma_system_hwmod;
57−static struct omap_hwmod omap2430_mcbsp1_hwmod;
58−static struct omap_hwmod omap2430_mcbsp2_hwmod;
59−static struct omap_hwmod omap2430_mcbsp3_hwmod;
60−static struct omap_hwmod omap2430_mcbsp4_hwmod;
61−static struct omap_hwmod omap2430_mcbsp5_hwmod;
62−static struct omap_hwmod omap2430_mcspi1_hwmod;
63−static struct omap_hwmod omap2430_mcspi2_hwmod;
64−static struct omap_hwmod omap2430_mcspi3_hwmod;
65−static struct omap_hwmod omap2430_mmc1_hwmod;
66−static struct omap_hwmod omap2430_mmc2_hwmod;
67−
68−/* L3 -> L4_CORE interface */
69−static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
70− .master = &omap2430_l3_main_hwmod,
71− .slave = &omap2430_l4_core_hwmod,
72− .user = OCP_USER_MPU | OCP_USER_SDMA,
73−};
43+/*
44+ * IP blocks
45+ */
7446
75−/* MPU -> L3 interface */
76−static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
77− .master = &omap2430_mpu_hwmod,
78− .slave = &omap2430_l3_main_hwmod,
79− .user = OCP_USER_MPU,
47+/* IVA2 (IVA2) */
48+static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
49+ { .name = "logic", .rst_shift = 0 },
50+ { .name = "mmu", .rst_shift = 1 },
8051 };
8152
82−/* Slave interfaces on the L3 interconnect */
83−static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
84− &omap2430_mpu__l3_main,
53+static struct omap_hwmod omap2430_iva_hwmod = {
54+ .name = "iva",
55+ .class = &iva_hwmod_class,
56+ .clkdm_name = "dsp_clkdm",
57+ .rst_lines = omap2430_iva_resets,
58+ .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
59+ .main_clk = "dsp_fck",
8560 };
8661
87−/* DSS -> l3 */
88−static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
89− .master = &omap2430_dss_core_hwmod,
90− .slave = &omap2430_l3_main_hwmod,
91− .fw = {
92− .omap2 = {
93− .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
94− .flags = OMAP_FIREWALL_L3,
95− }
96− },
97− .user = OCP_USER_MPU | OCP_USER_SDMA,
62+/* I2C common */
63+static struct omap_hwmod_class_sysconfig i2c_sysc = {
64+ .rev_offs = 0x00,
65+ .sysc_offs = 0x20,
66+ .syss_offs = 0x10,
67+ .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
68+ SYSS_HAS_RESET_STATUS),
69+ .sysc_fields = &omap_hwmod_sysc_type1,
9870 };
9971
100−/* Master interfaces on the L3 interconnect */
101−static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
102− &omap2430_l3_main__l4_core,
72+static struct omap_hwmod_class i2c_class = {
73+ .name = "i2c",
74+ .sysc = &i2c_sysc,
75+ .rev = OMAP_I2C_IP_VERSION_1,
76+ .reset = &omap_i2c_reset,
10377 };
10478
105−/* L3 */
106−static struct omap_hwmod omap2430_l3_main_hwmod = {
107− .name = "l3_main",
108− .class = &l3_hwmod_class,
109− .masters = omap2430_l3_main_masters,
110− .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
111− .slaves = omap2430_l3_main_slaves,
112− .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
113− .flags = HWMOD_NO_IDLEST,
79+static struct omap_i2c_dev_attr i2c_dev_attr = {
80+ .fifo_depth = 8, /* bytes */
81+ .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
82+ OMAP_I2C_FLAG_BUS_SHIFT_2 |
83+ OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
11484 };
11585
116−static struct omap_hwmod omap2430_l4_wkup_hwmod;
117−static struct omap_hwmod omap2430_uart1_hwmod;
118−static struct omap_hwmod omap2430_uart2_hwmod;
119−static struct omap_hwmod omap2430_uart3_hwmod;
120−static struct omap_hwmod omap2430_i2c1_hwmod;
121−static struct omap_hwmod omap2430_i2c2_hwmod;
122−
123−static struct omap_hwmod omap2430_usbhsotg_hwmod;
124−
125−/* l3_core -> usbhsotg interface */
126−static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
127− .master = &omap2430_usbhsotg_hwmod,
128− .slave = &omap2430_l3_main_hwmod,
129− .clk = "core_l3_ck",
130− .user = OCP_USER_MPU,
86+/* I2C1 */
87+static struct omap_hwmod omap2430_i2c1_hwmod = {
88+ .name = "i2c1",
89+ .flags = HWMOD_16BIT_REG,
90+ .mpu_irqs = omap2_i2c1_mpu_irqs,
91+ .sdma_reqs = omap2_i2c1_sdma_reqs,
92+ .main_clk = "i2chs1_fck",
93+ .prcm = {
94+ .omap2 = {
95+ /*
96+ * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
97+ * I2CHS IP's do not follow the usual pattern.
98+ * prcm_reg_id alone cannot be used to program
99+ * the iclk and fclk. Needs to be handled using
100+ * additional flags when clk handling is moved
101+ * to hwmod framework.
102+ */
103+ .module_offs = CORE_MOD,
104+ .prcm_reg_id = 1,
105+ .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
106+ .idlest_reg_id = 1,
107+ .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
108+ },
109+ },
110+ .class = &i2c_class,
111+ .dev_attr = &i2c_dev_attr,
131112 };
132113
133−/* L4 CORE -> I2C1 interface */
134−static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
135− .master = &omap2430_l4_core_hwmod,
136− .slave = &omap2430_i2c1_hwmod,
137− .clk = "i2c1_ick",
138− .addr = omap2_i2c1_addr_space,
139− .user = OCP_USER_MPU | OCP_USER_SDMA,
114+/* I2C2 */
115+static struct omap_hwmod omap2430_i2c2_hwmod = {
116+ .name = "i2c2",
117+ .flags = HWMOD_16BIT_REG,
118+ .mpu_irqs = omap2_i2c2_mpu_irqs,
119+ .sdma_reqs = omap2_i2c2_sdma_reqs,
120+ .main_clk = "i2chs2_fck",
121+ .prcm = {
122+ .omap2 = {
123+ .module_offs = CORE_MOD,
124+ .prcm_reg_id = 1,
125+ .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
126+ .idlest_reg_id = 1,
127+ .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
128+ },
129+ },
130+ .class = &i2c_class,
131+ .dev_attr = &i2c_dev_attr,
140132 };
141133
142−/* L4 CORE -> I2C2 interface */
143−static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
144− .master = &omap2430_l4_core_hwmod,
145− .slave = &omap2430_i2c2_hwmod,
146− .clk = "i2c2_ick",
147− .addr = omap2_i2c2_addr_space,
148− .user = OCP_USER_MPU | OCP_USER_SDMA,
134+/* gpio5 */
135+static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
136+ { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
137+ { .irq = -1 }
149138 };
150139
151−/* L4_CORE -> L4_WKUP interface */
152−static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
153− .master = &omap2430_l4_core_hwmod,
154− .slave = &omap2430_l4_wkup_hwmod,
155− .user = OCP_USER_MPU | OCP_USER_SDMA,
140+static struct omap_hwmod omap2430_gpio5_hwmod = {
141+ .name = "gpio5",
142+ .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
143+ .mpu_irqs = omap243x_gpio5_irqs,
144+ .main_clk = "gpio5_fck",
145+ .prcm = {
146+ .omap2 = {
147+ .prcm_reg_id = 2,
148+ .module_bit = OMAP2430_EN_GPIO5_SHIFT,
149+ .module_offs = CORE_MOD,
150+ .idlest_reg_id = 2,
151+ .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
152+ },
153+ },
154+ .class = &omap2xxx_gpio_hwmod_class,
155+ .dev_attr = &omap2xxx_gpio_dev_attr,
156156 };
157157
158−/* L4 CORE -> UART1 interface */
159−static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
160− .master = &omap2430_l4_core_hwmod,
161− .slave = &omap2430_uart1_hwmod,
162− .clk = "uart1_ick",
163− .addr = omap2xxx_uart1_addr_space,
164− .user = OCP_USER_MPU | OCP_USER_SDMA,
158+/* dma attributes */
159+static struct omap_dma_dev_attr dma_dev_attr = {
160+ .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
161+ IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
162+ .lch_count = 32,
165163 };
166164
167−/* L4 CORE -> UART2 interface */
168−static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
169− .master = &omap2430_l4_core_hwmod,
170− .slave = &omap2430_uart2_hwmod,
171− .clk = "uart2_ick",
172− .addr = omap2xxx_uart2_addr_space,
173− .user = OCP_USER_MPU | OCP_USER_SDMA,
165+static struct omap_hwmod omap2430_dma_system_hwmod = {
166+ .name = "dma",
167+ .class = &omap2xxx_dma_hwmod_class,
168+ .mpu_irqs = omap2_dma_system_irqs,
169+ .main_clk = "core_l3_ck",
170+ .dev_attr = &dma_dev_attr,
171+ .flags = HWMOD_NO_IDLEST,
174172 };
175173
176−/* L4 PER -> UART3 interface */
177−static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
178− .master = &omap2430_l4_core_hwmod,
179− .slave = &omap2430_uart3_hwmod,
180− .clk = "uart3_ick",
181− .addr = omap2xxx_uart3_addr_space,
182− .user = OCP_USER_MPU | OCP_USER_SDMA,
174+/* mailbox */
175+static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
176+ { .irq = 26 },
177+ { .irq = -1 }
183178 };
184179
185−/*
186−* usbhsotg interface data
187−*/
188−static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
189− {
190− .pa_start = OMAP243X_HS_BASE,
191− .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
192− .flags = ADDR_TYPE_RT
180+static struct omap_hwmod omap2430_mailbox_hwmod = {
181+ .name = "mailbox",
182+ .class = &omap2xxx_mailbox_hwmod_class,
183+ .mpu_irqs = omap2430_mailbox_irqs,
184+ .main_clk = "mailboxes_ick",
185+ .prcm = {
186+ .omap2 = {
187+ .prcm_reg_id = 1,
188+ .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
189+ .module_offs = CORE_MOD,
190+ .idlest_reg_id = 1,
191+ .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
192+ },
193193 },
194− { }
195194 };
196195
197−/* l4_core ->usbhsotg interface */
198−static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
199− .master = &omap2430_l4_core_hwmod,
200− .slave = &omap2430_usbhsotg_hwmod,
201− .clk = "usb_l4_ick",
202− .addr = omap2430_usbhsotg_addrs,
203− .user = OCP_USER_MPU,
196+/* mcspi3 */
197+static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
198+ { .irq = 91 },
199+ { .irq = -1 }
204200 };
205201
206−static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
207− &omap2430_usbhsotg__l3,
202+static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
203+ { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
204+ { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
205+ { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
206+ { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
207+ { .dma_req = -1 }
208208 };
209209
210−static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
211− &omap2430_l4_core__usbhsotg,
210+static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
211+ .num_chipselect = 2,
212212 };
213213
214−/* L4 CORE -> MMC1 interface */
215−static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
216− .master = &omap2430_l4_core_hwmod,
217− .slave = &omap2430_mmc1_hwmod,
218− .clk = "mmchs1_ick",
219− .addr = omap2430_mmc1_addr_space,
220− .user = OCP_USER_MPU | OCP_USER_SDMA,
214+static struct omap_hwmod omap2430_mcspi3_hwmod = {
215+ .name = "mcspi3",
216+ .mpu_irqs = omap2430_mcspi3_mpu_irqs,
217+ .sdma_reqs = omap2430_mcspi3_sdma_reqs,
218+ .main_clk = "mcspi3_fck",
219+ .prcm = {
220+ .omap2 = {
221+ .module_offs = CORE_MOD,
222+ .prcm_reg_id = 2,
223+ .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
224+ .idlest_reg_id = 2,
225+ .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
226+ },
227+ },
228+ .class = &omap2xxx_mcspi_class,
229+ .dev_attr = &omap_mcspi3_dev_attr,
221230 };
222231
223−/* L4 CORE -> MMC2 interface */
224−static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
225− .master = &omap2430_l4_core_hwmod,
226− .slave = &omap2430_mmc2_hwmod,
227− .clk = "mmchs2_ick",
228− .addr = omap2430_mmc2_addr_space,
229− .user = OCP_USER_MPU | OCP_USER_SDMA,
232+/* usbhsotg */
233+static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
234+ .rev_offs = 0x0400,
235+ .sysc_offs = 0x0404,
236+ .syss_offs = 0x0408,
237+ .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
238+ SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
239+ SYSC_HAS_AUTOIDLE),
240+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
241+ MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
242+ .sysc_fields = &omap_hwmod_sysc_type1,
230243 };
231244
232−/* Slave interfaces on the L4_CORE interconnect */
233−static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
234− &omap2430_l3_main__l4_core,
245+static struct omap_hwmod_class usbotg_class = {
246+ .name = "usbotg",
247+ .sysc = &omap2430_usbhsotg_sysc,
235248 };
236249
237−/* Master interfaces on the L4_CORE interconnect */
238−static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
239− &omap2430_l4_core__l4_wkup,
240− &omap2430_l4_core__mmc1,
241− &omap2430_l4_core__mmc2,
242−};
250+/* usb_otg_hs */
251+static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
243252
244−/* L4 CORE */
245−static struct omap_hwmod omap2430_l4_core_hwmod = {
246− .name = "l4_core",
247− .class = &l4_hwmod_class,
248− .masters = omap2430_l4_core_masters,
249− .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
250− .slaves = omap2430_l4_core_slaves,
251− .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
252− .flags = HWMOD_NO_IDLEST,
253+ { .name = "mc", .irq = 92 },
254+ { .name = "dma", .irq = 93 },
255+ { .irq = -1 }
253256 };
254257
255−/* Slave interfaces on the L4_WKUP interconnect */
256−static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
257− &omap2430_l4_core__l4_wkup,
258− &omap2_l4_core__uart1,
259− &omap2_l4_core__uart2,
260− &omap2_l4_core__uart3,
258+static struct omap_hwmod omap2430_usbhsotg_hwmod = {
259+ .name = "usb_otg_hs",
260+ .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
261+ .main_clk = "usbhs_ick",
262+ .prcm = {
263+ .omap2 = {
264+ .prcm_reg_id = 1,
265+ .module_bit = OMAP2430_EN_USBHS_MASK,
266+ .module_offs = CORE_MOD,
267+ .idlest_reg_id = 1,
268+ .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
269+ },
270+ },
271+ .class = &usbotg_class,
272+ /*
273+ * Erratum ID: i479 idle_req / idle_ack mechanism potentially
274+ * broken when autoidle is enabled
275+ * workaround is to disable the autoidle bit at module level.
276+ */
277+ .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
278+ | HWMOD_SWSUP_MSTANDBY,
261279 };
262280
263−/* Master interfaces on the L4_WKUP interconnect */
264−static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
265−};
281+/*
282+ * 'mcbsp' class
283+ * multi channel buffered serial port controller
284+ */
266285
267−/* l4 core -> mcspi1 interface */
268−static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
269− .master = &omap2430_l4_core_hwmod,
270− .slave = &omap2430_mcspi1_hwmod,
271− .clk = "mcspi1_ick",
272− .addr = omap2_mcspi1_addr_space,
273− .user = OCP_USER_MPU | OCP_USER_SDMA,
286+static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
287+ .rev_offs = 0x007C,
288+ .sysc_offs = 0x008C,
289+ .sysc_flags = (SYSC_HAS_SOFTRESET),
290+ .sysc_fields = &omap_hwmod_sysc_type1,
274291 };
275292
276−/* l4 core -> mcspi2 interface */
277−static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
278− .master = &omap2430_l4_core_hwmod,
279− .slave = &omap2430_mcspi2_hwmod,
280− .clk = "mcspi2_ick",
281− .addr = omap2_mcspi2_addr_space,
282− .user = OCP_USER_MPU | OCP_USER_SDMA,
283−};
284−
285−/* l4 core -> mcspi3 interface */
286−static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
287− .master = &omap2430_l4_core_hwmod,
288− .slave = &omap2430_mcspi3_hwmod,
289− .clk = "mcspi3_ick",
290− .addr = omap2430_mcspi3_addr_space,
291− .user = OCP_USER_MPU | OCP_USER_SDMA,
292−};
293−
294−/* L4 WKUP */
295−static struct omap_hwmod omap2430_l4_wkup_hwmod = {
296− .name = "l4_wkup",
297− .class = &l4_hwmod_class,
298− .masters = omap2430_l4_wkup_masters,
299− .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
300− .slaves = omap2430_l4_wkup_slaves,
301− .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
302− .flags = HWMOD_NO_IDLEST,
303−};
304−
305−/* Master interfaces on the MPU device */
306−static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
307− &omap2430_mpu__l3_main,
308−};
309−
310−/* MPU */
311−static struct omap_hwmod omap2430_mpu_hwmod = {
312− .name = "mpu",
313− .class = &mpu_hwmod_class,
314− .main_clk = "mpu_ck",
315− .masters = omap2430_mpu_masters,
316− .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
317−};
318−
319−/*
320− * IVA2_1 interface data
321− */
322−
323−/* IVA2 <- L3 interface */
324−static struct omap_hwmod_ocp_if omap2430_l3__iva = {
325− .master = &omap2430_l3_main_hwmod,
326− .slave = &omap2430_iva_hwmod,
327− .clk = "dsp_fck",
328− .user = OCP_USER_MPU | OCP_USER_SDMA,
329−};
330−
331−static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
332− &omap2430_l3__iva,
333−};
334−
335−/*
336− * IVA2 (IVA2)
337− */
338−
339−static struct omap_hwmod omap2430_iva_hwmod = {
340− .name = "iva",
341− .class = &iva_hwmod_class,
342− .masters = omap2430_iva_masters,
343− .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
344−};
345−
346−/* always-on timers dev attribute */
347−static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
348− .timer_capability = OMAP_TIMER_ALWON,
349−};
350−
351−/* pwm timers dev attribute */
352−static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
353− .timer_capability = OMAP_TIMER_HAS_PWM,
354−};
355−
356−/* timer1 */
357−static struct omap_hwmod omap2430_timer1_hwmod;
358−
359−static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
360− {
361− .pa_start = 0x49018000,
362− .pa_end = 0x49018000 + SZ_1K - 1,
363− .flags = ADDR_TYPE_RT
364− },
365− { }
366−};
367−
368−/* l4_wkup -> timer1 */
369−static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
370− .master = &omap2430_l4_wkup_hwmod,
371− .slave = &omap2430_timer1_hwmod,
372− .clk = "gpt1_ick",
373− .addr = omap2430_timer1_addrs,
374− .user = OCP_USER_MPU | OCP_USER_SDMA,
293+static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
294+ .name = "mcbsp",
295+ .sysc = &omap2430_mcbsp_sysc,
296+ .rev = MCBSP_CONFIG_TYPE2,
375297 };
376298
377−/* timer1 slave port */
378−static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
379− &omap2430_l4_wkup__timer1,
299+/* mcbsp1 */
300+static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
301+ { .name = "tx", .irq = 59 },
302+ { .name = "rx", .irq = 60 },
303+ { .name = "ovr", .irq = 61 },
304+ { .name = "common", .irq = 64 },
305+ { .irq = -1 }
380306 };
381307
382−/* timer1 hwmod */
383−static struct omap_hwmod omap2430_timer1_hwmod = {
384− .name = "timer1",
385− .mpu_irqs = omap2_timer1_mpu_irqs,
386− .main_clk = "gpt1_fck",
308+static struct omap_hwmod omap2430_mcbsp1_hwmod = {
309+ .name = "mcbsp1",
310+ .class = &omap2430_mcbsp_hwmod_class,
311+ .mpu_irqs = omap2430_mcbsp1_irqs,
312+ .sdma_reqs = omap2_mcbsp1_sdma_reqs,
313+ .main_clk = "mcbsp1_fck",
387314 .prcm = {
388315 .omap2 = {
389316 .prcm_reg_id = 1,
390− .module_bit = OMAP24XX_EN_GPT1_SHIFT,
391− .module_offs = WKUP_MOD,
317+ .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
318+ .module_offs = CORE_MOD,
392319 .idlest_reg_id = 1,
393− .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
320+ .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
394321 },
395322 },
396− .dev_attr = &capability_alwon_dev_attr,
397− .slaves = omap2430_timer1_slaves,
398− .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
399− .class = &omap2xxx_timer_hwmod_class,
400−};
401−
402−/* timer2 */
403−static struct omap_hwmod omap2430_timer2_hwmod;
404−
405−/* l4_core -> timer2 */
406−static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
407− .master = &omap2430_l4_core_hwmod,
408− .slave = &omap2430_timer2_hwmod,
409− .clk = "gpt2_ick",
410− .addr = omap2xxx_timer2_addrs,
411− .user = OCP_USER_MPU | OCP_USER_SDMA,
412323 };
413324
414−/* timer2 slave port */
415−static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
416− &omap2430_l4_core__timer2,
325+/* mcbsp2 */
326+static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
327+ { .name = "tx", .irq = 62 },
328+ { .name = "rx", .irq = 63 },
329+ { .name = "common", .irq = 16 },
330+ { .irq = -1 }
417331 };
418332
419−/* timer2 hwmod */
420−static struct omap_hwmod omap2430_timer2_hwmod = {
421− .name = "timer2",
422− .mpu_irqs = omap2_timer2_mpu_irqs,
423− .main_clk = "gpt2_fck",
333+static struct omap_hwmod omap2430_mcbsp2_hwmod = {
334+ .name = "mcbsp2",
335+ .class = &omap2430_mcbsp_hwmod_class,
336+ .mpu_irqs = omap2430_mcbsp2_irqs,
337+ .sdma_reqs = omap2_mcbsp2_sdma_reqs,
338+ .main_clk = "mcbsp2_fck",
424339 .prcm = {
425340 .omap2 = {
426341 .prcm_reg_id = 1,
427− .module_bit = OMAP24XX_EN_GPT2_SHIFT,
342+ .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
428343 .module_offs = CORE_MOD,
429344 .idlest_reg_id = 1,
430− .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
345+ .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
431346 },
432347 },
433− .dev_attr = &capability_alwon_dev_attr,
434− .slaves = omap2430_timer2_slaves,
435− .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
436− .class = &omap2xxx_timer_hwmod_class,
437−};
438−
439−/* timer3 */
440−static struct omap_hwmod omap2430_timer3_hwmod;
441−
442−/* l4_core -> timer3 */
443−static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
444− .master = &omap2430_l4_core_hwmod,
445− .slave = &omap2430_timer3_hwmod,
446− .clk = "gpt3_ick",
447− .addr = omap2xxx_timer3_addrs,
448− .user = OCP_USER_MPU | OCP_USER_SDMA,
449348 };
450349
451−/* timer3 slave port */
452−static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
453− &omap2430_l4_core__timer3,
350+/* mcbsp3 */
351+static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
352+ { .name = "tx", .irq = 89 },
353+ { .name = "rx", .irq = 90 },
354+ { .name = "common", .irq = 17 },
355+ { .irq = -1 }
454356 };
455357
456−/* timer3 hwmod */
457−static struct omap_hwmod omap2430_timer3_hwmod = {
458− .name = "timer3",
459− .mpu_irqs = omap2_timer3_mpu_irqs,
460− .main_clk = "gpt3_fck",
358+static struct omap_hwmod omap2430_mcbsp3_hwmod = {
359+ .name = "mcbsp3",
360+ .class = &omap2430_mcbsp_hwmod_class,
361+ .mpu_irqs = omap2430_mcbsp3_irqs,
362+ .sdma_reqs = omap2_mcbsp3_sdma_reqs,
363+ .main_clk = "mcbsp3_fck",
461364 .prcm = {
462365 .omap2 = {
463366 .prcm_reg_id = 1,
464− .module_bit = OMAP24XX_EN_GPT3_SHIFT,
367+ .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
465368 .module_offs = CORE_MOD,
466− .idlest_reg_id = 1,
467− .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
369+ .idlest_reg_id = 2,
370+ .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
468371 },
469372 },
470− .dev_attr = &capability_alwon_dev_attr,
471− .slaves = omap2430_timer3_slaves,
472− .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
473− .class = &omap2xxx_timer_hwmod_class,
474373 };
475374
476−/* timer4 */
477−static struct omap_hwmod omap2430_timer4_hwmod;
478−
479−/* l4_core -> timer4 */
480−static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
481− .master = &omap2430_l4_core_hwmod,
482− .slave = &omap2430_timer4_hwmod,
483− .clk = "gpt4_ick",
484− .addr = omap2xxx_timer4_addrs,
485− .user = OCP_USER_MPU | OCP_USER_SDMA,
375+/* mcbsp4 */
376+static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
377+ { .name = "tx", .irq = 54 },
378+ { .name = "rx", .irq = 55 },
379+ { .name = "common", .irq = 18 },
380+ { .irq = -1 }
486381 };
487382
488−/* timer4 slave port */
489−static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
490− &omap2430_l4_core__timer4,
383+static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
384+ { .name = "rx", .dma_req = 20 },
385+ { .name = "tx", .dma_req = 19 },
386+ { .dma_req = -1 }
491387 };
492388
493−/* timer4 hwmod */
494−static struct omap_hwmod omap2430_timer4_hwmod = {
495− .name = "timer4",
496− .mpu_irqs = omap2_timer4_mpu_irqs,
497− .main_clk = "gpt4_fck",
389+static struct omap_hwmod omap2430_mcbsp4_hwmod = {
390+ .name = "mcbsp4",
391+ .class = &omap2430_mcbsp_hwmod_class,
392+ .mpu_irqs = omap2430_mcbsp4_irqs,
393+ .sdma_reqs = omap2430_mcbsp4_sdma_chs,
394+ .main_clk = "mcbsp4_fck",
498395 .prcm = {
499396 .omap2 = {
500397 .prcm_reg_id = 1,
501− .module_bit = OMAP24XX_EN_GPT4_SHIFT,
398+ .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
502399 .module_offs = CORE_MOD,
503− .idlest_reg_id = 1,
504− .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
400+ .idlest_reg_id = 2,
401+ .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
505402 },
506403 },
507− .dev_attr = &capability_alwon_dev_attr,
508− .slaves = omap2430_timer4_slaves,
509− .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
510− .class = &omap2xxx_timer_hwmod_class,
511404 };
512405
513−/* timer5 */
514−static struct omap_hwmod omap2430_timer5_hwmod;
515−
516−/* l4_core -> timer5 */
517−static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
518− .master = &omap2430_l4_core_hwmod,
519− .slave = &omap2430_timer5_hwmod,
520− .clk = "gpt5_ick",
521− .addr = omap2xxx_timer5_addrs,
522− .user = OCP_USER_MPU | OCP_USER_SDMA,
406+/* mcbsp5 */
407+static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
408+ { .name = "tx", .irq = 81 },
409+ { .name = "rx", .irq = 82 },
410+ { .name = "common", .irq = 19 },
411+ { .irq = -1 }
523412 };
524413
525−/* timer5 slave port */
526−static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
527− &omap2430_l4_core__timer5,
414+static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
415+ { .name = "rx", .dma_req = 22 },
416+ { .name = "tx", .dma_req = 21 },
417+ { .dma_req = -1 }
528418 };
529419
530−/* timer5 hwmod */
531−static struct omap_hwmod omap2430_timer5_hwmod = {
532− .name = "timer5",
533− .mpu_irqs = omap2_timer5_mpu_irqs,
534− .main_clk = "gpt5_fck",
420+static struct omap_hwmod omap2430_mcbsp5_hwmod = {
421+ .name = "mcbsp5",
422+ .class = &omap2430_mcbsp_hwmod_class,
423+ .mpu_irqs = omap2430_mcbsp5_irqs,
424+ .sdma_reqs = omap2430_mcbsp5_sdma_chs,
425+ .main_clk = "mcbsp5_fck",
535426 .prcm = {
536427 .omap2 = {
537428 .prcm_reg_id = 1,
538− .module_bit = OMAP24XX_EN_GPT5_SHIFT,
429+ .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
539430 .module_offs = CORE_MOD,
540− .idlest_reg_id = 1,
541− .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
431+ .idlest_reg_id = 2,
432+ .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
542433 },
543434 },
544− .dev_attr = &capability_alwon_dev_attr,
545− .slaves = omap2430_timer5_slaves,
546− .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
547− .class = &omap2xxx_timer_hwmod_class,
548435 };
549436
550−/* timer6 */
551−static struct omap_hwmod omap2430_timer6_hwmod;
552−
553−/* l4_core -> timer6 */
554−static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
555− .master = &omap2430_l4_core_hwmod,
556− .slave = &omap2430_timer6_hwmod,
557− .clk = "gpt6_ick",
558− .addr = omap2xxx_timer6_addrs,
559− .user = OCP_USER_MPU | OCP_USER_SDMA,
437+/* MMC/SD/SDIO common */
438+static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
439+ .rev_offs = 0x1fc,
440+ .sysc_offs = 0x10,
441+ .syss_offs = 0x14,
442+ .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
443+ SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
444+ SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
445+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
446+ .sysc_fields = &omap_hwmod_sysc_type1,
560447 };
561448
562−/* timer6 slave port */
563−static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
564− &omap2430_l4_core__timer6,
449+static struct omap_hwmod_class omap2430_mmc_class = {
450+ .name = "mmc",
451+ .sysc = &omap2430_mmc_sysc,
565452 };
566453
567−/* timer6 hwmod */
568−static struct omap_hwmod omap2430_timer6_hwmod = {
569− .name = "timer6",
570− .mpu_irqs = omap2_timer6_mpu_irqs,
571− .main_clk = "gpt6_fck",
572− .prcm = {
573− .omap2 = {
574− .prcm_reg_id = 1,
575− .module_bit = OMAP24XX_EN_GPT6_SHIFT,
576− .module_offs = CORE_MOD,
577− .idlest_reg_id = 1,
578− .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
579− },
580− },
581− .dev_attr = &capability_alwon_dev_attr,
582− .slaves = omap2430_timer6_slaves,
583− .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
584− .class = &omap2xxx_timer_hwmod_class,
454+/* MMC/SD/SDIO1 */
455+static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
456+ { .irq = 83 },
457+ { .irq = -1 }
585458 };
586459
587−/* timer7 */
588−static struct omap_hwmod omap2430_timer7_hwmod;
460+static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
461+ { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
462+ { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
463+ { .dma_req = -1 }
464+};
589465
590−/* l4_core -> timer7 */
591−static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
592− .master = &omap2430_l4_core_hwmod,
593− .slave = &omap2430_timer7_hwmod,
594− .clk = "gpt7_ick",
595− .addr = omap2xxx_timer7_addrs,
596− .user = OCP_USER_MPU | OCP_USER_SDMA,
466+static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
467+ { .role = "dbck", .clk = "mmchsdb1_fck" },
597468 };
598469
599−/* timer7 slave port */
600−static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
601− &omap2430_l4_core__timer7,
470+static struct omap_mmc_dev_attr mmc1_dev_attr = {
471+ .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
602472 };
603473
604−/* timer7 hwmod */
605−static struct omap_hwmod omap2430_timer7_hwmod = {
606− .name = "timer7",
607− .mpu_irqs = omap2_timer7_mpu_irqs,
608− .main_clk = "gpt7_fck",
474+static struct omap_hwmod omap2430_mmc1_hwmod = {
475+ .name = "mmc1",
476+ .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
477+ .mpu_irqs = omap2430_mmc1_mpu_irqs,
478+ .sdma_reqs = omap2430_mmc1_sdma_reqs,
479+ .opt_clks = omap2430_mmc1_opt_clks,
480+ .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
481+ .main_clk = "mmchs1_fck",
609482 .prcm = {
610483 .omap2 = {
611− .prcm_reg_id = 1,
612− .module_bit = OMAP24XX_EN_GPT7_SHIFT,
613484 .module_offs = CORE_MOD,
614− .idlest_reg_id = 1,
615− .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
485+ .prcm_reg_id = 2,
486+ .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
487+ .idlest_reg_id = 2,
488+ .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
616489 },
617490 },
618− .dev_attr = &capability_alwon_dev_attr,
619− .slaves = omap2430_timer7_slaves,
620− .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
621− .class = &omap2xxx_timer_hwmod_class,
491+ .dev_attr = &mmc1_dev_attr,
492+ .class = &omap2430_mmc_class,
622493 };
623494
624−/* timer8 */
625−static struct omap_hwmod omap2430_timer8_hwmod;
495+/* MMC/SD/SDIO2 */
496+static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
497+ { .irq = 86 },
498+ { .irq = -1 }
499+};
626500
627−/* l4_core -> timer8 */
628−static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
629− .master = &omap2430_l4_core_hwmod,
630− .slave = &omap2430_timer8_hwmod,
631− .clk = "gpt8_ick",
632− .addr = omap2xxx_timer8_addrs,
633− .user = OCP_USER_MPU | OCP_USER_SDMA,
501+static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
502+ { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
503+ { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
504+ { .dma_req = -1 }
634505 };
635506
636−/* timer8 slave port */
637−static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
638− &omap2430_l4_core__timer8,
507+static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
508+ { .role = "dbck", .clk = "mmchsdb2_fck" },
639509 };
640510
641−/* timer8 hwmod */
642−static struct omap_hwmod omap2430_timer8_hwmod = {
643− .name = "timer8",
644− .mpu_irqs = omap2_timer8_mpu_irqs,
645− .main_clk = "gpt8_fck",
511+static struct omap_hwmod omap2430_mmc2_hwmod = {
512+ .name = "mmc2",
513+ .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
514+ .mpu_irqs = omap2430_mmc2_mpu_irqs,
515+ .sdma_reqs = omap2430_mmc2_sdma_reqs,
516+ .opt_clks = omap2430_mmc2_opt_clks,
517+ .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
518+ .main_clk = "mmchs2_fck",
646519 .prcm = {
647520 .omap2 = {
648− .prcm_reg_id = 1,
649− .module_bit = OMAP24XX_EN_GPT8_SHIFT,
650521 .module_offs = CORE_MOD,
651− .idlest_reg_id = 1,
652− .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
522+ .prcm_reg_id = 2,
523+ .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
524+ .idlest_reg_id = 2,
525+ .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
653526 },
654527 },
655− .dev_attr = &capability_alwon_dev_attr,
656− .slaves = omap2430_timer8_slaves,
657− .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
658− .class = &omap2xxx_timer_hwmod_class,
528+ .class = &omap2430_mmc_class,
659529 };
660530
661−/* timer9 */
662−static struct omap_hwmod omap2430_timer9_hwmod;
531+/*
532+ * interfaces
533+ */
663534
664−/* l4_core -> timer9 */
665−static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
666− .master = &omap2430_l4_core_hwmod,
667− .slave = &omap2430_timer9_hwmod,
668− .clk = "gpt9_ick",
669− .addr = omap2xxx_timer9_addrs,
670− .user = OCP_USER_MPU | OCP_USER_SDMA,
535+/* L3 -> L4_CORE interface */
536+/* l3_core -> usbhsotg interface */
537+static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
538+ .master = &omap2430_usbhsotg_hwmod,
539+ .slave = &omap2xxx_l3_main_hwmod,
540+ .clk = "core_l3_ck",
541+ .user = OCP_USER_MPU,
671542 };
672543
673−/* timer9 slave port */
674−static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
675− &omap2430_l4_core__timer9,
544+/* L4 CORE -> I2C1 interface */
545+static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
546+ .master = &omap2xxx_l4_core_hwmod,
547+ .slave = &omap2430_i2c1_hwmod,
548+ .clk = "i2c1_ick",
549+ .addr = omap2_i2c1_addr_space,
550+ .user = OCP_USER_MPU | OCP_USER_SDMA,
676551 };
677552
678−/* timer9 hwmod */
679−static struct omap_hwmod omap2430_timer9_hwmod = {
680− .name = "timer9",
681− .mpu_irqs = omap2_timer9_mpu_irqs,
682− .main_clk = "gpt9_fck",
683− .prcm = {
684− .omap2 = {
685− .prcm_reg_id = 1,
686− .module_bit = OMAP24XX_EN_GPT9_SHIFT,
687− .module_offs = CORE_MOD,
688− .idlest_reg_id = 1,
689− .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
690− },
691− },
692− .dev_attr = &capability_pwm_dev_attr,
693− .slaves = omap2430_timer9_slaves,
694− .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
695− .class = &omap2xxx_timer_hwmod_class,
696−};
697−
698−/* timer10 */
699−static struct omap_hwmod omap2430_timer10_hwmod;
700−
701−/* l4_core -> timer10 */
702−static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
703− .master = &omap2430_l4_core_hwmod,
704− .slave = &omap2430_timer10_hwmod,
705− .clk = "gpt10_ick",
706− .addr = omap2_timer10_addrs,
553+/* L4 CORE -> I2C2 interface */
554+static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
555+ .master = &omap2xxx_l4_core_hwmod,
556+ .slave = &omap2430_i2c2_hwmod,
557+ .clk = "i2c2_ick",
558+ .addr = omap2_i2c2_addr_space,
707559 .user = OCP_USER_MPU | OCP_USER_SDMA,
708560 };
709561
710−/* timer10 slave port */
711−static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
712− &omap2430_l4_core__timer10,
713−};
714−
715−/* timer10 hwmod */
716−static struct omap_hwmod omap2430_timer10_hwmod = {
717− .name = "timer10",
718− .mpu_irqs = omap2_timer10_mpu_irqs,
719− .main_clk = "gpt10_fck",
720− .prcm = {
721− .omap2 = {
722− .prcm_reg_id = 1,
723− .module_bit = OMAP24XX_EN_GPT10_SHIFT,
724− .module_offs = CORE_MOD,
725− .idlest_reg_id = 1,
726− .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
727− },
562+static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
563+ {
564+ .pa_start = OMAP243X_HS_BASE,
565+ .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
566+ .flags = ADDR_TYPE_RT
728567 },
729− .dev_attr = &capability_pwm_dev_attr,
730− .slaves = omap2430_timer10_slaves,
731− .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
732− .class = &omap2xxx_timer_hwmod_class,
568+ { }
733569 };
734570
735−/* timer11 */
736−static struct omap_hwmod omap2430_timer11_hwmod;
571+/* l4_core ->usbhsotg interface */
572+static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
573+ .master = &omap2xxx_l4_core_hwmod,
574+ .slave = &omap2430_usbhsotg_hwmod,
575+ .clk = "usb_l4_ick",
576+ .addr = omap2430_usbhsotg_addrs,
577+ .user = OCP_USER_MPU,
578+};
737579
738−/* l4_core -> timer11 */
739−static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
740− .master = &omap2430_l4_core_hwmod,
741− .slave = &omap2430_timer11_hwmod,
742− .clk = "gpt11_ick",
743− .addr = omap2_timer11_addrs,
580+/* L4 CORE -> MMC1 interface */
581+static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
582+ .master = &omap2xxx_l4_core_hwmod,
583+ .slave = &omap2430_mmc1_hwmod,
584+ .clk = "mmchs1_ick",
585+ .addr = omap2430_mmc1_addr_space,
744586 .user = OCP_USER_MPU | OCP_USER_SDMA,
745587 };
746588
747−/* timer11 slave port */
748−static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
749− &omap2430_l4_core__timer11,
589+/* L4 CORE -> MMC2 interface */
590+static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
591+ .master = &omap2xxx_l4_core_hwmod,
592+ .slave = &omap2430_mmc2_hwmod,
593+ .clk = "mmchs2_ick",
594+ .addr = omap2430_mmc2_addr_space,
595+ .user = OCP_USER_MPU | OCP_USER_SDMA,
750596 };
751597
752−/* timer11 hwmod */
753−static struct omap_hwmod omap2430_timer11_hwmod = {
754− .name = "timer11",
755− .mpu_irqs = omap2_timer11_mpu_irqs,
756− .main_clk = "gpt11_fck",
757− .prcm = {
758− .omap2 = {
759− .prcm_reg_id = 1,
760− .module_bit = OMAP24XX_EN_GPT11_SHIFT,
761− .module_offs = CORE_MOD,
762− .idlest_reg_id = 1,
763− .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
764− },
765− },
766− .dev_attr = &capability_pwm_dev_attr,
767− .slaves = omap2430_timer11_slaves,
768− .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
769− .class = &omap2xxx_timer_hwmod_class,
598+/* l4 core -> mcspi3 interface */
599+static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
600+ .master = &omap2xxx_l4_core_hwmod,
601+ .slave = &omap2430_mcspi3_hwmod,
602+ .clk = "mcspi3_ick",
603+ .addr = omap2430_mcspi3_addr_space,
604+ .user = OCP_USER_MPU | OCP_USER_SDMA,
770605 };
771606
772−/* timer12 */
773−static struct omap_hwmod omap2430_timer12_hwmod;
774−
775−/* l4_core -> timer12 */
776−static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
777− .master = &omap2430_l4_core_hwmod,
778− .slave = &omap2430_timer12_hwmod,
779− .clk = "gpt12_ick",
780− .addr = omap2xxx_timer12_addrs,
607+/* IVA2 <- L3 interface */
608+static struct omap_hwmod_ocp_if omap2430_l3__iva = {
609+ .master = &omap2xxx_l3_main_hwmod,
610+ .slave = &omap2430_iva_hwmod,
611+ .clk = "core_l3_ck",
781612 .user = OCP_USER_MPU | OCP_USER_SDMA,
782613 };
783614
784−/* timer12 slave port */
785−static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
786− &omap2430_l4_core__timer12,
615+static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
616+ {
617+ .pa_start = 0x49018000,
618+ .pa_end = 0x49018000 + SZ_1K - 1,
619+ .flags = ADDR_TYPE_RT
620+ },
621+ { }
787622 };
788623
789−/* timer12 hwmod */
790−static struct omap_hwmod omap2430_timer12_hwmod = {
791− .name = "timer12",
792− .mpu_irqs = omap2xxx_timer12_mpu_irqs,
793− .main_clk = "gpt12_fck",
794− .prcm = {
795− .omap2 = {
796− .prcm_reg_id = 1,
797− .module_bit = OMAP24XX_EN_GPT12_SHIFT,
798− .module_offs = CORE_MOD,
799− .idlest_reg_id = 1,
800− .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
801− },
802− },
803− .dev_attr = &capability_pwm_dev_attr,
804− .slaves = omap2430_timer12_slaves,
805− .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
806− .class = &omap2xxx_timer_hwmod_class,
624+/* l4_wkup -> timer1 */
625+static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
626+ .master = &omap2xxx_l4_wkup_hwmod,
627+ .slave = &omap2xxx_timer1_hwmod,
628+ .clk = "gpt1_ick",
629+ .addr = omap2430_timer1_addrs,
630+ .user = OCP_USER_MPU | OCP_USER_SDMA,
807631 };
808632
809633 /* l4_wkup -> wd_timer2 */
@@ -817,923 +641,146 @@ static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { · 7 unmodified lines
817641 };
818642
819643 static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
820− .master = &omap2430_l4_wkup_hwmod,
821− .slave = &omap2430_wd_timer2_hwmod,
644+ .master = &omap2xxx_l4_wkup_hwmod,
645+ .slave = &omap2xxx_wd_timer2_hwmod,
822646 .clk = "mpu_wdt_ick",
823647 .addr = omap2430_wd_timer2_addrs,
824648 .user = OCP_USER_MPU | OCP_USER_SDMA,
825649 };
826650
827−/* wd_timer2 */
828−static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
829− &omap2430_l4_wkup__wd_timer2,
830−};
831−
832−static struct omap_hwmod omap2430_wd_timer2_hwmod = {
833− .name = "wd_timer2",
834− .class = &omap2xxx_wd_timer_hwmod_class,
835− .main_clk = "mpu_wdt_fck",
836− .prcm = {
837− .omap2 = {
838− .prcm_reg_id = 1,
839− .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
840− .module_offs = WKUP_MOD,
841− .idlest_reg_id = 1,
842− .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
843− },
844− },
845− .slaves = omap2430_wd_timer2_slaves,
846− .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
847−};
848−
849−/* UART1 */
850−
851−static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
852− &omap2_l4_core__uart1,
853−};
854−
855−static struct omap_hwmod omap2430_uart1_hwmod = {
856− .name = "uart1",
857− .mpu_irqs = omap2_uart1_mpu_irqs,
858− .sdma_reqs = omap2_uart1_sdma_reqs,
859− .main_clk = "uart1_fck",
860− .prcm = {
861− .omap2 = {
862− .module_offs = CORE_MOD,
863− .prcm_reg_id = 1,
864− .module_bit = OMAP24XX_EN_UART1_SHIFT,
865− .idlest_reg_id = 1,
866− .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
867− },
868− },
869− .slaves = omap2430_uart1_slaves,
870− .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
871− .class = &omap2_uart_class,
872−};
873−
874−/* UART2 */
875−
876−static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
877− &omap2_l4_core__uart2,
878−};
879−
880−static struct omap_hwmod omap2430_uart2_hwmod = {
881− .name = "uart2",
882− .mpu_irqs = omap2_uart2_mpu_irqs,
883− .sdma_reqs = omap2_uart2_sdma_reqs,
884− .main_clk = "uart2_fck",
885− .prcm = {
886− .omap2 = {
887− .module_offs = CORE_MOD,
888− .prcm_reg_id = 1,
889− .module_bit = OMAP24XX_EN_UART2_SHIFT,
890− .idlest_reg_id = 1,
891− .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
892− },
893− },
894− .slaves = omap2430_uart2_slaves,
895− .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
896− .class = &omap2_uart_class,
897−};
898−
899−/* UART3 */
900−
901−static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
902− &omap2_l4_core__uart3,
903−};
904−
905−static struct omap_hwmod omap2430_uart3_hwmod = {
906− .name = "uart3",
907− .mpu_irqs = omap2_uart3_mpu_irqs,
908− .sdma_reqs = omap2_uart3_sdma_reqs,
909− .main_clk = "uart3_fck",
910− .prcm = {
911− .omap2 = {
912− .module_offs = CORE_MOD,
913− .prcm_reg_id = 2,
914− .module_bit = OMAP24XX_EN_UART3_SHIFT,
915− .idlest_reg_id = 2,
916− .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
917− },
651+/* l4_wkup -> gpio1 */
652+static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
653+ {
654+ .pa_start = 0x4900C000,
655+ .pa_end = 0x4900C1ff,
656+ .flags = ADDR_TYPE_RT
918657 },
919− .slaves = omap2430_uart3_slaves,
920− .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
921− .class = &omap2_uart_class,
922−};
923−
924−/* dss */
925−/* dss master ports */
926−static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
927− &omap2430_dss__l3,
658+ { }
928659 };
929660
930−/* l4_core -> dss */
931−static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
932− .master = &omap2430_l4_core_hwmod,
933− .slave = &omap2430_dss_core_hwmod,
934− .clk = "dss_ick",
935− .addr = omap2_dss_addrs,
661+static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
662+ .master = &omap2xxx_l4_wkup_hwmod,
663+ .slave = &omap2xxx_gpio1_hwmod,
664+ .clk = "gpios_ick",
665+ .addr = omap2430_gpio1_addr_space,
936666 .user = OCP_USER_MPU | OCP_USER_SDMA,
937667 };
938668
939−/* dss slave ports */
940−static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
941− &omap2430_l4_core__dss,
942−};
943−
944−static struct omap_hwmod_opt_clk dss_opt_clks[] = {
945− /*
946− * The DSS HW needs all DSS clocks enabled during reset. The dss_core
947− * driver does not use these clocks.
948− */
949− { .role = "tv_clk", .clk = "dss_54m_fck" },
950− { .role = "sys_clk", .clk = "dss2_fck" },
951−};
952−
953−static struct omap_hwmod omap2430_dss_core_hwmod = {
954− .name = "dss_core",
955− .class = &omap2_dss_hwmod_class,
956− .main_clk = "dss1_fck", /* instead of dss_fck */
957− .sdma_reqs = omap2xxx_dss_sdma_chs,
958− .prcm = {
959− .omap2 = {
960− .prcm_reg_id = 1,
961− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
962− .module_offs = CORE_MOD,
963− .idlest_reg_id = 1,
964− .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
965− },
669+/* l4_wkup -> gpio2 */
670+static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
671+ {
672+ .pa_start = 0x4900E000,
673+ .pa_end = 0x4900E1ff,
674+ .flags = ADDR_TYPE_RT
966675 },
967− .opt_clks = dss_opt_clks,
968− .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
969− .slaves = omap2430_dss_slaves,
970− .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
971− .masters = omap2430_dss_masters,
972− .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
973− .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
974−};
975−
976−/* l4_core -> dss_dispc */
977−static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
978− .master = &omap2430_l4_core_hwmod,
979− .slave = &omap2430_dss_dispc_hwmod,
980− .clk = "dss_ick",
981− .addr = omap2_dss_dispc_addrs,
982− .user = OCP_USER_MPU | OCP_USER_SDMA,
676+ { }
983677 };
984678
985−/* dss_dispc slave ports */
986−static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
987− &omap2430_l4_core__dss_dispc,
679+static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
680+ .master = &omap2xxx_l4_wkup_hwmod,
681+ .slave = &omap2xxx_gpio2_hwmod,
682+ .clk = "gpios_ick",
683+ .addr = omap2430_gpio2_addr_space,
684+ .user = OCP_USER_MPU | OCP_USER_SDMA,
988685 };
989686
990−static struct omap_hwmod omap2430_dss_dispc_hwmod = {
991− .name = "dss_dispc",
992− .class = &omap2_dispc_hwmod_class,
993− .mpu_irqs = omap2_dispc_irqs,
994− .main_clk = "dss1_fck",
995− .prcm = {
996− .omap2 = {
997− .prcm_reg_id = 1,
998− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
999− .module_offs = CORE_MOD,
1000− .idlest_reg_id = 1,
1001− .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1002− },
687+/* l4_wkup -> gpio3 */
688+static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
689+ {
690+ .pa_start = 0x49010000,
691+ .pa_end = 0x490101ff,
692+ .flags = ADDR_TYPE_RT
1003693 },
1004− .slaves = omap2430_dss_dispc_slaves,
1005− .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
1006− .flags = HWMOD_NO_IDLEST,
1007− .dev_attr = &omap2_3_dss_dispc_dev_attr
694+ { }
1008695 };
1009696
1010−/* l4_core -> dss_rfbi */
1011−static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1012− .master = &omap2430_l4_core_hwmod,
1013− .slave = &omap2430_dss_rfbi_hwmod,
1014− .clk = "dss_ick",
1015− .addr = omap2_dss_rfbi_addrs,
697+static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
698+ .master = &omap2xxx_l4_wkup_hwmod,
699+ .slave = &omap2xxx_gpio3_hwmod,
700+ .clk = "gpios_ick",
701+ .addr = omap2430_gpio3_addr_space,
1016702 .user = OCP_USER_MPU | OCP_USER_SDMA,
1017703 };
1018704
1019−/* dss_rfbi slave ports */
1020−static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1021− &omap2430_l4_core__dss_rfbi,
1022−};
1023−
1024−static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1025− { .role = "ick", .clk = "dss_ick" },
1026−};
1027−
1028−static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1029− .name = "dss_rfbi",
1030− .class = &omap2_rfbi_hwmod_class,
1031− .main_clk = "dss1_fck",
1032− .prcm = {
1033− .omap2 = {
1034− .prcm_reg_id = 1,
1035− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1036− .module_offs = CORE_MOD,
1037− },
705+/* l4_wkup -> gpio4 */
706+static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
707+ {
708+ .pa_start = 0x49012000,
709+ .pa_end = 0x490121ff,
710+ .flags = ADDR_TYPE_RT
1038711 },
1039− .opt_clks = dss_rfbi_opt_clks,
1040− .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1041− .slaves = omap2430_dss_rfbi_slaves,
1042− .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
1043− .flags = HWMOD_NO_IDLEST,
712+ { }
1044713 };
1045714
1046−/* l4_core -> dss_venc */
1047−static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1048− .master = &omap2430_l4_core_hwmod,
1049− .slave = &omap2430_dss_venc_hwmod,
1050− .clk = "dss_ick",
1051− .addr = omap2_dss_venc_addrs,
715+static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
716+ .master = &omap2xxx_l4_wkup_hwmod,
717+ .slave = &omap2xxx_gpio4_hwmod,
718+ .clk = "gpios_ick",
719+ .addr = omap2430_gpio4_addr_space,
1052720 .user = OCP_USER_MPU | OCP_USER_SDMA,
1053721 };
1054722
1055−/* dss_venc slave ports */
1056−static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1057− &omap2430_l4_core__dss_venc,
1058−};
1059−
1060−static struct omap_hwmod omap2430_dss_venc_hwmod = {
1061− .name = "dss_venc",
1062− .class = &omap2_venc_hwmod_class,
1063− .main_clk = "dss_54m_fck",
1064− .prcm = {
1065− .omap2 = {
1066− .prcm_reg_id = 1,
1067− .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1068− .module_offs = CORE_MOD,
1069− },
723+/* l4_core -> gpio5 */
724+static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
725+ {
726+ .pa_start = 0x480B6000,
727+ .pa_end = 0x480B61ff,
728+ .flags = ADDR_TYPE_RT
1070729 },
1071− .slaves = omap2430_dss_venc_slaves,
1072− .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
1073− .flags = HWMOD_NO_IDLEST,
1074−};
1075−
1076−/* I2C common */
1077−static struct omap_hwmod_class_sysconfig i2c_sysc = {
1078− .rev_offs = 0x00,
1079− .sysc_offs = 0x20,
1080− .syss_offs = 0x10,
1081− .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1082− SYSS_HAS_RESET_STATUS),
1083− .sysc_fields = &omap_hwmod_sysc_type1,
730+ { }
1084731 };
1085732
1086−static struct omap_hwmod_class i2c_class = {
1087− .name = "i2c",
1088− .sysc = &i2c_sysc,
1089− .rev = OMAP_I2C_IP_VERSION_1,
1090− .reset = &omap_i2c_reset,
733+static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
734+ .master = &omap2xxx_l4_core_hwmod,
735+ .slave = &omap2430_gpio5_hwmod,
736+ .clk = "gpio5_ick",
737+ .addr = omap2430_gpio5_addr_space,
738+ .user = OCP_USER_MPU | OCP_USER_SDMA,
1091739 };
1092740
1093−static struct omap_i2c_dev_attr i2c_dev_attr = {
1094− .fifo_depth = 8, /* bytes */
1095− .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1096− OMAP_I2C_FLAG_BUS_SHIFT_2 |
1097− OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
741+/* dma_system -> L3 */
742+static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
743+ .master = &omap2430_dma_system_hwmod,
744+ .slave = &omap2xxx_l3_main_hwmod,
745+ .clk = "core_l3_ck",
746+ .user = OCP_USER_MPU | OCP_USER_SDMA,
1098747 };
1099748
1100−/* I2C1 */
1101−
1102−static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1103− &omap2430_l4_core__i2c1,
1104−};
1105−
1106−static struct omap_hwmod omap2430_i2c1_hwmod = {
1107− .name = "i2c1",
1108− .flags = HWMOD_16BIT_REG,
1109− .mpu_irqs = omap2_i2c1_mpu_irqs,
1110− .sdma_reqs = omap2_i2c1_sdma_reqs,
1111− .main_clk = "i2chs1_fck",
1112− .prcm = {
1113− .omap2 = {
1114− /*
1115− * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
1116− * I2CHS IP's do not follow the usual pattern.
1117− * prcm_reg_id alone cannot be used to program
1118− * the iclk and fclk. Needs to be handled using
1119− * additional flags when clk handling is moved
1120− * to hwmod framework.
1121− */
1122− .module_offs = CORE_MOD,
1123− .prcm_reg_id = 1,
1124− .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
1125− .idlest_reg_id = 1,
1126− .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
1127− },
1128− },
1129− .slaves = omap2430_i2c1_slaves,
1130− .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
1131− .class = &i2c_class,
1132− .dev_attr = &i2c_dev_attr,
1133−};
1134−
1135−/* I2C2 */
1136−
1137−static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1138− &omap2430_l4_core__i2c2,
1139−};
1140−
1141−static struct omap_hwmod omap2430_i2c2_hwmod = {
1142− .name = "i2c2",
1143− .flags = HWMOD_16BIT_REG,
1144− .mpu_irqs = omap2_i2c2_mpu_irqs,
1145− .sdma_reqs = omap2_i2c2_sdma_reqs,
1146− .main_clk = "i2chs2_fck",
1147− .prcm = {
1148− .omap2 = {
1149− .module_offs = CORE_MOD,
1150− .prcm_reg_id = 1,
1151− .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
1152− .idlest_reg_id = 1,
1153− .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1154− },
1155− },
1156− .slaves = omap2430_i2c2_slaves,
1157− .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
1158− .class = &i2c_class,
1159− .dev_attr = &i2c_dev_attr,
1160−};
1161−
1162−/* l4_wkup -> gpio1 */
1163−static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1164− {
1165− .pa_start = 0x4900C000,
1166− .pa_end = 0x4900C1ff,
1167− .flags = ADDR_TYPE_RT
1168− },
1169− { }
1170−};
1171−
1172−static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1173− .master = &omap2430_l4_wkup_hwmod,
1174− .slave = &omap2430_gpio1_hwmod,
1175− .clk = "gpios_ick",
1176− .addr = omap2430_gpio1_addr_space,
1177− .user = OCP_USER_MPU | OCP_USER_SDMA,
1178−};
1179−
1180−/* l4_wkup -> gpio2 */
1181−static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1182− {
1183− .pa_start = 0x4900E000,
1184− .pa_end = 0x4900E1ff,
1185− .flags = ADDR_TYPE_RT
1186− },
1187− { }
1188−};
1189−
1190−static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1191− .master = &omap2430_l4_wkup_hwmod,
1192− .slave = &omap2430_gpio2_hwmod,
1193− .clk = "gpios_ick",
1194− .addr = omap2430_gpio2_addr_space,
1195− .user = OCP_USER_MPU | OCP_USER_SDMA,
1196−};
1197−
1198−/* l4_wkup -> gpio3 */
1199−static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1200− {
1201− .pa_start = 0x49010000,
1202− .pa_end = 0x490101ff,
1203− .flags = ADDR_TYPE_RT
1204− },
1205− { }
1206−};
1207−
1208−static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1209− .master = &omap2430_l4_wkup_hwmod,
1210− .slave = &omap2430_gpio3_hwmod,
1211− .clk = "gpios_ick",
1212− .addr = omap2430_gpio3_addr_space,
1213− .user = OCP_USER_MPU | OCP_USER_SDMA,
1214−};
1215−
1216−/* l4_wkup -> gpio4 */
1217−static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1218− {
1219− .pa_start = 0x49012000,
1220− .pa_end = 0x490121ff,
1221− .flags = ADDR_TYPE_RT
1222− },
1223− { }
1224−};
1225−
1226−static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1227− .master = &omap2430_l4_wkup_hwmod,
1228− .slave = &omap2430_gpio4_hwmod,
1229− .clk = "gpios_ick",
1230− .addr = omap2430_gpio4_addr_space,
1231− .user = OCP_USER_MPU | OCP_USER_SDMA,
1232−};
1233−
1234−/* l4_core -> gpio5 */
1235−static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1236− {
1237− .pa_start = 0x480B6000,
1238− .pa_end = 0x480B61ff,
1239− .flags = ADDR_TYPE_RT
1240− },
1241− { }
1242−};
1243−
1244−static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1245− .master = &omap2430_l4_core_hwmod,
1246− .slave = &omap2430_gpio5_hwmod,
1247− .clk = "gpio5_ick",
1248− .addr = omap2430_gpio5_addr_space,
1249− .user = OCP_USER_MPU | OCP_USER_SDMA,
1250−};
1251−
1252−/* gpio dev_attr */
1253−static struct omap_gpio_dev_attr gpio_dev_attr = {
1254− .bank_width = 32,
1255− .dbck_flag = false,
1256−};
1257−
1258−/* gpio1 */
1259−static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1260− &omap2430_l4_wkup__gpio1,
1261−};
1262−
1263−static struct omap_hwmod omap2430_gpio1_hwmod = {
1264− .name = "gpio1",
1265− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1266− .mpu_irqs = omap2_gpio1_irqs,
1267− .main_clk = "gpios_fck",
1268− .prcm = {
1269− .omap2 = {
1270− .prcm_reg_id = 1,
1271− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1272− .module_offs = WKUP_MOD,
1273− .idlest_reg_id = 1,
1274− .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
1275− },
1276− },
1277− .slaves = omap2430_gpio1_slaves,
1278− .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
1279− .class = &omap2xxx_gpio_hwmod_class,
1280− .dev_attr = &gpio_dev_attr,
1281−};
1282−
1283−/* gpio2 */
1284−static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1285− &omap2430_l4_wkup__gpio2,
1286−};
1287−
1288−static struct omap_hwmod omap2430_gpio2_hwmod = {
1289− .name = "gpio2",
1290− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1291− .mpu_irqs = omap2_gpio2_irqs,
1292− .main_clk = "gpios_fck",
1293− .prcm = {
1294− .omap2 = {
1295− .prcm_reg_id = 1,
1296− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1297− .module_offs = WKUP_MOD,
1298− .idlest_reg_id = 1,
1299− .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1300− },
1301− },
1302− .slaves = omap2430_gpio2_slaves,
1303− .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
1304− .class = &omap2xxx_gpio_hwmod_class,
1305− .dev_attr = &gpio_dev_attr,
1306−};
1307−
1308−/* gpio3 */
1309−static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1310− &omap2430_l4_wkup__gpio3,
1311−};
1312−
1313−static struct omap_hwmod omap2430_gpio3_hwmod = {
1314− .name = "gpio3",
1315− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1316− .mpu_irqs = omap2_gpio3_irqs,
1317− .main_clk = "gpios_fck",
1318− .prcm = {
1319− .omap2 = {
1320− .prcm_reg_id = 1,
1321− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1322− .module_offs = WKUP_MOD,
1323− .idlest_reg_id = 1,
1324− .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1325− },
1326− },
1327− .slaves = omap2430_gpio3_slaves,
1328− .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
1329− .class = &omap2xxx_gpio_hwmod_class,
1330− .dev_attr = &gpio_dev_attr,
1331−};
1332−
1333−/* gpio4 */
1334−static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1335− &omap2430_l4_wkup__gpio4,
1336−};
1337−
1338−static struct omap_hwmod omap2430_gpio4_hwmod = {
1339− .name = "gpio4",
1340− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1341− .mpu_irqs = omap2_gpio4_irqs,
1342− .main_clk = "gpios_fck",
1343− .prcm = {
1344− .omap2 = {
1345− .prcm_reg_id = 1,
1346− .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1347− .module_offs = WKUP_MOD,
1348− .idlest_reg_id = 1,
1349− .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1350− },
1351− },
1352− .slaves = omap2430_gpio4_slaves,
1353− .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
1354− .class = &omap2xxx_gpio_hwmod_class,
1355− .dev_attr = &gpio_dev_attr,
1356−};
1357−
1358−/* gpio5 */
1359−static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1360− { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
1361− { .irq = -1 }
1362−};
1363−
1364−static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1365− &omap2430_l4_core__gpio5,
1366−};
1367−
1368−static struct omap_hwmod omap2430_gpio5_hwmod = {
1369− .name = "gpio5",
1370− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1371− .mpu_irqs = omap243x_gpio5_irqs,
1372− .main_clk = "gpio5_fck",
1373− .prcm = {
1374− .omap2 = {
1375− .prcm_reg_id = 2,
1376− .module_bit = OMAP2430_EN_GPIO5_SHIFT,
1377− .module_offs = CORE_MOD,
1378− .idlest_reg_id = 2,
1379− .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
1380− },
1381− },
1382− .slaves = omap2430_gpio5_slaves,
1383− .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
1384− .class = &omap2xxx_gpio_hwmod_class,
1385− .dev_attr = &gpio_dev_attr,
1386−};
1387−
1388−/* dma attributes */
1389−static struct omap_dma_dev_attr dma_dev_attr = {
1390− .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1391− IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1392− .lch_count = 32,
1393−};
1394−
1395−/* dma_system -> L3 */
1396−static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1397− .master = &omap2430_dma_system_hwmod,
1398− .slave = &omap2430_l3_main_hwmod,
1399− .clk = "core_l3_ck",
1400− .user = OCP_USER_MPU | OCP_USER_SDMA,
1401−};
1402−
1403−/* dma_system master ports */
1404−static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1405− &omap2430_dma_system__l3,
1406−};
1407−
1408−/* l4_core -> dma_system */
1409−static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1410− .master = &omap2430_l4_core_hwmod,
1411− .slave = &omap2430_dma_system_hwmod,
1412− .clk = "sdma_ick",
1413− .addr = omap2_dma_system_addrs,
1414− .user = OCP_USER_MPU | OCP_USER_SDMA,
1415−};
1416−
1417−/* dma_system slave ports */
1418−static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1419− &omap2430_l4_core__dma_system,
1420−};
1421−
1422−static struct omap_hwmod omap2430_dma_system_hwmod = {
1423− .name = "dma",
1424− .class = &omap2xxx_dma_hwmod_class,
1425− .mpu_irqs = omap2_dma_system_irqs,
1426− .main_clk = "core_l3_ck",
1427− .slaves = omap2430_dma_system_slaves,
1428− .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
1429− .masters = omap2430_dma_system_masters,
1430− .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
1431− .dev_attr = &dma_dev_attr,
1432− .flags = HWMOD_NO_IDLEST,
1433−};
1434−
1435−/* mailbox */
1436−static struct omap_hwmod omap2430_mailbox_hwmod;
1437−static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1438− { .irq = 26 },
1439− { .irq = -1 }
749+/* l4_core -> dma_system */
750+static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
751+ .master = &omap2xxx_l4_core_hwmod,
752+ .slave = &omap2430_dma_system_hwmod,
753+ .clk = "sdma_ick",
754+ .addr = omap2_dma_system_addrs,
755+ .user = OCP_USER_MPU | OCP_USER_SDMA,
1440756 };
1441757
1442758 /* l4_core -> mailbox */
1443759 static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
1444− .master = &omap2430_l4_core_hwmod,
760+ .master = &omap2xxx_l4_core_hwmod,
1445761 .slave = &omap2430_mailbox_hwmod,
1446− .addr = omap2_mailbox_addrs,
1447− .user = OCP_USER_MPU | OCP_USER_SDMA,
1448−};
1449−
1450−/* mailbox slave ports */
1451−static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
1452− &omap2430_l4_core__mailbox,
1453−};
1454−
1455−static struct omap_hwmod omap2430_mailbox_hwmod = {
1456− .name = "mailbox",
1457− .class = &omap2xxx_mailbox_hwmod_class,
1458− .mpu_irqs = omap2430_mailbox_irqs,
1459− .main_clk = "mailboxes_ick",
1460− .prcm = {
1461− .omap2 = {
1462− .prcm_reg_id = 1,
1463− .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1464− .module_offs = CORE_MOD,
1465− .idlest_reg_id = 1,
1466− .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1467− },
1468− },
1469− .slaves = omap2430_mailbox_slaves,
1470− .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
1471−};
1472−
1473−/* mcspi1 */
1474−static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
1475− &omap2430_l4_core__mcspi1,
1476−};
1477−
1478−static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1479− .num_chipselect = 4,
1480−};
1481−
1482−static struct omap_hwmod omap2430_mcspi1_hwmod = {
1483− .name = "mcspi1_hwmod",
1484− .mpu_irqs = omap2_mcspi1_mpu_irqs,
1485− .sdma_reqs = omap2_mcspi1_sdma_reqs,
1486− .main_clk = "mcspi1_fck",
1487− .prcm = {
1488− .omap2 = {
1489− .module_offs = CORE_MOD,
1490− .prcm_reg_id = 1,
1491− .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1492− .idlest_reg_id = 1,
1493− .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1494− },
1495− },
1496− .slaves = omap2430_mcspi1_slaves,
1497− .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
1498− .class = &omap2xxx_mcspi_class,
1499− .dev_attr = &omap_mcspi1_dev_attr,
1500−};
1501−
1502−/* mcspi2 */
1503−static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
1504− &omap2430_l4_core__mcspi2,
1505−};
1506−
1507−static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1508− .num_chipselect = 2,
1509−};
1510−
1511−static struct omap_hwmod omap2430_mcspi2_hwmod = {
1512− .name = "mcspi2_hwmod",
1513− .mpu_irqs = omap2_mcspi2_mpu_irqs,
1514− .sdma_reqs = omap2_mcspi2_sdma_reqs,
1515− .main_clk = "mcspi2_fck",
1516− .prcm = {
1517− .omap2 = {
1518− .module_offs = CORE_MOD,
1519− .prcm_reg_id = 1,
1520− .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1521− .idlest_reg_id = 1,
1522− .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1523− },
1524− },
1525− .slaves = omap2430_mcspi2_slaves,
1526− .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
1527− .class = &omap2xxx_mcspi_class,
1528− .dev_attr = &omap_mcspi2_dev_attr,
1529−};
1530−
1531−/* mcspi3 */
1532−static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
1533− { .irq = 91 },
1534− { .irq = -1 }
1535−};
1536−
1537−static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
1538− { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
1539− { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
1540− { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
1541− { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
1542− { .dma_req = -1 }
1543−};
1544−
1545−static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
1546− &omap2430_l4_core__mcspi3,
1547−};
1548−
1549−static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1550− .num_chipselect = 2,
1551−};
1552−
1553−static struct omap_hwmod omap2430_mcspi3_hwmod = {
1554− .name = "mcspi3_hwmod",
1555− .mpu_irqs = omap2430_mcspi3_mpu_irqs,
1556− .sdma_reqs = omap2430_mcspi3_sdma_reqs,
1557− .main_clk = "mcspi3_fck",
1558− .prcm = {
1559− .omap2 = {
1560− .module_offs = CORE_MOD,
1561− .prcm_reg_id = 2,
1562− .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
1563− .idlest_reg_id = 2,
1564− .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
1565− },
1566− },
1567− .slaves = omap2430_mcspi3_slaves,
1568− .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
1569− .class = &omap2xxx_mcspi_class,
1570− .dev_attr = &omap_mcspi3_dev_attr,
1571−};
1572−
1573−/*
1574− * usbhsotg
1575− */
1576−static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
1577− .rev_offs = 0x0400,
1578− .sysc_offs = 0x0404,
1579− .syss_offs = 0x0408,
1580− .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1581− SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1582− SYSC_HAS_AUTOIDLE),
1583− .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1584− MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1585− .sysc_fields = &omap_hwmod_sysc_type1,
1586−};
1587−
1588−static struct omap_hwmod_class usbotg_class = {
1589− .name = "usbotg",
1590− .sysc = &omap2430_usbhsotg_sysc,
1591−};
1592−
1593−/* usb_otg_hs */
1594−static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
1595−
1596− { .name = "mc", .irq = 92 },
1597− { .name = "dma", .irq = 93 },
1598− { .irq = -1 }
1599−};
1600−
1601−static struct omap_hwmod omap2430_usbhsotg_hwmod = {
1602− .name = "usb_otg_hs",
1603− .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
1604− .main_clk = "usbhs_ick",
1605− .prcm = {
1606− .omap2 = {
1607− .prcm_reg_id = 1,
1608− .module_bit = OMAP2430_EN_USBHS_MASK,
1609− .module_offs = CORE_MOD,
1610− .idlest_reg_id = 1,
1611− .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
1612− },
1613− },
1614− .masters = omap2430_usbhsotg_masters,
1615− .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
1616− .slaves = omap2430_usbhsotg_slaves,
1617− .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
1618− .class = &usbotg_class,
1619− /*
1620− * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1621− * broken when autoidle is enabled
1622− * workaround is to disable the autoidle bit at module level.
1623− */
1624− .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1625− | HWMOD_SWSUP_MSTANDBY,
1626−};
1627−
1628−/*
1629− * 'mcbsp' class
1630− * multi channel buffered serial port controller
1631− */
1632−
1633−static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
1634− .rev_offs = 0x007C,
1635− .sysc_offs = 0x008C,
1636− .sysc_flags = (SYSC_HAS_SOFTRESET),
1637− .sysc_fields = &omap_hwmod_sysc_type1,
1638−};
1639−
1640−static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
1641− .name = "mcbsp",
1642− .sysc = &omap2430_mcbsp_sysc,
1643− .rev = MCBSP_CONFIG_TYPE2,
1644−};
1645−
1646−/* mcbsp1 */
1647−static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
1648− { .name = "tx", .irq = 59 },
1649− { .name = "rx", .irq = 60 },
1650− { .name = "ovr", .irq = 61 },
1651− { .name = "common", .irq = 64 },
1652− { .irq = -1 }
1653−};
1654−
1655−/* l4_core -> mcbsp1 */
1656−static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1657− .master = &omap2430_l4_core_hwmod,
1658− .slave = &omap2430_mcbsp1_hwmod,
1659− .clk = "mcbsp1_ick",
1660− .addr = omap2_mcbsp1_addrs,
1661− .user = OCP_USER_MPU | OCP_USER_SDMA,
1662−};
1663−
1664−/* mcbsp1 slave ports */
1665−static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1666− &omap2430_l4_core__mcbsp1,
1667−};
1668−
1669−static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1670− .name = "mcbsp1",
1671− .class = &omap2430_mcbsp_hwmod_class,
1672− .mpu_irqs = omap2430_mcbsp1_irqs,
1673− .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1674− .main_clk = "mcbsp1_fck",
1675− .prcm = {
1676− .omap2 = {
1677− .prcm_reg_id = 1,
1678− .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1679− .module_offs = CORE_MOD,
1680− .idlest_reg_id = 1,
1681− .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1682− },
1683− },
1684− .slaves = omap2430_mcbsp1_slaves,
1685− .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
762+ .addr = omap2_mailbox_addrs,
763+ .user = OCP_USER_MPU | OCP_USER_SDMA,
1686764 };
1687765
1688−/* mcbsp2 */
1689−static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
1690− { .name = "tx", .irq = 62 },
1691− { .name = "rx", .irq = 63 },
1692− { .name = "common", .irq = 16 },
1693− { .irq = -1 }
766+/* l4_core -> mcbsp1 */
767+static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
768+ .master = &omap2xxx_l4_core_hwmod,
769+ .slave = &omap2430_mcbsp1_hwmod,
770+ .clk = "mcbsp1_ick",
771+ .addr = omap2_mcbsp1_addrs,
772+ .user = OCP_USER_MPU | OCP_USER_SDMA,
1694773 };
1695774
1696775 /* l4_core -> mcbsp2 */
1697776 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1698− .master = &omap2430_l4_core_hwmod,
777+ .master = &omap2xxx_l4_core_hwmod,
1699778 .slave = &omap2430_mcbsp2_hwmod,
1700779 .clk = "mcbsp2_ick",
1701780 .addr = omap2xxx_mcbsp2_addrs,
1702781 .user = OCP_USER_MPU | OCP_USER_SDMA,
1703782 };
1704783
1705−/* mcbsp2 slave ports */
1706−static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1707− &omap2430_l4_core__mcbsp2,
1708−};
1709−
1710−static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1711− .name = "mcbsp2",
1712− .class = &omap2430_mcbsp_hwmod_class,
1713− .mpu_irqs = omap2430_mcbsp2_irqs,
1714− .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1715− .main_clk = "mcbsp2_fck",
1716− .prcm = {
1717− .omap2 = {
1718− .prcm_reg_id = 1,
1719− .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1720− .module_offs = CORE_MOD,
1721− .idlest_reg_id = 1,
1722− .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1723− },
1724− },
1725− .slaves = omap2430_mcbsp2_slaves,
1726− .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
1727−};
1728−
1729−/* mcbsp3 */
1730−static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
1731− { .name = "tx", .irq = 89 },
1732− { .name = "rx", .irq = 90 },
1733− { .name = "common", .irq = 17 },
1734− { .irq = -1 }
1735−};
1736−
1737784 static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
1738785 {
1739786 .name = "mpu",
@@ -1746,51 +793,13 @@ static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { · 6 unmodified lines
1746793
1747794 /* l4_core -> mcbsp3 */
1748795 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
1749− .master = &omap2430_l4_core_hwmod,
796+ .master = &omap2xxx_l4_core_hwmod,
1750797 .slave = &omap2430_mcbsp3_hwmod,
1751798 .clk = "mcbsp3_ick",
1752799 .addr = omap2430_mcbsp3_addrs,
1753800 .user = OCP_USER_MPU | OCP_USER_SDMA,
1754801 };
1755802
1756−/* mcbsp3 slave ports */
1757−static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
1758− &omap2430_l4_core__mcbsp3,
1759−};
1760−
1761−static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1762− .name = "mcbsp3",
1763− .class = &omap2430_mcbsp_hwmod_class,
1764− .mpu_irqs = omap2430_mcbsp3_irqs,
1765− .sdma_reqs = omap2_mcbsp3_sdma_reqs,
1766− .main_clk = "mcbsp3_fck",
1767− .prcm = {
1768− .omap2 = {
1769− .prcm_reg_id = 1,
1770− .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
1771− .module_offs = CORE_MOD,
1772− .idlest_reg_id = 2,
1773− .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
1774− },
1775− },
1776− .slaves = omap2430_mcbsp3_slaves,
1777− .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
1778−};
1779−
1780−/* mcbsp4 */
1781−static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
1782− { .name = "tx", .irq = 54 },
1783− { .name = "rx", .irq = 55 },
1784− { .name = "common", .irq = 18 },
1785− { .irq = -1 }
1786−};
1787−
1788−static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
1789− { .name = "rx", .dma_req = 20 },
1790− { .name = "tx", .dma_req = 19 },
1791− { .dma_req = -1 }
1792−};
1793−
1794803 static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
1795804 {
1796805 .name = "mpu",
@@ -1803,51 +812,13 @@ static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { · 6 unmodified lines
1803812
1804813 /* l4_core -> mcbsp4 */
1805814 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
1806− .master = &omap2430_l4_core_hwmod,
815+ .master = &omap2xxx_l4_core_hwmod,
1807816 .slave = &omap2430_mcbsp4_hwmod,
1808817 .clk = "mcbsp4_ick",
1809818 .addr = omap2430_mcbsp4_addrs,
1810819 .user = OCP_USER_MPU | OCP_USER_SDMA,
1811820 };
1812821
1813−/* mcbsp4 slave ports */
1814−static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
1815− &omap2430_l4_core__mcbsp4,
1816−};
1817−
1818−static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1819− .name = "mcbsp4",
1820− .class = &omap2430_mcbsp_hwmod_class,
1821− .mpu_irqs = omap2430_mcbsp4_irqs,
1822− .sdma_reqs = omap2430_mcbsp4_sdma_chs,
1823− .main_clk = "mcbsp4_fck",
1824− .prcm = {
1825− .omap2 = {
1826− .prcm_reg_id = 1,
1827− .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
1828− .module_offs = CORE_MOD,
1829− .idlest_reg_id = 2,
1830− .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
1831− },
1832− },
1833− .slaves = omap2430_mcbsp4_slaves,
1834− .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
1835−};
1836−
1837−/* mcbsp5 */
1838−static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
1839− { .name = "tx", .irq = 81 },
1840− { .name = "rx", .irq = 82 },
1841− { .name = "common", .irq = 19 },
1842− { .irq = -1 }
1843−};
1844−
1845−static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
1846− { .name = "rx", .dma_req = 22 },
1847− { .name = "tx", .dma_req = 21 },
1848− { .dma_req = -1 }
1849−};
1850−
1851822 static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
1852823 {
1853824 .name = "mpu",
@@ -1860,213 +831,65 @@ static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { · 6 unmodified lines
1860831
1861832 /* l4_core -> mcbsp5 */
1862833 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
1863− .master = &omap2430_l4_core_hwmod,
834+ .master = &omap2xxx_l4_core_hwmod,
1864835 .slave = &omap2430_mcbsp5_hwmod,
1865836 .clk = "mcbsp5_ick",
1866837 .addr = omap2430_mcbsp5_addrs,
1867838 .user = OCP_USER_MPU | OCP_USER_SDMA,
1868839 };
1869840
1870−/* mcbsp5 slave ports */
1871−static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
1872− &omap2430_l4_core__mcbsp5,
1873−};
1874−
1875−static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1876− .name = "mcbsp5",
1877− .class = &omap2430_mcbsp_hwmod_class,
1878− .mpu_irqs = omap2430_mcbsp5_irqs,
1879− .sdma_reqs = omap2430_mcbsp5_sdma_chs,
1880− .main_clk = "mcbsp5_fck",
1881− .prcm = {
1882− .omap2 = {
1883− .prcm_reg_id = 1,
1884− .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
1885− .module_offs = CORE_MOD,
1886− .idlest_reg_id = 2,
1887− .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
1888− },
1889− },
1890− .slaves = omap2430_mcbsp5_slaves,
1891− .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
1892−};
1893−
1894−/* MMC/SD/SDIO common */
1895−
1896−static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
1897− .rev_offs = 0x1fc,
1898− .sysc_offs = 0x10,
1899− .syss_offs = 0x14,
1900− .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1901− SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1902− SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1903− .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1904− .sysc_fields = &omap_hwmod_sysc_type1,
1905−};
1906−
1907−static struct omap_hwmod_class omap2430_mmc_class = {
1908− .name = "mmc",
1909− .sysc = &omap2430_mmc_sysc,
1910−};
1911−
1912−/* MMC/SD/SDIO1 */
1913−
1914−static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
1915− { .irq = 83 },
1916− { .irq = -1 }
1917−};
1918−
1919−static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
1920− { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
1921− { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
1922− { .dma_req = -1 }
1923−};
1924−
1925−static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
1926− { .role = "dbck", .clk = "mmchsdb1_fck" },
1927−};
1928−
1929−static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
841+static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
842+ &omap2xxx_l3_main__l4_core,
843+ &omap2xxx_mpu__l3_main,
844+ &omap2xxx_dss__l3,
845+ &omap2430_usbhsotg__l3,
846+ &omap2430_l4_core__i2c1,
847+ &omap2430_l4_core__i2c2,
848+ &omap2xxx_l4_core__l4_wkup,
849+ &omap2_l4_core__uart1,
850+ &omap2_l4_core__uart2,
851+ &omap2_l4_core__uart3,
852+ &omap2430_l4_core__usbhsotg,
1930853 &omap2430_l4_core__mmc1,
1931−};
1932−
1933−static struct omap_mmc_dev_attr mmc1_dev_attr = {
1934− .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1935−};
1936−
1937−static struct omap_hwmod omap2430_mmc1_hwmod = {
1938− .name = "mmc1",
1939− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1940− .mpu_irqs = omap2430_mmc1_mpu_irqs,
1941− .sdma_reqs = omap2430_mmc1_sdma_reqs,
1942− .opt_clks = omap2430_mmc1_opt_clks,
1943− .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
1944− .main_clk = "mmchs1_fck",
1945− .prcm = {
1946− .omap2 = {
1947− .module_offs = CORE_MOD,
1948− .prcm_reg_id = 2,
1949− .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
1950− .idlest_reg_id = 2,
1951− .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
1952− },
1953− },
1954− .dev_attr = &mmc1_dev_attr,
1955− .slaves = omap2430_mmc1_slaves,
1956− .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
1957− .class = &omap2430_mmc_class,
1958−};
1959−
1960−/* MMC/SD/SDIO2 */
1961−
1962−static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
1963− { .irq = 86 },
1964− { .irq = -1 }
1965−};
1966−
1967−static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
1968− { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
1969− { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
1970− { .dma_req = -1 }
1971−};
1972−
1973−static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
1974− { .role = "dbck", .clk = "mmchsdb2_fck" },
1975−};
1976−
1977−static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
1978854 &omap2430_l4_core__mmc2,
1979−};
1980−
1981−static struct omap_hwmod omap2430_mmc2_hwmod = {
1982− .name = "mmc2",
1983− .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1984− .mpu_irqs = omap2430_mmc2_mpu_irqs,
1985− .sdma_reqs = omap2430_mmc2_sdma_reqs,
1986− .opt_clks = omap2430_mmc2_opt_clks,
1987− .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
1988− .main_clk = "mmchs2_fck",
1989− .prcm = {
1990− .omap2 = {
1991− .module_offs = CORE_MOD,
1992− .prcm_reg_id = 2,
1993− .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
1994− .idlest_reg_id = 2,
1995− .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
1996− },
1997− },
1998− .slaves = omap2430_mmc2_slaves,
1999− .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
2000− .class = &omap2430_mmc_class,
2001−};
2002−
2003−static __initdata struct omap_hwmod *omap2430_hwmods[] = {
2004− &omap2430_l3_main_hwmod,
2005− &omap2430_l4_core_hwmod,
2006− &omap2430_l4_wkup_hwmod,
2007− &omap2430_mpu_hwmod,
2008− &omap2430_iva_hwmod,
2009−
2010− &omap2430_timer1_hwmod,
2011− &omap2430_timer2_hwmod,
2012− &omap2430_timer3_hwmod,
2013− &omap2430_timer4_hwmod,
2014− &omap2430_timer5_hwmod,
2015− &omap2430_timer6_hwmod,
2016− &omap2430_timer7_hwmod,
2017− &omap2430_timer8_hwmod,
2018− &omap2430_timer9_hwmod,
2019− &omap2430_timer10_hwmod,
2020− &omap2430_timer11_hwmod,
2021− &omap2430_timer12_hwmod,
2022−
2023− &omap2430_wd_timer2_hwmod,
2024− &omap2430_uart1_hwmod,
2025− &omap2430_uart2_hwmod,
2026− &omap2430_uart3_hwmod,
2027− /* dss class */
2028− &omap2430_dss_core_hwmod,
2029− &omap2430_dss_dispc_hwmod,
2030− &omap2430_dss_rfbi_hwmod,
2031− &omap2430_dss_venc_hwmod,
2032− /* i2c class */
2033− &omap2430_i2c1_hwmod,
2034− &omap2430_i2c2_hwmod,
2035− &omap2430_mmc1_hwmod,
2036− &omap2430_mmc2_hwmod,
2037−
2038− /* gpio class */
2039− &omap2430_gpio1_hwmod,
2040− &omap2430_gpio2_hwmod,
2041− &omap2430_gpio3_hwmod,
2042− &omap2430_gpio4_hwmod,
2043− &omap2430_gpio5_hwmod,
2044−
2045− /* dma_system class*/
2046− &omap2430_dma_system_hwmod,
2047−
2048− /* mcbsp class */
2049− &omap2430_mcbsp1_hwmod,
2050− &omap2430_mcbsp2_hwmod,
2051− &omap2430_mcbsp3_hwmod,
2052− &omap2430_mcbsp4_hwmod,
2053− &omap2430_mcbsp5_hwmod,
2054−
2055− /* mailbox class */
2056− &omap2430_mailbox_hwmod,
2057−
2058− /* mcspi class */
2059− &omap2430_mcspi1_hwmod,
2060− &omap2430_mcspi2_hwmod,
2061− &omap2430_mcspi3_hwmod,
2062−
2063− /* usbotg class*/
2064− &omap2430_usbhsotg_hwmod,
2065−
855+ &omap2xxx_l4_core__mcspi1,
856+ &omap2xxx_l4_core__mcspi2,
857+ &omap2430_l4_core__mcspi3,
858+ &omap2430_l3__iva,
859+ &omap2430_l4_wkup__timer1,
860+ &omap2xxx_l4_core__timer2,
861+ &omap2xxx_l4_core__timer3,
862+ &omap2xxx_l4_core__timer4,
863+ &omap2xxx_l4_core__timer5,
864+ &omap2xxx_l4_core__timer6,
865+ &omap2xxx_l4_core__timer7,
866+ &omap2xxx_l4_core__timer8,
867+ &omap2xxx_l4_core__timer9,
868+ &omap2xxx_l4_core__timer10,
869+ &omap2xxx_l4_core__timer11,
870+ &omap2xxx_l4_core__timer12,
871+ &omap2430_l4_wkup__wd_timer2,
872+ &omap2xxx_l4_core__dss,
873+ &omap2xxx_l4_core__dss_dispc,
874+ &omap2xxx_l4_core__dss_rfbi,
875+ &omap2xxx_l4_core__dss_venc,
876+ &omap2430_l4_wkup__gpio1,
877+ &omap2430_l4_wkup__gpio2,
878+ &omap2430_l4_wkup__gpio3,
879+ &omap2430_l4_wkup__gpio4,
880+ &omap2430_l4_core__gpio5,
881+ &omap2430_dma_system__l3,
882+ &omap2430_l4_core__dma_system,
883+ &omap2430_l4_core__mailbox,
884+ &omap2430_l4_core__mcbsp1,
885+ &omap2430_l4_core__mcbsp2,
886+ &omap2430_l4_core__mcbsp3,
887+ &omap2430_l4_core__mcbsp4,
888+ &omap2430_l4_core__mcbsp5,
2066889 NULL,
2067890 };
2068891
2069892 int __init omap2430_hwmod_init(void)
2070893 {
2071− return omap_hwmod_register(omap2430_hwmods);
894+ return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
2072895 }
arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c+255−11
@@ -15,10 +15,12 @@ · 14 unmodified lines
1515
1616 #include <plat/omap_hwmod.h>
1717 #include <plat/serial.h>
18+#include <plat/l3_2xxx.h>
19+#include <plat/l4_2xxx.h>
1820
1921 #include "omap_hwmod_common_data.h"
2022
21−struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
23+static struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
2224 {
2325 .pa_start = OMAP2_UART1_BASE,
2426 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
@@ -27,7 +29,7 @@ struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { · 2 unmodified lines
2729 { }
2830 };
2931
30−struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
32+static struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
3133 {
3234 .pa_start = OMAP2_UART2_BASE,
3335 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
@@ -36,7 +38,7 @@ struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { · 2 unmodified lines
3638 { }
3739 };
3840
39−struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
41+static struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
4042 {
4143 .pa_start = OMAP2_UART3_BASE,
4244 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
@@ -45,7 +47,7 @@ struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { · 2 unmodified lines
4547 { }
4648 };
4749
48−struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
50+static struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
4951 {
5052 .pa_start = 0x4802a000,
5153 .pa_end = 0x4802a000 + SZ_1K - 1,
@@ -54,7 +56,7 @@ struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { · 2 unmodified lines
5456 { }
5557 };
5658
57−struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
59+static struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
5860 {
5961 .pa_start = 0x48078000,
6062 .pa_end = 0x48078000 + SZ_1K - 1,
@@ -63,7 +65,7 @@ struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { · 2 unmodified lines
6365 { }
6466 };
6567
66−struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
68+static struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
6769 {
6870 .pa_start = 0x4807a000,
6971 .pa_end = 0x4807a000 + SZ_1K - 1,
@@ -72,7 +74,7 @@ struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { · 2 unmodified lines
7274 { }
7375 };
7476
75−struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
77+static struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
7678 {
7779 .pa_start = 0x4807c000,
7880 .pa_end = 0x4807c000 + SZ_1K - 1,
@@ -81,7 +83,7 @@ struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { · 2 unmodified lines
8183 { }
8284 };
8385
84−struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
86+static struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
8587 {
8688 .pa_start = 0x4807e000,
8789 .pa_end = 0x4807e000 + SZ_1K - 1,
@@ -90,7 +92,7 @@ struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { · 2 unmodified lines
9092 { }
9193 };
9294
93−struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
95+static struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
9496 {
9597 .pa_start = 0x48080000,
9698 .pa_end = 0x48080000 + SZ_1K - 1,
@@ -99,7 +101,7 @@ struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { · 2 unmodified lines
99101 { }
100102 };
101103
102−struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
104+static struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
103105 {
104106 .pa_start = 0x48082000,
105107 .pa_end = 0x48082000 + SZ_1K - 1,
@@ -108,7 +110,7 @@ struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { · 2 unmodified lines
108110 { }
109111 };
110112
111−struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {
113+static struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {
112114 {
113115 .pa_start = 0x48084000,
114116 .pa_end = 0x48084000 + SZ_1K - 1,
@@ -127,4 +129,246 @@ struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = { · 12 unmodified lines
127129 { }
128130 };
129131
132+/*
133+ * Common interconnect data
134+ */
135+
136+/* L3 -> L4_CORE interface */
137+struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core = {
138+ .master = &omap2xxx_l3_main_hwmod,
139+ .slave = &omap2xxx_l4_core_hwmod,
140+ .user = OCP_USER_MPU | OCP_USER_SDMA,
141+};
142+
143+/* MPU -> L3 interface */
144+struct omap_hwmod_ocp_if omap2xxx_mpu__l3_main = {
145+ .master = &omap2xxx_mpu_hwmod,
146+ .slave = &omap2xxx_l3_main_hwmod,
147+ .user = OCP_USER_MPU,
148+};
149+
150+/* DSS -> l3 */
151+struct omap_hwmod_ocp_if omap2xxx_dss__l3 = {
152+ .master = &omap2xxx_dss_core_hwmod,
153+ .slave = &omap2xxx_l3_main_hwmod,
154+ .fw = {
155+ .omap2 = {
156+ .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
157+ .flags = OMAP_FIREWALL_L3,
158+ }
159+ },
160+ .user = OCP_USER_MPU | OCP_USER_SDMA,
161+};
162+
163+/* L4_CORE -> L4_WKUP interface */
164+struct omap_hwmod_ocp_if omap2xxx_l4_core__l4_wkup = {
165+ .master = &omap2xxx_l4_core_hwmod,
166+ .slave = &omap2xxx_l4_wkup_hwmod,
167+ .user = OCP_USER_MPU | OCP_USER_SDMA,
168+};
169+
170+/* L4 CORE -> UART1 interface */
171+struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
172+ .master = &omap2xxx_l4_core_hwmod,
173+ .slave = &omap2xxx_uart1_hwmod,
174+ .clk = "uart1_ick",
175+ .addr = omap2xxx_uart1_addr_space,
176+ .user = OCP_USER_MPU | OCP_USER_SDMA,
177+};
178+
179+/* L4 CORE -> UART2 interface */
180+struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
181+ .master = &omap2xxx_l4_core_hwmod,
182+ .slave = &omap2xxx_uart2_hwmod,
183+ .clk = "uart2_ick",
184+ .addr = omap2xxx_uart2_addr_space,
185+ .user = OCP_USER_MPU | OCP_USER_SDMA,
186+};
187+
188+/* L4 PER -> UART3 interface */
189+struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
190+ .master = &omap2xxx_l4_core_hwmod,
191+ .slave = &omap2xxx_uart3_hwmod,
192+ .clk = "uart3_ick",
193+ .addr = omap2xxx_uart3_addr_space,
194+ .user = OCP_USER_MPU | OCP_USER_SDMA,
195+};
196+
197+/* l4 core -> mcspi1 interface */
198+struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1 = {
199+ .master = &omap2xxx_l4_core_hwmod,
200+ .slave = &omap2xxx_mcspi1_hwmod,
201+ .clk = "mcspi1_ick",
202+ .addr = omap2_mcspi1_addr_space,
203+ .user = OCP_USER_MPU | OCP_USER_SDMA,
204+};
205+
206+/* l4 core -> mcspi2 interface */
207+struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2 = {
208+ .master = &omap2xxx_l4_core_hwmod,
209+ .slave = &omap2xxx_mcspi2_hwmod,
210+ .clk = "mcspi2_ick",
211+ .addr = omap2_mcspi2_addr_space,
212+ .user = OCP_USER_MPU | OCP_USER_SDMA,
213+};
214+
215+/* l4_core -> timer2 */
216+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2 = {
217+ .master = &omap2xxx_l4_core_hwmod,
218+ .slave = &omap2xxx_timer2_hwmod,
219+ .clk = "gpt2_ick",
220+ .addr = omap2xxx_timer2_addrs,
221+ .user = OCP_USER_MPU | OCP_USER_SDMA,
222+};
223+
224+/* l4_core -> timer3 */
225+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3 = {
226+ .master = &omap2xxx_l4_core_hwmod,
227+ .slave = &omap2xxx_timer3_hwmod,
228+ .clk = "gpt3_ick",
229+ .addr = omap2xxx_timer3_addrs,
230+ .user = OCP_USER_MPU | OCP_USER_SDMA,
231+};
232+
233+/* l4_core -> timer4 */
234+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4 = {
235+ .master = &omap2xxx_l4_core_hwmod,
236+ .slave = &omap2xxx_timer4_hwmod,
237+ .clk = "gpt4_ick",
238+ .addr = omap2xxx_timer4_addrs,
239+ .user = OCP_USER_MPU | OCP_USER_SDMA,
240+};
241+
242+/* l4_core -> timer5 */
243+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5 = {
244+ .master = &omap2xxx_l4_core_hwmod,
245+ .slave = &omap2xxx_timer5_hwmod,
246+ .clk = "gpt5_ick",
247+ .addr = omap2xxx_timer5_addrs,
248+ .user = OCP_USER_MPU | OCP_USER_SDMA,
249+};
250+
251+/* l4_core -> timer6 */
252+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer6 = {
253+ .master = &omap2xxx_l4_core_hwmod,
254+ .slave = &omap2xxx_timer6_hwmod,
255+ .clk = "gpt6_ick",
256+ .addr = omap2xxx_timer6_addrs,
257+ .user = OCP_USER_MPU | OCP_USER_SDMA,
258+};
259+
260+/* l4_core -> timer7 */
261+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer7 = {
262+ .master = &omap2xxx_l4_core_hwmod,
263+ .slave = &omap2xxx_timer7_hwmod,
264+ .clk = "gpt7_ick",
265+ .addr = omap2xxx_timer7_addrs,
266+ .user = OCP_USER_MPU | OCP_USER_SDMA,
267+};
268+
269+/* l4_core -> timer8 */
270+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer8 = {
271+ .master = &omap2xxx_l4_core_hwmod,
272+ .slave = &omap2xxx_timer8_hwmod,
273+ .clk = "gpt8_ick",
274+ .addr = omap2xxx_timer8_addrs,
275+ .user = OCP_USER_MPU | OCP_USER_SDMA,
276+};
277+
278+/* l4_core -> timer9 */
279+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer9 = {
280+ .master = &omap2xxx_l4_core_hwmod,
281+ .slave = &omap2xxx_timer9_hwmod,
282+ .clk = "gpt9_ick",
283+ .addr = omap2xxx_timer9_addrs,
284+ .user = OCP_USER_MPU | OCP_USER_SDMA,
285+};
286+
287+/* l4_core -> timer10 */
288+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer10 = {
289+ .master = &omap2xxx_l4_core_hwmod,
290+ .slave = &omap2xxx_timer10_hwmod,
291+ .clk = "gpt10_ick",
292+ .addr = omap2_timer10_addrs,
293+ .user = OCP_USER_MPU | OCP_USER_SDMA,
294+};
295+
296+/* l4_core -> timer11 */
297+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer11 = {
298+ .master = &omap2xxx_l4_core_hwmod,
299+ .slave = &omap2xxx_timer11_hwmod,
300+ .clk = "gpt11_ick",
301+ .addr = omap2_timer11_addrs,
302+ .user = OCP_USER_MPU | OCP_USER_SDMA,
303+};
304+
305+/* l4_core -> timer12 */
306+struct omap_hwmod_ocp_if omap2xxx_l4_core__timer12 = {
307+ .master = &omap2xxx_l4_core_hwmod,
308+ .slave = &omap2xxx_timer12_hwmod,
309+ .clk = "gpt12_ick",
310+ .addr = omap2xxx_timer12_addrs,
311+ .user = OCP_USER_MPU | OCP_USER_SDMA,
312+};
313+
314+/* l4_core -> dss */
315+struct omap_hwmod_ocp_if omap2xxx_l4_core__dss = {
316+ .master = &omap2xxx_l4_core_hwmod,
317+ .slave = &omap2xxx_dss_core_hwmod,
318+ .clk = "dss_ick",
319+ .addr = omap2_dss_addrs,
320+ .fw = {
321+ .omap2 = {
322+ .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
323+ .flags = OMAP_FIREWALL_L4,
324+ }
325+ },
326+ .user = OCP_USER_MPU | OCP_USER_SDMA,
327+};
328+
329+/* l4_core -> dss_dispc */
330+struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc = {
331+ .master = &omap2xxx_l4_core_hwmod,
332+ .slave = &omap2xxx_dss_dispc_hwmod,
333+ .clk = "dss_ick",
334+ .addr = omap2_dss_dispc_addrs,
335+ .fw = {
336+ .omap2 = {
337+ .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
338+ .flags = OMAP_FIREWALL_L4,
339+ }
340+ },
341+ .user = OCP_USER_MPU | OCP_USER_SDMA,
342+};
343+
344+/* l4_core -> dss_rfbi */
345+struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi = {
346+ .master = &omap2xxx_l4_core_hwmod,
347+ .slave = &omap2xxx_dss_rfbi_hwmod,
348+ .clk = "dss_ick",
349+ .addr = omap2_dss_rfbi_addrs,
350+ .fw = {
351+ .omap2 = {
352+ .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
353+ .flags = OMAP_FIREWALL_L4,
354+ }
355+ },
356+ .user = OCP_USER_MPU | OCP_USER_SDMA,
357+};
358+
359+/* l4_core -> dss_venc */
360+struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc = {
361+ .master = &omap2xxx_l4_core_hwmod,
362+ .slave = &omap2xxx_dss_venc_hwmod,
363+ .clk = "dss_ick",
364+ .addr = omap2_dss_venc_addrs,
365+ .fw = {
366+ .omap2 = {
367+ .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
368+ .flags = OMAP_FIREWALL_L4,
369+ }
370+ },
371+ .flags = OCPIF_SWSUP_IDLE,
372+ .user = OCP_USER_MPU | OCP_USER_SDMA,
373+};
130374
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c+562−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 */
1111 #include <plat/omap_hwmod.h>
1212 #include <plat/serial.h>
13+#include <plat/gpio.h>
1314 #include <plat/dma.h>
1415 #include <plat/dmtimer.h>
1516 #include <plat/mcspi.h>
@@ -17,6 +18,8 @@ · 1 unmodified line
1718 #include <mach/irqs.h>
1819
1920 #include "omap_hwmod_common_data.h"
21+#include "cm-regbits-24xx.h"
22+#include "prm-regbits-24xx.h"
2023 #include "wd_timer.h"
2124
2225 struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
@@ -170,3 +173,562 @@ struct omap_hwmod_class omap2xxx_mcspi_class = { · 147 unmodified lines
170173 .sysc = &omap2xxx_mcspi_sysc,
171174 .rev = OMAP2_MCSPI_REV,
172175 };
176+
177+/*
178+ * IP blocks
179+ */
180+
181+/* L3 */
182+struct omap_hwmod omap2xxx_l3_main_hwmod = {
183+ .name = "l3_main",
184+ .class = &l3_hwmod_class,
185+ .flags = HWMOD_NO_IDLEST,
186+};
187+
188+/* L4 CORE */
189+struct omap_hwmod omap2xxx_l4_core_hwmod = {
190+ .name = "l4_core",
191+ .class = &l4_hwmod_class,
192+ .flags = HWMOD_NO_IDLEST,
193+};
194+
195+/* L4 WKUP */
196+struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
197+ .name = "l4_wkup",
198+ .class = &l4_hwmod_class,
199+ .flags = HWMOD_NO_IDLEST,
200+};
201+
202+/* MPU */
203+struct omap_hwmod omap2xxx_mpu_hwmod = {
204+ .name = "mpu",
205+ .class = &mpu_hwmod_class,
206+ .main_clk = "mpu_ck",
207+};
208+
209+/* IVA2 */
210+struct omap_hwmod omap2xxx_iva_hwmod = {
211+ .name = "iva",
212+ .class = &iva_hwmod_class,
213+};
214+
215+/* always-on timers dev attribute */
216+static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
217+ .timer_capability = OMAP_TIMER_ALWON,
218+};
219+
220+/* pwm timers dev attribute */
221+static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
222+ .timer_capability = OMAP_TIMER_HAS_PWM,
223+};
224+
225+/* timer1 */
226+
227+struct omap_hwmod omap2xxx_timer1_hwmod = {
228+ .name = "timer1",
229+ .mpu_irqs = omap2_timer1_mpu_irqs,
230+ .main_clk = "gpt1_fck",
231+ .prcm = {
232+ .omap2 = {
233+ .prcm_reg_id = 1,
234+ .module_bit = OMAP24XX_EN_GPT1_SHIFT,
235+ .module_offs = WKUP_MOD,
236+ .idlest_reg_id = 1,
237+ .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
238+ },
239+ },
240+ .dev_attr = &capability_alwon_dev_attr,
241+ .class = &omap2xxx_timer_hwmod_class,
242+};
243+
244+/* timer2 */
245+
246+struct omap_hwmod omap2xxx_timer2_hwmod = {
247+ .name = "timer2",
248+ .mpu_irqs = omap2_timer2_mpu_irqs,
249+ .main_clk = "gpt2_fck",
250+ .prcm = {
251+ .omap2 = {
252+ .prcm_reg_id = 1,
253+ .module_bit = OMAP24XX_EN_GPT2_SHIFT,
254+ .module_offs = CORE_MOD,
255+ .idlest_reg_id = 1,
256+ .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
257+ },
258+ },
259+ .dev_attr = &capability_alwon_dev_attr,
260+ .class = &omap2xxx_timer_hwmod_class,
261+};
262+
263+/* timer3 */
264+
265+struct omap_hwmod omap2xxx_timer3_hwmod = {
266+ .name = "timer3",
267+ .mpu_irqs = omap2_timer3_mpu_irqs,
268+ .main_clk = "gpt3_fck",
269+ .prcm = {
270+ .omap2 = {
271+ .prcm_reg_id = 1,
272+ .module_bit = OMAP24XX_EN_GPT3_SHIFT,
273+ .module_offs = CORE_MOD,
274+ .idlest_reg_id = 1,
275+ .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
276+ },
277+ },
278+ .dev_attr = &capability_alwon_dev_attr,
279+ .class = &omap2xxx_timer_hwmod_class,
280+};
281+
282+/* timer4 */
283+
284+struct omap_hwmod omap2xxx_timer4_hwmod = {
285+ .name = "timer4",
286+ .mpu_irqs = omap2_timer4_mpu_irqs,
287+ .main_clk = "gpt4_fck",
288+ .prcm = {
289+ .omap2 = {
290+ .prcm_reg_id = 1,
291+ .module_bit = OMAP24XX_EN_GPT4_SHIFT,
292+ .module_offs = CORE_MOD,
293+ .idlest_reg_id = 1,
294+ .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
295+ },
296+ },
297+ .dev_attr = &capability_alwon_dev_attr,
298+ .class = &omap2xxx_timer_hwmod_class,
299+};
300+
301+/* timer5 */
302+
303+struct omap_hwmod omap2xxx_timer5_hwmod = {
304+ .name = "timer5",
305+ .mpu_irqs = omap2_timer5_mpu_irqs,
306+ .main_clk = "gpt5_fck",
307+ .prcm = {
308+ .omap2 = {
309+ .prcm_reg_id = 1,
310+ .module_bit = OMAP24XX_EN_GPT5_SHIFT,
311+ .module_offs = CORE_MOD,
312+ .idlest_reg_id = 1,
313+ .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
314+ },
315+ },
316+ .dev_attr = &capability_alwon_dev_attr,
317+ .class = &omap2xxx_timer_hwmod_class,
318+};
319+
320+/* timer6 */
321+
322+struct omap_hwmod omap2xxx_timer6_hwmod = {
323+ .name = "timer6",
324+ .mpu_irqs = omap2_timer6_mpu_irqs,
325+ .main_clk = "gpt6_fck",
326+ .prcm = {
327+ .omap2 = {
328+ .prcm_reg_id = 1,
329+ .module_bit = OMAP24XX_EN_GPT6_SHIFT,
330+ .module_offs = CORE_MOD,
331+ .idlest_reg_id = 1,
332+ .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
333+ },
334+ },
335+ .dev_attr = &capability_alwon_dev_attr,
336+ .class = &omap2xxx_timer_hwmod_class,
337+};
338+
339+/* timer7 */
340+
341+struct omap_hwmod omap2xxx_timer7_hwmod = {
342+ .name = "timer7",
343+ .mpu_irqs = omap2_timer7_mpu_irqs,
344+ .main_clk = "gpt7_fck",
345+ .prcm = {
346+ .omap2 = {
347+ .prcm_reg_id = 1,
348+ .module_bit = OMAP24XX_EN_GPT7_SHIFT,
349+ .module_offs = CORE_MOD,
350+ .idlest_reg_id = 1,
351+ .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
352+ },
353+ },
354+ .dev_attr = &capability_alwon_dev_attr,
355+ .class = &omap2xxx_timer_hwmod_class,
356+};
357+
358+/* timer8 */
359+
360+struct omap_hwmod omap2xxx_timer8_hwmod = {
361+ .name = "timer8",
362+ .mpu_irqs = omap2_timer8_mpu_irqs,
363+ .main_clk = "gpt8_fck",
364+ .prcm = {
365+ .omap2 = {
366+ .prcm_reg_id = 1,
367+ .module_bit = OMAP24XX_EN_GPT8_SHIFT,
368+ .module_offs = CORE_MOD,
369+ .idlest_reg_id = 1,
370+ .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
371+ },
372+ },
373+ .dev_attr = &capability_alwon_dev_attr,
374+ .class = &omap2xxx_timer_hwmod_class,
375+};
376+
377+/* timer9 */
378+
379+struct omap_hwmod omap2xxx_timer9_hwmod = {
380+ .name = "timer9",
381+ .mpu_irqs = omap2_timer9_mpu_irqs,
382+ .main_clk = "gpt9_fck",
383+ .prcm = {
384+ .omap2 = {
385+ .prcm_reg_id = 1,
386+ .module_bit = OMAP24XX_EN_GPT9_SHIFT,
387+ .module_offs = CORE_MOD,
388+ .idlest_reg_id = 1,
389+ .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
390+ },
391+ },
392+ .dev_attr = &capability_pwm_dev_attr,
393+ .class = &omap2xxx_timer_hwmod_class,
394+};
395+
396+/* timer10 */
397+
398+struct omap_hwmod omap2xxx_timer10_hwmod = {
399+ .name = "timer10",
400+ .mpu_irqs = omap2_timer10_mpu_irqs,
401+ .main_clk = "gpt10_fck",
402+ .prcm = {
403+ .omap2 = {
404+ .prcm_reg_id = 1,
405+ .module_bit = OMAP24XX_EN_GPT10_SHIFT,
406+ .module_offs = CORE_MOD,
407+ .idlest_reg_id = 1,
408+ .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
409+ },
410+ },
411+ .dev_attr = &capability_pwm_dev_attr,
412+ .class = &omap2xxx_timer_hwmod_class,
413+};
414+
415+/* timer11 */
416+
417+struct omap_hwmod omap2xxx_timer11_hwmod = {
418+ .name = "timer11",
419+ .mpu_irqs = omap2_timer11_mpu_irqs,
420+ .main_clk = "gpt11_fck",
421+ .prcm = {
422+ .omap2 = {
423+ .prcm_reg_id = 1,
424+ .module_bit = OMAP24XX_EN_GPT11_SHIFT,
425+ .module_offs = CORE_MOD,
426+ .idlest_reg_id = 1,
427+ .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
428+ },
429+ },
430+ .dev_attr = &capability_pwm_dev_attr,
431+ .class = &omap2xxx_timer_hwmod_class,
432+};
433+
434+/* timer12 */
435+
436+struct omap_hwmod omap2xxx_timer12_hwmod = {
437+ .name = "timer12",
438+ .mpu_irqs = omap2xxx_timer12_mpu_irqs,
439+ .main_clk = "gpt12_fck",
440+ .prcm = {
441+ .omap2 = {
442+ .prcm_reg_id = 1,
443+ .module_bit = OMAP24XX_EN_GPT12_SHIFT,
444+ .module_offs = CORE_MOD,
445+ .idlest_reg_id = 1,
446+ .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
447+ },
448+ },
449+ .dev_attr = &capability_pwm_dev_attr,
450+ .class = &omap2xxx_timer_hwmod_class,
451+};
452+
453+/* wd_timer2 */
454+struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
455+ .name = "wd_timer2",
456+ .class = &omap2xxx_wd_timer_hwmod_class,
457+ .main_clk = "mpu_wdt_fck",
458+ .prcm = {
459+ .omap2 = {
460+ .prcm_reg_id = 1,
461+ .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
462+ .module_offs = WKUP_MOD,
463+ .idlest_reg_id = 1,
464+ .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
465+ },
466+ },
467+};
468+
469+/* UART1 */
470+
471+struct omap_hwmod omap2xxx_uart1_hwmod = {
472+ .name = "uart1",
473+ .mpu_irqs = omap2_uart1_mpu_irqs,
474+ .sdma_reqs = omap2_uart1_sdma_reqs,
475+ .main_clk = "uart1_fck",
476+ .prcm = {
477+ .omap2 = {
478+ .module_offs = CORE_MOD,
479+ .prcm_reg_id = 1,
480+ .module_bit = OMAP24XX_EN_UART1_SHIFT,
481+ .idlest_reg_id = 1,
482+ .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
483+ },
484+ },
485+ .class = &omap2_uart_class,
486+};
487+
488+/* UART2 */
489+
490+struct omap_hwmod omap2xxx_uart2_hwmod = {
491+ .name = "uart2",
492+ .mpu_irqs = omap2_uart2_mpu_irqs,
493+ .sdma_reqs = omap2_uart2_sdma_reqs,
494+ .main_clk = "uart2_fck",
495+ .prcm = {
496+ .omap2 = {
497+ .module_offs = CORE_MOD,
498+ .prcm_reg_id = 1,
499+ .module_bit = OMAP24XX_EN_UART2_SHIFT,
500+ .idlest_reg_id = 1,
501+ .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
502+ },
503+ },
504+ .class = &omap2_uart_class,
505+};
506+
507+/* UART3 */
508+
509+struct omap_hwmod omap2xxx_uart3_hwmod = {
510+ .name = "uart3",
511+ .mpu_irqs = omap2_uart3_mpu_irqs,
512+ .sdma_reqs = omap2_uart3_sdma_reqs,
513+ .main_clk = "uart3_fck",
514+ .prcm = {
515+ .omap2 = {
516+ .module_offs = CORE_MOD,
517+ .prcm_reg_id = 2,
518+ .module_bit = OMAP24XX_EN_UART3_SHIFT,
519+ .idlest_reg_id = 2,
520+ .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
521+ },
522+ },
523+ .class = &omap2_uart_class,
524+};
525+
526+/* dss */
527+
528+static struct omap_hwmod_opt_clk dss_opt_clks[] = {
529+ /*
530+ * The DSS HW needs all DSS clocks enabled during reset. The dss_core
531+ * driver does not use these clocks.
532+ */
533+ { .role = "tv_clk", .clk = "dss_54m_fck" },
534+ { .role = "sys_clk", .clk = "dss2_fck" },
535+};
536+
537+struct omap_hwmod omap2xxx_dss_core_hwmod = {
538+ .name = "dss_core",
539+ .class = &omap2_dss_hwmod_class,
540+ .main_clk = "dss1_fck", /* instead of dss_fck */
541+ .sdma_reqs = omap2xxx_dss_sdma_chs,

193 more lines aren’t shown here.

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c+2256−2743

This diff is large: its 5970 lines aren’t shown here.

arch/arm/mach-omap2/omap_hwmod_44xx_data.c+2099−2988

This diff is large: its 6392 lines aren’t shown here.

arch/arm/mach-omap2/omap_hwmod_common_data.h+59−12

This diff is large: its 92 lines aren’t shown here.

arch/arm/mach-omap2/pm.h+0−21

This diff is large: its 28 lines aren’t shown here.

arch/arm/mach-omap2/pm24xx.c+0−3

This diff is large: its 17 lines aren’t shown here.

arch/arm/mach-omap2/pm34xx.c+3−7

This diff is large: its 39 lines aren’t shown here.

arch/arm/mach-omap2/prm_common.c+3−1

This diff is large: its 18 lines aren’t shown here.

arch/arm/mach-omap2/serial.c+1−1

This diff is large: its 9 lines aren’t shown here.

arch/arm/mach-omap2/timer.c+12−3

This diff is large: its 31 lines aren’t shown here.

arch/arm/mach-omap2/usb-tusb6010.c+1−1

This diff is large: its 9 lines aren’t shown here.

arch/arm/mach-orion5x/Kconfig+0−1

This diff is large: its 8 lines aren’t shown here.

arch/arm/mach-orion5x/addr-map.c+1−1

This diff is large: its 9 lines aren’t shown here.

arch/arm/mach-orion5x/common.c+1−1

This diff is large: its 9 lines aren’t shown here.

arch/arm/mach-orion5x/common.h+1−0

This diff is large: its 8 lines aren’t shown here.

arch/arm/mach-orion5x/ts78xx-fpga.h+3−3

This diff is large: its 13 lines aren’t shown here.

arch/arm/mach-orion5x/ts78xx-setup.c+24−28

This diff is large: its 166 lines aren’t shown here.

arch/arm/mach-s3c24xx/bast-ide.c+6−30

This diff is large: its 50 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-amlm5900.c+2−7

This diff is large: its 16 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-anubis.c+11−51

This diff is large: its 90 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-at2440evb.c+4−15

This diff is large: its 26 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-bast.c+9−36

This diff is large: its 66 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-gta02.c+2−5

This diff is large: its 14 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-h1940.c+2−7

This diff is large: its 16 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-mini2440.c+4−15

This diff is large: its 26 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-nexcoder.c+1−5

This diff is large: its 13 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-osiris.c+2−10

This diff is large: its 19 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-otom.c+1−5

This diff is large: its 13 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-qt2410.c+2−10

This diff is large: its 19 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-rx1950.c+2−7

This diff is large: its 16 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-tct_hammer.c+2−5

This diff is large: its 14 lines aren’t shown here.

arch/arm/mach-s3c24xx/mach-vr1000.c+8−31

This diff is large: its 49 lines aren’t shown here.

arch/arm/mach-s3c24xx/simtec-nor.c+1−5

This diff is large: its 13 lines aren’t shown here.

arch/arm/mach-s3c64xx/dev-audio.c+20−100

This diff is large: its 162 lines aren’t shown here.

arch/arm/mach-s3c64xx/dev-uart.c+8−40

This diff is large: its 64 lines aren’t shown here.

arch/arm/mach-s3c64xx/mach-anw6410.c+4−15

This diff is large: its 26 lines aren’t shown here.

arch/arm/mach-s3c64xx/mach-crag6410.c+5−21

This diff is large: its 40 lines aren’t shown here.

arch/arm/mach-s3c64xx/mach-mini6410.c+4−15

This diff is large: its 26 lines aren’t shown here.

arch/arm/mach-s3c64xx/mach-real6410.c+4−15

This diff is large: its 26 lines aren’t shown here.

arch/arm/mach-s3c64xx/mach-smdk6410.c+3−10

This diff is large: its 20 lines aren’t shown here.

arch/arm/mach-s5p64x0/dev-audio.c+12−60

This diff is large: its 100 lines aren’t shown here.

arch/arm/mach-s5pc100/dev-audio.c+23−115

This diff is large: its 187 lines aren’t shown here.

arch/arm/mach-s5pv210/dev-audio.c+26−130

This diff is large: its 212 lines aren’t shown here.

arch/arm/mach-s5pv210/mach-smdkv210.c+4−15

This diff is large: its 26 lines aren’t shown here.

arch/arm/mach-tegra/board-dt-tegra20.c+0−1

This diff is large: its 8 lines aren’t shown here.

arch/arm/mach-tegra/include/mach/dma.h+0−4

This diff is large: its 15 lines aren’t shown here.

arch/arm/mach-ux500/Kconfig+0−25

This diff is large: its 46 lines aren’t shown here.

arch/arm/mach-ux500/Makefile+0−5

This diff is large: its 17 lines aren’t shown here.

arch/arm/mach-ux500/board-u5500-sdi.c+0−74

This diff is large: its 75 lines aren’t shown here.

arch/arm/mach-ux500/board-u5500.c+0−162

This diff is large: its 163 lines aren’t shown here.

arch/arm/mach-ux500/cache-l2x0.c+1−3

This diff is large: its 11 lines aren’t shown here.

arch/arm/mach-ux500/clock.c+1−11

This diff is large: its 26 lines aren’t shown here.

arch/arm/mach-ux500/cpu-db5500.c+0−247

This diff is large: its 248 lines aren’t shown here.

arch/arm/mach-ux500/cpu.c+1−7

This diff is large: its 29 lines aren’t shown here.

arch/arm/mach-ux500/devices-db5500.h+0−99

This diff is large: its 100 lines aren’t shown here.

arch/arm/mach-ux500/dma-db5500.c+0−137

This diff is large: its 138 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/db5500-regs.h+0−143

This diff is large: its 144 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/debug-macro.S+0−4

This diff is large: its 11 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/devices.h+0−1

This diff is large: its 8 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/hardware.h+0−1

This diff is large: its 8 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/irqs-board-u5500.h+0−21

This diff is large: its 22 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/irqs-db5500.h+0−113

This diff is large: its 114 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/irqs.h+0−5

This diff is large: its 19 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/mbox-db5500.h+0−88

This diff is large: its 89 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/setup.h+0−6

This diff is large: its 19 lines aren’t shown here.

arch/arm/mach-ux500/include/mach/uncompress.h+2−5

This diff is large: its 14 lines aren’t shown here.

arch/arm/mach-ux500/mbox-db5500.c+0−565

This diff is large: its 566 lines aren’t shown here.

arch/arm/mach-ux500/modem-irq-db5500.c+0−143

This diff is large: its 144 lines aren’t shown here.

arch/arm/mach-ux500/pins-db5500.h+0−620

This diff is large: its 621 lines aren’t shown here.

arch/arm/mach-ux500/platsmp.c+2−6

This diff is large: its 22 lines aren’t shown here.

arch/arm/mach-ux500/ste-dma40-db5500.h+0−135

This diff is large: its 136 lines aren’t shown here.

arch/arm/mach-ux500/timer.c+4−9

This diff is large: its 41 lines aren’t shown here.

arch/arm/plat-mxc/include/mach/iomux-mx51.h+24−24

This diff is large: its 165 lines aren’t shown here.

arch/arm/plat-mxc/include/mach/iomux-mx53.h+2−2

This diff is large: its 18 lines aren’t shown here.

arch/arm/plat-omap/Makefile+0−3

This diff is large: its 10 lines aren’t shown here.

arch/arm/plat-omap/common.c+1−0

This diff is large: its 8 lines aren’t shown here.

arch/arm/plat-omap/dma.c+11−2

This diff is large: its 34 lines aren’t shown here.

arch/arm/plat-omap/dmtimer.c+2−1

This diff is large: its 14 lines aren’t shown here.

arch/arm/plat-omap/include/plat/board.h+2−0

This diff is large: its 9 lines aren’t shown here.

arch/arm/plat-omap/include/plat/common.h+2−0

This diff is large: its 9 lines aren’t shown here.

arch/arm/plat-omap/include/plat/dma.h+1−0

This diff is large: its 8 lines aren’t shown here.

arch/arm/plat-omap/include/plat/dmtimer.h+2−2

This diff is large: its 15 lines aren’t shown here.

arch/arm/plat-omap/include/plat/omap_hwmod.h+30−10

This diff is large: its 129 lines aren’t shown here.

arch/arm/plat-omap/omap_device.c+0−2

This diff is large: its 14 lines aren’t shown here.

arch/arm/plat-omap/sram.c+2−2

This diff is large: its 11 lines aren’t shown here.

arch/arm/plat-omap/usb.c+3−5

This diff is large: its 49 lines aren’t shown here.

arch/arm/plat-samsung/devs.c+2−14

This diff is large: its 51 lines aren’t shown here.

arch/arm/plat-samsung/include/plat/sdhci.h+0−7

This diff is large: its 27 lines aren’t shown here.

arch/arm/plat-samsung/platformdata.c+0−2

This diff is large: its 7 lines aren’t shown here.

drivers/char/hw_random/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/clocksource/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/input/touchscreen/Kconfig+2−2

This diff is large: its 13 lines aren’t shown here.

drivers/mfd/Kconfig+0−27

This diff is large: its 41 lines aren’t shown here.

drivers/mfd/Makefile+0−3

This diff is large: its 16 lines aren’t shown here.

drivers/mfd/ab5500-core.c+0−1439

This diff is large: its 1440 lines aren’t shown here.

drivers/mfd/ab5500-debugfs.c+0−807

This diff is large: its 808 lines aren’t shown here.

drivers/mfd/ab5500-debugfs.h+0−22

This diff is large: its 23 lines aren’t shown here.

drivers/mfd/db5500-prcmu.c+0−451

This diff is large: its 452 lines aren’t shown here.

drivers/mtd/nand/autcpu12.c+4−6

This diff is large: its 25 lines aren’t shown here.

drivers/mtd/nand/h1910.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/net/irda/Kconfig+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/rtc/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/tty/serial/clps711x.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/usb/host/ohci-omap.c+3−2

This diff is large: its 12 lines aren’t shown here.

drivers/video/clps711xfb.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/video/omap2/displays/Kconfig+4−4

This diff is large: its 17 lines aren’t shown here.

drivers/video/omap2/displays/Makefile+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/video/omap2/displays/panel-taal.c+22−0

This diff is large: its 52 lines aren’t shown here.

drivers/video/omap2/displays/panel-tfp410.crenamed from drivers/video/omap2/displays/panel-dvi.c+76−58

This diff is large: its 345 lines aren’t shown here.

drivers/video/omap2/dss/dsi.c+68−65

This diff is large: its 154 lines aren’t shown here.

include/linux/mfd/abx500.h+1−4

This diff is large: its 19 lines aren’t shown here.

include/linux/mfd/abx500/ab5500.h+0−140

This diff is large: its 141 lines aren’t shown here.

include/linux/mfd/db5500-prcmu.h+0−105

This diff is large: its 106 lines aren’t shown here.

include/linux/mfd/dbx500-prcmu.h+43−199

This diff is large: its 443 lines aren’t shown here.

include/video/omap-panel-nokia-dsi.h+3−0

This diff is large: its 17 lines aren’t shown here.

include/video/omap-panel-tfp410.hrenamed from include/video/omap-panel-dvi.h+8−10

This diff is large: its 36 lines aren’t shown here.

include/video/omapdss.h+17−11

This diff is large: its 49 lines aren’t shown here.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t