bsp/mpc55xx: Add ESCI_C and ESCI_D support

This commit is contained in:
Sebastian Huber
2012-07-17 17:51:46 +02:00
parent dafacfa742
commit 64d72e8d4e
2 changed files with 30 additions and 7 deletions

View File

@@ -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"),

View File

@@ -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)