Changeset 772f224 in rtems


Ignore:
Timestamp:
Oct 20, 2000, 1:34:45 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
396555aa
Parents:
623ffdb
Message:

2000-10-20 Joel Sherrill <joel@…>

  • 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.
Location:
c/src/lib/libcpu/powerpc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ChangeLog

    r623ffdb r772f224  
     12000-10-20      Joel Sherrill <joel@OARcorp.com>
     2
     3        * mpc8xx/console-generic/console-generic.c: Avoid use of
     4        BSP definitions and rely on the new routine
     5        mbx8xx_console_get_configuration() to get information.  This
     6        routine was formerly incorrectly called
     7        mbx8xx_console_use_maximum_buffer_size().
     8        binding to the exception code.
     9
    1102000-10-20      Joel Sherrill <joel@OARcorp.com>
    211
  • c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c

    r623ffdb r772f224  
    5858
    5959/* BSP supplied routine */
    60 extern int mbx8xx_console_use_maximum_buffer_size(void);
     60extern int mbx8xx_console_get_configuration();
    6161
    6262#ifdef EPPCBUG_SMC1
     
    706706  sccparms->rfcr = M8xx_RFCR_MOT | M8xx_RFCR_DMA_SPACE(0);
    707707  sccparms->tfcr = M8xx_TFCR_MOT | M8xx_TFCR_DMA_SPACE(0);
    708   if ( mbx8xx_console_use_maximum_buffer_size() )
     708  if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 )
    709709    sccparms->mrblr = RXBUFSIZE;    /* Maximum Rx buffer size */
    710710  else
     
    775775#endif
    776776  }
    777 #if NVRAM_CONFIGURE == 1
    778   if ( (nvram->console_mode & 0x06) == 0x02 ) {
     777  if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 ) {
    779778    switch (minor) {
    780779      case SCC2_MINOR:
     
    808807    }
    809808  }
    810  
    811 #else /* NVRAM_CONFIGURE != 1 */
    812 
    813 #if UARTS_IO_MODE == 1
    814   switch (minor) {
    815     case SCC2_MINOR:
    816       rtems_interrupt_catch (m8xx_scc2_interrupt_handler,
    817                              PPC_IRQ_CPM_SCC2,
    818                              &old_handler[minor]);
    819 
    820       sccregs->sccm = 3;            /* Enable SCC2 Rx & Tx interrupts */
    821       m8xx.cimr |= 1UL <<  29;      /* Enable SCC2 interrupts */
    822       break;
    823 
    824 #ifdef mpc860
    825     case SCC3_MINOR:
    826       rtems_interrupt_catch (m8xx_scc3_interrupt_handler,
    827                              PPC_IRQ_CPM_SCC3,
    828                              &old_handler[minor]);
    829 
    830       sccregs->sccm = 3;            /* Enable SCC2 Rx & Tx interrupts */
    831       m8xx.cimr |= 1UL <<  28;      /* Enable SCC2 interrupts */
    832       break;
    833      
    834     case SCC4_MINOR:
    835       rtems_interrupt_catch (m8xx_scc4_interrupt_handler,
    836                              PPC_IRQ_CPM_SCC4,
    837                              &old_handler[minor]);
    838 
    839       sccregs->sccm = 3;            /* Enable SCC2 Rx & Tx interrupts */
    840       m8xx.cimr |= 1UL <<  27;      /* Enable SCC2 interrupts */
    841       break;
    842 #endif /* mpc860 */
    843   }
    844 #endif /* UARTS_IO_MODE */
    845 
    846 #endif /* NVRAM_CONFIGURE */
    847809}
    848810
     
    913875  smcparms->rfcr = M8xx_RFCR_MOT | M8xx_RFCR_DMA_SPACE(0);
    914876  smcparms->tfcr = M8xx_TFCR_MOT | M8xx_TFCR_DMA_SPACE(0);
    915 #if NVRAM_CONFIGURE == 1
    916   if ( (nvram->console_mode & 0x06) == 0x02 )
     877  if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 )
    917878    smcparms->mrblr = RXBUFSIZE;    /* Maximum Rx buffer size */
    918879  else
    919880    smcparms->mrblr = 1;            /* Maximum Rx buffer size */
    920 #else
    921 #if UARTS_IO_MODE == 1
    922   smcparms->mrblr = RXBUFSIZE;      /* Maximum Rx buffer size */
    923 #else
    924   smcparms->mrblr = 1;              /* Maximum Rx buffer size */
    925 #endif
    926 #endif
    927881
    928882  /*
     
    969923   */
    970924  smcregs->smcmr |= M8xx_SMCMR_TEN | M8xx_SMCMR_REN;
    971 #if NVRAM_CONFIGURE == 1
    972   if ( (nvram->console_mode & 0x06) == 0x02 ) {
     925  if ( (mbx8xx_console_get_configuration() & 0x06) == 0x02 ) {
    973926    switch (minor) {
    974927      case SMC1_MINOR:
     
    991944    }
    992945  }
    993 #else
    994 #if UARTS_IO_MODE == 1
    995   switch (minor) {
    996     case SMC1_MINOR:
    997       rtems_interrupt_catch (m8xx_smc1_interrupt_handler,
    998                                   PPC_IRQ_CPM_SMC1,
    999                                   &old_handler[minor]);
    1000 
    1001       smcregs->smcm = 3;            /* Enable SMC1 Rx & Tx interrupts */
    1002       m8xx.cimr |= 1UL <<  4;       /* Enable SMC1 interrupts */
    1003       break;
    1004      
    1005     case SMC2_MINOR:
    1006       rtems_interrupt_catch (m8xx_smc2_interrupt_handler,
    1007                                   PPC_IRQ_CPM_SMC2,
    1008                                   &old_handler[minor]);
    1009 
    1010       smcregs->smcm = 3;            /* Enable SMC2 Rx & Tx interrupts */
    1011       m8xx.cimr |= 1UL <<  3;       /* Enable SMC2 interrupts */
    1012       break;
    1013   }
    1014 #endif
    1015 
    1016 #endif
    1017946}
    1018947
Note: See TracChangeset for help on using the changeset viewer.