3023-powerpc-fsl-move-mpc85xx.h-to-include-linux-fsl.patch 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. From 2d8816af7c19882f62c4a25edb9fcc9040312f96 Mon Sep 17 00:00:00 2001
  2. From: Yangbo Lu <yangbo.lu@nxp.com>
  3. Date: Tue, 12 Apr 2016 14:21:19 +0800
  4. Subject: [PATCH 23/70] powerpc/fsl: move mpc85xx.h to include/linux/fsl
  5. commit 2a76fbe35c14717b4f4a145e0ab83517b1f4ab4a
  6. [context adjustment]
  7. [doesn't apply arch/powerpc/kernel/cpu_setup_fsl_booke.S]
  8. [doesn't apply arch/powerpc/sysdev/mpic_timer.c]
  9. Move mpc85xx.h to include/linux/fsl and rename it to svr.h as
  10. a common header file. It has been used for mpc85xx and it will
  11. be used for ARM-based SoC as well.
  12. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  13. Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
  14. ---
  15. arch/powerpc/include/asm/mpc85xx.h | 95 ------------------------------
  16. drivers/clk/clk-qoriq.c | 2 +-
  17. drivers/i2c/busses/i2c-mpc.c | 2 +-
  18. drivers/iommu/fsl_pamu.c | 2 +-
  19. drivers/net/ethernet/freescale/gianfar.c | 2 +-
  20. include/linux/fsl/svr.h | 95 ++++++++++++++++++++++++++++++
  21. 6 files changed, 99 insertions(+), 99 deletions(-)
  22. delete mode 100644 arch/powerpc/include/asm/mpc85xx.h
  23. create mode 100644 include/linux/fsl/svr.h
  24. --- a/arch/powerpc/include/asm/mpc85xx.h
  25. +++ /dev/null
  26. @@ -1,95 +0,0 @@
  27. -/*
  28. - * MPC85xx cpu type detection
  29. - *
  30. - * Copyright 2011-2012 Freescale Semiconductor, Inc.
  31. - *
  32. - * This is free software; you can redistribute it and/or modify
  33. - * it under the terms of the GNU General Public License as published by
  34. - * the Free Software Foundation; either version 2 of the License, or
  35. - * (at your option) any later version.
  36. - */
  37. -
  38. -#ifndef __ASM_PPC_MPC85XX_H
  39. -#define __ASM_PPC_MPC85XX_H
  40. -
  41. -#define SVR_REV(svr) ((svr) & 0xFF) /* SOC design resision */
  42. -#define SVR_MAJ(svr) (((svr) >> 4) & 0xF) /* Major revision field*/
  43. -#define SVR_MIN(svr) (((svr) >> 0) & 0xF) /* Minor revision field*/
  44. -
  45. -/* Some parts define SVR[0:23] as the SOC version */
  46. -#define SVR_SOC_VER(svr) (((svr) >> 8) & 0xFFF7FF) /* SOC Version fields */
  47. -
  48. -#define SVR_8533 0x803400
  49. -#define SVR_8535 0x803701
  50. -#define SVR_8536 0x803700
  51. -#define SVR_8540 0x803000
  52. -#define SVR_8541 0x807200
  53. -#define SVR_8543 0x803200
  54. -#define SVR_8544 0x803401
  55. -#define SVR_8545 0x803102
  56. -#define SVR_8547 0x803101
  57. -#define SVR_8548 0x803100
  58. -#define SVR_8555 0x807100
  59. -#define SVR_8560 0x807000
  60. -#define SVR_8567 0x807501
  61. -#define SVR_8568 0x807500
  62. -#define SVR_8569 0x808000
  63. -#define SVR_8572 0x80E000
  64. -#define SVR_P1010 0x80F100
  65. -#define SVR_P1011 0x80E500
  66. -#define SVR_P1012 0x80E501
  67. -#define SVR_P1013 0x80E700
  68. -#define SVR_P1014 0x80F101
  69. -#define SVR_P1017 0x80F700
  70. -#define SVR_P1020 0x80E400
  71. -#define SVR_P1021 0x80E401
  72. -#define SVR_P1022 0x80E600
  73. -#define SVR_P1023 0x80F600
  74. -#define SVR_P1024 0x80E402
  75. -#define SVR_P1025 0x80E403
  76. -#define SVR_P2010 0x80E300
  77. -#define SVR_P2020 0x80E200
  78. -#define SVR_P2040 0x821000
  79. -#define SVR_P2041 0x821001
  80. -#define SVR_P3041 0x821103
  81. -#define SVR_P4040 0x820100
  82. -#define SVR_P4080 0x820000
  83. -#define SVR_P5010 0x822100
  84. -#define SVR_P5020 0x822000
  85. -#define SVR_P5021 0X820500
  86. -#define SVR_P5040 0x820400
  87. -#define SVR_T4240 0x824000
  88. -#define SVR_T4120 0x824001
  89. -#define SVR_T4160 0x824100
  90. -#define SVR_T4080 0x824102
  91. -#define SVR_C291 0x850000
  92. -#define SVR_C292 0x850020
  93. -#define SVR_C293 0x850030
  94. -#define SVR_B4860 0X868000
  95. -#define SVR_G4860 0x868001
  96. -#define SVR_G4060 0x868003
  97. -#define SVR_B4440 0x868100
  98. -#define SVR_G4440 0x868101
  99. -#define SVR_B4420 0x868102
  100. -#define SVR_B4220 0x868103
  101. -#define SVR_T1040 0x852000
  102. -#define SVR_T1041 0x852001
  103. -#define SVR_T1042 0x852002
  104. -#define SVR_T1020 0x852100
  105. -#define SVR_T1021 0x852101
  106. -#define SVR_T1022 0x852102
  107. -#define SVR_T2080 0x853000
  108. -#define SVR_T2081 0x853100
  109. -
  110. -#define SVR_8610 0x80A000
  111. -#define SVR_8641 0x809000
  112. -#define SVR_8641D 0x809001
  113. -
  114. -#define SVR_9130 0x860001
  115. -#define SVR_9131 0x860000
  116. -#define SVR_9132 0x861000
  117. -#define SVR_9232 0x861400
  118. -
  119. -#define SVR_Unknown 0xFFFFFF
  120. -
  121. -#endif
  122. --- a/drivers/clk/clk-qoriq.c
  123. +++ b/drivers/clk/clk-qoriq.c
  124. @@ -13,6 +13,7 @@
  125. #include <linux/clk.h>
  126. #include <linux/clk-provider.h>
  127. #include <linux/fsl/guts.h>
  128. +#include <linux/fsl/svr.h>
  129. #include <linux/io.h>
  130. #include <linux/kernel.h>
  131. #include <linux/module.h>
  132. @@ -1155,7 +1156,6 @@ bad_args:
  133. }
  134. #ifdef CONFIG_PPC
  135. -#include <asm/mpc85xx.h>
  136. static const u32 a4510_svrs[] __initconst = {
  137. (SVR_P2040 << 8) | 0x10, /* P2040 1.0 */
  138. --- a/drivers/i2c/busses/i2c-mpc.c
  139. +++ b/drivers/i2c/busses/i2c-mpc.c
  140. @@ -27,9 +27,9 @@
  141. #include <linux/i2c.h>
  142. #include <linux/interrupt.h>
  143. #include <linux/delay.h>
  144. +#include <linux/fsl/svr.h>
  145. #include <asm/mpc52xx.h>
  146. -#include <asm/mpc85xx.h>
  147. #include <sysdev/fsl_soc.h>
  148. #define DRV_NAME "mpc-i2c"
  149. --- a/drivers/iommu/fsl_pamu.c
  150. +++ b/drivers/iommu/fsl_pamu.c
  151. @@ -21,10 +21,10 @@
  152. #include "fsl_pamu.h"
  153. #include <linux/fsl/guts.h>
  154. +#include <linux/fsl/svr.h>
  155. #include <linux/interrupt.h>
  156. #include <linux/genalloc.h>
  157. -#include <asm/mpc85xx.h>
  158. /* define indexes for each operation mapping scenario */
  159. #define OMI_QMAN 0x00
  160. --- a/drivers/net/ethernet/freescale/gianfar.c
  161. +++ b/drivers/net/ethernet/freescale/gianfar.c
  162. @@ -86,11 +86,11 @@
  163. #include <linux/udp.h>
  164. #include <linux/in.h>
  165. #include <linux/net_tstamp.h>
  166. +#include <linux/fsl/svr.h>
  167. #include <asm/io.h>
  168. #ifdef CONFIG_PPC
  169. #include <asm/reg.h>
  170. -#include <asm/mpc85xx.h>
  171. #endif
  172. #include <asm/irq.h>
  173. #include <asm/uaccess.h>
  174. --- /dev/null
  175. +++ b/include/linux/fsl/svr.h
  176. @@ -0,0 +1,95 @@
  177. +/*
  178. + * MPC85xx cpu type detection
  179. + *
  180. + * Copyright 2011-2012 Freescale Semiconductor, Inc.
  181. + *
  182. + * This is free software; you can redistribute it and/or modify
  183. + * it under the terms of the GNU General Public License as published by
  184. + * the Free Software Foundation; either version 2 of the License, or
  185. + * (at your option) any later version.
  186. + */
  187. +
  188. +#ifndef FSL_SVR_H
  189. +#define FSL_SVR_H
  190. +
  191. +#define SVR_REV(svr) ((svr) & 0xFF) /* SOC design resision */
  192. +#define SVR_MAJ(svr) (((svr) >> 4) & 0xF) /* Major revision field*/
  193. +#define SVR_MIN(svr) (((svr) >> 0) & 0xF) /* Minor revision field*/
  194. +
  195. +/* Some parts define SVR[0:23] as the SOC version */
  196. +#define SVR_SOC_VER(svr) (((svr) >> 8) & 0xFFF7FF) /* SOC Version fields */
  197. +
  198. +#define SVR_8533 0x803400
  199. +#define SVR_8535 0x803701
  200. +#define SVR_8536 0x803700
  201. +#define SVR_8540 0x803000
  202. +#define SVR_8541 0x807200
  203. +#define SVR_8543 0x803200
  204. +#define SVR_8544 0x803401
  205. +#define SVR_8545 0x803102
  206. +#define SVR_8547 0x803101
  207. +#define SVR_8548 0x803100
  208. +#define SVR_8555 0x807100
  209. +#define SVR_8560 0x807000
  210. +#define SVR_8567 0x807501
  211. +#define SVR_8568 0x807500
  212. +#define SVR_8569 0x808000
  213. +#define SVR_8572 0x80E000
  214. +#define SVR_P1010 0x80F100
  215. +#define SVR_P1011 0x80E500
  216. +#define SVR_P1012 0x80E501
  217. +#define SVR_P1013 0x80E700
  218. +#define SVR_P1014 0x80F101
  219. +#define SVR_P1017 0x80F700
  220. +#define SVR_P1020 0x80E400
  221. +#define SVR_P1021 0x80E401
  222. +#define SVR_P1022 0x80E600
  223. +#define SVR_P1023 0x80F600
  224. +#define SVR_P1024 0x80E402
  225. +#define SVR_P1025 0x80E403
  226. +#define SVR_P2010 0x80E300
  227. +#define SVR_P2020 0x80E200
  228. +#define SVR_P2040 0x821000
  229. +#define SVR_P2041 0x821001
  230. +#define SVR_P3041 0x821103
  231. +#define SVR_P4040 0x820100
  232. +#define SVR_P4080 0x820000
  233. +#define SVR_P5010 0x822100
  234. +#define SVR_P5020 0x822000
  235. +#define SVR_P5021 0X820500
  236. +#define SVR_P5040 0x820400
  237. +#define SVR_T4240 0x824000
  238. +#define SVR_T4120 0x824001
  239. +#define SVR_T4160 0x824100
  240. +#define SVR_T4080 0x824102
  241. +#define SVR_C291 0x850000
  242. +#define SVR_C292 0x850020
  243. +#define SVR_C293 0x850030
  244. +#define SVR_B4860 0X868000
  245. +#define SVR_G4860 0x868001
  246. +#define SVR_G4060 0x868003
  247. +#define SVR_B4440 0x868100
  248. +#define SVR_G4440 0x868101
  249. +#define SVR_B4420 0x868102
  250. +#define SVR_B4220 0x868103
  251. +#define SVR_T1040 0x852000
  252. +#define SVR_T1041 0x852001
  253. +#define SVR_T1042 0x852002
  254. +#define SVR_T1020 0x852100
  255. +#define SVR_T1021 0x852101
  256. +#define SVR_T1022 0x852102
  257. +#define SVR_T2080 0x853000
  258. +#define SVR_T2081 0x853100
  259. +
  260. +#define SVR_8610 0x80A000
  261. +#define SVR_8641 0x809000
  262. +#define SVR_8641D 0x809001
  263. +
  264. +#define SVR_9130 0x860001
  265. +#define SVR_9131 0x860000
  266. +#define SVR_9132 0x861000
  267. +#define SVR_9232 0x861400
  268. +
  269. +#define SVR_Unknown 0xFFFFFF
  270. +
  271. +#endif