summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-07-17 17:51:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-07-18 09:46:14 +0200
commit64d72e8d4e44f3385c5528aba31ed26e4e5e40da (patch)
tree1a30e0f0088724f74e693cfb97b32eae7a698e6b /c
parentbsp/mpc55xx: Add MPC55XX_SYSTEM_CLOCK_DIVIDER (diff)
downloadrtems-64d72e8d4e44f3385c5528aba31ed26e4e5e40da.tar.bz2
bsp/mpc55xx: Add ESCI_C and ESCI_D support
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-config.c14
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c23
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 816c8552b6..4f74b38394 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 737936b75f..9aa19ac78a 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)