<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span>Hello,</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Worked again on csb336 patch. Following points I've kept in mind while doing this :</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>1) Update legacy
install and remove methods to the new generic ones</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>2)Removed all uses of tems_irq_connect_data type</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>3) Inserted protoypes for functions which didn't had one</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>4) Made functions static that are only used in that file</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color:
rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Hoping to get reviews, so that I can move on with other BSPs.</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color: transparent;"><span><div style="background-color: transparent;"><font size="2">commit e22d51a1f9d2efeba77e97ff0c81a9a5800af20c</font></div><div style="background-color: transparent;"><font size="2">Author: Vipul Nayyar <nayyar_vipul@yahoo.com></font></div><div style="background-color: transparent;"><font size="2">Date: Sun Jul 7 16:51:07 2013 +0530</font></div><div style="background-color: transparent;"><font size="2"><br></font></div><div style="background-color: transparent;"><font size="2"> Updated Legacy code in arm csb336</font></div><div style="background-color: transparent;"><font
size="2"><br></font></div><div style="background-color: transparent;"><font size="2">diff --git a/c/src/lib/libbsp/arm/csb336/console/uart.c b/c/src/lib/libbsp/arm/csb336/console/uart.c</font></div><div style="background-color: transparent;"><font size="2">index 4dc409b..96126fa 100644</font></div><div style="background-color: transparent;"><font size="2">--- a/c/src/lib/libbsp/arm/csb336/console/uart.c</font></div><div style="background-color: transparent;"><font size="2">+++ b/c/src/lib/libbsp/arm/csb336/console/uart.c</font></div><div style="background-color: transparent;"><font size="2">@@ -13,6 +13,7 @@</font></div><div style="background-color: transparent;"><font size="2"> #include <libchip/sersupp.h></font></div><div style="background-color: transparent;"><font size="2"> #include <rtems/error.h></font></div><div style="background-color: transparent;"><font size="2"> #include <rtems/bspIo.h></font></div><div
style="background-color: transparent;"><font size="2">+#include <assert.h></font></div><div style="background-color: transparent;"><font size="2"> #include <termios.h></font></div><div style="background-color: transparent;"><font size="2"> #include <rtems/irq.h></font></div><div style="background-color: transparent;"><font size="2"> #include <bsp/irq.h></font></div><div style="background-color: transparent;"><font size="2">@@ -34,13 +35,17 @@ static int imx_uart_set_attrs(int, const struct termios *);</font></div><div style="background-color: transparent;"><font size="2"> static void imx_uart_init(int minor);</font></div><div style="background-color: transparent;"><font size="2"> static void imx_uart_set_baud(int, int);</font></div><div style="background-color: transparent;"><font size="2"> static ssize_t imx_uart_poll_write(int, const char *, size_t);</font></div><div style="background-color:
transparent;"><font size="2">+static int imx_uart_poll_read_char(int minor);</font></div><div style="background-color: transparent;"><font size="2">+static void imx_uart_poll_write_char(int minor, char c);</font></div><div style="background-color: transparent;"><font size="2">+static void _BSP_output_char(char c);</font></div><div style="background-color: transparent;"><font size="2">+static int _BSP_poll_char(void);</font></div><div style="background-color: transparent;"><font size="2">+</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> #if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2"> static void imx_uart_tx_isr(rtems_irq_hdl_param);</font></div><div style="background-color: transparent;"><font size="2"> static void imx_uart_rx_isr(rtems_irq_hdl_param);</font></div><div
style="background-color: transparent;"><font size="2">-static void imx_uart_isr_on(const rtems_irq_connect_data *irq);</font></div><div style="background-color: transparent;"><font size="2">-static void imx_uart_isr_off(const rtems_irq_connect_data *irq);</font></div><div style="background-color: transparent;"><font size="2">-static int imx_uart_isr_is_on(const rtems_irq_connect_data *irq);</font></div><div style="background-color: transparent;"><font size="2">+static void imx_uart_isr_on(const rtems_irq_number);</font></div><div style="background-color: transparent;"><font size="2">+static void imx_uart_isr_off(const rtems_irq_number);</font></div><div style="background-color: transparent;"><font size="2"> static ssize_t imx_uart_intr_write(int, const char *, size_t);</font></div><div style="background-color: transparent;"><font size="2"> #endif</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div
style="background-color: transparent;"><font size="2">@@ -71,11 +76,6 @@ rtems_termios_callbacks imx_uart_cbacks = {</font></div><div style="background-color: transparent;"><font size="2"> };</font></div><div style="background-color: transparent;"><font size="2"> #endif</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">-#if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">-static rtems_irq_connect_data imx_uart_tx_isr_data[NUM_DEVS];</font></div><div style="background-color: transparent;"><font size="2">-static rtems_irq_connect_data imx_uart_rx_isr_data[NUM_DEVS];</font></div><div style="background-color: transparent;"><font size="2">-#endif</font></div><div style="background-color: transparent;"><font size="2">-</font></div><div style="background-color: transparent;"><font size="2"> typedef
struct {</font></div><div style="background-color: transparent;"><font size="2"> int minor;</font></div><div style="background-color: transparent;"><font size="2"> mc9328mxl_uart_regs_t * regs;</font></div><div style="background-color: transparent;"><font size="2">@@ -184,17 +184,9 @@ static void imx_uart_init(int minor)</font></div><div style="background-color: transparent;"><font size="2"> imx_uart_data[minor].idx = 0;</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> if (minor == 0) {</font></div><div style="background-color: transparent;"><font size="2">-#if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_tx_isr_data[minor].name = BSP_INT_UART1_TX;</font></div><div
style="background-color: transparent;"><font size="2">- imx_uart_rx_isr_data[minor].name = BSP_INT_UART1_RX;</font></div><div style="background-color: transparent;"><font size="2">-#endif</font></div><div style="background-color: transparent;"><font size="2"> imx_uart_data[minor].regs =</font></div><div style="background-color: transparent;"><font size="2"> (mc9328mxl_uart_regs_t *) MC9328MXL_UART1_BASE;</font></div><div style="background-color: transparent;"><font size="2"> } else if (minor == 1) {</font></div><div style="background-color: transparent;"><font size="2">-#if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_tx_isr_data[minor].name = BSP_INT_UART2_TX;</font></div><div style="background-color: transparent;"><font size="2">-
imx_uart_rx_isr_data[minor].name = BSP_INT_UART2_RX;</font></div><div style="background-color: transparent;"><font size="2">-#endif</font></div><div style="background-color: transparent;"><font size="2"> imx_uart_data[minor].regs =</font></div><div style="background-color: transparent;"><font size="2"> (mc9328mxl_uart_regs_t *) MC9328MXL_UART2_BASE;</font></div><div style="background-color: transparent;"><font size="2"> } else {</font></div><div style="background-color: transparent;"><font size="2">@@ -202,20 +194,6 @@ static void imx_uart_init(int minor)</font></div><div style="background-color: transparent;"><font size="2"> __FUNCTION__, __LINE__, minor);</font></div><div style="background-color: transparent;"><font size="2">
}</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">-#if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_tx_isr_data[minor].hdl = imx_uart_tx_isr;</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_tx_isr_data[minor].handle = &imx_uart_data[minor];</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_tx_isr_data[minor].on = imx_uart_isr_on;</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_tx_isr_data[minor].off = imx_uart_isr_off;</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_tx_isr_data[minor].isOn = imx_uart_isr_is_on;</font></div><div
style="background-color: transparent;"><font size="2">-</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_rx_isr_data[minor].hdl = imx_uart_rx_isr;</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_rx_isr_data[minor].handle = &imx_uart_data[minor];</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_rx_isr_data[minor].on = imx_uart_isr_on;</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_rx_isr_data[minor].off = imx_uart_isr_off;</font></div><div style="background-color: transparent;"><font size="2">- imx_uart_rx_isr_data[minor].isOn = imx_uart_isr_is_on;</font></div><div style="background-color: transparent;"><font size="2">-#endif</font></div><div style="background-color: transparent;"><font
size="2">-</font></div><div style="background-color: transparent;"><font size="2"> imx_uart_data[minor].regs->cr1 = (</font></div><div style="background-color: transparent;"><font size="2"> MC9328MXL_UART_CR1_UARTCLKEN |</font></div><div style="background-color: transparent;"><font size="2"> MC9328MXL_UART_CR1_UARTEN);</font></div><div style="background-color: transparent;"><font size="2">@@ -243,13 +221,43 @@ static void imx_uart_init(int minor)</font></div><div style="background-color: transparent;"><font size="2"> static int imx_uart_first_open(int major, int minor, void *arg)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2"> rtems_libio_open_close_args_t *args = arg;</font></div><div style="background-color: transparent;"><font size="2">+
rtems_status_code status = RTEMS_SUCCESSFUL;</font></div><div style="background-color: transparent;"><font size="2">+ rtems_irq_number name_uart_tx, name_uart_rx;</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> imx_uart_data[minor].tty = args->iop->data1;</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">-#if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">- BSP_install_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);</font></div><div style="background-color: transparent;"><font size="2">- BSP_install_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);</font></div><div style="background-color: transparent;"><font
size="2">+ if (minor == 0) {</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_tx = BSP_INT_UART1_TX;</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_rx = BSP_INT_UART1_RX;</font></div><div style="background-color: transparent;"><font size="2">+ } else if (minor == 1) {</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_tx = BSP_INT_UART2_TX;</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_rx = BSP_INT_UART2_RX;</font></div><div style="background-color: transparent;"><font size="2">+ } else {</font></div><div style="background-color: transparent;"><font size="2">+ rtems_panic("%s:%d Unknown UART minor number %d\n",</font></div><div
style="background-color: transparent;"><font size="2">+ __FUNCTION__, __LINE__, minor);</font></div><div style="background-color: transparent;"><font size="2">+ }</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">+#if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">+ status = rtems_interrupt_handler_install(</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_tx,</font></div><div style="background-color: transparent;"><font size="2">+ "Network",</font></div><div style="background-color: transparent;"><font size="2">+ RTEMS_INTERRUPT_UNIQUE,</font></div><div style="background-color: transparent;"><font
size="2">+ imx_uart_tx_isr,</font></div><div style="background-color: transparent;"><font size="2">+ &imx_uart_data[minor]</font></div><div style="background-color: transparent;"><font size="2">+ );</font></div><div style="background-color: transparent;"><font size="2">+ assert(status == RTEMS_SUCCESSFUL);</font></div><div style="background-color: transparent;"><font size="2">+ imx_uart_isr_on(name_uart_tx);</font></div><div style="background-color: transparent;"><font size="2">+</font></div><div style="background-color: transparent;"><font size="2">+ status = rtems_interrupt_handler_install(</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_rx,</font></div><div style="background-color: transparent;"><font size="2">+ "Network",</font></div><div
style="background-color: transparent;"><font size="2">+ RTEMS_INTERRUPT_UNIQUE,</font></div><div style="background-color: transparent;"><font size="2">+ imx_uart_rx_isr,</font></div><div style="background-color: transparent;"><font size="2">+ &imx_uart_data[minor]</font></div><div style="background-color: transparent;"><font size="2">+ );</font></div><div style="background-color: transparent;"><font size="2">+ assert(status == RTEMS_SUCCESSFUL);</font></div><div style="background-color: transparent;"><font size="2">+ imx_uart_isr_on(name_uart_rx);</font></div><div style="background-color: transparent;"><font size="2">+ </font></div><div style="background-color: transparent;"><font size="2"> imx_uart_data[minor].regs->cr1 |= MC9328MXL_UART_CR1_RRDYEN;</font></div><div style="background-color:
transparent;"><font size="2"> #endif</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">@@ -258,9 +266,35 @@ static int imx_uart_first_open(int major, int minor, void *arg)</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> static int imx_uart_last_close(int major, int minor, void *arg)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2">+ rtems_status_code status = RTEMS_SUCCESSFUL;</font></div><div style="background-color: transparent;"><font size="2">+ rtems_irq_number name_uart_tx, name_uart_rx;</font></div><div style="background-color: transparent;"><font size="2">+</font></div><div style="background-color:
transparent;"><font size="2">+ if (minor == 0) {</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_tx = BSP_INT_UART1_TX;</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_rx = BSP_INT_UART1_RX;</font></div><div style="background-color: transparent;"><font size="2">+ } else if (minor == 1) {</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_tx = BSP_INT_UART2_TX;</font></div><div style="background-color: transparent;"><font size="2">+ name_uart_rx = BSP_INT_UART2_RX;</font></div><div style="background-color: transparent;"><font size="2">+ } else {</font></div><div style="background-color: transparent;"><font size="2">+ rtems_panic("%s:%d Unknown UART minor number
%d\n",</font></div><div style="background-color: transparent;"><font size="2">+ __FUNCTION__, __LINE__, minor);</font></div><div style="background-color: transparent;"><font size="2">+ }</font></div><div style="background-color: transparent;"><font size="2"> #if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">- BSP_remove_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);</font></div><div style="background-color: transparent;"><font size="2">- BSP_remove_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);</font></div><div style="background-color: transparent;"><font size="2">+ imx_uart_isr_off(name_uart_tx);</font></div><div style="background-color: transparent;"><font size="2">+ status = rtems_interrupt_handler_remove(</font></div><div style="background-color:
transparent;"><font size="2">+ name_uart_tx,</font></div><div style="background-color: transparent;"><font size="2">+ imx_uart_tx_isr,</font></div><div style="background-color: transparent;"><font size="2">+ &imx_uart_data[minor]</font></div><div style="background-color: transparent;"><font size="2">+ );</font></div><div style="background-color: transparent;"><font size="2">+ assert(status == RTEMS_SUCCESSFUL);</font></div><div style="background-color: transparent;"><font size="2">+</font></div><div style="background-color: transparent;"><font size="2">+ imx_uart_isr_off(name_uart_rx);</font></div><div style="background-color: transparent;"><font size="2">+ status = rtems_interrupt_handler_remove(</font></div><div style="background-color: transparent;"><font size="2">+
name_uart_rx,</font></div><div style="background-color: transparent;"><font size="2">+ imx_uart_rx_isr,</font></div><div style="background-color: transparent;"><font size="2">+ &imx_uart_data[minor]</font></div><div style="background-color: transparent;"><font size="2">+ );</font></div><div style="background-color: transparent;"><font size="2">+ assert(status == RTEMS_SUCCESSFUL);</font></div><div style="background-color: transparent;"><font size="2"> #endif</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> return 0;</font></div><div style="background-color: transparent;"><font size="2">@@ -317,22 +351,13 @@ static int imx_uart_set_attrs(int minor, const struct termios *t)</font></div><div style="background-color: transparent;"><font
size="2"> }</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> #if defined(USE_INTERRUPTS)</font></div><div style="background-color: transparent;"><font size="2">-static void imx_uart_isr_on(const rtems_irq_connect_data *irq)</font></div><div style="background-color: transparent;"><font size="2">+static void imx_uart_isr_on(const rtems_irq_number name)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2">- MC9328MXL_AITC_INTENNUM = irq->name;</font></div><div style="background-color: transparent;"><font size="2">+ MC9328MXL_AITC_INTENNUM = name;</font></div><div style="background-color: transparent;"><font size="2"> }</font></div><div style="background-color: transparent;"><font size="2">-static void
imx_uart_isr_off(const rtems_irq_connect_data *irq)</font></div><div style="background-color: transparent;"><font size="2">+static void imx_uart_isr_off(const rtems_irq_number name)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2">- MC9328MXL_AITC_INTDISNUM = irq->name;</font></div><div style="background-color: transparent;"><font size="2">-}</font></div><div style="background-color: transparent;"><font size="2">-static int imx_uart_isr_is_on(const rtems_irq_connect_data *irq)</font></div><div style="background-color: transparent;"><font size="2">-{</font></div><div style="background-color: transparent;"><font size="2">- int irq_num = (int)irq->name;</font></div><div style="background-color: transparent;"><font size="2">- if (irq_num < 32) {</font></div><div style="background-color: transparent;"><font
size="2">- return MC9328MXL_AITC_INTENABLEL & (1 << irq_num);</font></div><div style="background-color: transparent;"><font size="2">- } else {</font></div><div style="background-color: transparent;"><font size="2">- return MC9328MXL_AITC_INTENABLEH & (1 << (irq_num - 32));</font></div><div style="background-color: transparent;"><font size="2">- }</font></div><div style="background-color: transparent;"><font size="2">+ MC9328MXL_AITC_INTDISNUM = name;</font></div><div style="background-color: transparent;"><font size="2"> }</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> static void imx_uart_rx_isr(rtems_irq_hdl_param param)</font></div><div style="background-color: transparent;"><font size="2">@@ -417,7 +442,7 @@ static void
imx_uart_set_baud(int minor, int baud)</font></div><div style="background-color: transparent;"><font size="2"> /*</font></div><div style="background-color: transparent;"><font size="2"> * Polled, non-blocking read from UART</font></div><div style="background-color: transparent;"><font size="2"> */</font></div><div style="background-color: transparent;"><font size="2">-int imx_uart_poll_read_char(int minor)</font></div><div style="background-color: transparent;"><font size="2">+static int imx_uart_poll_read_char(int minor)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2"> return imx_uart_poll_read(minor);</font></div><div style="background-color: transparent;"><font size="2"> }</font></div><div style="background-color: transparent;"><font size="2">@@ -425,7 +450,7 @@ int imx_uart_poll_read_char(int
minor)</font></div><div style="background-color: transparent;"><font size="2"> /*</font></div><div style="background-color: transparent;"><font size="2"> * Polled, blocking write from UART</font></div><div style="background-color: transparent;"><font size="2"> */</font></div><div style="background-color: transparent;"><font size="2">-void imx_uart_poll_write_char(int minor, char c)</font></div><div style="background-color: transparent;"><font size="2">+static void imx_uart_poll_write_char(int minor, char c)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2"> imx_uart_poll_write(minor, &c, 1);</font></div><div style="background-color: transparent;"><font size="2"> }</font></div><div style="background-color: transparent;"><font size="2">@@ -433,7 +458,7 @@ void imx_uart_poll_write_char(int minor,
char c)</font></div><div style="background-color: transparent;"><font size="2"> /*</font></div><div style="background-color: transparent;"><font size="2"> * Functions for printk() and friends.</font></div><div style="background-color: transparent;"><font size="2"> */</font></div><div style="background-color: transparent;"><font size="2">-void _BSP_output_char(char c)</font></div><div style="background-color: transparent;"><font size="2">+static void _BSP_output_char(char c)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2"> poll_write(c);</font></div><div style="background-color: transparent;"><font size="2"> if (c == '\n') {</font></div><div style="background-color: transparent;"><font size="2">@@ -443,7 +468,7 @@ void _BSP_output_char(char c)</font></div><div style="background-color:
transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> BSP_output_char_function_type BSP_output_char = _BSP_output_char;</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">-int _BSP_poll_char(void)</font></div><div style="background-color: transparent;"><font size="2">+static int _BSP_poll_char(void)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2"> return poll_read();</font></div><div style="background-color: transparent;"><font size="2"> }</font></div><div style="background-color: transparent;"><font size="2">diff --git a/c/src/lib/libbsp/arm/csb336/network/network.c b/c/src/lib/libbsp/arm/csb336/network/network.c</font></div><div style="background-color: transparent;"><font
size="2">index e513595..1367a8f 100644</font></div><div style="background-color: transparent;"><font size="2">--- a/c/src/lib/libbsp/arm/csb336/network/network.c</font></div><div style="background-color: transparent;"><font size="2">+++ b/c/src/lib/libbsp/arm/csb336/network/network.c</font></div><div style="background-color: transparent;"><font size="2">@@ -19,6 +19,7 @@</font></div><div style="background-color: transparent;"><font size="2"> #include <errno.h></font></div><div style="background-color: transparent;"><font size="2"> #include <rtems/error.h></font></div><div style="background-color: transparent;"><font size="2"> #include <rtems/bspIo.h></font></div><div style="background-color: transparent;"><font size="2">+#include <assert.h></font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> #include
<sys/param.h></font></div><div style="background-color: transparent;"><font size="2"> #include <sys/mbuf.h></font></div><div style="background-color: transparent;"><font size="2">@@ -39,19 +40,8 @@</font></div><div style="background-color: transparent;"><font size="2"> #define START_TRANSMIT_EVENT RTEMS_EVENT_2</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> static void enet_isr(rtems_irq_hdl_param);</font></div><div style="background-color: transparent;"><font size="2">-static void enet_isr_on(const rtems_irq_connect_data *unused);</font></div><div style="background-color: transparent;"><font size="2">-static void enet_isr_off(const rtems_irq_connect_data *unused);</font></div><div style="background-color: transparent;"><font size="2">-static int enet_isr_is_on(const rtems_irq_connect_data *irq);</font></div><div
style="background-color: transparent;"><font size="2">-</font></div><div style="background-color: transparent;"><font size="2">-/* Replace the first value with the clock's interrupt name. */</font></div><div style="background-color: transparent;"><font size="2">-rtems_irq_connect_data mc9328mxl_enet_isr_data = {</font></div><div style="background-color: transparent;"><font size="2">- .name = BSP_INT_GPIO_PORTA,</font></div><div style="background-color: transparent;"><font size="2">- .hdl = enet_isr,</font></div><div style="background-color: transparent;"><font size="2">- .handle = (void *)BSP_INT_GPIO_PORTA,</font></div><div style="background-color: transparent;"><font size="2">- .on = enet_isr_on,</font></div><div style="background-color: transparent;"><font size="2">- .off = enet_isr_off,</font></div><div
style="background-color: transparent;"><font size="2">- .isOn = enet_isr_is_on,</font></div><div style="background-color: transparent;"><font size="2">-};</font></div><div style="background-color: transparent;"><font size="2">+static void enet_isr_on(void);</font></div><div style="background-color: transparent;"><font size="2">+</font></div><div style="background-color: transparent;"><font size="2"> typedef struct {</font></div><div style="background-color: transparent;"><font size="2"> unsigned long rx_packets; /* total packets received */</font></div><div style="background-color: transparent;"><font size="2"> unsigned long tx_packets; /* total packets transmitted */</font></div><div style="background-color: transparent;"><font size="2">@@ -238,6 +228,7 @@ void
mc9328mxl_enet_init_hw(mc9328mxl_enet_softc_t *sc)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2"> uint16_t stat;</font></div><div style="background-color: transparent;"><font size="2"> uint16_t my = 0;</font></div><div style="background-color: transparent;"><font size="2">+ rtems_status_code status = RTEMS_SUCCESSFUL;</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> lan91c11x_write_reg(LAN91C11X_RCR, LAN91C11X_RCR_RST);</font></div><div style="background-color: transparent;"><font size="2"> lan91c11x_write_reg(LAN91C11X_RCR, 0);</font></div><div style="background-color: transparent;"><font size="2">@@ -334,7 +325,15 @@ void
mc9328mxl_enet_init_hw(mc9328mxl_enet_softc_t *sc)</font></div><div style="background-color: transparent;"><font size="2"> MC9328MXL_GPIOA_IMR |= bit(3);</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> /* Install the interrupt handler */</font></div><div style="background-color: transparent;"><font size="2">- BSP_install_rtems_irq_handler(&mc9328mxl_enet_isr_data);</font></div><div style="background-color: transparent;"><font size="2">+ status = rtems_interrupt_handler_install(</font></div><div style="background-color: transparent;"><font size="2">+ BSP_INT_GPIO_PORTA,</font></div><div style="background-color: transparent;"><font size="2">+ "Network",</font></div><div style="background-color: transparent;"><font size="2">+
RTEMS_INTERRUPT_UNIQUE,</font></div><div style="background-color: transparent;"><font size="2">+ enet_isr,</font></div><div style="background-color: transparent;"><font size="2">+ (void *)BSP_INT_GPIO_PORTA</font></div><div style="background-color: transparent;"><font size="2">+ );</font></div><div style="background-color: transparent;"><font size="2">+ assert(status == RTEMS_SUCCESSFUL);</font></div><div style="background-color: transparent;"><font size="2">+ enet_isr_on();</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> } /* mc9328mxl_enet_init_hw() */</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">@@ -602,7 +601,7 @@ void
mc9328mxl_enet_stats (mc9328mxl_enet_softc_t *sc)</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2"> /* Enables mc9328mxl_enet interrupts. */</font></div><div style="background-color: transparent;"><font size="2">-static void enet_isr_on(const rtems_irq_connect_data *unused)</font></div><div style="background-color: transparent;"><font size="2">+static void enet_isr_on()</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2"> /* Enable interrupts */</font></div><div style="background-color: transparent;"><font size="2"> MC9328MXL_AITC_INTENNUM = MC9328MXL_INT_GPIO_PORTA;</font></div><div style="background-color: transparent;"><font size="2">@@
-610,23 +609,6 @@ static void enet_isr_on(const rtems_irq_connect_data *unused)</font></div><div style="background-color: transparent;"><font size="2"> return;</font></div><div style="background-color: transparent;"><font size="2"> }</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">-/* Disables enet interrupts */</font></div><div style="background-color: transparent;"><font size="2">-static void enet_isr_off(const rtems_irq_connect_data *unused)</font></div><div style="background-color: transparent;"><font size="2">-{</font></div><div style="background-color: transparent;"><font size="2">- /* disable all various TX/RX interrupts */</font></div><div style="background-color: transparent;"><font size="2">- MC9328MXL_AITC_INTDISNUM = MC9328MXL_INT_GPIO_PORTA;</font></div><div style="background-color:
transparent;"><font size="2">-</font></div><div style="background-color: transparent;"><font size="2">- return;</font></div><div style="background-color: transparent;"><font size="2">-}</font></div><div style="background-color: transparent;"><font size="2">-</font></div><div style="background-color: transparent;"><font size="2">-/* Tests to see if mc9328mxl_enet interrupts are enabled, and returns non-0 if so.</font></div><div style="background-color: transparent;"><font size="2">- * If interrupt is not enabled, returns 0.</font></div><div style="background-color: transparent;"><font size="2">- */</font></div><div style="background-color: transparent;"><font size="2">-static int enet_isr_is_on(const rtems_irq_connect_data *irq)</font></div><div style="background-color: transparent;"><font size="2">-{</font></div><div style="background-color: transparent;"><font size="2">- return MC9328MXL_AITC_INTENABLEL & (1 <<
MC9328MXL_INT_GPIO_PORTA);</font></div><div style="background-color: transparent;"><font size="2">-}</font></div><div style="background-color: transparent;"><font size="2">-</font></div><div style="background-color: transparent;"><font size="2"> /* Driver ioctl handler */</font></div><div style="background-color: transparent;"><font size="2"> static int</font></div><div style="background-color: transparent;"><font size="2"> mc9328mxl_enet_ioctl (struct ifnet *ifp, ioctl_command_t command, caddr_t data)</font></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal;"><br></div></span></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color:
transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">Regards</div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 12.727272033691406px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span
style="font-weight:bold;">From:</span></b> Vipul Nayyar <nayyar_vipul@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> Joel Sherrill <Joel.Sherrill@oarcorp.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "rtems-devel@rtems.org" <rtems-devel@rtems.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, 30 June 2013 4:17 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Patch] Removing legacy method from arm csb336<br> </font> </div> <div class="y_msg_container"><br><div id="yiv9988352667"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span>Hello,</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style:
normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Trying once gain with the arm csb336 patch. I'm explicitly checking the status code returned now, but am I doing the right thing if the status code returned is not RTEMS_SUCCESSFUL ? For now I'm doing the same what happens in BSP_install_rtems_irq_handler & BSP_remove_rtems_irq_handler ? </span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color:transparent;"><span><div style="background-color:transparent;"><font size="2">commit 1887514fd17d17c089c4305f34963c244324eba3</font></div><div style="background-color:transparent;"><font size="2">Author: Vipul Nayyar
<nayyar_vipul@yahoo.com></font></div><div style="background-color:transparent;"><font size="2">Date: Sun Jun 30 16:08:43 2013 +0530</font></div><div style="background-color:transparent;"><font size="2"><br></font></div><div style="background-color:transparent;"><font size="2"> Updated Legacy code in arm csb336</font></div><div style="background-color:transparent;"><font size="2"><br></font></div><div style="background-color:transparent;"><font size="2">diff --git a/c/src/lib/libbsp/arm/csb336/console/uart.c b/c/src/lib/libbsp/arm/csb336/console/uart.c</font></div><div style="
background-color:transparent;"><font size="2">index 4dc409b..758f103 100644</font></div><div style="background-color:transparent;"><font size="2">--- a/c/src/lib/libbsp/arm/csb336/console/uart.c</font></div><div style="background-color:transparent;"><font size="2">+++ b/c/src/lib/libbsp/arm/csb336/console/uart.c</font></div><div style="background-color:transparent;"><font size="2">@@ -246,9 +246,36 @@ static int imx_uart_first_open(int major, int minor, void *arg)</font></div><div style="background-color:transparent;"><font size="2"> </font></div><div style="background-color:transparent;"><font size="2"> imx_uart_data[minor].tty = args->iop->data1;</font></div><div style="background-color:transparent;"><font size="2"> </font></div><div style="background-color:transparent;"><font size="2">+ rtems_status_code sc = RTEMS_SUCCESSFUL;</font></div><div style="background-color:transparent;"><font
size="2">+</font></div><div style="background-color:transparent;"><font size="2"> #if defined(USE_INTERRUPTS)</font></div><div style="background-color:transparent;"><font size="2">- BSP_install_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">- BSP_install_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">+ sc = rtems_interrupt_handler_install(</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_tx_isr_data[minor].name,</font></div><div style="background-color:transparent;"><font size="2">+ "Console",</font></div><div style="background-color:transparent;"><font size="2">+ RTEMS_INTERRUPT_UNIQUE,</font></div><div style="background-color:transparent;"><font size="2">+
imx_uart_tx_isr_data[minor].hdl,</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_tx_isr_data[minor].handle</font></div><div style="background-color:transparent;"><font size="2">+ );</font></div><div style="background-color:transparent;"><font size="2">+ if (sc != RTEMS_SUCCESSFUL) {</font></div><div style="background-color:transparent;"><font size="2">+ return 0;</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2">+ if (imx_uart_tx_isr_data[minor].on != NULL) {</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_tx_isr_data[minor].on(&imx_uart_tx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div
style="background-color:transparent;"><font size="2">+</font></div><div style="background-color:transparent;"><font size="2">+ sc = rtems_interrupt_handler_install(</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].name,</font></div><div style="background-color:transparent;"><font size="2">+ "Console",</font></div><div style="background-color:transparent;"><font size="2">+ RTEMS_INTERRUPT_UNIQUE,</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].hdl,</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].handle</font></div><div style="background-color:transparent;"><font size="2">+ );</font></div><div style="background-color:transparent;"><font size="2">+ if (sc !=
RTEMS_SUCCESSFUL) {</font></div><div style="background-color:transparent;"><font size="2">+ return 0;</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2">+ if (imx_uart_rx_isr_data[minor].on != NULL) {</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].on(&imx_uart_rx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2"> </font></div><div style="background-color:transparent;"><font size="2"> imx_uart_data[minor].regs->cr1 |= MC9328MXL_UART_CR1_RRDYEN;</font></div><div style="background-color:transparent;"><font size="2"> #endif</font></div><div style="background-color:transparent;"><font size="2">@@
-258,9 +285,32 @@ static int imx_uart_first_open(int major, int minor, void *arg)</font></div><div style="background-color:transparent;"><font size="2"> </font></div><div style="background-color:transparent;"><font size="2"> static int imx_uart_last_close(int major, int minor, void *arg)</font></div><div style="background-color:transparent;"><font size="2"> {</font></div><div style="background-color:transparent;"><font size="2">+ rtems_status_code sc = RTEMS_SUCCESSFUL;</font></div><div style="background-color:transparent;"><font size="2">+</font></div><div style="background-color:transparent;"><font size="2"> #if defined(USE_INTERRUPTS)</font></div><div style="background-color:transparent;"><font size="2">- BSP_remove_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">-
BSP_remove_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">+ if (imx_uart_tx_isr_data[minor].off != NULL) {</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_tx_isr_data[minor].off(&imx_uart_tx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2">+ sc = rtems_interrupt_handler_remove(</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_tx_isr_data[minor].name,</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_tx_isr_data[minor].hdl,</font></div><div style="background-color:transparent;"><font size="2">+
imx_uart_tx_isr_data[minor].handle</font></div><div style="background-color:transparent;"><font size="2">+ );</font></div><div style="background-color:transparent;"><font size="2">+ if (sc != RTEMS_SUCCESSFUL) {</font></div><div style="background-color:transparent;"><font size="2">+ return 0;</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2">+ if (imx_uart_rx_isr_data[minor].off != NULL) {</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].off(&imx_uart_rx_isr_data[minor]);</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2">+</font></div><div style="background-color:transparent;"><font size="2">+ sc =
rtems_interrupt_handler_remove(</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].name,</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].hdl,</font></div><div style="background-color:transparent;"><font size="2">+ imx_uart_rx_isr_data[minor].handle</font></div><div style="background-color:transparent;"><font size="2">+ );</font></div><div style="background-color:transparent;"><font size="2">+ if (sc != RTEMS_SUCCESSFUL) {</font></div><div style="background-color:transparent;"><font size="2">+ return 0;</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2"> #endif</font></div><div style="
background-color:transparent;"><font size="2"> </font></div><div style="background-color:transparent;"><font size="2"> return 0;</font></div><div style="background-color:transparent;"><font size="2">diff --git a/c/src/lib/libbsp/arm/csb336/network/network.c b/c/src/lib/libbsp/arm/csb336/network/network.c</font></div><div style="background-color:transparent;"><font size="2">index e513595..2441c01 100644</font></div><div style="background-color:transparent;"><font size="2">--- a/c/src/lib/libbsp/arm/csb336/network/network.c</font></div><div style="background-color:transparent;"><font size="2">+++ b/c/src/lib/libbsp/arm/csb336/network/network.c</font></div><div style="background-color:transparent;"><font size="2">@@ -238,6 +238,7 @@ void mc9328mxl_enet_init_hw(mc9328mxl_enet_softc_t *sc)</font></div><div style="background-color:transparent;"><font size="2"> {</font></div><div style="background-color:transparent;"><font
size="2"> uint16_t stat;</font></div><div style="background-color:transparent;"><font size="2"> uint16_t my = 0;</font></div><div style="background-color:transparent;"><font size="2">+ rtems_status_code sc = RTEMS_SUCCESSFUL;</font></div><div style="background-color:transparent;"><font size="2"> </font></div><div style="background-color:transparent;"><font size="2"> lan91c11x_write_reg(LAN91C11X_RCR, LAN91C11X_RCR_RST);</font></div><div style="background-color:transparent;"><font size="2"> lan91c11x_write_reg(LAN91C11X_RCR, 0);</font></div><div style="background-color:transparent;"><font size="2">@@ -334,7 +335,19 @@ void mc9328mxl_enet_init_hw(mc9328mxl_enet_softc_t *sc)</font></div><div style="background-color:transparent;"><font size="2"> MC9328MXL_GPIOA_IMR |= bit(3);</font></div><div style="
background-color:transparent;"><font size="2"> </font></div><div style="background-color:transparent;"><font size="2"> /* Install the interrupt handler */</font></div><div style="background-color:transparent;"><font size="2">- BSP_install_rtems_irq_handler(&mc9328mxl_enet_isr_data);</font></div><div style="background-color:transparent;"><font size="2">+ sc = rtems_interrupt_handler_install(</font></div><div style="background-color:transparent;"><font size="2">+ mc9328mxl_enet_isr_data.name,</font></div><div style="background-color:transparent;"><font size="2">+ "Network",</font></div><div style="background-color:transparent;"><font size="2">+ RTEMS_INTERRUPT_UNIQUE,</font></div><div style="background-color:transparent;"><font size="2">+ mc9328mxl_enet_isr_data.hdl,</font></div><div
style="background-color:transparent;"><font size="2">+ mc9328mxl_enet_isr_data.handle</font></div><div style="background-color:transparent;"><font size="2">+ );</font></div><div style="background-color:transparent;"><font size="2">+ if (sc != RTEMS_SUCCESSFUL) {</font></div><div style="background-color:transparent;"><font size="2">+ return 0;</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2">+ if (mc9328mxl_enet_isr_data.on != NULL) {</font></div><div style="background-color:transparent;"><font size="2">+ mc9328mxl_enet_isr_data.on(&mc9328mxl_enet_isr_data);</font></div><div style="background-color:transparent;"><font size="2">+ }</font></div><div style="background-color:transparent;"><font size="2"> </font></div><div
style="background-color:transparent;"><font size="2"> } /*
mc9328mxl_enet_init_hw() */</font></div><div style="background-color:transparent;"><font size="2"> </font></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal;"><span style="font-family: arial, helvetica, clean, sans-serif; background-color: transparent;">Regards</span><br></div></span></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 12.727272033691406px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div
style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Joel Sherrill <Joel.Sherrill@OARcorp.com><br> <b><span style="font-weight:bold;">To:</span></b> Vipul Nayyar <nayyar_vipul@yahoo.com> <br><b><span style="font-weight:bold;">Cc:</span></b> "rtems-devel@rtems.org" <rtems-devel@rtems.org>; Sebastian Huber <sebastian.huber@embedded-brains.de>; "gedare@rtems.org" <gedare@rtems.org> <br> <b><span style="font-weight:bold;">Sent:</span></b> Sunday, 30 June 2013 2:04 AM<br> <b><span style="font-weight:bold;">Subject:</span></b> Re: [Patch] Removing legacy method from arm csb336<br> </font> </div> <div class="yiv9988352667y_msg_container"><br><div id="yiv9988352667">
<div>
<pre style="word-wrap: break-word; font-size: 10pt; font-family: Tahoma; color: black;">Please return the status code into a variable and test it separately in the assert.
I will defer to Sebastian on whether assert should be used. I tend to think it should be a fatal error call with an explicit test. Using assert increases the code size. Plus this first one gives you a pattern for the rest.
</pre><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div class="yiv9988352667y_msg_container">
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div><br><br></div> </div> </div> </div></div></div><br>_______________________________________________<br>rtems-devel mailing list<br><a ymailto="mailto:rtems-devel@rtems.org" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br><a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br><br><br></div> </div> </div> </div></body></html>