[rtems commit] bsp/mpc55xx: Add ESCI_C and ESCI_D support
Sebastian Huber
sebh at rtems.org
Wed Jul 18 07:44:03 UTC 2012
Module: rtems
Branch: master
Commit: 64d72e8d4e44f3385c5528aba31ed26e4e5e40da
Changeset: http://git.rtems.org/rtems/commit/?id=64d72e8d4e44f3385c5528aba31ed26e4e5e40da
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jul 17 17:51:46 2012 +0200
bsp/mpc55xx: Add ESCI_C and ESCI_D support
---
.../powerpc/mpc55xxevb/console/console-config.c | 14 +++++++++--
.../powerpc/mpc55xxevb/console/console-esci.c | 23 ++++++++++++++++---
2 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-config.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-config.c
index 816c855..4f74b38 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-config.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-config.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2011-2012 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
@@ -18,8 +18,16 @@
CONSOLE_GENERIC_INFO_TABLE = {
#ifdef MPC55XX_HAS_ESCI
- CONSOLE_GENERIC_INFO(mpc55xx_esci_devices + 0, &mpc55xx_esci_callbacks, "/dev/ttyS0"),
- CONSOLE_GENERIC_INFO(mpc55xx_esci_devices + 1, &mpc55xx_esci_callbacks, "/dev/ttyS1")
+ CONSOLE_GENERIC_INFO(mpc55xx_esci_devices + 0, &mpc55xx_esci_callbacks, "/dev/ttyS0")
+ #ifdef ESCI_B
+ , CONSOLE_GENERIC_INFO(mpc55xx_esci_devices + 1, &mpc55xx_esci_callbacks, "/dev/ttyS1")
+ #endif
+ #ifdef ESCI_C
+ , CONSOLE_GENERIC_INFO(mpc55xx_esci_devices + 2, &mpc55xx_esci_callbacks, "/dev/ttyS2")
+ #endif
+ #ifdef ESCI_D
+ , CONSOLE_GENERIC_INFO(mpc55xx_esci_devices + 3, &mpc55xx_esci_callbacks, "/dev/ttyS3")
+ #endif
#endif
#ifdef MPC55XX_HAS_LINFLEX
CONSOLE_GENERIC_INFO(mpc55xx_linflex_devices + 0, &mpc55xx_linflex_callbacks, "/dev/ttyS0"),
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c
index 737936b..9aa19ac 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2008-2011 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
@@ -29,10 +29,25 @@ mpc55xx_esci_context mpc55xx_esci_devices [] = {
{
.regs = &ESCI_A,
.irq = MPC55XX_IRQ_ESCI(0)
- }, {
- .regs = &ESCI_B,
- .irq = MPC55XX_IRQ_ESCI(1)
}
+ #ifdef ESCI_B
+ , {
+ .regs = &ESCI_B,
+ .irq = MPC55XX_IRQ_ESCI(1)
+ }
+ #endif
+ #ifdef ESCI_C
+ , {
+ .regs = &ESCI_C,
+ .irq = MPC55XX_IRQ_ESCI(2)
+ }
+ #endif
+ #ifdef ESCI_D
+ , {
+ .regs = &ESCI_D,
+ .irq = MPC55XX_IRQ_ESCI(3)
+ }
+ #endif
};
static void mpc55xx_esci_poll_write(int minor, char c)
More information about the vc
mailing list