[Patch] Removing legacy method from arm csb336

Vipul Nayyar nayyar_vipul at yahoo.com
Wed Jun 26 15:28:01 UTC 2013



Hello,

For my GSOC Project Unified APIs,  a public google doc has been setup ( https://docs.google.com/document/d/1W9DMnpocXUKXiQMxHbbp0aG-ecuh94P-3N7hxEJmcgs/edit?usp=sharing) for community viewing. In order to establish this unified pattern across all BSPs, I felt that deprecated methods stored in irq-legacy.c should be dealt with first. So, I'm attaching a very basic patch which removes the deprecated method BSP_install_rtems_irq_handler from arm csb336 and instead makes use of rtems_interrupt_handler_install, as suggested in irq-legacy.c. Please do give suggestions if I'm heading the right way, and any modifications that this patch may require.

commit aec52ad03481b46a95a451af207191251edb1512
Author: Vipul Nayyar <nayyar_vipul at yahoo.com>
Date:   Wed Jun 26 20:48:10 2013 +0530

    removed legacy BSP_install_rtems_irq_handler from arm csb336

diff --git a/c/src/lib/libbsp/arm/csb336/console/uart.c b/c/src/lib/libbsp/arm/csb336/console/uart.c
index 4dc409b..0c4ab39 100644
--- a/c/src/lib/libbsp/arm/csb336/console/uart.c
+++ b/c/src/lib/libbsp/arm/csb336/console/uart.c
@@ -246,9 +246,13 @@ static int imx_uart_first_open(int major, int minor, void *arg)
 
     imx_uart_data[minor].tty   = args->iop->data1;
 
+    const rtems_irq_connect_data *uart_tx = &imx_uart_tx_isr_data[minor];
+    const rtems_irq_connect_data *uart_rx = &imx_uart_rx_isr_data[minor];
+
+
 #if defined(USE_INTERRUPTS)
-    BSP_install_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);
-    BSP_install_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);
+    rtems_interrupt_handler_install(uart_tx->name,"LEGACY REMOVED",RTEMS_INTERRUPT_UNIQUE,uart_tx->hdl,uart_tx->handle);
+    rtems_interrupt_handler_install(uart_rx->name,"LEGACY REMOVED",RTEMS_INTERRUPT_UNIQUE,uart_rx->hdl,uart_rx->handle);
 
     imx_uart_data[minor].regs->cr1 |= MC9328MXL_UART_CR1_RRDYEN;
 #endif
diff --git a/c/src/lib/libbsp/arm/csb336/network/network.c b/c/src/lib/libbsp/arm/csb336/network/network.c
index e513595..7f54230 100644
--- a/c/src/lib/libbsp/arm/csb336/network/network.c
+++ b/c/src/lib/libbsp/arm/csb336/network/network.c
@@ -334,7 +334,7 @@ void  mc9328mxl_enet_init_hw(mc9328mxl_enet_softc_t *sc)
     MC9328MXL_GPIOA_IMR |= bit(3);
 
     /* Install the interrupt handler */
-    BSP_install_rtems_irq_handler(&mc9328mxl_enet_isr_data);
+    rtems_interrupt_handler_install(mc9328mxl_enet_isr_data.name,"LEGACY REMOVED",RTEMS_INTERRUPT_UNIQUE,mc9328mxl_enet_isr_data.hdl,mc9328mxl_enet_isr_data.handle);
 
 } /* mc9328mxl_enet_init_hw() */



Regards
Vipul Nayyar 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130626/44acd67e/attachment.html>


More information about the devel mailing list