diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-20 16:22:16 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-24 10:54:01 +0200 |
commit | 0110491bd5b4c181289e4388a96862d5917c8268 (patch) | |
tree | 1c3932fdf9f56b8d1ced3e544569afb63e55568f /c | |
parent | bsp/virtex: Fix warnings (diff) | |
download | rtems-0110491bd5b4c181289e4388a96862d5917c8268.tar.bz2 |
bsp/virtex: Add console devices only if present
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/virtex/console/consolelite.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/powerpc/virtex/console/consolelite.c b/c/src/lib/libbsp/powerpc/virtex/console/consolelite.c index 64399fd198..513d289451 100644 --- a/c/src/lib/libbsp/powerpc/virtex/console/consolelite.c +++ b/c/src/lib/libbsp/powerpc/virtex/console/consolelite.c @@ -271,6 +271,7 @@ console_tbl Console_Configuration_Ports[] = { 0, /* ulClock */ 0 /* ulIntVector -- base for port */ }, +#ifdef XPAR_UARTLITE_1_BASEADDR { "/dev/ttyS1", /* sDeviceName */ SERIAL_CUSTOM, /* deviceType */ @@ -280,7 +281,7 @@ console_tbl Console_Configuration_Ports[] = { 16, /* ulMargin */ 8, /* ulHysteresis */ (void *) NULL, /* NULL */ /* pDeviceParams */ - 0x40610000, /* ulCtrlPort1 */ + XPAR_UARTLITE_1_BASEADDR, /* ulCtrlPort1 */ 0, /* ulCtrlPort2 */ 0, /* ulDataPort */ NULL, /* getRegister */ @@ -290,6 +291,8 @@ console_tbl Console_Configuration_Ports[] = { 0, /* ulClock */ 0 /* ulIntVector -- base for port */ }, +#endif +#ifdef XPAR_UARTLITE_2_BASEADDR { "/dev/ttyS2", /* sDeviceName */ SERIAL_CUSTOM, /* deviceType */ @@ -299,7 +302,7 @@ console_tbl Console_Configuration_Ports[] = { 16, /* ulMargin */ 8, /* ulHysteresis */ (void *) NULL, /* NULL */ /* pDeviceParams */ - 0x40620000, /* ulCtrlPort1 */ + XPAR_UARTLITE_2_BASEADDR, /* ulCtrlPort1 */ 0, /* ulCtrlPort2 */ 0, /* ulDataPort */ NULL, /* getRegister */ @@ -309,6 +312,8 @@ console_tbl Console_Configuration_Ports[] = { 0, /* ulClock */ 0 /* ulIntVector -- base for port */ }, +#endif +#ifdef XPAR_UARTLITE_2_BASEADDR { "/dev/ttyS3", /* sDeviceName */ SERIAL_CUSTOM, /* deviceType */ @@ -318,7 +323,7 @@ console_tbl Console_Configuration_Ports[] = { 16, /* ulMargin */ 8, /* ulHysteresis */ (void *) NULL, /* NULL */ /* pDeviceParams */ - 0x40630000, /* ulCtrlPort1 */ + XPAR_UARTLITE_3_BASEADDR, /* ulCtrlPort1 */ 0, /* ulCtrlPort2 */ 0, /* ulDataPort */ NULL, /* getRegister */ @@ -328,15 +333,11 @@ console_tbl Console_Configuration_Ports[] = { 0, /* ulClock */ 0 /* ulIntVector -- base for port */ } +#endif }; - - - -#define NUM_CONSOLE_PORTS \ - (sizeof(Console_Configuration_Ports)/sizeof(console_tbl)) - -unsigned long Console_Configuration_Count = NUM_CONSOLE_PORTS; +unsigned long Console_Configuration_Count = + RTEMS_ARRAY_SIZE(Console_Configuration_Ports); #include <rtems/bspIo.h> |