From e0457d624e442909f31b4c0e7298a6eb4a8faf86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Mon, 28 Oct 2013 11:07:55 +0000 Subject: [PATCH] started m5484 LITEKIT port --- BaS_gcc/include/firebee.h | 8 ++++++++ BaS_gcc/include/m5484l.h | 8 ++++++++ BaS_gcc/sources/sysinit.c | 5 +++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 BaS_gcc/include/firebee.h create mode 100644 BaS_gcc/include/m5484l.h diff --git a/BaS_gcc/include/firebee.h b/BaS_gcc/include/firebee.h new file mode 100644 index 0000000..db9582b --- /dev/null +++ b/BaS_gcc/include/firebee.h @@ -0,0 +1,8 @@ +#ifndef _FIREBEE_H_ +#define _FIREBEE_H_ + +#define BOOTFLASH_BASE_ADDRESS 0xE0000000 +#define BOOTFLASH_SIZE 0x800000 +#define BOOTFLASH_BAM (BOOTFLASH_SIZE - 1) + +#endif /* _FIREBEE_H_ */ diff --git a/BaS_gcc/include/m5484l.h b/BaS_gcc/include/m5484l.h new file mode 100644 index 0000000..45d460e --- /dev/null +++ b/BaS_gcc/include/m5484l.h @@ -0,0 +1,8 @@ +#ifndef _M5484L_H_ +#define _M5484L_H_ + +#define BOOTFLASH_BASE_ADDRESS 0xE0000000 +#define BOOTFLASH_SIZE 0x400000 /* LITEKIT has 4Mb flash */ +#define BOOTFLASH_BAM (BOOTFLASH_SIZE - 1) + +#endif /* _M5484L_H_ */ diff --git a/BaS_gcc/sources/sysinit.c b/BaS_gcc/sources/sysinit.c index f444973..759487d 100644 --- a/BaS_gcc/sources/sysinit.c +++ b/BaS_gcc/sources/sysinit.c @@ -27,6 +27,7 @@ #include #include "MCF5475.h" +#include "firebee.h" #include "startcf.h" #include "cache.h" #include "sysinit.h" @@ -337,11 +338,11 @@ void init_fbcs() xprintf("FlexBus chip select registers initialization: "); /* Flash */ - MCF_FBCS0_CSAR = 0xE0000000; /* flash base address */ + MCF_FBCS0_CSAR = BOOTFLASH_BASE_ADDRESS;/* flash base address */ MCF_FBCS0_CSCR = MCF_FBCS_CSCR_PS_16 | /* 16 bit word access */ MCF_FBCS_CSCR_WS(6)| /* 6 Waitstates */ MCF_FBCS_CSCR_AA; /* */ - MCF_FBCS0_CSMR = MCF_FBCS_CSMR_BAM_8M | + MCF_FBCS0_CSMR = BOOTFLASH_BAM | MCF_FBCS_CSMR_V; /* 8 MByte on */