From 907af7dc2ef15f362cd21e699291cbb417cbb1d1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 24 May 2001 20:14:58 +0000 Subject: 2001-05-24 Eric Valette * mpc8xx/console-generic/console-generic.c: Bug found by Yacine where the initialization or irq data structure was incomplete in case a SMC channel was used first and later a SCC one. --- c/src/lib/libcpu/powerpc/ChangeLog | 6 ++++++ .../powerpc/mpc8xx/console-generic/console-generic.c | 19 +++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'c/src/lib') diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 6ba97dd7af..e40ad44055 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,9 @@ +2001-05-24 Eric Valette + + * mpc8xx/console-generic/console-generic.c: Bug found by Yacine + where the initialization or irq data structure + was incomplete in case a SMC channel was used first and later a SCC one. + 2001-03-30 Eric Valette * mpc8xx/vectors/.cvsignore, mpc8xx/vectors/Makefile.am, diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c index a9478cd0ab..7654c43104 100644 --- a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c +++ b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c @@ -639,14 +639,7 @@ int m8xx_scc_isOn(const rtems_irq_connect_data* ptr) return BSP_irq_enabled_at_cpm (ptr->name); } -static rtems_irq_connect_data consoleIrqData = -{ - BSP_CPM_IRQ_SCC2, - (rtems_irq_hdl)m8xx_scc2_interrupt_handler, - (rtems_irq_enable) m8xx_scc_enable, - (rtems_irq_disable) m8xx_scc_disable, - (rtems_irq_is_enabled) m8xx_scc_isOn -}; +static rtems_irq_connect_data consoleIrqData; void m8xx_uart_scc_initialize (int minor) @@ -826,9 +819,15 @@ m8xx_uart_scc_initialize (int minor) #endif } if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 ) { + consoleIrqData.on = m8xx_scc_enable; + consoleIrqData.off = m8xx_scc_disable; + consoleIrqData.isOn = m8xx_scc_isOn; + switch (minor) { - case SCC2_MINOR: - break; + case SCC2_MINOR: + consoleIrqData.name = BSP_CPM_IRQ_SCC2; + consoleIrqData.hdl = m8xx_scc2_interrupt_handler; + break; #ifdef mpc860 case SCC3_MINOR: -- cgit v1.2.3