Changeset c8d78ee in rtems


Ignore:
Timestamp:
Jul 2, 2013, 8:37:13 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
06adfae
Parents:
583eb458
git-author:
Sebastian Huber <sebastian.huber@…> (07/02/13 08:37:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/15/13 09:57:13)
Message:

bsp/mpc55xx: Add MPC5668G support

Location:
c/src/lib
Files:
3 added
14 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am

    r583eb458 rc8d78ee  
    3131dist_project_lib_DATA += startup/linkcmds.mpc5674fevb_spe
    3232dist_project_lib_DATA += startup/linkcmds.phycore_mpc5554
     33dist_project_lib_DATA += startup/linkcmds.mpc5668g
    3334dist_project_lib_DATA += startup/linkcmds.mpc5674f_ecu508
    3435dist_project_lib_DATA += startup/linkcmds.mpc5674f_ecu508_boot
  • c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c

    r583eb458 rc8d78ee  
    88
    99/*
    10  * Copyright (c) 2009-2011 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2009-2013 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
    13  *  Obere Lagerstr. 30
     13 *  Dornierstr. 4
    1414 *  82178 Puchheim
    1515 *  Germany
     
    2525
    2626#include <mpc55xx/regs.h>
     27
     28void Clock_isr(void *arg);
    2729
    2830static uint64_t mpc55xx_clock_factor;
  • c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac

    r583eb458 rc8d78ee  
    6868RTEMS_BSPOPTS_SET([MPC55XX_REFERENCE_CLOCK],[gwlcfm],[40000000])
    6969RTEMS_BSPOPTS_SET([MPC55XX_REFERENCE_CLOCK],[mpc5643l_evb*],[40000000])
     70RTEMS_BSPOPTS_SET([MPC55XX_REFERENCE_CLOCK],[mpc5668g*],[25000000])
    7071RTEMS_BSPOPTS_SET([MPC55XX_REFERENCE_CLOCK],[mpc5674f*],[40000000])
    7172RTEMS_BSPOPTS_SET([MPC55XX_REFERENCE_CLOCK],[*],[8000000])
     
    7576
    7677RTEMS_BSPOPTS_SET([MPC55XX_SYSTEM_CLOCK],[gwlcfm],[66000000])
     78RTEMS_BSPOPTS_SET([MPC55XX_SYSTEM_CLOCK],[mpc5668g*],[116000000])
    7779RTEMS_BSPOPTS_SET([MPC55XX_SYSTEM_CLOCK],[mpc5674f*],[264000000])
    7880RTEMS_BSPOPTS_SET([MPC55XX_SYSTEM_CLOCK],[*]     ,[128000000])
     
    8183
    8284RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_PREDIV],[gwlcfm],[10])
     85RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_PREDIV],[mpc5668g*],[6])
    8386RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_PREDIV],[mpc5674f*],[5])
    8487RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_PREDIV],[*]     ,[1])
     
    8790
    8891RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_MFD],[gwlcfm],[99])
     92RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_MFD],[mpc5668g*],[111])
    8993RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_MFD],[mpc5674f*],[66])
    9094RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_MFD],[*]     ,[12])
     
    110114RTEMS_BSPOPTS_SET([MPC55XX_NULL_POINTER_PROTECTION],[mpc5566*],[1])
    111115RTEMS_BSPOPTS_SET([MPC55XX_NULL_POINTER_PROTECTION],[mpc5674f*],[1])
     116RTEMS_BSPOPTS_SET([MPC55XX_NULL_POINTER_PROTECTION],[*],[])
    112117RTEMS_BSPOPTS_HELP([MPC55XX_NULL_POINTER_PROTECTION],
    113118[enable NULL pointer protection])
     
    148153
    149154RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_EMIOS_CHANNEL],[mpc5643l*],[])
     155RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_EMIOS_CHANNEL],[mpc5668g*],[])
    150156RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_EMIOS_CHANNEL],[mpc5674f*],[31])
    151157RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_EMIOS_CHANNEL],[*],[23])
     
    154160
    155161RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_PIT_CHANNEL],[mpc5643l*],[3])
     162RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_PIT_CHANNEL],[mpc5668g*],[8])
    156163RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_PIT_CHANNEL],[*],[])
    157164RTEMS_BSPOPTS_HELP([MPC55XX_CLOCK_PIT_CHANNEL],
     
    161168RTEMS_BSPOPTS_SET([MPC55XX_CHIP_TYPE],[mpc5566*],[5566])
    162169RTEMS_BSPOPTS_SET([MPC55XX_CHIP_TYPE],[mpc5643l*],[5643])
     170RTEMS_BSPOPTS_SET([MPC55XX_CHIP_TYPE],[mpc5668g*],[5668])
    163171RTEMS_BSPOPTS_SET([MPC55XX_CHIP_TYPE],[mpc5674f*],[5674])
    164172RTEMS_BSPOPTS_SET([MPC55XX_CHIP_TYPE],[*],[5554])
  • c/src/lib/libbsp/powerpc/mpc55xxevb/preinstall.am

    r583eb458 rc8d78ee  
    9494PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.phycore_mpc5554
    9595
     96$(PROJECT_LIB)/linkcmds.mpc5668g: startup/linkcmds.mpc5668g $(PROJECT_LIB)/$(dirstamp)
     97        $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.mpc5668g
     98PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.mpc5668g
     99
    96100$(PROJECT_LIB)/linkcmds.mpc5674f_ecu508: startup/linkcmds.mpc5674f_ecu508 $(PROJECT_LIB)/$(dirstamp)
    97101        $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.mpc5674f_ecu508
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c

    r583eb458 rc8d78ee  
    119119        bsp_interrupt_initialize();
    120120
    121         mpc55xx_edma_init();
     121        #if MPC55XX_CHIP_FAMILY != 566
     122                mpc55xx_edma_init();
     123        #endif
     124
    122125        #ifdef MPC55XX_EMIOS_PRESCALER
    123126                mpc55xx_emios_initialize(MPC55XX_EMIOS_PRESCALER);
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-clock.c

    r583eb458 rc8d78ee  
    7575      fmpll_wait_for_lock();
    7676
    77       #if MPC55XX_CHIP_FAMILY == 551
     77      #if MPC55XX_CHIP_FAMILY == 551 || MPC55XX_CHIP_FAMILY == 566
    7878        /* System clock supplied by PLL */
    7979        SIU.SYSCLK.B.SYSCLKSEL = 2;
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-config-mmu-early.c

    r583eb458 rc8d78ee  
    88
    99/*
    10  * Copyright (c) 2011-2012 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2011-2013 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
    13  *  Obere Lagerstr. 30
     13 *  Dornierstr. 4
    1414 *  82178 Puchheim
    1515 *  Germany
     
    4545  MPC55XX_MMU_TAG_INITIALIZER(3, 0x40000000, MPC55XX_MMU_64K, 1, 1, 1, 0),
    4646  MPC55XX_MMU_TAG_INITIALIZER(4, 0x50000000, MPC55XX_MMU_64K, 0, 1, 1, 0)
     47#elif MPC55XX_CHIP_FAMILY == 566
     48  /* Internal flash 2M */
     49  MPC55XX_MMU_TAG_INITIALIZER(1, 0x00000000, MPC55XX_MMU_1M, 1, 0, 1, 0),
     50  MPC55XX_MMU_TAG_INITIALIZER(4, 0x00100000, MPC55XX_MMU_1M, 1, 0, 1, 0),
     51  /* IO */
     52  MPC55XX_MMU_TAG_INITIALIZER(2, 0xc3f00000, MPC55XX_MMU_1M, 0, 1, 1, 1),
     53  /* Internal SRAM 512k */
     54  MPC55XX_MMU_TAG_INITIALIZER(3, 0x40000000, MPC55XX_MMU_256K, 1, 1, 1, 0),
     55  MPC55XX_MMU_TAG_INITIALIZER(5, 0x40040000, MPC55XX_MMU_256K, 1, 1, 1, 0)
    4756#elif MPC55XX_CHIP_FAMILY == 567
    4857  /* Internal SRAM 256k */
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-flash.S

    r583eb458 rc8d78ee  
    3939 */
    4040GLOBAL_FUNCTION mpc55xx_start_flash
    41 #if !defined(MPC55XX_NEEDS_LOW_LEVEL_INIT) || MPC55XX_CHIP_FAMILY == 564
     41#if !defined(MPC55XX_NEEDS_LOW_LEVEL_INIT) \
     42  || MPC55XX_CHIP_FAMILY == 564 \
     43  || MPC55XX_CHIP_FAMILY == 566
    4244        blr
    4345#else
  • c/src/lib/libcpu/powerpc/Makefile.am

    r583eb458 rc8d78ee  
    423423include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc556x.h
    424424include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc564xL.h
     425include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc5668.h
    425426include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc567x.h
    426427include_mpc55xx_HEADERS += mpc55xx/include/regs-edma.h
  • c/src/lib/libcpu/powerpc/mpc55xx/include/emios.h

    r583eb458 rc8d78ee  
    169169/** @} */
    170170
    171 #if MPC55XX_CHIP_FAMILY == 567
     171#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
    172172  #define MPC55XX_EMIOS_CHANNEL_NUMBER 32U
    173173#else
  • c/src/lib/libcpu/powerpc/mpc55xx/include/irq.h

    r583eb458 rc8d78ee  
    9090
    9191  /* eSCI */
    92   #define MPC55XX_IRQ_ESCI_BASE(mod) \
     92  #define MPC55XX_IRQ_ESCI(mod) \
    9393    ((mod) == 0 ? 113U : \
    9494      ((mod) == 1 ? 114U : \
     
    211211  /* SWG */
    212212  #define MPC55XX_IRQ_SWG 255U
     213#elif MPC55XX_CHIP_FAMILY == 566
     214  #define MPC55XX_IRQ_MAX 315U
     215
     216  /* eDMA */
     217  #define MPC55XX_IRQ_EDMA_ERROR(group) \
     218    ((group) == 0 ? 10U : MPC55XX_IRQ_INVALID)
     219  #define MPC55XX_IRQ_EDMA(ch) \
     220    ((unsigned) (ch) < 32U ? 11U + (ch) : MPC55XX_IRQ_INVALID)
     221
     222  /* PIT */
     223  #define MPC55XX_IRQ_PIT_CHANNEL(ch) \
     224    ((unsigned) (ch) < 9U ? 148U + (ch) : MPC55XX_IRQ_INVALID)
     225
     226  /* eMIOS */
     227  #define MPC55XX_IRQ_EMIOS(ch) \
     228    ((unsigned) (ch) < 24U ? 58U + (ch) : \
     229      ((unsigned) (ch) < 32U ? 262U + (ch) : MPC55XX_IRQ_INVALID))
     230
     231  /* eSCI */
     232  #define MPC55XX_IRQ_ESCI(mod) \
     233    ((unsigned) (mod) < 4U ? 113U + (mod) : \
     234      ((unsigned) (mod) < 8U ? 270U + (mod) : \
     235        ((unsigned) (mod) < 12U ? 306U + (mod) : MPC55XX_IRQ_INVALID)))
    213236#else
    214237  #if MPC55XX_CHIP_FAMILY == 555
     
    270293
    271294  /* eSCI */
    272   #define MPC55XX_IRQ_ESCI_BASE(mod) \
     295  #define MPC55XX_IRQ_ESCI(mod) \
    273296    ((mod) == 0 ? 146U : \
    274297      ((mod) == 1 ? 149U : \
     
    332355#define MPC55XX_IRQ_EQADC_RFDF(mod, fifo) \
    333356  (MPC55XX_IRQ_EQADC_BASE(mod) + 1U + (fifo) * 5U + 4U)
    334 
    335 /* eSCI */
    336 #define MPC55XX_IRQ_ESCI(mod) (MPC55XX_IRQ_ESCI_BASE(mod) + 0U)
    337357
    338358/* FlexCAN */
  • c/src/lib/libcpu/powerpc/mpc55xx/include/regs-edma.h

    r583eb458 rc8d78ee  
    6868            uint32_t R;
    6969            struct {
    70 #if MPC55XX_CHIP_FAMILY == 567
     70#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
    7171                uint32_t:14;
    7272                uint32_t CX:1;
     
    7979                uint32_t GRP1PRI:2;
    8080                uint32_t GRP0PRI:2;
    81 #if MPC55XX_CHIP_FAMILY == 567
     81#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
    8282                uint32_t EMLM:1;
    8383                uint32_t CLM:1;
     
    9898            struct {
    9999                uint32_t VLD:1;
    100 #if MPC55XX_CHIP_FAMILY == 567
     100#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
    101101                uint32_t:14;
    102102                uint32_t ECX:1;
     
    486486        } ERL;                  /* DMA Error Low */
    487487
    488 #if MPC55XX_CHIP_FAMILY == 567
     488#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
    489489        union {                  /* hardware request status high */
    490490            uint32_t R;
     
    572572            struct {
    573573                uint8_t ECP:1;
    574 #if MPC55XX_CHIP_FAMILY == 567
     574#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
    575575                uint8_t DPA:1;
    576576#else
  • c/src/lib/libcpu/powerpc/mpc55xx/include/regs.h

    r583eb458 rc8d78ee  
    99
    1010/*
    11  * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
     11 * Copyright (c) 2008-2013 embedded brains GmbH.  All rights reserved.
    1212 *
    1313 *  embedded brains GmbH
    14  *  Obere Lagerstr. 30
     14 *  Dornierstr. 4
    1515 *  82178 Puchheim
    1616 *  Germany
     
    5959  #define MPC55XX_HAS_SECOND_INTERNAL_RAM_AREA
    6060  #define MPC55XX_HAS_SIU_LITE
     61#elif MPC55XX_CHIP_FAMILY == 566
     62  #include <mpc55xx/fsl-mpc5668.h>
     63  #define MPC55XX_HAS_ESCI
     64  #define MPC55XX_HAS_EMIOS
     65  #define MPC55XX_HAS_FMPLL_ENHANCED
     66  #define MPC55XX_HAS_UNIFIED_CACHE
     67  #define MPC55XX_HAS_SIU
     68  /*
     69   * TODO: This e200z650n3e core has a wait instruction, but it did not wake-up
     70   * from PIT interrupts.
     71   */
    6172#elif MPC55XX_CHIP_FAMILY == 567
    6273  #include <mpc55xx/fsl-mpc567x.h>
  • c/src/lib/libcpu/powerpc/preinstall.am

    r583eb458 rc8d78ee  
    298298PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc564xL.h
    299299
     300$(PROJECT_INCLUDE)/mpc55xx/fsl-mpc5668.h: mpc55xx/include/fsl-mpc5668.h $(PROJECT_INCLUDE)/mpc55xx/$(dirstamp)
     301        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc5668.h
     302PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc5668.h
     303
    300304$(PROJECT_INCLUDE)/mpc55xx/fsl-mpc567x.h: mpc55xx/include/fsl-mpc567x.h $(PROJECT_INCLUDE)/mpc55xx/$(dirstamp)
    301305        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc567x.h
Note: See TracChangeset for help on using the changeset viewer.