bsp/mpc55xx: Add MPC5668G support

This commit is contained in:
Sebastian Huber
2013-07-02 10:37:13 +02:00
parent 583eb4588f
commit c8d78ee510
17 changed files with 6836 additions and 20 deletions

View File

@@ -422,6 +422,7 @@ include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc551x.h
include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc555x.h
include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc556x.h
include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc564xL.h
include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc5668.h
include_mpc55xx_HEADERS += mpc55xx/include/fsl-mpc567x.h
include_mpc55xx_HEADERS += mpc55xx/include/regs-edma.h
include_mpc55xx_HEADERS += mpc55xx/include/regs-mmu.h

View File

@@ -168,7 +168,7 @@ extern "C" {
/** @} */
#if MPC55XX_CHIP_FAMILY == 567
#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
#define MPC55XX_EMIOS_CHANNEL_NUMBER 32U
#else
#define MPC55XX_EMIOS_CHANNEL_NUMBER 24U

File diff suppressed because it is too large Load Diff

View File

@@ -89,7 +89,7 @@ extern "C" {
((mod) == 0 ? 82U : MPC55XX_IRQ_INVALID)
/* eSCI */
#define MPC55XX_IRQ_ESCI_BASE(mod) \
#define MPC55XX_IRQ_ESCI(mod) \
((mod) == 0 ? 113U : \
((mod) == 1 ? 114U : \
((mod) == 2 ? 115U : \
@@ -210,6 +210,29 @@ extern "C" {
/* SWG */
#define MPC55XX_IRQ_SWG 255U
#elif MPC55XX_CHIP_FAMILY == 566
#define MPC55XX_IRQ_MAX 315U
/* eDMA */
#define MPC55XX_IRQ_EDMA_ERROR(group) \
((group) == 0 ? 10U : MPC55XX_IRQ_INVALID)
#define MPC55XX_IRQ_EDMA(ch) \
((unsigned) (ch) < 32U ? 11U + (ch) : MPC55XX_IRQ_INVALID)
/* PIT */
#define MPC55XX_IRQ_PIT_CHANNEL(ch) \
((unsigned) (ch) < 9U ? 148U + (ch) : MPC55XX_IRQ_INVALID)
/* eMIOS */
#define MPC55XX_IRQ_EMIOS(ch) \
((unsigned) (ch) < 24U ? 58U + (ch) : \
((unsigned) (ch) < 32U ? 262U + (ch) : MPC55XX_IRQ_INVALID))
/* eSCI */
#define MPC55XX_IRQ_ESCI(mod) \
((unsigned) (mod) < 4U ? 113U + (mod) : \
((unsigned) (mod) < 8U ? 270U + (mod) : \
((unsigned) (mod) < 12U ? 306U + (mod) : MPC55XX_IRQ_INVALID)))
#else
#if MPC55XX_CHIP_FAMILY == 555
#define MPC55XX_IRQ_MAX 307U
@@ -269,7 +292,7 @@ extern "C" {
((mod) == 1 ? 394U : MPC55XX_IRQ_INVALID))
/* eSCI */
#define MPC55XX_IRQ_ESCI_BASE(mod) \
#define MPC55XX_IRQ_ESCI(mod) \
((mod) == 0 ? 146U : \
((mod) == 1 ? 149U : \
((mod) == 2 ? 473U : MPC55XX_IRQ_INVALID)))
@@ -332,9 +355,6 @@ extern "C" {
#define MPC55XX_IRQ_EQADC_RFDF(mod, fifo) \
(MPC55XX_IRQ_EQADC_BASE(mod) + 1U + (fifo) * 5U + 4U)
/* eSCI */
#define MPC55XX_IRQ_ESCI(mod) (MPC55XX_IRQ_ESCI_BASE(mod) + 0U)
/* FlexCAN */
#if MPC55XX_CHIP_FAMILY == 564
#define MPC55XX_IRQ_CAN_ERR(mod) (MPC55XX_IRQ_CAN_BASE(mod) + 0U)

View File

@@ -67,7 +67,7 @@ extern "C" {
union EDMA_CR_tag {
uint32_t R;
struct {
#if MPC55XX_CHIP_FAMILY == 567
#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
uint32_t:14;
uint32_t CX:1;
uint32_t ECX:1;
@@ -78,7 +78,7 @@ extern "C" {
uint32_t GRP2PRI:2;
uint32_t GRP1PRI:2;
uint32_t GRP0PRI:2;
#if MPC55XX_CHIP_FAMILY == 567
#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
uint32_t EMLM:1;
uint32_t CLM:1;
uint32_t HALT:1;
@@ -97,7 +97,7 @@ extern "C" {
uint32_t R;
struct {
uint32_t VLD:1;
#if MPC55XX_CHIP_FAMILY == 567
#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
uint32_t:14;
uint32_t ECX:1;
#else
@@ -485,7 +485,7 @@ extern "C" {
} B;
} ERL; /* DMA Error Low */
#if MPC55XX_CHIP_FAMILY == 567
#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
union { /* hardware request status high */
uint32_t R;
struct {
@@ -571,7 +571,7 @@ extern "C" {
uint8_t R;
struct {
uint8_t ECP:1;
#if MPC55XX_CHIP_FAMILY == 567
#if MPC55XX_CHIP_FAMILY == 566 || MPC55XX_CHIP_FAMILY == 567
uint8_t DPA:1;
#else
uint8_t:1;

View File

@@ -8,10 +8,10 @@
*/
/*
* Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
* Copyright (c) 2008-2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
* Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
@@ -58,6 +58,17 @@
#define MPC55XX_HAS_LINFLEX
#define MPC55XX_HAS_SECOND_INTERNAL_RAM_AREA
#define MPC55XX_HAS_SIU_LITE
#elif MPC55XX_CHIP_FAMILY == 566
#include <mpc55xx/fsl-mpc5668.h>
#define MPC55XX_HAS_ESCI
#define MPC55XX_HAS_EMIOS
#define MPC55XX_HAS_FMPLL_ENHANCED
#define MPC55XX_HAS_UNIFIED_CACHE
#define MPC55XX_HAS_SIU
/*
* TODO: This e200z650n3e core has a wait instruction, but it did not wake-up
* from PIT interrupts.
*/
#elif MPC55XX_CHIP_FAMILY == 567
#include <mpc55xx/fsl-mpc567x.h>
#define MPC55XX_HAS_EBI

View File

@@ -297,6 +297,10 @@ $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc564xL.h: mpc55xx/include/fsl-mpc564xL.h $(PROJ
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc564xL.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc564xL.h
$(PROJECT_INCLUDE)/mpc55xx/fsl-mpc5668.h: mpc55xx/include/fsl-mpc5668.h $(PROJECT_INCLUDE)/mpc55xx/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc5668.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc5668.h
$(PROJECT_INCLUDE)/mpc55xx/fsl-mpc567x.h: mpc55xx/include/fsl-mpc567x.h $(PROJECT_INCLUDE)/mpc55xx/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc567x.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc55xx/fsl-mpc567x.h