Changeset 144ad33 in rtems


Ignore:
Timestamp:
Sep 20, 2008, 9:39:02 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
f044f9c
Parents:
bb573f7
Message:

2008-09-20 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, include/bsp.h, network_5200/network.c, start/start.S, startup/bspstart.c, startup/cpuinit.c: Use top level shared bsp_get_work_area() implementation. Augment it to know about U-Boot.
  • startup/bspgetworkarea.c: Removed.
Location:
c/src/lib/libbsp/powerpc/gen5200
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen5200/ChangeLog

    rbb573f7 r144ad33  
     12008-09-20      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, include/bsp.h, network_5200/network.c, start/start.S,
     4        startup/bspstart.c, startup/cpuinit.c: Use top level shared
     5        bsp_get_work_area() implementation. Augment it to know about U-Boot.
     6        * startup/bspgetworkarea.c: Removed.
     7
    182008-09-18      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • c/src/lib/libbsp/powerpc/gen5200/Makefile.am

    rbb573f7 r144ad33  
    106106        ../shared/uboot_getenv.c \
    107107        startup/bspclean.c \
    108         startup/bspgetworkarea.c \
     108        ../../shared/bspgetworkarea.c \
    109109        startup/bspstart.c \
    110110        startup/cpuinit.c  \
  • c/src/lib/libbsp/powerpc/gen5200/include/bsp.h

    rbb573f7 r144ad33  
    150150#include <u-boot.h>
    151151
    152 extern bd_t *uboot_bdinfo_ptr;
    153 extern bd_t uboot_bdinfo_copy;
     152extern bd_t bsp_uboot_board_info;
    154153#endif
    155154
     
    206205/* clock settings */
    207206#if defined(HAS_UBOOT)
    208 #define IPB_CLOCK (uboot_bdinfo_ptr->bi_ipbfreq)
    209 #define XLB_CLOCK (uboot_bdinfo_ptr->bi_busfreq)
    210 #define G2_CLOCK  (uboot_bdinfo_ptr->bi_intfreq)
     207#define IPB_CLOCK (bsp_uboot_board_info.bi_ipbfreq)
     208#define XLB_CLOCK (bsp_uboot_board_info.bi_busfreq)
     209#define G2_CLOCK  (bsp_uboot_board_info.bi_intfreq)
    211210#else
    212211#define IPB_CLOCK 33000000   /* 33 MHz */
     
    216215
    217216#if defined(HAS_UBOOT)
    218 #define GEN5200_CONSOLE_BAUD (uboot_bdinfo_ptr->bi_baudrate)
     217#define GEN5200_CONSOLE_BAUD (bsp_uboot_board_info.bi_baudrate)
    219218#else
    220219#define GEN5200_CONSOLE_BAUD 9600
  • c/src/lib/libbsp/powerpc/gen5200/network_5200/network.c

    rbb573f7 r144ad33  
    17701770      (sc->arpcom.ac_enaddr[1] == 0) &&
    17711771      (sc->arpcom.ac_enaddr[2] == 0)) {
    1772       memcpy((void *)sc->arpcom.ac_enaddr, uboot_bdinfo_ptr->bi_enetaddr, ETHER_ADDR_LEN);   
     1772      memcpy(
     1773        (void *)sc->arpcom.ac_enaddr,
     1774        bsp_uboot_board_info.bi_enetaddr,
     1775        ETHER_ADDR_LEN
     1776      );
    17731777  }
    17741778#endif
  • c/src/lib/libbsp/powerpc/gen5200/start/start.S

    rbb573f7 r144ad33  
    168168#if defined(HAS_UBOOT)
    169169/* store pointer to UBoot bd_info board info structure */       
    170         LWI     r31,uboot_bdinfo_ptr
     170        LWI     r31,bsp_uboot_board_info_ptr
    171171        stw     r3,0(r31)
    172172#endif /* defined(HAS_UBOOT) */
  • c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c

    rbb573f7 r144ad33  
    108108
    109109#if defined(HAS_UBOOT)
    110 bd_t *uboot_bdinfo_ptr = (bd_t *)1; /* will be overwritten from startup code */
    111 bd_t uboot_bdinfo_copy;             /* will be overwritten with copy of bdinfo */
     110/* will be overwritten from startup code */
     111bd_t *bsp_uboot_board_info_ptr = (bd_t *)1;
     112/* will be overwritten with copy of board information */
     113bd_t bsp_uboot_board_info;
    112114#endif
    113115
     
    143145
    144146  #if defined(HAS_UBOOT)
    145     uboot_bdinfo_copy = *uboot_bdinfo_ptr;
    146     uboot_bdinfo_ptr = &uboot_bdinfo_copy;
     147    bsp_uboot_board_info = *bsp_uboot_board_info_ptr;
    147148  #endif 
    148149
     
    150151    {
    151152      void dumpUBootBDInfo( bd_t * );
    152       dumpUBootBDInfo( uboot_bdinfo_ptr );
     153      dumpUBootBDInfo( bsp_uboot_board_info_ptr );
    153154    }
    154155  #endif
  • c/src/lib/libbsp/powerpc/gen5200/startup/cpuinit.c

    rbb573f7 r144ad33  
    177177  calc_dbat_regvals(
    178178    &dbat,
    179     uboot_bdinfo_ptr->bi_memstart,
    180     uboot_bdinfo_ptr->bi_memsize,
     179    bsp_uboot_board_info.bi_memstart,
     180    bsp_uboot_board_info.bi_memsize,
    181181    true,
    182182    false,
     
    194194   * corrects that.
    195195   */
    196   if ((uboot_bdinfo_ptr->bi_flashstart + uboot_bdinfo_ptr->bi_flashsize)
    197     < uboot_bdinfo_ptr->bi_flashstart) {
    198     start = 0 - uboot_bdinfo_ptr->bi_flashsize;
     196  if ((bsp_uboot_board_info.bi_flashstart + bsp_uboot_board_info.bi_flashsize)
     197    < bsp_uboot_board_info.bi_flashstart) {
     198    start = 0 - bsp_uboot_board_info.bi_flashsize;
    199199  } else {
    200     start = uboot_bdinfo_ptr->bi_flashstart;
     200    start = bsp_uboot_board_info.bi_flashstart;
    201201  }
    202202  calc_dbat_regvals(
    203203    &dbat,
    204204    start,
    205     uboot_bdinfo_ptr->bi_flashsize,
     205    bsp_uboot_board_info.bi_flashsize,
    206206    true,
    207207    false,
     
    230230   * If there is SRAM, program BAT3 for that memory
    231231   */
    232   if (uboot_bdinfo_ptr->bi_sramsize != 0) {
     232  if (bsp_uboot_board_info.bi_sramsize != 0) {
    233233    calc_dbat_regvals(
    234234      &dbat,
    235       uboot_bdinfo_ptr->bi_sramstart,
    236       uboot_bdinfo_ptr->bi_sramsize,
     235      bsp_uboot_board_info.bi_sramstart,
     236      bsp_uboot_board_info.bi_sramsize,
    237237      false,
    238238      true,
Note: See TracChangeset for help on using the changeset viewer.