|
RTEMS 6.1-rc2
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
34#ifndef _RTEMS_M68K_M68360_H
35#define _RTEMS_M68K_M68360_H
49 unsigned long _pad[2];
67 unsigned long _pad3[2];
92 unsigned short rev_num;
104 unsigned short tm_base;
105 unsigned short _tm_ptr;
106 unsigned short _r_tmr;
107 unsigned short _r_tmv;
108 unsigned long tm_cmd;
109 unsigned long tm_cnt;
117#define M360_RCCR_TIME (1<<15)
118#define M360_RCCR_TIMEP(x) ((x)<<8)
124#define M360_TM_CMD_V (1<<31)
125#define M360_TM_CMD_R (1<<30)
126#define M360_TM_CMD_TIMER(x) ((x)<<16)
127#define M360_TM_CMD_PERIOD(x) (x)
135 unsigned short ibase;
136 unsigned short ibptr;
137 unsigned long _istate;
138 unsigned long _itemp;
147 unsigned short rbase;
148 unsigned short tbase;
151 unsigned short mrblr;
152 unsigned long _rstate;
154 unsigned short _rbptr;
155 unsigned short _pad1;
157 unsigned long _tstate;
159 unsigned short _tbptr;
160 unsigned short _pad4;
168 unsigned short max_idl;
169 unsigned short _idlc;
170 unsigned short brkcr;
171 unsigned short parec;
172 unsigned short frmec;
173 unsigned short nosec;
174 unsigned short brkec;
175 unsigned short brklen;
176 unsigned short uaddr[2];
177 unsigned short _rtemp;
178 unsigned short toseq;
179 unsigned short character[8];
193 unsigned short rbase;
194 unsigned short tbase;
197 unsigned short mrblr;
198 unsigned long _rstate;
200 unsigned short _rbptr;
201 unsigned short _pad1;
203 unsigned long _tstate;
205 unsigned short _tbptr;
206 unsigned short _pad4;
214 unsigned short max_idl;
215 unsigned short _idlc;
216 unsigned short brkcr;
217 unsigned short parec;
218 unsigned short frmec;
219 unsigned short nosec;
220 unsigned short brkec;
221 unsigned short brklen;
222 unsigned short uaddr[2];
223 unsigned short _rtemp;
224 unsigned short toseq;
225 unsigned short character[8];
231 unsigned long c_pres;
232 unsigned long c_mask;
237 unsigned short ret_lim;
238 unsigned short _ret_cnt;
240 unsigned short minflr;
241 unsigned short maxd1;
242 unsigned short maxd2;
243 unsigned short _maxd;
244 unsigned short dma_cnt;
245 unsigned short _max_b;
246 unsigned short gaddr1;
247 unsigned short gaddr2;
248 unsigned short gaddr3;
249 unsigned short gaddr4;
250 unsigned long _tbuf0data0;
251 unsigned long _tbuf0data1;
252 unsigned long _tbuf0rba0;
253 unsigned long _tbuf0crc;
254 unsigned short _tbuf0bcnt;
255 unsigned short paddr_h;
256 unsigned short paddr_m;
257 unsigned short paddr_l;
258 unsigned short p_per;
259 unsigned short _rfbd_ptr;
260 unsigned short _tfbd_ptr;
261 unsigned short _tlbd_ptr;
262 unsigned long _tbuf1data0;
263 unsigned long _tbuf1data1;
264 unsigned long _tbuf1rba0;
265 unsigned long _tbuf1crc;
266 unsigned short _tbuf1bcnt;
267 unsigned short _tx_len;
268 unsigned short iaddr1;
269 unsigned short iaddr2;
270 unsigned short iaddr3;
271 unsigned short iaddr4;
272 unsigned short _boff_cnt;
273 unsigned short taddr_h;
274 unsigned short taddr_m;
275 unsigned short taddr_l;
288#define M360_RFCR_MOT (1<<4)
289#define M360_RFCR_DMA_SPACE 0x8
290#define M360_TFCR_MOT (1<<4)
291#define M360_TFCR_DMA_SPACE 0x8
299 unsigned short rbase;
300 unsigned short tbase;
303 unsigned short mrblr;
304 unsigned long _rstate;
306 unsigned short _rbptr;
307 unsigned short _pad1;
309 unsigned long _tstate;
311 unsigned short _tbptr;
312 unsigned short _pad4;
316 unsigned short max_idl;
317 unsigned short _pad0;
318 unsigned short brklen;
319 unsigned short brkec;
320 unsigned short brkcr;
321 unsigned short _r_mask;
324 unsigned short _pad0[5];
332#define M360_SMCMR_CLEN(x) ((x)<<11)
333#define M360_SMCMR_2STOP (1<<10)
334#define M360_SMCMR_PARITY (1<<9)
335#define M360_SMCMR_EVEN (1<<8)
336#define M360_SMCMR_SM_GCI (0<<4)
337#define M360_SMCMR_SM_UART (2<<4)
338#define M360_SMCMR_SM_TRANSPARENT (3<<4)
339#define M360_SMCMR_DM_LOOPBACK (1<<2)
340#define M360_SMCMR_DM_ECHO (2<<2)
341#define M360_SMCMR_TEN (1<<1)
342#define M360_SMCMR_REN (1<<0)
347#define M360_SMCE_BRK (1<<4)
348#define M360_SMCE_BSY (1<<2)
349#define M360_SMCE_TX (1<<1)
350#define M360_SMCE_RX (1<<0)
358 unsigned short rbase;
359 unsigned short tbase;
362 unsigned short mrblr;
363 unsigned long _rstate;
365 unsigned short _rbptr;
366 unsigned short _pad1;
368 unsigned long _tstate;
370 unsigned short _tbptr;
371 unsigned short _pad4;
378#define M360_SPMODE_LOOP (1<<14)
379#define M360_SPMODE_CI (1<<13)
380#define M360_SPMODE_CP (1<<12)
381#define M360_SPMODE_DIV16 (1<<11)
382#define M360_SPMODE_REV (1<<10)
383#define M360_SPMODE_MASTER (1<<9)
384#define M360_SPMODE_EN (1<<8)
385#define M360_SPMODE_CLEN(x) ((x)<<4)
386#define M360_SPMODE_PM(x) (x)
391#define M360_SPCOM_STR (1<<7)
396#define M360_SPIE_MME (1<<5)
397#define M360_SPIE_TXE (1<<4)
398#define M360_SPIE_BSY (1<<2)
399#define M360_SPIE_TXB (1<<1)
400#define M360_SPIE_RXB (1<<0)
408 unsigned short status;
409 unsigned short length;
410 volatile void *buffer;
416#define M360_BD_EMPTY (1<<15)
417#define M360_BD_WRAP (1<<13)
418#define M360_BD_INTERRUPT (1<<12)
419#define M360_BD_LAST (1<<11)
420#define M360_BD_CONTROL_CHAR (1<<11)
421#define M360_BD_FIRST_IN_FRAME (1<<10)
422#define M360_BD_ADDRESS (1<<10)
423#define M360_BD_CONTINUOUS (1<<9)
424#define M360_BD_MISS (1<<8)
425#define M360_BD_IDLE (1<<8)
426#define M360_BD_ADDRSS_MATCH (1<<7)
427#define M360_BD_LONG (1<<5)
428#define M360_BD_BREAK (1<<5)
429#define M360_BD_NONALIGNED (1<<4)
430#define M360_BD_FRAMING_ERROR (1<<4)
431#define M360_BD_SHORT (1<<3)
432#define M360_BD_PARITY_ERROR (1<<3)
433#define M360_BD_CRC_ERROR (1<<2)
434#define M360_BD_OVERRUN (1<<1)
435#define M360_BD_COLLISION (1<<0)
436#define M360_BD_CARRIER_LOST (1<<0)
437#define M360_BD_MASTER_ERROR (1<<0)
443#define M360_BD_READY (1<<15)
444#define M360_BD_PAD (1<<14)
445#define M360_BD_CTS_REPORT (1<<11)
446#define M360_BD_TX_CRC (1<<10)
447#define M360_BD_DEFER (1<<9)
448#define M360_BD_HEARTBEAT (1<<8)
449#define M360_BD_PREAMBLE (1<<8)
450#define M360_BD_LATE_COLLISION (1<<7)
451#define M360_BD_NO_STOP_BIT (1<<7)
452#define M360_BD_RETRY_LIMIT (1<<6)
453#define M360_BD_RETRY_COUNT(x) (((x)&0x3C)>>2)
454#define M360_BD_UNDERRUN (1<<1)
455#define M360_BD_CARRIER_LOST (1<<0)
456#define M360_BD_CTS_LOST (1<<0)
464 unsigned short status;
466 unsigned long length;
476#define M360_CR_RST (1<<15)
477#define M360_CR_OP_INIT_RX_TX (0<<8)
478#define M360_CR_OP_INIT_RX (1<<8)
479#define M360_CR_OP_INIT_TX (2<<8)
480#define M360_CR_OP_INIT_HUNT (3<<8)
481#define M360_CR_OP_STOP_TX (4<<8)
482#define M360_CR_OP_GR_STOP_TX (5<<8)
483#define M360_CR_OP_INIT_IDMA (5<<8)
484#define M360_CR_OP_RESTART_TX (6<<8)
485#define M360_CR_OP_CLOSE_RX_BD (7<<8)
486#define M360_CR_OP_SET_GRP_ADDR (8<<8)
487#define M360_CR_OP_SET_TIMER (8<<8)
488#define M360_CR_OP_GCI_TIMEOUT (9<<8)
489#define M360_CR_OP_RESERT_BCS (10<<8)
490#define M360_CR_OP_GCI_ABORT (10<<8)
491#define M360_CR_CHAN_SCC1 (0<<4)
492#define M360_CR_CHAN_SCC2 (4<<4)
493#define M360_CR_CHAN_SPI (5<<4)
494#define M360_CR_CHAN_TIMER (5<<4)
495#define M360_CR_CHAN_SCC3 (8<<4)
496#define M360_CR_CHAN_SMC1 (9<<4)
497#define M360_CR_CHAN_IDMA1 (9<<4)
498#define M360_CR_CHAN_SCC4 (12<<4)
499#define M360_CR_CHAN_SMC2 (13<<4)
500#define M360_CR_CHAN_IDMA2 (13<<4)
501#define M360_CR_FLG (1<<0)
508#define M360_SYPCR_SWE (1<<7)
509#define M360_SYPCR_SWRI (1<<6)
510#define M360_SYPCR_SWT1 (1<<5)
511#define M360_SYPCR_SWT0 (1<<4)
512#define M360_SYPCR_DBFE (1<<3)
513#define M360_SYPCR_BME (1<<2)
514#define M360_SYPCR_BMT1 (1<<1)
515#define M360_SYPCR_BMT0 (1<<0)
522#define M360_GMR_RCNT(x) ((x)<<24)
523#define M360_GMR_RFEN (1<<23)
524#define M360_GMR_RCYC(x) ((x)<<21)
525#define M360_GMR_PGS(x) ((x)<<18)
526#define M360_GMR_DPS_32BIT (0<<16)
527#define M360_GMR_DPS_16BIT (1<<16)
528#define M360_GMR_DPS_8BIT (2<<16)
529#define M360_GMR_DPS_DSACK (3<<16)
530#define M360_GMR_WBT40 (1<<15)
531#define M360_GMR_WBTQ (1<<14)
532#define M360_GMR_SYNC (1<<13)
533#define M360_GMR_EMWS (1<<12)
534#define M360_GMR_OPAR (1<<11)
535#define M360_GMR_PBEE (1<<10)
536#define M360_GMR_TSS40 (1<<9)
537#define M360_GMR_NCS (1<<8)
538#define M360_GMR_DWQ (1<<7)
539#define M360_GMR_DW40 (1<<6)
540#define M360_GMR_GAMX (1<<5)
542#define M360_MEMC_BR_FC(x) ((x)<<7)
543#define M360_MEMC_BR_TRLXQ (1<<6)
544#define M360_MEMC_BR_BACK40 (1<<5)
545#define M360_MEMC_BR_CSNT40 (1<<4)
546#define M360_MEMC_BR_CSNTQ (1<<3)
547#define M360_MEMC_BR_PAREN (1<<2)
548#define M360_MEMC_BR_WP (1<<1)
549#define M360_MEMC_BR_V (1<<0)
551#define M360_MEMC_OR_TCYC(x) ((x)<<28)
552#define M360_MEMC_OR_WAITS(x) M360_MEMC_OR_TCYC((x)+1)
553#define M360_MEMC_OR_2KB 0x0FFFF800
554#define M360_MEMC_OR_4KB 0x0FFFF000
555#define M360_MEMC_OR_8KB 0x0FFFE000
556#define M360_MEMC_OR_16KB 0x0FFFC000
557#define M360_MEMC_OR_32KB 0x0FFF8000
558#define M360_MEMC_OR_64KB 0x0FFF0000
559#define M360_MEMC_OR_128KB 0x0FFE0000
560#define M360_MEMC_OR_256KB 0x0FFC0000
561#define M360_MEMC_OR_512KB 0x0FF80000
562#define M360_MEMC_OR_1MB 0x0FF00000
563#define M360_MEMC_OR_2MB 0x0FE00000
564#define M360_MEMC_OR_4MB 0x0FC00000
565#define M360_MEMC_OR_8MB 0x0F800000
566#define M360_MEMC_OR_16MB 0x0F000000
567#define M360_MEMC_OR_32MB 0x0E000000
568#define M360_MEMC_OR_64MB 0x0C000000
569#define M360_MEMC_OR_128MB 0x08000000
570#define M360_MEMC_OR_256MB 0x00000000
571#define M360_MEMC_OR_FCMC(x) ((x)<<7)
572#define M360_MEMC_OR_BCYC(x) ((x)<<5)
573#define M360_MEMC_OR_PGME (1<<3)
574#define M360_MEMC_OR_32BIT (0<<1)
575#define M360_MEMC_OR_16BIT (1<<1)
576#define M360_MEMC_OR_8BIT (2<<1)
577#define M360_MEMC_OR_DSACK (3<<1)
578#define M360_MEMC_OR_DRAM (1<<0)
585#define M360_SI_SMC2_BITS 0xFFFF0000
586#define M360_SI_SMC2_TDM (1<<31)
587#define M360_SI_SMC2_BRG1 (0<<28)
588#define M360_SI_SMC2_BRG2 (1<<28)
589#define M360_SI_SMC2_BRG3 (2<<28)
590#define M360_SI_SMC2_BRG4 (3<<28)
591#define M360_SI_SMC2_CLK5 (0<<28)
592#define M360_SI_SMC2_CLK6 (1<<28)
593#define M360_SI_SMC2_CLK7 (2<<28)
594#define M360_SI_SMC2_CLK8 (3<<28)
595#define M360_SI_SMC1_BITS 0x0000FFFF
596#define M360_SI_SMC1_TDM (1<<15)
597#define M360_SI_SMC1_BRG1 (0<<12)
598#define M360_SI_SMC1_BRG2 (1<<12)
599#define M360_SI_SMC1_BRG3 (2<<12)
600#define M360_SI_SMC1_BRG4 (3<<12)
601#define M360_SI_SMC1_CLK1 (0<<12)
602#define M360_SI_SMC1_CLK2 (1<<12)
603#define M360_SI_SMC1_CLK3 (2<<12)
604#define M360_SI_SMC1_CLK4 (3<<12)
611#define M360_SDMA_FREEZE (2<<13)
612#define M360_SDMA_SISM_7 (7<<8)
613#define M360_SDMA_SAID_4 (4<<4)
614#define M360_SDMA_INTE (1<<1)
615#define M360_SDMA_INTB (1<<0)
622#define M360_BRG_RST (1<<17)
623#define M360_BRG_EN (1<<16)
624#define M360_BRG_EXTC_BRGCLK (0<<14)
625#define M360_BRG_EXTC_CLK2 (1<<14)
626#define M360_BRG_EXTC_CLK6 (2<<14)
627#define M360_BRG_ATB (1<<13)
628#define M360_BRG_115200 (13<<1)
629#define M360_BRG_57600 (26<<1)
630#define M360_BRG_38400 (40<<1)
631#define M360_BRG_19200 (80<<1)
632#define M360_BRG_9600 (162<<1)
633#define M360_BRG_4800 (324<<1)
634#define M360_BRG_2400 (650<<1)
635#define M360_BRG_1200 (1301<<1)
636#define M360_BRG_600 (2603<<1)
637#define M360_BRG_300 ((324<<1) | 1)
638#define M360_BRG_150 ((650<<1) | 1)
639#define M360_BRG_75 ((1301<<1) | 1)
650 unsigned char dpram0[0x400];
651 unsigned char dpram1[0x200];
652 unsigned char dpram2[0x100];
653 unsigned char dpram3[0x100];
654 unsigned char _rsv0[0xC00-0x800];
682 unsigned long _pad00;
685 unsigned short _pad01;
686 unsigned char clkocr;
687 unsigned char _pad02;
688 unsigned short _pad03;
689 unsigned short pllcr;
690 unsigned short _pad04;
691 unsigned short cdvcr;
692 unsigned short pepar;
693 unsigned long _pad05[2];
694 unsigned short _pad06;
697 unsigned short _pad07;
699 unsigned short _pad08;
701 unsigned short _pad09;
702 unsigned char _pad10;
706 unsigned long _pad11[2];
712 unsigned short mstat;
713 unsigned short _pad12;
714 unsigned long _pad13[2];
716 unsigned char _pad14[0xF0-0xD0];
717 unsigned char _pad15[0x100-0xF0];
718 unsigned char _pad16[0x500-0x100];
724 unsigned short _pad17;
726 unsigned short _pad18;
731 unsigned char _pad19;
733 unsigned char _pad20;
735 unsigned char _pad21;
736 unsigned short _pad22;
742 unsigned char _pad23;
749 unsigned short _pad24;
755 unsigned char _pad26;
757 unsigned char _pad27;
759 unsigned char _pad28;
760 unsigned short _pad29;
761 unsigned long _pad30;
774 unsigned short padir;
775 unsigned short papar;
776 unsigned short paodr;
777 unsigned short padat;
778 unsigned long _pad31[2];
779 unsigned short pcdir;
780 unsigned short pcpar;
782 unsigned short pcdat;
783 unsigned short pcint;
784 unsigned short _pad32;
785 unsigned long _pad33[5];
791 unsigned short _pad34;
792 unsigned long _pad35[3];
813 unsigned long _pad36[2];
819 unsigned short _pad37;
821 unsigned short _pad38;
822 unsigned long _pad39[3];
823 unsigned short _pad40;
825 unsigned short _pad41;
827 unsigned long _pad42[5];
854 unsigned short spmode;
855 unsigned short _pad43[2];
857 unsigned char _pad44;
858 unsigned short _pad45;
860 unsigned char _pad46[2];
862 unsigned short _pad47[2];
868 unsigned short _pad48;
872 unsigned short _pad49;
873 unsigned short pbodr;
875 unsigned long _pad50[6];
880 unsigned long simode;
882 unsigned char _pad51;
885 unsigned long _pad52;
887 unsigned short _pad53;
888 unsigned short sirp[2];
889 unsigned short _pad54;
890 unsigned long _pad55[2];
891 unsigned char siram[256];
894extern volatile m360_t m360;
899#define M360_PB_SPI_MISO_MSK (1<< 3)
900#define M360_PB_SPI_MOSI_MSK (1<< 2)
901#define M360_PB_SPI_CLK_MSK (1<< 1)