immap_512x.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. /*
  2. * (C) Copyright 2007 DENX Software Engineering
  3. *
  4. * MPC512x Internal Memory Map
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (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,
  19. * MA 02111-1307 USA
  20. *
  21. * Based on the MPC83xx header.
  22. */
  23. #ifndef __IMMAP_512x__
  24. #define __IMMAP_512x__
  25. #include <asm/types.h>
  26. typedef struct law512x {
  27. u32 bar; /* Base Addr Register */
  28. u32 ar; /* Attributes Register */
  29. } law512x_t;
  30. /*
  31. * System configuration registers
  32. */
  33. typedef struct sysconf512x {
  34. u32 immrbar; /* Internal memory map base address register */
  35. u8 res0[0x1c];
  36. u32 lpbaw; /* LP Boot Access Window */
  37. u32 lpcs0aw; /* LP CS0 Access Window */
  38. u32 lpcs1aw; /* LP CS1 Access Window */
  39. u32 lpcs2aw; /* LP CS2 Access Window */
  40. u32 lpcs3aw; /* LP CS3 Access Window */
  41. u32 lpcs4aw; /* LP CS4 Access Window */
  42. u32 lpcs5aw; /* LP CS5 Access Window */
  43. u32 lpcs6aw; /* LP CS6 Access Window */
  44. u32 lpcs7aw; /* LP CS7 Access Window */
  45. u8 res1[0x1c];
  46. law512x_t pcilaw[3]; /* PCI Local Access Window 0-2 Registers */
  47. u8 res2[0x28];
  48. law512x_t ddrlaw; /* DDR Local Access Window */
  49. u8 res3[0x18];
  50. u32 mbxbar; /* MBX Base Address */
  51. u32 srambar; /* SRAM Base Address */
  52. u32 nfcbar; /* NFC Base Address */
  53. u8 res4[0x34];
  54. u32 spridr; /* System Part and Revision ID Register */
  55. u32 spcr; /* System Priority Configuration Register */
  56. u8 res5[0xf8];
  57. } sysconf512x_t;
  58. /*
  59. * Watch Dog Timer (WDT) Registers
  60. */
  61. typedef struct wdt512x {
  62. u8 res0[4];
  63. u32 swcrr; /* System watchdog control register */
  64. u32 swcnr; /* System watchdog count register */
  65. u8 res1[2];
  66. u16 swsrr; /* System watchdog service register */
  67. u8 res2[0xF0];
  68. } wdt512x_t;
  69. /*
  70. * RTC Module Registers
  71. */
  72. typedef struct rtclk512x {
  73. u8 fixme[0x100];
  74. } rtclk512x_t;
  75. /*
  76. * General Purpose Timer
  77. */
  78. typedef struct gpt512x {
  79. u8 fixme[0x100];
  80. } gpt512x_t;
  81. /*
  82. * Integrated Programmable Interrupt Controller
  83. */
  84. typedef struct ipic512x {
  85. u8 fixme[0x100];
  86. } ipic512x_t;
  87. /*
  88. * System Arbiter Registers
  89. */
  90. typedef struct arbiter512x {
  91. u32 acr; /* Arbiter Configuration Register */
  92. u32 atr; /* Arbiter Timers Register */
  93. u32 ater; /* Arbiter Transfer Error Register */
  94. u32 aer; /* Arbiter Event Register */
  95. u32 aidr; /* Arbiter Interrupt Definition Register */
  96. u32 amr; /* Arbiter Mask Register */
  97. u32 aeatr; /* Arbiter Event Attributes Register */
  98. u32 aeadr; /* Arbiter Event Address Register */
  99. u32 aerr; /* Arbiter Event Response Register */
  100. u8 res1[0xDC];
  101. } arbiter512x_t;
  102. /*
  103. * Reset Module
  104. */
  105. typedef struct reset512x {
  106. u32 rcwl; /* Reset Configuration Word Low Register */
  107. u32 rcwh; /* Reset Configuration Word High Register */
  108. u8 res0[8];
  109. u32 rsr; /* Reset Status Register */
  110. u32 rmr; /* Reset Mode Register */
  111. u32 rpr; /* Reset protection Register */
  112. u32 rcr; /* Reset Control Register */
  113. u32 rcer; /* Reset Control Enable Register */
  114. u8 res1[0xDC];
  115. } reset512x_t;
  116. /*
  117. * Clock Module
  118. */
  119. typedef struct clk512x {
  120. u32 spmr; /* System PLL Mode Register */
  121. u32 sccr[2]; /* System Clock Control Registers */
  122. u32 scfr[2]; /* System Clock Frequency Registers */
  123. u8 res0[4];
  124. u32 bcr; /* Bread Crumb Register */
  125. u32 pscccr[12]; /* PSC0-11 Clock Control Registers */
  126. u32 spccr; /* SPDIF Clock Control Registers */
  127. u32 cccr; /* CFM Clock Control Registers */
  128. u32 dccr; /* DIU Clock Control Registers */
  129. u8 res1[0xa8];
  130. } clk512x_t;
  131. /*
  132. * Power Management Control Module
  133. */
  134. typedef struct pmc512x {
  135. u8 fixme[0x100];
  136. } pmc512x_t;
  137. /*
  138. * General purpose I/O module
  139. */
  140. typedef struct gpio512x {
  141. u8 fixme[0x100];
  142. } gpio512x_t;
  143. /*
  144. * DDR Memory Controller Memory Map
  145. */
  146. typedef struct ddr512x {
  147. u32 ddr_sys_config; /* System Configuration Register */
  148. u32 ddr_time_config0; /* Timing Configuration Register */
  149. u32 ddr_time_config1; /* Timing Configuration Register */
  150. u32 ddr_time_config2; /* Timing Configuration Register */
  151. u32 ddr_command; /* Command Register */
  152. u32 ddr_compact_command; /* Compact Command Register */
  153. u32 self_refresh_cmd_0; /* Enter/Exit Self Refresh Registers */
  154. u32 self_refresh_cmd_1; /* Enter/Exit Self Refresh Registers */
  155. u32 self_refresh_cmd_2; /* Enter/Exit Self Refresh Registers */
  156. u32 self_refresh_cmd_3; /* Enter/Exit Self Refresh Registers */
  157. u32 self_refresh_cmd_4; /* Enter/Exit Self Refresh Registers */
  158. u32 self_refresh_cmd_5; /* Enter/Exit Self Refresh Registers */
  159. u32 self_refresh_cmd_6; /* Enter/Exit Self Refresh Registers */
  160. u32 self_refresh_cmd_7; /* Enter/Exit Self Refresh Registers */
  161. u32 DQS_config_offset_count; /* DQS Config Offset Count */
  162. u32 DQS_config_offset_time; /* DQS Config Offset Time */
  163. u32 DQS_delay_status; /* DQS Delay Status */
  164. u32 res0[0xF];
  165. u32 prioman_config1; /* Priority Manager Configuration */
  166. u32 prioman_config2; /* Priority Manager Configuration */
  167. u32 hiprio_config; /* High Priority Configuration */
  168. u32 lut_table0_main_upper; /* LUT0 Main Upper */
  169. u32 lut_table1_main_upper; /* LUT1 Main Upper */
  170. u32 lut_table2_main_upper; /* LUT2 Main Upper */
  171. u32 lut_table3_main_upper; /* LUT3 Main Upper */
  172. u32 lut_table4_main_upper; /* LUT4 Main Upper */
  173. u32 lut_table0_main_lower; /* LUT0 Main Lower */
  174. u32 lut_table1_main_lower; /* LUT1 Main Lower */
  175. u32 lut_table2_main_lower; /* LUT2 Main Lower */
  176. u32 lut_table3_main_lower; /* LUT3 Main Lower */
  177. u32 lut_table4_main_lower; /* LUT4 Main Lower */
  178. u32 lut_table0_alternate_upper; /* LUT0 Alternate Upper */
  179. u32 lut_table1_alternate_upper; /* LUT1 Alternate Upper */
  180. u32 lut_table2_alternate_upper; /* LUT2 Alternate Upper */
  181. u32 lut_table3_alternate_upper; /* LUT3 Alternate Upper */
  182. u32 lut_table4_alternate_upper; /* LUT4 Alternate Upper */
  183. u32 lut_table0_alternate_lower; /* LUT0 Alternate Lower */
  184. u32 lut_table1_alternate_lower; /* LUT1 Alternate Lower */
  185. u32 lut_table2_alternate_lower; /* LUT2 Alternate Lower */
  186. u32 lut_table3_alternate_lower; /* LUT3 Alternate Lower */
  187. u32 lut_table4_alternate_lower; /* LUT4 Alternate Lower */
  188. u32 performance_monitor_config;
  189. u32 event_time_counter;
  190. u32 event_time_preset;
  191. u32 performance_monitor1_address_low;
  192. u32 performance_monitor2_address_low;
  193. u32 performance_monitor1_address_hi;
  194. u32 performance_monitor2_address_hi;
  195. u32 res1[2];
  196. u32 performance_monitor1_read_counter;
  197. u32 performance_monitor2_read_counter;
  198. u32 performance_monitor1_write_counter;
  199. u32 performance_monitor2_write_counter;
  200. u32 granted_ack_counter0;
  201. u32 granted_ack_counter1;
  202. u32 granted_ack_counter2;
  203. u32 granted_ack_counter3;
  204. u32 granted_ack_counter4;
  205. u32 cumulative_wait_counter0;
  206. u32 cumulative_wait_counter1;
  207. u32 cumulative_wait_counter2;
  208. u32 cumulative_wait_counter3;
  209. u32 cumulative_wait_counter4;
  210. u32 summed_priority_counter0;
  211. u32 summed_priority_counter1;
  212. u32 summed_priority_counter2;
  213. u32 summed_priority_counter3;
  214. u32 summed_priority_counter4;
  215. u32 res2[0x3AD];
  216. } ddr512x_t;
  217. /*
  218. * DMA/Messaging Unit
  219. */
  220. typedef struct dma512x {
  221. u8 fixme[0x1800];
  222. } dma512x_t;
  223. /*
  224. * PCI Software Configuration Registers
  225. */
  226. typedef struct pciconf512x {
  227. u32 config_address;
  228. u32 config_data;
  229. u32 int_ack;
  230. u8 res[116];
  231. } pciconf512x_t;
  232. /*
  233. * PCI Outbound Translation Register
  234. */
  235. typedef struct pci_outbound_window {
  236. u32 potar;
  237. u8 res0[4];
  238. u32 pobar;
  239. u8 res1[4];
  240. u32 pocmr;
  241. u8 res2[4];
  242. } pot512x_t;
  243. /*
  244. * Sequencer
  245. */
  246. typedef struct ios512x {
  247. pot512x_t pot[6];
  248. u8 res0[0x60];
  249. u32 pmcr;
  250. u8 res1[4];
  251. u32 dtcr;
  252. u8 res2[4];
  253. } ios512x_t;
  254. /*
  255. * PCI Controller
  256. */
  257. typedef struct pcictrl512x {
  258. u32 esr;
  259. u32 ecdr;
  260. u32 eer;
  261. u32 eatcr;
  262. u32 eacr;
  263. u32 eeacr;
  264. u32 edlcr;
  265. u32 edhcr;
  266. u32 gcr;
  267. u32 ecr;
  268. u32 gsr;
  269. u8 res0[12];
  270. u32 pitar2;
  271. u8 res1[4];
  272. u32 pibar2;
  273. u32 piebar2;
  274. u32 piwar2;
  275. u8 res2[4];
  276. u32 pitar1;
  277. u8 res3[4];
  278. u32 pibar1;
  279. u32 piebar1;
  280. u32 piwar1;
  281. u8 res4[4];
  282. u32 pitar0;
  283. u8 res5[4];
  284. u32 pibar0;
  285. u8 res6[4];
  286. u32 piwar0;
  287. u8 res7[132];
  288. } pcictrl512x_t;
  289. /*
  290. * MSCAN
  291. */
  292. typedef struct mscan512x {
  293. u8 fixme[0x100];
  294. } mscan512x_t;
  295. /*
  296. * BDLC
  297. */
  298. typedef struct bdlc512x {
  299. u8 fixme[0x100];
  300. } bdlc512x_t;
  301. /*
  302. * SDHC
  303. */
  304. typedef struct sdhc512x {
  305. u8 fixme[0x100];
  306. } sdhc512x_t;
  307. /*
  308. * SPDIF
  309. */
  310. typedef struct spdif512x {
  311. u8 fixme[0x100];
  312. } spdif512x_t;
  313. /*
  314. * I2C
  315. */
  316. typedef struct i2c512x_dev {
  317. volatile u32 madr; /* I2Cn + 0x00 */
  318. volatile u32 mfdr; /* I2Cn + 0x04 */
  319. volatile u32 mcr; /* I2Cn + 0x08 */
  320. volatile u32 msr; /* I2Cn + 0x0C */
  321. volatile u32 mdr; /* I2Cn + 0x10 */
  322. u8 res0[0x0C];
  323. } i2c512x_dev_t;
  324. typedef struct i2c512x {
  325. i2c512x_dev_t dev[3];
  326. volatile u32 icr;
  327. volatile u32 mifr;
  328. u8 res0[0x98];
  329. } i2c512x_t;
  330. /*
  331. * AXE
  332. */
  333. typedef struct axe512x {
  334. u8 fixme[0x100];
  335. } axe512x_t;
  336. /*
  337. * DIU
  338. */
  339. typedef struct diu512x {
  340. u8 fixme[0x100];
  341. } diu512x_t;
  342. /*
  343. * CFM
  344. */
  345. typedef struct cfm512x {
  346. u8 fixme[0x100];
  347. } cfm512x_t;
  348. /*
  349. * FEC
  350. */
  351. typedef struct fec512x {
  352. u8 fixme[0x800];
  353. } fec512x_t;
  354. /*
  355. * ULPI
  356. */
  357. typedef struct ulpi512x {
  358. u8 fixme[0x600];
  359. } ulpi512x_t;
  360. /*
  361. * UTMI
  362. */
  363. typedef struct utmi512x {
  364. u8 fixme[0x3000];
  365. } utmi512x_t;
  366. /*
  367. * PCI DMA
  368. */
  369. typedef struct pcidma512x {
  370. u8 fixme[0x300];
  371. } pcidma512x_t;
  372. /*
  373. * IO Control
  374. */
  375. typedef struct ioctrl512x {
  376. u32 regs[0x400];
  377. } ioctrl512x_t;
  378. /*
  379. * IIM
  380. */
  381. typedef struct iim512x {
  382. u32 stat; /* IIM status register */
  383. u32 statm; /* IIM status IRQ mask */
  384. u32 err; /* IIM errors register */
  385. u32 emask; /* IIM error IRQ mask */
  386. u32 fctl; /* IIM fuse control register */
  387. u32 ua; /* IIM upper address register */
  388. u32 la; /* IIM lower address register */
  389. u32 sdat; /* IIM explicit sense data */
  390. u8 res0[0x08];
  391. u32 prg_p; /* IIM program protection register */
  392. u8 res1[0x10];
  393. u32 divide; /* IIM divide factor register */
  394. u8 res2[0x7c0];
  395. u32 fbac0; /* IIM fuse bank 0 prot (for Freescale use) */
  396. u32 fb0w0[0x1f]; /* IIM fuse bank 0 data (for Freescale use) */
  397. u8 res3[0x380];
  398. u32 fbac1; /* IIM fuse bank 1 protection */
  399. u32 fb1w1[0x01f]; /* IIM fuse bank 1 data */
  400. u8 res4[0x380];
  401. } iim512x_t;
  402. /*
  403. * LPC
  404. */
  405. typedef struct lpc512x {
  406. u32 cs_cfg[8]; /* Chip Select N Configuration Registers
  407. No dedicated entry for CS Boot as == CS0 */
  408. u32 cs_cr; /* Chip Select Control Register */
  409. u32 cs_sr; /* Chip Select Status Register */
  410. u32 cs_bcr; /* Chip Select Burst Control Register */
  411. u32 cs_dccr; /* Chip Select Deadcycle Control Register */
  412. u32 cs_hccr; /* Chip Select Holdcycle Control Register */
  413. u8 res0[0xcc];
  414. u32 sclpc_psr; /* SCLPC Packet Size Register */
  415. u32 sclpc_sar; /* SCLPC Start Address Register */
  416. u32 sclpc_cr; /* SCLPC Control Register */
  417. u32 sclpc_er; /* SCLPC Enable Register */
  418. u32 sclpc_nar; /* SCLPC NextAddress Register */
  419. u32 sclpc_sr; /* SCLPC Status Register */
  420. u32 sclpc_bdr; /* SCLPC Bytes Done Register */
  421. u32 emb_scr; /* EMB Share Counter Register */
  422. u32 emb_pcr; /* EMB Pause Control Register */
  423. u8 res1[0x1c];
  424. u32 lpc_fdwr; /* LPC RX/TX FIFO Data Word Register */
  425. u32 lpc_fsr; /* LPC RX/TX FIFO Status Register */
  426. u32 lpc_cr; /* LPC RX/TX FIFO Control Register */
  427. u32 lpc_ar; /* LPC RX/TX FIFO Alarm Register */
  428. u8 res2[0xb0];
  429. } lpc512x_t;
  430. /*
  431. * PATA
  432. */
  433. typedef struct pata512x {
  434. /* LOCAL Registers */
  435. u32 pata_time1; /* Time register 1: PIO and tx timing parameter */
  436. u32 pata_time2; /* Time register 2: PIO timing parameter */
  437. u32 pata_time3; /* Time register 3: PIO and MDMA timing parameter */
  438. u32 pata_time4; /* Time register 4: MDMA and UDMA timing parameter */
  439. u32 pata_time5; /* Time register 5: UDMA timing parameter */
  440. u32 pata_time6; /* Time register 6: UDMA timing parameter */
  441. u32 pata_fifo_data32; /* 32bit wide dataport to/from FIFO */
  442. u32 pata_fifo_data16; /* 16bit wide dataport to/from FIFO */
  443. u32 pata_fifo_fill; /* FIFO filling in halfwords (READONLY)*/
  444. u32 pata_ata_control; /* ATA Interface control register */
  445. u32 pata_irq_pending; /* Interrupt pending register (READONLY) */
  446. u32 pata_irq_enable; /* Interrupt enable register */
  447. u32 pata_irq_clear; /* Interrupt clear register (WRITEONLY)*/
  448. u32 pata_fifo_alarm; /* fifo alarm threshold */
  449. u32 res1[0x1A];
  450. /* DRIVE Registers */
  451. u32 pata_drive_data; /* drive data register*/
  452. u32 pata_drive_features;/* drive features register */
  453. u32 pata_drive_sectcnt; /* drive sector count register */
  454. u32 pata_drive_sectnum; /* drive sector number register */
  455. u32 pata_drive_cyllow; /* drive cylinder low register */
  456. u32 pata_drive_cylhigh; /* drive cylinder high register */
  457. u32 pata_drive_dev_head;/* drive device head register */
  458. u32 pata_drive_command; /* write = drive command, read = drive status reg */
  459. u32 res2[0x06];
  460. u32 pata_drive_alt_stat;/* write = drive control, read = drive alt status reg */
  461. u32 res3[0x09];
  462. } pata512x_t;
  463. /*
  464. * PSC
  465. */
  466. typedef struct psc512x {
  467. volatile u8 mode; /* PSC + 0x00 */
  468. volatile u8 res0[3];
  469. union { /* PSC + 0x04 */
  470. volatile u16 status;
  471. volatile u16 clock_select;
  472. } sr_csr;
  473. #define psc_status sr_csr.status
  474. #define psc_clock_select sr_csr.clock_select
  475. volatile u16 res1;
  476. volatile u8 command; /* PSC + 0x08 */
  477. volatile u8 res2[3];
  478. union { /* PSC + 0x0c */
  479. volatile u8 buffer_8;
  480. volatile u16 buffer_16;
  481. volatile u32 buffer_32;
  482. } buffer;
  483. #define psc_buffer_8 buffer.buffer_8
  484. #define psc_buffer_16 buffer.buffer_16
  485. #define psc_buffer_32 buffer.buffer_32
  486. union { /* PSC + 0x10 */
  487. volatile u8 ipcr;
  488. volatile u8 acr;
  489. } ipcr_acr;
  490. #define psc_ipcr ipcr_acr.ipcr
  491. #define psc_acr ipcr_acr.acr
  492. volatile u8 res3[3];
  493. union { /* PSC + 0x14 */
  494. volatile u16 isr;
  495. volatile u16 imr;
  496. } isr_imr;
  497. #define psc_isr isr_imr.isr
  498. #define psc_imr isr_imr.imr
  499. volatile u16 res4;
  500. volatile u8 ctur; /* PSC + 0x18 */
  501. volatile u8 res5[3];
  502. volatile u8 ctlr; /* PSC + 0x1c */
  503. volatile u8 res6[3];
  504. volatile u32 ccr; /* PSC + 0x20 */
  505. volatile u8 res7[12];
  506. volatile u8 ivr; /* PSC + 0x30 */
  507. volatile u8 res8[3];
  508. volatile u8 ip; /* PSC + 0x34 */
  509. volatile u8 res9[3];
  510. volatile u8 op1; /* PSC + 0x38 */
  511. volatile u8 res10[3];
  512. volatile u8 op0; /* PSC + 0x3c */
  513. volatile u8 res11[3];
  514. volatile u32 sicr; /* PSC + 0x40 */
  515. volatile u8 res12[60];
  516. volatile u32 tfcmd; /* PSC + 0x80 */
  517. volatile u32 tfalarm; /* PSC + 0x84 */
  518. volatile u32 tfstat; /* PSC + 0x88 */
  519. volatile u32 tfintstat; /* PSC + 0x8C */
  520. volatile u32 tfintmask; /* PSC + 0x90 */
  521. volatile u32 tfcount; /* PSC + 0x94 */
  522. volatile u16 tfwptr; /* PSC + 0x98 */
  523. volatile u16 tfrptr; /* PSC + 0x9A */
  524. volatile u32 tfsize; /* PSC + 0x9C */
  525. volatile u8 res13[28];
  526. union { /* PSC + 0xBC */
  527. volatile u8 buffer_8;
  528. volatile u16 buffer_16;
  529. volatile u32 buffer_32;
  530. } tfdata_buffer;
  531. #define tfdata_8 tfdata_buffer.buffer_8
  532. #define tfdata_16 tfdata_buffer.buffer_16
  533. #define tfdata_32 tfdata_buffer.buffer_32
  534. volatile u32 rfcmd; /* PSC + 0xC0 */
  535. volatile u32 rfalarm; /* PSC + 0xC4 */
  536. volatile u32 rfstat; /* PSC + 0xC8 */
  537. volatile u32 rfintstat; /* PSC + 0xCC */
  538. volatile u32 rfintmask; /* PSC + 0xD0 */
  539. volatile u32 rfcount; /* PSC + 0xD4 */
  540. volatile u16 rfwptr; /* PSC + 0xD8 */
  541. volatile u16 rfrptr; /* PSC + 0xDA */
  542. volatile u32 rfsize; /* PSC + 0xDC */
  543. volatile u8 res18[28];
  544. union { /* PSC + 0xFC */
  545. volatile u8 buffer_8;
  546. volatile u16 buffer_16;
  547. volatile u32 buffer_32;
  548. } rfdata_buffer;
  549. #define rfdata_8 rfdata_buffer.buffer_8
  550. #define rfdata_16 rfdata_buffer.buffer_16
  551. #define rfdata_32 rfdata_buffer.buffer_32
  552. } psc512x_t;
  553. /*
  554. * FIFOC
  555. */
  556. typedef struct fifoc512x {
  557. u32 fifoc_cmd;
  558. u32 fifoc_int;
  559. u32 fifoc_dma;
  560. u32 fifoc_axe;
  561. u32 fifoc_debug;
  562. u8 fixme[0xEC];
  563. } fifoc512x_t;
  564. /*
  565. * SATA
  566. */
  567. typedef struct sata512x {
  568. u8 fixme[0x2000];
  569. } sata512x_t;
  570. typedef struct immap {
  571. sysconf512x_t sysconf; /* System configuration */
  572. u8 res0[0x700];
  573. wdt512x_t wdt; /* Watch Dog Timer (WDT) */
  574. rtclk512x_t rtc; /* Real Time Clock Module */
  575. gpt512x_t gpt; /* General Purpose Timer */
  576. ipic512x_t ipic; /* Integrated Programmable Interrupt Controller */
  577. arbiter512x_t arbiter; /* CSB Arbiter */
  578. reset512x_t reset; /* Reset Module */
  579. clk512x_t clk; /* Clock Module */
  580. pmc512x_t pmc; /* Power Management Control Module */
  581. gpio512x_t gpio; /* General purpose I/O module */
  582. u8 res1[0x100];
  583. mscan512x_t mscan; /* MSCAN */
  584. bdlc512x_t bdlc; /* BDLC */
  585. sdhc512x_t sdhc; /* SDHC */
  586. spdif512x_t spdif; /* SPDIF */
  587. i2c512x_t i2c; /* I2C Controllers */
  588. u8 res2[0x800];
  589. axe512x_t axe; /* AXE */
  590. diu512x_t diu; /* Display Interface Unit */
  591. cfm512x_t cfm; /* Clock Frequency Measurement */
  592. u8 res3[0x500];
  593. fec512x_t fec; /* Fast Ethernet Controller */
  594. ulpi512x_t ulpi; /* USB ULPI */
  595. u8 res4[0xa00];
  596. utmi512x_t utmi; /* USB UTMI */
  597. u8 res5[0x1000];
  598. pcidma512x_t pci_dma; /* PCI DMA */
  599. pciconf512x_t pci_conf; /* PCI Configuration */
  600. u8 res6[0x80];
  601. ios512x_t ios; /* PCI Sequencer */
  602. pcictrl512x_t pci_ctrl; /* PCI Controller Control and Status */
  603. u8 res7[0xa00];
  604. ddr512x_t mddrc; /* Multi-port DDR Memory Controller */
  605. ioctrl512x_t io_ctrl; /* IO Control */
  606. iim512x_t iim; /* IC Identification module */
  607. u8 res8[0x4000];
  608. lpc512x_t lpc; /* LocalPlus Controller */
  609. pata512x_t pata; /* Parallel ATA */
  610. u8 res9[0xd00];
  611. psc512x_t psc[12]; /* PSCs */
  612. u8 res10[0x300];
  613. fifoc512x_t fifoc; /* FIFO Controller */
  614. u8 res11[0x2000];
  615. dma512x_t dma; /* DMA */
  616. u8 res12[0xa800];
  617. sata512x_t sata; /* Serial ATA */
  618. u8 res13[0xde000];
  619. } immap_t;
  620. #endif /* __IMMAP_512x__ */