diff options
author | sfking@fdwdc.com <sfking@fdwdc.com> | 2009-06-19 21:11:10 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2009-09-09 22:01:23 -0400 |
commit | 7846fe800a81adae1e28d9d035b5226f75358280 (patch) | |
tree | ef9d2f48acb2bf5c916af71643723bc4f6f420f4 /arch/m68k | |
parent | f7a20ba06435d067247bd50a15a1d550b9b3fc7d (diff) |
generic GPIO support for the Freescale Coldfire 532x.
Add support for the 532x.
Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/include/asm/m532xsim.h | 154 |
1 files changed, 84 insertions, 70 deletions
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h index eb7fd4448947..3e80810b3784 100644 --- a/arch/m68k/include/asm/m532xsim.h +++ b/arch/m68k/include/asm/m532xsim.h | |||
@@ -422,70 +422,70 @@ | |||
422 | *********************************************************************/ | 422 | *********************************************************************/ |
423 | 423 | ||
424 | /* Register read/write macros */ | 424 | /* Register read/write macros */ |
425 | #define MCF_GPIO_PODR_FECH MCF_REG08(0xFC0A4000) | 425 | #define MCFGPIO_PODR_FECH (0xFC0A4000) |
426 | #define MCF_GPIO_PODR_FECL MCF_REG08(0xFC0A4001) | 426 | #define MCFGPIO_PODR_FECL (0xFC0A4001) |
427 | #define MCF_GPIO_PODR_SSI MCF_REG08(0xFC0A4002) | 427 | #define MCFGPIO_PODR_SSI (0xFC0A4002) |
428 | #define MCF_GPIO_PODR_BUSCTL MCF_REG08(0xFC0A4003) | 428 | #define MCFGPIO_PODR_BUSCTL (0xFC0A4003) |
429 | #define MCF_GPIO_PODR_BE MCF_REG08(0xFC0A4004) | 429 | #define MCFGPIO_PODR_BE (0xFC0A4004) |
430 | #define MCF_GPIO_PODR_CS MCF_REG08(0xFC0A4005) | 430 | #define MCFGPIO_PODR_CS (0xFC0A4005) |
431 | #define MCF_GPIO_PODR_PWM MCF_REG08(0xFC0A4006) | 431 | #define MCFGPIO_PODR_PWM (0xFC0A4006) |
432 | #define MCF_GPIO_PODR_FECI2C MCF_REG08(0xFC0A4007) | 432 | #define MCFGPIO_PODR_FECI2C (0xFC0A4007) |
433 | #define MCF_GPIO_PODR_UART MCF_REG08(0xFC0A4009) | 433 | #define MCFGPIO_PODR_UART (0xFC0A4009) |
434 | #define MCF_GPIO_PODR_QSPI MCF_REG08(0xFC0A400A) | 434 | #define MCFGPIO_PODR_QSPI (0xFC0A400A) |
435 | #define MCF_GPIO_PODR_TIMER MCF_REG08(0xFC0A400B) | 435 | #define MCFGPIO_PODR_TIMER (0xFC0A400B) |
436 | #define MCF_GPIO_PODR_LCDDATAH MCF_REG08(0xFC0A400D) | 436 | #define MCFGPIO_PODR_LCDDATAH (0xFC0A400D) |
437 | #define MCF_GPIO_PODR_LCDDATAM MCF_REG08(0xFC0A400E) | 437 | #define MCFGPIO_PODR_LCDDATAM (0xFC0A400E) |
438 | #define MCF_GPIO_PODR_LCDDATAL MCF_REG08(0xFC0A400F) | 438 | #define MCFGPIO_PODR_LCDDATAL (0xFC0A400F) |
439 | #define MCF_GPIO_PODR_LCDCTLH MCF_REG08(0xFC0A4010) | 439 | #define MCFGPIO_PODR_LCDCTLH (0xFC0A4010) |
440 | #define MCF_GPIO_PODR_LCDCTLL MCF_REG08(0xFC0A4011) | 440 | #define MCFGPIO_PODR_LCDCTLL (0xFC0A4011) |
441 | #define MCF_GPIO_PDDR_FECH MCF_REG08(0xFC0A4014) | 441 | #define MCFGPIO_PDDR_FECH (0xFC0A4014) |
442 | #define MCF_GPIO_PDDR_FECL MCF_REG08(0xFC0A4015) | 442 | #define MCFGPIO_PDDR_FECL (0xFC0A4015) |
443 | #define MCF_GPIO_PDDR_SSI MCF_REG08(0xFC0A4016) | 443 | #define MCFGPIO_PDDR_SSI (0xFC0A4016) |
444 | #define MCF_GPIO_PDDR_BUSCTL MCF_REG08(0xFC0A4017) | 444 | #define MCFGPIO_PDDR_BUSCTL (0xFC0A4017) |
445 | #define MCF_GPIO_PDDR_BE MCF_REG08(0xFC0A4018) | 445 | #define MCFGPIO_PDDR_BE (0xFC0A4018) |
446 | #define MCF_GPIO_PDDR_CS MCF_REG08(0xFC0A4019) | 446 | #define MCFGPIO_PDDR_CS (0xFC0A4019) |
447 | #define MCF_GPIO_PDDR_PWM MCF_REG08(0xFC0A401A) | 447 | #define MCFGPIO_PDDR_PWM (0xFC0A401A) |
448 | #define MCF_GPIO_PDDR_FECI2C MCF_REG08(0xFC0A401B) | 448 | #define MCFGPIO_PDDR_FECI2C (0xFC0A401B) |
449 | #define MCF_GPIO_PDDR_UART MCF_REG08(0xFC0A401C) | 449 | #define MCFGPIO_PDDR_UART (0xFC0A401C) |
450 | #define MCF_GPIO_PDDR_QSPI MCF_REG08(0xFC0A401E) | 450 | #define MCFGPIO_PDDR_QSPI (0xFC0A401E) |
451 | #define MCF_GPIO_PDDR_TIMER MCF_REG08(0xFC0A401F) | 451 | #define MCFGPIO_PDDR_TIMER (0xFC0A401F) |
452 | #define MCF_GPIO_PDDR_LCDDATAH MCF_REG08(0xFC0A4021) | 452 | #define MCFGPIO_PDDR_LCDDATAH (0xFC0A4021) |
453 | #define MCF_GPIO_PDDR_LCDDATAM MCF_REG08(0xFC0A4022) | 453 | #define MCFGPIO_PDDR_LCDDATAM (0xFC0A4022) |
454 | #define MCF_GPIO_PDDR_LCDDATAL MCF_REG08(0xFC0A4023) | 454 | #define MCFGPIO_PDDR_LCDDATAL (0xFC0A4023) |
455 | #define MCF_GPIO_PDDR_LCDCTLH MCF_REG08(0xFC0A4024) | 455 | #define MCFGPIO_PDDR_LCDCTLH (0xFC0A4024) |
456 | #define MCF_GPIO_PDDR_LCDCTLL MCF_REG08(0xFC0A4025) | 456 | #define MCFGPIO_PDDR_LCDCTLL (0xFC0A4025) |
457 | #define MCF_GPIO_PPDSDR_FECH MCF_REG08(0xFC0A4028) | 457 | #define MCFGPIO_PPDSDR_FECH (0xFC0A4028) |
458 | #define MCF_GPIO_PPDSDR_FECL MCF_REG08(0xFC0A4029) | 458 | #define MCFGPIO_PPDSDR_FECL (0xFC0A4029) |
459 | #define MCF_GPIO_PPDSDR_SSI MCF_REG08(0xFC0A402A) | 459 | #define MCFGPIO_PPDSDR_SSI (0xFC0A402A) |
460 | #define MCF_GPIO_PPDSDR_BUSCTL MCF_REG08(0xFC0A402B) | 460 | #define MCFGPIO_PPDSDR_BUSCTL (0xFC0A402B) |
461 | #define MCF_GPIO_PPDSDR_BE MCF_REG08(0xFC0A402C) | 461 | #define MCFGPIO_PPDSDR_BE (0xFC0A402C) |
462 | #define MCF_GPIO_PPDSDR_CS MCF_REG08(0xFC0A402D) | 462 | #define MCFGPIO_PPDSDR_CS (0xFC0A402D) |
463 | #define MCF_GPIO_PPDSDR_PWM MCF_REG08(0xFC0A402E) | 463 | #define MCFGPIO_PPDSDR_PWM (0xFC0A402E) |
464 | #define MCF_GPIO_PPDSDR_FECI2C MCF_REG08(0xFC0A402F) | 464 | #define MCFGPIO_PPDSDR_FECI2C (0xFC0A402F) |
465 | #define MCF_GPIO_PPDSDR_UART MCF_REG08(0xFC0A4031) | 465 | #define MCFGPIO_PPDSDR_UART (0xFC0A4031) |
466 | #define MCF_GPIO_PPDSDR_QSPI MCF_REG08(0xFC0A4032) | 466 | #define MCFGPIO_PPDSDR_QSPI (0xFC0A4032) |
467 | #define MCF_GPIO_PPDSDR_TIMER MCF_REG08(0xFC0A4033) | 467 | #define MCFGPIO_PPDSDR_TIMER (0xFC0A4033) |
468 | #define MCF_GPIO_PPDSDR_LCDDATAH MCF_REG08(0xFC0A4035) | 468 | #define MCFGPIO_PPDSDR_LCDDATAH (0xFC0A4035) |
469 | #define MCF_GPIO_PPDSDR_LCDDATAM MCF_REG08(0xFC0A4036) | 469 | #define MCFGPIO_PPDSDR_LCDDATAM (0xFC0A4036) |
470 | #define MCF_GPIO_PPDSDR_LCDDATAL MCF_REG08(0xFC0A4037) | 470 | #define MCFGPIO_PPDSDR_LCDDATAL (0xFC0A4037) |
471 | #define MCF_GPIO_PPDSDR_LCDCTLH MCF_REG08(0xFC0A4038) | 471 | #define MCFGPIO_PPDSDR_LCDCTLH (0xFC0A4038) |
472 | #define MCF_GPIO_PPDSDR_LCDCTLL MCF_REG08(0xFC0A4039) | 472 | #define MCFGPIO_PPDSDR_LCDCTLL (0xFC0A4039) |
473 | #define MCF_GPIO_PCLRR_FECH MCF_REG08(0xFC0A403C) | 473 | #define MCFGPIO_PCLRR_FECH (0xFC0A403C) |
474 | #define MCF_GPIO_PCLRR_FECL MCF_REG08(0xFC0A403D) | 474 | #define MCFGPIO_PCLRR_FECL (0xFC0A403D) |
475 | #define MCF_GPIO_PCLRR_SSI MCF_REG08(0xFC0A403E) | 475 | #define MCFGPIO_PCLRR_SSI (0xFC0A403E) |
476 | #define MCF_GPIO_PCLRR_BUSCTL MCF_REG08(0xFC0A403F) | 476 | #define MCFGPIO_PCLRR_BUSCTL (0xFC0A403F) |
477 | #define MCF_GPIO_PCLRR_BE MCF_REG08(0xFC0A4040) | 477 | #define MCFGPIO_PCLRR_BE (0xFC0A4040) |
478 | #define MCF_GPIO_PCLRR_CS MCF_REG08(0xFC0A4041) | 478 | #define MCFGPIO_PCLRR_CS (0xFC0A4041) |
479 | #define MCF_GPIO_PCLRR_PWM MCF_REG08(0xFC0A4042) | 479 | #define MCFGPIO_PCLRR_PWM (0xFC0A4042) |
480 | #define MCF_GPIO_PCLRR_FECI2C MCF_REG08(0xFC0A4043) | 480 | #define MCFGPIO_PCLRR_FECI2C (0xFC0A4043) |
481 | #define MCF_GPIO_PCLRR_UART MCF_REG08(0xFC0A4045) | 481 | #define MCFGPIO_PCLRR_UART (0xFC0A4045) |
482 | #define MCF_GPIO_PCLRR_QSPI MCF_REG08(0xFC0A4046) | 482 | #define MCFGPIO_PCLRR_QSPI (0xFC0A4046) |
483 | #define MCF_GPIO_PCLRR_TIMER MCF_REG08(0xFC0A4047) | 483 | #define MCFGPIO_PCLRR_TIMER (0xFC0A4047) |
484 | #define MCF_GPIO_PCLRR_LCDDATAH MCF_REG08(0xFC0A4049) | 484 | #define MCFGPIO_PCLRR_LCDDATAH (0xFC0A4049) |
485 | #define MCF_GPIO_PCLRR_LCDDATAM MCF_REG08(0xFC0A404A) | 485 | #define MCFGPIO_PCLRR_LCDDATAM (0xFC0A404A) |
486 | #define MCF_GPIO_PCLRR_LCDDATAL MCF_REG08(0xFC0A404B) | 486 | #define MCFGPIO_PCLRR_LCDDATAL (0xFC0A404B) |
487 | #define MCF_GPIO_PCLRR_LCDCTLH MCF_REG08(0xFC0A404C) | 487 | #define MCFGPIO_PCLRR_LCDCTLH (0xFC0A404C) |
488 | #define MCF_GPIO_PCLRR_LCDCTLL MCF_REG08(0xFC0A404D) | 488 | #define MCFGPIO_PCLRR_LCDCTLL (0xFC0A404D) |
489 | #define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050) | 489 | #define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050) |
490 | #define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051) | 490 | #define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051) |
491 | #define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052) | 491 | #define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052) |
@@ -1187,6 +1187,20 @@ | |||
1187 | /* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ | 1187 | /* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ |
1188 | #define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0) | 1188 | #define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0) |
1189 | 1189 | ||
1190 | /* | ||
1191 | * Generic GPIO support | ||
1192 | */ | ||
1193 | #define MCFGPIO_PODR MCFGPIO_PODR_FECH | ||
1194 | #define MCFGPIO_PDDR MCFGPIO_PDDR_FECH | ||
1195 | #define MCFGPIO_PPDR MCFGPIO_PPDSDR_FECH | ||
1196 | #define MCFGPIO_SETR MCFGPIO_PPDSDR_FECH | ||
1197 | #define MCFGPIO_CLRR MCFGPIO_PCLRR_FECH | ||
1198 | |||
1199 | #define MCFGPIO_PIN_MAX 136 | ||
1200 | #define MCFGPIO_IRQ_MAX 8 | ||
1201 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE | ||
1202 | |||
1203 | |||
1190 | /********************************************************************* | 1204 | /********************************************************************* |
1191 | * | 1205 | * |
1192 | * Interrupt Controller (INTC) | 1206 | * Interrupt Controller (INTC) |
@@ -2154,12 +2168,12 @@ | |||
2154 | *********************************************************************/ | 2168 | *********************************************************************/ |
2155 | 2169 | ||
2156 | /* Register read/write macros */ | 2170 | /* Register read/write macros */ |
2157 | #define MCF_EPORT_EPPAR MCF_REG16(0xFC094000) | 2171 | #define MCFEPORT_EPPAR (0xFC094000) |
2158 | #define MCF_EPORT_EPDDR MCF_REG08(0xFC094002) | 2172 | #define MCFEPORT_EPDDR (0xFC094002) |
2159 | #define MCF_EPORT_EPIER MCF_REG08(0xFC094003) | 2173 | #define MCFEPORT_EPIER (0xFC094003) |
2160 | #define MCF_EPORT_EPDR MCF_REG08(0xFC094004) | 2174 | #define MCFEPORT_EPDR (0xFC094004) |
2161 | #define MCF_EPORT_EPPDR MCF_REG08(0xFC094005) | 2175 | #define MCFEPORT_EPPDR (0xFC094005) |
2162 | #define MCF_EPORT_EPFR MCF_REG08(0xFC094006) | 2176 | #define MCFEPORT_EPFR (0xFC094006) |
2163 | 2177 | ||
2164 | /* Bit definitions and macros for MCF_EPORT_EPPAR */ | 2178 | /* Bit definitions and macros for MCF_EPORT_EPPAR */ |
2165 | #define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2) | 2179 | #define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2) |