Changeset b2c252b in rtems for c/src/lib/libbsp/arm/tms570/pom


Ignore:
Timestamp:
Jul 17, 2015, 3:04:06 PM (5 years ago)
Author:
Premysl Houdek <kom541000@…>
Branches:
master
Children:
579f16ef
Parents:
d6c67ad5
git-author:
Premysl Houdek <kom541000@…> (07/17/15 15:04:06)
git-committer:
Chris Johns <chrisj@…> (07/20/15 10:45:40)
Message:

bsp/tms570 Use bitfields instead of hard-coded values

Signed-off-by: Premysl Houdek <kom541000@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/tms570/pom/tms570-pom.c

    rd6c67ad5 rb2c252b  
    3636  int i;
    3737  uint32_t vec_overlay_start = 0x08000000;
     38  uint32_t temp = 0;
    3839
    3940  memcpy((void*)vec_overlay_start, bsp_start_vector_table_begin, 64);
     
    4243
    4344  for ( i = 0; i < TMS570_POM_REGIONS; ++i ) {
    44     TMS570_POM.REG[i].REGSIZE = TMS570_POM_REGSIZE_DISABLED;
     45    TMS570_POM.REG[i].REGSIZE = TMS570_POM_REGSIZE_SIZE(TMS570_POM_REGSIZE_DISABLED);
    4546  }
    4647
    47   TMS570_POM.REG[0].PROGSTART = 0x0 & TMS570_POM_REGADDRMASK;
    48   TMS570_POM.REG[0].OVLSTART = vec_overlay_start & TMS570_POM_REGADDRMASK;
    49   TMS570_POM.REG[0].REGSIZE = TMS570_POM_REGSIZE_64B;
    50 
    51   TMS570_POM.GLBCTRL = TMS570_POM_GLBCTRL_ENABLE |
    52                        (vec_overlay_start & ~TMS570_POM_REGADDRMASK);
     48  TMS570_POM.REG[0].PROGSTART = TMS570_POM_PROGSTART_STARTADDRESS(0);
     49  TMS570_POM.REG[0].OVLSTART = TMS570_POM_OVLSTART_STARTADDRESS(vec_overlay_start);
     50  TMS570_POM.REG[0].REGSIZE = TMS570_POM_REGSIZE_SIZE(TMS570_POM_REGSIZE_64B);
     51  TMS570_POM.GLBCTRL = TMS570_POM_GLBCTRL_ON_OFF(0xa) |
     52                       TMS570_POM_GLBCTRL_ETO(0xa) |
     53                       (TMS570_POM_GLBCTRL_OTADDR(~0) & vec_overlay_start);
    5354}
Note: See TracChangeset for help on using the changeset viewer.