bcm63xx_cpu.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. #ifndef BCM63XX_CPU_H_
  2. #define BCM63XX_CPU_H_
  3. #include <linux/types.h>
  4. #include <linux/init.h>
  5. /*
  6. * Macro to fetch bcm63xx cpu id and revision, should be optimized at
  7. * compile time if only one CPU support is enabled (idea stolen from
  8. * arm mach-types)
  9. */
  10. #define BCM6338_CPU_ID 0x6338
  11. #define BCM6345_CPU_ID 0x6345
  12. #define BCM6348_CPU_ID 0x6348
  13. #define BCM6358_CPU_ID 0x6358
  14. void __init bcm63xx_cpu_init(void);
  15. u16 __bcm63xx_get_cpu_id(void);
  16. u16 bcm63xx_get_cpu_rev(void);
  17. unsigned int bcm63xx_get_cpu_freq(void);
  18. #ifdef CONFIG_BCM63XX_CPU_6338
  19. # ifdef bcm63xx_get_cpu_id
  20. # undef bcm63xx_get_cpu_id
  21. # define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
  22. # define BCMCPU_RUNTIME_DETECT
  23. # else
  24. # define bcm63xx_get_cpu_id() BCM6338_CPU_ID
  25. # endif
  26. # define BCMCPU_IS_6338() (bcm63xx_get_cpu_id() == BCM6338_CPU_ID)
  27. #else
  28. # define BCMCPU_IS_6338() (0)
  29. #endif
  30. #ifdef CONFIG_BCM63XX_CPU_6345
  31. # ifdef bcm63xx_get_cpu_id
  32. # undef bcm63xx_get_cpu_id
  33. # define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
  34. # define BCMCPU_RUNTIME_DETECT
  35. # else
  36. # define bcm63xx_get_cpu_id() BCM6345_CPU_ID
  37. # endif
  38. # define BCMCPU_IS_6345() (bcm63xx_get_cpu_id() == BCM6345_CPU_ID)
  39. #else
  40. # define BCMCPU_IS_6345() (0)
  41. #endif
  42. #ifdef CONFIG_BCM63XX_CPU_6348
  43. # ifdef bcm63xx_get_cpu_id
  44. # undef bcm63xx_get_cpu_id
  45. # define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
  46. # define BCMCPU_RUNTIME_DETECT
  47. # else
  48. # define bcm63xx_get_cpu_id() BCM6348_CPU_ID
  49. # endif
  50. # define BCMCPU_IS_6348() (bcm63xx_get_cpu_id() == BCM6348_CPU_ID)
  51. #else
  52. # define BCMCPU_IS_6348() (0)
  53. #endif
  54. #ifdef CONFIG_BCM63XX_CPU_6358
  55. # ifdef bcm63xx_get_cpu_id
  56. # undef bcm63xx_get_cpu_id
  57. # define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
  58. # define BCMCPU_RUNTIME_DETECT
  59. # else
  60. # define bcm63xx_get_cpu_id() BCM6358_CPU_ID
  61. # endif
  62. # define BCMCPU_IS_6358() (bcm63xx_get_cpu_id() == BCM6358_CPU_ID)
  63. #else
  64. # define BCMCPU_IS_6358() (0)
  65. #endif
  66. #ifndef bcm63xx_get_cpu_id
  67. #error "No CPU support configured"
  68. #endif
  69. /*
  70. * While registers sets are (mostly) the same across 63xx CPU, base
  71. * address of these sets do change.
  72. */
  73. enum bcm63xx_regs_set {
  74. RSET_DSL_LMEM = 0,
  75. RSET_PERF,
  76. RSET_TIMER,
  77. RSET_WDT,
  78. RSET_UART0,
  79. RSET_UART1,
  80. RSET_GPIO,
  81. RSET_SPI,
  82. RSET_UDC0,
  83. RSET_OHCI0,
  84. RSET_OHCI_PRIV,
  85. RSET_USBH_PRIV,
  86. RSET_MPI,
  87. RSET_PCMCIA,
  88. RSET_DSL,
  89. RSET_ENET0,
  90. RSET_ENET1,
  91. RSET_ENETDMA,
  92. RSET_EHCI0,
  93. RSET_SDRAM,
  94. RSET_MEMC,
  95. RSET_DDR,
  96. };
  97. #define RSET_DSL_LMEM_SIZE (64 * 1024 * 4)
  98. #define RSET_DSL_SIZE 4096
  99. #define RSET_WDT_SIZE 12
  100. #define RSET_ENET_SIZE 2048
  101. #define RSET_ENETDMA_SIZE 2048
  102. #define RSET_UART_SIZE 24
  103. #define RSET_UDC_SIZE 256
  104. #define RSET_OHCI_SIZE 256
  105. #define RSET_EHCI_SIZE 256
  106. #define RSET_PCMCIA_SIZE 12
  107. /*
  108. * 6338 register sets base address
  109. */
  110. #define BCM_6338_DSL_LMEM_BASE (0xfff00000)
  111. #define BCM_6338_PERF_BASE (0xfffe0000)
  112. #define BCM_6338_BB_BASE (0xfffe0100)
  113. #define BCM_6338_TIMER_BASE (0xfffe0200)
  114. #define BCM_6338_WDT_BASE (0xfffe021c)
  115. #define BCM_6338_UART0_BASE (0xfffe0300)
  116. #define BCM_6338_UART1_BASE (0xdeadbeef)
  117. #define BCM_6338_GPIO_BASE (0xfffe0400)
  118. #define BCM_6338_SPI_BASE (0xfffe0c00)
  119. #define BCM_6338_UDC0_BASE (0xdeadbeef)
  120. #define BCM_6338_USBDMA_BASE (0xfffe2400)
  121. #define BCM_6338_OHCI0_BASE (0xdeadbeef)
  122. #define BCM_6338_OHCI_PRIV_BASE (0xfffe3000)
  123. #define BCM_6338_USBH_PRIV_BASE (0xdeadbeef)
  124. #define BCM_6338_MPI_BASE (0xfffe3160)
  125. #define BCM_6338_PCMCIA_BASE (0xdeadbeef)
  126. #define BCM_6338_SDRAM_REGS_BASE (0xfffe3100)
  127. #define BCM_6338_DSL_BASE (0xfffe1000)
  128. #define BCM_6338_SAR_BASE (0xfffe2000)
  129. #define BCM_6338_UBUS_BASE (0xdeadbeef)
  130. #define BCM_6338_ENET0_BASE (0xfffe2800)
  131. #define BCM_6338_ENET1_BASE (0xdeadbeef)
  132. #define BCM_6338_ENETDMA_BASE (0xfffe2400)
  133. #define BCM_6338_EHCI0_BASE (0xdeadbeef)
  134. #define BCM_6338_SDRAM_BASE (0xfffe3100)
  135. #define BCM_6338_MEMC_BASE (0xdeadbeef)
  136. #define BCM_6338_DDR_BASE (0xdeadbeef)
  137. /*
  138. * 6345 register sets base address
  139. */
  140. #define BCM_6345_DSL_LMEM_BASE (0xfff00000)
  141. #define BCM_6345_PERF_BASE (0xfffe0000)
  142. #define BCM_6345_BB_BASE (0xfffe0100)
  143. #define BCM_6345_TIMER_BASE (0xfffe0200)
  144. #define BCM_6345_WDT_BASE (0xfffe021c)
  145. #define BCM_6345_UART0_BASE (0xfffe0300)
  146. #define BCM_6345_UART1_BASE (0xdeadbeef)
  147. #define BCM_6345_GPIO_BASE (0xfffe0400)
  148. #define BCM_6345_SPI_BASE (0xdeadbeef)
  149. #define BCM_6345_UDC0_BASE (0xdeadbeef)
  150. #define BCM_6345_USBDMA_BASE (0xfffe2800)
  151. #define BCM_6345_ENET0_BASE (0xfffe1800)
  152. #define BCM_6345_ENETDMA_BASE (0xfffe2800)
  153. #define BCM_6345_PCMCIA_BASE (0xfffe2028)
  154. #define BCM_6345_MPI_BASE (0xdeadbeef)
  155. #define BCM_6345_OHCI0_BASE (0xfffe2100)
  156. #define BCM_6345_OHCI_PRIV_BASE (0xfffe2200)
  157. #define BCM_6345_USBH_PRIV_BASE (0xdeadbeef)
  158. #define BCM_6345_SDRAM_REGS_BASE (0xfffe2300)
  159. #define BCM_6345_DSL_BASE (0xdeadbeef)
  160. #define BCM_6345_SAR_BASE (0xdeadbeef)
  161. #define BCM_6345_UBUS_BASE (0xdeadbeef)
  162. #define BCM_6345_ENET1_BASE (0xdeadbeef)
  163. #define BCM_6345_EHCI0_BASE (0xdeadbeef)
  164. #define BCM_6345_SDRAM_BASE (0xfffe2300)
  165. #define BCM_6345_MEMC_BASE (0xdeadbeef)
  166. #define BCM_6345_DDR_BASE (0xdeadbeef)
  167. /*
  168. * 6348 register sets base address
  169. */
  170. #define BCM_6348_DSL_LMEM_BASE (0xfff00000)
  171. #define BCM_6348_PERF_BASE (0xfffe0000)
  172. #define BCM_6348_TIMER_BASE (0xfffe0200)
  173. #define BCM_6348_WDT_BASE (0xfffe021c)
  174. #define BCM_6348_UART0_BASE (0xfffe0300)
  175. #define BCM_6348_UART1_BASE (0xdeadbeef)
  176. #define BCM_6348_GPIO_BASE (0xfffe0400)
  177. #define BCM_6348_SPI_BASE (0xfffe0c00)
  178. #define BCM_6348_UDC0_BASE (0xfffe1000)
  179. #define BCM_6348_OHCI0_BASE (0xfffe1b00)
  180. #define BCM_6348_OHCI_PRIV_BASE (0xfffe1c00)
  181. #define BCM_6348_USBH_PRIV_BASE (0xdeadbeef)
  182. #define BCM_6348_MPI_BASE (0xfffe2000)
  183. #define BCM_6348_PCMCIA_BASE (0xfffe2054)
  184. #define BCM_6348_SDRAM_REGS_BASE (0xfffe2300)
  185. #define BCM_6348_DSL_BASE (0xfffe3000)
  186. #define BCM_6348_ENET0_BASE (0xfffe6000)
  187. #define BCM_6348_ENET1_BASE (0xfffe6800)
  188. #define BCM_6348_ENETDMA_BASE (0xfffe7000)
  189. #define BCM_6348_EHCI0_BASE (0xdeadbeef)
  190. #define BCM_6348_SDRAM_BASE (0xfffe2300)
  191. #define BCM_6348_MEMC_BASE (0xdeadbeef)
  192. #define BCM_6348_DDR_BASE (0xdeadbeef)
  193. /*
  194. * 6358 register sets base address
  195. */
  196. #define BCM_6358_DSL_LMEM_BASE (0xfff00000)
  197. #define BCM_6358_PERF_BASE (0xfffe0000)
  198. #define BCM_6358_TIMER_BASE (0xfffe0040)
  199. #define BCM_6358_WDT_BASE (0xfffe005c)
  200. #define BCM_6358_UART0_BASE (0xfffe0100)
  201. #define BCM_6358_UART1_BASE (0xfffe0120)
  202. #define BCM_6358_GPIO_BASE (0xfffe0080)
  203. #define BCM_6358_SPI_BASE (0xdeadbeef)
  204. #define BCM_6358_UDC0_BASE (0xfffe0800)
  205. #define BCM_6358_OHCI0_BASE (0xfffe1400)
  206. #define BCM_6358_OHCI_PRIV_BASE (0xdeadbeef)
  207. #define BCM_6358_USBH_PRIV_BASE (0xfffe1500)
  208. #define BCM_6358_MPI_BASE (0xfffe1000)
  209. #define BCM_6358_PCMCIA_BASE (0xfffe1054)
  210. #define BCM_6358_SDRAM_REGS_BASE (0xfffe2300)
  211. #define BCM_6358_DSL_BASE (0xfffe3000)
  212. #define BCM_6358_ENET0_BASE (0xfffe4000)
  213. #define BCM_6358_ENET1_BASE (0xfffe4800)
  214. #define BCM_6358_ENETDMA_BASE (0xfffe5000)
  215. #define BCM_6358_EHCI0_BASE (0xfffe1300)
  216. #define BCM_6358_SDRAM_BASE (0xdeadbeef)
  217. #define BCM_6358_MEMC_BASE (0xfffe1200)
  218. #define BCM_6358_DDR_BASE (0xfffe12a0)
  219. extern const unsigned long *bcm63xx_regs_base;
  220. static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set)
  221. {
  222. #ifdef BCMCPU_RUNTIME_DETECT
  223. return bcm63xx_regs_base[set];
  224. #else
  225. #ifdef CONFIG_BCM63XX_CPU_6338
  226. switch (set) {
  227. case RSET_DSL_LMEM:
  228. return BCM_6338_DSL_LMEM_BASE;
  229. case RSET_PERF:
  230. return BCM_6338_PERF_BASE;
  231. case RSET_TIMER:
  232. return BCM_6338_TIMER_BASE;
  233. case RSET_WDT:
  234. return BCM_6338_WDT_BASE;
  235. case RSET_UART0:
  236. return BCM_6338_UART0_BASE;
  237. case RSET_UART1:
  238. return BCM_6338_UART1_BASE;
  239. case RSET_GPIO:
  240. return BCM_6338_GPIO_BASE;
  241. case RSET_SPI:
  242. return BCM_6338_SPI_BASE;
  243. case RSET_UDC0:
  244. return BCM_6338_UDC0_BASE;
  245. case RSET_OHCI0:
  246. return BCM_6338_OHCI0_BASE;
  247. case RSET_OHCI_PRIV:
  248. return BCM_6338_OHCI_PRIV_BASE;
  249. case RSET_USBH_PRIV:
  250. return BCM_6338_USBH_PRIV_BASE;
  251. case RSET_MPI:
  252. return BCM_6338_MPI_BASE;
  253. case RSET_PCMCIA:
  254. return BCM_6338_PCMCIA_BASE;
  255. case RSET_DSL:
  256. return BCM_6338_DSL_BASE;
  257. case RSET_ENET0:
  258. return BCM_6338_ENET0_BASE;
  259. case RSET_ENET1:
  260. return BCM_6338_ENET1_BASE;
  261. case RSET_ENETDMA:
  262. return BCM_6338_ENETDMA_BASE;
  263. case RSET_EHCI0:
  264. return BCM_6338_EHCI0_BASE;
  265. case RSET_SDRAM:
  266. return BCM_6338_SDRAM_BASE;
  267. case RSET_MEMC:
  268. return BCM_6338_MEMC_BASE;
  269. case RSET_DDR:
  270. return BCM_6338_DDR_BASE;
  271. }
  272. #endif
  273. #ifdef CONFIG_BCM63XX_CPU_6345
  274. switch (set) {
  275. case RSET_DSL_LMEM:
  276. return BCM_6345_DSL_LMEM_BASE;
  277. case RSET_PERF:
  278. return BCM_6345_PERF_BASE;
  279. case RSET_TIMER:
  280. return BCM_6345_TIMER_BASE;
  281. case RSET_WDT:
  282. return BCM_6345_WDT_BASE;
  283. case RSET_UART0:
  284. return BCM_6345_UART0_BASE;
  285. case RSET_UART1:
  286. return BCM_6345_UART1_BASE;
  287. case RSET_GPIO:
  288. return BCM_6345_GPIO_BASE;
  289. case RSET_SPI:
  290. return BCM_6345_SPI_BASE;
  291. case RSET_UDC0:
  292. return BCM_6345_UDC0_BASE;
  293. case RSET_OHCI0:
  294. return BCM_6345_OHCI0_BASE;
  295. case RSET_OHCI_PRIV:
  296. return BCM_6345_OHCI_PRIV_BASE;
  297. case RSET_USBH_PRIV:
  298. return BCM_6345_USBH_PRIV_BASE;
  299. case RSET_MPI:
  300. return BCM_6345_MPI_BASE;
  301. case RSET_PCMCIA:
  302. return BCM_6345_PCMCIA_BASE;
  303. case RSET_DSL:
  304. return BCM_6345_DSL_BASE;
  305. case RSET_ENET0:
  306. return BCM_6345_ENET0_BASE;
  307. case RSET_ENET1:
  308. return BCM_6345_ENET1_BASE;
  309. case RSET_ENETDMA:
  310. return BCM_6345_ENETDMA_BASE;
  311. case RSET_EHCI0:
  312. return BCM_6345_EHCI0_BASE;
  313. case RSET_SDRAM:
  314. return BCM_6345_SDRAM_BASE;
  315. case RSET_MEMC:
  316. return BCM_6345_MEMC_BASE;
  317. case RSET_DDR:
  318. return BCM_6345_DDR_BASE;
  319. }
  320. #endif
  321. #ifdef CONFIG_BCM63XX_CPU_6348
  322. switch (set) {
  323. case RSET_DSL_LMEM:
  324. return BCM_6348_DSL_LMEM_BASE;
  325. case RSET_PERF:
  326. return BCM_6348_PERF_BASE;
  327. case RSET_TIMER:
  328. return BCM_6348_TIMER_BASE;
  329. case RSET_WDT:
  330. return BCM_6348_WDT_BASE;
  331. case RSET_UART0:
  332. return BCM_6348_UART0_BASE;
  333. case RSET_UART1:
  334. return BCM_6348_UART1_BASE;
  335. case RSET_GPIO:
  336. return BCM_6348_GPIO_BASE;
  337. case RSET_SPI:
  338. return BCM_6348_SPI_BASE;
  339. case RSET_UDC0:
  340. return BCM_6348_UDC0_BASE;
  341. case RSET_OHCI0:
  342. return BCM_6348_OHCI0_BASE;
  343. case RSET_OHCI_PRIV:
  344. return BCM_6348_OHCI_PRIV_BASE;
  345. case RSET_USBH_PRIV:
  346. return BCM_6348_USBH_PRIV_BASE;
  347. case RSET_MPI:
  348. return BCM_6348_MPI_BASE;
  349. case RSET_PCMCIA:
  350. return BCM_6348_PCMCIA_BASE;
  351. case RSET_DSL:
  352. return BCM_6348_DSL_BASE;
  353. case RSET_ENET0:
  354. return BCM_6348_ENET0_BASE;
  355. case RSET_ENET1:
  356. return BCM_6348_ENET1_BASE;
  357. case RSET_ENETDMA:
  358. return BCM_6348_ENETDMA_BASE;
  359. case RSET_EHCI0:
  360. return BCM_6348_EHCI0_BASE;
  361. case RSET_SDRAM:
  362. return BCM_6348_SDRAM_BASE;
  363. case RSET_MEMC:
  364. return BCM_6348_MEMC_BASE;
  365. case RSET_DDR:
  366. return BCM_6348_DDR_BASE;
  367. }
  368. #endif
  369. #ifdef CONFIG_BCM63XX_CPU_6358
  370. switch (set) {
  371. case RSET_DSL_LMEM:
  372. return BCM_6358_DSL_LMEM_BASE;
  373. case RSET_PERF:
  374. return BCM_6358_PERF_BASE;
  375. case RSET_TIMER:
  376. return BCM_6358_TIMER_BASE;
  377. case RSET_WDT:
  378. return BCM_6358_WDT_BASE;
  379. case RSET_UART0:
  380. return BCM_6358_UART0_BASE;
  381. case RSET_UART1:
  382. return BCM_6358_UART1_BASE;
  383. case RSET_GPIO:
  384. return BCM_6358_GPIO_BASE;
  385. case RSET_SPI:
  386. return BCM_6358_SPI_BASE;
  387. case RSET_UDC0:
  388. return BCM_6358_UDC0_BASE;
  389. case RSET_OHCI0:
  390. return BCM_6358_OHCI0_BASE;
  391. case RSET_OHCI_PRIV:
  392. return BCM_6358_OHCI_PRIV_BASE;
  393. case RSET_USBH_PRIV:
  394. return BCM_6358_USBH_PRIV_BASE;
  395. case RSET_MPI:
  396. return BCM_6358_MPI_BASE;
  397. case RSET_PCMCIA:
  398. return BCM_6358_PCMCIA_BASE;
  399. case RSET_ENET0:
  400. return BCM_6358_ENET0_BASE;
  401. case RSET_ENET1:
  402. return BCM_6358_ENET1_BASE;
  403. case RSET_ENETDMA:
  404. return BCM_6358_ENETDMA_BASE;
  405. case RSET_DSL:
  406. return BCM_6358_DSL_BASE;
  407. case RSET_EHCI0:
  408. return BCM_6358_EHCI0_BASE;
  409. case RSET_SDRAM:
  410. return BCM_6358_SDRAM_BASE;
  411. case RSET_MEMC:
  412. return BCM_6358_MEMC_BASE;
  413. case RSET_DDR:
  414. return BCM_6358_DDR_BASE;
  415. }
  416. #endif
  417. #endif
  418. /* unreached */
  419. return 0;
  420. }
  421. /*
  422. * IRQ number changes across CPU too
  423. */
  424. enum bcm63xx_irq {
  425. IRQ_TIMER = 0,
  426. IRQ_UART0,
  427. IRQ_UART1,
  428. IRQ_DSL,
  429. IRQ_ENET0,
  430. IRQ_ENET1,
  431. IRQ_ENET_PHY,
  432. IRQ_OHCI0,
  433. IRQ_EHCI0,
  434. IRQ_PCMCIA0,
  435. IRQ_ENET0_RXDMA,
  436. IRQ_ENET0_TXDMA,
  437. IRQ_ENET1_RXDMA,
  438. IRQ_ENET1_TXDMA,
  439. IRQ_PCI,
  440. IRQ_PCMCIA,
  441. };
  442. /*
  443. * 6338 irqs
  444. */
  445. #define BCM_6338_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
  446. #define BCM_6338_SPI_IRQ (IRQ_INTERNAL_BASE + 1)
  447. #define BCM_6338_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
  448. #define BCM_6338_DG_IRQ (IRQ_INTERNAL_BASE + 4)
  449. #define BCM_6338_DSL_IRQ (IRQ_INTERNAL_BASE + 5)
  450. #define BCM_6338_ATM_IRQ (IRQ_INTERNAL_BASE + 6)
  451. #define BCM_6338_UDC0_IRQ (IRQ_INTERNAL_BASE + 7)
  452. #define BCM_6338_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
  453. #define BCM_6338_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
  454. #define BCM_6338_SDRAM_IRQ (IRQ_INTERNAL_BASE + 10)
  455. #define BCM_6338_USB_CNTL_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 11)
  456. #define BCM_6338_USB_CNTL_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 12)
  457. #define BCM_6338_USB_BULK_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13)
  458. #define BCM_6338_USB_BULK_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 14)
  459. #define BCM_6338_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 15)
  460. #define BCM_6338_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 16)
  461. #define BCM_6338_SDIO_IRQ (IRQ_INTERNAL_BASE + 17)
  462. /*
  463. * 6345 irqs
  464. */
  465. #define BCM_6345_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
  466. #define BCM_6345_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
  467. #define BCM_6345_DSL_IRQ (IRQ_INTERNAL_BASE + 3)
  468. #define BCM_6345_ATM_IRQ (IRQ_INTERNAL_BASE + 4)
  469. #define BCM_6345_USB_IRQ (IRQ_INTERNAL_BASE + 5)
  470. #define BCM_6345_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
  471. #define BCM_6345_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12)
  472. #define BCM_6345_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 1)
  473. #define BCM_6345_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 2)
  474. #define BCM_6345_EBI_RX_IRQ (IRQ_INTERNAL_BASE + 13 + 5)
  475. #define BCM_6345_EBI_TX_IRQ (IRQ_INTERNAL_BASE + 13 + 6)
  476. #define BCM_6345_RESERVED_RX_IRQ (IRQ_INTERNAL_BASE + 13 + 9)
  477. #define BCM_6345_RESERVED_TX_IRQ (IRQ_INTERNAL_BASE + 13 + 10)
  478. #define BCM_6345_USB_BULK_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 13)
  479. #define BCM_6345_USB_BULK_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 14)
  480. #define BCM_6345_USB_CNTL_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 15)
  481. #define BCM_6345_USB_CNTL_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 16)
  482. #define BCM_6345_USB_ISO_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 17)
  483. #define BCM_6345_USB_ISO_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 18)
  484. /*
  485. * 6348 irqs
  486. */
  487. #define BCM_6348_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
  488. #define BCM_6348_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
  489. #define BCM_6348_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
  490. #define BCM_6348_ENET1_IRQ (IRQ_INTERNAL_BASE + 7)
  491. #define BCM_6348_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
  492. #define BCM_6348_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
  493. #define BCM_6348_OHCI0_IRQ (IRQ_INTERNAL_BASE + 12)
  494. #define BCM_6348_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 20)
  495. #define BCM_6348_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 21)
  496. #define BCM_6348_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 22)
  497. #define BCM_6348_ENET1_TXDMA_IRQ (IRQ_INTERNAL_BASE + 23)
  498. #define BCM_6348_PCMCIA_IRQ (IRQ_INTERNAL_BASE + 24)
  499. #define BCM_6348_PCI_IRQ (IRQ_INTERNAL_BASE + 24)
  500. /*
  501. * 6358 irqs
  502. */
  503. #define BCM_6358_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
  504. #define BCM_6358_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
  505. #define BCM_6358_UART1_IRQ (IRQ_INTERNAL_BASE + 3)
  506. #define BCM_6358_OHCI0_IRQ (IRQ_INTERNAL_BASE + 5)
  507. #define BCM_6358_ENET1_IRQ (IRQ_INTERNAL_BASE + 6)
  508. #define BCM_6358_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
  509. #define BCM_6358_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
  510. #define BCM_6358_EHCI0_IRQ (IRQ_INTERNAL_BASE + 10)
  511. #define BCM_6358_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 15)
  512. #define BCM_6358_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 16)
  513. #define BCM_6358_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 17)
  514. #define BCM_6358_ENET1_TXDMA_IRQ (IRQ_INTERNAL_BASE + 18)
  515. #define BCM_6358_DSL_IRQ (IRQ_INTERNAL_BASE + 29)
  516. #define BCM_6358_PCI_IRQ (IRQ_INTERNAL_BASE + 31)
  517. #define BCM_6358_PCMCIA_IRQ (IRQ_INTERNAL_BASE + 24)
  518. extern const int *bcm63xx_irqs;
  519. static inline int bcm63xx_get_irq_number(enum bcm63xx_irq irq)
  520. {
  521. return bcm63xx_irqs[irq];
  522. }
  523. /*
  524. * return installed memory size
  525. */
  526. unsigned int bcm63xx_get_memory_size(void);
  527. #endif /* !BCM63XX_CPU_H_ */