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
4 - requirements for booting4 - requirements for booting
5Interrupts5Interrupts
6 - ARM Interrupt subsystem documentation6 - ARM Interrupt subsystem documentation
7IXP2000
8 - Release Notes for Linux on Intel's IXP2000 Network Processor
9msm7msm
10 - MSM specific documentation8 - MSM specific documentation
11Netwinder9Netwinder
Documentation/arm/IXP2000+0−69
@@ -1,69 +0,0 @@
1
2-------------------------------------------------------------------------
3Release Notes for Linux on Intel's IXP2000 Network Processor
4
5Maintained by Deepak Saxena <dsaxena@plexity.net>
6-------------------------------------------------------------------------
7
81. Overview
9
10Intel's IXP2000 family of NPUs (IXP2400, IXP2800, IXP2850) is designed
11for high-performance network applications such high-availability
12telecom systems. In addition to an XScale core, it contains up to 8
13"MicroEngines" that run special code, several high-end networking
14interfaces (UTOPIA, SPI, etc), a PCI host bridge, one serial port,
15flash interface, and some other odds and ends. For more information, see:
16
17http://developer.intel.com
18
192. Linux Support
20
21Linux 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
29That is about all we can support under Linux ATM b/c the core networking
30components of the chip are accessed via Intel's closed source SDK.
31Please contact Intel directly on issues with using those. There is
32also a mailing list run by some folks at Princeton University that might
33be of help: https://lists.cs.princeton.edu/mailman/listinfo/ixp2xxx
34
35WHATEVER YOU DO, DO NOT POST EMAIL TO THE LINUX-ARM OR LINUX-ARM-KERNEL
36MAILING LISTS REGARDING THE INTEL SDK.
37
383. 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
464. 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
585. Thanks
59
60The IXP2000 work has been funded by Intel Corp. and MontaVista Software, Inc.
61
62The following people have contributed patches/comments/etc:
63
64Naeem F. Afzal
65Lennert Buytenhek
66Jeffrey Daly
67
68-------------------------------------------------------------------------
69Last Update: 8/09/2004
MAINTAINERS+0−17
@@ -640,13 +640,6 @@ S: Maintained · 639 unmodified lines
640F: drivers/amba/640F: drivers/amba/
641F: include/linux/amba/bus.h641F: include/linux/amba/bus.h
642 642
643ARM/ADI ROADRUNNER MACHINE SUPPORT
644M: Lennert Buytenhek <kernel@wantstofly.org>
645L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
646S: Maintained
647F: arch/arm/mach-ixp23xx/
648F: arch/arm/mach-ixp23xx/include/mach/
649
650ARM/ADS SPHERE MACHINE SUPPORT643ARM/ADS SPHERE MACHINE SUPPORT
651M: Lennert Buytenhek <kernel@wantstofly.org>644M: Lennert Buytenhek <kernel@wantstofly.org>
652L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)645L: 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
862L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)855L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
863S: Maintained856S: Maintained
864 857
865ARM/INTEL IXP2000 ARM ARCHITECTURE
866M: Lennert Buytenhek <kernel@wantstofly.org>
867L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
868S: Maintained
869
870ARM/INTEL IXDP2850 MACHINE SUPPORT858ARM/INTEL IXDP2850 MACHINE SUPPORT
871M: Lennert Buytenhek <kernel@wantstofly.org>859M: Lennert Buytenhek <kernel@wantstofly.org>
872L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)860L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
873S: Maintained861S: Maintained
874 862
875ARM/INTEL IXP23XX ARM ARCHITECTURE
876M: Lennert Buytenhek <kernel@wantstofly.org>
877L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
878S: Maintained
879
880ARM/INTEL IXP4XX ARM ARCHITECTURE863ARM/INTEL IXP4XX ARM ARCHITECTURE
881M: Imre Kaloz <kaloz@openwrt.org>864M: Imre Kaloz <kaloz@openwrt.org>
882M: Krzysztof Halasa <khc@pm.waw.pl>865M: Krzysztof Halasa <khc@pm.waw.pl>
arch/arm/Kconfig+4−30
@@ -336,8 +336,8 @@ config ARCH_AT91 · 335 unmodified lines
336 select IRQ_DOMAIN336 select IRQ_DOMAIN
337 select NEED_MACH_IO_H if PCCARD337 select NEED_MACH_IO_H if PCCARD
338 help338 help
339 This enables support for systems based on the Atmel AT91RM9200,339 This enables support for systems based on Atmel
340 AT91SAM9 processors.340 AT91RM9200 and AT91SAM9* processors.
341 341
342config ARCH_BCMRING342config ARCH_BCMRING
343 bool "Broadcom BCMRING"343 bool "Broadcom BCMRING"
@@ -369,12 +369,12 @@ config ARCH_HIGHBANK · 25 unmodified lines
369 Support for the Calxeda Highbank SoC based boards.369 Support for the Calxeda Highbank SoC based boards.
370 370
371config ARCH_CLPS711X371config ARCH_CLPS711X
372 bool "Cirrus Logic CLPS711x/EP721x-based"372 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
373 select CPU_ARM720T373 select CPU_ARM720T
374 select ARCH_USES_GETTIMEOFFSET374 select ARCH_USES_GETTIMEOFFSET
375 select NEED_MACH_MEMORY_H375 select NEED_MACH_MEMORY_H
376 help376 help
377 Support for Cirrus Logic 711x/721x based boards.377 Support for Cirrus Logic 711x/721x/731x based boards.
378 378
379config ARCH_CNS3XXX379config ARCH_CNS3XXX
380 bool "Cavium Networks CNS3XXX family"380 bool "Cavium Networks CNS3XXX family"
@@ -524,28 +524,6 @@ config ARCH_IOP33X · 143 unmodified lines
524 help524 help
525 Support for Intel's IOP33X (XScale) family of processors.525 Support for Intel's IOP33X (XScale) family of processors.
526 526
527config 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
538config 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
549config ARCH_IXP4XX527config ARCH_IXP4XX
550 bool "IXP4xx-based"528 bool "IXP4xx-based"
551 depends on MMU529 depends on MMU
@@ -1039,10 +1017,6 @@ source "arch/arm/mach-iop13xx/Kconfig" · 487 unmodified lines
1039 1017
1040source "arch/arm/mach-ixp4xx/Kconfig"1018source "arch/arm/mach-ixp4xx/Kconfig"
1041 1019
1042source "arch/arm/mach-ixp2000/Kconfig"
1043
1044source "arch/arm/mach-ixp23xx/Kconfig"
1045
1046source "arch/arm/mach-kirkwood/Kconfig"1020source "arch/arm/mach-kirkwood/Kconfig"
1047 1021
1048source "arch/arm/mach-ks8695/Kconfig"1022source "arch/arm/mach-ks8695/Kconfig"
arch/arm/Makefile+0−2
@@ -147,8 +147,6 @@ machine-$(CONFIG_ARCH_INTEGRATOR) := integrator · 146 unmodified lines
147machine-$(CONFIG_ARCH_IOP13XX) := iop13xx147machine-$(CONFIG_ARCH_IOP13XX) := iop13xx
148machine-$(CONFIG_ARCH_IOP32X) := iop32x148machine-$(CONFIG_ARCH_IOP32X) := iop32x
149machine-$(CONFIG_ARCH_IOP33X) := iop33x149machine-$(CONFIG_ARCH_IOP33X) := iop33x
150machine-$(CONFIG_ARCH_IXP2000) := ixp2000
151machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx
152machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx150machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
153machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood151machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
154machine-$(CONFIG_ARCH_KS8695) := ks8695152machine-$(CONFIG_ARCH_KS8695) := ks8695
arch/arm/boot/compressed/head-xscale.S+0−7
@@ -32,10 +32,3 @@ __XScale_start: · 31 unmodified lines
32 bic r0, r0, #0x1000 @ clear Icache32 bic r0, r0, #0x1000 @ clear Icache
33 mcr p15, 0, r0, c1, c0, 033 mcr p15, 0, r0, c1, c0, 0
34 34
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
11obj-$(CONFIG_SHARP_LOCOMO) += locomo.o11obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
12obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o12obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
13obj-$(CONFIG_SHARP_SCOOP) += scoop.o13obj-$(CONFIG_SHARP_SCOOP) += scoop.o
14obj-$(CONFIG_ARCH_IXP2000) += uengine.o
15obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
16obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o14obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
17obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o15obj-$(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
56u32 ixp2000_uengine_mask;
57
58static 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 */
71u32 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}
88EXPORT_SYMBOL(ixp2000_uengine_csr_read);
89
90void 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}
104EXPORT_SYMBOL(ixp2000_uengine_csr_write);
105
106void 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}
116EXPORT_SYMBOL(ixp2000_uengine_reset);
117
118void 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}
139EXPORT_SYMBOL(ixp2000_uengine_set_mode);
140
141static int make_even_parity(u32 x)
142{
143 return hweight32(x) & 1;
144}
145
146static 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
162void 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}
203EXPORT_SYMBOL(ixp2000_uengine_load_microcode);
204
205void 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}
223EXPORT_SYMBOL(ixp2000_uengine_init_context);
224
225void 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}
236EXPORT_SYMBOL(ixp2000_uengine_start_contexts);
237
238void 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}
250EXPORT_SYMBOL(ixp2000_uengine_stop_contexts);
251
252static 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
297static 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
368static 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
429int 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}
450EXPORT_SYMBOL(ixp2000_uengine_load);
451
452
453static 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
507subsys_initcall(ixp2000_uengine_init);
arch/arm/configs/at91_dt_defconfig+196−0
@@ -0,0 +1,196 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y
5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_CC_OPTIMIZE_FOR_SIZE=y
8CONFIG_KALLSYMS_ALL=y
9CONFIG_EMBEDDED=y
10CONFIG_SLAB=y
11CONFIG_MODULES=y
12CONFIG_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
17CONFIG_ARCH_AT91=y
18CONFIG_SOC_AT91SAM9260=y
19CONFIG_SOC_AT91SAM9263=y
20CONFIG_SOC_AT91SAM9G45=y
21CONFIG_SOC_AT91SAM9X5=y
22CONFIG_MACH_AT91SAM_DT=y
23CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
24CONFIG_AT91_TIMER_HZ=128
25CONFIG_AEABI=y
26# CONFIG_OABI_COMPAT is not set
27CONFIG_LEDS=y
28CONFIG_LEDS_CPU=y
29CONFIG_UACCESS_WITH_MEMCPY=y
30CONFIG_ZBOOT_ROM_TEXT=0x0
31CONFIG_ZBOOT_ROM_BSS=0x0
32CONFIG_ARM_APPENDED_DTB=y
33CONFIG_ARM_ATAG_DTB_COMPAT=y
34CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
35CONFIG_KEXEC=y
36CONFIG_AUTO_ZRELADDR=y
37# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
38CONFIG_NET=y
39CONFIG_PACKET=y
40CONFIG_UNIX=y
41CONFIG_INET=y
42CONFIG_IP_MULTICAST=y
43CONFIG_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
48CONFIG_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
52CONFIG_IPV6_SIT_6RD=y
53# CONFIG_WIRELESS is not set
54CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
55CONFIG_DEVTMPFS=y
56CONFIG_DEVTMPFS_MOUNT=y
57# CONFIG_STANDALONE is not set
58# CONFIG_PREVENT_FIRMWARE_BUILD is not set
59CONFIG_MTD=y
60CONFIG_MTD_CMDLINE_PARTS=y
61CONFIG_MTD_CHAR=y
62CONFIG_MTD_BLOCK=y
63CONFIG_MTD_NAND=y
64CONFIG_MTD_NAND_ATMEL=y
65CONFIG_MTD_UBI=y
66CONFIG_MTD_UBI_GLUEBI=y
67CONFIG_PROC_DEVICETREE=y
68CONFIG_BLK_DEV_LOOP=y
69CONFIG_BLK_DEV_RAM=y
70CONFIG_BLK_DEV_RAM_COUNT=4
71CONFIG_BLK_DEV_RAM_SIZE=8192
72CONFIG_ATMEL_PWM=y
73CONFIG_ATMEL_TCLIB=y
74CONFIG_EEPROM_93CX6=m
75CONFIG_SCSI=y
76CONFIG_BLK_DEV_SD=y
77CONFIG_SCSI_MULTI_LUN=y
78# CONFIG_SCSI_LOWLEVEL is not set
79CONFIG_NETDEVICES=y
80CONFIG_MII=y
81CONFIG_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
92CONFIG_DAVICOM_PHY=y
93CONFIG_MICREL_PHY=y
94# CONFIG_WLAN is not set
95CONFIG_INPUT_POLLDEV=y
96# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
97CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
98CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272
99CONFIG_INPUT_JOYDEV=y
100CONFIG_INPUT_EVDEV=y
101# CONFIG_KEYBOARD_ATKBD is not set
102CONFIG_KEYBOARD_GPIO=y
103# CONFIG_INPUT_MOUSE is not set
104CONFIG_INPUT_TOUCHSCREEN=y
105# CONFIG_SERIO is not set
106CONFIG_LEGACY_PTY_COUNT=4
107CONFIG_SERIAL_ATMEL=y
108CONFIG_SERIAL_ATMEL_CONSOLE=y
109CONFIG_HW_RANDOM=y
110CONFIG_I2C=y
111CONFIG_I2C_GPIO=y
112CONFIG_SPI=y
113CONFIG_SPI_ATMEL=y
114# CONFIG_HWMON is not set
115CONFIG_WATCHDOG=y
116CONFIG_AT91SAM9X_WATCHDOG=y
117CONFIG_SSB=m
118CONFIG_FB=y
119CONFIG_FB_MODE_HELPERS=y
120CONFIG_FB_ATMEL=y
121CONFIG_BACKLIGHT_LCD_SUPPORT=y
122# CONFIG_LCD_CLASS_DEVICE is not set
123CONFIG_BACKLIGHT_CLASS_DEVICE=y
124CONFIG_BACKLIGHT_ATMEL_LCDC=y
125# CONFIG_BACKLIGHT_GENERIC is not set
126CONFIG_FRAMEBUFFER_CONSOLE=y
127CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
128CONFIG_FONTS=y
129CONFIG_FONT_8x8=y
130CONFIG_FONT_ACORN_8x8=y
131CONFIG_FONT_MINI_4x6=y
132CONFIG_LOGO=y
133# CONFIG_HID_SUPPORT is not set
134CONFIG_USB=y
135CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
136CONFIG_USB_DEVICEFS=y
137# CONFIG_USB_DEVICE_CLASS is not set
138CONFIG_USB_EHCI_HCD=y
139CONFIG_USB_OHCI_HCD=y
140CONFIG_USB_ACM=y
141CONFIG_USB_STORAGE=y
142CONFIG_USB_SERIAL=y
143CONFIG_USB_SERIAL_GENERIC=y
144CONFIG_USB_SERIAL_FTDI_SIO=y
145CONFIG_USB_SERIAL_PL2303=y
146CONFIG_USB_GADGET=y
147CONFIG_USB_AT91=m
148CONFIG_USB_ATMEL_USBA=m
149CONFIG_USB_ETH=m
150CONFIG_USB_GADGETFS=m
151CONFIG_USB_CDC_COMPOSITE=m
152CONFIG_USB_G_ACM_MS=m
153CONFIG_USB_G_MULTI=m
154CONFIG_USB_G_MULTI_CDC=y
155CONFIG_MMC=y
156CONFIG_MMC_ATMELMCI=y
157CONFIG_NEW_LEDS=y
158CONFIG_LEDS_CLASS=y
159CONFIG_LEDS_GPIO=y
160CONFIG_LEDS_TRIGGERS=y
161CONFIG_LEDS_TRIGGER_TIMER=y
162CONFIG_LEDS_TRIGGER_HEARTBEAT=y
163CONFIG_LEDS_TRIGGER_GPIO=y
164CONFIG_RTC_CLASS=y
165CONFIG_RTC_DRV_AT91RM9200=y
166CONFIG_RTC_DRV_AT91SAM9=y
167CONFIG_DMADEVICES=y
168# CONFIG_IOMMU_SUPPORT is not set
169CONFIG_EXT2_FS=y
170CONFIG_FANOTIFY=y
171CONFIG_VFAT_FS=y
172CONFIG_TMPFS=y
173CONFIG_NFS_FS=y
174CONFIG_NFS_V3=y
175CONFIG_ROOT_NFS=y
176CONFIG_NLS_CODEPAGE_437=y
177CONFIG_NLS_CODEPAGE_850=y
178CONFIG_NLS_ISO8859_1=y
179CONFIG_STRIP_ASM_SYMS=y
180CONFIG_DEBUG_FS=y
181# CONFIG_SCHED_DEBUG is not set
182# CONFIG_DEBUG_BUGVERBOSE is not set
183# CONFIG_FTRACE is not set
184CONFIG_DEBUG_USER=y
185CONFIG_CRYPTO=y
186CONFIG_CRYPTO_ECB=y
187CONFIG_CRYPTO_AES=y
188CONFIG_CRYPTO_ARC4=y
189# CONFIG_CRYPTO_ANSI_CPRNG is not set
190CONFIG_CRYPTO_USER_API_HASH=m
191CONFIG_CRYPTO_USER_API_SKCIPHER=m
192# CONFIG_CRYPTO_HW is not set
193CONFIG_CRC_CCITT=m
194CONFIG_CRC_ITU_T=m
195CONFIG_CRC7=m
196CONFIG_AVERAGE=y
arch/arm/configs/at91rm9200_defconfig+1−0
@@ -14,6 +14,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y · 13 unmodified lines
14# CONFIG_BLK_DEV_BSG is not set14# CONFIG_BLK_DEV_BSG is not set
15# CONFIG_IOSCHED_CFQ is not set15# CONFIG_IOSCHED_CFQ is not set
16CONFIG_ARCH_AT91=y16CONFIG_ARCH_AT91=y
17CONFIG_ARCH_AT91RM9200=y
17CONFIG_MACH_ONEARM=y18CONFIG_MACH_ONEARM=y
18CONFIG_ARCH_AT91RM9200DK=y19CONFIG_ARCH_AT91RM9200DK=y
19CONFIG_MACH_AT91RM9200EK=y20CONFIG_MACH_AT91RM9200EK=y
arch/arm/configs/ixp2000_defconfig+0−99
@@ -1,99 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_BSD_PROCESS_ACCT=y
4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_BLK_DEV_INITRD=y
6CONFIG_EXPERT=y
7# CONFIG_HOTPLUG is not set
8CONFIG_SLAB=y
9CONFIG_MODULES=y
10CONFIG_MODULE_UNLOAD=y
11CONFIG_ARCH_IXP2000=y
12CONFIG_ARCH_ENP2611=y
13CONFIG_ARCH_IXDP2400=y
14CONFIG_ARCH_IXDP2800=y
15CONFIG_ARCH_IXDP2401=y
16CONFIG_ARCH_IXDP2801=y
17# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
18# CONFIG_ARM_THUMB is not set
19CONFIG_CPU_BIG_ENDIAN=y
20CONFIG_ZBOOT_ROM_TEXT=0x0
21CONFIG_ZBOOT_ROM_BSS=0x0
22CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0"
23CONFIG_FPE_NWFPE=y
24CONFIG_FPE_NWFPE_XP=y
25CONFIG_NET=y
26CONFIG_PACKET=y
27CONFIG_UNIX=y
28CONFIG_INET=y
29CONFIG_IP_PNP=y
30CONFIG_IP_PNP_DHCP=y
31CONFIG_IP_PNP_BOOTP=y
32CONFIG_SYN_COOKIES=y
33CONFIG_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
39CONFIG_MTD=y
40CONFIG_MTD_PARTITIONS=y
41CONFIG_MTD_REDBOOT_PARTS=y
42CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
43CONFIG_MTD_REDBOOT_PARTS_READONLY=y
44CONFIG_MTD_CHAR=y
45CONFIG_MTD_BLOCK=y
46CONFIG_MTD_CFI=y
47CONFIG_MTD_CFI_INTELEXT=y
48CONFIG_MTD_COMPLEX_MAPPINGS=y
49CONFIG_MTD_IXP2000=y
50CONFIG_BLK_DEV_LOOP=y
51CONFIG_BLK_DEV_NBD=y
52CONFIG_BLK_DEV_RAM=y
53CONFIG_BLK_DEV_RAM_SIZE=8192
54CONFIG_EEPROM_LEGACY=y
55CONFIG_NETDEVICES=y
56CONFIG_DUMMY=y
57CONFIG_NET_ETHERNET=y
58CONFIG_NET_PCI=y
59CONFIG_CS89x0=y
60CONFIG_E100=y
61CONFIG_ENP2611_MSF_NET=y
62CONFIG_WAN=y
63CONFIG_HDLC=y
64CONFIG_HDLC_RAW=y
65CONFIG_HDLC_CISCO=y
66CONFIG_HDLC_FR=y
67CONFIG_HDLC_PPP=y
68CONFIG_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
73CONFIG_SERIAL_8250=y
74CONFIG_SERIAL_8250_CONSOLE=y
75CONFIG_SERIAL_8250_NR_UARTS=3
76# CONFIG_HW_RANDOM is not set
77CONFIG_I2C=y
78CONFIG_I2C_CHARDEV=y
79CONFIG_I2C_IXP2000=y
80CONFIG_WATCHDOG=y
81CONFIG_IXP2000_WATCHDOG=y
82CONFIG_EXT2_FS=y
83CONFIG_EXT2_FS_XATTR=y
84CONFIG_EXT2_FS_POSIX_ACL=y
85CONFIG_EXT3_FS=y
86CONFIG_EXT3_FS_POSIX_ACL=y
87CONFIG_INOTIFY=y
88CONFIG_TMPFS=y
89CONFIG_JFFS2_FS=y
90CONFIG_NFS_FS=y
91CONFIG_NFS_V3=y
92CONFIG_ROOT_NFS=y
93CONFIG_PARTITION_ADVANCED=y
94CONFIG_MAGIC_SYSRQ=y
95CONFIG_DEBUG_KERNEL=y
96CONFIG_DEBUG_MUTEXES=y
97CONFIG_DEBUG_USER=y
98CONFIG_DEBUG_ERRORS=y
99CONFIG_DEBUG_LL=y
arch/arm/configs/ixp23xx_defconfig+0−105
@@ -1,105 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_BSD_PROCESS_ACCT=y
4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_BLK_DEV_INITRD=y
6CONFIG_EXPERT=y
7CONFIG_SLAB=y
8CONFIG_MODULES=y
9CONFIG_MODULE_UNLOAD=y
10CONFIG_ARCH_IXP23XX=y
11CONFIG_MACH_ESPRESSO=y
12CONFIG_MACH_IXDP2351=y
13CONFIG_MACH_ROADRUNNER=y
14# CONFIG_ARM_THUMB is not set
15CONFIG_CPU_BIG_ENDIAN=y
16CONFIG_ZBOOT_ROM_TEXT=0x0
17CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp"
19CONFIG_FPE_NWFPE=y
20CONFIG_FPE_NWFPE_XP=y
21CONFIG_NET=y
22CONFIG_PACKET=y
23CONFIG_UNIX=y
24CONFIG_INET=y
25CONFIG_IP_PNP=y
26CONFIG_IP_PNP_DHCP=y
27CONFIG_IP_PNP_BOOTP=y
28CONFIG_SYN_COOKIES=y
29CONFIG_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
36CONFIG_MTD=y
37CONFIG_MTD_PARTITIONS=y
38CONFIG_MTD_REDBOOT_PARTS=y
39CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
40CONFIG_MTD_REDBOOT_PARTS_READONLY=y
41CONFIG_MTD_CHAR=y
42CONFIG_MTD_BLOCK=y
43CONFIG_MTD_CFI=y
44CONFIG_MTD_CFI_INTELEXT=y
45CONFIG_MTD_COMPLEX_MAPPINGS=y
46CONFIG_MTD_PHYSMAP=y
47CONFIG_BLK_DEV_LOOP=y
48CONFIG_BLK_DEV_NBD=y
49CONFIG_BLK_DEV_RAM=y
50CONFIG_BLK_DEV_RAM_SIZE=8192
51CONFIG_EEPROM_LEGACY=y
52CONFIG_IDE=y
53CONFIG_BLK_DEV_SIIMAGE=y
54CONFIG_SCSI=y
55CONFIG_BLK_DEV_SD=y
56CONFIG_NETDEVICES=y
57CONFIG_DUMMY=y
58CONFIG_NET_ETHERNET=y
59CONFIG_NET_PCI=y
60CONFIG_E100=y
61CONFIG_E1000=y
62CONFIG_WAN=y
63CONFIG_HDLC=y
64CONFIG_HDLC_RAW=y
65CONFIG_HDLC_CISCO=y
66CONFIG_HDLC_FR=y
67CONFIG_HDLC_PPP=y
68CONFIG_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
73CONFIG_SERIAL_8250=y
74CONFIG_SERIAL_8250_CONSOLE=y
75# CONFIG_HW_RANDOM is not set
76CONFIG_I2C=y
77CONFIG_I2C_CHARDEV=y
78CONFIG_WATCHDOG=y
79# CONFIG_USB_HID is not set
80CONFIG_USB=y
81CONFIG_USB_MON=y
82CONFIG_USB_EHCI_HCD=y
83CONFIG_USB_OHCI_HCD=y
84CONFIG_USB_UHCI_HCD=y
85CONFIG_USB_STORAGE=y
86CONFIG_EXT2_FS=y
87CONFIG_EXT2_FS_XATTR=y
88CONFIG_EXT2_FS_POSIX_ACL=y
89CONFIG_EXT3_FS=y
90CONFIG_EXT3_FS_POSIX_ACL=y
91CONFIG_INOTIFY=y
92CONFIG_MSDOS_FS=y
93CONFIG_TMPFS=y
94CONFIG_JFFS2_FS=y
95CONFIG_NFS_FS=y
96CONFIG_NFS_V3=y
97CONFIG_ROOT_NFS=y
98CONFIG_PARTITION_ADVANCED=y
99CONFIG_NLS_CODEPAGE_437=y
100CONFIG_MAGIC_SYSRQ=y
101CONFIG_DEBUG_KERNEL=y
102CONFIG_DEBUG_MUTEXES=y
103CONFIG_DEBUG_USER=y
104CONFIG_DEBUG_ERRORS=y
105CONFIG_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
17extern u32 ixp2000_uengine_mask;
18
19struct 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
36u32 ixp2000_uengine_csr_read(int uengine, int offset);
37void ixp2000_uengine_csr_write(int uengine, int offset, u32 value);
38void ixp2000_uengine_reset(u32 uengine_mask);
39void ixp2000_uengine_set_mode(int uengine, u32 mode);
40void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns);
41void ixp2000_uengine_init_context(int uengine, int context, int pc);
42void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask);
43void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask);
44int 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
9config HAVE_AT91_DBGU19config HAVE_AT91_DBGU1
10 bool10 bool
11 11
12config HAVE_AT91_USART3
13 bool
14
15config HAVE_AT91_USART4
16 bool
17
18config HAVE_AT91_USART5
19 bool
20
21config AT91_SAM9_ALT_RESET12config AT91_SAM9_ALT_RESET
22 bool13 bool
23 default !ARCH_AT91X4014 default !ARCH_AT91X40
@@ -26,87 +17,121 @@ config AT91_SAM9G45_RESET · 2 unmodified lines
26 bool17 bool
27 default !ARCH_AT91X4018 default !ARCH_AT91X40
28 19
20config SOC_AT91SAM9
21 bool
22 select GENERIC_CLOCKEVENTS
23 select CPU_ARM926T
24
29menu "Atmel AT91 System-on-Chip"25menu "Atmel AT91 System-on-Chip"
30 26
31choice27comment "Atmel AT91 Processor"
32 prompt "Atmel AT91 Processor"
33 28
34config ARCH_AT91RM920029config SOC_AT91SAM9
30 bool
31 select CPU_ARM926T
32 select AT91_SAM9_TIME
33 select AT91_SAM9_SMC
34
35config SOC_AT91RM9200
35 bool "AT91RM9200"36 bool "AT91RM9200"
36 select CPU_ARM920T37 select CPU_ARM920T
37 select GENERIC_CLOCKEVENTS38 select GENERIC_CLOCKEVENTS
38 select HAVE_AT91_DBGU039 select HAVE_AT91_DBGU0
39 select HAVE_AT91_USART3
40 40
41config ARCH_AT91SAM926041config SOC_AT91SAM9260
42 bool "AT91SAM9260 or AT91SAM9XE"42 bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
43 select CPU_ARM926T43 select SOC_AT91SAM9
44 select GENERIC_CLOCKEVENTS
45 select HAVE_AT91_DBGU044 select HAVE_AT91_DBGU0
46 select HAVE_AT91_USART3
47 select HAVE_AT91_USART4
48 select HAVE_AT91_USART5
49 select HAVE_NET_MACB45 select HAVE_NET_MACB
46 help
47 Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
48 or AT91SAM9G20 SoC.
50 49
51config ARCH_AT91SAM926150config SOC_AT91SAM9261
52 bool "AT91SAM9261"51 bool "AT91SAM9261 or AT91SAM9G10"
53 select CPU_ARM926T52 select SOC_AT91SAM9
54 select GENERIC_CLOCKEVENTS53 select HAVE_AT91_DBGU0
55 select HAVE_FB_ATMEL54 select HAVE_FB_ATMEL
55 help
56 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
57
58config 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
65config SOC_AT91SAM9RL
66 bool "AT91SAM9RL"
67 select SOC_AT91SAM9
56 select HAVE_AT91_DBGU068 select HAVE_AT91_DBGU0
69 select HAVE_FB_ATMEL
57 70
58config ARCH_AT91SAM9G1071config SOC_AT91SAM9G45
59 bool "AT91SAM9G10"72 bool "AT91SAM9G45 or AT91SAM9M10 families"
60 select CPU_ARM926T73 select SOC_AT91SAM9
61 select GENERIC_CLOCKEVENTS74 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
81config SOC_AT91SAM9X5
82 bool "AT91SAM9x5 family"
83 select SOC_AT91SAM9
62 select HAVE_AT91_DBGU084 select HAVE_AT91_DBGU0
63 select HAVE_FB_ATMEL85 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
94choice
95 prompt "Atmel AT91 Processor Devices for non DT boards"
96
97config ARCH_AT91_NONE
98 bool "None"
99
100config ARCH_AT91RM9200
101 bool "AT91RM9200"
102 select SOC_AT91RM9200
103
104config ARCH_AT91SAM9260
105 bool "AT91SAM9260 or AT91SAM9XE"
106 select SOC_AT91SAM9260
107
108config ARCH_AT91SAM9261
109 bool "AT91SAM9261"
110 select SOC_AT91SAM9261
111
112config ARCH_AT91SAM9G10
113 bool "AT91SAM9G10"
114 select SOC_AT91SAM9261
64 115
65config ARCH_AT91SAM9263116config ARCH_AT91SAM9263
66 bool "AT91SAM9263"117 bool "AT91SAM9263"
67 select CPU_ARM926T118 select SOC_AT91SAM9263
68 select GENERIC_CLOCKEVENTS
69 select HAVE_FB_ATMEL
70 select HAVE_NET_MACB
71 select HAVE_AT91_DBGU1
72 119
73config ARCH_AT91SAM9RL120config ARCH_AT91SAM9RL
74 bool "AT91SAM9RL"121 bool "AT91SAM9RL"
75 select CPU_ARM926T122 select SOC_AT91SAM9RL
76 select GENERIC_CLOCKEVENTS
77 select HAVE_AT91_USART3
78 select HAVE_FB_ATMEL
79 select HAVE_AT91_DBGU0
80 123
81config ARCH_AT91SAM9G20124config ARCH_AT91SAM9G20
82 bool "AT91SAM9G20"125 bool "AT91SAM9G20"
83 select CPU_ARM926T126 select SOC_AT91SAM9260
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
90 127
91config ARCH_AT91SAM9G45128config ARCH_AT91SAM9G45
92 bool "AT91SAM9G45"129 bool "AT91SAM9G45"
93 select CPU_ARM926T130 select SOC_AT91SAM9G45
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
100config 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
107 131
108config ARCH_AT91X40132config ARCH_AT91X40
109 bool "AT91x40"133 bool "AT91x40"
134 depends on !MMU
110 select ARCH_USES_GETTIMEOFFSET135 select ARCH_USES_GETTIMEOFFSET
111 136
112endchoice137endchoice
@@ -364,6 +389,7 @@ config MACH_AT91SAM9G20EK_2MMC · 251 unmodified lines
364 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit389 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
365 with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and390 with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
366 onwards.391 onwards.
392 <http://www.atmel.com/tools/SAM9G20-EK.aspx>
367 393
368config MACH_CPU9G20394config MACH_CPU9G20
369 bool "Eukrea CPU9G20 board"395 bool "Eukrea CPU9G20 board"
@@ -433,9 +459,10 @@ comment "AT91SAM9G45 Board Type" · 63 unmodified lines
433config MACH_AT91SAM9M10G45EK459config MACH_AT91SAM9M10G45EK
434 bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"460 bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"
435 help461 help
436 Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit.462 Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit.
437 "ES" at the end of the name means that this board is an463 Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10
438 Engineering Sample.464 families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
465 <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx>
439 466
440endif467endif
441 468
@@ -515,41 +542,6 @@ config AT91_TIMER_HZ · 73 unmodified lines
515 system clock (of at least several MHz), rounding is less of a542 system clock (of at least several MHz), rounding is less of a
516 problem so it can be safer to use a decimal values like 100.543 problem so it can be safer to use a decimal values like 100.
517 544
518choice
519 prompt "Select a UART for early kernel messages"
520
521config AT91_EARLY_DBGU0
522 bool "DBGU on rm9200, 9260/9g20, 9261/9g10 and 9rl"
523 depends on HAVE_AT91_DBGU0
524
525config AT91_EARLY_DBGU1
526 bool "DBGU on 9263 and 9g45"
527 depends on HAVE_AT91_DBGU1
528
529config AT91_EARLY_USART0
530 bool "USART0"
531
532config AT91_EARLY_USART1
533 bool "USART1"
534
535config AT91_EARLY_USART2
536 bool "USART2"
537 depends on ! ARCH_AT91X40
538
539config AT91_EARLY_USART3
540 bool "USART3"
541 depends on HAVE_AT91_USART3
542
543config AT91_EARLY_USART4
544 bool "USART4"
545 depends on HAVE_AT91_USART4
546
547config AT91_EARLY_USART5
548 bool "USART5"
549 depends on HAVE_AT91_USART5
550
551endchoice
552
553endmenu545endmenu
554 546
555endif547endif
arch/arm/mach-at91/Makefile+17−9
@@ -10,17 +10,25 @@ obj- := · 9 unmodified lines
10obj-$(CONFIG_AT91_PMC_UNIT) += clock.o10obj-$(CONFIG_AT91_PMC_UNIT) += clock.o
11obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o11obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
12obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o12obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
13obj-$(CONFIG_SOC_AT91SAM9) += at91sam926x_time.o sam9_smc.o
13 14
14# CPU-specific support15# CPU-specific support
15obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o16obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o
16obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o17obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o
17obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o18obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o
18obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o19obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o
19obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o20obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o
20obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o21obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o
21obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o22obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o
22obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o23
23obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.o at91sam926x_time.o sam9_smc.o24obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o
25obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o
26obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o
27obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o
28obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o
29obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o
30obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o
31obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o
24obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o32obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
25 33
26# AT91RM9200 board-specific support34# 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
249 clk_register(&pck3);249 clk_register(&pck3);
250}250}
251 251
252static struct clk_lookup console_clock_lookup;
253
254void __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
264/* --------------------------------------------------------------------252/* --------------------------------------------------------------------
265 * GPIO253 * GPIO
266 * -------------------------------------------------------------------- */254 * -------------------------------------------------------------------- */
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
1152 at91_uarts[portnr] = pdev;1152 at91_uarts[portnr] = pdev;
1153}1153}
1154 1154
1155void __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
1163void __init at91_add_device_serial(void)1155void __init at91_add_device_serial(void)
1164{1156{
1165 int i;1157 int i;
@@ -1168,13 +1160,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
1168 if (at91_uarts[i])1160 if (at91_uarts[i])
1169 platform_device_register(at91_uarts[i]);1161 platform_device_register(at91_uarts[i]);
1170 }1162 }
1171
1172 if (!atmel_default_console_device)
1173 printk(KERN_INFO "AT91: No default serial console defined.\n");
1174}1163}
1175#else1164#else
1176void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}1165void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1177void __init at91_set_serial_console(unsigned portnr) {}
1178void __init at91_add_device_serial(void) {}1166void __init at91_add_device_serial(void) {}
1179#endif1167#endif
1180 1168
arch/arm/mach-at91/at91sam9260.c+0−12
@@ -268,18 +268,6 @@ static void __init at91sam9260_register_clocks(void) · 267 unmodified lines
268 clk_register(&pck1);268 clk_register(&pck1);
269}269}
270 270
271static struct clk_lookup console_clock_lookup;
272
273void __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
283/* --------------------------------------------------------------------271/* --------------------------------------------------------------------
284 * GPIO272 * GPIO
285 * -------------------------------------------------------------------- */273 * -------------------------------------------------------------------- */
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
1229 at91_uarts[portnr] = pdev;1229 at91_uarts[portnr] = pdev;
1230}1230}
1231 1231
1232void __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
1240void __init at91_add_device_serial(void)1232void __init at91_add_device_serial(void)
1241{1233{
1242 int i;1234 int i;
@@ -1245,13 +1237,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
1245 if (at91_uarts[i])1237 if (at91_uarts[i])
1246 platform_device_register(at91_uarts[i]);1238 platform_device_register(at91_uarts[i]);
1247 }1239 }
1248
1249 if (!atmel_default_console_device)
1250 printk(KERN_INFO "AT91: No default serial console defined.\n");
1251}1240}
1252#else1241#else
1253void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}1242void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1254void __init at91_set_serial_console(unsigned portnr) {}
1255void __init at91_add_device_serial(void) {}1243void __init at91_add_device_serial(void) {}
1256#endif1244#endif
1257 1245
arch/arm/mach-at91/at91sam9261.c+0−12
@@ -239,18 +239,6 @@ static void __init at91sam9261_register_clocks(void) · 238 unmodified lines
239 clk_register(&hck1);239 clk_register(&hck1);
240}240}
241 241
242static struct clk_lookup console_clock_lookup;
243
244void __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
254/* --------------------------------------------------------------------242/* --------------------------------------------------------------------
255 * GPIO243 * GPIO
256 * -------------------------------------------------------------------- */244 * -------------------------------------------------------------------- */
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
1051 at91_uarts[portnr] = pdev;1051 at91_uarts[portnr] = pdev;
1052}1052}
1053 1053
1054void __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
1062void __init at91_add_device_serial(void)1054void __init at91_add_device_serial(void)
1063{1055{
1064 int i;1056 int i;
@@ -1067,13 +1059,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
1067 if (at91_uarts[i])1059 if (at91_uarts[i])
1068 platform_device_register(at91_uarts[i]);1060 platform_device_register(at91_uarts[i]);
1069 }1061 }
1070
1071 if (!atmel_default_console_device)
1072 printk(KERN_INFO "AT91: No default serial console defined.\n");
1073}1062}
1074#else1063#else
1075void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}1064void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1076void __init at91_set_serial_console(unsigned portnr) {}
1077void __init at91_add_device_serial(void) {}1065void __init at91_add_device_serial(void) {}
1078#endif1066#endif
1079 1067
arch/arm/mach-at91/at91sam9263.c+0−12
@@ -255,18 +255,6 @@ static void __init at91sam9263_register_clocks(void) · 254 unmodified lines
255 clk_register(&pck3);255 clk_register(&pck3);
256}256}
257 257
258static struct clk_lookup console_clock_lookup;
259
260void __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
270/* --------------------------------------------------------------------258/* --------------------------------------------------------------------
271 * GPIO259 * GPIO
272 * -------------------------------------------------------------------- */260 * -------------------------------------------------------------------- */
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
1461 at91_uarts[portnr] = pdev;1461 at91_uarts[portnr] = pdev;
1462}1462}
1463 1463
1464void __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
1472void __init at91_add_device_serial(void)1464void __init at91_add_device_serial(void)
1473{1465{
1474 int i;1466 int i;
@@ -1477,13 +1469,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
1477 if (at91_uarts[i])1469 if (at91_uarts[i])
1478 platform_device_register(at91_uarts[i]);1470 platform_device_register(at91_uarts[i]);
1479 }1471 }
1480
1481 if (!atmel_default_console_device)
1482 printk(KERN_INFO "AT91: No default serial console defined.\n");
1483}1472}
1484#else1473#else
1485void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}1474void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1486void __init at91_set_serial_console(unsigned portnr) {}
1487void __init at91_add_device_serial(void) {}1475void __init at91_add_device_serial(void) {}
1488#endif1476#endif
1489 1477
arch/arm/mach-at91/at91sam9g45.c+0−12
@@ -288,18 +288,6 @@ static void __init at91sam9g45_register_clocks(void) · 287 unmodified lines
288 clk_register(&pck1);288 clk_register(&pck1);
289}289}
290 290
291static struct clk_lookup console_clock_lookup;
292
293void __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
303/* --------------------------------------------------------------------291/* --------------------------------------------------------------------
304 * GPIO292 * GPIO
305 * -------------------------------------------------------------------- */293 * -------------------------------------------------------------------- */
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
1741 at91_uarts[portnr] = pdev;1741 at91_uarts[portnr] = pdev;
1742}1742}
1743 1743
1744void __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
1752void __init at91_add_device_serial(void)1744void __init at91_add_device_serial(void)
1753{1745{
1754 int i;1746 int i;
@@ -1757,13 +1749,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
1757 if (at91_uarts[i])1749 if (at91_uarts[i])
1758 platform_device_register(at91_uarts[i]);1750 platform_device_register(at91_uarts[i]);
1759 }1751 }
1760
1761 if (!atmel_default_console_device)
1762 printk(KERN_INFO "AT91: No default serial console defined.\n");
1763}1752}
1764#else1753#else
1765void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}1754void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1766void __init at91_set_serial_console(unsigned portnr) {}
1767void __init at91_add_device_serial(void) {}1755void __init at91_add_device_serial(void) {}
1768#endif1756#endif
1769 1757
arch/arm/mach-at91/at91sam9rl.c+0−12
@@ -232,18 +232,6 @@ static void __init at91sam9rl_register_clocks(void) · 231 unmodified lines
232 clk_register(&pck1);232 clk_register(&pck1);
233}233}
234 234
235static struct clk_lookup console_clock_lookup;
236
237void __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
247/* --------------------------------------------------------------------235/* --------------------------------------------------------------------
248 * GPIO236 * GPIO
249 * -------------------------------------------------------------------- */237 * -------------------------------------------------------------------- */
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
1192 at91_uarts[portnr] = pdev;1192 at91_uarts[portnr] = pdev;
1193}1193}
1194 1194
1195void __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
1203void __init at91_add_device_serial(void)1195void __init at91_add_device_serial(void)
1204{1196{
1205 int i;1197 int i;
@@ -1208,13 +1200,9 @@ void __init at91_add_device_serial(void) · 2 unmodified lines
1208 if (at91_uarts[i])1200 if (at91_uarts[i])
1209 platform_device_register(at91_uarts[i]);1201 platform_device_register(at91_uarts[i]);
1210 }1202 }
1211
1212 if (!atmel_default_console_device)
1213 printk(KERN_INFO "AT91: No default serial console defined.\n");
1214}1203}
1215#else1204#else
1216void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}1205void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1217void __init at91_set_serial_console(unsigned portnr) {}
1218void __init at91_add_device_serial(void) {}1206void __init at91_add_device_serial(void) {}
1219#endif1207#endif
1220 1208
arch/arm/mach-at91/board-1arm.c+10−14
@@ -47,20 +47,6 @@ static void __init onearm_init_early(void) · 46 unmodified lines
47 47
48 /* Initialize processor: 18.432 MHz crystal */48 /* Initialize processor: 18.432 MHz crystal */
49 at91_initialize(18432000);49 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);
64}50}
65 51
66static struct macb_platform_data __initdata onearm_eth_data = {52static struct macb_platform_data __initdata onearm_eth_data = {
@@ -82,6 +68,16 @@ static struct at91_udc_data __initdata onearm_udc_data = { · 15 unmodified lines
82static void __init onearm_board_init(void)68static void __init onearm_board_init(void)
83{69{
84 /* Serial */70 /* 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);
85 at91_add_device_serial();81 at91_add_device_serial();
86 /* Ethernet */82 /* Ethernet */
87 at91_add_device_eth(&onearm_eth_data);83 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
52{52{
53 /* Initialize processor: 18.432 MHz crystal */53 /* Initialize processor: 18.432 MHz crystal */
54 at91_initialize(18432000);54 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);
71}55}
72 56
73/*57/*
@@ -183,6 +167,18 @@ static struct at91_cf_data afeb9260_cf_data = { · 109 unmodified lines
183static void __init afeb9260_board_init(void)167static void __init afeb9260_board_init(void)
184{168{
185 /* Serial */169 /* 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);
186 at91_add_device_serial();182 at91_add_device_serial();
187 /* USB Host */183 /* USB Host */
188 at91_add_device_usbh(&afeb9260_usbh_data);184 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
49{49{
50 /* Initialize processor: 10 MHz crystal */50 /* Initialize processor: 10 MHz crystal */
51 at91_initialize(10000000);51 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);
58}52}
59 53
60/*54/*
@@ -175,6 +169,8 @@ static void __init cam60_add_device_nand(void) · 114 unmodified lines
175static void __init cam60_board_init(void)169static void __init cam60_board_init(void)
176{170{
177 /* Serial */171 /* Serial */
172 /* DBGU on ttyS0. (Rx & Tx only) */
173 at91_register_uart(0, 0, 0);
178 at91_add_device_serial();174 at91_add_device_serial();
179 /* SPI */175 /* SPI */
180 at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));176 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
44{44{
45 /* Initialize processor: 20.000 MHz crystal */45 /* Initialize processor: 20.000 MHz crystal */
46 at91_initialize(20000000);46 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);
58}47}
59 48
60static struct macb_platform_data __initdata carmeva_eth_data = {49static struct macb_platform_data __initdata carmeva_eth_data = {
@@ -139,6 +128,13 @@ static struct gpio_led carmeva_leds[] = { · 78 unmodified lines
139static void __init carmeva_board_init(void)128static void __init carmeva_board_init(void)
140{129{
141 /* Serial */130 /* 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);
142 at91_add_device_serial();138 at91_add_device_serial();
143 /* Ethernet */139 /* Ethernet */
144 at91_add_device_eth(&carmeva_eth_data);140 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
52{52{
53 /* Initialize processor: 18.432 MHz crystal */53 /* Initialize processor: 18.432 MHz crystal */
54 at91_initialize(18432000);54 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);
83}55}
84 56
85/*57/*
@@ -352,6 +324,30 @@ static void __init cpu9krea_board_init(void) · 266 unmodified lines
352 /* NOR */324 /* NOR */
353 cpu9krea_add_device_nor();325 cpu9krea_add_device_nor();
354 /* Serial */326 /* 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);
355 at91_add_device_serial();351 at91_add_device_serial();
356 /* USB Host */352 /* USB Host */
357 at91_add_device_usbh(&cpu9krea_usbh_data);353 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
59 59
60 /* Initialize processor: 18.432 MHz crystal */60 /* Initialize processor: 18.432 MHz crystal */
61 at91_initialize(18432000);61 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);
84}62}
85 63
86static struct macb_platform_data __initdata cpuat91_eth_data = {64static struct macb_platform_data __initdata cpuat91_eth_data = {
@@ -161,6 +139,24 @@ static struct platform_device *platform_devices[] __initdata = { · 74 unmodified lines
161static void __init cpuat91_board_init(void)139static void __init cpuat91_board_init(void)
162{140{
163 /* Serial */141 /* 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);
164 at91_add_device_serial();160 at91_add_device_serial();
165 /* LEDs. */161 /* LEDs. */
166 at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds));162 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
47{47{
48 /* Initialize processor: 3.6864 MHz crystal */48 /* Initialize processor: 3.6864 MHz crystal */
49 at91_initialize(3686400);49 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);
59}50}
60 51
61static struct macb_platform_data __initdata csb337_eth_data = {52static struct macb_platform_data __initdata csb337_eth_data = {
@@ -228,7 +219,11 @@ static struct gpio_led csb_leds[] = { · 166 unmodified lines
228 219
229static void __init csb337_board_init(void)220static void __init csb337_board_init(void)
230{221{
222 /* Setup the LEDs */
223 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
231 /* Serial */224 /* Serial */
225 /* DBGU on ttyS0 */
226 at91_register_uart(0, 0, 0);
232 at91_add_device_serial();227 at91_add_device_serial();
233 /* Ethernet */228 /* Ethernet */
234 at91_add_device_eth(&csb337_eth_data);229 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
44{44{
45 /* Initialize processor: 3.6864 MHz crystal */45 /* Initialize processor: 3.6864 MHz crystal */
46 at91_initialize(3686400);46 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);
53}47}
54 48
55static struct macb_platform_data __initdata csb637_eth_data = {49static struct macb_platform_data __initdata csb637_eth_data = {
@@ -118,6 +112,8 @@ static void __init csb637_board_init(void) · 62 unmodified lines
118 /* LED(s) */112 /* LED(s) */
119 at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));113 at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
120 /* Serial */114 /* Serial */
115 /* DBGU on ttyS0. (Rx & Tx only) */
116 at91_register_uart(0, 0, 0);
121 at91_add_device_serial();117 at91_add_device_serial();
122 /* Ethernet */118 /* Ethernet */
123 at91_add_device_eth(&csb637_eth_data);119 at91_add_device_eth(&csb637_eth_data);
arch/arm/mach-at91/board-dt.c+1−7
@@ -1,10 +1,6 @@
1/*1/*
2 * Setup code for AT91SAM Evaluation Kits with Device Tree support2 * Setup code for AT91SAM Evaluation Kits with Device Tree support
3 *3 *
4 * Covers: * AT91SAM9G45-EKES board
5 * * AT91SAM9M10-EKES board
6 * * AT91SAM9M10G45-EK board
7 *
8 * Copyright (C) 2011 Atmel,4 * Copyright (C) 2011 Atmel,
9 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>5 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
10 *6 *
@@ -49,9 +45,7 @@ static void __init at91_dt_device_init(void) · 38 unmodified lines
49}45}
50 46
51static const char *at91_dt_board_compat[] __initdata = {47static const char *at91_dt_board_compat[] __initdata = {
52 "atmel,at91sam9m10g45ek",48 "atmel,at91sam9",
53 "atmel,at91sam9x5ek",
54 "calao,usb-a9g20",
55 NULL49 NULL
56};50};
57 51
arch/arm/mach-at91/board-eb9200.c+10−14
@@ -44,20 +44,6 @@ static void __init eb9200_init_early(void) · 43 unmodified lines
44{44{
45 /* Initialize processor: 18.432 MHz crystal */45 /* Initialize processor: 18.432 MHz crystal */
46 at91_initialize(18432000);46 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);
61}47}
62 48
63static struct macb_platform_data __initdata eb9200_eth_data = {49static struct macb_platform_data __initdata eb9200_eth_data = {
@@ -101,6 +87,16 @@ static struct i2c_board_info __initdata eb9200_i2c_devices[] = { · 37 unmodified lines
101static void __init eb9200_board_init(void)87static void __init eb9200_board_init(void)
102{88{
103 /* Serial */89 /* 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);
104 at91_add_device_serial();100 at91_add_device_serial();
105 /* Ethernet */101 /* Ethernet */
106 at91_add_device_eth(&eb9200_eth_data);102 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
50 50
51 /* Initialize processor: 18.432 MHz crystal */51 /* Initialize processor: 18.432 MHz crystal */
52 at91_initialize(18432000);52 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);
65}53}
66 54
67static struct macb_platform_data __initdata ecb_at91eth_data = {55static struct macb_platform_data __initdata ecb_at91eth_data = {
@@ -151,7 +139,15 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = { · 83 unmodified lines
151 139
152static void __init ecb_at91board_init(void)140static void __init ecb_at91board_init(void)
153{141{
142 /* Setup the LEDs */
143 at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
144
154 /* Serial */145 /* 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);
155 at91_add_device_serial();151 at91_add_device_serial();
156 152
157 /* Ethernet */153 /* Ethernet */
arch/arm/mach-at91/board-eco920.c+4−9
@@ -37,15 +37,6 @@ static void __init eco920_init_early(void) · 36 unmodified lines
37 at91rm9200_set_type(ARCH_REVISON_9200_PQFP);37 at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
38 38
39 at91_initialize(18432000);39 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);
49}40}
50 41
51static struct macb_platform_data __initdata eco920_eth_data = {42static struct macb_platform_data __initdata eco920_eth_data = {
@@ -103,6 +94,10 @@ static struct spi_board_info eco920_spi_devices[] = { · 51 unmodified lines
103 94
104static void __init eco920_board_init(void)95static void __init eco920_board_init(void)
105{96{
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);
106 at91_add_device_serial();101 at91_add_device_serial();
107 at91_add_device_eth(&eco920_eth_data);102 at91_add_device_eth(&eco920_eth_data);
108 at91_add_device_usbh(&eco920_usbh_data);103 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
41{41{
42 /* Initialize processor: 18.432 MHz crystal */42 /* Initialize processor: 18.432 MHz crystal */
43 at91_initialize(18432000);43 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);
50}44}
51 45
52/* USB Host port */46/* USB Host port */
@@ -143,6 +137,8 @@ static struct gpio_led flexibity_leds[] = { · 90 unmodified lines
143static void __init flexibity_board_init(void)137static void __init flexibity_board_init(void)
144{138{
145 /* Serial */139 /* Serial */
140 /* DBGU on ttyS0. (Rx & Tx only) */
141 at91_register_uart(0, 0, 0);
146 at91_add_device_serial();142 at91_add_device_serial();
147 /* USB Host */143 /* USB Host */
148 at91_add_device_usbh(&flexibity_usbh_data);144 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
61{61{
62 /* Initialize processor: 18.432 MHz crystal */62 /* Initialize processor: 18.432 MHz crystal */
63 at91_initialize(18432000);63 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
102}64}
103 65
104/*66/*
@@ -241,6 +203,39 @@ static struct i2c_board_info __initdata foxg20_i2c_devices[] = { · 136 unmodified lines
241static void __init foxg20_board_init(void)203static void __init foxg20_board_init(void)
242{204{
243 /* Serial */205 /* 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);
244 at91_add_device_serial();239 at91_add_device_serial();
245 /* USB Host */240 /* USB Host */
246 at91_add_device_usbh(&foxg20_usbh_data);241 at91_add_device_usbh(&foxg20_usbh_data);
arch/arm/mach-at91/board-gsia18s.c+31−32
@@ -41,38 +41,6 @@ · 40 unmodified lines
41static void __init gsia18s_init_early(void)41static void __init gsia18s_init_early(void)
42{42{
43 stamp9g20_init_early();43 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);
76}44}
77 45
78/*46/*
@@ -558,6 +526,37 @@ static int __init gsia18s_power_off_init(void) · 479 unmodified lines
558 526
559static void __init gsia18s_board_init(void)527static void __init gsia18s_board_init(void)
560{528{
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);
561 stamp9g20_board_init();560 stamp9g20_board_init();
562 at91_add_device_usbh(&usbh_data);561 at91_add_device_usbh(&usbh_data);
563 at91_add_device_udc(&udc_data);562 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
47 47
48 /* Initialize processor: 18.432 MHz crystal */48 /* Initialize processor: 18.432 MHz crystal */
49 at91_initialize(18432000);49 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);
62}50}
63 51
64static struct macb_platform_data __initdata kafa_eth_data = {52static struct macb_platform_data __initdata kafa_eth_data = {
@@ -79,7 +67,15 @@ static struct at91_udc_data __initdata kafa_udc_data = { · 14 unmodified lines
79 67
80static void __init kafa_board_init(void)68static void __init kafa_board_init(void)
81{69{
70 /* Set up the LEDs */
71 at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
72
82 /* Serial */73 /* 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);
83 at91_add_device_serial();79 at91_add_device_serial();
84 /* Ethernet */80 /* Ethernet */
85 at91_add_device_eth(&kafa_eth_data);81 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
50 50
51 /* Initialize processor: 10 MHz crystal */51 /* Initialize processor: 10 MHz crystal */
52 at91_initialize(10000000);52 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);
71}53}
72 54
73static struct macb_platform_data __initdata kb9202_eth_data = {55static struct macb_platform_data __initdata kb9202_eth_data = {
@@ -115,7 +97,21 @@ static struct atmel_nand_data __initdata kb9202_nand_data = { · 41 unmodified lines
115 97
116static void __init kb9202_board_init(void)98static void __init kb9202_board_init(void)
117{99{
100 /* Set up the LEDs */
101 at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
102
118 /* Serial */103 /* 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);
119 at91_add_device_serial();115 at91_add_device_serial();
120 /* Ethernet */116 /* Ethernet */
121 at91_add_device_eth(&kb9202_eth_data);117 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
55{55{
56 /* Initialize processor: 20 MHz crystal */56 /* Initialize processor: 20 MHz crystal */
57 at91_initialize(20000000);57 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);
67}58}
68 59
69/*60/*
@@ -341,6 +332,11 @@ static struct ac97c_platform_data neocore926_ac97_data = { · 271 unmodified lines
341static void __init neocore926_board_init(void)332static void __init neocore926_board_init(void)
342{333{
343 /* Serial */334 /* 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);
344 at91_add_device_serial();340 at91_add_device_serial();
345 341
346 /* USB Host */342 /* USB Host */
arch/arm/mach-at91/board-pcontrol-g20.c+10−11
@@ -40,17 +40,6 @@ · 39 unmodified lines
40static void __init pcontrol_g20_init_early(void)40static void __init pcontrol_g20_init_early(void)
41{41{
42 stamp9g20_init_early();42 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);
54}43}
55 44
56static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { {45static 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
199 188
200static void __init pcontrol_g20_board_init(void)189static void __init pcontrol_g20_board_init(void)
201{190{
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);
202 stamp9g20_board_init();201 stamp9g20_board_init();
203 at91_add_device_usbh(&usbh_data);202 at91_add_device_usbh(&usbh_data);
204 at91_add_device_eth(&macb_data);203 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
48{48{
49 /* Initialize processor: 18.432 MHz crystal */49 /* Initialize processor: 18.432 MHz crystal */
50 at91_initialize(18432000);50 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);
62}51}
63 52
64static struct macb_platform_data __initdata picotux200_eth_data = {53static struct macb_platform_data __initdata picotux200_eth_data = {
@@ -106,6 +95,13 @@ static struct platform_device picotux200_flash = { · 41 unmodified lines
106static void __init picotux200_board_init(void)95static void __init picotux200_board_init(void)
107{96{
108 /* Serial */97 /* 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);
109 at91_add_device_serial();105 at91_add_device_serial();
110 /* Ethernet */106 /* Ethernet */
111 at91_add_device_eth(&picotux200_eth_data);107 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
52{52{
53 /* Initialize processor: 12.000 MHz crystal */53 /* Initialize processor: 12.000 MHz crystal */
54 at91_initialize(12000000);54 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
73}55}
74 56
75/*57/*
@@ -235,6 +217,19 @@ static struct gpio_led ek_leds[] = { · 159 unmodified lines
235static void __init ek_board_init(void)217static void __init ek_board_init(void)
236{218{
237 /* Serial */219 /* 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);
238 at91_add_device_serial();233 at91_add_device_serial();
239 /* USB Host */234 /* USB Host */
240 at91_add_device_usbh(&ek_usbh_data);235 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
50{50{
51 /* Initialize processor: 18.432 MHz crystal */51 /* Initialize processor: 18.432 MHz crystal */
52 at91_initialize(18432000);52 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);
67}53}
68 54
69static struct macb_platform_data __initdata dk_eth_data = {55static struct macb_platform_data __initdata dk_eth_data = {
@@ -190,7 +176,17 @@ static struct gpio_led dk_leds[] = { · 120 unmodified lines
190 176
191static void __init dk_board_init(void)177static void __init dk_board_init(void)
192{178{
179 /* Setup the LEDs */
180 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
181
193 /* Serial */182 /* 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);
194 at91_add_device_serial();190 at91_add_device_serial();
195 /* Ethernet */191 /* Ethernet */
196 at91_add_device_eth(&dk_eth_data);192 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
50{50{
51 /* Initialize processor: 18.432 MHz crystal */51 /* Initialize processor: 18.432 MHz crystal */
52 at91_initialize(18432000);52 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);
67}53}
68 54
69static struct macb_platform_data __initdata ek_eth_data = {55static struct macb_platform_data __initdata ek_eth_data = {
@@ -161,7 +147,17 @@ static struct gpio_led ek_leds[] = { · 91 unmodified lines
161 147
162static void __init ek_board_init(void)148static void __init ek_board_init(void)
163{149{
150 /* Setup the LEDs */
151 at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
152
164 /* Serial */153 /* 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);
165 at91_add_device_serial();161 at91_add_device_serial();
166 /* Ethernet */162 /* Ethernet */
167 at91_add_device_eth(&ek_eth_data);163 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
35{35{
36 /* Initialize processor: 18.432 MHz crystal */36 /* Initialize processor: 18.432 MHz crystal */
37 at91_initialize(18432000);37 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);
58}38}
59 39
60/*40/*
@@ -204,7 +184,23 @@ static struct platform_device rsiews_nor_flash = { · 143 unmodified lines
204 */184 */
205static void __init rsi_ews_board_init(void)185static void __init rsi_ews_board_init(void)
206{186{
187 /* Setup the LEDs */
188 at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9);
189
207 /* Serial */190 /* 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);
208 at91_add_device_serial();204 at91_add_device_serial();
209 at91_set_gpio_output(AT91_PIN_PA21, 0);205 at91_set_gpio_output(AT91_PIN_PA21, 0);
210 /* Ethernet */206 /* 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
48{48{
49 /* Initialize processor: 18.432 MHz crystal */49 /* Initialize processor: 18.432 MHz crystal */
50 at91_initialize(18432000);50 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);
68}51}
69 52
70/*53/*
@@ -184,7 +167,20 @@ static struct at91_mmc_data __initdata ek_mmc_data = { · 113 unmodified lines
184 167
185static void __init ek_board_init(void)168static void __init ek_board_init(void)
186{169{
170 /* Setup the LEDs */
171 at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
172
187 /* Serial */173 /* 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);
188 at91_add_device_serial();184 at91_add_device_serial();
189 /* USB Host */185 /* USB Host */
190 at91_add_device_usbh(&ek_usbh_data);186 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
54{54{
55 /* Initialize processor: 18.432 MHz crystal */55 /* Initialize processor: 18.432 MHz crystal */
56 at91_initialize(18432000);56 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);
71}57}
72 58
73/*59/*
@@ -320,6 +306,16 @@ static void __init ek_add_device_buttons(void) {} · 246 unmodified lines
320static void __init ek_board_init(void)306static void __init ek_board_init(void)
321{307{
322 /* Serial */308 /* 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);
323 at91_add_device_serial();319 at91_add_device_serial();
324 /* USB Host */320 /* USB Host */
325 at91_add_device_usbh(&ek_usbh_data);321 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
58{58{
59 /* Initialize processor: 18.432 MHz crystal */59 /* Initialize processor: 18.432 MHz crystal */
60 at91_initialize(18432000);60 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);
70}61}
71 62
72/*63/*
@@ -577,7 +568,12 @@ static struct gpio_led ek_leds[] = { · 504 unmodified lines
577 568
578static void __init ek_board_init(void)569static void __init ek_board_init(void)
579{570{
571 /* Setup the LEDs */
572 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
573
580 /* Serial */574 /* Serial */
575 /* DBGU on ttyS0. (Rx & Tx only) */
576 at91_register_uart(0, 0, 0);
581 at91_add_device_serial();577 at91_add_device_serial();
582 /* USB Host */578 /* USB Host */
583 at91_add_device_usbh(&ek_usbh_data);579 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
57{57{
58 /* Initialize processor: 16.367 MHz crystal */58 /* Initialize processor: 16.367 MHz crystal */
59 at91_initialize(16367660);59 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);
69}60}
70 61
71/*62/*
@@ -412,6 +403,11 @@ static struct at91_can_data ek_can_data = { · 340 unmodified lines
412static void __init ek_board_init(void)403static void __init ek_board_init(void)
413{404{
414 /* Serial */405 /* 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);
415 at91_add_device_serial();411 at91_add_device_serial();
416 /* USB Host */412 /* USB Host */
417 at91_add_device_usbh(&ek_usbh_data);413 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
65{65{
66 /* Initialize processor: 18.432 MHz crystal */66 /* Initialize processor: 18.432 MHz crystal */
67 at91_initialize(18432000);67 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);
82}68}
83 69
84/*70/*
@@ -372,6 +358,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { · 287 unmodified lines
372static void __init ek_board_init(void)358static void __init ek_board_init(void)
373{359{
374 /* Serial */360 /* 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);
375 at91_add_device_serial();371 at91_add_device_serial();
376 /* USB Host */372 /* USB Host */
377 at91_add_device_usbh(&ek_usbh_data);373 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
53{53{
54 /* Initialize processor: 12.000 MHz crystal */54 /* Initialize processor: 12.000 MHz crystal */
55 at91_initialize(12000000);55 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);
66}56}
67 57
68/*58/*
@@ -457,6 +447,12 @@ static struct platform_device *devices[] __initdata = { · 388 unmodified lines
457static void __init ek_board_init(void)447static void __init ek_board_init(void)
458{448{
459 /* Serial */449 /* 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);
460 at91_add_device_serial();456 at91_add_device_serial();
461 /* USB HS Host */457 /* USB HS Host */
462 at91_add_device_usbh_ohci(&ek_usbh_hs_data);458 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
42{42{
43 /* Initialize processor: 12.000 MHz crystal */43 /* Initialize processor: 12.000 MHz crystal */
44 at91_initialize(12000000);44 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);
54}45}
55 46
56/*47/*
@@ -296,6 +287,11 @@ static void __init ek_add_device_buttons(void) {} · 239 unmodified lines
296static void __init ek_board_init(void)287static void __init ek_board_init(void)
297{288{
298 /* Serial */289 /* 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);
299 at91_add_device_serial();295 at91_add_device_serial();
300 /* USB HS */296 /* USB HS */
301 at91_add_device_usba(&ek_usba_udc_data);297 at91_add_device_usba(&ek_usba_udc_data);
arch/arm/mach-at91/board-snapper9260.c+8−10
@@ -43,16 +43,6 @@ · 42 unmodified lines
43static void __init snapper9260_init_early(void)43static void __init snapper9260_init_early(void)
44{44{
45 at91_initialize(18432000);45 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);
56}46}
57 47
58static struct at91_usbh_data __initdata snapper9260_usbh_data = {48static struct at91_usbh_data __initdata snapper9260_usbh_data = {
@@ -168,6 +158,14 @@ static void __init snapper9260_board_init(void) · 109 unmodified lines
168 snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31);158 snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31);
169 i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1);159 i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1);
170 160
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);
171 at91_add_device_serial();169 at91_add_device_serial();
172 at91_add_device_usbh(&snapper9260_usbh_data);170 at91_add_device_usbh(&snapper9260_usbh_data);
173 at91_add_device_udc(&snapper9260_udc_data);171 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
36{36{
37 /* Initialize processor: 18.432 MHz crystal */37 /* Initialize processor: 18.432 MHz crystal */
38 at91_initialize(18432000);38 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
47static 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
57static 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);
77}39}
78 40
79/*41/*
@@ -254,6 +216,8 @@ void add_w1(void) · 174 unmodified lines
254void __init stamp9g20_board_init(void)216void __init stamp9g20_board_init(void)
255{217{
256 /* Serial */218 /* Serial */
219 /* DGBU on ttyS0. (Rx & Tx only) */
220 at91_register_uart(0, 0, 0);
257 at91_add_device_serial();221 at91_add_device_serial();
258 /* NAND */222 /* NAND */
259 add_device_nand();223 add_device_nand();
@@ -269,6 +233,22 @@ void __init stamp9g20_board_init(void) · 9 unmodified lines
269 233
270static void __init portuxg20_board_init(void)234static void __init portuxg20_board_init(void)
271{235{
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);
272 stamp9g20_board_init();252 stamp9g20_board_init();
273 /* USB Host */253 /* USB Host */
274 at91_add_device_usbh(&usbh_data);254 at91_add_device_usbh(&usbh_data);
@@ -286,6 +266,10 @@ static void __init portuxg20_board_init(void) · 11 unmodified lines
286 266
287static void __init stamp9g20evb_board_init(void)267static void __init stamp9g20evb_board_init(void)
288{268{
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);
289 stamp9g20_board_init();273 stamp9g20_board_init();
290 /* USB Host */274 /* USB Host */
291 at91_add_device_usbh(&usbh_data);275 at91_add_device_usbh(&usbh_data);
@@ -303,7 +287,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20") · 11 unmodified lines
303 /* Maintainer: taskit GmbH */287 /* Maintainer: taskit GmbH */
304 .timer = &at91sam926x_timer,288 .timer = &at91sam926x_timer,
305 .map_io = at91_map_io,289 .map_io = at91_map_io,
306 .init_early = portuxg20_init_early,290 .init_early = stamp9g20_init_early,
307 .init_irq = at91_init_irq_default,291 .init_irq = at91_init_irq_default,
308 .init_machine = portuxg20_board_init,292 .init_machine = portuxg20_board_init,
309MACHINE_END293MACHINE_END
@@ -312,7 +296,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20") · 2 unmodified lines
312 /* Maintainer: taskit GmbH */296 /* Maintainer: taskit GmbH */
313 .timer = &at91sam926x_timer,297 .timer = &at91sam926x_timer,
314 .map_io = at91_map_io,298 .map_io = at91_map_io,
315 .init_early = stamp9g20evb_init_early,299 .init_early = stamp9g20_init_early,
316 .init_irq = at91_init_irq_default,300 .init_irq = at91_init_irq_default,
317 .init_machine = stamp9g20evb_board_init,301 .init_machine = stamp9g20evb_board_init,
318MACHINE_END302MACHINE_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
53{53{
54 /* Initialize processor: 12.00 MHz crystal */54 /* Initialize processor: 12.00 MHz crystal */
55 at91_initialize(12000000);55 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);
62}56}
63 57
64/*58/*
@@ -325,6 +319,8 @@ static void __init ek_add_device_leds(void) · 260 unmodified lines
325static void __init ek_board_init(void)319static void __init ek_board_init(void)
326{320{
327 /* Serial */321 /* Serial */
322 /* DBGU on ttyS0. (Rx & Tx only) */
323 at91_register_uart(0, 0, 0);
328 at91_add_device_serial();324 at91_add_device_serial();
329 /* USB Host */325 /* USB Host */
330 at91_add_device_usbh(&ek_usbh_data);326 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
58 58
59 /* Initialize processor: 18.432 MHz crystal */59 /* Initialize processor: 18.432 MHz crystal */
60 at91_initialize(18432000);60 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);
81}61}
82 62
83/*63/*
@@ -560,7 +540,23 @@ void __init yl9200_add_device_video(void) {} · 476 unmodified lines
560 540
561static void __init yl9200_board_init(void)541static void __init yl9200_board_init(void)
562{542{
543 /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
544 at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
545
563 /* Serial */546 /* 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);
564 at91_add_device_serial();560 at91_add_device_serial();
565 /* Ethernet */561 /* Ethernet */
566 at91_add_device_eth(&yl9200_eth_data);562 at91_add_device_eth(&yl9200_eth_data);
arch/arm/mach-at91/cpuidle.c+7−1
@@ -21,6 +21,7 @@ · 20 unmodified lines
21#include <linux/export.h>21#include <linux/export.h>
22#include <asm/proc-fns.h>22#include <asm/proc-fns.h>
23#include <asm/cpuidle.h>23#include <asm/cpuidle.h>
24#include <mach/cpu.h>
24 25
25#include "pm.h"26#include "pm.h"
26 27
@@ -33,7 +34,12 @@ static int at91_enter_idle(struct cpuidle_device *dev, · 6 unmodified lines
33 struct cpuidle_driver *drv,34 struct cpuidle_driver *drv,
34 int index)35 int index)
35{36{
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();
37 43
38 return index;44 return index;
39}45}
arch/arm/mach-at91/generic.h+0−11
@@ -40,17 +40,6 @@ extern struct sys_timer at91sam926x_timer; · 39 unmodified lines
40extern struct sys_timer at91x40_timer;40extern struct sys_timer at91x40_timer;
41 41
42 /* Clocks */42 /* 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 */
48extern void __init at91rm9200_set_console_clock(int id);
49extern void __init at91sam9260_set_console_clock(int id);
50extern void __init at91sam9261_set_console_clock(int id);
51extern void __init at91sam9263_set_console_clock(int id);
52extern void __init at91sam9rl_set_console_clock(int id);
53extern void __init at91sam9g45_set_console_clock(int id);
54#ifdef CONFIG_AT91_PMC_UNIT43#ifdef CONFIG_AT91_PMC_UNIT
55extern int __init at91_clock_init(unsigned long main_clock);44extern int __init at91_clock_init(unsigned long main_clock);
56extern int __init at91_dt_clock_init(void);45extern int __init at91_dt_clock_init(void);
arch/arm/mach-at91/include/mach/at91rm9200.h+0−5
@@ -88,11 +88,6 @@ · 87 unmodified lines
88#define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */88#define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */
89#define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */89#define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */
90 90
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
96/*91/*
97 * Internal Memory.92 * Internal Memory.
98 */93 */
arch/arm/mach-at91/include/mach/at91sam9260.h+0−7
@@ -95,13 +95,6 @@ · 94 unmodified lines
95#define AT91SAM9260_BASE_WDT 0xfffffd4095#define AT91SAM9260_BASE_WDT 0xfffffd40
96#define AT91SAM9260_BASE_GPBR 0xfffffd5096#define AT91SAM9260_BASE_GPBR 0xfffffd50
97 97
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
105 98
106/*99/*
107 * Internal Memory.100 * Internal Memory.
arch/arm/mach-at91/include/mach/at91sam9261.h+0−4
@@ -79,10 +79,6 @@ · 78 unmodified lines
79#define AT91SAM9261_BASE_WDT 0xfffffd4079#define AT91SAM9261_BASE_WDT 0xfffffd40
80#define AT91SAM9261_BASE_GPBR 0xfffffd5080#define AT91SAM9261_BASE_GPBR 0xfffffd50
81 81
82#define AT91_USART0 AT91SAM9261_BASE_US0
83#define AT91_USART1 AT91SAM9261_BASE_US1
84#define AT91_USART2 AT91SAM9261_BASE_US2
85
86 82
87/*83/*
88 * Internal Memory.84 * Internal Memory.
arch/arm/mach-at91/include/mach/at91sam9263.h+0−4
@@ -95,10 +95,6 @@ · 94 unmodified lines
95#define AT91SAM9263_BASE_RTT1 0xfffffd5095#define AT91SAM9263_BASE_RTT1 0xfffffd50
96#define AT91SAM9263_BASE_GPBR 0xfffffd6096#define AT91SAM9263_BASE_GPBR 0xfffffd60
97 97
98#define AT91_USART0 AT91SAM9263_BASE_US0
99#define AT91_USART1 AT91SAM9263_BASE_US1
100#define AT91_USART2 AT91SAM9263_BASE_US2
101
102#define AT91_SMC AT91_SMC098#define AT91_SMC AT91_SMC0
103 99
104/*100/*
arch/arm/mach-at91/include/mach/at91sam9g45.h+0−5
@@ -106,11 +106,6 @@ · 105 unmodified lines
106#define AT91SAM9G45_BASE_RTC 0xfffffdb0106#define AT91SAM9G45_BASE_RTC 0xfffffdb0
107#define AT91SAM9G45_BASE_GPBR 0xfffffd60107#define AT91SAM9G45_BASE_GPBR 0xfffffd60
108 108
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
114/*109/*
115 * Internal Memory.110 * Internal Memory.
116 */111 */
arch/arm/mach-at91/include/mach/at91sam9rl.h+0−5
@@ -89,11 +89,6 @@ · 88 unmodified lines
89#define AT91SAM9RL_BASE_GPBR 0xfffffd6089#define AT91SAM9RL_BASE_GPBR 0xfffffd60
90#define AT91SAM9RL_BASE_RTC 0xfffffe0090#define AT91SAM9RL_BASE_RTC 0xfffffe00
91 91
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
97 92
98/*93/*
99 * Internal Memory.94 * Internal Memory.
arch/arm/mach-at91/include/mach/at91sam9x5.h+0−8
@@ -54,14 +54,6 @@ · 53 unmodified lines
54#define AT91SAM9X5_BASE_USART1 0xf802000054#define AT91SAM9X5_BASE_USART1 0xf8020000
55#define AT91SAM9X5_BASE_USART2 0xf802400055#define AT91SAM9X5_BASE_USART2 0xf8024000
56 56
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
65/*57/*
66 * Internal Memory.58 * Internal Memory.
67 */59 */
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
121#define ATMEL_UART_RI 0x20121#define ATMEL_UART_RI 0x20
122 122
123extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);123extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
124extern void __init at91_set_serial_console(unsigned portnr);
125 124
126extern struct platform_device *atmel_default_console_device;125extern struct platform_device *atmel_default_console_device;
127 126
arch/arm/mach-at91/include/mach/cpu.h+11−17
@@ -54,6 +54,7 @@ · 53 unmodified lines
54#define ARCH_REVISON_9200_BGA (0 << 0)54#define ARCH_REVISON_9200_BGA (0 << 0)
55#define ARCH_REVISON_9200_PQFP (1 << 0)55#define ARCH_REVISON_9200_PQFP (1 << 0)
56 56
57#ifndef __ASSEMBLY__
57enum at91_soc_type {58enum at91_soc_type {
58 /* 920T */59 /* 920T */
59 AT91_SOC_RM9200,60 AT91_SOC_RM9200,
@@ -106,7 +107,7 @@ static inline int at91_soc_is_detected(void) · 46 unmodified lines
106 return at91_soc_initdata.type != AT91_SOC_NONE;107 return at91_soc_initdata.type != AT91_SOC_NONE;
107}108}
108 109
109#ifdef CONFIG_ARCH_AT91RM9200110#ifdef CONFIG_SOC_AT91RM9200
110#define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200)111#define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200)
111#define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA)112#define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA)
112#define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP)113#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
116#define cpu_is_at91rm9200_pqfp() (0)117#define cpu_is_at91rm9200_pqfp() (0)
117#endif118#endif
118 119
119#ifdef CONFIG_ARCH_AT91SAM9260120#ifdef CONFIG_SOC_AT91SAM9260
120#define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE)121#define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE)
121#define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260)122#define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260)
123#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
122#else124#else
123#define cpu_is_at91sam9xe() (0)125#define cpu_is_at91sam9xe() (0)
124#define cpu_is_at91sam9260() (0)126#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
130#define cpu_is_at91sam9g20() (0)127#define cpu_is_at91sam9g20() (0)
131#endif128#endif
132 129
133#ifdef CONFIG_ARCH_AT91SAM9261130#ifdef CONFIG_SOC_AT91SAM9261
134#define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261)131#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
140#define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10)132#define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10)
141#else133#else
134#define cpu_is_at91sam9261() (0)
142#define cpu_is_at91sam9g10() (0)135#define cpu_is_at91sam9g10() (0)
143#endif136#endif
144 137
145#ifdef CONFIG_ARCH_AT91SAM9263138#ifdef CONFIG_SOC_AT91SAM9263
146#define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263)139#define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263)
147#else140#else
148#define cpu_is_at91sam9263() (0)141#define cpu_is_at91sam9263() (0)
149#endif142#endif
150 143
151#ifdef CONFIG_ARCH_AT91SAM9RL144#ifdef CONFIG_SOC_AT91SAM9RL
152#define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL)145#define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL)
153#else146#else
154#define cpu_is_at91sam9rl() (0)147#define cpu_is_at91sam9rl() (0)
155#endif148#endif
156 149
157#ifdef CONFIG_ARCH_AT91SAM9G45150#ifdef CONFIG_SOC_AT91SAM9G45
158#define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45)151#define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45)
159#define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES)152#define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES)
160#define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10)153#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
168#define cpu_is_at91sam9m11() (0)161#define cpu_is_at91sam9m11() (0)
169#endif162#endif
170 163
171#ifdef CONFIG_ARCH_AT91SAM9X5164#ifdef CONFIG_SOC_AT91SAM9X5
172#define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5)165#define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5)
173#define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15)166#define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15)
174#define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35)167#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
189 * definitions may reduce clutter in common drivers.182 * definitions may reduce clutter in common drivers.
190 */183 */
191#define cpu_is_at32ap7000() (0)184#define cpu_is_at32ap7000() (0)
185#endif /* __ASSEMBLY__ */
192 186
193#endif /* __MACH_CPU_H__ */187#endif /* __MACH_CPU_H__ */
arch/arm/mach-at91/include/mach/hardware.h+3−13
@@ -22,27 +22,17 @@ · 21 unmodified lines
22/* 9263, 9g45 */22/* 9263, 9g45 */
23#define AT91_BASE_DBGU1 0xffffee0023#define AT91_BASE_DBGU1 0xffffee00
24 24
25#if defined(CONFIG_ARCH_AT91RM9200)25#if defined(CONFIG_ARCH_AT91X40)
26#include <mach/at91x40.h>
27#else
26#include <mach/at91rm9200.h>28#include <mach/at91rm9200.h>
27#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
28#include <mach/at91sam9260.h>29#include <mach/at91sam9260.h>
29#elif defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)
30#include <mach/at91sam9261.h>30#include <mach/at91sam9261.h>
31#elif defined(CONFIG_ARCH_AT91SAM9263)
32#include <mach/at91sam9263.h>31#include <mach/at91sam9263.h>
33#elif defined(CONFIG_ARCH_AT91SAM9RL)
34#include <mach/at91sam9rl.h>32#include <mach/at91sam9rl.h>
35#elif defined(CONFIG_ARCH_AT91SAM9G45)
36#include <mach/at91sam9g45.h>33#include <mach/at91sam9g45.h>
37#elif defined(CONFIG_ARCH_AT91SAM9X5)
38#include <mach/at91sam9x5.h>34#include <mach/at91sam9x5.h>
39#elif defined(CONFIG_ARCH_AT91X40)
40#include <mach/at91x40.h>
41#else
42#error "Unsupported AT91 processor"
43#endif
44 35
45#if !defined(CONFIG_ARCH_AT91X40)
46/*36/*
47 * On all at91 except rm9200 and x40 have the System Controller starts37 * On all at91 except rm9200 and x40 have the System Controller starts
48 * at address 0xffffc000 and has a size of 16KiB.38 * at address 0xffffc000 and has a size of 16KiB.
arch/arm/mach-at91/include/mach/uncompress.h+150−28
@@ -1,7 +1,8 @@
1/*1/*
2 * arch/arm/mach-at91/include/mach/uncompress.h2 * arch/arm/mach-at91/include/mach/uncompress.h
3 *3 *
4 * Copyright (C) 2003 SAN People4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
5 *6 *
6 * This program is free software; you can redistribute it and/or modify7 * 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 by8 * it under the terms of the GNU General Public License as published by
@@ -25,22 +26,147 @@ · 17 unmodified lines
25#include <linux/atmel_serial.h>26#include <linux/atmel_serial.h>
26#include <mach/hardware.h>27#include <mach/hardware.h>
27 28
28#if defined(CONFIG_AT91_EARLY_DBGU0)29#include <mach/at91_dbgu.h>
29#define UART_OFFSET AT91_BASE_DBGU030#include <mach/cpu.h>
30#elif defined(CONFIG_AT91_EARLY_DBGU1)31
31#define UART_OFFSET AT91_BASE_DBGU132void __iomem *at91_uart;
32#elif defined(CONFIG_AT91_EARLY_USART0)33
33#define UART_OFFSET AT91_USART034#if !defined(CONFIG_ARCH_AT91X40)
34#elif defined(CONFIG_AT91_EARLY_USART1)35static const u32 uarts_rm9200[] = {
35#define UART_OFFSET AT91_USART136 AT91_BASE_DBGU0,
36#elif defined(CONFIG_AT91_EARLY_USART2)37 AT91RM9200_BASE_US0,
37#define UART_OFFSET AT91_USART238 AT91RM9200_BASE_US1,
38#elif defined(CONFIG_AT91_EARLY_USART3)39 AT91RM9200_BASE_US2,
39#define UART_OFFSET AT91_USART340 AT91RM9200_BASE_US3,
40#elif defined(CONFIG_AT91_EARLY_USART4)41 0,
41#define UART_OFFSET AT91_USART442};
42#elif defined(CONFIG_AT91_EARLY_USART5)43
43#define UART_OFFSET AT91_USART544static 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
55static const u32 uarts_sam9261[] = {
56 AT91_BASE_DBGU0,
57 AT91SAM9261_BASE_US0,
58 AT91SAM9261_BASE_US1,
59 AT91SAM9261_BASE_US2,
60 0,
61};
62
63static const u32 uarts_sam9263[] = {
64 AT91_BASE_DBGU1,
65 AT91SAM9263_BASE_US0,
66 AT91SAM9263_BASE_US1,
67 AT91SAM9263_BASE_US2,
68 0,
69};
70
71static 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
80static 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
89static const u32 uarts_sam9x5[] = {
90 AT91_BASE_DBGU0,
91 AT91SAM9X5_BASE_USART0,
92 AT91SAM9X5_BASE_USART1,
93 AT91SAM9X5_BASE_USART2,
94 0,
95};
96
97static 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
140static 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
166static inline void arch_decomp_setup(void)
167{
168 at91_uart = NULL;
169}
44#endif170#endif
45 171
46/*172/*
@@ -52,28 +178,24 @@ · 5 unmodified lines
52 */178 */
53static void putc(int c)179static void putc(int c)
54{180{
55#ifdef UART_OFFSET181 if (!at91_uart)
56 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */182 return;
57 183
58 while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY))184 while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXRDY))
59 barrier();185 barrier();
60 __raw_writel(c, sys + ATMEL_US_THR);186 __raw_writel(c, at91_uart + ATMEL_US_THR);
61#endif
62}187}
63 188
64static inline void flush(void)189static inline void flush(void)
65{190{
66#ifdef UART_OFFSET191 if (!at91_uart)
67 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */192 return;
68 193
69 /* wait for transmission to complete */194 /* 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))
71 barrier();196 barrier();
72#endif
73}197}
74 198
75#define arch_decomp_setup()
76
77#define arch_decomp_wdog()199#define arch_decomp_wdog()
78 200
79#endif201#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
261 * For ARM 926 based chips, this requirement is weaker261 * For ARM 926 based chips, this requirement is weaker
262 * as at91sam9 can access a RAM in self-refresh mode.262 * as at91sam9 can access a RAM in self-refresh mode.
263 */263 */
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();
265 break;270 break;
266 271
267 case PM_SUSPEND_ON:272 case PM_SUSPEND_ON:
@@ -307,10 +312,9 @@ static int __init at91_pm_init(void) · 39 unmodified lines
307 312
308 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));313 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
309 314
310#ifdef CONFIG_ARCH_AT91RM9200
311 /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */315 /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */
312 at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);316 if (cpu_is_at91rm9200())
313#endif317 at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);
314 318
315 suspend_set_ops(&at91_pm_ops);319 suspend_set_ops(&at91_pm_ops);
316 320
arch/arm/mach-at91/pm.h+1−14
@@ -12,7 +12,6 @@ · 11 unmodified lines
12#define __ARCH_ARM_MACH_AT91_PM12#define __ARCH_ARM_MACH_AT91_PM
13 13
14#include <mach/at91_ramc.h>14#include <mach/at91_ramc.h>
15#ifdef CONFIG_ARCH_AT91RM9200
16#include <mach/at91rm9200_sdramc.h>15#include <mach/at91rm9200_sdramc.h>
17 16
18/*17/*
@@ -43,10 +42,6 @@ static inline void at91rm9200_standby(void) · 24 unmodified lines
43 "r" (lpr));42 "r" (lpr));
44}43}
45 44
46#define at91_standby at91rm9200_standby
47
48#elif defined(CONFIG_ARCH_AT91SAM9G45)
49
50/* We manage both DDRAM/SDRAM controllers, we need more than one value to45/* We manage both DDRAM/SDRAM controllers, we need more than one value to
51 * remember.46 * remember.
52 */47 */
@@ -75,11 +70,7 @@ static inline void at91sam9g45_standby(void) · 22 unmodified lines
75 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);70 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
76}71}
77 72
78#define at91_standby at91sam9g45_standby73#ifdef CONFIG_SOC_AT91SAM9263
79
80#else
81
82#ifdef CONFIG_ARCH_AT91SAM9263
83/*74/*
84 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;75 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
85 * handle those cases both here and in the Suspend-To-RAM support.76 * 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
102 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr);93 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr);
103}94}
104 95
105#define at91_standby at91sam9_standby
106
107#endif
108
109#endif96#endif
arch/arm/mach-at91/pm_slowclock.S+1−1
@@ -18,7 +18,7 @@ · 17 unmodified lines
18#include <mach/at91_ramc.h>18#include <mach/at91_ramc.h>
19 19
20 20
21#ifdef CONFIG_ARCH_AT91SAM926321#ifdef CONFIG_SOC_AT91SAM9263
22/*22/*
23 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;23 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
24 * handle those cases both here and in the Suspend-To-RAM support.24 * 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
26 return at91_boot_soc.init != NULL;26 return at91_boot_soc.init != NULL;
27}27}
28 28
29#if !defined(CONFIG_ARCH_AT91RM9200)29#if !defined(CONFIG_SOC_AT91RM9200)
30#define at91rm9200_soc at91_boot_soc30#define at91rm9200_soc at91_boot_soc
31#endif31#endif
32 32
33#if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20))33#if !defined(CONFIG_SOC_AT91SAM9260)
34#define at91sam9260_soc at91_boot_soc34#define at91sam9260_soc at91_boot_soc
35#endif35#endif
36 36
37#if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10))37#if !defined(CONFIG_SOC_AT91SAM9261)
38#define at91sam9261_soc at91_boot_soc38#define at91sam9261_soc at91_boot_soc
39#endif39#endif
40 40
41#if !defined(CONFIG_ARCH_AT91SAM9263)41#if !defined(CONFIG_SOC_AT91SAM9263)
42#define at91sam9263_soc at91_boot_soc42#define at91sam9263_soc at91_boot_soc
43#endif43#endif
44 44
45#if !defined(CONFIG_ARCH_AT91SAM9G45)45#if !defined(CONFIG_SOC_AT91SAM9G45)
46#define at91sam9g45_soc at91_boot_soc46#define at91sam9g45_soc at91_boot_soc
47#endif47#endif
48 48
49#if !defined(CONFIG_ARCH_AT91SAM9RL)49#if !defined(CONFIG_SOC_AT91SAM9RL)
50#define at91sam9rl_soc at91_boot_soc50#define at91sam9rl_soc at91_boot_soc
51#endif51#endif
52 52
53#if !defined(CONFIG_ARCH_AT91SAM9X5)53#if !defined(CONFIG_SOC_AT91SAM9X5)
54#define at91sam9x5_soc at91_boot_soc54#define at91sam9x5_soc at91_boot_soc
55#endif55#endif
arch/arm/mach-clps711x/Kconfig+4−17
@@ -1,6 +1,6 @@
1if ARCH_CLPS711X1if ARCH_CLPS711X
2 2
3menu "CLPS711X/EP721X Implementations"3menu "CLPS711X/EP721X/EP731X Implementations"
4 4
5config ARCH_AUTCPU125config ARCH_AUTCPU12
6 bool "AUTCPU12"6 bool "AUTCPU12"
@@ -45,26 +45,13 @@ config ARCH_P720T · 38 unmodified lines
45config ARCH_FORTUNET45config ARCH_FORTUNET
46 bool "FORTUNET"46 bool "FORTUNET"
47 47
48# XXX Maybe these should indicate register compatibility
49# instead of being mutually exclusive.
50config ARCH_EP7211
51 bool
52 depends on ARCH_EDB7211
53 default y
54
55config ARCH_EP7212
56 bool
57 depends on ARCH_P720T || ARCH_CEIVA
58 default y
59
60config EP72XX_ROM_BOOT48config EP72XX_ROM_BOOT
61 bool "EP72xx ROM boot"49 bool "EP721x/EP731x ROM boot"
62 depends on ARCH_EP7211 || ARCH_EP721250 help
63 ---help---
64 If you say Y here, your CLPS711x-based kernel will use the bootstrap51 If you say Y here, your CLPS711x-based kernel will use the bootstrap
65 mode memory map instead of the normal memory map.52 mode memory map instead of the normal memory map.
66 53
67 Processors derived from the Cirrus CLPS-711X core support two boot54 Processors derived from the Cirrus CLPS711X core support two boot
68 modes. Normal mode boots from the external memory device at CS0.55 modes. Normal mode boots from the external memory device at CS0.
69 Bootstrap mode rearranges parts of the memory map, placing an56 Bootstrap mode rearranges parts of the memory map, placing an
70 internal 128 byte bootstrap ROM at CS0. This option performs the57 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
36#include <asm/page.h>36#include <asm/page.h>
37#include <asm/mach/map.h>37#include <asm/mach/map.h>
38#include <asm/mach/time.h>38#include <asm/mach/time.h>
39#include <asm/hardware/clps7111.h>
40#include <asm/system_misc.h>39#include <asm/system_misc.h>
41 40
42/*41/*
@@ -44,8 +43,8 @@ · 1 unmodified line
44 */43 */
45static struct map_desc clps711x_io_desc[] __initdata = {44static struct map_desc clps711x_io_desc[] __initdata = {
46 {45 {
47 .virtual = CLPS7111_VIRT_BASE,46 .virtual = (unsigned long)CLPS711X_VIRT_BASE,
48 .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),47 .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE),
49 .length = SZ_1M,48 .length = SZ_1M,
50 .type = MT_DEVICE49 .type = MT_DEVICE
51 }50 }
@@ -67,12 +66,6 @@ static void int1_mask(struct irq_data *d) · 15 unmodified lines
67 66
68static void int1_ack(struct irq_data *d)67static void int1_ack(struct irq_data *d)
69{68{
70 u32 intmr1;
71
72 intmr1 = clps_readl(INTMR1);
73 intmr1 &= ~(1 << d->irq);
74 clps_writel(intmr1, INTMR1);
75
76 switch (d->irq) {69 switch (d->irq) {
77 case IRQ_CSINT: clps_writel(0, COEOI); break;70 case IRQ_CSINT: clps_writel(0, COEOI); break;
78 case IRQ_TC1OI: clps_writel(0, TC1EOI); break;71 case IRQ_TC1OI: clps_writel(0, TC1EOI); break;
@@ -109,12 +102,6 @@ static void int2_mask(struct irq_data *d) · 30 unmodified lines
109 102
110static void int2_ack(struct irq_data *d)103static void int2_ack(struct irq_data *d)
111{104{
112 u32 intmr2;
113
114 intmr2 = clps_readl(INTMR2);
115 intmr2 &= ~(1 << (d->irq - 16));
116 clps_writel(intmr2, INTMR2);
117
118 switch (d->irq) {105 switch (d->irq) {
119 case IRQ_KBDINT: clps_writel(0, KBDEOI); break;106 case IRQ_KBDINT: clps_writel(0, KBDEOI); break;
120 }107 }
arch/arm/mach-clps711x/include/mach/clps711x.hrenamed from arch/arm/include/asm/hardware/clps7111.h+112−18
@@ -1,8 +1,6 @@
1/*1/*
2 * arch/arm/include/asm/hardware/clps7111.h2 * This file contains the hardware definitions of the Cirrus Logic
3 *3 * ARM7 CLPS711X internal registers.
4 * This file contains the hardware definitions of the CLPS7111 internal
5 * registers.
6 *4 *
7 * Copyright (C) 2000 Deep Blue Solutions Ltd.5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
8 *6 *
@@ -20,25 +18,18 @@ · 11 unmodified lines
20 * along with this program; if not, write to the Free Software18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */20 */
23#ifndef __ASM_HARDWARE_CLPS7111_H21#ifndef __MACH_CLPS711X_H
24#define __ASM_HARDWARE_CLPS7111_H22#define __MACH_CLPS711X_H
25
26#define CLPS7111_PHYS_BASE (0x80000000)
27 23
28#ifndef __ASSEMBLY__24#define CLPS711X_PHYS_BASE (0x80000000)
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
36 25
37#define PADR (0x0000)26#define PADR (0x0000)
38#define PBDR (0x0001)27#define PBDR (0x0001)
28#define PCDR (0x0002)
39#define PDDR (0x0003)29#define PDDR (0x0003)
40#define PADDR (0x0040)30#define PADDR (0x0040)
41#define PBDDR (0x0041)31#define PBDDR (0x0041)
32#define PCDDR (0x0042)
42#define PDDDR (0x0043)33#define PDDDR (0x0043)
43#define PEDR (0x0080)34#define PEDR (0x0080)
44#define PEDDR (0x00c0)35#define PEDDR (0x00c0)
@@ -50,7 +41,7 @@ · 5 unmodified lines
50#define INTSR1 (0x0240)41#define INTSR1 (0x0240)
51#define INTMR1 (0x0280)42#define INTMR1 (0x0280)
52#define LCDCON (0x02c0)43#define LCDCON (0x02c0)
53#define TC1D (0x0300)44#define TC1D (0x0300)
54#define TC2D (0x0340)45#define TC2D (0x0340)
55#define RTCDR (0x0380)46#define RTCDR (0x0380)
56#define RTCMR (0x03c0)47#define RTCMR (0x03c0)
@@ -85,6 +76,26 @@ · 28 unmodified lines
85#define SS2POP (0x16c0)76#define SS2POP (0x16c0)
86#define KBDEOI (0x1700)77#define KBDEOI (0x1700)
87 78
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
88/* common bits: SYSCON1 / SYSCON2 */99/* common bits: SYSCON1 / SYSCON2 */
89#define SYSCON_UARTEN (1 << 8)100#define SYSCON_UARTEN (1 << 8)
90 101
@@ -131,6 +142,8 @@ · 40 unmodified lines
131#define SYSFLG1_CTXFF (1 << 25)142#define SYSFLG1_CTXFF (1 << 25)
132#define SYSFLG1_SSIBUSY (1 << 26)143#define SYSFLG1_SSIBUSY (1 << 26)
133#define SYSFLG1_ID (1 << 29)144#define SYSFLG1_ID (1 << 29)
145#define SYSFLG1_VERID(x) (((x) >> 30) & 3)
146#define SYSFLG1_VERID_MASK (3 << 30)
134 147
135#define SYSFLG2_SSRXOF (1 << 0)148#define SYSFLG2_SSRXOF (1 << 0)
136#define SYSFLG2_RESVAL (1 << 1)149#define SYSFLG2_RESVAL (1 << 1)
@@ -178,7 +191,88 @@ · 41 unmodified lines
178#define UBRLCR_WRDLEN8 (3 << 17)191#define UBRLCR_WRDLEN8 (3 << 17)
179#define UBRLCR_WRDLEN_MASK (3 << 17)192#define UBRLCR_WRDLEN_MASK (3 << 17)
180 193
194#define SYNCIO_FRMLEN(x) (((x) & 0x3f) << 7)
195#define SYNCIO_CFGLEN(x) ((x) & 0x7f)
181#define SYNCIO_SMCKEN (1 << 13)196#define SYNCIO_SMCKEN (1 << 13)
182#define SYNCIO_TXFRMEN (1 << 14)197#define SYNCIO_TXFRMEN (1 << 14)
183 198
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
12*/12*/
13 13
14#include <mach/hardware.h>14#include <mach/hardware.h>
15#include <asm/hardware/clps7111.h>
16 15
17 .macro addruart, rp, rv, tmp16 .macro addruart, rp, rv, tmp
18#ifndef CONFIG_DEBUG_CLPS711X_UART217#ifndef CONFIG_DEBUG_CLPS711X_UART2
@@ -20,8 +19,8 @@ · 1 unmodified line
20#else19#else
21 mov \rp, #0x1000 @ UART220 mov \rp, #0x1000 @ UART2
22#endif21#endif
23 orr \rv, \rp, #CLPS7111_VIRT_BASE22 orr \rv, \rp, #CLPS711X_VIRT_BASE
24 orr \rp, \rp, #CLPS7111_PHYS_BASE23 orr \rp, \rp, #CLPS711X_PHYS_BASE
25 .endm24 .endm
26 25
27 .macro senduart,rd,rx26 .macro senduart,rd,rx
arch/arm/mach-clps711x/include/mach/entry-macro.S+1−2
@@ -8,7 +8,6 @@ · 7 unmodified lines
8 * warranty of any kind, whether express or implied.8 * warranty of any kind, whether express or implied.
9 */9 */
10#include <mach/hardware.h>10#include <mach/hardware.h>
11#include <asm/hardware/clps7111.h>
12 11
13 .macro get_irqnr_preamble, base, tmp12 .macro get_irqnr_preamble, base, tmp
14 .endm13 .endm
@@ -18,7 +17,7 @@ · 3 unmodified lines
18#endif17#endif
19 18
20 .macro get_irqnr_and_base, irqnr, stat, base, mask19 .macro get_irqnr_and_base, irqnr, stat, base, mask
21 mov \base, #CLPS7111_BASE20 mov \base, #CLPS711X_VIRT_BASE
22 ldr \stat, [\base, #INTSR1]21 ldr \stat, [\base, #INTSR1]
23 ldr \mask, [\base, #INTMR1]22 ldr \mask, [\base, #INTMR1]
24 mov \irqnr, #423 mov \irqnr, #4
arch/arm/mach-clps711x/include/mach/hardware.h+13−46
@@ -19,12 +19,21 @@ · 18 unmodified lines
19 * along with this program; if not, write to the Free Software19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */21 */
22#ifndef __ASM_ARCH_HARDWARE_H22#ifndef __MACH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H23#define __MACH_HARDWARE_H
24 24
25#include <mach/clps711x.h>
25 26
26#define CLPS7111_VIRT_BASE 0xff00000027#define CLPS711X_VIRT_BASE IOMEM(0xff000000)
27#define CLPS7111_BASE CLPS7111_VIRT_BASE28
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
28 37
29/*38/*
30 * The physical addresses that the external chip select signals map to is39 * The physical addresses that the external chip select signals map to is
@@ -52,46 +61,11 @@ · 21 unmodified lines
52#define CS7_PHYS_BASE (0x00000000)61#define CS7_PHYS_BASE (0x00000000)
53#endif62#endif
54 63
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
69#define SYSPLD_VIRT_BASE 0xfe00000064#define SYSPLD_VIRT_BASE 0xfe000000
70#define SYSPLD_BASE SYSPLD_VIRT_BASE65#define SYSPLD_BASE SYSPLD_VIRT_BASE
71 66
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
84#if defined (CONFIG_ARCH_CDB89712)67#if defined (CONFIG_ARCH_CDB89712)
85 68
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
95#define ETHER_START 0x2000000069#define ETHER_START 0x20000000
96#define ETHER_SIZE 0x100070#define ETHER_SIZE 0x1000
97#define ETHER_BASE 0xfe00000071#define ETHER_BASE 0xfe000000
@@ -154,13 +128,6 @@ · 56 unmodified lines
154 128
155#if defined (CONFIG_ARCH_CEIVA)129#if defined (CONFIG_ARCH_CEIVA)
156 130
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
164/*131/*
165 * The two flash banks are wired to chip selects 0 and 1. This is the mapping132 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
166 * for them.133 * for them.
arch/arm/mach-clps711x/include/mach/irqs.h+1−4
@@ -35,7 +35,6 @@ · 34 unmodified lines
35#define IRQ_SSEOTI 1535#define IRQ_SSEOTI 15
36 36
37#define INT1_IRQS (0x0000fff0)37#define INT1_IRQS (0x0000fff0)
38#define INT1_ACK_IRQS (0x00004f10)
39 38
40/*39/*
41 * Interrupts from INTSR240 * Interrupts from INTSR2
@@ -47,7 +46,5 @@ · 5 unmodified lines
47#define IRQ_URXINT2 (16+13) /* bit 13 */46#define IRQ_URXINT2 (16+13) /* bit 13 */
48 47
49#define INT2_IRQS (0x30070000)48#define INT2_IRQS (0x30070000)
50#define INT2_ACK_IRQS (0x00010000)
51
52#define NR_IRQS 30
53 49
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
23extern void clps711x_setup_timer(void);
24
25/*
26 * IRQ handler for the timer
27 */
28static irqreturn_t
29p720t_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 */
44void __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
17 * along with this program; if not, write to the Free Software17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */19 */
20#include <mach/hardware.h>20#include <mach/clps711x.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))
28 21
29#ifdef CONFIG_DEBUG_CLPS711X_UART222#ifdef CONFIG_DEBUG_CLPS711X_UART2
30#define SYSFLGx SYSFLG223#define SYSFLGx SYSFLG2
@@ -34,19 +27,25 @@ · 3 unmodified lines
34#define UARTDRx UARTDR127#define UARTDRx UARTDR1
35#endif28#endif
36 29
30#define phys_reg(x) (*(volatile u32 *)(CLPS711X_PHYS_BASE + (x)))
31
37/*32/*
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 *
38 * This does not append a newline37 * This does not append a newline
39 */38 */
40static inline void putc(int c)39static inline void putc(int c)
41{40{
42 while (clps_readl(SYSFLGx) & SYSFLG_UTXFF)41 while (phys_reg(SYSFLGx) & SYSFLG_UTXFF)
43 barrier();42 barrier();
44 clps_writel(c, UARTDRx);43 phys_reg(UARTDRx) = c;
45}44}
46 45
47static inline void flush(void)46static inline void flush(void)
48{47{
49 while (clps_readl(SYSFLGx) & SYSFLG_UBUSY)48 while (phys_reg(SYSFLGx) & SYSFLG_UBUSY)
50 barrier();49 barrier();
51}50}
52 51
arch/arm/mach-clps711x/p720t-leds.c+0−3
@@ -27,9 +27,6 @@ · 26 unmodified lines
27#include <asm/leds.h>27#include <asm/leds.h>
28#include <asm/mach-types.h>28#include <asm/mach-types.h>
29 29
30#include <asm/hardware/clps7111.h>
31#include <asm/hardware/ep7212.h>
32
33static void p720t_leds_event(led_event_t ledevt)30static void p720t_leds_event(led_event_t ledevt)
34{31{
35 unsigned long flags;32 unsigned long flags;
arch/arm/mach-dove/common.c+1−1
@@ -181,7 +181,7 @@ static int get_tclk(void) · 180 unmodified lines
181 return 166666667;181 return 166666667;
182}182}
183 183
184static void dove_timer_init(void)184static void __init dove_timer_init(void)
185{185{
186 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,186 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
187 IRQ_DOVE_BRIDGE, get_tclk());187 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
56 56
57/* Dump all the extra MPP registers. The platform code will dump the57/* Dump all the extra MPP registers. The platform code will dump the
58 registers for pins 0-23. */58 registers for pins 0-23. */
59static void dove_mpp_dump_regs(void)59static void __init dove_mpp_dump_regs(void)
60{60{
61 pr_debug("PMU_CTRL4_CTRL: %08x\n",61 pr_debug("PMU_CTRL4_CTRL: %08x\n",
62 readl(DOVE_MPP_CTRL4_VIRT_BASE));62 readl(DOVE_MPP_CTRL4_VIRT_BASE));
@@ -67,7 +67,7 @@ static void dove_mpp_dump_regs(void) · 4 unmodified lines
67 pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE));67 pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE));
68}68}
69 69
70static void dove_mpp_cfg_nfc(int sel)70static void __init dove_mpp_cfg_nfc(int sel)
71{71{
72 u32 mpp_gen_cfg = readl(DOVE_MPP_GENERAL_VIRT_BASE);72 u32 mpp_gen_cfg = readl(DOVE_MPP_GENERAL_VIRT_BASE);
73 73
@@ -78,7 +78,7 @@ static void dove_mpp_cfg_nfc(int sel) · 4 unmodified lines
78 dove_mpp_gpio_mode(64, 71, GPIO_OUTPUT_OK);78 dove_mpp_gpio_mode(64, 71, GPIO_OUTPUT_OK);
79}79}
80 80
81static void dove_mpp_cfg_au1(int sel)81static void __init dove_mpp_cfg_au1(int sel)
82{82{
83 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);83 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);
84 u32 ssp_ctrl1 = readl(DOVE_SSP_CTRL_STATUS_1);84 u32 ssp_ctrl1 = readl(DOVE_SSP_CTRL_STATUS_1);
@@ -118,7 +118,7 @@ static void dove_mpp_cfg_au1(int sel) · 33 unmodified lines
118 118
119/* Configure the group registers, enabling GPIO if sel indicates the119/* Configure the group registers, enabling GPIO if sel indicates the
120 pin is to be used for GPIO */120 pin is to be used for GPIO */
121static void dove_mpp_conf_grp(unsigned int *mpp_grp_list)121static void __init dove_mpp_conf_grp(unsigned int *mpp_grp_list)
122{122{
123 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);123 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);
124 int gpio_mode;124 int gpio_mode;
arch/arm/mach-ep93xx/Kconfig+5−0
@@ -2,6 +2,11 @@ if ARCH_EP93XX · 1 unmodified line
2 2
3menu "Cirrus EP93xx Implementation Options"3menu "Cirrus EP93xx Implementation Options"
4 4
5config EP93XX_SOC_COMMON
6 bool
7 default y
8 select LEDS_GPIO_REGISTER
9
5config CRUNCH10config CRUNCH
6 bool "Support for MaverickCrunch"11 bool "Support for MaverickCrunch"
7 help12 help
arch/arm/mach-ep93xx/core.c+20−90
@@ -241,11 +241,7 @@ unsigned int ep93xx_chip_revision(void) · 240 unmodified lines
241 * EP93xx GPIO241 * EP93xx GPIO
242 *************************************************************************/242 *************************************************************************/
243static struct resource ep93xx_gpio_resource[] = {243static struct resource ep93xx_gpio_resource[] = {
244 {244 DEFINE_RES_MEM(EP93XX_GPIO_PHYS_BASE, 0xcc),
245 .start = EP93XX_GPIO_PHYS_BASE,
246 .end = EP93XX_GPIO_PHYS_BASE + 0xcc - 1,
247 .flags = IORESOURCE_MEM,
248 },
249};245};
250 246
251static struct platform_device ep93xx_gpio_device = {247static 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
288 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);284 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);
289 285
290static struct resource ep93xx_rtc_resource[] = {286static struct resource ep93xx_rtc_resource[] = {
291 {287 DEFINE_RES_MEM(EP93XX_RTC_PHYS_BASE, 0x10c),
292 .start = EP93XX_RTC_PHYS_BASE,
293 .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1,
294 .flags = IORESOURCE_MEM,
295 },
296};288};
297 289
298static struct platform_device ep93xx_rtc_device = {290static struct platform_device ep93xx_rtc_device = {
@@ -304,16 +296,8 @@ static struct platform_device ep93xx_rtc_device = { · 5 unmodified lines
304 296
305 297
306static struct resource ep93xx_ohci_resources[] = {298static struct resource ep93xx_ohci_resources[] = {
307 [0] = {299 DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000),
308 .start = EP93XX_USB_PHYS_BASE,300 DEFINE_RES_IRQ(IRQ_EP93XX_USB),
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 },
317};301};
318 302
319 303
@@ -372,15 +356,8 @@ void __init ep93xx_register_flash(unsigned int width, · 52 unmodified lines
372static struct ep93xx_eth_data ep93xx_eth_data;356static struct ep93xx_eth_data ep93xx_eth_data;
373 357
374static struct resource ep93xx_eth_resource[] = {358static struct resource ep93xx_eth_resource[] = {
375 {359 DEFINE_RES_MEM(EP93XX_ETHERNET_PHYS_BASE, 0x10000),
376 .start = EP93XX_ETHERNET_PHYS_BASE,360 DEFINE_RES_IRQ(IRQ_EP93XX_ETHERNET),
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 }
384};361};
385 362
386static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32);363static 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
461static struct ep93xx_spi_info ep93xx_spi_master_data;438static struct ep93xx_spi_info ep93xx_spi_master_data;
462 439
463static struct resource ep93xx_spi_resources[] = {440static struct resource ep93xx_spi_resources[] = {
464 {441 DEFINE_RES_MEM(EP93XX_SPI_PHYS_BASE, 0x18),
465 .start = EP93XX_SPI_PHYS_BASE,442 DEFINE_RES_IRQ(IRQ_EP93XX_SSP),
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 },
474};443};
475 444
476static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32);445static 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
513/*************************************************************************482/*************************************************************************
514 * EP93xx LEDs483 * EP93xx LEDs
515 *************************************************************************/484 *************************************************************************/
516static struct gpio_led ep93xx_led_pins[] = {485static const struct gpio_led ep93xx_led_pins[] __initconst = {
517 {486 {
518 .name = "platform:grled",487 .name = "platform:grled",
519 .gpio = EP93XX_GPIO_LINE_GRLED,488 .gpio = EP93XX_GPIO_LINE_GRLED,
@@ -523,29 +492,16 @@ static struct gpio_led ep93xx_led_pins[] = { · 3 unmodified lines
523 },492 },
524};493};
525 494
526static struct gpio_led_platform_data ep93xx_led_data = {495static const struct gpio_led_platform_data ep93xx_led_data __initconst = {
527 .num_leds = ARRAY_SIZE(ep93xx_led_pins),496 .num_leds = ARRAY_SIZE(ep93xx_led_pins),
528 .leds = ep93xx_led_pins,497 .leds = ep93xx_led_pins,
529};498};
530 499
531static struct platform_device ep93xx_leds = {
532 .name = "leds-gpio",
533 .id = -1,
534 .dev = {
535 .platform_data = &ep93xx_led_data,
536 },
537};
538
539
540/*************************************************************************500/*************************************************************************
541 * EP93xx pwm peripheral handling501 * EP93xx pwm peripheral handling
542 *************************************************************************/502 *************************************************************************/
543static struct resource ep93xx_pwm0_resource[] = {503static struct resource ep93xx_pwm0_resource[] = {
544 {504 DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE, 0x10),
545 .start = EP93XX_PWM_PHYS_BASE,
546 .end = EP93XX_PWM_PHYS_BASE + 0x10 - 1,
547 .flags = IORESOURCE_MEM,
548 },
549};505};
550 506
551static struct platform_device ep93xx_pwm0_device = {507static struct platform_device ep93xx_pwm0_device = {
@@ -556,11 +512,7 @@ static struct platform_device ep93xx_pwm0_device = { · 4 unmodified lines
556};512};
557 513
558static struct resource ep93xx_pwm1_resource[] = {514static struct resource ep93xx_pwm1_resource[] = {
559 {515 DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE + 0x20, 0x10),
560 .start = EP93XX_PWM_PHYS_BASE + 0x20,
561 .end = EP93XX_PWM_PHYS_BASE + 0x30 - 1,
562 .flags = IORESOURCE_MEM,
563 },
564};516};
565 517
566static struct platform_device ep93xx_pwm1_device = {518static struct platform_device ep93xx_pwm1_device = {
@@ -628,11 +580,7 @@ EXPORT_SYMBOL(ep93xx_pwm_release_gpio); · 61 unmodified lines
628static struct ep93xxfb_mach_info ep93xxfb_data;580static struct ep93xxfb_mach_info ep93xxfb_data;
629 581
630static struct resource ep93xx_fb_resource[] = {582static struct resource ep93xx_fb_resource[] = {
631 {583 DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE, 0x800),
632 .start = EP93XX_RASTER_PHYS_BASE,
633 .end = EP93XX_RASTER_PHYS_BASE + 0x800 - 1,
634 .flags = IORESOURCE_MEM,
635 },
636};584};
637 585
638static struct platform_device ep93xx_fb_device = {586static struct platform_device ep93xx_fb_device = {
@@ -680,15 +628,8 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) · 41 unmodified lines
680static struct ep93xx_keypad_platform_data ep93xx_keypad_data;628static struct ep93xx_keypad_platform_data ep93xx_keypad_data;
681 629
682static struct resource ep93xx_keypad_resource[] = {630static struct resource ep93xx_keypad_resource[] = {
683 {631 DEFINE_RES_MEM(EP93XX_KEY_MATRIX_PHYS_BASE, 0x0c),
684 .start = EP93XX_KEY_MATRIX_PHYS_BASE,632 DEFINE_RES_IRQ(IRQ_EP93XX_KEY),
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 },
692};633};
693 634
694static struct platform_device ep93xx_keypad_device = {635static struct platform_device ep93xx_keypad_device = {
@@ -761,11 +702,7 @@ EXPORT_SYMBOL(ep93xx_keypad_release_gpio); · 66 unmodified lines
761 * EP93xx I2S audio peripheral handling702 * EP93xx I2S audio peripheral handling
762 *************************************************************************/703 *************************************************************************/
763static struct resource ep93xx_i2s_resource[] = {704static struct resource ep93xx_i2s_resource[] = {
764 {705 DEFINE_RES_MEM(EP93XX_I2S_PHYS_BASE, 0x100),
765 .start = EP93XX_I2S_PHYS_BASE,
766 .end = EP93XX_I2S_PHYS_BASE + 0x100 - 1,
767 .flags = IORESOURCE_MEM,
768 },
769};706};
770 707
771static struct platform_device ep93xx_i2s_device = {708static struct platform_device ep93xx_i2s_device = {
@@ -824,16 +761,8 @@ EXPORT_SYMBOL(ep93xx_i2s_release); · 52 unmodified lines
824 * EP93xx AC97 audio peripheral handling761 * EP93xx AC97 audio peripheral handling
825 *************************************************************************/762 *************************************************************************/
826static struct resource ep93xx_ac97_resources[] = {763static struct resource ep93xx_ac97_resources[] = {
827 {764 DEFINE_RES_MEM(EP93XX_AAC_PHYS_BASE, 0xac),
828 .start = EP93XX_AAC_PHYS_BASE,765 DEFINE_RES_IRQ(IRQ_EP93XX_AACINTR),
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 },
837};766};
838 767
839static struct platform_device ep93xx_ac97_device = {768static struct platform_device ep93xx_ac97_device = {
@@ -889,8 +818,9 @@ void __init ep93xx_init_devices(void) · 49 unmodified lines
889 818
890 platform_device_register(&ep93xx_rtc_device);819 platform_device_register(&ep93xx_rtc_device);
891 platform_device_register(&ep93xx_ohci_device);820 platform_device_register(&ep93xx_ohci_device);
892 platform_device_register(&ep93xx_leds);
893 platform_device_register(&ep93xx_wdt_device);821 platform_device_register(&ep93xx_wdt_device);
822
823 gpio_led_register_device(-1, &ep93xx_led_data);
894}824}
895 825
896void ep93xx_restart(char mode, const char *cmd)826void ep93xx_restart(char mode, const char *cmd)
arch/arm/mach-exynos/cpuidle.c+6−47
@@ -20,6 +20,7 @@ · 19 unmodified lines
20#include <asm/smp_scu.h>20#include <asm/smp_scu.h>
21#include <asm/suspend.h>21#include <asm/suspend.h>
22#include <asm/unified.h>22#include <asm/unified.h>
23#include <asm/cpuidle.h>
23#include <mach/regs-pmu.h>24#include <mach/regs-pmu.h>
24#include <mach/pmu.h>25#include <mach/pmu.h>
25 26
@@ -34,22 +35,12 @@ · 8 unmodified lines
34 35
35#define S5P_CHECK_AFTR 0xFCBA0D1036#define S5P_CHECK_AFTR 0xFCBA0D10
36 37
37static int exynos4_enter_idle(struct cpuidle_device *dev,
38 struct cpuidle_driver *drv,
39 int index);
40static int exynos4_enter_lowpower(struct cpuidle_device *dev,38static int exynos4_enter_lowpower(struct cpuidle_device *dev,
41 struct cpuidle_driver *drv,39 struct cpuidle_driver *drv,
42 int index);40 int index);
43 41
44static struct cpuidle_state exynos4_cpuidle_set[] __initdata = {42static struct cpuidle_state exynos4_cpuidle_set[] __initdata = {
45 [0] = {43 [0] = ARM_CPUIDLE_WFI_STATE,
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 },
53 [1] = {44 [1] = {
54 .enter = exynos4_enter_lowpower,45 .enter = exynos4_enter_lowpower,
55 .exit_latency = 300,46 .exit_latency = 300,
@@ -63,8 +54,9 @@ static struct cpuidle_state exynos4_cpuidle_set[] __initdata = { · 7 unmodified lines
63static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);54static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
64 55
65static struct cpuidle_driver exynos4_idle_driver = {56static struct cpuidle_driver exynos4_idle_driver = {
66 .name = "exynos4_idle",57 .name = "exynos4_idle",
67 .owner = THIS_MODULE,58 .owner = THIS_MODULE,
59 .en_core_tk_irqen = 1,
68};60};
69 61
70/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */62/* 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
103 struct cpuidle_driver *drv,95 struct cpuidle_driver *drv,
104 int index)96 int index)
105{97{
106 struct timeval before, after;
107 int idle_time;
108 unsigned long tmp;98 unsigned long tmp;
109 99
110 local_irq_disable();
111 do_gettimeofday(&before);
112
113 exynos4_set_wakeupmask();100 exynos4_set_wakeupmask();
114 101
115 /* Set value of power down register for aftr mode */102 /* 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
150 /* Clear wakeup state register */137 /* Clear wakeup state register */
151 __raw_writel(0x0, S5P_WAKEUP_STAT);138 __raw_writel(0x0, S5P_WAKEUP_STAT);
152 139
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
163static 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;
181 return index;140 return index;
182}141}
183 142
@@ -192,7 +151,7 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev, · 8 unmodified lines
192 new_index = drv->safe_state_index;151 new_index = drv->safe_state_index;
193 152
194 if (new_index == 0)153 if (new_index == 0)
195 return exynos4_enter_idle(dev, drv, new_index);154 return arm_cpuidle_simple_enter(dev, drv, new_index);
196 else155 else
197 return exynos4_enter_core0_aftr(dev, drv, new_index);156 return exynos4_enter_core0_aftr(dev, drv, new_index);
198}157}
arch/arm/mach-exynos/dev-ahci.c+2−10
@@ -236,16 +236,8 @@ static struct ahci_platform_data exynos4_ahci_pdata = { · 235 unmodified lines
236};236};
237 237
238static struct resource exynos4_ahci_resource[] = {238static struct resource exynos4_ahci_resource[] = {
239 [0] = {239 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SATA, SZ_64K),
240 .start = EXYNOS4_PA_SATA,240 [1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_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 },
249};241};
250 242
251static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32);243static 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
62};62};
63 63
64static struct resource exynos4_i2s0_resource[] = {64static struct resource exynos4_i2s0_resource[] = {
65 [0] = {65 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256),
66 .start = EXYNOS4_PA_I2S0,66 [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
67 .end = EXYNOS4_PA_I2S0 + 0x100 - 1,67 [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
68 .flags = IORESOURCE_MEM,68 [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
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 },
85};69};
86 70
87struct platform_device exynos4_device_i2s0 = {71struct platform_device exynos4_device_i2s0 = {
@@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { · 22 unmodified lines
110};94};
111 95
112static struct resource exynos4_i2s1_resource[] = {96static struct resource exynos4_i2s1_resource[] = {
113 [0] = {97 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256),
114 .start = EXYNOS4_PA_I2S1,98 [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
115 .end = EXYNOS4_PA_I2S1 + 0x100 - 1,99 [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
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 },
128};100};
129 101
130struct platform_device exynos4_device_i2s1 = {102struct platform_device exynos4_device_i2s1 = {
@@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = { · 7 unmodified lines
138};110};
139 111
140static struct resource exynos4_i2s2_resource[] = {112static struct resource exynos4_i2s2_resource[] = {
141 [0] = {113 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256),
142 .start = EXYNOS4_PA_I2S2,114 [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
143 .end = EXYNOS4_PA_I2S2 + 0x100 - 1,115 [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
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 },
156};116};
157 117
158struct platform_device exynos4_device_i2s2 = {118struct platform_device exynos4_device_i2s2 = {
@@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { · 33 unmodified lines
192};152};
193 153
194static struct resource exynos4_pcm0_resource[] = {154static struct resource exynos4_pcm0_resource[] = {
195 [0] = {155 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256),
196 .start = EXYNOS4_PA_PCM0,156 [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
197 .end = EXYNOS4_PA_PCM0 + 0x100 - 1,157 [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
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 },
210};158};
211 159
212struct platform_device exynos4_device_pcm0 = {160struct platform_device exynos4_device_pcm0 = {
@@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = { · 7 unmodified lines
220};168};
221 169
222static struct resource exynos4_pcm1_resource[] = {170static struct resource exynos4_pcm1_resource[] = {
223 [0] = {171 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256),
224 .start = EXYNOS4_PA_PCM1,172 [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
225 .end = EXYNOS4_PA_PCM1 + 0x100 - 1,173 [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
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 },
238};174};
239 175
240struct platform_device exynos4_device_pcm1 = {176struct platform_device exynos4_device_pcm1 = {
@@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = { · 7 unmodified lines
248};184};
249 185
250static struct resource exynos4_pcm2_resource[] = {186static struct resource exynos4_pcm2_resource[] = {
251 [0] = {187 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256),
252 .start = EXYNOS4_PA_PCM2,188 [1] = DEFINE_RES_DMA(DMACH_PCM2_TX),
253 .end = EXYNOS4_PA_PCM2 + 0x100 - 1,189 [2] = DEFINE_RES_DMA(DMACH_PCM2_RX),
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 },
266};190};
267 191
268struct platform_device exynos4_device_pcm2 = {192struct platform_device exynos4_device_pcm2 = {
@@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev) · 14 unmodified lines
283}207}
284 208
285static struct resource exynos4_ac97_resource[] = {209static struct resource exynos4_ac97_resource[] = {
286 [0] = {210 [0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256),
287 .start = EXYNOS4_PA_AC97,211 [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
288 .end = EXYNOS4_PA_AC97 + 0x100 - 1,212 [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
289 .flags = IORESOURCE_MEM,213 [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
290 },214 [4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97),
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 },
311};215};
312 216
313static struct s3c_audio_pdata s3c_ac97_pdata = {217static struct s3c_audio_pdata s3c_ac97_pdata = {
@@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) · 24 unmodified lines
338}242}
339 243
340static struct resource exynos4_spdif_resource[] = {244static struct resource exynos4_spdif_resource[] = {
341 [0] = {245 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256),
342 .start = EXYNOS4_PA_SPDIF,246 [1] = DEFINE_RES_DMA(DMACH_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 },
351};247};
352 248
353static struct s3c_audio_pdata samsung_spdif_pdata = {249static 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
77 77
78static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {78static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {
79 .cd_type = S3C_SDHCI_CD_PERMANENT,79 .cd_type = S3C_SDHCI_CD_PERMANENT,
80 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
81#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT80#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
82 .max_width = 8,81 .max_width = 8,
83 .host_caps = MMC_CAP_8_BIT_DATA,82 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -88,13 +87,11 @@ static struct s3c_sdhci_platdata armlex4210_hsmmc2_pdata __initdata = { · 4 unmodified lines
88 .cd_type = S3C_SDHCI_CD_GPIO,87 .cd_type = S3C_SDHCI_CD_GPIO,
89 .ext_cd_gpio = EXYNOS4_GPX2(5),88 .ext_cd_gpio = EXYNOS4_GPX2(5),
90 .ext_cd_gpio_invert = 1,89 .ext_cd_gpio_invert = 1,
91 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
92 .max_width = 4,90 .max_width = 4,
93};91};
94 92
95static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {93static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {
96 .cd_type = S3C_SDHCI_CD_PERMANENT,94 .cd_type = S3C_SDHCI_CD_PERMANENT,
97 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
98 .max_width = 4,95 .max_width = 4,
99};96};
100 97
@@ -121,16 +118,9 @@ static void __init armlex4210_wlan_init(void) · 20 unmodified lines
121}118}
122 119
123static struct resource armlex4210_smsc911x_resources[] = {120static struct resource armlex4210_smsc911x_resources[] = {
124 [0] = {121 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(3), SZ_64K),
125 .start = EXYNOS4_PA_SROM_BANK(3),122 [1] = DEFINE_RES_NAMED(IRQ_EINT(27), 1, NULL, IORESOURCE_IRQ \
126 .end = EXYNOS4_PA_SROM_BANK(3) + SZ_64K - 1,123 | IRQF_TRIGGER_HIGH),
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 },
134};124};
135 125
136static struct smsc911x_platform_config smsc9215_config = {126static 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
114 MMC_CAP_ERASE),114 MMC_CAP_ERASE),
115 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,115 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
116 .cd_type = S3C_SDHCI_CD_PERMANENT,116 .cd_type = S3C_SDHCI_CD_PERMANENT,
117 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
118};117};
119 118
120static struct regulator_consumer_supply emmc_supplies[] = {119static struct regulator_consumer_supply emmc_supplies[] = {
@@ -155,7 +154,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = { · 34 unmodified lines
155 .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */154 .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */
156 .ext_cd_gpio_invert = 1,155 .ext_cd_gpio_invert = 1,
157 .cd_type = S3C_SDHCI_CD_GPIO,156 .cd_type = S3C_SDHCI_CD_GPIO,
158 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
159};157};
160 158
161/* WLAN */159/* WLAN */
@@ -164,7 +162,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = { · 2 unmodified lines
164 .host_caps = MMC_CAP_4_BIT_DATA |162 .host_caps = MMC_CAP_4_BIT_DATA |
165 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,163 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
166 .cd_type = S3C_SDHCI_CD_EXTERNAL,164 .cd_type = S3C_SDHCI_CD_EXTERNAL,
167 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
168};165};
169 166
170static void __init nuri_sdhci_init(void)167static 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
472 472
473static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {473static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
474 .cd_type = S3C_SDHCI_CD_INTERNAL,474 .cd_type = S3C_SDHCI_CD_INTERNAL,
475 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
476};475};
477 476
478static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {477static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
479 .cd_type = S3C_SDHCI_CD_INTERNAL,478 .cd_type = S3C_SDHCI_CD_INTERNAL,
480 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
481};479};
482 480
483/* USB EHCI */481/* 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
85 85
86static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {86static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {
87 .cd_type = S3C_SDHCI_CD_INTERNAL,87 .cd_type = S3C_SDHCI_CD_INTERNAL,
88 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
89#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT88#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
90 .max_width = 8,89 .max_width = 8,
91 .host_caps = MMC_CAP_8_BIT_DATA,90 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -94,7 +93,6 @@ static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = { · 2 unmodified lines
94 93
95static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = {94static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = {
96 .cd_type = S3C_SDHCI_CD_INTERNAL,95 .cd_type = S3C_SDHCI_CD_INTERNAL,
97 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
98};96};
99 97
100static struct regulator_consumer_supply max8997_buck1 =98static 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
93 93
94static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {94static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
95 .cd_type = S3C_SDHCI_CD_INTERNAL,95 .cd_type = S3C_SDHCI_CD_INTERNAL,
96 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
97#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT96#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
98 .max_width = 8,97 .max_width = 8,
99 .host_caps = MMC_CAP_8_BIT_DATA,98 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -104,12 +103,10 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = { · 4 unmodified lines
104 .cd_type = S3C_SDHCI_CD_GPIO,103 .cd_type = S3C_SDHCI_CD_GPIO,
105 .ext_cd_gpio = EXYNOS4_GPK0(2),104 .ext_cd_gpio = EXYNOS4_GPK0(2),
106 .ext_cd_gpio_invert = 1,105 .ext_cd_gpio_invert = 1,
107 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
108};106};
109 107
110static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {108static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
111 .cd_type = S3C_SDHCI_CD_INTERNAL,109 .cd_type = S3C_SDHCI_CD_INTERNAL,
112 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
113#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT110#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
114 .max_width = 8,111 .max_width = 8,
115 .host_caps = MMC_CAP_8_BIT_DATA,112 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -120,7 +117,6 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = { · 4 unmodified lines
120 .cd_type = S3C_SDHCI_CD_GPIO,117 .cd_type = S3C_SDHCI_CD_GPIO,
121 .ext_cd_gpio = EXYNOS4_GPK2(2),118 .ext_cd_gpio = EXYNOS4_GPK2(2),
122 .ext_cd_gpio_invert = 1,119 .ext_cd_gpio_invert = 1,
123 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
124};120};
125 121
126static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,122static 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
183};179};
184 180
185static struct resource smdkv310_smsc911x_resources[] = {181static struct resource smdkv310_smsc911x_resources[] = {
186 [0] = {182 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(1), SZ_64K),
187 .start = EXYNOS4_PA_SROM_BANK(1),183 [1] = DEFINE_RES_NAMED(IRQ_EINT(5), 1, NULL, IORESOURCE_IRQ \
188 .end = EXYNOS4_PA_SROM_BANK(1) + SZ_64K - 1,184 | IRQF_TRIGGER_LOW),
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 },
196};185};
197 186
198static struct smsc911x_platform_config smsc9215_config = {187static 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
750 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),750 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
751 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,751 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
752 .cd_type = S3C_SDHCI_CD_PERMANENT,752 .cd_type = S3C_SDHCI_CD_PERMANENT,
753 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
754};753};
755 754
756static struct regulator_consumer_supply mmc0_supplies[] = {755static struct regulator_consumer_supply mmc0_supplies[] = {
@@ -790,7 +789,6 @@ static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = { · 33 unmodified lines
790 .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */789 .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */
791 .ext_cd_gpio_invert = 1,790 .ext_cd_gpio_invert = 1,
792 .cd_type = S3C_SDHCI_CD_GPIO,791 .cd_type = S3C_SDHCI_CD_GPIO,
793 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
794};792};
795 793
796/* WiFi */794/* WiFi */
arch/arm/mach-imx/Kconfig+2−0
@@ -571,8 +571,10 @@ config MACH_MX35_3DS · 570 unmodified lines
571 select MXC_DEBUG_BOARD571 select MXC_DEBUG_BOARD
572 select IMX_HAVE_PLATFORM_FSL_USB2_UDC572 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
573 select IMX_HAVE_PLATFORM_IMX2_WDT573 select IMX_HAVE_PLATFORM_IMX2_WDT
574 select IMX_HAVE_PLATFORM_IMX_FB
574 select IMX_HAVE_PLATFORM_IMX_I2C575 select IMX_HAVE_PLATFORM_IMX_I2C
575 select IMX_HAVE_PLATFORM_IMX_UART576 select IMX_HAVE_PLATFORM_IMX_UART
577 select IMX_HAVE_PLATFORM_IPU_CORE
576 select IMX_HAVE_PLATFORM_MXC_EHCI578 select IMX_HAVE_PLATFORM_MXC_EHCI
577 select IMX_HAVE_PLATFORM_MXC_NAND579 select IMX_HAVE_PLATFORM_MXC_NAND
578 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX580 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
243static void __maybe_unused ads7846_dev_init(void)243static void __maybe_unused ads7846_dev_init(void)
244{244{
245 if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {245 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");
247 return;247 return;
248 }248 }
249 gpio_direction_input(ADS7846_PENDOWN);249 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
194 mx35_clocks_init();194 mx35_clocks_init();
195}195}
196 196
197struct sys_timer eukrea_cpuimx35_timer = {197static struct sys_timer eukrea_cpuimx35_timer = {
198 .init = eukrea_cpuimx35_timer_init,198 .init = eukrea_cpuimx35_timer_init,
199};199};
200 200
arch/arm/mach-imx/mach-mx1ads.c+1−1
@@ -134,7 +134,7 @@ static void __init mx1ads_timer_init(void) · 133 unmodified lines
134 mx1_clocks_init(32000);134 mx1_clocks_init(32000);
135}135}
136 136
137struct sys_timer mx1ads_timer = {137static struct sys_timer mx1ads_timer = {
138 .init = mx1ads_timer_init,138 .init = mx1ads_timer_init,
139};139};
140 140
arch/arm/mach-imx/mach-mx21ads.c+1−2
@@ -304,8 +304,7 @@ static void __init mx21ads_board_init(void) · 303 unmodified lines
304 imx21_add_mxc_nand(&mx21ads_nand_board_info);304 imx21_add_mxc_nand(&mx21ads_nand_board_info);
305 305
306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
307 platform_device_register_full(307 platform_device_register_full(&mx21ads_cs8900_devinfo);
308 (struct platform_device_info *)&mx21ads_cs8900_devinfo);
309}308}
310 309
311static void __init mx21ads_timer_init(void)310static 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
283 mx31_clocks_init(26000000);283 mx31_clocks_init(26000000);
284}284}
285 285
286struct sys_timer mx31lite_timer = {286static struct sys_timer mx31lite_timer = {
287 .init = mx31lite_timer_init,287 .init = mx31lite_timer_init,
288};288};
289 289
arch/arm/mach-imx/mach-mx31moboard.c+1−1
@@ -580,7 +580,7 @@ static void __init mx31moboard_timer_init(void) · 579 unmodified lines
580 mx31_clocks_init(26000000);580 mx31_clocks_init(26000000);
581}581}
582 582
583struct sys_timer mx31moboard_timer = {583static struct sys_timer mx31moboard_timer = {
584 .init = mx31moboard_timer_init,584 .init = mx31moboard_timer_init,
585};585};
586 586
arch/arm/mach-imx/mach-mx35_3ds.c+1−1
@@ -419,7 +419,7 @@ static void __init mx35pdk_timer_init(void) · 418 unmodified lines
419 mx35_clocks_init();419 mx35_clocks_init();
420}420}
421 421
422struct sys_timer mx35pdk_timer = {422static struct sys_timer mx35pdk_timer = {
423 .init = mx35pdk_timer_init,423 .init = mx35pdk_timer_init,
424};424};
425 425
arch/arm/mach-imx/mach-mx51_efikamx.c+1−2
@@ -284,8 +284,7 @@ static struct sys_timer mx51_efikamx_timer = { · 283 unmodified lines
284 .init = mx51_efikamx_timer_init,284 .init = mx51_efikamx_timer_init,
285};285};
286 286
287MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")287MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)")
288 /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */
289 .atag_offset = 0x100,288 .atag_offset = 0x100,
290 .map_io = mx51_map_io,289 .map_io = mx51_map_io,
291 .init_early = imx51_init_early,290 .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
280 .init = mx51_efikasb_timer_init,280 .init = mx51_efikasb_timer_init,
281};281};
282 282
283MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")283MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)")
284 .atag_offset = 0x100,284 .atag_offset = 0x100,
285 .map_io = mx51_map_io,285 .map_io = mx51_map_io,
286 .init_early = imx51_init_early,286 .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
683 mx31_clocks_init(26000000);683 mx31_clocks_init(26000000);
684}684}
685 685
686struct sys_timer pcm037_timer = {686static struct sys_timer pcm037_timer = {
687 .init = pcm037_timer_init,687 .init = pcm037_timer_init,
688};688};
689 689
arch/arm/mach-imx/mach-pcm043.c+1−1
@@ -399,7 +399,7 @@ static void __init pcm043_timer_init(void) · 398 unmodified lines
399 mx35_clocks_init();399 mx35_clocks_init();
400}400}
401 401
402struct sys_timer pcm043_timer = {402static struct sys_timer pcm043_timer = {
403 .init = pcm043_timer_init,403 .init = pcm043_timer_init,
404};404};
405 405
arch/arm/mach-imx/mach-vpr200.c+1−1
@@ -310,7 +310,7 @@ static void __init vpr200_timer_init(void) · 309 unmodified lines
310 mx35_clocks_init();310 mx35_clocks_init();
311}311}
312 312
313struct sys_timer vpr200_timer = {313static struct sys_timer vpr200_timer = {
314 .init = vpr200_timer_init,314 .init = vpr200_timer_init,
315};315};
316 316
arch/arm/mach-ixp2000/Kconfig+0−72
@@ -1,72 +0,0 @@
1
2if ARCH_IXP2000
3
4config ARCH_SUPPORTS_BIG_ENDIAN
5 bool
6 default y
7
8menu "Intel IXP2400/2800 Implementation Options"
9
10comment "IXP2400/2800 Platforms"
11
12config 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
19config 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
26config 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
33config ARCH_IXDP2X00
34 bool
35 depends on ARCH_IXDP2400 || ARCH_IXDP2800
36 default y
37
38config 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
45config 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
52config MACH_IXDP28X5
53 bool
54 depends on ARCH_IXDP2801
55 default y
56
57config ARCH_IXDP2X01
58 bool
59 depends on ARCH_IXDP2401 || ARCH_IXDP2801
60 default y
61
62config 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
70endmenu
71
72endif
arch/arm/mach-ixp2000/Makefile+0−14
@@ -1,14 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4obj-y := core.o pci.o
5obj-m :=
6obj-n :=
7obj- :=
8
9obj-$(CONFIG_ARCH_ENP2611) += enp2611.o
10obj-$(CONFIG_ARCH_IXDP2400) += ixdp2400.o
11obj-$(CONFIG_ARCH_IXDP2800) += ixdp2800.o
12obj-$(CONFIG_ARCH_IXDP2X00) += ixdp2x00.o
13obj-$(CONFIG_ARCH_IXDP2X01) += ixdp2x01.o
14
arch/arm/mach-ixp2000/Makefile.boot+0−3
@@ -1,3 +0,0 @@
1 zreladdr-y += 0x00008000
2params_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
44static DEFINE_SPINLOCK(ixp2000_slowport_lock);
45static unsigned long ixp2000_slowport_irq_flags;
46
47/*************************************************************************
48 * Slowport access routines
49 *************************************************************************/
50void 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
67void 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 *************************************************************************/
82static 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
136void __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 *************************************************************************/
148static 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
161static struct resource ixp2000_uart_resource = {
162 .start = IXP2000_UART_PHYS_BASE,
163 .end = IXP2000_UART_PHYS_BASE + 0x1f,
164 .flags = IORESOURCE_MEM,
165};
166
167static 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
177void __init ixp2000_uart_init(void)
178{
179 platform_device_register(&ixp2000_serial_device);
180}
181
182
183/*************************************************************************
184 * Timer-tick functions for IXP2000
185 *************************************************************************/
186static unsigned ticks_per_jiffy;
187static unsigned ticks_per_usec;
188static unsigned next_jiffy_time;
189static volatile unsigned long *missing_jiffy_timer_csr;
190
191unsigned 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
200static 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
214static 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
220void __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 *************************************************************************/
262static unsigned long GPIO_IRQ_falling_edge;
263static unsigned long GPIO_IRQ_rising_edge;
264static unsigned long GPIO_IRQ_level_low;
265static unsigned long GPIO_IRQ_level_high;
266
267static 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
275void 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}
294EXPORT_SYMBOL(gpio_line_config);
295
296
297/*************************************************************************
298 * IRQ handling IXP2000
299 *************************************************************************/
300static 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
312static 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
345static 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
356static 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
363static 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
370static 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
377static 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
386static 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 */
398static 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
410static 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
416static 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
422static 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
428static 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
434static void ixp2000_irq_mask(struct irq_data *d)
435{
436 ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << d->irq));
437}
438
439static void ixp2000_irq_unmask(struct irq_data *d)
440{
441 ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << d->irq));
442}
443
444static 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
450void __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
517void 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 *************************************************************************/
52static void __init enp2611_timer_init(void)
53{
54 ixp2000_init_time(50 * 1000 * 1000);
55}
56
57static struct sys_timer enp2611_timer = {
58 .init = enp2611_timer_init,
59 .offset = ixp2000_gettimeoffset,
60};
61
62
63/*************************************************************************
64 * ENP-2611 I/O
65 *************************************************************************/
66static 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
85void __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 *************************************************************************/
95static 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
102static 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
109static 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
121static 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
130static 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
139static struct pci_ops enp2611_pci_ops = {
140 .read = enp2611_pci_read_config,
141 .write = enp2611_pci_write_config
142};
143
144static 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
174struct 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
182int __init enp2611_pci_init(void)
183{
184 if (machine_is_enp2611())
185 pci_common_init(&enp2611_pci);
186
187 return 0;
188}
189
190subsys_initcall(enp2611_pci_init);
191
192
193/*************************************************************************
194 * ENP-2611 Machine Initialization
195 *************************************************************************/
196static struct flash_platform_data enp2611_flash_platform_data = {
197 .map_name = "cfi_probe",
198 .width = 1,
199};
200
201static struct ixp2000_flash_data enp2611_flash_data = {
202 .platform_data = &enp2611_flash_platform_data,
203 .nr_banks = 1
204};
205
206static struct resource enp2611_flash_resource = {
207 .start = 0xc4000000,
208 .end = 0xc4000000 + 0x00ffffff,
209 .flags = IORESOURCE_MEM,
210};
211
212static 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
222static struct ixp2000_i2c_pins enp2611_i2c_gpio_pins = {
223 .sda_pin = ENP2611_GPIO_SDA,
224 .scl_pin = ENP2611_GPIO_SCL,
225};
226
227static 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
236static struct platform_device *enp2611_devices[] __initdata = {
237 &enp2611_flash,
238 &enp2611_i2c_controller
239};
240
241static void __init enp2611_init_machine(void)
242{
243 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices));
244 ixp2000_uart_init();
245}
246
247
248MACHINE_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,
256MACHINE_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
521001:
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
30extern void gpio_line_config(int line, int direction);
31
32static inline int gpio_line_get(int line)
33{
34 return (((*IXP2000_GPIO_PLR) >> line) & 1);
35}
36
37static 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 */
77static 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 */
85void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long);
86void ixdp2x00_slave_pci_postinit(void);
87void ixdp2x00_init_machine(void);
88void 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
18static inline unsigned long ixp2000_reg_read(volatile void *reg)
19{
20 return *((volatile unsigned long *)reg);
21}
22
23static 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 */
43static 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 */
73struct 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
82void ixp2000_acquire_slowport(struct slowport_cfg *, struct slowport_cfg *);
83void 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 */
89static 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
111static inline unsigned int ixp2000_has_flash(void)
112{
113 return ((*IXP2000_STRAP_OPTIONS) & (CFG_BOOT_PROM));
114}
115
116static inline unsigned int ixp2000_is_pcimaster(void)
117{
118 return ((*IXP2000_STRAP_OPTIONS) & (CFG_PCI_BOOT_HOST));
119}
120
121void ixp2000_map_io(void);
122void ixp2000_uart_init(void);
123void ixp2000_init_irq(void);
124void ixp2000_init_time(unsigned long);
125void ixp2000_restart(char, const char *);
126unsigned long ixp2000_gettimeoffset(void);
127
128struct pci_sys_data;
129
130extern struct pci_ops ixp2000_pci_ops;
131u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where);
132void ixp2000_pci_preinit(void);
133int ixp2000_pci_setup(int, struct pci_sys_data*);
134int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *);
135int 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 */
141struct ixp2000_flash_data {
142 struct flash_platform_data *platform_data;
143 int nr_banks;
144 unsigned long (*bank_setup)(unsigned long);
145};
146
147struct 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
32static 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
42static 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 *************************************************************************/
45static 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
56static struct sys_timer ixdp2400_timer = {
57 .init = ixdp2400_timer_init,
58 .offset = ixp2000_gettimeoffset,
59};
60
61/*************************************************************************
62 * IXDP2400 PCI
63 *************************************************************************/
64void __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
71int 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
80static 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
130static 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
147static 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
156int __init ixdp2400_pci_init(void)
157{
158 if (machine_is_ixdp2400())
159 pci_common_init(&ixdp2400_pci);
160
161 return 0;
162}
163
164subsys_initcall(ixdp2400_pci_init);
165
166void __init ixdp2400_init_irq(void)
167{
168 ixdp2x00_init_irq(IXDP2400_CPLD_INT_STAT, IXDP2400_CPLD_INT_MASK, IXDP2400_NR_IRQS);
169}
170
171MACHINE_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,
179MACHINE_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
46static void __init ixdp2800_timer_init(void)
47{
48 ixp2000_init_time(50000000);
49}
50
51static struct sys_timer ixdp2800_timer = {
52 .init = ixdp2800_timer_init,
53 .offset = ixp2000_gettimeoffset,
54};
55
56/*************************************************************************
57 * IXDP2800 PCI
58 *************************************************************************/
59static void __init ixdp2800_slave_disable_pci_master(void)
60{
61 *IXP2000_PCI_CMDSTAT &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
62}
63
64static 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
91static 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
99void __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 */
144static 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}
152DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IXP2800, ixp2800_pci_fixup);
153
154static 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
163static 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
207static 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
220static 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
233static 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
239static 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
247struct __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
256int __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
279subsys_initcall(ixdp2800_pci_init);
280
281void __init ixdp2800_init_irq(void)
282{
283 ixdp2x00_init_irq(IXDP2800_CPLD_INT_STAT, IXDP2800_CPLD_INT_MASK, IXDP2800_NR_IRQS);
284}
285
286MACHINE_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,
294MACHINE_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 *************************************************************************/
48static volatile unsigned long *board_irq_mask;
49static volatile unsigned long *board_irq_stat;
50static unsigned long board_irq_count;
51
52#ifdef CONFIG_ARCH_IXDP2400
53/*
54 * Slowport configuration for accessing CPLD registers on IXDP2x00
55 */
56static 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
65static 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
89static 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
107static 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
138static 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
144void __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 *************************************************************************/
172static 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
179void __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 *************************************************************************/
233void 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 *************************************************************************/
253static struct flash_platform_data ixdp2x00_platform_data = {
254 .map_name = "cfi_probe",
255 .width = 1,
256};
257
258static struct ixp2000_flash_data ixdp2x00_flash_data = {
259 .platform_data = &ixdp2x00_platform_data,
260 .nr_banks = 1
261};
262
263static struct resource ixdp2x00_flash_resource = {
264 .start = 0xc4000000,
265 .end = 0xc4000000 + 0x00ffffff,
266 .flags = IORESOURCE_MEM,
267};
268
269static 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
279static struct ixp2000_i2c_pins ixdp2x00_i2c_gpio_pins = {
280 .sda_pin = IXDP2X00_GPIO_SDA,
281 .scl_pin = IXDP2X00_GPIO_SCL,
282};
283
284static 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
293static struct platform_device *ixdp2x00_devices[] __initdata = {
294 &ixdp2x00_flash,
295 &ixdp2x00_i2c_controller
296};
297
298void __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 *************************************************************************/
50static 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
56static 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
62static u32 valid_irq_mask;
63
64static 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
88static 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 */
99void __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 *************************************************************************/
133static 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
140static 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 *************************************************************************/
150static 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
163static struct resource ixdp2x01_uart_resource1 = {
164 .start = IXDP2X01_UART1_PHYS_BASE,
165 .end = IXDP2X01_UART1_PHYS_BASE + 0xffff,
166 .flags = IORESOURCE_MEM,
167};
168
169static 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
179static 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
192static struct resource ixdp2x01_uart_resource2 = {
193 .start = IXDP2X01_UART2_PHYS_BASE,
194 .end = IXDP2X01_UART2_PHYS_BASE + 0xffff,
195 .flags = IORESOURCE_MEM,
196};
197
198static 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
208static 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 *************************************************************************/
218static unsigned int ixdp2x01_clock;
219
220static 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
229static void __init ixdp2x01_timer_init(void)
230{
231 if (!ixdp2x01_clock)
232 ixdp2x01_clock = 50000000;
233
234 ixp2000_init_time(ixdp2x01_clock);
235}
236
237static struct sys_timer ixdp2x01_timer = {
238 .init = ixdp2x01_timer_init,
239 .offset = ixp2000_gettimeoffset,
240};
241
242/*************************************************************************
243 * IXDP2x01 PCI
244 *************************************************************************/
245void __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
254static 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
318static 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
328struct 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
336int __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
345subsys_initcall(ixdp2x01_pci_init);
346
347/*************************************************************************
348 * IXDP2x01 Machine Initialization
349 *************************************************************************/
350static struct flash_platform_data ixdp2x01_flash_platform_data = {
351 .map_name = "cfi_probe",
352 .width = 1,
353};
354
355static 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
362static struct ixp2000_flash_data ixdp2x01_flash_data = {
363 .platform_data = &ixdp2x01_flash_platform_data,
364 .bank_setup = ixdp2x01_flash_bank_setup
365};
366
367static struct resource ixdp2x01_flash_resource = {
368 .start = 0xc4000000,
369 .end = 0xc4000000 + 0x01ffffff,
370 .flags = IORESOURCE_MEM,
371};
372
373static 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
383static struct ixp2000_i2c_pins ixdp2x01_i2c_gpio_pins = {
384 .sda_pin = IXDP2X01_GPIO_SDA,
385 .scl_pin = IXDP2X01_GPIO_SCL,
386};
387
388static 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
397static struct platform_device *ixdp2x01_devices[] __initdata = {
398 &ixdp2x01_flash,
399 &ixdp2x01_i2c_controller
400};
401
402static 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
415static 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
429static 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
446MACHINE_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,
454MACHINE_END
455#endif
456
457#ifdef CONFIG_ARCH_IXDP2801
458MACHINE_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,
466MACHINE_END
467
468/*
469 * IXDP28x5 is basically an IXDP2801 with a different CPU but Intel
470 * changed the machine ID in the bootloader
471 */
472MACHINE_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,
480MACHINE_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
33static volatile int pci_master_aborts = 0;
34
35static int clear_master_aborts(void);
36
37u32 *
38ixp2000_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 */
70static u32 bytemask[] = {
71 /*0*/ 0,
72 /*1*/ 0xff,
73 /*2*/ 0xffff,
74 /*3*/ 0,
75 /*4*/ 0xffffffff,
76};
77
78
79int 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 */
107int 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
127struct pci_ops ixp2000_pci_ops = {
128 .read = ixp2000_pci_read_config,
129 .write = ixp2000_pci_write_config
130};
131
132
133int 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
166int
167clear_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
190void __init
191ixp2000_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 */
220static struct resource ixp2000_pci_mem_space = {
221 .start = 0xe0000000,
222 .end = 0xffffffff,
223 .flags = IORESOURCE_MEM,
224 .name = "PCI Mem Space"
225};
226
227static struct resource ixp2000_pci_io_space = {
228 .start = 0x00010000,
229 .end = 0x0001ffff,
230 .flags = IORESOURCE_IO,
231 .name = "PCI I/O Space"
232};
233
234int 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 @@
1if ARCH_IXP23XX
2
3config ARCH_SUPPORTS_BIG_ENDIAN
4 bool
5 default y
6
7menu "Intel IXP23xx Implementation Options"
8
9comment "IXP23xx Platforms"
10
11config MACH_ESPRESSO
12 bool "Support IP Fabrics Double Espresso platform"
13 help
14
15config MACH_IXDP2351
16 bool "Support Intel IXDP2351 platform"
17 help
18
19config MACH_ROADRUNNER
20 bool "Support ADI RoadRunner platform"
21 help
22
23endmenu
24
25endif
arch/arm/mach-ixp23xx/Makefile+0−11
@@ -1,11 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4obj-y := core.o pci.o
5obj-m :=
6obj-n :=
7obj- :=
8
9obj-$(CONFIG_MACH_ESPRESSO) += espresso.o
10obj-$(CONFIG_MACH_IXDP2351) += ixdp2351.o
11obj-$(CONFIG_MACH_ROADRUNNER) += roadrunner.o
arch/arm/mach-ixp23xx/Makefile.boot+0−2
@@ -1,2 +0,0 @@
1 zreladdr-y += 0x00008000
2params_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 *************************************************************************/
50static 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
99void __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 ***************************************************************************/
108enum ixp23xx_irq_type {
109 IXP23XX_IRQ_LEVEL, IXP23XX_IRQ_EDGE
110};
111
112static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type);
113
114static 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
176static 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
188static 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 */
202static 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
216static 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
228static 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
235static 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
242static 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
249static 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 */
259static 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
282static 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
288static 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
303void __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
341static unsigned long next_jiffy_time;
342
343static unsigned long
344ixp23xx_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
353static irqreturn_t
354ixp23xx_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
366static 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
372void __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
388struct sys_timer ixp23xx_timer = {
389 .init = ixp23xx_init_timer,
390 .offset = ixp23xx_gettimeoffset,
391};
392
393
394/*************************************************************************
395 * IXP23xx Platform Initialization
396 *************************************************************************/
397static 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
409static 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
430static 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
438static struct platform_device *ixp23xx_devices[] __initdata = {
439 &ixp23xx_uart,
440};
441
442void __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
451void 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
43static int __init espresso_pci_init(void)
44{
45 if (machine_is_espresso())
46 ixp23xx_pci_slave_init();
47
48 return 0;
49};
50subsys_initcall(espresso_pci_init);
51
52static struct physmap_flash_data espresso_flash_data = {
53 .width = 2,
54};
55
56static struct resource espresso_flash_resource = {
57 .start = 0x90000000,
58 .end = 0x91ffffff,
59 .flags = IORESOURCE_MEM,
60};
61
62static 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
72static 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
85MACHINE_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,
93MACHINE_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
291001:
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
17static inline unsigned long ixp2000_reg_read(volatile void *reg)
18{
19 return *((volatile unsigned long *)reg);
20}
21
22static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
23{
24 *((volatile unsigned long *)reg) = val;
25}
26
27static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
28{
29 *((volatile unsigned long *)reg) = val;
30}
31
32struct pci_sys_data;
33
34void ixp23xx_map_io(void);
35void ixp23xx_init_irq(void);
36void ixp23xx_sys_init(void);
37void ixp23xx_restart(char, const char *);
38int ixp23xx_pci_setup(int, struct pci_sys_data *);
39void ixp23xx_pci_preinit(void);
40extern struct pci_ops ixp23xx_pci_ops;
41void ixp23xx_pci_slave_init(void);
42
43extern 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 */
51static 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
19static 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
32static 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 */
50static void ixdp2351_inta_mask(struct irq_data *d)
51{
52 *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(d->irq);
53}
54
55static void ixdp2351_inta_unmask(struct irq_data *d)
56{
57 *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(d->irq);
58}
59
60static 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
79static 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
85static void ixdp2351_intb_mask(struct irq_data *d)
86{
87 *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(d->irq);
88}
89
90static void ixdp2351_intb_unmask(struct irq_data *d)
91{
92 *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(d->irq);
93}
94
95static 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
114static 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
120void __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
170static 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
252struct 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
260int __init ixdp2351_pci_init(void)
261{
262 if (machine_is_ixdp2351())
263 pci_common_init(&ixdp2351_pci);
264
265 return 0;
266}
267
268subsys_initcall(ixdp2351_pci_init);
269
270/*
271 * IXDP2351 Static Mapped I/O
272 */
273static 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
287static void __init ixdp2351_map_io(void)
288{
289 ixp23xx_map_io();
290 iotable_init(ixdp2351_io_desc, ARRAY_SIZE(ixdp2351_io_desc));
291}
292
293static struct physmap_flash_data ixdp2351_flash_data = {
294 .width = 1,
295};
296
297static struct resource ixdp2351_flash_resource = {
298 .start = 0x90000000,
299 .end = 0x93ffffff,
300 .flags = IORESOURCE_MEM,
301};
302
303static 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
313static 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
328static 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
339MACHINE_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,
347MACHINE_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
34extern int (*external_fault) (unsigned long, struct pt_regs *);
35
36static 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
44int clear_master_aborts(void);
45
46static 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 */
80static u32 bytemask[] = {
81 /*0*/ 0,
82 /*1*/ 0xff,
83 /*2*/ 0xffff,
84 /*3*/ 0,
85 /*4*/ 0xffffffff,
86};
87
88static 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 */
119static 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
138struct pci_ops ixp23xx_pci_ops = {
139 .read = ixp23xx_pci_read_config,
140 .write = ixp23xx_pci_write_config,
141};
142
143int 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
175int 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
195static 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
222void __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 */
240static 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}
252DECLARE_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 */
258static 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
265static struct resource ixp23xx_pci_io_space = {
266 .start = 0x00000100,
267 .end = 0x01ffffff,
268 .flags = IORESOURCE_IO,
269 .name = "PCI I/O Space"
270};
271
272int 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
285void __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
58static 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
111static 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
119static 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
127static int __init roadrunner_pci_init(void)
128{
129 if (machine_is_roadrunner())
130 pci_common_init(&roadrunner_pci);
131
132 return 0;
133};
134
135subsys_initcall(roadrunner_pci_init);
136
137static struct physmap_flash_data roadrunner_flash_data = {
138 .width = 2,
139};
140
141static struct resource roadrunner_flash_resource = {
142 .start = 0x90000000,
143 .end = 0x93ffffff,
144 .flags = IORESOURCE_MEM,
145};
146
147static 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
157static 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
172MACHINE_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,
180MACHINE_END
arch/arm/mach-msm/board-msm7x30.c+0−1
@@ -17,7 +17,6 @@ · 16 unmodified lines
17#include <linux/gpio.h>17#include <linux/gpio.h>
18#include <linux/kernel.h>18#include <linux/kernel.h>
19#include <linux/irq.h>19#include <linux/irq.h>
20#include <linux/gpio.h>
21#include <linux/platform_device.h>20#include <linux/platform_device.h>
22#include <linux/delay.h>21#include <linux/delay.h>
23#include <linux/io.h>22#include <linux/io.h>
arch/arm/mach-msm/board-qsd8x50.c+0−1
@@ -17,7 +17,6 @@ · 16 unmodified lines
17#include <linux/gpio.h>17#include <linux/gpio.h>
18#include <linux/kernel.h>18#include <linux/kernel.h>
19#include <linux/irq.h>19#include <linux/irq.h>
20#include <linux/gpio.h>
21#include <linux/platform_device.h>20#include <linux/platform_device.h>
22#include <linux/delay.h>21#include <linux/delay.h>
23#include <linux/usb/msm_hsusb.h>22#include <linux/usb/msm_hsusb.h>
arch/arm/mach-msm/include/mach/debug-macro.S+1−2
@@ -30,8 +30,7 @@ · 29 unmodified lines
30 @ Write the 1 character to UARTDM_TF30 @ Write the 1 character to UARTDM_TF
31 str \rd, [\rx, #0x70]31 str \rd, [\rx, #0x70]
32#else32#else
33 teq \rx, #033 str \rd, [\rx, #0x0C]
34 strne \rd, [\rx, #0x0C]
35#endif34#endif
36 .endm35 .endm
37 36
arch/arm/mach-msm/scm.c+3−0
@@ -282,6 +282,9 @@ u32 scm_get_version(void) · 281 unmodified lines
282 __asmeq("%1", "r1")282 __asmeq("%1", "r1")
283 __asmeq("%2", "r0")283 __asmeq("%2", "r0")
284 __asmeq("%3", "r1")284 __asmeq("%3", "r1")
285#ifdef REQUIRES_SEC
286 ".arch_extension sec\n"
287#endif
285 "smc #0 @ switch to secure world\n"288 "smc #0 @ switch to secure world\n"
286 : "=r" (r0), "=r" (r1)289 : "=r" (r0), "=r" (r1)
287 : "r" (r0), "r" (r1)290 : "r" (r0), "r" (r1)
arch/arm/mach-omap1/Makefile+9−4
@@ -12,6 +12,9 @@ endif · 11 unmodified lines
12 12
13obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o13obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
14 14
15# OCPI interconnect support for 1710, 1610 and 5912
16obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
17
15# Power Management18# Power Management
16obj-$(CONFIG_PM) += pm.o sleep.o19obj-$(CONFIG_PM) += pm.o sleep.o
17 20
@@ -28,13 +31,15 @@ usb-fs-$(CONFIG_USB) := usb.o · 10 unmodified lines
28obj-y += $(usb-fs-m) $(usb-fs-y)31obj-y += $(usb-fs-m) $(usb-fs-y)
29 32
30# Specific board support33# Specific board support
31obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o34obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o \
35 board-nand.o
32obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o36obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
33obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o37obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
34obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o38obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o board-nand.o
35obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o39obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o board-nand.o
36obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o40obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
37obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o41obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o \
42 board-nand.o
38obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o43obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
39obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o44obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o
40obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o45obj-$(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
102 }102 }
103 103
104 retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq,104 retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq,
105 IRQ_TYPE_EDGE_RISING, "deferred_fiq", 0);105 IRQ_TYPE_EDGE_RISING, "deferred_fiq", NULL);
106 if (retval < 0) {106 if (retval < 0) {
107 pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval);107 pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval);
108 release_fiq(&fh);108 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
185 .resource = &nor_resource,185 .resource = &nor_resource,
186};186};
187 187
188static 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
202#define FSAMPLE_NAND_RB_GPIO_PIN 62188#define FSAMPLE_NAND_RB_GPIO_PIN 62
203 189
204static int nand_dev_ready(struct mtd_info *mtd)190static int nand_dev_ready(struct mtd_info *mtd)
@@ -216,7 +202,7 @@ static struct platform_nand_data nand_data = { · 11 unmodified lines
216 .part_probe_types = part_probes,202 .part_probe_types = part_probes,
217 },203 },
218 .ctrl = {204 .ctrl = {
219 .cmd_ctrl = nand_cmd_ctl,205 .cmd_ctrl = omap1_nand_cmd_ctl,
220 .dev_ready = nand_dev_ready,206 .dev_ready = nand_dev_ready,
221 },207 },
222};208};
arch/arm/mach-omap1/board-h2.c+1−16
@@ -179,20 +179,6 @@ static struct mtd_partition h2_nand_partitions[] = { · 178 unmodified lines
179 },179 },
180};180};
181 181
182static 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
196#define H2_NAND_RB_GPIO_PIN 62182#define H2_NAND_RB_GPIO_PIN 62
197 183
198static int h2_nand_dev_ready(struct mtd_info *mtd)184static int h2_nand_dev_ready(struct mtd_info *mtd)
@@ -212,9 +198,8 @@ static struct platform_nand_data h2_nand_platdata = { · 13 unmodified lines
212 .part_probe_types = h2_part_probes,198 .part_probe_types = h2_part_probes,
213 },199 },
214 .ctrl = {200 .ctrl = {
215 .cmd_ctrl = h2_nand_cmd_ctl,201 .cmd_ctrl = omap1_nand_cmd_ctl,
216 .dev_ready = h2_nand_dev_ready,202 .dev_ready = h2_nand_dev_ready,
217
218 },203 },
219};204};
220 205
arch/arm/mach-omap1/board-h3.c+1−15
@@ -181,20 +181,6 @@ static struct mtd_partition nand_partitions[] = { · 180 unmodified lines
181 },181 },
182};182};
183 183
184static 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
198#define H3_NAND_RB_GPIO_PIN 10184#define H3_NAND_RB_GPIO_PIN 10
199 185
200static int nand_dev_ready(struct mtd_info *mtd)186static int nand_dev_ready(struct mtd_info *mtd)
@@ -214,7 +200,7 @@ static struct platform_nand_data nand_platdata = { · 13 unmodified lines
214 .part_probe_types = part_probes,200 .part_probe_types = part_probes,
215 },201 },
216 .ctrl = {202 .ctrl = {
217 .cmd_ctrl = nand_cmd_ctl,203 .cmd_ctrl = omap1_nand_cmd_ctl,
218 .dev_ready = nand_dev_ready,204 .dev_ready = nand_dev_ready,
219 205
220 },206 },
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
23void 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
289 gpio_direction_input(PALMZ71_USBDETECT_GPIO);289 gpio_direction_input(PALMZ71_USBDETECT_GPIO);
290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
291 palmz71_powercable, IRQF_SAMPLE_RANDOM,291 palmz71_powercable, IRQF_SAMPLE_RANDOM,
292 "palmz71-cable", 0))292 "palmz71-cable", NULL))
293 printk(KERN_ERR293 printk(KERN_ERR
294 "IRQ request for power cable failed!\n");294 "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);
296 }296 }
297}297}
298 298
arch/arm/mach-omap1/board-perseus2.c+1−15
@@ -143,20 +143,6 @@ static struct platform_device nor_device = { · 142 unmodified lines
143 .resource = &nor_resource,143 .resource = &nor_resource,
144};144};
145 145
146static 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
160#define P2_NAND_RB_GPIO_PIN 62146#define P2_NAND_RB_GPIO_PIN 62
161 147
162static int nand_dev_ready(struct mtd_info *mtd)148static int nand_dev_ready(struct mtd_info *mtd)
@@ -174,7 +160,7 @@ static struct platform_nand_data nand_data = { · 11 unmodified lines
174 .part_probe_types = part_probes,160 .part_probe_types = part_probes,
175 },161 },
176 .ctrl = {162 .ctrl = {
177 .cmd_ctrl = nand_cmd_ctl,163 .cmd_ctrl = omap1_nand_cmd_ctl,
178 .dev_ready = nand_dev_ready,164 .dev_ready = nand_dev_ready,
179 },165 },
180};166};
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
194{194{
195 /* Find the highest supported frequency <= rate and switch to it */195 /* Find the highest supported frequency <= rate and switch to it */
196 struct mpu_rate * ptr;196 struct mpu_rate * ptr;
197 unsigned long dpll1_rate, ref_rate;197 unsigned long ref_rate;
198 198
199 dpll1_rate = ck_dpll1_p->rate;
200 ref_rate = ck_ref_p->rate;199 ref_rate = ck_ref_p->rate;
201 200
202 for (ptr = omap1_rate_table; ptr->rate; ptr++) {201 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
arch/arm/mach-omap1/common.h+14−1
@@ -27,6 +27,7 @@ · 26 unmodified lines
27#define __ARCH_ARM_MACH_OMAP1_COMMON_H27#define __ARCH_ARM_MACH_OMAP1_COMMON_H
28 28
29#include <plat/common.h>29#include <plat/common.h>
30#include <linux/mtd/mtd.h>
30 31
31#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)32#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
32void omap7xx_map_io(void);33void omap7xx_map_io(void);
@@ -56,8 +57,20 @@ void omap1_init_early(void); · 23 unmodified lines
56void omap1_init_irq(void);57void omap1_init_irq(void);
57void omap1_restart(char, const char *);58void omap1_restart(char, const char *);
58 59
60extern void __init omap_check_revision(void);
61
62extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
63 unsigned int ctrl);
64
59extern struct sys_timer omap1_timer;65extern struct sys_timer omap1_timer;
60extern bool omap_32k_timer_init(void);66extern bool omap_32k_timer_init(void);
61extern void __init omap_init_consistent_dma_size(void);67
68extern u32 omap_irq_flags;
69
70#ifdef CONFIG_ARCH_OMAP16XX
71extern int ocpi_enable(void);
72#else
73static inline int ocpi_enable(void) { return 0; }
74#endif
62 75
63#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */76#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
87 fpga_ack_irq(d);87 fpga_ack_irq(d);
88}88}
89 89
90void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)90static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
91{91{
92 u32 stat;92 u32 stat;
93 int fpga_irq;93 int fpga_irq;
arch/arm/mach-omap1/id.c+2−0
@@ -21,6 +21,8 @@ · 20 unmodified lines
21 21
22#include <mach/hardware.h>22#include <mach/hardware.h>
23 23
24#include "common.h"
25
24#define OMAP_DIE_ID_0 0xfffe180026#define OMAP_DIE_ID_0 0xfffe1800
25#define OMAP_DIE_ID_1 0xfffe180427#define OMAP_DIE_ID_1 0xfffe1804
26#define OMAP_PRODUCTION_ID_0 0xfffe200028#define OMAP_PRODUCTION_ID_0 0xfffe2000
arch/arm/mach-omap1/io.c+1−2
@@ -18,13 +18,12 @@ · 17 unmodified lines
18 18
19#include <plat/mux.h>19#include <plat/mux.h>
20#include <plat/tc.h>20#include <plat/tc.h>
21#include <plat/dma.h>
21 22
22#include "iomap.h"23#include "iomap.h"
23#include "common.h"24#include "common.h"
24#include "clock.h"25#include "clock.h"
25 26
26extern void omap_check_revision(void);
27
28/*27/*
29 * The machine specific code may provide the extra mapping besides the28 * The machine specific code may provide the extra mapping besides the
30 * default mapping provided here.29 * default mapping provided here.
arch/arm/mach-omap1/irq.c+2−0
@@ -49,6 +49,8 @@ · 48 unmodified lines
49 49
50#include <mach/hardware.h>50#include <mach/hardware.h>
51 51
52#include "common.h"
53
52#define IRQ_BANK(irq) ((irq) >> 5)54#define IRQ_BANK(irq) ((irq) >> 5)
53#define IRQ_BIT(irq) ((irq) & 0x1f)55#define IRQ_BIT(irq) ((irq) & 0x1f)
54 56
arch/arm/mach-omap1/lcd_dma.c+1−6
@@ -57,7 +57,7 @@ static struct lcd_dma_info { · 56 unmodified lines
57 void *cb_data;57 void *cb_data;
58 58
59 int active;59 int active;
60 unsigned long addr, size;60 unsigned long addr;
61 int rotate, data_type, xres, yres;61 int rotate, data_type, xres, yres;
62 int vxres;62 int vxres;
63 int mirror;63 int mirror;
@@ -77,11 +77,6 @@ void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, · 13 unmodified lines
77}77}
78EXPORT_SYMBOL(omap_set_lcd_dma_b1);78EXPORT_SYMBOL(omap_set_lcd_dma_b1);
79 79
80void omap_set_lcd_dma_src_port(int port)
81{
82 lcd_dma.src_port = port;
83}
84
85void omap_set_lcd_dma_ext_controller(int external)80void omap_set_lcd_dma_ext_controller(int external)
86{81{
87 lcd_dma.ext_ctrl = external;82 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
4 * Minimal OCP bus support for omap16xx4 * Minimal OCP bus support for omap16xx
5 *5 *
6 * Copyright (C) 2003 - 2005 Nokia Corporation6 * Copyright (C) 2003 - 2005 Nokia Corporation
7 * Copyright (C) 2012 Texas Instruments, Inc.
7 * Written by Tony Lindgren <tony@atomide.com>8 * Written by Tony Lindgren <tony@atomide.com>
8 *9 *
9 * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>.10 * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>.
@@ -35,6 +36,8 @@ · 25 unmodified lines
35 36
36#include <mach/hardware.h>37#include <mach/hardware.h>
37 38
39#include "common.h"
40
38#define OCPI_BASE 0xfffec32041#define OCPI_BASE 0xfffec320
39#define OCPI_FAULT (OCPI_BASE + 0x00)42#define OCPI_FAULT (OCPI_BASE + 0x00)
40#define OCPI_CMD_FAULT (OCPI_BASE + 0x04)43#define OCPI_CMD_FAULT (OCPI_BASE + 0x04)
@@ -64,7 +67,7 @@ int ocpi_enable(void) · 23 unmodified lines
64 /* Enable access for OHCI in OCPI */67 /* Enable access for OHCI in OCPI */
65 val = omap_readl(OCPI_PROT);68 val = omap_readl(OCPI_PROT);
66 val &= ~0xff;69 val &= ~0xff;
67 //val &= (1 << 0); /* Allow access only to EMIFS */70 /* val &= (1 << 0); Allow access only to EMIFS */
68 omap_writel(val, OCPI_PROT);71 omap_writel(val, OCPI_PROT);
69 72
70 val = omap_readl(OCPI_SEC);73 val = omap_readl(OCPI_SEC);
@@ -86,7 +89,7 @@ static int __init omap_ocpi_init(void) · 15 unmodified lines
86 89
87 clk_enable(ocpi_ck);90 clk_enable(ocpi_ck);
88 ocpi_enable();91 ocpi_enable();
89 printk("OMAP OCPI interconnect driver loaded\n");92 pr_info("OMAP OCPI interconnect driver loaded\n");
90 93
91 return 0;94 return 0;
92}95}
arch/arm/mach-omap1/pm.c+4−5
@@ -569,11 +569,10 @@ static int omap_pm_read_proc( · 568 unmodified lines
569 569
570static void omap_pm_init_proc(void)570static void omap_pm_init_proc(void)
571{571{
572 struct proc_dir_entry *entry;572 /* XXX Appears to leak memory */
573 573 create_proc_read_entry("driver/omap_pm",
574 entry = create_proc_read_entry("driver/omap_pm",574 S_IWUSR | S_IRUGO, NULL,
575 S_IWUSR | S_IRUGO, NULL,575 omap_pm_read_proc, NULL);
576 omap_pm_read_proc, NULL);
577}576}
578 577
579#endif /* DEBUG && CONFIG_PROC_FS */578#endif /* DEBUG && CONFIG_PROC_FS */
arch/arm/mach-omap1/reset.c+2−0
@@ -8,6 +8,8 @@ · 7 unmodified lines
8 8
9#include <mach/hardware.h>9#include <mach/hardware.h>
10 10
11#include "common.h"
12
11void omap1_restart(char mode, const char *cmd)13void omap1_restart(char mode, const char *cmd)
12{14{
13 /*15 /*
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
54 return 0;54 return 0;
55}55}
56 56
57 57static int __init omap1_dm_timer_init(void)
58int __init omap1_dm_timer_init(void)
59{58{
60 int i;59 int i;
61 int ret;60 int ret;
arch/arm/mach-omap1/usb.c+3−0
@@ -29,6 +29,8 @@ · 28 unmodified lines
29#include <plat/mux.h>29#include <plat/mux.h>
30#include <plat/usb.h>30#include <plat/usb.h>
31 31
32#include "common.h"
33
32/* These routines should handle the standard chip-specific modes34/* These routines should handle the standard chip-specific modes
33 * for usb0/1/2 ports, covering basic mux and transceiver setup.35 * for usb0/1/2 ports, covering basic mux and transceiver setup.
34 *36 *
@@ -138,6 +140,7 @@ static inline void ohci_device_init(struct omap_usb_config *pdata) · 103 unmodified lines
138 if (cpu_is_omap7xx())140 if (cpu_is_omap7xx())
139 ohci_resources[1].start = INT_7XX_USB_HHC_1;141 ohci_resources[1].start = INT_7XX_USB_HHC_1;
140 pdata->ohci_device = &ohci_device;142 pdata->ohci_device = &ohci_device;
143 pdata->ocpi_enable = &ocpi_enable;
141}144}
142 145
143#else146#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
39 39
40static void am35xx_enable_emac_int(void)40static void am35xx_enable_emac_int(void)
41{41{
42 u32 regval;42 u32 v;
43 43
44 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);44 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
45 regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |45 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
46 AM35XX_CPGMAC_C0_TX_PULSE_CLR |46 AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
47 AM35XX_CPGMAC_C0_MISC_PULSE_CLR |47 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
48 AM35XX_CPGMAC_C0_RX_THRESH_CLR);48 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
49 omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
50 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
51}49}
52 50
53static void am35xx_disable_emac_int(void)51static void am35xx_disable_emac_int(void)
54{52{
55 u32 regval;53 u32 v;
56 54
57 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);55 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
58 regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |56 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
59 AM35XX_CPGMAC_C0_TX_PULSE_CLR);57 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
60 omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);58 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
61 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
62}59}
63 60
64static struct emac_platform_data am35xx_emac_pdata = {61static struct emac_platform_data am35xx_emac_pdata = {
@@ -92,7 +89,7 @@ static struct platform_device am35xx_emac_device = { · 27 unmodified lines
92 89
93void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)90void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
94{91{
95 unsigned int regval;92 u32 v;
96 int err;93 int err;
97 94
98 am35xx_emac_pdata.rmii_en = rmii_en;95 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
110 return;107 return;
111 }108 }
112 109
113 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);110 v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
114 regval = regval & (~(AM35XX_CPGMACSS_SW_RST));111 v &= ~AM35XX_CPGMACSS_SW_RST;
115 omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);112 omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
116 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);113 omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
117}114}
arch/arm/mach-omap2/board-3430sdp.c+4−34
@@ -37,7 +37,7 @@ · 36 unmodified lines
37#include <plat/dma.h>37#include <plat/dma.h>
38#include <plat/gpmc.h>38#include <plat/gpmc.h>
39#include <video/omapdss.h>39#include <video/omapdss.h>
40#include <video/omap-panel-dvi.h>40#include <video/omap-panel-tfp410.h>
41 41
42#include <plat/gpmc-smc91x.h>42#include <plat/gpmc-smc91x.h>
43 43
@@ -113,9 +113,6 @@ static struct gpio sdp3430_dss_gpios[] __initdata = { · 69 unmodified lines
113 {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},113 {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
114};114};
115 115
116static int lcd_enabled;
117static int dvi_enabled;
118
119static void __init sdp3430_display_init(void)116static void __init sdp3430_display_init(void)
120{117{
121 int r;118 int r;
@@ -129,44 +126,18 @@ static void __init sdp3430_display_init(void) · 7 unmodified lines
129 126
130static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)127static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
131{128{
132 if (dvi_enabled) {
133 printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
134 return -EINVAL;
135 }
136
137 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);129 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
138 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);130 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
139 131
140 lcd_enabled = 1;
141
142 return 0;132 return 0;
143}133}
144 134
145static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)135static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
146{136{
147 lcd_enabled = 0;
148
149 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);137 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
150 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);138 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
151}139}
152 140
153static 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
165static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)
166{
167 dvi_enabled = 0;
168}
169
170static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)141static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
171{142{
172 return 0;143 return 0;
@@ -186,15 +157,14 @@ static struct omap_dss_device sdp3430_lcd_device = { · 13 unmodified lines
186 .platform_disable = sdp3430_panel_disable_lcd,157 .platform_disable = sdp3430_panel_disable_lcd,
187};158};
188 159
189static struct panel_dvi_platform_data dvi_panel = {160static struct tfp410_platform_data dvi_panel = {
190 .platform_enable = sdp3430_panel_enable_dvi,161 .power_down_gpio = -1,
191 .platform_disable = sdp3430_panel_disable_dvi,
192};162};
193 163
194static struct omap_dss_device sdp3430_dvi_device = {164static struct omap_dss_device sdp3430_dvi_device = {
195 .name = "dvi",165 .name = "dvi",
196 .type = OMAP_DISPLAY_TYPE_DPI,166 .type = OMAP_DISPLAY_TYPE_DPI,
197 .driver_name = "dvi",167 .driver_name = "tfp410",
198 .data = &dvi_panel,168 .data = &dvi_panel,
199 .phy.dpi.data_lines = 24,169 .phy.dpi.data_lines = 24,
200};170};
arch/arm/mach-omap2/board-4430sdp.c+8−29
@@ -666,6 +666,10 @@ static struct nokia_dsi_panel_data dsi1_panel = { · 665 unmodified lines
666 .use_ext_te = false,666 .use_ext_te = false,
667 .ext_te_gpio = 101,667 .ext_te_gpio = 101,
668 .esd_interval = 0,668 .esd_interval = 0,
669 .pin_config = {
670 .num_pins = 6,
671 .pins = { 0, 1, 2, 3, 4, 5 },
672 },
669};673};
670 674
671static struct omap_dss_device sdp4430_lcd_device = {675static struct omap_dss_device sdp4430_lcd_device = {
@@ -674,13 +678,6 @@ static struct omap_dss_device sdp4430_lcd_device = { · 2 unmodified lines
674 .type = OMAP_DISPLAY_TYPE_DSI,678 .type = OMAP_DISPLAY_TYPE_DSI,
675 .data = &dsi1_panel,679 .data = &dsi1_panel,
676 .phy.dsi = {680 .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
684 .module = 0,681 .module = 0,
685 },682 },
686 683
@@ -715,6 +712,10 @@ static struct nokia_dsi_panel_data dsi2_panel = { · 28 unmodified lines
715 .use_ext_te = false,712 .use_ext_te = false,
716 .ext_te_gpio = 103,713 .ext_te_gpio = 103,
717 .esd_interval = 0,714 .esd_interval = 0,
715 .pin_config = {
716 .num_pins = 6,
717 .pins = { 0, 1, 2, 3, 4, 5 },
718 },
718};719};
719 720
720static struct omap_dss_device sdp4430_lcd2_device = {721static struct omap_dss_device sdp4430_lcd2_device = {
@@ -723,12 +724,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { · 2 unmodified lines
723 .type = OMAP_DISPLAY_TYPE_DSI,724 .type = OMAP_DISPLAY_TYPE_DSI,
724 .data = &dsi2_panel,725 .data = &dsi2_panel,
725 .phy.dsi = {726 .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,
732 727
733 .module = 1,728 .module = 1,
734 },729 },
@@ -758,21 +753,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { · 23 unmodified lines
758 .channel = OMAP_DSS_CHANNEL_LCD2,753 .channel = OMAP_DSS_CHANNEL_LCD2,
759};754};
760 755
761static 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
776static struct omap_dss_hdmi_data sdp4430_hdmi_data = {756static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
777 .hpd_gpio = HDMI_GPIO_HPD,757 .hpd_gpio = HDMI_GPIO_HPD,
778};758};
@@ -858,7 +838,6 @@ static void __init omap_4430sdp_display_init(void) · 79 unmodified lines
858 if (r)838 if (r)
859 pr_err("%s: Could not get display_sel GPIO\n", __func__);839 pr_err("%s: Could not get display_sel GPIO\n", __func__);
860 840
861 sdp4430_lcd_init();
862 sdp4430_picodlp_init();841 sdp4430_picodlp_init();
863 omap_display_init(&sdp4430_dss_data);842 omap_display_init(&sdp4430_dss_data);
864 /*843 /*
arch/arm/mach-omap2/board-am3517evm.c+4−21
@@ -37,7 +37,7 @@ · 36 unmodified lines
37#include <plat/usb.h>37#include <plat/usb.h>
38#include <video/omapdss.h>38#include <video/omapdss.h>
39#include <video/omap-panel-generic-dpi.h>39#include <video/omap-panel-generic-dpi.h>
40#include <video/omap-panel-dvi.h>40#include <video/omap-panel-tfp410.h>
41 41
42#include "am35xx-emac.h"42#include "am35xx-emac.h"
43#include "mux.h"43#include "mux.h"
@@ -207,31 +207,14 @@ static struct omap_dss_device am3517_evm_tv_device = { · 163 unmodified lines
207 .platform_disable = am3517_evm_panel_disable_tv,207 .platform_disable = am3517_evm_panel_disable_tv,
208};208};
209 209
210static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev)210static struct tfp410_platform_data dvi_panel = {
211{211 .power_down_gpio = -1,
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
221static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev)
222{
223 dvi_enabled = 0;
224}
225
226static struct panel_dvi_platform_data dvi_panel = {
227 .platform_enable = am3517_evm_panel_enable_dvi,
228 .platform_disable = am3517_evm_panel_disable_dvi,
229};212};
230 213
231static struct omap_dss_device am3517_evm_dvi_device = {214static struct omap_dss_device am3517_evm_dvi_device = {
232 .type = OMAP_DISPLAY_TYPE_DPI,215 .type = OMAP_DISPLAY_TYPE_DPI,
233 .name = "dvi",216 .name = "dvi",
234 .driver_name = "dvi",217 .driver_name = "tfp410",
235 .data = &dvi_panel,218 .data = &dvi_panel,
236 .phy.dpi.data_lines = 24,219 .phy.dpi.data_lines = 24,
237};220};
arch/arm/mach-omap2/board-cm-t35.c+4−26
@@ -44,7 +44,7 @@ · 43 unmodified lines
44#include <plat/usb.h>44#include <plat/usb.h>
45#include <video/omapdss.h>45#include <video/omapdss.h>
46#include <video/omap-panel-generic-dpi.h>46#include <video/omap-panel-generic-dpi.h>
47#include <video/omap-panel-dvi.h>47#include <video/omap-panel-tfp410.h>
48#include <plat/mcspi.h>48#include <plat/mcspi.h>
49 49
50#include <mach/hardware.h>50#include <mach/hardware.h>
@@ -218,25 +218,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev) · 167 unmodified lines
218 gpio_set_value(CM_T35_LCD_EN_GPIO, 0);218 gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
219}219}
220 220
221static 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
234static 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
240static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)221static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
241{222{
242 return 0;223 return 0;
@@ -260,15 +241,14 @@ static struct omap_dss_device cm_t35_lcd_device = { · 17 unmodified lines
260 .phy.dpi.data_lines = 18,241 .phy.dpi.data_lines = 18,
261};242};
262 243
263static struct panel_dvi_platform_data dvi_panel = {244static struct tfp410_platform_data dvi_panel = {
264 .platform_enable = cm_t35_panel_enable_dvi,245 .power_down_gpio = CM_T35_DVI_EN_GPIO,
265 .platform_disable = cm_t35_panel_disable_dvi,
266};246};
267 247
268static struct omap_dss_device cm_t35_dvi_device = {248static struct omap_dss_device cm_t35_dvi_device = {
269 .name = "dvi",249 .name = "dvi",
270 .type = OMAP_DISPLAY_TYPE_DPI,250 .type = OMAP_DISPLAY_TYPE_DPI,
271 .driver_name = "dvi",251 .driver_name = "tfp410",
272 .data = &dvi_panel,252 .data = &dvi_panel,
273 .phy.dpi.data_lines = 24,253 .phy.dpi.data_lines = 24,
274};254};
@@ -316,7 +296,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = { · 41 unmodified lines
316static struct gpio cm_t35_dss_gpios[] __initdata = {296static struct gpio cm_t35_dss_gpios[] __initdata = {
317 { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" },297 { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" },
318 { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" },298 { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" },
319 { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" },
320};299};
321 300
322static void __init cm_t35_init_display(void)301static void __init cm_t35_init_display(void)
@@ -335,7 +314,6 @@ static void __init cm_t35_init_display(void) · 12 unmodified lines
335 314
336 gpio_export(CM_T35_LCD_EN_GPIO, 0);315 gpio_export(CM_T35_LCD_EN_GPIO, 0);
337 gpio_export(CM_T35_LCD_BL_GPIO, 0);316 gpio_export(CM_T35_LCD_BL_GPIO, 0);
338 gpio_export(CM_T35_DVI_EN_GPIO, 0);
339 317
340 msleep(50);318 msleep(50);
341 gpio_set_value(CM_T35_LCD_EN_GPIO, 1);319 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
47#include <plat/usb.h>47#include <plat/usb.h>
48#include <video/omapdss.h>48#include <video/omapdss.h>
49#include <video/omap-panel-generic-dpi.h>49#include <video/omap-panel-generic-dpi.h>
50#include <video/omap-panel-dvi.h>50#include <video/omap-panel-tfp410.h>
51 51
52#include <plat/mcspi.h>52#include <plat/mcspi.h>
53#include <linux/input/matrix_keypad.h>53#include <linux/input/matrix_keypad.h>
@@ -118,19 +118,6 @@ static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev) · 64 unmodified lines
118 gpio_set_value_cansleep(dssdev->reset_gpio, 0);118 gpio_set_value_cansleep(dssdev->reset_gpio, 0);
119}119}
120 120
121static 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
128static 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
134static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {121static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
135 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),122 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
136};123};
@@ -154,15 +141,14 @@ static struct omap_dss_device devkit8000_lcd_device = { · 17 unmodified lines
154 .phy.dpi.data_lines = 24,141 .phy.dpi.data_lines = 24,
155};142};
156 143
157static struct panel_dvi_platform_data dvi_panel = {144static struct tfp410_platform_data dvi_panel = {
158 .platform_enable = devkit8000_panel_enable_dvi,145 .power_down_gpio = -1,
159 .platform_disable = devkit8000_panel_disable_dvi,
160};146};
161 147
162static struct omap_dss_device devkit8000_dvi_device = {148static struct omap_dss_device devkit8000_dvi_device = {
163 .name = "dvi",149 .name = "dvi",
164 .type = OMAP_DISPLAY_TYPE_DPI,150 .type = OMAP_DISPLAY_TYPE_DPI,
165 .driver_name = "dvi",151 .driver_name = "tfp410",
166 .data = &dvi_panel,152 .data = &dvi_panel,
167 .phy.dpi.data_lines = 24,153 .phy.dpi.data_lines = 24,
168};154};
@@ -244,13 +230,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev, · 75 unmodified lines
244 }230 }
245 231
246 /* gpio + 7 is "DVI_PD" (out, active low) */232 /* gpio + 7 is "DVI_PD" (out, active low) */
247 devkit8000_dvi_device.reset_gpio = gpio + 7;233 dvi_panel.power_down_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 }
254 234
255 return 0;235 return 0;
256}236}
arch/arm/mach-omap2/board-igep0020.c+5−27
@@ -32,7 +32,7 @@ · 31 unmodified lines
32#include <plat/gpmc.h>32#include <plat/gpmc.h>
33#include <plat/usb.h>33#include <plat/usb.h>
34#include <video/omapdss.h>34#include <video/omapdss.h>
35#include <video/omap-panel-dvi.h>35#include <video/omap-panel-tfp410.h>
36#include <plat/onenand.h>36#include <plat/onenand.h>
37 37
38#include "mux.h"38#include "mux.h"
@@ -444,28 +444,15 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { · 405 unmodified lines
444 .setup = igep_twl_gpio_setup,444 .setup = igep_twl_gpio_setup,
445};445};
446 446
447static int igep2_enable_dvi(struct omap_dss_device *dssdev)447static struct tfp410_platform_data dvi_panel = {
448{448 .i2c_bus_num = 3,
449 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);449 .power_down_gpio = IGEP2_GPIO_DVI_PUP,
450
451 return 0;
452}
453
454static void igep2_disable_dvi(struct omap_dss_device *dssdev)
455{
456 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
457}
458
459static struct panel_dvi_platform_data dvi_panel = {
460 .platform_enable = igep2_enable_dvi,
461 .platform_disable = igep2_disable_dvi,
462 .i2c_bus_num = 3,
463};450};
464 451
465static struct omap_dss_device igep2_dvi_device = {452static struct omap_dss_device igep2_dvi_device = {
466 .type = OMAP_DISPLAY_TYPE_DPI,453 .type = OMAP_DISPLAY_TYPE_DPI,
467 .name = "dvi",454 .name = "dvi",
468 .driver_name = "dvi",455 .driver_name = "tfp410",
469 .data = &dvi_panel,456 .data = &dvi_panel,
470 .phy.dpi.data_lines = 24,457 .phy.dpi.data_lines = 24,
471};458};
@@ -480,14 +467,6 @@ static struct omap_dss_board_info igep2_dss_data = { · 8 unmodified lines
480 .default_device = &igep2_dvi_device,467 .default_device = &igep2_dvi_device,
481};468};
482 469
483static 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
491static struct platform_device *igep_devices[] __initdata = {470static struct platform_device *igep_devices[] __initdata = {
492 &igep_vwlan_device,471 &igep_vwlan_device,
493};472};
@@ -668,7 +647,6 @@ static void __init igep_init(void) · 174 unmodified lines
668 647
669 if (machine_is_igep0020()) {648 if (machine_is_igep0020()) {
670 omap_display_init(&igep2_dss_data);649 omap_display_init(&igep2_dss_data);
671 igep2_display_init();
672 igep2_init_smsc911x();650 igep2_init_smsc911x();
673 usbhs_init(&igep2_usbhs_bdata);651 usbhs_init(&igep2_usbhs_bdata);
674 } else {652 } else {
arch/arm/mach-omap2/board-omap3beagle.c+5−32
@@ -42,7 +42,7 @@ · 41 unmodified lines
42#include <plat/board.h>42#include <plat/board.h>
43#include "common.h"43#include "common.h"
44#include <video/omapdss.h>44#include <video/omapdss.h>
45#include <video/omap-panel-dvi.h>45#include <video/omap-panel-tfp410.h>
46#include <plat/gpmc.h>46#include <plat/gpmc.h>
47#include <plat/nand.h>47#include <plat/nand.h>
48#include <plat/usb.h>48#include <plat/usb.h>
@@ -189,33 +189,17 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { · 140 unmodified lines
189 189
190/* DSS */190/* DSS */
191 191
192static int beagle_enable_dvi(struct omap_dss_device *dssdev)192static struct tfp410_platform_data dvi_panel = {
193{
194 if (gpio_is_valid(dssdev->reset_gpio))
195 gpio_set_value(dssdev->reset_gpio, 1);
196
197 return 0;
198}
199
200static 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
206static struct panel_dvi_platform_data dvi_panel = {
207 .platform_enable = beagle_enable_dvi,
208 .platform_disable = beagle_disable_dvi,
209 .i2c_bus_num = 3,193 .i2c_bus_num = 3,
194 .power_down_gpio = -1,
210};195};
211 196
212static struct omap_dss_device beagle_dvi_device = {197static struct omap_dss_device beagle_dvi_device = {
213 .type = OMAP_DISPLAY_TYPE_DPI,198 .type = OMAP_DISPLAY_TYPE_DPI,
214 .name = "dvi",199 .name = "dvi",
215 .driver_name = "dvi",200 .driver_name = "tfp410",
216 .data = &dvi_panel,201 .data = &dvi_panel,
217 .phy.dpi.data_lines = 24,202 .phy.dpi.data_lines = 24,
218 .reset_gpio = -EINVAL,
219};203};
220 204
221static struct omap_dss_device beagle_tv_device = {205static struct omap_dss_device beagle_tv_device = {
@@ -236,16 +220,6 @@ static struct omap_dss_board_info beagle_dss_data = { · 14 unmodified lines
236 .default_device = &beagle_dvi_device,220 .default_device = &beagle_dvi_device,
237};221};
238 222
239static 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
249#include "sdram-micron-mt46h32m32lf-6.h"223#include "sdram-micron-mt46h32m32lf-6.h"
250 224
251static struct omap2_hsmmc_info mmc[] = {225static struct omap2_hsmmc_info mmc[] = {
@@ -309,7 +283,7 @@ static int beagle_twl_gpio_setup(struct device *dev, · 57 unmodified lines
309 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))283 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
310 pr_err("%s: unable to configure EHCI_nOC\n", __func__);284 pr_err("%s: unable to configure EHCI_nOC\n", __func__);
311 }285 }
312 beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;286 dvi_panel.power_down_gpio = beagle_config.reset_gpio;
313 287
314 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,288 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
315 "nEN_USB_PWR");289 "nEN_USB_PWR");
@@ -552,7 +526,6 @@ static void __init omap3_beagle_init(void) · 236 unmodified lines
552 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);526 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
553 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);527 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
554 528
555 beagle_display_init();
556 beagle_opp_init();529 beagle_opp_init();
557}530}
558 531
arch/arm/mach-omap2/board-omap3evm.c+8−29
@@ -46,7 +46,7 @@ · 45 unmodified lines
46#include "common.h"46#include "common.h"
47#include <plat/mcspi.h>47#include <plat/mcspi.h>
48#include <video/omapdss.h>48#include <video/omapdss.h>
49#include <video/omap-panel-dvi.h>49#include <video/omap-panel-tfp410.h>
50 50
51#include "mux.h"51#include "mux.h"
52#include "sdram-micron-mt46h32m32lf-6.h"52#include "sdram-micron-mt46h32m32lf-6.h"
@@ -219,35 +219,14 @@ static struct omap_dss_device omap3_evm_tv_device = { · 166 unmodified lines
219 .platform_disable = omap3_evm_disable_tv,219 .platform_disable = omap3_evm_disable_tv,
220};220};
221 221
222static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)222static struct tfp410_platform_data dvi_panel = {
223{223 .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO,
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
235static 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
242static struct panel_dvi_platform_data dvi_panel = {
243 .platform_enable = omap3_evm_enable_dvi,
244 .platform_disable = omap3_evm_disable_dvi,
245};224};
246 225
247static struct omap_dss_device omap3_evm_dvi_device = {226static struct omap_dss_device omap3_evm_dvi_device = {
248 .name = "dvi",227 .name = "dvi",
249 .type = OMAP_DISPLAY_TYPE_DPI,228 .type = OMAP_DISPLAY_TYPE_DPI,
250 .driver_name = "dvi",229 .driver_name = "tfp410",
251 .data = &dvi_panel,230 .data = &dvi_panel,
252 .phy.dpi.data_lines = 24,231 .phy.dpi.data_lines = 24,
253};232};
@@ -630,13 +609,13 @@ static struct regulator_consumer_supply dummy_supplies[] = { · 376 unmodified lines
630 609
631static void __init omap3_evm_init(void)610static void __init omap3_evm_init(void)
632{611{
612 struct omap_board_mux *obm;
613
633 omap3_evm_get_revision();614 omap3_evm_get_revision();
634 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));615 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
635 616
636 if (cpu_is_omap3630())617 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
637 omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);618 omap3_mux_init(obm, OMAP_PACKAGE_CBB);
638 else
639 omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
640 619
641 omap_board_config = omap3_evm_config;620 omap_board_config = omap3_evm_config;
642 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);621 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
42#include <plat/usb.h>42#include <plat/usb.h>
43#include <video/omapdss.h>43#include <video/omapdss.h>
44#include <video/omap-panel-generic-dpi.h>44#include <video/omap-panel-generic-dpi.h>
45#include <video/omap-panel-dvi.h>45#include <video/omap-panel-tfp410.h>
46 46
47#include <plat/mcspi.h>47#include <plat/mcspi.h>
48#include <linux/input/matrix_keypad.h>48#include <linux/input/matrix_keypad.h>
@@ -92,9 +92,6 @@ static inline void __init omap3stalker_init_eth(void) · 43 unmodified lines
92#define LCD_PANEL_BKLIGHT_GPIO 21092#define LCD_PANEL_BKLIGHT_GPIO 210
93#define ENABLE_VPLL2_DEV_GRP 0xE093#define ENABLE_VPLL2_DEV_GRP 0xE0
94 94
95static int lcd_enabled;
96static int dvi_enabled;
97
98static void __init omap3_stalker_display_init(void)95static void __init omap3_stalker_display_init(void)
99{96{
100 return;97 return;
@@ -122,32 +119,14 @@ static struct omap_dss_device omap3_stalker_tv_device = { · 21 unmodified lines
122 .platform_disable = omap3_stalker_disable_tv,119 .platform_disable = omap3_stalker_disable_tv,
123};120};
124 121
125static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev)122static struct tfp410_platform_data dvi_panel = {
126{123 .power_down_gpio = DSS_ENABLE_GPIO,
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
136static 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
142static struct panel_dvi_platform_data dvi_panel = {
143 .platform_enable = omap3_stalker_enable_dvi,
144 .platform_disable = omap3_stalker_disable_dvi,
145};124};
146 125
147static struct omap_dss_device omap3_stalker_dvi_device = {126static struct omap_dss_device omap3_stalker_dvi_device = {
148 .name = "dvi",127 .name = "dvi",
149 .type = OMAP_DISPLAY_TYPE_DPI,128 .type = OMAP_DISPLAY_TYPE_DPI,
150 .driver_name = "dvi",129 .driver_name = "tfp410",
151 .data = &dvi_panel,130 .data = &dvi_panel,
152 .phy.dpi.data_lines = 24,131 .phy.dpi.data_lines = 24,
153};132};
arch/arm/mach-omap2/board-omap4panda.c+8−38
@@ -42,7 +42,7 @@ · 41 unmodified lines
42#include "common.h"42#include "common.h"
43#include <plat/usb.h>43#include <plat/usb.h>
44#include <plat/mmc.h>44#include <plat/mmc.h>
45#include <video/omap-panel-dvi.h>45#include <video/omap-panel-tfp410.h>
46 46
47#include "hsmmc.h"47#include "hsmmc.h"
48#include "control.h"48#include "control.h"
@@ -231,7 +231,7 @@ static struct platform_device omap_vwlan_device = { · 182 unmodified lines
231 },231 },
232};232};
233 233
234struct wl12xx_platform_data omap_panda_wlan_data __initdata = {234static struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
235 /* PANDA ref clock is 38.4 MHz */235 /* PANDA ref clock is 38.4 MHz */
236 .board_ref_clock = 2,236 .board_ref_clock = 2,
237};237};
@@ -420,47 +420,22 @@ static struct omap_board_mux board_mux[] __initdata = { · 182 unmodified lines
420/* Display DVI */420/* Display DVI */
421#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0421#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
422 422
423static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev)
424{
425 gpio_set_value(dssdev->reset_gpio, 1);
426 return 0;
427}
428
429static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
430{
431 gpio_set_value(dssdev->reset_gpio, 0);
432}
433
434/* Using generic display panel */423/* Using generic display panel */
435static struct panel_dvi_platform_data omap4_dvi_panel = {424static struct tfp410_platform_data omap4_dvi_panel = {
436 .platform_enable = omap4_panda_enable_dvi,425 .i2c_bus_num = 3,
437 .platform_disable = omap4_panda_disable_dvi,426 .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
438 .i2c_bus_num = 3,
439};427};
440 428
441struct omap_dss_device omap4_panda_dvi_device = {429static struct omap_dss_device omap4_panda_dvi_device = {
442 .type = OMAP_DISPLAY_TYPE_DPI,430 .type = OMAP_DISPLAY_TYPE_DPI,
443 .name = "dvi",431 .name = "dvi",
444 .driver_name = "dvi",432 .driver_name = "tfp410",
445 .data = &omap4_dvi_panel,433 .data = &omap4_dvi_panel,
446 .phy.dpi.data_lines = 24,434 .phy.dpi.data_lines = 24,
447 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,435 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
448 .channel = OMAP_DSS_CHANNEL_LCD2,436 .channel = OMAP_DSS_CHANNEL_LCD2,
449};437};
450 438
451int __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
464static struct gpio panda_hdmi_gpios[] = {439static struct gpio panda_hdmi_gpios[] = {
465 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },440 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
466 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },441 { 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
509 .default_device = &omap4_panda_dvi_device,484 .default_device = &omap4_panda_dvi_device,
510};485};
511 486
512void __init omap4_panda_display_init(void)487static void __init omap4_panda_display_init(void)
513{488{
514 int r;
515
516 r = omap4_panda_dvi_init();
517 if (r)
518 pr_err("error initializing panda DVI\n");
519 489
520 omap_display_init(&omap4_panda_dss_data);490 omap_display_init(&omap4_panda_dss_data);
521 491
arch/arm/mach-omap2/board-overo.c+4−21
@@ -46,7 +46,7 @@ · 45 unmodified lines
46#include "common.h"46#include "common.h"
47#include <video/omapdss.h>47#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h>48#include <video/omap-panel-generic-dpi.h>
49#include <video/omap-panel-dvi.h>49#include <video/omap-panel-tfp410.h>
50#include <plat/gpmc.h>50#include <plat/gpmc.h>
51#include <mach/hardware.h>51#include <mach/hardware.h>
52#include <plat/nand.h>52#include <plat/nand.h>
@@ -167,32 +167,15 @@ static void __init overo_display_init(void) · 114 unmodified lines
167 gpio_export(OVERO_GPIO_LCD_BL, 0);167 gpio_export(OVERO_GPIO_LCD_BL, 0);
168}168}
169 169
170static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)170static struct tfp410_platform_data dvi_panel = {
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
181static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
182{
183 dvi_enabled = 0;
184}
185
186static struct panel_dvi_platform_data dvi_panel = {
187 .platform_enable = overo_panel_enable_dvi,
188 .platform_disable = overo_panel_disable_dvi,
189 .i2c_bus_num = 3,171 .i2c_bus_num = 3,
172 .power_down_gpio = -1,
190};173};
191 174
192static struct omap_dss_device overo_dvi_device = {175static struct omap_dss_device overo_dvi_device = {
193 .name = "dvi",176 .name = "dvi",
194 .type = OMAP_DISPLAY_TYPE_DPI,177 .type = OMAP_DISPLAY_TYPE_DPI,
195 .driver_name = "dvi",178 .driver_name = "tfp410",
196 .data = &dvi_panel,179 .data = &dvi_panel,
197 .phy.dpi.data_lines = 24,180 .phy.dpi.data_lines = 24,
198};181};
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
872 .resource_config = twl4030_rconfig,872 .resource_config = twl4030_rconfig,
873};873};
874 874
875struct twl4030_vibra_data rx51_vibra_data __initdata = {875static struct twl4030_vibra_data rx51_vibra_data __initdata = {
876 .coexist = 0,876 .coexist = 0,
877};877};
878 878
879struct twl4030_audio_data rx51_audio_data __initdata = {879static struct twl4030_audio_data rx51_audio_data __initdata = {
880 .audio_mclk = 26000000,880 .audio_mclk = 26000000,
881 .vibra = &rx51_vibra_data,881 .vibra = &rx51_vibra_data,
882};882};
arch/arm/mach-omap2/board-rx51.c+18−20
@@ -59,25 +59,24 @@ static struct platform_device leds_gpio = { · 58 unmodified lines
59};59};
60 60
61/*61/*
62 * cpuidle C-states definition override from the default values.62 * cpuidle C-states definition for rx51.
63 * The 'exit_latency' field is the sum of sleep and wake-up latencies.63 *
64 */64 * The 'exit_latency' field is the sum of sleep
65static struct cpuidle_params rx51_cpuidle_params[] = {65 * and wake-up latencies.
66 /* C1 */66
67 {110 + 162, 5 , 1},67 ---------------------------------------------
68 /* C2 */68 | state | exit_latency | target_residency |
69 {106 + 180, 309, 1},69 ---------------------------------------------
70 /* C3 */70 | C1 | 110 + 162 | 5 |
71 {107 + 410, 46057, 0},71 | C2 | 106 + 180 | 309 |
72 /* C4 */72 | C3 | 107 + 410 | 46057 |
73 {121 + 3374, 46057, 0},73 | C4 | 121 + 3374 | 46057 |
74 /* C5 */74 | C5 | 855 + 1146 | 46057 |
75 {855 + 1146, 46057, 1},75 | C6 | 7580 + 4134 | 484329 |
76 /* C6 */76 | C7 | 7505 + 15274 | 484329 |
77 {7580 + 4134, 484329, 0},77 ---------------------------------------------
78 /* C7 */78
79 {7505 + 15274, 484329, 1},79*/
80};
81 80
82extern void __init rx51_peripherals_init(void);81extern void __init rx51_peripherals_init(void);
83 82
@@ -98,7 +97,6 @@ static void __init rx51_init(void) · 14 unmodified lines
98 struct omap_sdrc_params *sdrc_params;97 struct omap_sdrc_params *sdrc_params;
99 98
100 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);99 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
101 omap3_pm_init_cpuidle(rx51_cpuidle_params);
102 omap_serial_init();100 omap_serial_init();
103 101
104 sdrc_params = nokia_get_sdram_timings();102 sdrc_params = nokia_get_sdram_timings();
arch/arm/mach-omap2/board-zoom-display.c+1−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
16#include <linux/spi/spi.h>16#include <linux/spi/spi.h>
17#include <plat/mcspi.h>17#include <plat/mcspi.h>
18#include <video/omapdss.h>18#include <video/omapdss.h>
19#include <mach/board-zoom.h>
19 20
20#define LCD_PANEL_RESET_GPIO_PROD 9621#define LCD_PANEL_RESET_GPIO_PROD 96
21#define LCD_PANEL_RESET_GPIO_PILOT 5522#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
134void ti81xx_map_io(void);134void ti81xx_map_io(void);
135void omap_barriers_init(void);135void omap_barriers_init(void);
136 136
137extern void __init omap_init_consistent_dma_size(void);
138
139/**137/**
140 * omap_test_timeout - busy-loop, testing a condition138 * omap_test_timeout - busy-loop, testing a condition
141 * @cond: condition to test until it evaluates to true139 * @cond: condition to test until it evaluates to true
arch/arm/mach-omap2/cpuidle34xx.c+120−178
@@ -38,40 +38,44 @@ · 37 unmodified lines
38 38
39#ifdef CONFIG_CPU_IDLE39#ifdef CONFIG_CPU_IDLE
40 40
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 */
48static 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
66/* Mach specific information to be recorded in the C-state driver_data */41/* Mach specific information to be recorded in the C-state driver_data */
67struct omap3_idle_statedata {42struct omap3_idle_statedata {
68 u32 mpu_state;43 u32 mpu_state;
69 u32 core_state;44 u32 core_state;
70 u8 valid;
71};45};
72struct omap3_idle_statedata omap3_idle_data[OMAP3_NUM_STATES];
73 46
74struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;47static 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
78static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
75 79
76static int _cpuidle_allow_idle(struct powerdomain *pwrdm,80static int _cpuidle_allow_idle(struct powerdomain *pwrdm,
77 struct clockdomain *clkdm)81 struct clockdomain *clkdm)
@@ -91,8 +95,7 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, · 13 unmodified lines
91 struct cpuidle_driver *drv,95 struct cpuidle_driver *drv,
92 int index)96 int index)
93{97{
94 struct omap3_idle_statedata *cx =98 struct omap3_idle_statedata *cx = &omap3_idle_data[index];
95 cpuidle_get_statedata(&dev->states_usage[index]);
96 u32 mpu_state = cx->mpu_state, core_state = cx->core_state;99 u32 mpu_state = cx->mpu_state, core_state = cx->core_state;
97 100
98 local_fiq_disable();101 local_fiq_disable();
@@ -169,14 +172,12 @@ static inline int omap3_enter_idle(struct cpuidle_device *dev, · 70 unmodified lines
169 * if it satisfies the enable_off_mode condition.172 * if it satisfies the enable_off_mode condition.
170 */173 */
171static int next_valid_state(struct cpuidle_device *dev,174static int next_valid_state(struct cpuidle_device *dev,
172 struct cpuidle_driver *drv,175 struct cpuidle_driver *drv, int index)
173 int index)
174{176{
175 struct cpuidle_state_usage *curr_usage = &dev->states_usage[index];177 struct omap3_idle_statedata *cx = &omap3_idle_data[index];
176 struct cpuidle_state *curr = &drv->states[index];
177 struct omap3_idle_statedata *cx = cpuidle_get_statedata(curr_usage);
178 u32 mpu_deepest_state = PWRDM_POWER_RET;178 u32 mpu_deepest_state = PWRDM_POWER_RET;
179 u32 core_deepest_state = PWRDM_POWER_RET;179 u32 core_deepest_state = PWRDM_POWER_RET;
180 int idx;
180 int next_index = -1;181 int next_index = -1;
181 182
182 if (enable_off_mode) {183 if (enable_off_mode) {
@@ -191,45 +192,29 @@ static int next_valid_state(struct cpuidle_device *dev, · 8 unmodified lines
191 }192 }
192 193
193 /* Check if current state is valid */194 /* Check if current state is valid */
194 if ((cx->valid) &&195 if ((cx->mpu_state >= mpu_deepest_state) &&
195 (cx->mpu_state >= mpu_deepest_state) &&196 (cx->core_state >= core_deepest_state))
196 (cx->core_state >= core_deepest_state)) {
197 return index;197 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);
211 198
212 /*199 /*
213 * Drop to next valid state.200 * Drop to next valid state.
214 * Start search from the next (lower) state.201 * Start search from the next (lower) state.
215 */202 */
216 idx--;203 for (idx = index - 1; idx >= 0; idx--) {
217 for (; idx >= 0; idx--) {204 cx = &omap3_idle_data[idx];
218 cx = cpuidle_get_statedata(&dev->states_usage[idx]);205 if ((cx->mpu_state >= mpu_deepest_state) &&
219 if ((cx->valid) &&206 (cx->core_state >= core_deepest_state)) {
220 (cx->mpu_state >= mpu_deepest_state) &&207 next_index = idx;
221 (cx->core_state >= core_deepest_state)) {208 break;
222 next_index = idx;
223 break;
224 }
225 }209 }
226 /*
227 * C1 is always valid.
228 * So, no need to check for 'next_index == -1' outside
229 * this loop.
230 */
231 }210 }
232 211
212 /*
213 * C1 is always valid.
214 * So, no need to check for 'next_index == -1' outside
215 * this loop.
216 */
217
233 return next_index;218 return next_index;
234}219}
235 220
@@ -273,7 +258,7 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, · 37 unmodified lines
273 * Prevent PER off if CORE is not in retention or off as this258 * Prevent PER off if CORE is not in retention or off as this
274 * would disable PER wakeups completely.259 * would disable PER wakeups completely.
275 */260 */
276 cx = cpuidle_get_statedata(&dev->states_usage[index]);261 cx = &omap3_idle_data[index];
277 core_next_state = cx->core_state;262 core_next_state = cx->core_state;
278 per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd);263 per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd);
279 if ((per_next_state == PWRDM_POWER_OFF) &&264 if ((per_next_state == PWRDM_POWER_OFF) &&
@@ -298,57 +283,71 @@ select_state: · 18 unmodified lines
298 283
299DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);284DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
300 285
301void 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
318struct cpuidle_driver omap3_idle_driver = {286struct cpuidle_driver omap3_idle_driver = {
319 .name = "omap3_idle",287 .name = "omap3_idle",
320 .owner = THIS_MODULE,288 .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,
321};349};
322 350
323/* Helper to fill the C-state common data*/
324static 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 */
339static 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
352/**351/**
353 * omap3_idle_init - Init routine for OMAP3 idle352 * omap3_idle_init - Init routine for OMAP3 idle
354 *353 *
@@ -358,77 +357,20 @@ static inline struct omap3_idle_statedata *_fill_cstate_usage( · 3 unmodified lines
358int __init omap3_idle_init(void)357int __init omap3_idle_init(void)
359{358{
360 struct cpuidle_device *dev;359 struct cpuidle_device *dev;
361 struct cpuidle_driver *drv = &omap3_idle_driver;
362 struct omap3_idle_statedata *cx;
363 360
364 mpu_pd = pwrdm_lookup("mpu_pwrdm");361 mpu_pd = pwrdm_lookup("mpu_pwrdm");
365 core_pd = pwrdm_lookup("core_pwrdm");362 core_pd = pwrdm_lookup("core_pwrdm");
366 per_pd = pwrdm_lookup("per_pwrdm");363 per_pd = pwrdm_lookup("per_pwrdm");
367 cam_pd = pwrdm_lookup("cam_pwrdm");364 cam_pd = pwrdm_lookup("cam_pwrdm");
368 365
366 if (!mpu_pd || !core_pd || !per_pd || !cam_pd)
367 return -ENODEV;
369 368
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;
429 cpuidle_register_driver(&omap3_idle_driver);369 cpuidle_register_driver(&omap3_idle_driver);
430 370
431 dev->state_count = OMAP3_NUM_STATES;371 dev = &per_cpu(omap3_idle_dev, smp_processor_id());
372 dev->cpu = 0;
373
432 if (cpuidle_register_device(dev)) {374 if (cpuidle_register_device(dev)) {
433 printk(KERN_ERR "%s: CPUidle register device failed\n",375 printk(KERN_ERR "%s: CPUidle register device failed\n",
434 __func__);376 __func__);
arch/arm/mach-omap2/cpuidle44xx.c+52−74
@@ -24,26 +24,31 @@ · 23 unmodified lines
24 24
25#ifdef CONFIG_CPU_IDLE25#ifdef CONFIG_CPU_IDLE
26 26
27/* Machine specific information to be recorded in the C-state driver_data */27/* Machine specific information */
28struct omap4_idle_statedata {28struct omap4_idle_statedata {
29 u32 cpu_state;29 u32 cpu_state;
30 u32 mpu_logic_state;30 u32 mpu_logic_state;
31 u32 mpu_state;31 u32 mpu_state;
32 u8 valid;
33};32};
34 33
35static struct cpuidle_params cpuidle_params_table[] = {34static struct omap4_idle_statedata omap4_idle_data[] = {
36 /* C1 - CPU0 ON + CPU1 ON + MPU ON */35 {
37 {.exit_latency = 2 + 2 , .target_residency = 5, .valid = 1},36 .cpu_state = PWRDM_POWER_ON,
38 /* C2- CPU0 OFF + CPU1 OFF + MPU CSWR */37 .mpu_state = PWRDM_POWER_ON,
39 {.exit_latency = 328 + 440 , .target_residency = 960, .valid = 1},38 .mpu_logic_state = PWRDM_POWER_RET,
40 /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */39 },
41 {.exit_latency = 460 + 518 , .target_residency = 1100, .valid = 1},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 },
42};50};
43 51
44#define OMAP4_NUM_STATES ARRAY_SIZE(cpuidle_params_table)
45
46struct omap4_idle_statedata omap4_idle_data[OMAP4_NUM_STATES];
47static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd;52static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd;
48 53
49/**54/**
@@ -60,8 +65,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, · 10 unmodified lines
60 struct cpuidle_driver *drv,65 struct cpuidle_driver *drv,
61 int index)66 int index)
62{67{
63 struct omap4_idle_statedata *cx =68 struct omap4_idle_statedata *cx = &omap4_idle_data[index];
64 cpuidle_get_statedata(&dev->states_usage[index]);
65 u32 cpu1_state;69 u32 cpu1_state;
66 int cpu_id = smp_processor_id();70 int cpu_id = smp_processor_id();
67 71
@@ -78,7 +82,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, · 10 unmodified lines
78 cpu1_state = pwrdm_read_pwrst(cpu1_pd);82 cpu1_state = pwrdm_read_pwrst(cpu1_pd);
79 if (cpu1_state != PWRDM_POWER_OFF) {83 if (cpu1_state != PWRDM_POWER_OFF) {
80 index = drv->safe_state_index;84 index = drv->safe_state_index;
81 cx = cpuidle_get_statedata(&dev->states_usage[index]);85 cx = &omap4_idle_data[index];
82 }86 }
83 87
84 if (index > 0)88 if (index > 0)
@@ -133,36 +137,39 @@ struct cpuidle_driver omap4_idle_driver = { · 48 unmodified lines
133 .name = "omap4_idle",137 .name = "omap4_idle",
134 .owner = THIS_MODULE,138 .owner = THIS_MODULE,
135 .en_core_tk_irqen = 1,139 .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,
136};171};
137 172
138static 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
151static 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
166/**173/**
167 * omap4_idle_init - Init routine for OMAP4 idle174 * omap4_idle_init - Init routine for OMAP4 idle
168 *175 *
@@ -171,9 +178,7 @@ static inline struct omap4_idle_statedata *_fill_cstate_usage( · 2 unmodified lines
171 */178 */
172int __init omap4_idle_init(void)179int __init omap4_idle_init(void)
173{180{
174 struct omap4_idle_statedata *cx;
175 struct cpuidle_device *dev;181 struct cpuidle_device *dev;
176 struct cpuidle_driver *drv = &omap4_idle_driver;
177 unsigned int cpu_id = 0;182 unsigned int cpu_id = 0;
178 183
179 mpu_pd = pwrdm_lookup("mpu_pwrdm");184 mpu_pd = pwrdm_lookup("mpu_pwrdm");
@@ -182,42 +187,15 @@ int __init omap4_idle_init(void) · 2 unmodified lines
182 if ((!mpu_pd) || (!cpu0_pd) || (!cpu1_pd))187 if ((!mpu_pd) || (!cpu0_pd) || (!cpu1_pd))
183 return -ENODEV;188 return -ENODEV;
184 189
185
186 drv->safe_state_index = -1;
187 dev = &per_cpu(omap4_idle_dev, cpu_id);190 dev = &per_cpu(omap4_idle_dev, cpu_id);
188 dev->cpu = cpu_id;191 dev->cpu = cpu_id;
189 192
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;
214 cpuidle_register_driver(&omap4_idle_driver);193 cpuidle_register_driver(&omap4_idle_driver);
215 194
216 dev->state_count = OMAP4_NUM_STATES;
217 if (cpuidle_register_device(dev)) {195 if (cpuidle_register_device(dev)) {
218 pr_err("%s: CPUidle register device failed\n", __func__);196 pr_err("%s: CPUidle register device failed\n", __func__);
219 return -EIO;197 return -EIO;
220 }198 }
221 199
222 return 0;200 return 0;
223}201}
arch/arm/mach-omap2/devices.c+3−4
@@ -42,7 +42,6 @@ · 41 unmodified lines
42 42
43static int __init omap3_l3_init(void)43static int __init omap3_l3_init(void)
44{44{
45 int l;
46 struct omap_hwmod *oh;45 struct omap_hwmod *oh;
47 struct platform_device *pdev;46 struct platform_device *pdev;
48 char oh_name[L3_MODULES_MAX_LEN];47 char oh_name[L3_MODULES_MAX_LEN];
@@ -54,7 +53,7 @@ static int __init omap3_l3_init(void) · 5 unmodified lines
54 if (!(cpu_is_omap34xx()))53 if (!(cpu_is_omap34xx()))
55 return -ENODEV;54 return -ENODEV;
56 55
57 l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");56 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
58 57
59 oh = omap_hwmod_lookup(oh_name);58 oh = omap_hwmod_lookup(oh_name);
60 59
@@ -72,7 +71,7 @@ postcore_initcall(omap3_l3_init); · 11 unmodified lines
72 71
73static int __init omap4_l3_init(void)72static int __init omap4_l3_init(void)
74{73{
75 int l, i;74 int i;
76 struct omap_hwmod *oh[3];75 struct omap_hwmod *oh[3];
77 struct platform_device *pdev;76 struct platform_device *pdev;
78 char oh_name[L3_MODULES_MAX_LEN];77 char oh_name[L3_MODULES_MAX_LEN];
@@ -89,7 +88,7 @@ static int __init omap4_l3_init(void) · 10 unmodified lines
89 return -ENODEV;88 return -ENODEV;
90 89
91 for (i = 0; i < L3_MODULES; i++) {90 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);
93 92
94 oh[i] = omap_hwmod_lookup(oh_name);93 oh[i] = omap_hwmod_lookup(oh_name);
95 if (!(oh[i]))94 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
58 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1);58 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1);
59 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;59 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);
61 if (!pdata) {61 if (!pdata->regs) {
62 pr_err("gpio%d: Memory allocation failed\n", id);62 pr_err("gpio%d: Memory allocation failed\n", id);
63 return -ENOMEM;63 return -ENOMEM;
64 }64 }
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
176 const int t_wpl = 40;176 const int t_wpl = 40;
177 const int t_wph = 30;177 const int t_wph = 30;
178 int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo;178 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;
180 int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0;180 int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0;
181 int err, ticks_cez;181 int err, ticks_cez;
182 int cs = cfg->cs, freq = *freq_ptr;182 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
240 break;240 break;
241 }241 }
242 242
243 tick_ns = gpmc_ticks_to_ns(1);
244 div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period);243 div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period);
245 gpmc_clk_ns = gpmc_ticks_to_ns(div);244 gpmc_clk_ns = gpmc_ticks_to_ns(div);
246 if (gpmc_clk_ns < 15) /* >66Mhz */245 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
755 irq++;755 irq++;
756 }756 }
757 757
758 ret = request_irq(gpmc_irq,758 ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL);
759 gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
760 if (ret)759 if (ret)
761 pr_err("gpmc: irq-%d could not claim: err %d\n",760 pr_err("gpmc: irq-%d could not claim: err %d\n",
762 gpmc_irq, ret);761 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
28 .base_id = 0,28 .base_id = 0,
29};29};
30 30
31int __init hwspinlocks_init(void)31static int __init hwspinlocks_init(void)
32{32{
33 int retval = 0;33 int retval = 0;
34 struct omap_hwmod *oh;34 struct omap_hwmod *oh;
arch/arm/mach-omap2/io.c+1−0
@@ -31,6 +31,7 @@ · 30 unmodified lines
31#include <plat/omap-pm.h>31#include <plat/omap-pm.h>
32#include <plat/omap_hwmod.h>32#include <plat/omap_hwmod.h>
33#include <plat/multi.h>33#include <plat/multi.h>
34#include <plat/dma.h>
34 35
35#include "iomap.h"36#include "iomap.h"
36#include "voltage.h"37#include "voltage.h"
arch/arm/mach-omap2/irq.c+2−1
@@ -25,6 +25,7 @@ · 24 unmodified lines
25#include <mach/hardware.h>25#include <mach/hardware.h>
26 26
27#include "iomap.h"27#include "iomap.h"
28#include "common.h"
28 29
29/* selected INTC register offsets */30/* selected INTC register offsets */
30 31
@@ -334,7 +335,7 @@ void omap_intc_restore_context(void) · 303 unmodified lines
334void omap3_intc_suspend(void)335void omap3_intc_suspend(void)
335{336{
336 /* A pending interrupt would prevent OMAP from entering suspend */337 /* A pending interrupt would prevent OMAP from entering suspend */
337 omap_ack_irq(0);338 omap_ack_irq(NULL);
338}339}
339 340
340void omap3_intc_prepare_idle(void)341void 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
247 int mux_mode;247 int mux_mode;
248 248
249 mux_mode = omap_mux_get_by_name(muxname, &partition, &mux);249 mux_mode = omap_mux_get_by_name(muxname, &partition, &mux);
250 if (mux_mode < 0)250 if (mux_mode < 0 || !mux)
251 return mux_mode;251 return mux_mode;
252 252
253 old_mode = omap_mux_read(partition, mux->reg_offset);253 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
18#include <asm/cacheflush.h>18#include <asm/cacheflush.h>
19#include <asm/memblock.h>19#include <asm/memblock.h>
20 20
21#include <plat/omap-secure.h>
21#include <mach/omap-secure.h>22#include <mach/omap-secure.h>
22 23
23static phys_addr_t omap_secure_memblock_base;24static 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
259/*259/*
260 * Clear WakeupGen SAR backup status.260 * Clear WakeupGen SAR backup status.
261 */261 */
262void irq_sar_clear(void)262static void irq_sar_clear(void)
263{263{
264 u32 val;264 u32 val;
265 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET);265 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
2 * omap_hwmod implementation for OMAP2/3/42 * omap_hwmod implementation for OMAP2/3/4
3 *3 *
4 * Copyright (C) 2009-2011 Nokia Corporation4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc.5 * Copyright (C) 2011-2012 Texas Instruments, Inc.
6 *6 *
7 * Paul Walmsley, Benoît Cousson, Kevin Hilman7 * Paul Walmsley, Benoît Cousson, Kevin Hilman
8 *8 *
@@ -137,6 +137,7 @@ · 128 unmodified lines
137#include <linux/mutex.h>137#include <linux/mutex.h>
138#include <linux/spinlock.h>138#include <linux/spinlock.h>
139#include <linux/slab.h>139#include <linux/slab.h>
140#include <linux/bootmem.h>
140 141
141#include "common.h"142#include "common.h"
142#include <plat/cpu.h>143#include <plat/cpu.h>
@@ -159,15 +160,57 @@ · 16 unmodified lines
159/* Name of the OMAP hwmod for the MPU */160/* Name of the OMAP hwmod for the MPU */
160#define MPU_INITIATOR_NAME "mpu"161#define MPU_INITIATOR_NAME "mpu"
161 162
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
162/* omap_hwmod_list contains all registered struct omap_hwmods */169/* omap_hwmod_list contains all registered struct omap_hwmods */
163static LIST_HEAD(omap_hwmod_list);170static LIST_HEAD(omap_hwmod_list);
164 171
165/* mpu_oh: used to add/remove MPU initiator from sleepdep list */172/* mpu_oh: used to add/remove MPU initiator from sleepdep list */
166static struct omap_hwmod *mpu_oh;173static struct omap_hwmod *mpu_oh;
167 174
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 */
180static 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 */
187static unsigned short free_ls, max_ls, ls_supp;
168 188
169/* Private functions */189/* Private functions */
170 190
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 */
201static 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
171/**214/**
172 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy215 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy
173 * @oh: struct omap_hwmod *216 * @oh: struct omap_hwmod *
@@ -582,16 +625,16 @@ static int _init_main_clk(struct omap_hwmod *oh) · 408 unmodified lines
582 */625 */
583static int _init_interface_clks(struct omap_hwmod *oh)626static int _init_interface_clks(struct omap_hwmod *oh)
584{627{
628 struct omap_hwmod_ocp_if *os;
629 struct list_head *p;
585 struct clk *c;630 struct clk *c;
586 int i;631 int i = 0;
587 int ret = 0;632 int ret = 0;
588 633
589 if (oh->slaves_cnt == 0)634 p = oh->slave_ports.next;
590 return 0;
591
592 for (i = 0; i < oh->slaves_cnt; i++) {
593 struct omap_hwmod_ocp_if *os = oh->slaves[i];
594 635
636 while (i < oh->slaves_cnt) {
637 os = _fetch_next_ocp_if(&p, &i);
595 if (!os->clk)638 if (!os->clk)
596 continue;639 continue;
597 640
@@ -643,21 +686,22 @@ static int _init_opt_clks(struct omap_hwmod *oh) · 45 unmodified lines
643 */686 */
644static int _enable_clocks(struct omap_hwmod *oh)687static int _enable_clocks(struct omap_hwmod *oh)
645{688{
646 int i;689 struct omap_hwmod_ocp_if *os;
690 struct list_head *p;
691 int i = 0;
647 692
648 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);693 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);
649 694
650 if (oh->_clk)695 if (oh->_clk)
651 clk_enable(oh->_clk);696 clk_enable(oh->_clk);
652 697
653 if (oh->slaves_cnt > 0) {698 p = oh->slave_ports.next;
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;
657 699
658 if (c && (os->flags & OCPIF_SWSUP_IDLE))700 while (i < oh->slaves_cnt) {
659 clk_enable(c);701 os = _fetch_next_ocp_if(&p, &i);
660 }702
703 if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
704 clk_enable(os->_clk);
661 }705 }
662 706
663 /* The opt clocks are controlled by the device driver. */707 /* The opt clocks are controlled by the device driver. */
@@ -673,21 +717,22 @@ static int _enable_clocks(struct omap_hwmod *oh) · 9 unmodified lines
673 */717 */
674static int _disable_clocks(struct omap_hwmod *oh)718static int _disable_clocks(struct omap_hwmod *oh)
675{719{
676 int i;720 struct omap_hwmod_ocp_if *os;
721 struct list_head *p;
722 int i = 0;
677 723
678 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);724 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);
679 725
680 if (oh->_clk)726 if (oh->_clk)
681 clk_disable(oh->_clk);727 clk_disable(oh->_clk);
682 728
683 if (oh->slaves_cnt > 0) {729 p = oh->slave_ports.next;
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;
687 730
688 if (c && (os->flags & OCPIF_SWSUP_IDLE))731 while (i < oh->slaves_cnt) {
689 clk_disable(c);732 os = _fetch_next_ocp_if(&p, &i);
690 }733
734 if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
735 clk_disable(os->_clk);
691 }736 }
692 737
693 /* The opt clocks are controlled by the device driver. */738 /* 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
780 oh->prcm.omap4.clkctrl_offs);825 oh->prcm.omap4.clkctrl_offs);
781}826}
782 827
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 */
790static 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
816/**828/**
817 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh829 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
818 * @oh: struct omap_hwmod *oh830 * @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
883}895}
884 896
885/**897/**
886 * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use898 * _get_mpu_irq_by_name - fetch MPU interrupt line number by name
887 * @oh: struct omap_hwmod *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
888 *902 *
889 * Returns the array index of the OCP slave port that the MPU903 * Retrieve a MPU hardware IRQ line number named by @name associated
890 * addresses the device on, or -EINVAL upon error or not found.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.
891 */913 */
892static int __init _find_mpu_port_index(struct omap_hwmod *oh)914static int _get_mpu_irq_by_name(struct omap_hwmod *oh, const char *name,
915 unsigned int *irq)
893{916{
894 int i;917 int i;
895 int found = 0;918 bool found = false;
896 919
897 if (!oh || oh->slaves_cnt == 0)920 if (!oh->mpu_irqs)
898 return -EINVAL;921 return -ENOENT;
899 922
900 for (i = 0; i < oh->slaves_cnt; i++) {923 i = 0;
901 struct omap_hwmod_ocp_if *os = oh->slaves[i];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 }
902 932
903 if (os->user & OCP_USER_MPU) {933 if (!found)
904 found = 1;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 */
957static 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;
905 break;971 break;
906 }972 }
973 i++;
907 }974 }
908 975
909 if (found)976 if (!found)
910 pr_debug("omap_hwmod: %s: MPU OCP slave port ID %d\n",977 return -ENOENT;
911 oh->name, i);978
912 else979 *dma = oh->sdma_reqs[i].dma_req;
913 pr_debug("omap_hwmod: %s: no MPU OCP slave port found\n",
914 oh->name);
915 980
916 return (found) ? i : -EINVAL;981 return 0;
917}982}
918 983
919/**984/**
920 * _find_mpu_rt_base - find hwmod register target base addr accessible by MPU985 * _get_addr_space_by_name - fetch address space start & end by name
921 * @oh: struct omap_hwmod *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
922 *990 *
923 * Return the virtual address of the base of the register target of991 * Retrieve address space start and end addresses for the IP block
924 * device @oh, or NULL on error.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.
925 */1001 */
926static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)1002static int _get_addr_space_by_name(struct omap_hwmod *oh, const char *name,
1003 u32 *pa_start, u32 *pa_end)
927{1004{
1005 int i, j;
928 struct omap_hwmod_ocp_if *os;1006 struct omap_hwmod_ocp_if *os;
929 struct omap_hwmod_addr_space *mem;1007 struct list_head *p = NULL;
930 int i = 0, found = 0;1008 bool found = false;
931 void __iomem *va_start;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 */
1051static 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;
932 1059
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 */
1089static 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)
934 return NULL;1092 return NULL;
935 1093
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 */
1104static 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;
937 1109
938 if (!os->addr)1110 os = _find_mpu_rt_port(oh);
1111 if (!os || !os->addr)
939 return NULL;1112 return NULL;
940 1113
941 do {1114 do {
@@ -944,20 +1117,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) · 2 unmodified lines
944 found = 1;1117 found = 1;
945 } while (!found && mem->pa_start != mem->pa_end);1118 } while (!found && mem->pa_start != mem->pa_end);
946 1119
947 if (found) {1120 return (found) ? mem : NULL;
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;
961}1121}
962 1122
963/**1123/**
@@ -1205,12 +1365,11 @@ static int _wait_target_ready(struct omap_hwmod *oh) · 241 unmodified lines
1205 if (!oh)1365 if (!oh)
1206 return -EINVAL;1366 return -EINVAL;
1207 1367
1208 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)1368 if (oh->flags & HWMOD_NO_IDLEST)
1209 return 0;1369 return 0;
1210 1370
1211 os = oh->slaves[oh->_mpu_port_index];1371 os = _find_mpu_rt_port(oh);
1212 1372 if (!os)
1213 if (oh->flags & HWMOD_NO_IDLEST)
1214 return 0;1373 return 0;
1215 1374
1216 /* XXX check module SIDLEMODE */1375 /* XXX check module SIDLEMODE */
@@ -1377,14 +1536,74 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name) · 160 unmodified lines
1377 }1536 }
1378}1537}
1379 1538
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 */
1549static 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 */
1570static 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
1380/**1599/**
1381 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit1600 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit
1382 * @oh: struct omap_hwmod *1601 * @oh: struct omap_hwmod *
1383 *1602 *
1384 * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be1603 * 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 be1604 * enabled for this to work. Returns -ENOENT if the hwmod cannot be
1386 * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if1605 * reset this way, -EINVAL if the hwmod is in the wrong state,
1387 * the module did not reset in time, or 0 upon success.1606 * -ETIMEDOUT if the module did not reset in time, or 0 upon success.
1388 *1607 *
1389 * In OMAP3 a specific SYSSTATUS register is used to get the reset status.1608 * In OMAP3 a specific SYSSTATUS register is used to get the reset status.
1390 * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead1609 * 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
1401 1620
1402 if (!oh->class->sysc ||1621 if (!oh->class->sysc ||
1403 !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET))1622 !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET))
1404 return -EINVAL;1623 return -ENOENT;
1405 1624
1406 /* clocks must be on for this operation */1625 /* clocks must be on for this operation */
1407 if (oh->_state != _HWMOD_STATE_ENABLED) {1626 if (oh->_state != _HWMOD_STATE_ENABLED) {
@@ -1462,32 +1681,60 @@ dis_opt_clks: · 54 unmodified lines
1462 * _reset - reset an omap_hwmod1681 * _reset - reset an omap_hwmod
1463 * @oh: struct omap_hwmod *1682 * @oh: struct omap_hwmod *
1464 *1683 *
1465 * Resets an omap_hwmod @oh. The default software reset mechanism for1684 * Resets an omap_hwmod @oh. If the module has a custom reset
1466 * most OMAP IP blocks is triggered via the OCP_SYSCONFIG.SOFTRESET1685 * function pointer defined, then call it to reset the IP block, and
1467 * bit. However, some hwmods cannot be reset via this method: some1686 * pass along its return value to the caller. Otherwise, if the IP
1468 * are not targets and therefore have no OCP header registers to1687 * block has an OCP_SYSCONFIG register with a SOFTRESET bitfield
1469 * access; others (like the IVA) have idiosyncratic reset sequences.1688 * associated with it, call a function to reset the IP block via that
1470 * So for these relatively rare cases, custom reset code can be1689 * method, and pass along the return value to the caller. Finally, if
1471 * supplied in the struct omap_hwmod_class .reset function pointer.1690 * the IP block has some hardreset lines associated with it, assert
1472 * Passes along the return value from either _reset() or the custom1691 * all of those, but do _not_ deassert them. (This is because driver
1473 * reset function - these must return -EINVAL if the hwmod cannot be1692 * authors have expressed an apparent requirement to control the
1474 * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if1693 * deassertion of the hardreset lines themselves.)
1475 * the module did not reset in time, or 0 upon success.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.
1476 */1706 */
1477static int _reset(struct omap_hwmod *oh)1707static int _reset(struct omap_hwmod *oh)
1478{1708{
1479 int ret;1709 int i, r;
1480 1710
1481 pr_debug("omap_hwmod: %s: resetting\n", oh->name);1711 pr_debug("omap_hwmod: %s: resetting\n", oh->name);
1482 1712
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 }
1484 1726
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 */
1485 if (oh->class->sysc) {1732 if (oh->class->sysc) {
1486 _update_sysc_cache(oh);1733 _update_sysc_cache(oh);
1487 _enable_sysc(oh);1734 _enable_sysc(oh);
1488 }1735 }
1489 1736
1490 return ret;1737 return r;
1491}1738}
1492 1739
1493/**1740/**
@@ -1506,10 +1753,9 @@ static int _enable(struct omap_hwmod *oh) · 12 unmodified lines
1506 pr_debug("omap_hwmod: %s: enabling\n", oh->name);1753 pr_debug("omap_hwmod: %s: enabling\n", oh->name);
1507 1754
1508 /*1755 /*
1509 * hwmods with HWMOD_INIT_NO_IDLE flag set are left1756 * hwmods with HWMOD_INIT_NO_IDLE flag set are left in enabled
1510 * in enabled state at init.1757 * state at init. Now that someone is really trying to enable
1511 * Now that someone is really trying to enable them,1758 * them, just ensure that the hwmod mux is set.
1512 * just ensure that the hwmod mux is set.
1513 */1759 */
1514 if (oh->_int_flags & _HWMOD_SKIP_ENABLE) {1760 if (oh->_int_flags & _HWMOD_SKIP_ENABLE) {
1515 /*1761 /*
@@ -1532,15 +1778,17 @@ static int _enable(struct omap_hwmod *oh) · 16 unmodified lines
1532 return -EINVAL;1778 return -EINVAL;
1533 }1779 }
1534 1780
1535
1536 /*1781 /*
1537 * If an IP contains only one HW reset line, then de-assert it in order1782 * If an IP block contains HW reset lines and any of them are
1538 * to allow the module state transition. Otherwise the PRCM will return1783 * asserted, we let integration code associated with that
1539 * Intransition status, and the init will failed.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.
1540 */1789 */
1541 if ((oh->_state == _HWMOD_STATE_INITIALIZED ||1790 if (_are_any_hardreset_lines_asserted(oh))
1542 oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1)1791 return 0;
1543 _deassert_hardreset(oh, oh->rst_lines[0].name);
1544 1792
1545 /* Mux pins for device runtime if populated */1793 /* Mux pins for device runtime if populated */
1546 if (oh->mux && (!oh->mux->enabled ||1794 if (oh->mux && (!oh->mux->enabled ||
@@ -1615,6 +1863,9 @@ static int _idle(struct omap_hwmod *oh) · 68 unmodified lines
1615 return -EINVAL;1863 return -EINVAL;
1616 }1864 }
1617 1865
1866 if (_are_any_hardreset_lines_asserted(oh))
1867 return 0;
1868
1618 if (oh->class->sysc)1869 if (oh->class->sysc)
1619 _idle_sysc(oh);1870 _idle_sysc(oh);
1620 _del_initiator_dep(oh, mpu_oh);1871 _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
1687 */1938 */
1688static int _shutdown(struct omap_hwmod *oh)1939static int _shutdown(struct omap_hwmod *oh)
1689{1940{
1690 int ret;1941 int ret, i;
1691 u8 prev_state;1942 u8 prev_state;
1692 1943
1693 if (oh->_state != _HWMOD_STATE_IDLE &&1944 if (oh->_state != _HWMOD_STATE_IDLE &&
@@ -1697,6 +1948,9 @@ static int _shutdown(struct omap_hwmod *oh) · 3 unmodified lines
1697 return -EINVAL;1948 return -EINVAL;
1698 }1949 }
1699 1950
1951 if (_are_any_hardreset_lines_asserted(oh))
1952 return 0;
1953
1700 pr_debug("omap_hwmod: %s: disabling\n", oh->name);1954 pr_debug("omap_hwmod: %s: disabling\n", oh->name);
1701 1955
1702 if (oh->class->pre_shutdown) {1956 if (oh->class->pre_shutdown) {
@@ -1728,12 +1982,8 @@ static int _shutdown(struct omap_hwmod *oh) · 25 unmodified lines
1728 }1982 }
1729 /* XXX Should this code also force-disable the optional clocks? */1983 /* XXX Should this code also force-disable the optional clocks? */
1730 1984
1731 /*1985 for (i = 0; i < oh->rst_lines_cnt; i++)
1732 * If an IP contains only one HW reset line, then assert it1986 _assert_hardreset(oh, oh->rst_lines[i].name);
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);
1737 1987
1738 /* Mux pins to safe mode or use populated off mode values */1988 /* Mux pins to safe mode or use populated off mode values */
1739 if (oh->mux)1989 if (oh->mux)
@@ -1745,59 +1995,186 @@ static int _shutdown(struct omap_hwmod *oh) · 5 unmodified lines
1745}1995}
1746 1996
1747/**1997/**
1748 * _setup - do initial configuration of omap_hwmod1998 * _init_mpu_rt_base - populate the virtual address for a hwmod
1749 * @oh: struct omap_hwmod *1999 * @oh: struct omap_hwmod * to locate the virtual address
1750 *2000 *
1751 * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh2001 * Cache the virtual address used by the MPU to access this IP block's
1752 * OCP_SYSCONFIG register. Returns 0.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.
1753 */2005 */
1754static int _setup(struct omap_hwmod *oh, void *data)2006static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
1755{2007{
1756 int i, r;2008 struct omap_hwmod_addr_space *mem;
1757 u8 postsetup_state;2009 void __iomem *va_start;
2010
2011 if (!oh)
2012 return;
2013
2014 _save_mpu_port_index(oh);
1758 2015
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 */
2051static int __init _init(struct omap_hwmod *oh, void *data)
2052{
2053 int r;
2054
2055 if (oh->_state != _HWMOD_STATE_REGISTERED)
1760 return 0;2056 return 0;
1761 2057
1762 /* Set iclk autoidle mode */2058 _init_mpu_rt_base(oh, NULL);
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;
1767 2059
1768 if (!c)2060 r = _init_clocks(oh, NULL);
1769 continue;2061 if (IS_ERR_VALUE(r)) {
2062 WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
2063 return -EINVAL;
2064 }
1770 2065
1771 if (os->flags & OCPIF_SWSUP_IDLE) {2066 oh->_state = _HWMOD_STATE_INITIALIZED;
1772 /* XXX omap_iclk_deny_idle(c); */2067
1773 } else {2068 return 0;
1774 /* XXX omap_iclk_allow_idle(c); */2069}
1775 clk_enable(c);2070
1776 }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 */
2079static 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);
1777 }2099 }
1778 }2100 }
1779 2101
1780 oh->_state = _HWMOD_STATE_INITIALIZED;2102 return;
2103}
1781 2104
1782 /*2105/**
1783 * In the case of hwmod with hardreset that should not be2106 * _setup_reset - reset an IP block during the setup process
1784 * de-assert at boot time, we have to keep the module2107 * @oh: struct omap_hwmod *
1785 * initialized, because we cannot enable it properly with the2108 *
1786 * reset asserted. Exit without warning because that behavior is2109 * Reset the IP block corresponding to the hwmod @oh during the setup
1787 * expected.2110 * process. The IP block is first enabled so it can be successfully
1788 */2111 * reset. Returns 0 upon success or a negative error code upon
1789 if ((oh->flags & HWMOD_INIT_NO_RESET) && oh->rst_lines_cnt == 1)2112 * failure.
1790 return 0;2113 */
2114static int __init _setup_reset(struct omap_hwmod *oh)
2115{
2116 int r;
1791 2117
1792 r = _enable(oh);2118 if (oh->_state != _HWMOD_STATE_INITIALIZED)
1793 if (r) {2119 return -EINVAL;
1794 pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n",2120
1795 oh->name, oh->_state);2121 if (oh->rst_lines_cnt == 0) {
1796 return 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 }
1797 }2128 }
1798 2129
1799 if (!(oh->flags & HWMOD_INIT_NO_RESET))2130 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 */
2172static void __init _setup_postsetup(struct omap_hwmod *oh)
2173{
2174 u8 postsetup_state;
2175
2176 if (oh->rst_lines_cnt > 0)
2177 return;
1801 2178
1802 postsetup_state = oh->_postsetup_state;2179 postsetup_state = oh->_postsetup_state;
1803 if (postsetup_state == _HWMOD_STATE_UNKNOWN)2180 if (postsetup_state == _HWMOD_STATE_UNKNOWN)
@@ -1821,6 +2198,35 @@ static int _setup(struct omap_hwmod *oh, void *data) · 17 unmodified lines
1821 WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n",2198 WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n",
1822 oh->name, postsetup_state);2199 oh->name, postsetup_state);
1823 2200
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 */
2220static 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
1824 return 0;2230 return 0;
1825}2231}
1826 2232
@@ -1843,8 +2249,6 @@ static int _setup(struct omap_hwmod *oh, void *data) · 16 unmodified lines
1843 */2249 */
1844static int __init _register(struct omap_hwmod *oh)2250static int __init _register(struct omap_hwmod *oh)
1845{2251{
1846 int ms_id;
1847
1848 if (!oh || !oh->name || !oh->class || !oh->class->name ||2252 if (!oh || !oh->name || !oh->class || !oh->class->name ||
1849 (oh->_state != _HWMOD_STATE_UNKNOWN))2253 (oh->_state != _HWMOD_STATE_UNKNOWN))
1850 return -EINVAL;2254 return -EINVAL;
@@ -1854,14 +2258,10 @@ static int __init _register(struct omap_hwmod *oh) · 3 unmodified lines
1854 if (_lookup(oh->name))2258 if (_lookup(oh->name))
1855 return -EEXIST;2259 return -EEXIST;
1856 2260
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
1863 list_add_tail(&oh->node, &omap_hwmod_list);2261 list_add_tail(&oh->node, &omap_hwmod_list);
1864 2262
2263 INIT_LIST_HEAD(&oh->master_ports);
2264 INIT_LIST_HEAD(&oh->slave_ports);
1865 spin_lock_init(&oh->_lock);2265 spin_lock_init(&oh->_lock);
1866 2266
1867 oh->_state = _HWMOD_STATE_REGISTERED;2267 oh->_state = _HWMOD_STATE_REGISTERED;
@@ -1876,6 +2276,160 @@ static int __init _register(struct omap_hwmod *oh) · 8 unmodified lines
1876 return 0;2276 return 0;
1877}2277}
1878 2278
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 */
2292static 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 */
2330static 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 */
2365static 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 */
2408static 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}
1879 2433
1880/* Public functions */2434/* Public functions */
1881 2435
@@ -2004,120 +2558,101 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), · 122 unmodified lines
2004}2558}
2005 2559
2006/**2560/**
2007 * omap_hwmod_register - register an array of hwmods2561 * omap_hwmod_register_links - register an array of hwmod links
2008 * @ohs: pointer to an array of omap_hwmods to register2562 * @ois: pointer to an array of omap_hwmod_ocp_if to register
2009 *2563 *
2010 * Intended to be called early in boot before the clock framework is2564 * Intended to be called early in boot before the clock framework is
2011 * initialized. If @ohs is not null, will register all omap_hwmods2565 * initialized. If @ois is not null, will register all omap_hwmods
2012 * listed in @ohs that are valid for this chip. Returns 0.2566 * listed in @ois that are valid for this chip. Returns 0.
2013 */2567 */
2014int __init omap_hwmod_register(struct omap_hwmod **ohs)2568int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
2015{2569{
2016 int r, i;2570 int r, i;
2017 2571
2018 if (!ohs)2572 if (!ois)
2019 return 0;2573 return 0;
2020 2574
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
2021 i = 0;2582 i = 0;
2022 do {2583 do {
2023 r = _register(ohs[i]);2584 r = _register_link(ois[i]);
2024 WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name,2585 WARN(r && r != -EEXIST,
2025 r);2586 "omap_hwmod: _register_link(%s -> %s) returned %d\n",
2026 } while (ohs[++i]);2587 ois[i]->master->name, ois[i]->slave->name, r);
2588 } while (ois[++i]);
2027 2589
2028 return 0;2590 return 0;
2029}2591}
2030 2592
2031/*2593/**
2032 * _populate_mpu_rt_base - populate the virtual address for a hwmod2594 * _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)
2033 *2596 *
2034 * Must be called only from omap_hwmod_setup_*() so ioremap works properly.2597 * If the hwmod data corresponding to the MPU subsystem IP block
2035 * Assumes the caller takes care of locking if needed.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.
2036 */2602 */
2037static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data)2603static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
2038{2604{
2039 if (oh->_state != _HWMOD_STATE_REGISTERED)2605 if (!mpu_oh || mpu_oh->_state == _HWMOD_STATE_UNKNOWN)
2040 return 0;2606 pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
2041 2607 __func__, MPU_INITIATOR_NAME);
2042 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)2608 else if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh)
2043 return 0;2609 omap_hwmod_setup_one(MPU_INITIATOR_NAME);
2044
2045 oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
2046
2047 return 0;
2048}2610}
2049 2611
2050/**2612/**
2051 * omap_hwmod_setup_one - set up a single hwmod2613 * omap_hwmod_setup_one - set up a single hwmod
2052 * @oh_name: const char * name of the already-registered hwmod to set up2614 * @oh_name: const char * name of the already-registered hwmod to set up
2053 *2615 *
2054 * Must be called after omap2_clk_init(). Resolves the struct clk2616 * Initialize and set up a single hwmod. Intended to be used for a
2055 * names to struct clk pointers for each registered omap_hwmod. Also2617 * small number of early devices, such as the timer IP blocks used for
2056 * calls _setup() on each hwmod. Returns -EINVAL upon error or 0 upon2618 * the scheduler clock. Must be called after omap2_clk_init().
2057 * success.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.
2058 */2622 */
2059int __init omap_hwmod_setup_one(const char *oh_name)2623int __init omap_hwmod_setup_one(const char *oh_name)
2060{2624{
2061 struct omap_hwmod *oh;2625 struct omap_hwmod *oh;
2062 int r;
2063 2626
2064 pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__);2627 pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__);
2065 2628
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
2072 oh = _lookup(oh_name);2629 oh = _lookup(oh_name);
2073 if (!oh) {2630 if (!oh) {
2074 WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name);2631 WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name);
2075 return -EINVAL;2632 return -EINVAL;
2076 }2633 }
2077 2634
2078 if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh)2635 _ensure_mpu_hwmod_is_setup(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 }
2092 2636
2637 _init(oh, NULL);
2093 _setup(oh, NULL);2638 _setup(oh, NULL);
2094 2639
2095 return 0;2640 return 0;
2096}2641}
2097 2642
2098/**2643/**
2099 * omap_hwmod_setup - do some post-clock framework initialization2644 * omap_hwmod_setup_all - set up all registered IP blocks
2100 *2645 *
2101 * Must be called after omap2_clk_init(). Resolves the struct clk names2646 * Initialize and set up all IP blocks registered with the hwmod code.
2102 * to struct clk pointers for each registered omap_hwmod. Also calls2647 * Must be called after omap2_clk_init(). Resolves the struct clk
2103 * _setup() on each hwmod. Returns 0 upon success.2648 * names to struct clk pointers for each registered omap_hwmod. Also
2649 * calls _setup() on each hwmod. Returns 0 upon success.
2104 */2650 */
2105static int __init omap_hwmod_setup_all(void)2651static int __init omap_hwmod_setup_all(void)
2106{2652{
2107 int r;2653 _ensure_mpu_hwmod_is_setup(NULL);
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__);
2120 2654
2655 omap_hwmod_for_each(_init, NULL);
2121 omap_hwmod_for_each(_setup, NULL);2656 omap_hwmod_for_each(_setup, NULL);
2122 2657
2123 return 0;2658 return 0;
@@ -2274,6 +2809,10 @@ int omap_hwmod_reset(struct omap_hwmod *oh) · 150 unmodified lines
2274 return r;2809 return r;
2275}2810}
2276 2811
2812/*
2813 * IP block data retrieval functions
2814 */
2815
2277/**2816/**
2278 * omap_hwmod_count_resources - count number of struct resources needed by hwmod2817 * omap_hwmod_count_resources - count number of struct resources needed by hwmod
2279 * @oh: struct omap_hwmod *2818 * @oh: struct omap_hwmod *
@@ -2292,12 +2831,19 @@ int omap_hwmod_reset(struct omap_hwmod *oh) · 12 unmodified lines
2292 */2831 */
2293int omap_hwmod_count_resources(struct omap_hwmod *oh)2832int omap_hwmod_count_resources(struct omap_hwmod *oh)
2294{2833{
2295 int ret, i;2834 struct omap_hwmod_ocp_if *os;
2835 struct list_head *p;
2836 int ret;
2837 int i = 0;
2296 2838
2297 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);2839 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
2298 2840
2299 for (i = 0; i < oh->slaves_cnt; i++)2841 p = oh->slave_ports.next;
2300 ret += _count_ocp_if_addr_spaces(oh->slaves[i]);2842
2843 while (i < oh->slaves_cnt) {
2844 os = _fetch_next_ocp_if(&p, &i);
2845 ret += _count_ocp_if_addr_spaces(os);
2846 }
2301 2847
2302 return ret;2848 return ret;
2303}2849}
@@ -2314,7 +2860,9 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh) · 10 unmodified lines
2314 */2860 */
2315int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)2861int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2316{2862{
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;
2318 int r = 0;2866 int r = 0;
2319 2867
2320 /* For each IRQ, DMA, memory area, fill in array.*/2868 /* 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
2337 r++;2885 r++;
2338 }2886 }
2339 2887
2340 for (i = 0; i < oh->slaves_cnt; i++) {2888 p = oh->slave_ports.next;
2341 struct omap_hwmod_ocp_if *os;
2342 int addr_cnt;
2343 2889
2344 os = oh->slaves[i];2890 i = 0;
2891 while (i < oh->slaves_cnt) {
2892 os = _fetch_next_ocp_if(&p, &i);
2345 addr_cnt = _count_ocp_if_addr_spaces(os);2893 addr_cnt = _count_ocp_if_addr_spaces(os);
2346 2894
2347 for (j = 0; j < addr_cnt; j++) {2895 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
2356 return r;2904 return r;
2357}2905}
2358 2906
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 */
2929int 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
2359/**2970/**
2360 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain2971 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain
2361 * @oh: struct omap_hwmod *2972 * @oh: struct omap_hwmod *
@@ -2370,6 +2981,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) · 8 unmodified lines
2370struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)2981struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
2371{2982{
2372 struct clk *c;2983 struct clk *c;
2984 struct omap_hwmod_ocp_if *oi;
2373 2985
2374 if (!oh)2986 if (!oh)
2375 return NULL;2987 return NULL;
@@ -2377,9 +2989,10 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) · 1 unmodified line
2377 if (oh->_clk) {2989 if (oh->_clk) {
2378 c = oh->_clk;2990 c = oh->_clk;
2379 } else {2991 } else {
2380 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)2992 oi = _find_mpu_rt_port(oh);
2993 if (!oi)
2381 return NULL;2994 return NULL;
2382 c = oh->slaves[oh->_mpu_port_index]->_clk;2995 c = oi->_clk;
2383 }2996 }
2384 2997
2385 if (!c->clkdm)2998 if (!c->clkdm)
@@ -2653,10 +3266,10 @@ int omap_hwmod_for_each_by_class(const char *classname, · 267 unmodified lines
2653 * @state: state that _setup() should leave the hwmod in3266 * @state: state that _setup() should leave the hwmod in
2654 *3267 *
2655 * Sets the hwmod state that @oh will enter at the end of _setup()3268 * Sets the hwmod state that @oh will enter at the end of _setup()
2656 * (called by omap_hwmod_setup_*()). Only valid to call between3269 * (called by omap_hwmod_setup_*()). See also the documentation
2657 * calling omap_hwmod_register() and omap_hwmod_setup_*(). Returns3270 * for _setup_postsetup(), above. Returns 0 upon success or
2658 * 0 upon success or -EINVAL if there is a problem with the arguments3271 * -EINVAL if there is a problem with the arguments or if the hwmod is
2659 * or if the hwmod is in the wrong state.3272 * in the wrong state.
2660 */3273 */
2661int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state)3274int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state)
2662{3275{
arch/arm/mach-omap2/omap_hwmod_2420_data.c+233−1329
@@ -2,6 +2,7 @@ · 1 unmodified line
2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
3 *3 *
4 * Copyright (C) 2009-2011 Nokia Corporation4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley6 * Paul Walmsley
6 *7 *
7 * This program is free software; you can redistribute it and/or modify8 * This program is free software; you can redistribute it and/or modify
@@ -32,1073 +33,284 @@ · 24 unmodified lines
32/*33/*
33 * OMAP2420 hardware module integration data34 * OMAP2420 hardware module integration data
34 *35 *
35 * ALl of the data in this section should be autogeneratable from the36 * All of the data in this section should be autogeneratable from the
36 * TI hardware database or other technical documentation. Data that37 * TI hardware database or other technical documentation. Data that
37 * is driver-specific or driver-kernel integration-specific belongs38 * is driver-specific or driver-kernel integration-specific belongs
38 * elsewhere.39 * elsewhere.
39 */40 */
40 41
41static struct omap_hwmod omap2420_mpu_hwmod;
42static struct omap_hwmod omap2420_iva_hwmod;
43static struct omap_hwmod omap2420_l3_main_hwmod;
44static struct omap_hwmod omap2420_l4_core_hwmod;
45static struct omap_hwmod omap2420_dss_core_hwmod;
46static struct omap_hwmod omap2420_dss_dispc_hwmod;
47static struct omap_hwmod omap2420_dss_rfbi_hwmod;
48static struct omap_hwmod omap2420_dss_venc_hwmod;
49static struct omap_hwmod omap2420_wd_timer2_hwmod;
50static struct omap_hwmod omap2420_gpio1_hwmod;
51static struct omap_hwmod omap2420_gpio2_hwmod;
52static struct omap_hwmod omap2420_gpio3_hwmod;
53static struct omap_hwmod omap2420_gpio4_hwmod;
54static struct omap_hwmod omap2420_dma_system_hwmod;
55static struct omap_hwmod omap2420_mcspi1_hwmod;
56static struct omap_hwmod omap2420_mcspi2_hwmod;
57
58/* L3 -> L4_CORE interface */
59static 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 */
66static 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 */
73static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
74 &omap2420_mpu__l3_main,
75};
76
77/* DSS -> l3 */
78static 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 */
91static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
92 &omap2420_l3_main__l4_core,
93};
94
95/* L3 */
96static 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
106static struct omap_hwmod omap2420_l4_wkup_hwmod;
107static struct omap_hwmod omap2420_uart1_hwmod;
108static struct omap_hwmod omap2420_uart2_hwmod;
109static struct omap_hwmod omap2420_uart3_hwmod;
110static struct omap_hwmod omap2420_i2c1_hwmod;
111static struct omap_hwmod omap2420_i2c2_hwmod;
112static struct omap_hwmod omap2420_mcbsp1_hwmod;
113static struct omap_hwmod omap2420_mcbsp2_hwmod;
114
115/* l4 core -> mcspi1 interface */
116static 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 */
125static 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 */
134static 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 */
141static 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 */
150static 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 */
159static 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 */
168static 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 */
177static 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 */
186static 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 */
191static 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 */
201static 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 */
212static 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 */
217static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
218};
219
220/* L4 WKUP */
221static 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 */
232static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
233 &omap2420_mpu__l3_main,
234};
235
236/* MPU */
237static 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
245/*42/*
246 * IVA1 interface data43 * IP blocks
247 */44 */
248 45
249/* IVA <- L3 interface */46/* IVA1 (IVA1) */
250static struct omap_hwmod_ocp_if omap2420_l3__iva = {47static struct omap_hwmod_class iva1_hwmod_class = {
251 .master = &omap2420_l3_main_hwmod,48 .name = "iva1",
252 .slave = &omap2420_iva_hwmod,
253 .clk = "iva1_ifck",
254 .user = OCP_USER_MPU | OCP_USER_SDMA,
255};49};
256 50
257static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {51static struct omap_hwmod_rst_info omap2420_iva_resets[] = {
258 &omap2420_l3__iva,52 { .name = "iva", .rst_shift = 8 },
259};53};
260 54
261/*
262 * IVA2 (IVA2)
263 */
264
265static struct omap_hwmod omap2420_iva_hwmod = {55static struct omap_hwmod omap2420_iva_hwmod = {
266 .name = "iva",56 .name = "iva",
267 .class = &iva_hwmod_class,57 .class = &iva1_hwmod_class,
268 .masters = omap2420_iva_masters,58 .clkdm_name = "iva1_clkdm",
269 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),59 .rst_lines = omap2420_iva_resets,
60 .rst_lines_cnt = ARRAY_SIZE(omap2420_iva_resets),
61 .main_clk = "iva1_ifck",
270};62};
271 63
272/* always-on timers dev attribute */64/* DSP */
273static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {65static struct omap_hwmod_class dsp_hwmod_class = {
274 .timer_capability = OMAP_TIMER_ALWON,66 .name = "dsp",
275};67};
276 68
277/* pwm timers dev attribute */69static struct omap_hwmod_rst_info omap2420_dsp_resets[] = {
278static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {70 { .name = "logic", .rst_shift = 0 },
279 .timer_capability = OMAP_TIMER_HAS_PWM,71 { .name = "mmu", .rst_shift = 1 },
280};72};
281 73
282/* timer1 */74static struct omap_hwmod omap2420_dsp_hwmod = {
283static struct omap_hwmod omap2420_timer1_hwmod;75 .name = "dsp",
284 76 .class = &dsp_hwmod_class,
285static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {77 .clkdm_name = "dsp_clkdm",
286 {78 .rst_lines = omap2420_dsp_resets,
287 .pa_start = 0x48028000,79 .rst_lines_cnt = ARRAY_SIZE(omap2420_dsp_resets),
288 .pa_end = 0x48028000 + SZ_1K - 1,80 .main_clk = "dsp_fck",
289 .flags = ADDR_TYPE_RT
290 },
291 { }
292};81};
293 82
294/* l4_wkup -> timer1 */83/* I2C common */
295static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {84static struct omap_hwmod_class_sysconfig i2c_sysc = {
296 .master = &omap2420_l4_wkup_hwmod,85 .rev_offs = 0x00,
297 .slave = &omap2420_timer1_hwmod,86 .sysc_offs = 0x20,
298 .clk = "gpt1_ick",87 .syss_offs = 0x10,
299 .addr = omap2420_timer1_addrs,88 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
300 .user = OCP_USER_MPU | OCP_USER_SDMA,89 .sysc_fields = &omap_hwmod_sysc_type1,
301};
302
303/* timer1 slave port */
304static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
305 &omap2420_l4_wkup__timer1,
306};
307
308/* timer1 hwmod */
309static 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 */
329static struct omap_hwmod omap2420_timer2_hwmod;
330
331/* l4_core -> timer2 */
332static 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 */
341static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
342 &omap2420_l4_core__timer2,
343};
344
345/* timer2 hwmod */
346static 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 */
366static struct omap_hwmod omap2420_timer3_hwmod;
367
368/* l4_core -> timer3 */
369static 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 */
378static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
379 &omap2420_l4_core__timer3,
380};
381
382/* timer3 hwmod */
383static 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 */
403static struct omap_hwmod omap2420_timer4_hwmod;
404
405/* l4_core -> timer4 */
406static 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 */
415static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
416 &omap2420_l4_core__timer4,
417};
418
419/* timer4 hwmod */
420static 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 */
440static struct omap_hwmod omap2420_timer5_hwmod;
441
442/* l4_core -> timer5 */
443static 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 */
452static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
453 &omap2420_l4_core__timer5,
454};
455
456/* timer5 hwmod */
457static 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 */
478static struct omap_hwmod omap2420_timer6_hwmod;
479
480/* l4_core -> timer6 */
481static 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 */
490static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
491 &omap2420_l4_core__timer6,
492};
493
494/* timer6 hwmod */
495static 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,
512};90};
513 91
514/* timer7 */92static struct omap_hwmod_class i2c_class = {
515static struct omap_hwmod omap2420_timer7_hwmod;93 .name = "i2c",
516 94 .sysc = &i2c_sysc,
517/* l4_core -> timer7 */95 .rev = OMAP_I2C_IP_VERSION_1,
518static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {96 .reset = &omap_i2c_reset,
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,
524};97};
525 98
526/* timer7 slave port */99static struct omap_i2c_dev_attr i2c_dev_attr = {
527static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {100 .flags = OMAP_I2C_FLAG_NO_FIFO |
528 &omap2420_l4_core__timer7,101 OMAP_I2C_FLAG_SIMPLE_CLOCK |
102 OMAP_I2C_FLAG_16BIT_DATA_REG |
103 OMAP_I2C_FLAG_BUS_SHIFT_2,
529};104};
530 105
531/* timer7 hwmod */106/* I2C1 */
532static struct omap_hwmod omap2420_timer7_hwmod = {107static struct omap_hwmod omap2420_i2c1_hwmod = {
533 .name = "timer7",108 .name = "i2c1",
534 .mpu_irqs = omap2_timer7_mpu_irqs,109 .mpu_irqs = omap2_i2c1_mpu_irqs,
535 .main_clk = "gpt7_fck",110 .sdma_reqs = omap2_i2c1_sdma_reqs,
111 .main_clk = "i2c1_fck",
536 .prcm = {112 .prcm = {
537 .omap2 = {113 .omap2 = {
538 .prcm_reg_id = 1,
539 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
540 .module_offs = CORE_MOD,114 .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 */
552static struct omap_hwmod omap2420_timer8_hwmod;
553
554/* l4_core -> timer8 */
555static 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 */
564static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
565 &omap2420_l4_core__timer8,
566};
567
568/* timer8 hwmod */
569static 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 = {
575 .prcm_reg_id = 1,115 .prcm_reg_id = 1,
576 .module_bit = OMAP24XX_EN_GPT8_SHIFT,116 .module_bit = OMAP2420_EN_I2C1_SHIFT,
577 .module_offs = CORE_MOD,
578 .idlest_reg_id = 1,117 .idlest_reg_id = 1,
579 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,118 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
580 },119 },
581 },120 },
582 .dev_attr = &capability_alwon_dev_attr,121 .class = &i2c_class,
583 .slaves = omap2420_timer8_slaves,122 .dev_attr = &i2c_dev_attr,
584 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),123 .flags = HWMOD_16BIT_REG,
585 .class = &omap2xxx_timer_hwmod_class,
586};
587
588/* timer9 */
589static struct omap_hwmod omap2420_timer9_hwmod;
590
591/* l4_core -> timer9 */
592static 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 */
601static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
602 &omap2420_l4_core__timer9,
603};124};
604 125
605/* timer9 hwmod */126/* I2C2 */
606static struct omap_hwmod omap2420_timer9_hwmod = {127static struct omap_hwmod omap2420_i2c2_hwmod = {
607 .name = "timer9",128 .name = "i2c2",
608 .mpu_irqs = omap2_timer9_mpu_irqs,129 .mpu_irqs = omap2_i2c2_mpu_irqs,
609 .main_clk = "gpt9_fck",130 .sdma_reqs = omap2_i2c2_sdma_reqs,
131 .main_clk = "i2c2_fck",
610 .prcm = {132 .prcm = {
611 .omap2 = {133 .omap2 = {
612 .prcm_reg_id = 1,
613 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
614 .module_offs = CORE_MOD,134 .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 */
626static struct omap_hwmod omap2420_timer10_hwmod;
627
628/* l4_core -> timer10 */
629static 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 */
638static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
639 &omap2420_l4_core__timer10,
640};
641
642/* timer10 hwmod */
643static 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 = {
649 .prcm_reg_id = 1,135 .prcm_reg_id = 1,
650 .module_bit = OMAP24XX_EN_GPT10_SHIFT,136 .module_bit = OMAP2420_EN_I2C2_SHIFT,
651 .module_offs = CORE_MOD,
652 .idlest_reg_id = 1,137 .idlest_reg_id = 1,
653 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,138 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
654 },139 },
655 },140 },
656 .dev_attr = &capability_pwm_dev_attr,141 .class = &i2c_class,
657 .slaves = omap2420_timer10_slaves,142 .dev_attr = &i2c_dev_attr,
658 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),143 .flags = HWMOD_16BIT_REG,
659 .class = &omap2xxx_timer_hwmod_class,
660};
661
662/* timer11 */
663static struct omap_hwmod omap2420_timer11_hwmod;
664
665/* l4_core -> timer11 */
666static 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 */
675static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
676 &omap2420_l4_core__timer11,
677};144};
678 145
679/* timer11 hwmod */146/* dma attributes */
680static struct omap_hwmod omap2420_timer11_hwmod = {147static struct omap_dma_dev_attr dma_dev_attr = {
681 .name = "timer11",148 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
682 .mpu_irqs = omap2_timer11_mpu_irqs,149 IS_CSSA_32 | IS_CDSA_32,
683 .main_clk = "gpt11_fck",150 .lch_count = 32,
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,
697};151};
698 152
699/* timer12 */153static struct omap_hwmod omap2420_dma_system_hwmod = {
700static struct omap_hwmod omap2420_timer12_hwmod;154 .name = "dma",
701 155 .class = &omap2xxx_dma_hwmod_class,
702/* l4_core -> timer12 */156 .mpu_irqs = omap2_dma_system_irqs,
703static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {157 .main_clk = "core_l3_ck",
704 .master = &omap2420_l4_core_hwmod,158 .dev_attr = &dma_dev_attr,
705 .slave = &omap2420_timer12_hwmod,159 .flags = HWMOD_NO_IDLEST,
706 .clk = "gpt12_ick",
707 .addr = omap2xxx_timer12_addrs,
708 .user = OCP_USER_MPU | OCP_USER_SDMA,
709};160};
710 161
711/* timer12 slave port */162/* mailbox */
712static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {163static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
713 &omap2420_l4_core__timer12,164 { .name = "dsp", .irq = 26 },
165 { .name = "iva", .irq = 34 },
166 { .irq = -1 }
714};167};
715 168
716/* timer12 hwmod */169static struct omap_hwmod omap2420_mailbox_hwmod = {
717static struct omap_hwmod omap2420_timer12_hwmod = {170 .name = "mailbox",
718 .name = "timer12",171 .class = &omap2xxx_mailbox_hwmod_class,
719 .mpu_irqs = omap2xxx_timer12_mpu_irqs,172 .mpu_irqs = omap2420_mailbox_irqs,
720 .main_clk = "gpt12_fck",173 .main_clk = "mailboxes_ick",
721 .prcm = {174 .prcm = {
722 .omap2 = {175 .omap2 = {
723 .prcm_reg_id = 1,176 .prcm_reg_id = 1,
724 .module_bit = OMAP24XX_EN_GPT12_SHIFT,177 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
725 .module_offs = CORE_MOD,178 .module_offs = CORE_MOD,
726 .idlest_reg_id = 1,179 .idlest_reg_id = 1,
727 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,180 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
728 },181 },
729 },182 },
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 */
737static 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 { }
744};183};
745 184
746static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {185/*
747 .master = &omap2420_l4_wkup_hwmod,186 * 'mcbsp' class
748 .slave = &omap2420_wd_timer2_hwmod,187 * multi channel buffered serial port controller
749 .clk = "mpu_wdt_ick",188 */
750 .addr = omap2420_wd_timer2_addrs,
751 .user = OCP_USER_MPU | OCP_USER_SDMA,
752};
753
754/* wd_timer2 */
755static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
756 &omap2420_l4_wkup__wd_timer2,
757};
758 189
759static struct omap_hwmod omap2420_wd_timer2_hwmod = {190static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
760 .name = "wd_timer2",191 .name = "mcbsp",
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),
774};192};
775 193
776/* UART1 */194/* mcbsp1 */
777 195static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
778static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {196 { .name = "tx", .irq = 59 },
779 &omap2_l4_core__uart1,197 { .name = "rx", .irq = 60 },
198 { .irq = -1 }
780};199};
781 200
782static struct omap_hwmod omap2420_uart1_hwmod = {201static struct omap_hwmod omap2420_mcbsp1_hwmod = {
783 .name = "uart1",202 .name = "mcbsp1",
784 .mpu_irqs = omap2_uart1_mpu_irqs,203 .class = &omap2420_mcbsp_hwmod_class,
785 .sdma_reqs = omap2_uart1_sdma_reqs,204 .mpu_irqs = omap2420_mcbsp1_irqs,
786 .main_clk = "uart1_fck",205 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
206 .main_clk = "mcbsp1_fck",
787 .prcm = {207 .prcm = {
788 .omap2 = {208 .omap2 = {
789 .module_offs = CORE_MOD,
790 .prcm_reg_id = 1,209 .prcm_reg_id = 1,
791 .module_bit = OMAP24XX_EN_UART1_SHIFT,210 .module_bit = OMAP24XX_EN_MCBSP1_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
803static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
804 &omap2_l4_core__uart2,
805};
806
807static 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 = {
814 .module_offs = CORE_MOD,211 .module_offs = CORE_MOD,
815 .prcm_reg_id = 1,
816 .module_bit = OMAP24XX_EN_UART2_SHIFT,
817 .idlest_reg_id = 1,212 .idlest_reg_id = 1,
818 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,213 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_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
828static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
829 &omap2_l4_core__uart3,
830};
831
832static 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,
844 },214 },
845 },215 },
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 */
853static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
854 &omap2420_dss__l3,
855};216};
856 217
857/* l4_core -> dss */218/* mcbsp2 */
858static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {219static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
859 .master = &omap2420_l4_core_hwmod,220 { .name = "tx", .irq = 62 },
860 .slave = &omap2420_dss_core_hwmod,221 { .name = "rx", .irq = 63 },
861 .clk = "dss_ick",222 { .irq = -1 }
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 */
873static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
874 &omap2420_l4_core__dss,
875};
876
877static 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" },
884};223};
885 224
886static struct omap_hwmod omap2420_dss_core_hwmod = {225static struct omap_hwmod omap2420_mcbsp2_hwmod = {
887 .name = "dss_core",226 .name = "mcbsp2",
888 .class = &omap2_dss_hwmod_class,227 .class = &omap2420_mcbsp_hwmod_class,
889 .main_clk = "dss1_fck", /* instead of dss_fck */228 .mpu_irqs = omap2420_mcbsp2_irqs,
890 .sdma_reqs = omap2xxx_dss_sdma_chs,229 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
230 .main_clk = "mcbsp2_fck",
891 .prcm = {231 .prcm = {
892 .omap2 = {232 .omap2 = {
893 .prcm_reg_id = 1,233 .prcm_reg_id = 1,
894 .module_bit = OMAP24XX_EN_DSS1_SHIFT,234 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
895 .module_offs = CORE_MOD,235 .module_offs = CORE_MOD,
896 .idlest_reg_id = 1,236 .idlest_reg_id = 1,
897 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,237 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
898 },238 },
899 },239 },
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,
907};240};
908 241
909/* l4_core -> dss_dispc */242/*
910static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {243 * interfaces
911 .master = &omap2420_l4_core_hwmod,244 */
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 */
925static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
926 &omap2420_l4_core__dss_dispc,
927};
928
929static 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};
948 245
949/* l4_core -> dss_rfbi */246/* L4 CORE -> I2C1 interface */
950static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {247static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
951 .master = &omap2420_l4_core_hwmod,248 .master = &omap2xxx_l4_core_hwmod,
952 .slave = &omap2420_dss_rfbi_hwmod,249 .slave = &omap2420_i2c1_hwmod,
953 .clk = "dss_ick",250 .clk = "i2c1_ick",
954 .addr = omap2_dss_rfbi_addrs,251 .addr = omap2_i2c1_addr_space,
955 .fw = {
956 .omap2 = {
957 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
958 .flags = OMAP_FIREWALL_L4,
959 }
960 },
961 .user = OCP_USER_MPU | OCP_USER_SDMA,252 .user = OCP_USER_MPU | OCP_USER_SDMA,
962};253};
963 254
964/* dss_rfbi slave ports */255/* L4 CORE -> I2C2 interface */
965static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {256static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
966 &omap2420_l4_core__dss_rfbi,257 .master = &omap2xxx_l4_core_hwmod,
967};258 .slave = &omap2420_i2c2_hwmod,
968 259 .clk = "i2c2_ick",
969static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {260 .addr = omap2_i2c2_addr_space,
970 { .role = "ick", .clk = "dss_ick" },
971};
972
973static 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 */
992static 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 },
1003 .user = OCP_USER_MPU | OCP_USER_SDMA,261 .user = OCP_USER_MPU | OCP_USER_SDMA,
1004};262};
1005 263
1006/* dss_venc slave ports */264/* IVA <- L3 interface */
1007static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {265static struct omap_hwmod_ocp_if omap2420_l3__iva = {
1008 &omap2420_l4_core__dss_venc,266 .master = &omap2xxx_l3_main_hwmod,
1009};267 .slave = &omap2420_iva_hwmod,
1010 268 .clk = "core_l3_ck",
1011static struct omap_hwmod omap2420_dss_venc_hwmod = {269 .user = OCP_USER_MPU | OCP_USER_SDMA,
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 */
1028static 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
1036static 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
1043static 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
1052static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1053 &omap2420_l4_core__i2c1,
1054};
1055
1056static 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,
1075};270};
1076 271
1077/* I2C2 */272/* DSP <- L3 interface */
273static 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};
1078 279
1079static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {280static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
1080 &omap2420_l4_core__i2c2,281 {
282 .pa_start = 0x48028000,
283 .pa_end = 0x48028000 + SZ_1K - 1,
284 .flags = ADDR_TYPE_RT
285 },
286 { }
1081};287};
1082 288
1083static struct omap_hwmod omap2420_i2c2_hwmod = {289/* l4_wkup -> timer1 */
1084 .name = "i2c2",290static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
1085 .mpu_irqs = omap2_i2c2_mpu_irqs,291 .master = &omap2xxx_l4_wkup_hwmod,
1086 .sdma_reqs = omap2_i2c2_sdma_reqs,292 .slave = &omap2xxx_timer1_hwmod,
1087 .main_clk = "i2c2_fck",293 .clk = "gpt1_ick",
1088 .prcm = {294 .addr = omap2420_timer1_addrs,
1089 .omap2 = {295 .user = OCP_USER_MPU | OCP_USER_SDMA,
1090 .module_offs = CORE_MOD,296};
1091 .prcm_reg_id = 1,297
1092 .module_bit = OMAP2420_EN_I2C2_SHIFT,298/* l4_wkup -> wd_timer2 */
1093 .idlest_reg_id = 1,299static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
1094 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,300 {
1095 },301 .pa_start = 0x48022000,
302 .pa_end = 0x4802207f,
303 .flags = ADDR_TYPE_RT
1096 },304 },
1097 .slaves = omap2420_i2c2_slaves,305 { }
1098 .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),306};
1099 .class = &i2c_class,307
1100 .dev_attr = &i2c_dev_attr,308static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
1101 .flags = HWMOD_16BIT_REG,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,
1102};314};
1103 315
1104/* l4_wkup -> gpio1 */316/* l4_wkup -> gpio1 */
@@ -1112,8 +324,8 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { · 7 unmodified lines
1112};324};
1113 325
1114static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {326static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1115 .master = &omap2420_l4_wkup_hwmod,327 .master = &omap2xxx_l4_wkup_hwmod,
1116 .slave = &omap2420_gpio1_hwmod,328 .slave = &omap2xxx_gpio1_hwmod,
1117 .clk = "gpios_ick",329 .clk = "gpios_ick",
1118 .addr = omap2420_gpio1_addr_space,330 .addr = omap2420_gpio1_addr_space,
1119 .user = OCP_USER_MPU | OCP_USER_SDMA,331 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1130,8 +342,8 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = { · 10 unmodified lines
1130};342};
1131 343
1132static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {344static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1133 .master = &omap2420_l4_wkup_hwmod,345 .master = &omap2xxx_l4_wkup_hwmod,
1134 .slave = &omap2420_gpio2_hwmod,346 .slave = &omap2xxx_gpio2_hwmod,
1135 .clk = "gpios_ick",347 .clk = "gpios_ick",
1136 .addr = omap2420_gpio2_addr_space,348 .addr = omap2420_gpio2_addr_space,
1137 .user = OCP_USER_MPU | OCP_USER_SDMA,349 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1148,8 +360,8 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = { · 10 unmodified lines
1148};360};
1149 361
1150static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {362static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1151 .master = &omap2420_l4_wkup_hwmod,363 .master = &omap2xxx_l4_wkup_hwmod,
1152 .slave = &omap2420_gpio3_hwmod,364 .slave = &omap2xxx_gpio3_hwmod,
1153 .clk = "gpios_ick",365 .clk = "gpios_ick",
1154 .addr = omap2420_gpio3_addr_space,366 .addr = omap2420_gpio3_addr_space,
1155 .user = OCP_USER_MPU | OCP_USER_SDMA,367 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1166,408 +378,100 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = { · 10 unmodified lines
1166};378};
1167 379
1168static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {380static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1169 .master = &omap2420_l4_wkup_hwmod,381 .master = &omap2xxx_l4_wkup_hwmod,
1170 .slave = &omap2420_gpio4_hwmod,382 .slave = &omap2xxx_gpio4_hwmod,
1171 .clk = "gpios_ick",383 .clk = "gpios_ick",
1172 .addr = omap2420_gpio4_addr_space,384 .addr = omap2420_gpio4_addr_space,
1173 .user = OCP_USER_MPU | OCP_USER_SDMA,385 .user = OCP_USER_MPU | OCP_USER_SDMA,
1174};386};
1175 387
1176/* gpio dev_attr */
1177static struct omap_gpio_dev_attr gpio_dev_attr = {
1178 .bank_width = 32,
1179 .dbck_flag = false,
1180};
1181
1182/* gpio1 */
1183static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1184 &omap2420_l4_wkup__gpio1,
1185};
1186
1187static 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 */
1208static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1209 &omap2420_l4_wkup__gpio2,
1210};
1211
1212static 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 */
1233static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1234 &omap2420_l4_wkup__gpio3,
1235};
1236
1237static 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 */
1258static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1259 &omap2420_l4_wkup__gpio4,
1260};
1261
1262static 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 */
1283static 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
1289/* dma_system -> L3 */388/* dma_system -> L3 */
1290static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {389static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1291 .master = &omap2420_dma_system_hwmod,390 .master = &omap2420_dma_system_hwmod,
1292 .slave = &omap2420_l3_main_hwmod,391 .slave = &omap2xxx_l3_main_hwmod,
1293 .clk = "core_l3_ck",392 .clk = "core_l3_ck",
1294 .user = OCP_USER_MPU | OCP_USER_SDMA,393 .user = OCP_USER_MPU | OCP_USER_SDMA,
1295};394};
1296 395
1297/* dma_system master ports */
1298static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1299 &omap2420_dma_system__l3,
1300};
1301
1302/* l4_core -> dma_system */396/* l4_core -> dma_system */
1303static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {397static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1304 .master = &omap2420_l4_core_hwmod,398 .master = &omap2xxx_l4_core_hwmod,
1305 .slave = &omap2420_dma_system_hwmod,399 .slave = &omap2420_dma_system_hwmod,
1306 .clk = "sdma_ick",400 .clk = "sdma_ick",
1307 .addr = omap2_dma_system_addrs,401 .addr = omap2_dma_system_addrs,
1308 .user = OCP_USER_MPU | OCP_USER_SDMA,402 .user = OCP_USER_MPU | OCP_USER_SDMA,
1309};403};
1310 404
1311/* dma_system slave ports */
1312static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1313 &omap2420_l4_core__dma_system,
1314};
1315
1316static 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 */
1330static struct omap_hwmod omap2420_mailbox_hwmod;
1331static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1332 { .name = "dsp", .irq = 26 },
1333 { .name = "iva", .irq = 34 },
1334 { .irq = -1 }
1335};
1336
1337/* l4_core -> mailbox */405/* l4_core -> mailbox */
1338static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {406static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1339 .master = &omap2420_l4_core_hwmod,407 .master = &omap2xxx_l4_core_hwmod,
1340 .slave = &omap2420_mailbox_hwmod,408 .slave = &omap2420_mailbox_hwmod,
1341 .addr = omap2_mailbox_addrs,409 .addr = omap2_mailbox_addrs,
1342 .user = OCP_USER_MPU | OCP_USER_SDMA,410 .user = OCP_USER_MPU | OCP_USER_SDMA,
1343};411};
1344 412
1345/* mailbox slave ports */
1346static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1347 &omap2420_l4_core__mailbox,
1348};
1349
1350static 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 */
1369static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1370 &omap2420_l4_core__mcspi1,
1371};
1372
1373static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1374 .num_chipselect = 4,
1375};
1376
1377static 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 */
1398static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1399 &omap2420_l4_core__mcspi2,
1400};
1401
1402static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1403 .num_chipselect = 2,
1404};
1405
1406static 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
1431static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1432 .name = "mcbsp",
1433};
1434
1435/* mcbsp1 */
1436static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1437 { .name = "tx", .irq = 59 },
1438 { .name = "rx", .irq = 60 },
1439 { .irq = -1 }
1440};
1441
1442/* l4_core -> mcbsp1 */413/* l4_core -> mcbsp1 */
1443static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {414static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1444 .master = &omap2420_l4_core_hwmod,415 .master = &omap2xxx_l4_core_hwmod,
1445 .slave = &omap2420_mcbsp1_hwmod,416 .slave = &omap2420_mcbsp1_hwmod,
1446 .clk = "mcbsp1_ick",417 .clk = "mcbsp1_ick",
1447 .addr = omap2_mcbsp1_addrs,418 .addr = omap2_mcbsp1_addrs,
1448 .user = OCP_USER_MPU | OCP_USER_SDMA,419 .user = OCP_USER_MPU | OCP_USER_SDMA,
1449};420};
1450 421
1451/* mcbsp1 slave ports */
1452static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1453 &omap2420_l4_core__mcbsp1,
1454};
1455
1456static 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 */
1476static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1477 { .name = "tx", .irq = 62 },
1478 { .name = "rx", .irq = 63 },
1479 { .irq = -1 }
1480};
1481
1482/* l4_core -> mcbsp2 */422/* l4_core -> mcbsp2 */
1483static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {423static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1484 .master = &omap2420_l4_core_hwmod,424 .master = &omap2xxx_l4_core_hwmod,
1485 .slave = &omap2420_mcbsp2_hwmod,425 .slave = &omap2420_mcbsp2_hwmod,
1486 .clk = "mcbsp2_ick",426 .clk = "mcbsp2_ick",
1487 .addr = omap2xxx_mcbsp2_addrs,427 .addr = omap2xxx_mcbsp2_addrs,
1488 .user = OCP_USER_MPU | OCP_USER_SDMA,428 .user = OCP_USER_MPU | OCP_USER_SDMA,
1489};429};
1490 430
1491/* mcbsp2 slave ports */431static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
1492static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {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,
1493 &omap2420_l4_core__mcbsp2,470 &omap2420_l4_core__mcbsp2,
1494};
1495
1496static 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
1515static __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,
1567 NULL,471 NULL,
1568};472};
1569 473
1570int __init omap2420_hwmod_init(void)474int __init omap2420_hwmod_init(void)
1571{475{
1572 return omap_hwmod_register(omap2420_hwmods);476 return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs);
1573}477}
arch/arm/mach-omap2/omap_hwmod_2430_data.c+569−1746
@@ -2,6 +2,7 @@ · 1 unmodified line
2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
3 *3 *
4 * Copyright (C) 2009-2011 Nokia Corporation4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley6 * Paul Walmsley
6 *7 *
7 * This program is free software; you can redistribute it and/or modify8 * This program is free software; you can redistribute it and/or modify
@@ -33,777 +34,600 @@ · 25 unmodified lines
33/*34/*
34 * OMAP2430 hardware module integration data35 * OMAP2430 hardware module integration data
35 *36 *
36 * ALl of the data in this section should be autogeneratable from the37 * All of the data in this section should be autogeneratable from the
37 * TI hardware database or other technical documentation. Data that38 * TI hardware database or other technical documentation. Data that
38 * is driver-specific or driver-kernel integration-specific belongs39 * is driver-specific or driver-kernel integration-specific belongs
39 * elsewhere.40 * elsewhere.
40 */41 */
41 42
42static struct omap_hwmod omap2430_mpu_hwmod;43/*
43static struct omap_hwmod omap2430_iva_hwmod;44 * IP blocks
44static struct omap_hwmod omap2430_l3_main_hwmod;45 */
45static struct omap_hwmod omap2430_l4_core_hwmod;
46static struct omap_hwmod omap2430_dss_core_hwmod;
47static struct omap_hwmod omap2430_dss_dispc_hwmod;
48static struct omap_hwmod omap2430_dss_rfbi_hwmod;
49static struct omap_hwmod omap2430_dss_venc_hwmod;
50static struct omap_hwmod omap2430_wd_timer2_hwmod;
51static struct omap_hwmod omap2430_gpio1_hwmod;
52static struct omap_hwmod omap2430_gpio2_hwmod;
53static struct omap_hwmod omap2430_gpio3_hwmod;
54static struct omap_hwmod omap2430_gpio4_hwmod;
55static struct omap_hwmod omap2430_gpio5_hwmod;
56static struct omap_hwmod omap2430_dma_system_hwmod;
57static struct omap_hwmod omap2430_mcbsp1_hwmod;
58static struct omap_hwmod omap2430_mcbsp2_hwmod;
59static struct omap_hwmod omap2430_mcbsp3_hwmod;
60static struct omap_hwmod omap2430_mcbsp4_hwmod;
61static struct omap_hwmod omap2430_mcbsp5_hwmod;
62static struct omap_hwmod omap2430_mcspi1_hwmod;
63static struct omap_hwmod omap2430_mcspi2_hwmod;
64static struct omap_hwmod omap2430_mcspi3_hwmod;
65static struct omap_hwmod omap2430_mmc1_hwmod;
66static struct omap_hwmod omap2430_mmc2_hwmod;
67
68/* L3 -> L4_CORE interface */
69static 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};
74 46
75/* MPU -> L3 interface */47/* IVA2 (IVA2) */
76static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {48static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
77 .master = &omap2430_mpu_hwmod,49 { .name = "logic", .rst_shift = 0 },
78 .slave = &omap2430_l3_main_hwmod,50 { .name = "mmu", .rst_shift = 1 },
79 .user = OCP_USER_MPU,
80};51};
81 52
82/* Slave interfaces on the L3 interconnect */53static struct omap_hwmod omap2430_iva_hwmod = {
83static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {54 .name = "iva",
84 &omap2430_mpu__l3_main,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",
85};60};
86 61
87/* DSS -> l3 */62/* I2C common */
88static struct omap_hwmod_ocp_if omap2430_dss__l3 = {63static struct omap_hwmod_class_sysconfig i2c_sysc = {
89 .master = &omap2430_dss_core_hwmod,64 .rev_offs = 0x00,
90 .slave = &omap2430_l3_main_hwmod,65 .sysc_offs = 0x20,
91 .fw = {66 .syss_offs = 0x10,
92 .omap2 = {67 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
93 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,68 SYSS_HAS_RESET_STATUS),
94 .flags = OMAP_FIREWALL_L3,69 .sysc_fields = &omap_hwmod_sysc_type1,
95 }
96 },
97 .user = OCP_USER_MPU | OCP_USER_SDMA,
98};70};
99 71
100/* Master interfaces on the L3 interconnect */72static struct omap_hwmod_class i2c_class = {
101static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {73 .name = "i2c",
102 &omap2430_l3_main__l4_core,74 .sysc = &i2c_sysc,
75 .rev = OMAP_I2C_IP_VERSION_1,
76 .reset = &omap_i2c_reset,
103};77};
104 78
105/* L3 */79static struct omap_i2c_dev_attr i2c_dev_attr = {
106static struct omap_hwmod omap2430_l3_main_hwmod = {80 .fifo_depth = 8, /* bytes */
107 .name = "l3_main",81 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
108 .class = &l3_hwmod_class,82 OMAP_I2C_FLAG_BUS_SHIFT_2 |
109 .masters = omap2430_l3_main_masters,83 OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
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,
114};84};
115 85
116static struct omap_hwmod omap2430_l4_wkup_hwmod;86/* I2C1 */
117static struct omap_hwmod omap2430_uart1_hwmod;87static struct omap_hwmod omap2430_i2c1_hwmod = {
118static struct omap_hwmod omap2430_uart2_hwmod;88 .name = "i2c1",
119static struct omap_hwmod omap2430_uart3_hwmod;89 .flags = HWMOD_16BIT_REG,
120static struct omap_hwmod omap2430_i2c1_hwmod;90 .mpu_irqs = omap2_i2c1_mpu_irqs,
121static struct omap_hwmod omap2430_i2c2_hwmod;91 .sdma_reqs = omap2_i2c1_sdma_reqs,
122 92 .main_clk = "i2chs1_fck",
123static struct omap_hwmod omap2430_usbhsotg_hwmod;93 .prcm = {
124 94 .omap2 = {
125/* l3_core -> usbhsotg interface */95 /*
126static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {96 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
127 .master = &omap2430_usbhsotg_hwmod,97 * I2CHS IP's do not follow the usual pattern.
128 .slave = &omap2430_l3_main_hwmod,98 * prcm_reg_id alone cannot be used to program
129 .clk = "core_l3_ck",99 * the iclk and fclk. Needs to be handled using
130 .user = OCP_USER_MPU,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,
131};112};
132 113
133/* L4 CORE -> I2C1 interface */114/* I2C2 */
134static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {115static struct omap_hwmod omap2430_i2c2_hwmod = {
135 .master = &omap2430_l4_core_hwmod,116 .name = "i2c2",
136 .slave = &omap2430_i2c1_hwmod,117 .flags = HWMOD_16BIT_REG,
137 .clk = "i2c1_ick",118 .mpu_irqs = omap2_i2c2_mpu_irqs,
138 .addr = omap2_i2c1_addr_space,119 .sdma_reqs = omap2_i2c2_sdma_reqs,
139 .user = OCP_USER_MPU | OCP_USER_SDMA,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,
140};132};
141 133
142/* L4 CORE -> I2C2 interface */134/* gpio5 */
143static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {135static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
144 .master = &omap2430_l4_core_hwmod,136 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
145 .slave = &omap2430_i2c2_hwmod,137 { .irq = -1 }
146 .clk = "i2c2_ick",
147 .addr = omap2_i2c2_addr_space,
148 .user = OCP_USER_MPU | OCP_USER_SDMA,
149};138};
150 139
151/* L4_CORE -> L4_WKUP interface */140static struct omap_hwmod omap2430_gpio5_hwmod = {
152static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {141 .name = "gpio5",
153 .master = &omap2430_l4_core_hwmod,142 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
154 .slave = &omap2430_l4_wkup_hwmod,143 .mpu_irqs = omap243x_gpio5_irqs,
155 .user = OCP_USER_MPU | OCP_USER_SDMA,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,
156};156};
157 157
158/* L4 CORE -> UART1 interface */158/* dma attributes */
159static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {159static struct omap_dma_dev_attr dma_dev_attr = {
160 .master = &omap2430_l4_core_hwmod,160 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
161 .slave = &omap2430_uart1_hwmod,161 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
162 .clk = "uart1_ick",162 .lch_count = 32,
163 .addr = omap2xxx_uart1_addr_space,
164 .user = OCP_USER_MPU | OCP_USER_SDMA,
165};163};
166 164
167/* L4 CORE -> UART2 interface */165static struct omap_hwmod omap2430_dma_system_hwmod = {
168static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {166 .name = "dma",
169 .master = &omap2430_l4_core_hwmod,167 .class = &omap2xxx_dma_hwmod_class,
170 .slave = &omap2430_uart2_hwmod,168 .mpu_irqs = omap2_dma_system_irqs,
171 .clk = "uart2_ick",169 .main_clk = "core_l3_ck",
172 .addr = omap2xxx_uart2_addr_space,170 .dev_attr = &dma_dev_attr,
173 .user = OCP_USER_MPU | OCP_USER_SDMA,171 .flags = HWMOD_NO_IDLEST,
174};172};
175 173
176/* L4 PER -> UART3 interface */174/* mailbox */
177static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {175static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
178 .master = &omap2430_l4_core_hwmod,176 { .irq = 26 },
179 .slave = &omap2430_uart3_hwmod,177 { .irq = -1 }
180 .clk = "uart3_ick",
181 .addr = omap2xxx_uart3_addr_space,
182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};178};
184 179
185/*180static struct omap_hwmod omap2430_mailbox_hwmod = {
186* usbhsotg interface data181 .name = "mailbox",
187*/182 .class = &omap2xxx_mailbox_hwmod_class,
188static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {183 .mpu_irqs = omap2430_mailbox_irqs,
189 {184 .main_clk = "mailboxes_ick",
190 .pa_start = OMAP243X_HS_BASE,185 .prcm = {
191 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,186 .omap2 = {
192 .flags = ADDR_TYPE_RT187 .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 },
193 },193 },
194 { }
195};194};
196 195
197/* l4_core ->usbhsotg interface */196/* mcspi3 */
198static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {197static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
199 .master = &omap2430_l4_core_hwmod,198 { .irq = 91 },
200 .slave = &omap2430_usbhsotg_hwmod,199 { .irq = -1 }
201 .clk = "usb_l4_ick",
202 .addr = omap2430_usbhsotg_addrs,
203 .user = OCP_USER_MPU,
204};200};
205 201
206static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {202static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
207 &omap2430_usbhsotg__l3,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 }
208};208};
209 209
210static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {210static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
211 &omap2430_l4_core__usbhsotg,211 .num_chipselect = 2,
212};212};
213 213
214/* L4 CORE -> MMC1 interface */214static struct omap_hwmod omap2430_mcspi3_hwmod = {
215static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {215 .name = "mcspi3",
216 .master = &omap2430_l4_core_hwmod,216 .mpu_irqs = omap2430_mcspi3_mpu_irqs,
217 .slave = &omap2430_mmc1_hwmod,217 .sdma_reqs = omap2430_mcspi3_sdma_reqs,
218 .clk = "mmchs1_ick",218 .main_clk = "mcspi3_fck",
219 .addr = omap2430_mmc1_addr_space,219 .prcm = {
220 .user = OCP_USER_MPU | OCP_USER_SDMA,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,
221};230};
222 231
223/* L4 CORE -> MMC2 interface */232/* usbhsotg */
224static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {233static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
225 .master = &omap2430_l4_core_hwmod,234 .rev_offs = 0x0400,
226 .slave = &omap2430_mmc2_hwmod,235 .sysc_offs = 0x0404,
227 .clk = "mmchs2_ick",236 .syss_offs = 0x0408,
228 .addr = omap2430_mmc2_addr_space,237 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
229 .user = OCP_USER_MPU | OCP_USER_SDMA,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,
230};243};
231 244
232/* Slave interfaces on the L4_CORE interconnect */245static struct omap_hwmod_class usbotg_class = {
233static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {246 .name = "usbotg",
234 &omap2430_l3_main__l4_core,247 .sysc = &omap2430_usbhsotg_sysc,
235};248};
236 249
237/* Master interfaces on the L4_CORE interconnect */250/* usb_otg_hs */
238static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {251static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
239 &omap2430_l4_core__l4_wkup,
240 &omap2430_l4_core__mmc1,
241 &omap2430_l4_core__mmc2,
242};
243 252
244/* L4 CORE */253 { .name = "mc", .irq = 92 },
245static struct omap_hwmod omap2430_l4_core_hwmod = {254 { .name = "dma", .irq = 93 },
246 .name = "l4_core",255 { .irq = -1 }
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};256};
254 257
255/* Slave interfaces on the L4_WKUP interconnect */258static struct omap_hwmod omap2430_usbhsotg_hwmod = {
256static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {259 .name = "usb_otg_hs",
257 &omap2430_l4_core__l4_wkup,260 .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
258 &omap2_l4_core__uart1,261 .main_clk = "usbhs_ick",
259 &omap2_l4_core__uart2,262 .prcm = {
260 &omap2_l4_core__uart3,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,
261};279};
262 280
263/* Master interfaces on the L4_WKUP interconnect */281/*
264static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {282 * 'mcbsp' class
265};283 * multi channel buffered serial port controller
284 */
266 285
267/* l4 core -> mcspi1 interface */286static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
268static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {287 .rev_offs = 0x007C,
269 .master = &omap2430_l4_core_hwmod,288 .sysc_offs = 0x008C,
270 .slave = &omap2430_mcspi1_hwmod,289 .sysc_flags = (SYSC_HAS_SOFTRESET),
271 .clk = "mcspi1_ick",290 .sysc_fields = &omap_hwmod_sysc_type1,
272 .addr = omap2_mcspi1_addr_space,
273 .user = OCP_USER_MPU | OCP_USER_SDMA,
274};291};
275 292
276/* l4 core -> mcspi2 interface */293static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
277static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {294 .name = "mcbsp",
278 .master = &omap2430_l4_core_hwmod,295 .sysc = &omap2430_mcbsp_sysc,
279 .slave = &omap2430_mcspi2_hwmod,296 .rev = MCBSP_CONFIG_TYPE2,
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 */
286static 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 */
295static 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 */
306static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
307 &omap2430_mpu__l3_main,
308};
309
310/* MPU */
311static 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 */
324static 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
331static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
332 &omap2430_l3__iva,
333};
334
335/*
336 * IVA2 (IVA2)
337 */
338
339static 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 */
347static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
348 .timer_capability = OMAP_TIMER_ALWON,
349};
350
351/* pwm timers dev attribute */
352static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
353 .timer_capability = OMAP_TIMER_HAS_PWM,
354};
355
356/* timer1 */
357static struct omap_hwmod omap2430_timer1_hwmod;
358
359static 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 */
369static 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,
375};297};
376 298
377/* timer1 slave port */299/* mcbsp1 */
378static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {300static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
379 &omap2430_l4_wkup__timer1,301 { .name = "tx", .irq = 59 },
302 { .name = "rx", .irq = 60 },
303 { .name = "ovr", .irq = 61 },
304 { .name = "common", .irq = 64 },
305 { .irq = -1 }
380};306};
381 307
382/* timer1 hwmod */308static struct omap_hwmod omap2430_mcbsp1_hwmod = {
383static struct omap_hwmod omap2430_timer1_hwmod = {309 .name = "mcbsp1",
384 .name = "timer1",310 .class = &omap2430_mcbsp_hwmod_class,
385 .mpu_irqs = omap2_timer1_mpu_irqs,311 .mpu_irqs = omap2430_mcbsp1_irqs,
386 .main_clk = "gpt1_fck",312 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
313 .main_clk = "mcbsp1_fck",
387 .prcm = {314 .prcm = {
388 .omap2 = {315 .omap2 = {
389 .prcm_reg_id = 1,316 .prcm_reg_id = 1,
390 .module_bit = OMAP24XX_EN_GPT1_SHIFT,317 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
391 .module_offs = WKUP_MOD,318 .module_offs = CORE_MOD,
392 .idlest_reg_id = 1,319 .idlest_reg_id = 1,
393 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,320 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
394 },321 },
395 },322 },
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 */
403static struct omap_hwmod omap2430_timer2_hwmod;
404
405/* l4_core -> timer2 */
406static 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,
412};323};
413 324
414/* timer2 slave port */325/* mcbsp2 */
415static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {326static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
416 &omap2430_l4_core__timer2,327 { .name = "tx", .irq = 62 },
328 { .name = "rx", .irq = 63 },
329 { .name = "common", .irq = 16 },
330 { .irq = -1 }
417};331};
418 332
419/* timer2 hwmod */333static struct omap_hwmod omap2430_mcbsp2_hwmod = {
420static struct omap_hwmod omap2430_timer2_hwmod = {334 .name = "mcbsp2",
421 .name = "timer2",335 .class = &omap2430_mcbsp_hwmod_class,
422 .mpu_irqs = omap2_timer2_mpu_irqs,336 .mpu_irqs = omap2430_mcbsp2_irqs,
423 .main_clk = "gpt2_fck",337 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
338 .main_clk = "mcbsp2_fck",
424 .prcm = {339 .prcm = {
425 .omap2 = {340 .omap2 = {
426 .prcm_reg_id = 1,341 .prcm_reg_id = 1,
427 .module_bit = OMAP24XX_EN_GPT2_SHIFT,342 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
428 .module_offs = CORE_MOD,343 .module_offs = CORE_MOD,
429 .idlest_reg_id = 1,344 .idlest_reg_id = 1,
430 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,345 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
431 },346 },
432 },347 },
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 */
440static struct omap_hwmod omap2430_timer3_hwmod;
441
442/* l4_core -> timer3 */
443static 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,
449};348};
450 349
451/* timer3 slave port */350/* mcbsp3 */
452static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {351static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
453 &omap2430_l4_core__timer3,352 { .name = "tx", .irq = 89 },
353 { .name = "rx", .irq = 90 },
354 { .name = "common", .irq = 17 },
355 { .irq = -1 }
454};356};
455 357
456/* timer3 hwmod */358static struct omap_hwmod omap2430_mcbsp3_hwmod = {
457static struct omap_hwmod omap2430_timer3_hwmod = {359 .name = "mcbsp3",
458 .name = "timer3",360 .class = &omap2430_mcbsp_hwmod_class,
459 .mpu_irqs = omap2_timer3_mpu_irqs,361 .mpu_irqs = omap2430_mcbsp3_irqs,
460 .main_clk = "gpt3_fck",362 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
363 .main_clk = "mcbsp3_fck",
461 .prcm = {364 .prcm = {
462 .omap2 = {365 .omap2 = {
463 .prcm_reg_id = 1,366 .prcm_reg_id = 1,
464 .module_bit = OMAP24XX_EN_GPT3_SHIFT,367 .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
465 .module_offs = CORE_MOD,368 .module_offs = CORE_MOD,
466 .idlest_reg_id = 1,369 .idlest_reg_id = 2,
467 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,370 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
468 },371 },
469 },372 },
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,
474};373};
475 374
476/* timer4 */375/* mcbsp4 */
477static struct omap_hwmod omap2430_timer4_hwmod;376static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
478 377 { .name = "tx", .irq = 54 },
479/* l4_core -> timer4 */378 { .name = "rx", .irq = 55 },
480static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {379 { .name = "common", .irq = 18 },
481 .master = &omap2430_l4_core_hwmod,380 { .irq = -1 }
482 .slave = &omap2430_timer4_hwmod,
483 .clk = "gpt4_ick",
484 .addr = omap2xxx_timer4_addrs,
485 .user = OCP_USER_MPU | OCP_USER_SDMA,
486};381};
487 382
488/* timer4 slave port */383static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
489static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {384 { .name = "rx", .dma_req = 20 },
490 &omap2430_l4_core__timer4,385 { .name = "tx", .dma_req = 19 },
386 { .dma_req = -1 }
491};387};
492 388
493/* timer4 hwmod */389static struct omap_hwmod omap2430_mcbsp4_hwmod = {
494static struct omap_hwmod omap2430_timer4_hwmod = {390 .name = "mcbsp4",
495 .name = "timer4",391 .class = &omap2430_mcbsp_hwmod_class,
496 .mpu_irqs = omap2_timer4_mpu_irqs,392 .mpu_irqs = omap2430_mcbsp4_irqs,
497 .main_clk = "gpt4_fck",393 .sdma_reqs = omap2430_mcbsp4_sdma_chs,
394 .main_clk = "mcbsp4_fck",
498 .prcm = {395 .prcm = {
499 .omap2 = {396 .omap2 = {
500 .prcm_reg_id = 1,397 .prcm_reg_id = 1,
501 .module_bit = OMAP24XX_EN_GPT4_SHIFT,398 .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
502 .module_offs = CORE_MOD,399 .module_offs = CORE_MOD,
503 .idlest_reg_id = 1,400 .idlest_reg_id = 2,
504 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,401 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
505 },402 },
506 },403 },
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,
511};404};
512 405
513/* timer5 */406/* mcbsp5 */
514static struct omap_hwmod omap2430_timer5_hwmod;407static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
515 408 { .name = "tx", .irq = 81 },
516/* l4_core -> timer5 */409 { .name = "rx", .irq = 82 },
517static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {410 { .name = "common", .irq = 19 },
518 .master = &omap2430_l4_core_hwmod,411 { .irq = -1 }
519 .slave = &omap2430_timer5_hwmod,
520 .clk = "gpt5_ick",
521 .addr = omap2xxx_timer5_addrs,
522 .user = OCP_USER_MPU | OCP_USER_SDMA,
523};412};
524 413
525/* timer5 slave port */414static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
526static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {415 { .name = "rx", .dma_req = 22 },
527 &omap2430_l4_core__timer5,416 { .name = "tx", .dma_req = 21 },
417 { .dma_req = -1 }
528};418};
529 419
530/* timer5 hwmod */420static struct omap_hwmod omap2430_mcbsp5_hwmod = {
531static struct omap_hwmod omap2430_timer5_hwmod = {421 .name = "mcbsp5",
532 .name = "timer5",422 .class = &omap2430_mcbsp_hwmod_class,
533 .mpu_irqs = omap2_timer5_mpu_irqs,423 .mpu_irqs = omap2430_mcbsp5_irqs,
534 .main_clk = "gpt5_fck",424 .sdma_reqs = omap2430_mcbsp5_sdma_chs,
425 .main_clk = "mcbsp5_fck",
535 .prcm = {426 .prcm = {
536 .omap2 = {427 .omap2 = {
537 .prcm_reg_id = 1,428 .prcm_reg_id = 1,
538 .module_bit = OMAP24XX_EN_GPT5_SHIFT,429 .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
539 .module_offs = CORE_MOD,430 .module_offs = CORE_MOD,
540 .idlest_reg_id = 1,431 .idlest_reg_id = 2,
541 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,432 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
542 },433 },
543 },434 },
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,
548};435};
549 436
550/* timer6 */437/* MMC/SD/SDIO common */
551static struct omap_hwmod omap2430_timer6_hwmod;438static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
552 439 .rev_offs = 0x1fc,
553/* l4_core -> timer6 */440 .sysc_offs = 0x10,
554static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {441 .syss_offs = 0x14,
555 .master = &omap2430_l4_core_hwmod,442 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
556 .slave = &omap2430_timer6_hwmod,443 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
557 .clk = "gpt6_ick",444 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
558 .addr = omap2xxx_timer6_addrs,445 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
559 .user = OCP_USER_MPU | OCP_USER_SDMA,446 .sysc_fields = &omap_hwmod_sysc_type1,
560};447};
561 448
562/* timer6 slave port */449static struct omap_hwmod_class omap2430_mmc_class = {
563static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {450 .name = "mmc",
564 &omap2430_l4_core__timer6,451 .sysc = &omap2430_mmc_sysc,
565};452};
566 453
567/* timer6 hwmod */454/* MMC/SD/SDIO1 */
568static struct omap_hwmod omap2430_timer6_hwmod = {455static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
569 .name = "timer6",456 { .irq = 83 },
570 .mpu_irqs = omap2_timer6_mpu_irqs,457 { .irq = -1 }
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,
585};458};
586 459
587/* timer7 */460static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
588static struct omap_hwmod omap2430_timer7_hwmod;461 { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
462 { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
463 { .dma_req = -1 }
464};
589 465
590/* l4_core -> timer7 */466static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
591static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {467 { .role = "dbck", .clk = "mmchsdb1_fck" },
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,
597};468};
598 469
599/* timer7 slave port */470static struct omap_mmc_dev_attr mmc1_dev_attr = {
600static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {471 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
601 &omap2430_l4_core__timer7,
602};472};
603 473
604/* timer7 hwmod */474static struct omap_hwmod omap2430_mmc1_hwmod = {
605static struct omap_hwmod omap2430_timer7_hwmod = {475 .name = "mmc1",
606 .name = "timer7",476 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
607 .mpu_irqs = omap2_timer7_mpu_irqs,477 .mpu_irqs = omap2430_mmc1_mpu_irqs,
608 .main_clk = "gpt7_fck",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",
609 .prcm = {482 .prcm = {
610 .omap2 = {483 .omap2 = {
611 .prcm_reg_id = 1,
612 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
613 .module_offs = CORE_MOD,484 .module_offs = CORE_MOD,
614 .idlest_reg_id = 1,485 .prcm_reg_id = 2,
615 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,486 .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
487 .idlest_reg_id = 2,
488 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
616 },489 },
617 },490 },
618 .dev_attr = &capability_alwon_dev_attr,491 .dev_attr = &mmc1_dev_attr,
619 .slaves = omap2430_timer7_slaves,492 .class = &omap2430_mmc_class,
620 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
621 .class = &omap2xxx_timer_hwmod_class,
622};493};
623 494
624/* timer8 */495/* MMC/SD/SDIO2 */
625static struct omap_hwmod omap2430_timer8_hwmod;496static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
497 { .irq = 86 },
498 { .irq = -1 }
499};
626 500
627/* l4_core -> timer8 */501static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
628static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {502 { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
629 .master = &omap2430_l4_core_hwmod,503 { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
630 .slave = &omap2430_timer8_hwmod,504 { .dma_req = -1 }
631 .clk = "gpt8_ick",
632 .addr = omap2xxx_timer8_addrs,
633 .user = OCP_USER_MPU | OCP_USER_SDMA,
634};505};
635 506
636/* timer8 slave port */507static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
637static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {508 { .role = "dbck", .clk = "mmchsdb2_fck" },
638 &omap2430_l4_core__timer8,
639};509};
640 510
641/* timer8 hwmod */511static struct omap_hwmod omap2430_mmc2_hwmod = {
642static struct omap_hwmod omap2430_timer8_hwmod = {512 .name = "mmc2",
643 .name = "timer8",513 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
644 .mpu_irqs = omap2_timer8_mpu_irqs,514 .mpu_irqs = omap2430_mmc2_mpu_irqs,
645 .main_clk = "gpt8_fck",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",
646 .prcm = {519 .prcm = {
647 .omap2 = {520 .omap2 = {
648 .prcm_reg_id = 1,
649 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
650 .module_offs = CORE_MOD,521 .module_offs = CORE_MOD,
651 .idlest_reg_id = 1,522 .prcm_reg_id = 2,
652 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,523 .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
524 .idlest_reg_id = 2,
525 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
653 },526 },
654 },527 },
655 .dev_attr = &capability_alwon_dev_attr,528 .class = &omap2430_mmc_class,
656 .slaves = omap2430_timer8_slaves,
657 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
658 .class = &omap2xxx_timer_hwmod_class,
659};529};
660 530
661/* timer9 */531/*
662static struct omap_hwmod omap2430_timer9_hwmod;532 * interfaces
533 */
663 534
664/* l4_core -> timer9 */535/* L3 -> L4_CORE interface */
665static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {536/* l3_core -> usbhsotg interface */
666 .master = &omap2430_l4_core_hwmod,537static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
667 .slave = &omap2430_timer9_hwmod,538 .master = &omap2430_usbhsotg_hwmod,
668 .clk = "gpt9_ick",539 .slave = &omap2xxx_l3_main_hwmod,
669 .addr = omap2xxx_timer9_addrs,540 .clk = "core_l3_ck",
670 .user = OCP_USER_MPU | OCP_USER_SDMA,541 .user = OCP_USER_MPU,
671};542};
672 543
673/* timer9 slave port */544/* L4 CORE -> I2C1 interface */
674static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {545static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
675 &omap2430_l4_core__timer9,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,
676};551};
677 552
678/* timer9 hwmod */553/* L4 CORE -> I2C2 interface */
679static struct omap_hwmod omap2430_timer9_hwmod = {554static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
680 .name = "timer9",555 .master = &omap2xxx_l4_core_hwmod,
681 .mpu_irqs = omap2_timer9_mpu_irqs,556 .slave = &omap2430_i2c2_hwmod,
682 .main_clk = "gpt9_fck",557 .clk = "i2c2_ick",
683 .prcm = {558 .addr = omap2_i2c2_addr_space,
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 */
699static struct omap_hwmod omap2430_timer10_hwmod;
700
701/* l4_core -> timer10 */
702static 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,
707 .user = OCP_USER_MPU | OCP_USER_SDMA,559 .user = OCP_USER_MPU | OCP_USER_SDMA,
708};560};
709 561
710/* timer10 slave port */562static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
711static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {563 {
712 &omap2430_l4_core__timer10,564 .pa_start = OMAP243X_HS_BASE,
713};565 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
714 566 .flags = ADDR_TYPE_RT
715/* timer10 hwmod */
716static 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 },
728 },567 },
729 .dev_attr = &capability_pwm_dev_attr,568 { }
730 .slaves = omap2430_timer10_slaves,
731 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
732 .class = &omap2xxx_timer_hwmod_class,
733};569};
734 570
735/* timer11 */571/* l4_core ->usbhsotg interface */
736static struct omap_hwmod omap2430_timer11_hwmod;572static 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};
737 579
738/* l4_core -> timer11 */580/* L4 CORE -> MMC1 interface */
739static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {581static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
740 .master = &omap2430_l4_core_hwmod,582 .master = &omap2xxx_l4_core_hwmod,
741 .slave = &omap2430_timer11_hwmod,583 .slave = &omap2430_mmc1_hwmod,
742 .clk = "gpt11_ick",584 .clk = "mmchs1_ick",
743 .addr = omap2_timer11_addrs,585 .addr = omap2430_mmc1_addr_space,
744 .user = OCP_USER_MPU | OCP_USER_SDMA,586 .user = OCP_USER_MPU | OCP_USER_SDMA,
745};587};
746 588
747/* timer11 slave port */589/* L4 CORE -> MMC2 interface */
748static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {590static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
749 &omap2430_l4_core__timer11,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,
750};596};
751 597
752/* timer11 hwmod */598/* l4 core -> mcspi3 interface */
753static struct omap_hwmod omap2430_timer11_hwmod = {599static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
754 .name = "timer11",600 .master = &omap2xxx_l4_core_hwmod,
755 .mpu_irqs = omap2_timer11_mpu_irqs,601 .slave = &omap2430_mcspi3_hwmod,
756 .main_clk = "gpt11_fck",602 .clk = "mcspi3_ick",
757 .prcm = {603 .addr = omap2430_mcspi3_addr_space,
758 .omap2 = {604 .user = OCP_USER_MPU | OCP_USER_SDMA,
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,
770};605};
771 606
772/* timer12 */607/* IVA2 <- L3 interface */
773static struct omap_hwmod omap2430_timer12_hwmod;608static struct omap_hwmod_ocp_if omap2430_l3__iva = {
774 609 .master = &omap2xxx_l3_main_hwmod,
775/* l4_core -> timer12 */610 .slave = &omap2430_iva_hwmod,
776static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {611 .clk = "core_l3_ck",
777 .master = &omap2430_l4_core_hwmod,
778 .slave = &omap2430_timer12_hwmod,
779 .clk = "gpt12_ick",
780 .addr = omap2xxx_timer12_addrs,
781 .user = OCP_USER_MPU | OCP_USER_SDMA,612 .user = OCP_USER_MPU | OCP_USER_SDMA,
782};613};
783 614
784/* timer12 slave port */615static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
785static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {616 {
786 &omap2430_l4_core__timer12,617 .pa_start = 0x49018000,
618 .pa_end = 0x49018000 + SZ_1K - 1,
619 .flags = ADDR_TYPE_RT
620 },
621 { }
787};622};
788 623
789/* timer12 hwmod */624/* l4_wkup -> timer1 */
790static struct omap_hwmod omap2430_timer12_hwmod = {625static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
791 .name = "timer12",626 .master = &omap2xxx_l4_wkup_hwmod,
792 .mpu_irqs = omap2xxx_timer12_mpu_irqs,627 .slave = &omap2xxx_timer1_hwmod,
793 .main_clk = "gpt12_fck",628 .clk = "gpt1_ick",
794 .prcm = {629 .addr = omap2430_timer1_addrs,
795 .omap2 = {630 .user = OCP_USER_MPU | OCP_USER_SDMA,
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,
807};631};
808 632
809/* l4_wkup -> wd_timer2 */633/* l4_wkup -> wd_timer2 */
@@ -817,923 +641,146 @@ static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { · 7 unmodified lines
817};641};
818 642
819static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {643static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
820 .master = &omap2430_l4_wkup_hwmod,644 .master = &omap2xxx_l4_wkup_hwmod,
821 .slave = &omap2430_wd_timer2_hwmod,645 .slave = &omap2xxx_wd_timer2_hwmod,
822 .clk = "mpu_wdt_ick",646 .clk = "mpu_wdt_ick",
823 .addr = omap2430_wd_timer2_addrs,647 .addr = omap2430_wd_timer2_addrs,
824 .user = OCP_USER_MPU | OCP_USER_SDMA,648 .user = OCP_USER_MPU | OCP_USER_SDMA,
825};649};
826 650
827/* wd_timer2 */651/* l4_wkup -> gpio1 */
828static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {652static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
829 &omap2430_l4_wkup__wd_timer2,653 {
830};654 .pa_start = 0x4900C000,
831 655 .pa_end = 0x4900C1ff,
832static struct omap_hwmod omap2430_wd_timer2_hwmod = {656 .flags = ADDR_TYPE_RT
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
851static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
852 &omap2_l4_core__uart1,
853};
854
855static 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
876static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
877 &omap2_l4_core__uart2,
878};
879
880static 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
901static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
902 &omap2_l4_core__uart3,
903};
904
905static 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 },
918 },657 },
919 .slaves = omap2430_uart3_slaves,658 { }
920 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
921 .class = &omap2_uart_class,
922};
923
924/* dss */
925/* dss master ports */
926static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
927 &omap2430_dss__l3,
928};659};
929 660
930/* l4_core -> dss */661static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
931static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {662 .master = &omap2xxx_l4_wkup_hwmod,
932 .master = &omap2430_l4_core_hwmod,663 .slave = &omap2xxx_gpio1_hwmod,
933 .slave = &omap2430_dss_core_hwmod,664 .clk = "gpios_ick",
934 .clk = "dss_ick",665 .addr = omap2430_gpio1_addr_space,
935 .addr = omap2_dss_addrs,
936 .user = OCP_USER_MPU | OCP_USER_SDMA,666 .user = OCP_USER_MPU | OCP_USER_SDMA,
937};667};
938 668
939/* dss slave ports */669/* l4_wkup -> gpio2 */
940static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {670static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
941 &omap2430_l4_core__dss,671 {
942};672 .pa_start = 0x4900E000,
943 673 .pa_end = 0x4900E1ff,
944static struct omap_hwmod_opt_clk dss_opt_clks[] = {674 .flags = ADDR_TYPE_RT
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
953static 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 },
966 },675 },
967 .opt_clks = dss_opt_clks,676 { }
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 */
977static 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,
983};677};
984 678
985/* dss_dispc slave ports */679static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
986static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {680 .master = &omap2xxx_l4_wkup_hwmod,
987 &omap2430_l4_core__dss_dispc,681 .slave = &omap2xxx_gpio2_hwmod,
682 .clk = "gpios_ick",
683 .addr = omap2430_gpio2_addr_space,
684 .user = OCP_USER_MPU | OCP_USER_SDMA,
988};685};
989 686
990static struct omap_hwmod omap2430_dss_dispc_hwmod = {687/* l4_wkup -> gpio3 */
991 .name = "dss_dispc",688static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
992 .class = &omap2_dispc_hwmod_class,689 {
993 .mpu_irqs = omap2_dispc_irqs,690 .pa_start = 0x49010000,
994 .main_clk = "dss1_fck",691 .pa_end = 0x490101ff,
995 .prcm = {692 .flags = ADDR_TYPE_RT
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 },
1003 },693 },
1004 .slaves = omap2430_dss_dispc_slaves,694 { }
1005 .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
1006 .flags = HWMOD_NO_IDLEST,
1007 .dev_attr = &omap2_3_dss_dispc_dev_attr
1008};695};
1009 696
1010/* l4_core -> dss_rfbi */697static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1011static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {698 .master = &omap2xxx_l4_wkup_hwmod,
1012 .master = &omap2430_l4_core_hwmod,699 .slave = &omap2xxx_gpio3_hwmod,
1013 .slave = &omap2430_dss_rfbi_hwmod,700 .clk = "gpios_ick",
1014 .clk = "dss_ick",701 .addr = omap2430_gpio3_addr_space,
1015 .addr = omap2_dss_rfbi_addrs,
1016 .user = OCP_USER_MPU | OCP_USER_SDMA,702 .user = OCP_USER_MPU | OCP_USER_SDMA,
1017};703};
1018 704
1019/* dss_rfbi slave ports */705/* l4_wkup -> gpio4 */
1020static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {706static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1021 &omap2430_l4_core__dss_rfbi,707 {
1022};708 .pa_start = 0x49012000,
1023 709 .pa_end = 0x490121ff,
1024static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {710 .flags = ADDR_TYPE_RT
1025 { .role = "ick", .clk = "dss_ick" },
1026};
1027
1028static 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 },
1038 },711 },
1039 .opt_clks = dss_rfbi_opt_clks,712 { }
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,
1044};713};
1045 714
1046/* l4_core -> dss_venc */715static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1047static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {716 .master = &omap2xxx_l4_wkup_hwmod,
1048 .master = &omap2430_l4_core_hwmod,717 .slave = &omap2xxx_gpio4_hwmod,
1049 .slave = &omap2430_dss_venc_hwmod,718 .clk = "gpios_ick",
1050 .clk = "dss_ick",719 .addr = omap2430_gpio4_addr_space,
1051 .addr = omap2_dss_venc_addrs,
1052 .user = OCP_USER_MPU | OCP_USER_SDMA,720 .user = OCP_USER_MPU | OCP_USER_SDMA,
1053};721};
1054 722
1055/* dss_venc slave ports */723/* l4_core -> gpio5 */
1056static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {724static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1057 &omap2430_l4_core__dss_venc,725 {
1058};726 .pa_start = 0x480B6000,
1059 727 .pa_end = 0x480B61ff,
1060static struct omap_hwmod omap2430_dss_venc_hwmod = {728 .flags = ADDR_TYPE_RT
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 },
1070 },729 },
1071 .slaves = omap2430_dss_venc_slaves,730 { }
1072 .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
1073 .flags = HWMOD_NO_IDLEST,
1074};
1075
1076/* I2C common */
1077static 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,
1084};731};
1085 732
1086static struct omap_hwmod_class i2c_class = {733static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1087 .name = "i2c",734 .master = &omap2xxx_l4_core_hwmod,
1088 .sysc = &i2c_sysc,735 .slave = &omap2430_gpio5_hwmod,
1089 .rev = OMAP_I2C_IP_VERSION_1,736 .clk = "gpio5_ick",
1090 .reset = &omap_i2c_reset,737 .addr = omap2430_gpio5_addr_space,
738 .user = OCP_USER_MPU | OCP_USER_SDMA,
1091};739};
1092 740
1093static struct omap_i2c_dev_attr i2c_dev_attr = {741/* dma_system -> L3 */
1094 .fifo_depth = 8, /* bytes */742static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1095 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |743 .master = &omap2430_dma_system_hwmod,
1096 OMAP_I2C_FLAG_BUS_SHIFT_2 |744 .slave = &omap2xxx_l3_main_hwmod,
1097 OMAP_I2C_FLAG_FORCE_19200_INT_CLK,745 .clk = "core_l3_ck",
746 .user = OCP_USER_MPU | OCP_USER_SDMA,
1098};747};
1099 748
1100/* I2C1 */749/* l4_core -> dma_system */
1101 750static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1102static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {751 .master = &omap2xxx_l4_core_hwmod,
1103 &omap2430_l4_core__i2c1,752 .slave = &omap2430_dma_system_hwmod,
1104};753 .clk = "sdma_ick",
1105 754 .addr = omap2_dma_system_addrs,
1106static struct omap_hwmod omap2430_i2c1_hwmod = {755 .user = OCP_USER_MPU | OCP_USER_SDMA,
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
1137static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1138 &omap2430_l4_core__i2c2,
1139};
1140
1141static 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 */
1163static 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
1172static 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 */
1181static 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
1190static 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 */
1199static 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
1208static 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 */
1217static 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
1226static 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 */
1235static 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
1244static 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 */
1253static struct omap_gpio_dev_attr gpio_dev_attr = {
1254 .bank_width = 32,
1255 .dbck_flag = false,
1256};
1257
1258/* gpio1 */
1259static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1260 &omap2430_l4_wkup__gpio1,
1261};
1262
1263static 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 */
1284static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1285 &omap2430_l4_wkup__gpio2,
1286};
1287
1288static 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 */
1309static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1310 &omap2430_l4_wkup__gpio3,
1311};
1312
1313static 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 */
1334static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1335 &omap2430_l4_wkup__gpio4,
1336};
1337
1338static 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 */
1359static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1360 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
1361 { .irq = -1 }
1362};
1363
1364static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1365 &omap2430_l4_core__gpio5,
1366};
1367
1368static 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 */
1389static 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 */
1396static 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 */
1404static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1405 &omap2430_dma_system__l3,
1406};
1407
1408/* l4_core -> dma_system */
1409static 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 */
1418static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1419 &omap2430_l4_core__dma_system,
1420};
1421
1422static 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 */
1436static struct omap_hwmod omap2430_mailbox_hwmod;
1437static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1438 { .irq = 26 },
1439 { .irq = -1 }
1440};756};
1441 757
1442/* l4_core -> mailbox */758/* l4_core -> mailbox */
1443static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {759static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
1444 .master = &omap2430_l4_core_hwmod,760 .master = &omap2xxx_l4_core_hwmod,
1445 .slave = &omap2430_mailbox_hwmod,761 .slave = &omap2430_mailbox_hwmod,
1446 .addr = omap2_mailbox_addrs,762 .addr = omap2_mailbox_addrs,
1447 .user = OCP_USER_MPU | OCP_USER_SDMA,763 .user = OCP_USER_MPU | OCP_USER_SDMA,
1448};
1449
1450/* mailbox slave ports */
1451static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
1452 &omap2430_l4_core__mailbox,
1453};
1454
1455static 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 */
1474static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
1475 &omap2430_l4_core__mcspi1,
1476};
1477
1478static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1479 .num_chipselect = 4,
1480};
1481
1482static 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 */
1503static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
1504 &omap2430_l4_core__mcspi2,
1505};
1506
1507static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1508 .num_chipselect = 2,
1509};
1510
1511static 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 */
1532static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
1533 { .irq = 91 },
1534 { .irq = -1 }
1535};
1536
1537static 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
1545static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
1546 &omap2430_l4_core__mcspi3,
1547};
1548
1549static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1550 .num_chipselect = 2,
1551};
1552
1553static 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 */
1576static 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
1588static struct omap_hwmod_class usbotg_class = {
1589 .name = "usbotg",
1590 .sysc = &omap2430_usbhsotg_sysc,
1591};
1592
1593/* usb_otg_hs */
1594static 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
1601static 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
1633static 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
1640static 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 */
1647static 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 */
1656static 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 */
1665static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1666 &omap2430_l4_core__mcbsp1,
1667};
1668
1669static 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),
1686};764};
1687 765
1688/* mcbsp2 */766/* l4_core -> mcbsp1 */
1689static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {767static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1690 { .name = "tx", .irq = 62 },768 .master = &omap2xxx_l4_core_hwmod,
1691 { .name = "rx", .irq = 63 },769 .slave = &omap2430_mcbsp1_hwmod,
1692 { .name = "common", .irq = 16 },770 .clk = "mcbsp1_ick",
1693 { .irq = -1 }771 .addr = omap2_mcbsp1_addrs,
772 .user = OCP_USER_MPU | OCP_USER_SDMA,
1694};773};
1695 774
1696/* l4_core -> mcbsp2 */775/* l4_core -> mcbsp2 */
1697static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {776static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1698 .master = &omap2430_l4_core_hwmod,777 .master = &omap2xxx_l4_core_hwmod,
1699 .slave = &omap2430_mcbsp2_hwmod,778 .slave = &omap2430_mcbsp2_hwmod,
1700 .clk = "mcbsp2_ick",779 .clk = "mcbsp2_ick",
1701 .addr = omap2xxx_mcbsp2_addrs,780 .addr = omap2xxx_mcbsp2_addrs,
1702 .user = OCP_USER_MPU | OCP_USER_SDMA,781 .user = OCP_USER_MPU | OCP_USER_SDMA,
1703};782};
1704 783
1705/* mcbsp2 slave ports */
1706static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1707 &omap2430_l4_core__mcbsp2,
1708};
1709
1710static 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 */
1730static 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
1737static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {784static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
1738 {785 {
1739 .name = "mpu",786 .name = "mpu",
@@ -1746,51 +793,13 @@ static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { · 6 unmodified lines
1746 793
1747/* l4_core -> mcbsp3 */794/* l4_core -> mcbsp3 */
1748static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {795static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
1749 .master = &omap2430_l4_core_hwmod,796 .master = &omap2xxx_l4_core_hwmod,
1750 .slave = &omap2430_mcbsp3_hwmod,797 .slave = &omap2430_mcbsp3_hwmod,
1751 .clk = "mcbsp3_ick",798 .clk = "mcbsp3_ick",
1752 .addr = omap2430_mcbsp3_addrs,799 .addr = omap2430_mcbsp3_addrs,
1753 .user = OCP_USER_MPU | OCP_USER_SDMA,800 .user = OCP_USER_MPU | OCP_USER_SDMA,
1754};801};
1755 802
1756/* mcbsp3 slave ports */
1757static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
1758 &omap2430_l4_core__mcbsp3,
1759};
1760
1761static 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 */
1781static 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
1788static 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
1794static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {803static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
1795 {804 {
1796 .name = "mpu",805 .name = "mpu",
@@ -1803,51 +812,13 @@ static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { · 6 unmodified lines
1803 812
1804/* l4_core -> mcbsp4 */813/* l4_core -> mcbsp4 */
1805static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {814static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
1806 .master = &omap2430_l4_core_hwmod,815 .master = &omap2xxx_l4_core_hwmod,
1807 .slave = &omap2430_mcbsp4_hwmod,816 .slave = &omap2430_mcbsp4_hwmod,
1808 .clk = "mcbsp4_ick",817 .clk = "mcbsp4_ick",
1809 .addr = omap2430_mcbsp4_addrs,818 .addr = omap2430_mcbsp4_addrs,
1810 .user = OCP_USER_MPU | OCP_USER_SDMA,819 .user = OCP_USER_MPU | OCP_USER_SDMA,
1811};820};
1812 821
1813/* mcbsp4 slave ports */
1814static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
1815 &omap2430_l4_core__mcbsp4,
1816};
1817
1818static 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 */
1838static 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
1845static 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
1851static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {822static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
1852 {823 {
1853 .name = "mpu",824 .name = "mpu",
@@ -1860,213 +831,65 @@ static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { · 6 unmodified lines
1860 831
1861/* l4_core -> mcbsp5 */832/* l4_core -> mcbsp5 */
1862static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {833static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
1863 .master = &omap2430_l4_core_hwmod,834 .master = &omap2xxx_l4_core_hwmod,
1864 .slave = &omap2430_mcbsp5_hwmod,835 .slave = &omap2430_mcbsp5_hwmod,
1865 .clk = "mcbsp5_ick",836 .clk = "mcbsp5_ick",
1866 .addr = omap2430_mcbsp5_addrs,837 .addr = omap2430_mcbsp5_addrs,
1867 .user = OCP_USER_MPU | OCP_USER_SDMA,838 .user = OCP_USER_MPU | OCP_USER_SDMA,
1868};839};
1869 840
1870/* mcbsp5 slave ports */841static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
1871static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {842 &omap2xxx_l3_main__l4_core,
1872 &omap2430_l4_core__mcbsp5,843 &omap2xxx_mpu__l3_main,
1873};844 &omap2xxx_dss__l3,
1874 845 &omap2430_usbhsotg__l3,
1875static struct omap_hwmod omap2430_mcbsp5_hwmod = {846 &omap2430_l4_core__i2c1,
1876 .name = "mcbsp5",847 &omap2430_l4_core__i2c2,
1877 .class = &omap2430_mcbsp_hwmod_class,848 &omap2xxx_l4_core__l4_wkup,
1878 .mpu_irqs = omap2430_mcbsp5_irqs,849 &omap2_l4_core__uart1,
1879 .sdma_reqs = omap2430_mcbsp5_sdma_chs,850 &omap2_l4_core__uart2,
1880 .main_clk = "mcbsp5_fck",851 &omap2_l4_core__uart3,
1881 .prcm = {852 &omap2430_l4_core__usbhsotg,
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
1896static 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
1907static struct omap_hwmod_class omap2430_mmc_class = {
1908 .name = "mmc",
1909 .sysc = &omap2430_mmc_sysc,
1910};
1911
1912/* MMC/SD/SDIO1 */
1913
1914static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
1915 { .irq = 83 },
1916 { .irq = -1 }
1917};
1918
1919static 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
1925static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
1926 { .role = "dbck", .clk = "mmchsdb1_fck" },
1927};
1928
1929static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
1930 &omap2430_l4_core__mmc1,853 &omap2430_l4_core__mmc1,
1931};
1932
1933static struct omap_mmc_dev_attr mmc1_dev_attr = {
1934 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1935};
1936
1937static 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
1962static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
1963 { .irq = 86 },
1964 { .irq = -1 }
1965};
1966
1967static 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
1973static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
1974 { .role = "dbck", .clk = "mmchsdb2_fck" },
1975};
1976
1977static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
1978 &omap2430_l4_core__mmc2,854 &omap2430_l4_core__mmc2,
1979};855 &omap2xxx_l4_core__mcspi1,
1980 856 &omap2xxx_l4_core__mcspi2,
1981static struct omap_hwmod omap2430_mmc2_hwmod = {857 &omap2430_l4_core__mcspi3,
1982 .name = "mmc2",858 &omap2430_l3__iva,
1983 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,859 &omap2430_l4_wkup__timer1,
1984 .mpu_irqs = omap2430_mmc2_mpu_irqs,860 &omap2xxx_l4_core__timer2,
1985 .sdma_reqs = omap2430_mmc2_sdma_reqs,861 &omap2xxx_l4_core__timer3,
1986 .opt_clks = omap2430_mmc2_opt_clks,862 &omap2xxx_l4_core__timer4,
1987 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),863 &omap2xxx_l4_core__timer5,
1988 .main_clk = "mmchs2_fck",864 &omap2xxx_l4_core__timer6,
1989 .prcm = {865 &omap2xxx_l4_core__timer7,
1990 .omap2 = {866 &omap2xxx_l4_core__timer8,
1991 .module_offs = CORE_MOD,867 &omap2xxx_l4_core__timer9,
1992 .prcm_reg_id = 2,868 &omap2xxx_l4_core__timer10,
1993 .module_bit = OMAP2430_EN_MMCHS2_SHIFT,869 &omap2xxx_l4_core__timer11,
1994 .idlest_reg_id = 2,870 &omap2xxx_l4_core__timer12,
1995 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,871 &omap2430_l4_wkup__wd_timer2,
1996 },872 &omap2xxx_l4_core__dss,
1997 },873 &omap2xxx_l4_core__dss_dispc,
1998 .slaves = omap2430_mmc2_slaves,874 &omap2xxx_l4_core__dss_rfbi,
1999 .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),875 &omap2xxx_l4_core__dss_venc,
2000 .class = &omap2430_mmc_class,876 &omap2430_l4_wkup__gpio1,
2001};877 &omap2430_l4_wkup__gpio2,
2002 878 &omap2430_l4_wkup__gpio3,
2003static __initdata struct omap_hwmod *omap2430_hwmods[] = {879 &omap2430_l4_wkup__gpio4,
2004 &omap2430_l3_main_hwmod,880 &omap2430_l4_core__gpio5,
2005 &omap2430_l4_core_hwmod,881 &omap2430_dma_system__l3,
2006 &omap2430_l4_wkup_hwmod,882 &omap2430_l4_core__dma_system,
2007 &omap2430_mpu_hwmod,883 &omap2430_l4_core__mailbox,
2008 &omap2430_iva_hwmod,884 &omap2430_l4_core__mcbsp1,
2009 885 &omap2430_l4_core__mcbsp2,
2010 &omap2430_timer1_hwmod,886 &omap2430_l4_core__mcbsp3,
2011 &omap2430_timer2_hwmod,887 &omap2430_l4_core__mcbsp4,
2012 &omap2430_timer3_hwmod,888 &omap2430_l4_core__mcbsp5,
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
2066 NULL,889 NULL,
2067};890};
2068 891
2069int __init omap2430_hwmod_init(void)892int __init omap2430_hwmod_init(void)
2070{893{
2071 return omap_hwmod_register(omap2430_hwmods);894 return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
2072}895}
arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c+255−11
@@ -15,10 +15,12 @@ · 14 unmodified lines
15 15
16#include <plat/omap_hwmod.h>16#include <plat/omap_hwmod.h>
17#include <plat/serial.h>17#include <plat/serial.h>
18#include <plat/l3_2xxx.h>
19#include <plat/l4_2xxx.h>
18 20
19#include "omap_hwmod_common_data.h"21#include "omap_hwmod_common_data.h"
20 22
21struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {23static struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
22 {24 {
23 .pa_start = OMAP2_UART1_BASE,25 .pa_start = OMAP2_UART1_BASE,
24 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,26 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
@@ -27,7 +29,7 @@ struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { · 2 unmodified lines
27 { }29 { }
28};30};
29 31
30struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {32static struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
31 {33 {
32 .pa_start = OMAP2_UART2_BASE,34 .pa_start = OMAP2_UART2_BASE,
33 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,35 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
@@ -36,7 +38,7 @@ struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { · 2 unmodified lines
36 { }38 { }
37};39};
38 40
39struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {41static struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
40 {42 {
41 .pa_start = OMAP2_UART3_BASE,43 .pa_start = OMAP2_UART3_BASE,
42 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,44 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
@@ -45,7 +47,7 @@ struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { · 2 unmodified lines
45 { }47 { }
46};48};
47 49
48struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {50static struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
49 {51 {
50 .pa_start = 0x4802a000,52 .pa_start = 0x4802a000,
51 .pa_end = 0x4802a000 + SZ_1K - 1,53 .pa_end = 0x4802a000 + SZ_1K - 1,
@@ -54,7 +56,7 @@ struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { · 2 unmodified lines
54 { }56 { }
55};57};
56 58
57struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {59static struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
58 {60 {
59 .pa_start = 0x48078000,61 .pa_start = 0x48078000,
60 .pa_end = 0x48078000 + SZ_1K - 1,62 .pa_end = 0x48078000 + SZ_1K - 1,
@@ -63,7 +65,7 @@ struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { · 2 unmodified lines
63 { }65 { }
64};66};
65 67
66struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {68static struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
67 {69 {
68 .pa_start = 0x4807a000,70 .pa_start = 0x4807a000,
69 .pa_end = 0x4807a000 + SZ_1K - 1,71 .pa_end = 0x4807a000 + SZ_1K - 1,
@@ -72,7 +74,7 @@ struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { · 2 unmodified lines
72 { }74 { }
73};75};
74 76
75struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {77static struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
76 {78 {
77 .pa_start = 0x4807c000,79 .pa_start = 0x4807c000,
78 .pa_end = 0x4807c000 + SZ_1K - 1,80 .pa_end = 0x4807c000 + SZ_1K - 1,
@@ -81,7 +83,7 @@ struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { · 2 unmodified lines
81 { }83 { }
82};84};
83 85
84struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {86static struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
85 {87 {
86 .pa_start = 0x4807e000,88 .pa_start = 0x4807e000,
87 .pa_end = 0x4807e000 + SZ_1K - 1,89 .pa_end = 0x4807e000 + SZ_1K - 1,
@@ -90,7 +92,7 @@ struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { · 2 unmodified lines
90 { }92 { }
91};93};
92 94
93struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {95static struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
94 {96 {
95 .pa_start = 0x48080000,97 .pa_start = 0x48080000,
96 .pa_end = 0x48080000 + SZ_1K - 1,98 .pa_end = 0x48080000 + SZ_1K - 1,
@@ -99,7 +101,7 @@ struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { · 2 unmodified lines
99 { }101 { }
100};102};
101 103
102struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {104static struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
103 {105 {
104 .pa_start = 0x48082000,106 .pa_start = 0x48082000,
105 .pa_end = 0x48082000 + SZ_1K - 1,107 .pa_end = 0x48082000 + SZ_1K - 1,
@@ -108,7 +110,7 @@ struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { · 2 unmodified lines
108 { }110 { }
109};111};
110 112
111struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {113static struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {
112 {114 {
113 .pa_start = 0x48084000,115 .pa_start = 0x48084000,
114 .pa_end = 0x48084000 + SZ_1K - 1,116 .pa_end = 0x48084000 + SZ_1K - 1,
@@ -127,4 +129,246 @@ struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = { · 12 unmodified lines
127 { }129 { }
128};130};
129 131
132/*
133 * Common interconnect data
134 */
135
136/* L3 -> L4_CORE interface */
137struct 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 */
144struct 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 */
151struct 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 */
164struct 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 */
171struct 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 */
180struct 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 */
189struct 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 */
198struct 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 */
207struct 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 */
216struct 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 */
225struct 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 */
234struct 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 */
243struct 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 */
252struct 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 */
261struct 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 */
270struct 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 */
279struct 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 */
288struct 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 */
297struct 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 */
306struct 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 */
315struct 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 */
330struct 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 */
345struct 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 */
360struct 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};
130 374
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c+562−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
10 */10 */
11#include <plat/omap_hwmod.h>11#include <plat/omap_hwmod.h>
12#include <plat/serial.h>12#include <plat/serial.h>
13#include <plat/gpio.h>
13#include <plat/dma.h>14#include <plat/dma.h>
14#include <plat/dmtimer.h>15#include <plat/dmtimer.h>
15#include <plat/mcspi.h>16#include <plat/mcspi.h>
@@ -17,6 +18,8 @@ · 1 unmodified line
17#include <mach/irqs.h>18#include <mach/irqs.h>
18 19
19#include "omap_hwmod_common_data.h"20#include "omap_hwmod_common_data.h"
21#include "cm-regbits-24xx.h"
22#include "prm-regbits-24xx.h"
20#include "wd_timer.h"23#include "wd_timer.h"
21 24
22struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {25struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
@@ -170,3 +173,562 @@ struct omap_hwmod_class omap2xxx_mcspi_class = { · 147 unmodified lines
170 .sysc = &omap2xxx_mcspi_sysc,173 .sysc = &omap2xxx_mcspi_sysc,
171 .rev = OMAP2_MCSPI_REV,174 .rev = OMAP2_MCSPI_REV,
172};175};
176
177/*
178 * IP blocks
179 */
180
181/* L3 */
182struct 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 */
189struct 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 */
196struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
197 .name = "l4_wkup",
198 .class = &l4_hwmod_class,
199 .flags = HWMOD_NO_IDLEST,
200};
201
202/* MPU */
203struct omap_hwmod omap2xxx_mpu_hwmod = {
204 .name = "mpu",
205 .class = &mpu_hwmod_class,
206 .main_clk = "mpu_ck",
207};
208
209/* IVA2 */
210struct omap_hwmod omap2xxx_iva_hwmod = {
211 .name = "iva",
212 .class = &iva_hwmod_class,
213};
214
215/* always-on timers dev attribute */
216static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
217 .timer_capability = OMAP_TIMER_ALWON,
218};
219
220/* pwm timers dev attribute */
221static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
222 .timer_capability = OMAP_TIMER_HAS_PWM,
223};
224
225/* timer1 */
226
227struct 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
246struct 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
265struct 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
284struct 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
303struct 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
322struct 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
341struct 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
360struct 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
379struct 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
398struct 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
417struct 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
436struct 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 */
454struct 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
471struct 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
490struct 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
509struct 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
528static 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
537struct 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