[U-Boot-Users] port problem?
yigit can
yigit.can at karel.com.tr
Fri Nov 15 08:39:54 CET 2002
Hello everybody,
I'm trying to port to viper board
i have written the following lines and caled it viper.c
also i have modified the flash.c code.
i've modified fads.h config file for viper
now i have some questions
what is these OR_AM, PRELIM and REMAP keys
how can obtain these values i have obtained my values from MCUinit file
#include <common.h>
#include <mpc8xx.h>
static const uint sdram_table[]={
/* single read (offset 0x00 in upm ram) */
0x1f07fc04, 0xe0aefc04, 0x10adfc04, 0xe0bbbc00,
0x10f77c44, 0xf3fffc07, 0xfffffc04, 0xfffffc04,
/* burst read (offset 0x08 in upm ram) */
0x1f07fc04, 0xe0aefc04, 0x10adfc04, 0xf0affc00,
0xf0affc00, 0xf0affc00, 0xf0affc00, 0x10a77c44,
0xf7bffc47, 0xfffffc35, 0xfffffc34, 0xfffffc35,
0xfffffc35, 0x1ff77c35, 0xfffffc34, 0x1fb57c35,
/* single write (offset 0x18 in upm ram) */
0x1f27fc04, 0xe0aebc04, 0x00b93c00, 0x13f77c47,
0xfffdfc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,
/* burst write (offset 0x20 in upm ram) */
0x1f07fc04, 0xeeaebc00, 0x10ad7c00, 0xf0affc00,
0xf0affc00, 0xe0abbc00, 0x1fb77c47, 0xfffffc04,
0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,
0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,
/* refresh (offset 0x30 in upm ram) */
0x1ff5fcb4, 0xfffffc04, 0xfffffc04, 0xfffffc04,
0xfffffc84, 0xfffffc07, 0xfffffc04, 0xfffffc04,
0xfffffc04, 0xfffffc04, 0xfffffc04, 0xfffffc04,
/* exception (offset 0x3C in upm ram) */
0xfffffc07, 0xfffffc04, 0xfffffc04, 0xfffffc04,
};
int checkboard (void) {
puts ("BOARD : VIPER");
}
int initsdram(uint base, uint noMbytes){
volatile immap_t *immap = (immap_t *)CFG_IMMR;
volatile memctl8xx_t *memctl = immap->im_memctl;
upmconfig (UPMA, (uint *)sdram_table,sizeof(sdram_table)/sizeof(uint));
memctl->memc_mptpr = 0x0200;
memctl->memc_mamr = 0x5e802114;
memctl->memc_mbmr = 0x00001000;
memctl->memc_or0 = 0xfff007f4;
memctl->memc_br0 = 0x00000401;
memctl->memc_or1 = 0xff800e00;
memctl->memc_br1 = 0x30000081;
memctl->memc_or2 = 0xffff8730;
memctl->memc_br2 = 0x40100801;
memctl->memc_or3 = 0xffff87fc;
memctl->memc_br3 = 0x40200801;
memctl->memc_or4 = 0xffff8720;
memctl->memc_br4 = 0x50000800;
memctl->memc_or5 = 0xffff8708;
memctl->memc_br5 = 0x40000800;
memctl->memc_or6 = 0xfffe0108;
memctl->memc_br6 = 0x00300000;
memctl->memc_or7 = 0xfffe0008;
memctl->memc_br7 = 0x00400000;
return 0;
}
Yiğit CAN
Karel Electronics Corp.
yigit.can at karel.com.tr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20021115/72f0c574/attachment.htm
More information about the U-Boot
mailing list