diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-10-20 13:34:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-10-20 13:34:45 +0000 |
commit | 772f2243e287c13c7a846523e93252df7b5d2604 (patch) | |
tree | 39851816c9d222ddd7c0cc636fe6f97ee2a50a44 /c/src/lib | |
parent | 2000-10-20 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-772f2243e287c13c7a846523e93252df7b5d2604.tar.bz2 |
2000-10-20 Joel Sherrill <joel@OARcorp.com>
* mpc8xx/console-generic/console-generic.c: Avoid use of
BSP definitions and rely on the new routine
mbx8xx_console_get_configuration() to get information. This
routine was formerly incorrectly called
mbx8xx_console_use_maximum_buffer_size().
binding to the exception code.
Diffstat (limited to 'c/src/lib')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ChangeLog | 9 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c | 81 |
2 files changed, 14 insertions, 76 deletions
diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 00019acfc9..da9b95203c 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,5 +1,14 @@ 2000-10-20 Joel Sherrill <joel@OARcorp.com> + * mpc8xx/console-generic/console-generic.c: Avoid use of + BSP definitions and rely on the new routine + mbx8xx_console_get_configuration() to get information. This + routine was formerly incorrectly called + mbx8xx_console_use_maximum_buffer_size(). + binding to the exception code. + +2000-10-20 Joel Sherrill <joel@OARcorp.com> + * configure.in, Makefile.am: Explicitly specify whether an RTEMS_CPU_MODEL is using old or new exception processing. This is important because when building multilib, you do not know 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 fccbc65b31..20d8572157 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 @@ -57,7 +57,7 @@ extern rtems_cpu_table Cpu_table; /* BSP supplied routine */ -extern int mbx8xx_console_use_maximum_buffer_size(void); +extern int mbx8xx_console_get_configuration(); #ifdef EPPCBUG_SMC1 extern unsigned32 simask_copy; @@ -705,7 +705,7 @@ m8xx_uart_scc_initialize (int minor) sccparms->rfcr = M8xx_RFCR_MOT | M8xx_RFCR_DMA_SPACE(0); sccparms->tfcr = M8xx_TFCR_MOT | M8xx_TFCR_DMA_SPACE(0); - if ( mbx8xx_console_use_maximum_buffer_size() ) + if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 ) sccparms->mrblr = RXBUFSIZE; /* Maximum Rx buffer size */ else sccparms->mrblr = 1; /* Maximum Rx buffer size */ @@ -774,8 +774,7 @@ m8xx_uart_scc_initialize (int minor) break; #endif } -#if NVRAM_CONFIGURE == 1 - if ( (nvram->console_mode & 0x06) == 0x02 ) { + if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 ) { switch (minor) { case SCC2_MINOR: rtems_interrupt_catch (m8xx_scc2_interrupt_handler, @@ -807,43 +806,6 @@ m8xx_uart_scc_initialize (int minor) #endif /* mpc860 */ } } - -#else /* NVRAM_CONFIGURE != 1 */ - -#if UARTS_IO_MODE == 1 - switch (minor) { - case SCC2_MINOR: - rtems_interrupt_catch (m8xx_scc2_interrupt_handler, - PPC_IRQ_CPM_SCC2, - &old_handler[minor]); - - sccregs->sccm = 3; /* Enable SCC2 Rx & Tx interrupts */ - m8xx.cimr |= 1UL << 29; /* Enable SCC2 interrupts */ - break; - -#ifdef mpc860 - case SCC3_MINOR: - rtems_interrupt_catch (m8xx_scc3_interrupt_handler, - PPC_IRQ_CPM_SCC3, - &old_handler[minor]); - - sccregs->sccm = 3; /* Enable SCC2 Rx & Tx interrupts */ - m8xx.cimr |= 1UL << 28; /* Enable SCC2 interrupts */ - break; - - case SCC4_MINOR: - rtems_interrupt_catch (m8xx_scc4_interrupt_handler, - PPC_IRQ_CPM_SCC4, - &old_handler[minor]); - - sccregs->sccm = 3; /* Enable SCC2 Rx & Tx interrupts */ - m8xx.cimr |= 1UL << 27; /* Enable SCC2 interrupts */ - break; -#endif /* mpc860 */ - } -#endif /* UARTS_IO_MODE */ - -#endif /* NVRAM_CONFIGURE */ } @@ -912,18 +874,10 @@ m8xx_uart_smc_initialize (int minor) smcparms->tbase = (char *)TxBd[minor] - (char *)&m8xx; smcparms->rfcr = M8xx_RFCR_MOT | M8xx_RFCR_DMA_SPACE(0); smcparms->tfcr = M8xx_TFCR_MOT | M8xx_TFCR_DMA_SPACE(0); -#if NVRAM_CONFIGURE == 1 - if ( (nvram->console_mode & 0x06) == 0x02 ) + if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 ) smcparms->mrblr = RXBUFSIZE; /* Maximum Rx buffer size */ else smcparms->mrblr = 1; /* Maximum Rx buffer size */ -#else -#if UARTS_IO_MODE == 1 - smcparms->mrblr = RXBUFSIZE; /* Maximum Rx buffer size */ -#else - smcparms->mrblr = 1; /* Maximum Rx buffer size */ -#endif -#endif /* * Set up SMC1 parameter RAM UART-specific parameters @@ -968,8 +922,7 @@ m8xx_uart_smc_initialize (int minor) * Enable receiver and transmitter */ smcregs->smcmr |= M8xx_SMCMR_TEN | M8xx_SMCMR_REN; -#if NVRAM_CONFIGURE == 1 - if ( (nvram->console_mode & 0x06) == 0x02 ) { + if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 ) { switch (minor) { case SMC1_MINOR: rtems_interrupt_catch (m8xx_smc1_interrupt_handler, @@ -990,30 +943,6 @@ m8xx_uart_smc_initialize (int minor) break; } } -#else -#if UARTS_IO_MODE == 1 - switch (minor) { - case SMC1_MINOR: - rtems_interrupt_catch (m8xx_smc1_interrupt_handler, - PPC_IRQ_CPM_SMC1, - &old_handler[minor]); - - smcregs->smcm = 3; /* Enable SMC1 Rx & Tx interrupts */ - m8xx.cimr |= 1UL << 4; /* Enable SMC1 interrupts */ - break; - - case SMC2_MINOR: - rtems_interrupt_catch (m8xx_smc2_interrupt_handler, - PPC_IRQ_CPM_SMC2, - &old_handler[minor]); - - smcregs->smcm = 3; /* Enable SMC2 Rx & Tx interrupts */ - m8xx.cimr |= 1UL << 3; /* Enable SMC2 interrupts */ - break; - } -#endif - -#endif } void |