summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mpc55xxevb
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mpc55xxevb')
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c11
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-linflex.c17
2 files changed, 12 insertions, 16 deletions
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 7cff92fcd9..c54dd353fc 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c
@@ -328,13 +328,12 @@ static int mpc55xx_esci_poll_read(int minor)
static int mpc55xx_esci_write(int minor, const char *out, size_t n)
{
- mpc55xx_esci_context *self = console_generic_get_context(minor);
- rtems_interrupt_level level;
+ if (n > 0) {
+ mpc55xx_esci_context *self = console_generic_get_context(minor);
- rtems_interrupt_disable(level);
- self->regs->DR.B.D = out [0];
- self->transmit_in_progress = true;
- rtems_interrupt_enable(level);
+ self->regs->DR.B.D = out [0];
+ self->transmit_in_progress = true;
+ }
return 0;
}
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-linflex.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-linflex.c
index 0d5938126e..20ffcf3d57 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-linflex.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-linflex.c
@@ -389,17 +389,14 @@ static int mpc55xx_linflex_poll_read(int minor)
static int mpc55xx_linflex_write(int minor, const char *out, size_t n)
{
- mpc55xx_linflex_context *self = console_generic_get_context(minor);
- volatile LINFLEX_tag *regs = self->regs;
- rtems_interrupt_level level;
-
- rtems_interrupt_disable(level);
-
- regs->BDRL.B.DATA0 = out [0];
- self->transmit_in_progress = true;
- /* TODO: send more then one byte */
+ if (n > 0) {
+ mpc55xx_linflex_context *self = console_generic_get_context(minor);
+ volatile LINFLEX_tag *regs = self->regs;
- rtems_interrupt_enable(level);
+ regs->BDRL.B.DATA0 = out [0];
+ self->transmit_in_progress = true;
+ /* TODO: send more then one byte */
+ }
return 0;
}