<div dir="ltr">Please have a look at this patch.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 10, 2014 at 6:45 PM, Hesham ALMatary <span dir="ltr"><<a href="mailto:heshamelmatary@gmail.com" target="_blank">heshamelmatary@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c | 2 +-<br>
c/src/lib/libbsp/or1k/or1ksim/console/uart.c | 15 +++++++++++----<br>
2 files changed, 12 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c b/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c<br>
index ad49d07..4169a11 100644<br>
--- a/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c<br>
+++ b/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c<br>
@@ -137,8 +137,8 @@ CPU_Counter_ticks _CPU_Counter_difference(<br>
<br>
#define Clock_driver_support_install_isr(isr, old_isr) \<br>
do { \<br>
- or1ksim_clock_handler_install(isr, old_isr); \<br>
old_isr = NULL; \<br>
+ or1ksim_clock_handler_install(isr, old_isr); \<br>
} while (0)<br>
<br>
#define Clock_driver_support_shutdown_hardware() or1ksim_clock_cleanup()<br>
diff --git a/c/src/lib/libbsp/or1k/or1ksim/console/uart.c b/c/src/lib/libbsp/or1k/or1ksim/console/uart.c<br>
index 7ceca81..31cdce6 100644<br>
--- a/c/src/lib/libbsp/or1k/or1ksim/console/uart.c<br>
+++ b/c/src/lib/libbsp/or1k/or1ksim/console/uart.c<br>
@@ -21,6 +21,14 @@<br>
#include <bsp/uart.h><br>
#include <rtems/score/isr.h><br>
<br>
+static void uart_initialize(int minor);<br>
+static int uart_first_open(int major, int minor, void *arg);<br>
+static int uart_last_close(int major, int minor, void *arg);<br>
+static int uart_read_polled(int minor);<br>
+static ssize_t uart_write(int minor, const char *buf, size_t len);<br>
+static void uart_write_polled(int minor, char c);<br>
+static int uart_set_attributes(int minor, const struct termios *t);<br>
+<br>
static rtems_vector_number uart_get_irq_number(const console_tbl *ct)<br>
{<br>
return ct->ulIntVector;<br>
@@ -86,10 +94,9 @@ static int uart_last_close(int major, int minor, void *arg)<br>
return 0;<br>
}<br>
<br>
-static char uart_read_polled(int minor)<br>
+static int uart_read_polled(int minor)<br>
{<br>
unsigned char lsr;<br>
- char c;<br>
<br>
/* Get a character when avaiable */<br>
do {<br>
@@ -120,7 +127,7 @@ static void uart_write_polled(int minor, char c)<br>
} while ( (lsr & transmit_finished) != transmit_finished );<br>
}<br>
<br>
-static ssize_t uart_write_support_polled(<br>
+static ssize_t uart_write(<br>
int minor,<br>
const char *s,<br>
size_t n<br>
@@ -145,7 +152,7 @@ const console_fns or1ksim_uart_fns = {<br>
.deviceFirstOpen = uart_first_open,<br>
.deviceLastClose = uart_last_close,<br>
.deviceRead = uart_read_polled,<br>
- .deviceWrite = uart_write_support_polled,<br>
+ .deviceWrite = uart_write,<br>
.deviceInitialize = uart_initialize,<br>
.deviceWritePolled = uart_write_polled,<br>
.deviceSetAttributes = uart_set_attributes,<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.3<br>
<br>
</font></span></blockquote></div><br></div>