|
RTEMS
5.1
|
Go to the documentation of this file. 30 #ifndef _RTEMS_M68K_M68360_H 31 #define _RTEMS_M68K_M68360_H 45 unsigned long _pad[2];
63 unsigned long _pad3[2];
88 unsigned short rev_num;
100 unsigned short tm_base;
101 unsigned short _tm_ptr;
102 unsigned short _r_tmr;
103 unsigned short _r_tmv;
104 unsigned long tm_cmd;
105 unsigned long tm_cnt;
113 #define M360_RCCR_TIME (1<<15) 114 #define M360_RCCR_TIMEP(x) ((x)<<8) 120 #define M360_TM_CMD_V (1<<31) 121 #define M360_TM_CMD_R (1<<30) 122 #define M360_TM_CMD_TIMER(x) ((x)<<16) 123 #define M360_TM_CMD_PERIOD(x) (x) 131 unsigned short ibase;
132 unsigned short ibptr;
133 unsigned long _istate;
134 unsigned long _itemp;
143 unsigned short rbase;
144 unsigned short tbase;
147 unsigned short mrblr;
148 unsigned long _rstate;
150 unsigned short _rbptr;
151 unsigned short _pad1;
153 unsigned long _tstate;
155 unsigned short _tbptr;
156 unsigned short _pad4;
164 unsigned short max_idl;
165 unsigned short _idlc;
166 unsigned short brkcr;
167 unsigned short parec;
168 unsigned short frmec;
169 unsigned short nosec;
170 unsigned short brkec;
171 unsigned short brklen;
172 unsigned short uaddr[2];
173 unsigned short _rtemp;
174 unsigned short toseq;
175 unsigned short character[8];
189 unsigned short rbase;
190 unsigned short tbase;
193 unsigned short mrblr;
194 unsigned long _rstate;
196 unsigned short _rbptr;
197 unsigned short _pad1;
199 unsigned long _tstate;
201 unsigned short _tbptr;
202 unsigned short _pad4;
210 unsigned short max_idl;
211 unsigned short _idlc;
212 unsigned short brkcr;
213 unsigned short parec;
214 unsigned short frmec;
215 unsigned short nosec;
216 unsigned short brkec;
217 unsigned short brklen;
218 unsigned short uaddr[2];
219 unsigned short _rtemp;
220 unsigned short toseq;
221 unsigned short character[8];
227 unsigned long c_pres;
228 unsigned long c_mask;
233 unsigned short ret_lim;
234 unsigned short _ret_cnt;
236 unsigned short minflr;
237 unsigned short maxd1;
238 unsigned short maxd2;
239 unsigned short _maxd;
240 unsigned short dma_cnt;
241 unsigned short _max_b;
242 unsigned short gaddr1;
243 unsigned short gaddr2;
244 unsigned short gaddr3;
245 unsigned short gaddr4;
246 unsigned long _tbuf0data0;
247 unsigned long _tbuf0data1;
248 unsigned long _tbuf0rba0;
249 unsigned long _tbuf0crc;
250 unsigned short _tbuf0bcnt;
251 unsigned short paddr_h;
252 unsigned short paddr_m;
253 unsigned short paddr_l;
254 unsigned short p_per;
255 unsigned short _rfbd_ptr;
256 unsigned short _tfbd_ptr;
257 unsigned short _tlbd_ptr;
258 unsigned long _tbuf1data0;
259 unsigned long _tbuf1data1;
260 unsigned long _tbuf1rba0;
261 unsigned long _tbuf1crc;
262 unsigned short _tbuf1bcnt;
263 unsigned short _tx_len;
264 unsigned short iaddr1;
265 unsigned short iaddr2;
266 unsigned short iaddr3;
267 unsigned short iaddr4;
268 unsigned short _boff_cnt;
269 unsigned short taddr_h;
270 unsigned short taddr_m;
271 unsigned short taddr_l;
284 #define M360_RFCR_MOT (1<<4) 285 #define M360_RFCR_DMA_SPACE 0x8 286 #define M360_TFCR_MOT (1<<4) 287 #define M360_TFCR_DMA_SPACE 0x8 295 unsigned short rbase;
296 unsigned short tbase;
299 unsigned short mrblr;
300 unsigned long _rstate;
302 unsigned short _rbptr;
303 unsigned short _pad1;
305 unsigned long _tstate;
307 unsigned short _tbptr;
308 unsigned short _pad4;
312 unsigned short max_idl;
313 unsigned short _pad0;
314 unsigned short brklen;
315 unsigned short brkec;
316 unsigned short brkcr;
317 unsigned short _r_mask;
320 unsigned short _pad0[5];
328 #define M360_SMCMR_CLEN(x) ((x)<<11) 329 #define M360_SMCMR_2STOP (1<<10) 330 #define M360_SMCMR_PARITY (1<<9) 331 #define M360_SMCMR_EVEN (1<<8) 332 #define M360_SMCMR_SM_GCI (0<<4) 333 #define M360_SMCMR_SM_UART (2<<4) 334 #define M360_SMCMR_SM_TRANSPARENT (3<<4) 335 #define M360_SMCMR_DM_LOOPBACK (1<<2) 336 #define M360_SMCMR_DM_ECHO (2<<2) 337 #define M360_SMCMR_TEN (1<<1) 338 #define M360_SMCMR_REN (1<<0) 343 #define M360_SMCE_BRK (1<<4) 344 #define M360_SMCE_BSY (1<<2) 345 #define M360_SMCE_TX (1<<1) 346 #define M360_SMCE_RX (1<<0) 354 unsigned short rbase;
355 unsigned short tbase;
358 unsigned short mrblr;
359 unsigned long _rstate;
361 unsigned short _rbptr;
362 unsigned short _pad1;
364 unsigned long _tstate;
366 unsigned short _tbptr;
367 unsigned short _pad4;
374 #define M360_SPMODE_LOOP (1<<14) 375 #define M360_SPMODE_CI (1<<13) 376 #define M360_SPMODE_CP (1<<12) 377 #define M360_SPMODE_DIV16 (1<<11) 378 #define M360_SPMODE_REV (1<<10) 379 #define M360_SPMODE_MASTER (1<<9) 380 #define M360_SPMODE_EN (1<<8) 381 #define M360_SPMODE_CLEN(x) ((x)<<4) 382 #define M360_SPMODE_PM(x) (x) 387 #define M360_SPCOM_STR (1<<7) 392 #define M360_SPIE_MME (1<<5) 393 #define M360_SPIE_TXE (1<<4) 394 #define M360_SPIE_BSY (1<<2) 395 #define M360_SPIE_TXB (1<<1) 396 #define M360_SPIE_RXB (1<<0) 404 unsigned short status;
405 unsigned short length;
406 volatile void *buffer;
412 #define M360_BD_EMPTY (1<<15) 413 #define M360_BD_WRAP (1<<13) 414 #define M360_BD_INTERRUPT (1<<12) 415 #define M360_BD_LAST (1<<11) 416 #define M360_BD_CONTROL_CHAR (1<<11) 417 #define M360_BD_FIRST_IN_FRAME (1<<10) 418 #define M360_BD_ADDRESS (1<<10) 419 #define M360_BD_CONTINUOUS (1<<9) 420 #define M360_BD_MISS (1<<8) 421 #define M360_BD_IDLE (1<<8) 422 #define M360_BD_ADDRSS_MATCH (1<<7) 423 #define M360_BD_LONG (1<<5) 424 #define M360_BD_BREAK (1<<5) 425 #define M360_BD_NONALIGNED (1<<4) 426 #define M360_BD_FRAMING_ERROR (1<<4) 427 #define M360_BD_SHORT (1<<3) 428 #define M360_BD_PARITY_ERROR (1<<3) 429 #define M360_BD_CRC_ERROR (1<<2) 430 #define M360_BD_OVERRUN (1<<1) 431 #define M360_BD_COLLISION (1<<0) 432 #define M360_BD_CARRIER_LOST (1<<0) 433 #define M360_BD_MASTER_ERROR (1<<0) 439 #define M360_BD_READY (1<<15) 440 #define M360_BD_PAD (1<<14) 441 #define M360_BD_CTS_REPORT (1<<11) 442 #define M360_BD_TX_CRC (1<<10) 443 #define M360_BD_DEFER (1<<9) 444 #define M360_BD_HEARTBEAT (1<<8) 445 #define M360_BD_PREAMBLE (1<<8) 446 #define M360_BD_LATE_COLLISION (1<<7) 447 #define M360_BD_NO_STOP_BIT (1<<7) 448 #define M360_BD_RETRY_LIMIT (1<<6) 449 #define M360_BD_RETRY_COUNT(x) (((x)&0x3C)>>2) 450 #define M360_BD_UNDERRUN (1<<1) 451 #define M360_BD_CARRIER_LOST (1<<0) 452 #define M360_BD_CTS_LOST (1<<0) 460 unsigned short status;
462 unsigned long length;
472 #define M360_CR_RST (1<<15) 473 #define M360_CR_OP_INIT_RX_TX (0<<8) 474 #define M360_CR_OP_INIT_RX (1<<8) 475 #define M360_CR_OP_INIT_TX (2<<8) 476 #define M360_CR_OP_INIT_HUNT (3<<8) 477 #define M360_CR_OP_STOP_TX (4<<8) 478 #define M360_CR_OP_GR_STOP_TX (5<<8) 479 #define M360_CR_OP_INIT_IDMA (5<<8) 480 #define M360_CR_OP_RESTART_TX (6<<8) 481 #define M360_CR_OP_CLOSE_RX_BD (7<<8) 482 #define M360_CR_OP_SET_GRP_ADDR (8<<8) 483 #define M360_CR_OP_SET_TIMER (8<<8) 484 #define M360_CR_OP_GCI_TIMEOUT (9<<8) 485 #define M360_CR_OP_RESERT_BCS (10<<8) 486 #define M360_CR_OP_GCI_ABORT (10<<8) 487 #define M360_CR_CHAN_SCC1 (0<<4) 488 #define M360_CR_CHAN_SCC2 (4<<4) 489 #define M360_CR_CHAN_SPI (5<<4) 490 #define M360_CR_CHAN_TIMER (5<<4) 491 #define M360_CR_CHAN_SCC3 (8<<4) 492 #define M360_CR_CHAN_SMC1 (9<<4) 493 #define M360_CR_CHAN_IDMA1 (9<<4) 494 #define M360_CR_CHAN_SCC4 (12<<4) 495 #define M360_CR_CHAN_SMC2 (13<<4) 496 #define M360_CR_CHAN_IDMA2 (13<<4) 497 #define M360_CR_FLG (1<<0) 504 #define M360_SYPCR_SWE (1<<7) 505 #define M360_SYPCR_SWRI (1<<6) 506 #define M360_SYPCR_SWT1 (1<<5) 507 #define M360_SYPCR_SWT0 (1<<4) 508 #define M360_SYPCR_DBFE (1<<3) 509 #define M360_SYPCR_BME (1<<2) 510 #define M360_SYPCR_BMT1 (1<<1) 511 #define M360_SYPCR_BMT0 (1<<0) 518 #define M360_GMR_RCNT(x) ((x)<<24) 519 #define M360_GMR_RFEN (1<<23) 520 #define M360_GMR_RCYC(x) ((x)<<21) 521 #define M360_GMR_PGS(x) ((x)<<18) 522 #define M360_GMR_DPS_32BIT (0<<16) 523 #define M360_GMR_DPS_16BIT (1<<16) 524 #define M360_GMR_DPS_8BIT (2<<16) 525 #define M360_GMR_DPS_DSACK (3<<16) 526 #define M360_GMR_WBT40 (1<<15) 527 #define M360_GMR_WBTQ (1<<14) 528 #define M360_GMR_SYNC (1<<13) 529 #define M360_GMR_EMWS (1<<12) 530 #define M360_GMR_OPAR (1<<11) 531 #define M360_GMR_PBEE (1<<10) 532 #define M360_GMR_TSS40 (1<<9) 533 #define M360_GMR_NCS (1<<8) 534 #define M360_GMR_DWQ (1<<7) 535 #define M360_GMR_DW40 (1<<6) 536 #define M360_GMR_GAMX (1<<5) 538 #define M360_MEMC_BR_FC(x) ((x)<<7) 539 #define M360_MEMC_BR_TRLXQ (1<<6) 540 #define M360_MEMC_BR_BACK40 (1<<5) 541 #define M360_MEMC_BR_CSNT40 (1<<4) 542 #define M360_MEMC_BR_CSNTQ (1<<3) 543 #define M360_MEMC_BR_PAREN (1<<2) 544 #define M360_MEMC_BR_WP (1<<1) 545 #define M360_MEMC_BR_V (1<<0) 547 #define M360_MEMC_OR_TCYC(x) ((x)<<28) 548 #define M360_MEMC_OR_WAITS(x) M360_MEMC_OR_TCYC((x)+1) 549 #define M360_MEMC_OR_2KB 0x0FFFF800 550 #define M360_MEMC_OR_4KB 0x0FFFF000 551 #define M360_MEMC_OR_8KB 0x0FFFE000 552 #define M360_MEMC_OR_16KB 0x0FFFC000 553 #define M360_MEMC_OR_32KB 0x0FFF8000 554 #define M360_MEMC_OR_64KB 0x0FFF0000 555 #define M360_MEMC_OR_128KB 0x0FFE0000 556 #define M360_MEMC_OR_256KB 0x0FFC0000 557 #define M360_MEMC_OR_512KB 0x0FF80000 558 #define M360_MEMC_OR_1MB 0x0FF00000 559 #define M360_MEMC_OR_2MB 0x0FE00000 560 #define M360_MEMC_OR_4MB 0x0FC00000 561 #define M360_MEMC_OR_8MB 0x0F800000 562 #define M360_MEMC_OR_16MB 0x0F000000 563 #define M360_MEMC_OR_32MB 0x0E000000 564 #define M360_MEMC_OR_64MB 0x0C000000 565 #define M360_MEMC_OR_128MB 0x08000000 566 #define M360_MEMC_OR_256MB 0x00000000 567 #define M360_MEMC_OR_FCMC(x) ((x)<<7) 568 #define M360_MEMC_OR_BCYC(x) ((x)<<5) 569 #define M360_MEMC_OR_PGME (1<<3) 570 #define M360_MEMC_OR_32BIT (0<<1) 571 #define M360_MEMC_OR_16BIT (1<<1) 572 #define M360_MEMC_OR_8BIT (2<<1) 573 #define M360_MEMC_OR_DSACK (3<<1) 574 #define M360_MEMC_OR_DRAM (1<<0) 581 #define M360_SI_SMC2_BITS 0xFFFF0000 582 #define M360_SI_SMC2_TDM (1<<31) 583 #define M360_SI_SMC2_BRG1 (0<<28) 584 #define M360_SI_SMC2_BRG2 (1<<28) 585 #define M360_SI_SMC2_BRG3 (2<<28) 586 #define M360_SI_SMC2_BRG4 (3<<28) 587 #define M360_SI_SMC2_CLK5 (0<<28) 588 #define M360_SI_SMC2_CLK6 (1<<28) 589 #define M360_SI_SMC2_CLK7 (2<<28) 590 #define M360_SI_SMC2_CLK8 (3<<28) 591 #define M360_SI_SMC1_BITS 0x0000FFFF 592 #define M360_SI_SMC1_TDM (1<<15) 593 #define M360_SI_SMC1_BRG1 (0<<12) 594 #define M360_SI_SMC1_BRG2 (1<<12) 595 #define M360_SI_SMC1_BRG3 (2<<12) 596 #define M360_SI_SMC1_BRG4 (3<<12) 597 #define M360_SI_SMC1_CLK1 (0<<12) 598 #define M360_SI_SMC1_CLK2 (1<<12) 599 #define M360_SI_SMC1_CLK3 (2<<12) 600 #define M360_SI_SMC1_CLK4 (3<<12) 607 #define M360_SDMA_FREEZE (2<<13) 608 #define M360_SDMA_SISM_7 (7<<8) 609 #define M360_SDMA_SAID_4 (4<<4) 610 #define M360_SDMA_INTE (1<<1) 611 #define M360_SDMA_INTB (1<<0) 618 #define M360_BRG_RST (1<<17) 619 #define M360_BRG_EN (1<<16) 620 #define M360_BRG_EXTC_BRGCLK (0<<14) 621 #define M360_BRG_EXTC_CLK2 (1<<14) 622 #define M360_BRG_EXTC_CLK6 (2<<14) 623 #define M360_BRG_ATB (1<<13) 624 #define M360_BRG_115200 (13<<1) 625 #define M360_BRG_57600 (26<<1) 626 #define M360_BRG_38400 (40<<1) 627 #define M360_BRG_19200 (80<<1) 628 #define M360_BRG_9600 (162<<1) 629 #define M360_BRG_4800 (324<<1) 630 #define M360_BRG_2400 (650<<1) 631 #define M360_BRG_1200 (1301<<1) 632 #define M360_BRG_600 (2603<<1) 633 #define M360_BRG_300 ((324<<1) | 1) 634 #define M360_BRG_150 ((650<<1) | 1) 635 #define M360_BRG_75 ((1301<<1) | 1) 646 unsigned char dpram0[0x400];
647 unsigned char dpram1[0x200];
648 unsigned char dpram2[0x100];
649 unsigned char dpram3[0x100];
650 unsigned char _rsv0[0xC00-0x800];
678 unsigned long _pad00;
681 unsigned short _pad01;
682 unsigned char clkocr;
683 unsigned char _pad02;
684 unsigned short _pad03;
685 unsigned short pllcr;
686 unsigned short _pad04;
687 unsigned short cdvcr;
688 unsigned short pepar;
689 unsigned long _pad05[2];
690 unsigned short _pad06;
693 unsigned short _pad07;
695 unsigned short _pad08;
697 unsigned short _pad09;
698 unsigned char _pad10;
702 unsigned long _pad11[2];
708 unsigned short mstat;
709 unsigned short _pad12;
710 unsigned long _pad13[2];
712 unsigned char _pad14[0xF0-0xD0];
713 unsigned char _pad15[0x100-0xF0];
714 unsigned char _pad16[0x500-0x100];
720 unsigned short _pad17;
722 unsigned short _pad18;
727 unsigned char _pad19;
729 unsigned char _pad20;
731 unsigned char _pad21;
732 unsigned short _pad22;
738 unsigned char _pad23;
745 unsigned short _pad24;
751 unsigned char _pad26;
753 unsigned char _pad27;
755 unsigned char _pad28;
756 unsigned short _pad29;
757 unsigned long _pad30;
770 unsigned short padir;
771 unsigned short papar;
772 unsigned short paodr;
773 unsigned short padat;
774 unsigned long _pad31[2];
775 unsigned short pcdir;
776 unsigned short pcpar;
778 unsigned short pcdat;
779 unsigned short pcint;
780 unsigned short _pad32;
781 unsigned long _pad33[5];
787 unsigned short _pad34;
788 unsigned long _pad35[3];
809 unsigned long _pad36[2];
815 unsigned short _pad37;
817 unsigned short _pad38;
818 unsigned long _pad39[3];
819 unsigned short _pad40;
821 unsigned short _pad41;
823 unsigned long _pad42[5];
850 unsigned short spmode;
851 unsigned short _pad43[2];
853 unsigned char _pad44;
854 unsigned short _pad45;
856 unsigned char _pad46[2];
858 unsigned short _pad47[2];
864 unsigned short _pad48;
868 unsigned short _pad49;
869 unsigned short pbodr;
871 unsigned long _pad50[6];
876 unsigned long simode;
878 unsigned char _pad51;
881 unsigned long _pad52;
883 unsigned short _pad53;
884 unsigned short sirp[2];
885 unsigned short _pad54;
886 unsigned long _pad55[2];
887 unsigned char siram[256];
890 extern volatile m360_t m360;
895 #define M360_PB_SPI_MISO_MSK (1<< 3) 896 #define M360_PB_SPI_MOSI_MSK (1<< 2) 897 #define M360_PB_SPI_CLK_MSK (1<< 1)