Changeset 95273a6 in rtems for c/src/lib/libbsp/powerpc/shared


Ignore:
Timestamp:
01/03/00 14:06:42 (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
db941670
Parents:
d5c4681e
Message:

Combination of coverhd.h cleanup and MVME23xx/MCP750 patch from Eric Valette
<valette@…> and Jay Kulpinski <jskulpin@…>.

Location:
c/src/lib/libbsp/powerpc/shared
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/include/bsp.h

    rd5c4681e r95273a6  
    3333 * Total memory using RESIDUAL DATA
    3434 */
    35 unsigned int BSP_mem_size;
     35extern unsigned int BSP_mem_size;
    3636/*
    3737 * PCI Bus Frequency
    3838 */
    39 unsigned int BSP_bus_frequency;
     39extern unsigned int BSP_bus_frequency;
    4040/*
    4141 * processor clock frequency
    4242 */
    43 unsigned int BSP_processor_frequency;
     43extern unsigned int BSP_processor_frequency;
    4444/*
    4545 * Time base divisior (how many tick for 1 second).
    4646 */
    47 unsigned int BSP_time_base_divisor;
     47extern unsigned int BSP_time_base_divisor;
     48
     49#define BSP_Convert_decrementer( _value ) \
     50  ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
    4851
    4952extern rtems_configuration_table  BSP_Configuration;
  • c/src/lib/libbsp/powerpc/shared/irq/irq_init.c

    rd5c4681e r95273a6  
    55 *
    66 *  CopyRight (C) 1999 valette@crf.canon.fr
     7 *
     8 * Enhanced by Jay Kulpinski <jskulpin@eng01.gdds.com>
     9 * to make it valid for MVME2300 Motorola boards.
    710 *
    811 *  The license and distribution terms for this file may be
     
    250253  printk("Going to initialize the PCI/ISA bridge IRQ related setting (VIA 82C586)\n");
    251254#endif
    252   if ( (currentBoard == MESQUITE) ) {
     255  if ( currentBoard == MESQUITE ) {
    253256    VIA_isa_bridge_interrupts_setup();
     257    known_cpi_isa_bridge = 1;
     258  }
     259  if ( currentBoard == MVME_2300 ) {
     260    /* nothing to do for W83C553 bridge */
    254261    known_cpi_isa_bridge = 1;
    255262  }
  • c/src/lib/libbsp/powerpc/shared/start/start.S

    rd5c4681e r95273a6  
    5050 *   r7: End of command line string
    5151 *
     52 *   The Prep boot loader insure that the MMU is currently off...
     53 *
    5254 */
    5355       
     
    5759        mr      r28,r6
    5860        mr      r27,r7
     61        /*
     62         * Make sure we have nothing in BATS and TLB
     63         */
     64        bl      clear_bats
     65        bl      flush_tlbs
    5966/*
    6067 * Use the first pair of BAT registers to map the 1st 64MB
     
    6471        ori     r11,r11,0x7fe           /* set up BAT registers for 604 */
    6572        li      r8,2                    /* R/W access */
     73        isync
    6674        mtspr   DBAT0L,r8               /* N.B. 6xx (not 601) have valid */
    6775        mtspr   DBAT0U,r11              /* bit in upper BAT register */
     
    130138        mtctr   r30
    131139        bctr   
     140
     141/*
     142 * An undocumented "feature" of 604e requires that the v bit
     143 * be cleared before changing BAT values.
     144 *
     145 * Also, newer IBM firmware does not clear bat3 and 4 so
     146 * this makes sure it's done.
     147 *  -- Cort
     148 */
     149clear_bats:
     150        li      r20,0
     151        mfspr   r9,PVR
     152        rlwinm  r9,r9,16,16,31          /* r9 = 1 for 601, 4 for 604 */
     153        cmpwi   r9, 1
     154        SYNC
     155        beq     1f
     156        mtspr   DBAT0U,r20
     157        mtspr   DBAT0L,r20     
     158        mtspr   DBAT1U,r20
     159        mtspr   DBAT1L,r20
     160        mtspr   DBAT2U,r20
     161        mtspr   DBAT2L,r20     
     162        mtspr   DBAT3U,r20
     163        mtspr   DBAT3L,r20
     1641:     
     165        mtspr   IBAT0U,r20
     166        mtspr   IBAT0L,r20
     167        mtspr   IBAT1U,r20
     168        mtspr   IBAT1L,r20
     169        mtspr   IBAT2U,r20
     170        mtspr   IBAT2L,r20
     171        mtspr   IBAT3U,r20
     172        mtspr   IBAT3L,r20
     173        SYNC   
     174        blr
     175
     176flush_tlbs:
     177        lis     r20, 0x1000
     1781:      addic.  r20, r20, -0x1000
     179        tlbie   r20
     180        blt     1b
     181        sync
     182        blr
     183       
  • c/src/lib/libbsp/powerpc/shared/startup/bspstart.c

    rd5c4681e r95273a6  
    234234   * provided by the RAVEN
    235235   */
    236   setdbat(3, 0xfeff0000, 0xfeff0000, 0x10000, IO_PAGE);
    237 
     236  setdbat(3, 0xf0000000, 0xf0000000, 0x10000000, IO_PAGE);
    238237  select_console(CONSOLE_LOG);
    239238
Note: See TracChangeset for help on using the changeset viewer.