diff options
Diffstat (limited to 'arch/m68k/include/asm/m532xsim.h')
-rw-r--r-- | arch/m68k/include/asm/m532xsim.h | 198 |
1 files changed, 93 insertions, 105 deletions
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h index eb7fd4448947..36bf15aec9ae 100644 --- a/arch/m68k/include/asm/m532xsim.h +++ b/arch/m68k/include/asm/m532xsim.h | |||
@@ -56,47 +56,21 @@ | |||
56 | #define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ | 56 | #define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ |
57 | 57 | ||
58 | 58 | ||
59 | #define MCFSIM_IMR_MASKALL 0xFFFFFFFF /* All SIM intr sources */ | 59 | #define MCFINTC0_SIMR 0xFC04801C |
60 | 60 | #define MCFINTC0_CIMR 0xFC04801D | |
61 | #define MCFSIM_IMR_SIMR0 0xFC04801C | 61 | #define MCFINTC0_ICR0 0xFC048040 |
62 | #define MCFSIM_IMR_SIMR1 0xFC04C01C | 62 | #define MCFINTC1_SIMR 0xFC04C01C |
63 | #define MCFSIM_IMR_CIMR0 0xFC04801D | 63 | #define MCFINTC1_CIMR 0xFC04C01D |
64 | #define MCFSIM_IMR_CIMR1 0xFC04C01D | 64 | #define MCFINTC1_ICR0 0xFC04C040 |
65 | 65 | ||
66 | #define MCFSIM_ICR_TIMER1 (0xFC048040+32) | 66 | #define MCFSIM_ICR_TIMER1 (0xFC048040+32) |
67 | #define MCFSIM_ICR_TIMER2 (0xFC048040+33) | 67 | #define MCFSIM_ICR_TIMER2 (0xFC048040+33) |
68 | 68 | ||
69 | |||
70 | /* | 69 | /* |
71 | * Macro to set IMR register. It is 32 bits on the 5307. | 70 | * Define system peripheral IRQ usage. |
72 | */ | 71 | */ |
73 | #define mcf_getimr() \ | 72 | #define MCF_IRQ_TIMER (64 + 32) /* Timer0 */ |
74 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) | 73 | #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */ |
75 | |||
76 | #define mcf_setimr(imr) \ | ||
77 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) = (imr); | ||
78 | |||
79 | #define mcf_getipr() \ | ||
80 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR)) | ||
81 | |||
82 | #define mcf_getiprl() \ | ||
83 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRL)) | ||
84 | |||
85 | #define mcf_getiprh() \ | ||
86 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRH)) | ||
87 | |||
88 | |||
89 | #define mcf_enable_irq0(irq) \ | ||
90 | *((volatile unsigned char*) (MCFSIM_IMR_CIMR0)) = (irq); | ||
91 | |||
92 | #define mcf_enable_irq1(irq) \ | ||
93 | *((volatile unsigned char*) (MCFSIM_IMR_CIMR1)) = (irq); | ||
94 | |||
95 | #define mcf_disable_irq0(irq) \ | ||
96 | *((volatile unsigned char*) (MCFSIM_IMR_SIMR0)) = (irq); | ||
97 | |||
98 | #define mcf_disable_irq1(irq) \ | ||
99 | *((volatile unsigned char*) (MCFSIM_IMR_SIMR1)) = (irq); | ||
100 | 74 | ||
101 | /* | 75 | /* |
102 | * Define the Cache register flags. | 76 | * Define the Cache register flags. |
@@ -422,70 +396,70 @@ | |||
422 | *********************************************************************/ | 396 | *********************************************************************/ |
423 | 397 | ||
424 | /* Register read/write macros */ | 398 | /* Register read/write macros */ |
425 | #define MCF_GPIO_PODR_FECH MCF_REG08(0xFC0A4000) | 399 | #define MCFGPIO_PODR_FECH (0xFC0A4000) |
426 | #define MCF_GPIO_PODR_FECL MCF_REG08(0xFC0A4001) | 400 | #define MCFGPIO_PODR_FECL (0xFC0A4001) |
427 | #define MCF_GPIO_PODR_SSI MCF_REG08(0xFC0A4002) | 401 | #define MCFGPIO_PODR_SSI (0xFC0A4002) |
428 | #define MCF_GPIO_PODR_BUSCTL MCF_REG08(0xFC0A4003) | 402 | #define MCFGPIO_PODR_BUSCTL (0xFC0A4003) |
429 | #define MCF_GPIO_PODR_BE MCF_REG08(0xFC0A4004) | 403 | #define MCFGPIO_PODR_BE (0xFC0A4004) |
430 | #define MCF_GPIO_PODR_CS MCF_REG08(0xFC0A4005) | 404 | #define MCFGPIO_PODR_CS (0xFC0A4005) |
431 | #define MCF_GPIO_PODR_PWM MCF_REG08(0xFC0A4006) | 405 | #define MCFGPIO_PODR_PWM (0xFC0A4006) |
432 | #define MCF_GPIO_PODR_FECI2C MCF_REG08(0xFC0A4007) | 406 | #define MCFGPIO_PODR_FECI2C (0xFC0A4007) |
433 | #define MCF_GPIO_PODR_UART MCF_REG08(0xFC0A4009) | 407 | #define MCFGPIO_PODR_UART (0xFC0A4009) |
434 | #define MCF_GPIO_PODR_QSPI MCF_REG08(0xFC0A400A) | 408 | #define MCFGPIO_PODR_QSPI (0xFC0A400A) |
435 | #define MCF_GPIO_PODR_TIMER MCF_REG08(0xFC0A400B) | 409 | #define MCFGPIO_PODR_TIMER (0xFC0A400B) |
436 | #define MCF_GPIO_PODR_LCDDATAH MCF_REG08(0xFC0A400D) | 410 | #define MCFGPIO_PODR_LCDDATAH (0xFC0A400D) |
437 | #define MCF_GPIO_PODR_LCDDATAM MCF_REG08(0xFC0A400E) | 411 | #define MCFGPIO_PODR_LCDDATAM (0xFC0A400E) |
438 | #define MCF_GPIO_PODR_LCDDATAL MCF_REG08(0xFC0A400F) | 412 | #define MCFGPIO_PODR_LCDDATAL (0xFC0A400F) |
439 | #define MCF_GPIO_PODR_LCDCTLH MCF_REG08(0xFC0A4010) | 413 | #define MCFGPIO_PODR_LCDCTLH (0xFC0A4010) |
440 | #define MCF_GPIO_PODR_LCDCTLL MCF_REG08(0xFC0A4011) | 414 | #define MCFGPIO_PODR_LCDCTLL (0xFC0A4011) |
441 | #define MCF_GPIO_PDDR_FECH MCF_REG08(0xFC0A4014) | 415 | #define MCFGPIO_PDDR_FECH (0xFC0A4014) |
442 | #define MCF_GPIO_PDDR_FECL MCF_REG08(0xFC0A4015) | 416 | #define MCFGPIO_PDDR_FECL (0xFC0A4015) |
443 | #define MCF_GPIO_PDDR_SSI MCF_REG08(0xFC0A4016) | 417 | #define MCFGPIO_PDDR_SSI (0xFC0A4016) |
444 | #define MCF_GPIO_PDDR_BUSCTL MCF_REG08(0xFC0A4017) | 418 | #define MCFGPIO_PDDR_BUSCTL (0xFC0A4017) |
445 | #define MCF_GPIO_PDDR_BE MCF_REG08(0xFC0A4018) | 419 | #define MCFGPIO_PDDR_BE (0xFC0A4018) |
446 | #define MCF_GPIO_PDDR_CS MCF_REG08(0xFC0A4019) | 420 | #define MCFGPIO_PDDR_CS (0xFC0A4019) |
447 | #define MCF_GPIO_PDDR_PWM MCF_REG08(0xFC0A401A) | 421 | #define MCFGPIO_PDDR_PWM (0xFC0A401A) |
448 | #define MCF_GPIO_PDDR_FECI2C MCF_REG08(0xFC0A401B) | 422 | #define MCFGPIO_PDDR_FECI2C (0xFC0A401B) |
449 | #define MCF_GPIO_PDDR_UART MCF_REG08(0xFC0A401C) | 423 | #define MCFGPIO_PDDR_UART (0xFC0A401C) |
450 | #define MCF_GPIO_PDDR_QSPI MCF_REG08(0xFC0A401E) | 424 | #define MCFGPIO_PDDR_QSPI (0xFC0A401E) |
451 | #define MCF_GPIO_PDDR_TIMER MCF_REG08(0xFC0A401F) | 425 | #define MCFGPIO_PDDR_TIMER (0xFC0A401F) |
452 | #define MCF_GPIO_PDDR_LCDDATAH MCF_REG08(0xFC0A4021) | 426 | #define MCFGPIO_PDDR_LCDDATAH (0xFC0A4021) |
453 | #define MCF_GPIO_PDDR_LCDDATAM MCF_REG08(0xFC0A4022) | 427 | #define MCFGPIO_PDDR_LCDDATAM (0xFC0A4022) |
454 | #define MCF_GPIO_PDDR_LCDDATAL MCF_REG08(0xFC0A4023) | 428 | #define MCFGPIO_PDDR_LCDDATAL (0xFC0A4023) |
455 | #define MCF_GPIO_PDDR_LCDCTLH MCF_REG08(0xFC0A4024) | 429 | #define MCFGPIO_PDDR_LCDCTLH (0xFC0A4024) |
456 | #define MCF_GPIO_PDDR_LCDCTLL MCF_REG08(0xFC0A4025) | 430 | #define MCFGPIO_PDDR_LCDCTLL (0xFC0A4025) |
457 | #define MCF_GPIO_PPDSDR_FECH MCF_REG08(0xFC0A4028) | 431 | #define MCFGPIO_PPDSDR_FECH (0xFC0A4028) |
458 | #define MCF_GPIO_PPDSDR_FECL MCF_REG08(0xFC0A4029) | 432 | #define MCFGPIO_PPDSDR_FECL (0xFC0A4029) |
459 | #define MCF_GPIO_PPDSDR_SSI MCF_REG08(0xFC0A402A) | 433 | #define MCFGPIO_PPDSDR_SSI (0xFC0A402A) |
460 | #define MCF_GPIO_PPDSDR_BUSCTL MCF_REG08(0xFC0A402B) | 434 | #define MCFGPIO_PPDSDR_BUSCTL (0xFC0A402B) |
461 | #define MCF_GPIO_PPDSDR_BE MCF_REG08(0xFC0A402C) | 435 | #define MCFGPIO_PPDSDR_BE (0xFC0A402C) |
462 | #define MCF_GPIO_PPDSDR_CS MCF_REG08(0xFC0A402D) | 436 | #define MCFGPIO_PPDSDR_CS (0xFC0A402D) |
463 | #define MCF_GPIO_PPDSDR_PWM MCF_REG08(0xFC0A402E) | 437 | #define MCFGPIO_PPDSDR_PWM (0xFC0A402E) |
464 | #define MCF_GPIO_PPDSDR_FECI2C MCF_REG08(0xFC0A402F) | 438 | #define MCFGPIO_PPDSDR_FECI2C (0xFC0A402F) |
465 | #define MCF_GPIO_PPDSDR_UART MCF_REG08(0xFC0A4031) | 439 | #define MCFGPIO_PPDSDR_UART (0xFC0A4031) |
466 | #define MCF_GPIO_PPDSDR_QSPI MCF_REG08(0xFC0A4032) | 440 | #define MCFGPIO_PPDSDR_QSPI (0xFC0A4032) |
467 | #define MCF_GPIO_PPDSDR_TIMER MCF_REG08(0xFC0A4033) | 441 | #define MCFGPIO_PPDSDR_TIMER (0xFC0A4033) |
468 | #define MCF_GPIO_PPDSDR_LCDDATAH MCF_REG08(0xFC0A4035) | 442 | #define MCFGPIO_PPDSDR_LCDDATAH (0xFC0A4035) |
469 | #define MCF_GPIO_PPDSDR_LCDDATAM MCF_REG08(0xFC0A4036) | 443 | #define MCFGPIO_PPDSDR_LCDDATAM (0xFC0A4036) |
470 | #define MCF_GPIO_PPDSDR_LCDDATAL MCF_REG08(0xFC0A4037) | 444 | #define MCFGPIO_PPDSDR_LCDDATAL (0xFC0A4037) |
471 | #define MCF_GPIO_PPDSDR_LCDCTLH MCF_REG08(0xFC0A4038) | 445 | #define MCFGPIO_PPDSDR_LCDCTLH (0xFC0A4038) |
472 | #define MCF_GPIO_PPDSDR_LCDCTLL MCF_REG08(0xFC0A4039) | 446 | #define MCFGPIO_PPDSDR_LCDCTLL (0xFC0A4039) |
473 | #define MCF_GPIO_PCLRR_FECH MCF_REG08(0xFC0A403C) | 447 | #define MCFGPIO_PCLRR_FECH (0xFC0A403C) |
474 | #define MCF_GPIO_PCLRR_FECL MCF_REG08(0xFC0A403D) | 448 | #define MCFGPIO_PCLRR_FECL (0xFC0A403D) |
475 | #define MCF_GPIO_PCLRR_SSI MCF_REG08(0xFC0A403E) | 449 | #define MCFGPIO_PCLRR_SSI (0xFC0A403E) |
476 | #define MCF_GPIO_PCLRR_BUSCTL MCF_REG08(0xFC0A403F) | 450 | #define MCFGPIO_PCLRR_BUSCTL (0xFC0A403F) |
477 | #define MCF_GPIO_PCLRR_BE MCF_REG08(0xFC0A4040) | 451 | #define MCFGPIO_PCLRR_BE (0xFC0A4040) |
478 | #define MCF_GPIO_PCLRR_CS MCF_REG08(0xFC0A4041) | 452 | #define MCFGPIO_PCLRR_CS (0xFC0A4041) |
479 | #define MCF_GPIO_PCLRR_PWM MCF_REG08(0xFC0A4042) | 453 | #define MCFGPIO_PCLRR_PWM (0xFC0A4042) |
480 | #define MCF_GPIO_PCLRR_FECI2C MCF_REG08(0xFC0A4043) | 454 | #define MCFGPIO_PCLRR_FECI2C (0xFC0A4043) |
481 | #define MCF_GPIO_PCLRR_UART MCF_REG08(0xFC0A4045) | 455 | #define MCFGPIO_PCLRR_UART (0xFC0A4045) |
482 | #define MCF_GPIO_PCLRR_QSPI MCF_REG08(0xFC0A4046) | 456 | #define MCFGPIO_PCLRR_QSPI (0xFC0A4046) |
483 | #define MCF_GPIO_PCLRR_TIMER MCF_REG08(0xFC0A4047) | 457 | #define MCFGPIO_PCLRR_TIMER (0xFC0A4047) |
484 | #define MCF_GPIO_PCLRR_LCDDATAH MCF_REG08(0xFC0A4049) | 458 | #define MCFGPIO_PCLRR_LCDDATAH (0xFC0A4049) |
485 | #define MCF_GPIO_PCLRR_LCDDATAM MCF_REG08(0xFC0A404A) | 459 | #define MCFGPIO_PCLRR_LCDDATAM (0xFC0A404A) |
486 | #define MCF_GPIO_PCLRR_LCDDATAL MCF_REG08(0xFC0A404B) | 460 | #define MCFGPIO_PCLRR_LCDDATAL (0xFC0A404B) |
487 | #define MCF_GPIO_PCLRR_LCDCTLH MCF_REG08(0xFC0A404C) | 461 | #define MCFGPIO_PCLRR_LCDCTLH (0xFC0A404C) |
488 | #define MCF_GPIO_PCLRR_LCDCTLL MCF_REG08(0xFC0A404D) | 462 | #define MCFGPIO_PCLRR_LCDCTLL (0xFC0A404D) |
489 | #define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050) | 463 | #define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050) |
490 | #define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051) | 464 | #define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051) |
491 | #define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052) | 465 | #define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052) |
@@ -1187,6 +1161,20 @@ | |||
1187 | /* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ | 1161 | /* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ |
1188 | #define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0) | 1162 | #define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0) |
1189 | 1163 | ||
1164 | /* | ||
1165 | * Generic GPIO support | ||
1166 | */ | ||
1167 | #define MCFGPIO_PODR MCFGPIO_PODR_FECH | ||
1168 | #define MCFGPIO_PDDR MCFGPIO_PDDR_FECH | ||
1169 | #define MCFGPIO_PPDR MCFGPIO_PPDSDR_FECH | ||
1170 | #define MCFGPIO_SETR MCFGPIO_PPDSDR_FECH | ||
1171 | #define MCFGPIO_CLRR MCFGPIO_PCLRR_FECH | ||
1172 | |||
1173 | #define MCFGPIO_PIN_MAX 136 | ||
1174 | #define MCFGPIO_IRQ_MAX 8 | ||
1175 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE | ||
1176 | |||
1177 | |||
1190 | /********************************************************************* | 1178 | /********************************************************************* |
1191 | * | 1179 | * |
1192 | * Interrupt Controller (INTC) | 1180 | * Interrupt Controller (INTC) |
@@ -2154,12 +2142,12 @@ | |||
2154 | *********************************************************************/ | 2142 | *********************************************************************/ |
2155 | 2143 | ||
2156 | /* Register read/write macros */ | 2144 | /* Register read/write macros */ |
2157 | #define MCF_EPORT_EPPAR MCF_REG16(0xFC094000) | 2145 | #define MCFEPORT_EPPAR (0xFC094000) |
2158 | #define MCF_EPORT_EPDDR MCF_REG08(0xFC094002) | 2146 | #define MCFEPORT_EPDDR (0xFC094002) |
2159 | #define MCF_EPORT_EPIER MCF_REG08(0xFC094003) | 2147 | #define MCFEPORT_EPIER (0xFC094003) |
2160 | #define MCF_EPORT_EPDR MCF_REG08(0xFC094004) | 2148 | #define MCFEPORT_EPDR (0xFC094004) |
2161 | #define MCF_EPORT_EPPDR MCF_REG08(0xFC094005) | 2149 | #define MCFEPORT_EPPDR (0xFC094005) |
2162 | #define MCF_EPORT_EPFR MCF_REG08(0xFC094006) | 2150 | #define MCFEPORT_EPFR (0xFC094006) |
2163 | 2151 | ||
2164 | /* Bit definitions and macros for MCF_EPORT_EPPAR */ | 2152 | /* Bit definitions and macros for MCF_EPORT_EPPAR */ |
2165 | #define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2) | 2153 | #define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2) |