<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><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: 10pt; background-color: transparent;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; background-color: transparent;"><span>Thanks for guidance on the previous patch. I hope I've rectified them in the following patch. I was wondering that w</span><span style="background-color: transparent;">hile checking the return value of the functions with assert() , I need to include <assert.h> . So, should I include it individually in both the files, or somewhere else ? Please do suggest any other changes that maybe required.</span><span style="background-color: transparent;"> </span></div><div style="font-family: arial,
helvetica, sans-serif; font-size: 13px; background-color: transparent; color: rgb(0, 0, 0); font-style: normal;"><span style="background-color: transparent;"><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; background-color: transparent; color: rgb(0, 0, 0); font-style: normal;"><span style="background-color: transparent;"><br></span></div><div style="background-color: transparent;"><span style="background-color: transparent;"><div style="background-color: transparent;"><font size="2">commit 70aee0d8827888b5c8230f45594e85fda5bd5a6d</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 00:17:44 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..c0505bb 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">@@ -247,8 +247,28 @@ static int imx_uart_first_open(int major, int minor, void *arg)</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">+ assert(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">+ "Consle",</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">+ ) == RTEMS_SUCCESSFUL</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">+ assert(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">+ ) == RTEMS_SUCCESSFUL</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">@@ -259,8 +279,24 @@ static int imx_uart_first_open(int major, int minor, void *arg)</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"> #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">+ assert( 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">+ ) == RTEMS_SUCCESSFUL</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">+
assert( 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">+ ) == RTEMS_SUCCESSFUL</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..9ae970e 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">@@ -334,7 +334,17 @@ 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">+ assert(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">+
) == RTEMS_SUCCESSFUL</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;"><br></div></span></div><div style="font-family: arial, helvetica, sans-serif; font-size:
10pt;"></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> </div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div><div class="yui_3_7_2_28_1372531261960_61" style="font-family: arial, helvetica, clean, sans-serif; font-size: 10pt; background-color: transparent;"><br></div><div class="yui_3_7_2_28_1372531261960_63" style="font-family: arial, helvetica, clean, sans-serif; font-size: 10pt; background-color: transparent;"><br></div><div class="yui_3_7_2_28_1372531261960_65" style="font-family: arial, helvetica, clean, sans-serif; font-size: 10pt; background-color: transparent;">Regards</div><div class="yui_3_7_2_28_1372531261960_67" style="font-family: arial, helvetica, clean, sans-serif; font-size: 10pt; background-color: transparent;"><span style="background-color: transparent; line-height: 1.22;">Vipul Nayyar </span></div><div style="font-family: arial, helvetica, sans-serif;
font-size: 10pt;"><span style="background-color: transparent; line-height: 1.22;"><br></span></div></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> Gedare Bloom <gedare@rtems.org> <br><b><span style="font-weight: bold;">Cc:</span></b> Vipul Nayyar <nayyar_vipul@yahoo.com>; "rtems-devel@rtems.org" <rtems-devel@rtems.org> <br> <b><span
style="font-weight: bold;">Sent:</span></b> Friday, 28 June 2013 2:18 AM<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>I agree with you Gedare. The legacy api support remains for a while. There is external code which could use it and we always hold legacy for at least one release branch.<br><br>I just want the code in the tree to use the new way consistently. And update check_submission to flag the old way<br><br>Gedare Bloom <<a ymailto="mailto:gedare@rtems.org" href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br><br><br>On Thu, Jun 27, 2013 at 4:46 AM, Joel Sherrill<br><<a ymailto="mailto:Joel.Sherrill@oarcorp.com" href="mailto:Joel.Sherrill@oarcorp.com">Joel.Sherrill@oarcorp.com</a>> wrote:<br>> The goal of this is to kill bad examples. It is legacy and we don't want<br>> people to use it anymore. These
should be mechanical changes. Vipul should<br>> be able to provide instructions for users with external drivers to make the<br>> changes.<br>><br>> Fixing these could break here or there but if we don't remove uses of<br>> deprecated methods then users will use them in new BSPs and that is<br>> unacceptable.<br>><br>I'd prefer to see 4.11 released before we start killing off legacy support.<br><br>> Vipul Nayyar <<a ymailto="mailto:nayyar_vipul@yahoo.com" href="mailto:nayyar_vipul@yahoo.com">nayyar_vipul@yahoo.com</a>> wrote:<br>><br>> Hello,<br>><br>> According to the discussions with my mentor Joel Sherill, I was suggested to<br>> kill all legacy/deprecated API uses in the tree which are defined in<br>> irq-legacy.c as part of my project. I guess Dr Joel can guide us better<br>> whether all of the deprecated methods need to be removed or only some of<br>> them. cc'ing Dr Joel for guidance on
this.<br>><br>> Regards<br>> Vipul Nayyar<br>><br>><br>> ________________________________<br>> From: Sebastian Huber <<a ymailto="mailto:sebastian.huber@embedded-brains.de" href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>><br>> To: <a ymailto="mailto:rtems-devel@rtems.org" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br>> Sent: Thursday, 27 June 2013 1:48 PM<br>> Subject: Re: [Patch] Removing legacy method from arm csb336<br>><br>> On 06/26/2013 05:28 PM, Vipul Nayyar wrote:<br>>><br>>> For my GSOC Project Unified APIs, a public google doc has been setup (<br>>><br>>> <a href="https://docs.google.com/document/d/1W9DMnpocXUKXiQMxHbbp0aG-ecuh94P-3N7hxEJmcgs/edit?usp=sharing" target="_blank">https://docs.google.com/document/d/1W9DMnpocXUKXiQMxHbbp0aG-ecuh94P-3N7hxEJmcgs/edit?usp=sharing</a>)<br>>> for community viewing. In
order to establish this unified pattern across<br>>> all<br>>> BSPs, I felt that deprecated methods stored in irq-legacy.c should be<br>>> dealt<br>>> with first. So, I'm attaching a very basic patch which removes the<br>>> deprecated<br>>> method BSP_install_rtems_irq_handler from arm csb336 and instead makes use<br>>> of rtems_interrupt_handler_install, as suggested in irq-legacy.c. Please<br>>> do<br>>> give suggestions if I'm heading the right way, and any modifications that<br>>> this<br>>> patch may require.<br>><br>> I would not touch the existing code that uses these legacy functions. The<br>> irq-legacy.c is provided to keep existing code as is.<br>><br>> -- Sebastian Huber, embedded brains GmbH<br>><br>> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>> Phone : +49 89 189 47 41-16<br>> Fax : +49 89 189 47 41-09<br>>
E-Mail : <a ymailto="mailto:sebastian.huber@embedded-brains.de" href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a><br>> PGP : Public key available on request.<br>><br>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<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>><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>