bcm63xx_cpu.h 15 KB

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