diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-02-21 17:18:01 +0100 |
---|---|---|
committer | Marian Balakowicz <m8@semihalf.com> | 2008-02-21 17:18:01 +0100 |
commit | 20c93959330aba8b5bbdbfde1ef319e99eba235d (patch) | |
tree | ef82297e3aeb904f94584e6d136fac55ec32c317 /board/netstal/hcu5 | |
parent | 5cf746c303710329f8040d9c62ee354313e3e91f (diff) | |
parent | 928d1d77f8623c120d8763e20e1ca58df9c5c4c6 (diff) | |
download | u-boot-imx-20c93959330aba8b5bbdbfde1ef319e99eba235d.zip u-boot-imx-20c93959330aba8b5bbdbfde1ef319e99eba235d.tar.gz u-boot-imx-20c93959330aba8b5bbdbfde1ef319e99eba235d.tar.bz2 |
Merge branch 'master' of /home/git/u-boot
Diffstat (limited to 'board/netstal/hcu5')
-rw-r--r-- | board/netstal/hcu5/Makefile | 10 | ||||
-rw-r--r-- | board/netstal/hcu5/hcu5.c | 8 | ||||
-rw-r--r-- | board/netstal/hcu5/sdram.c | 32 |
3 files changed, 26 insertions, 24 deletions
diff --git a/board/netstal/hcu5/Makefile b/board/netstal/hcu5/Makefile index 9f248a4..349c653 100644 --- a/board/netstal/hcu5/Makefile +++ b/board/netstal/hcu5/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2007 Netstal Maschinen AG +# (C) Copyright 2007-2008 Netstal Maschinen AG # Niklaus Giger (ng@netstal.com) # # This program is free software; you can redistribute it and/or @@ -22,17 +22,15 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -vpath hcu_flash.c ../common -vpath nm_bsp.c ../common # NOBJS : Netstal common objects -NOBJS = ../common/hcu_flash.o ../common/nm_bsp.o +NOBJS = hcu_flash.o nm_bsp.o COBJS = $(BOARD).o sdram.o SOBJS = init.o -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(NOBJS:.o=.c) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix ../common/,$(NOBJS:.o=.c)) OBJS := $(addprefix $(obj),$(COBJS)) -NOBJS := $(addprefix $(obj),$(NOBJS)) +NOBJS := $(addprefix $(obj)../common/,$(NOBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) $(LIB): $(OBJS) $(SOBJS) $(NOBJS) diff --git a/board/netstal/hcu5/hcu5.c b/board/netstal/hcu5/hcu5.c index 2c7afe2..c494e93 100644 --- a/board/netstal/hcu5/hcu5.c +++ b/board/netstal/hcu5/hcu5.c @@ -309,15 +309,13 @@ int misc_init_r(void) */ if (mfspr(dbcr0) & 0x80000000) { /* External debugger alive - * enable trace facilty for Lauterback - * CCR0[DAPUIB]=0 Enable broadcast of instruction data - * to auxiliary processor interface + * enable trace facilty for Lauterbach * CCR0[DTB]=0 Enable broadcast of trace information * SDR0_PFC0[TRE] Trace signals are enabled instead of * GPIO49-63 */ - mtspr(ccr0, mfspr(ccr0) &~ 0x00108000); - mtsdr(SDR0_PFC0, sdr0_pfc1 | 0x00000100); + mtspr(ccr0, mfspr(ccr0) &~ (CCR0_DTB)); + mtsdr(SDR0_PFC0, sdr0_pfc1 | SDR0_PFC0_TRE_ENABLE); } return 0; } diff --git a/board/netstal/hcu5/sdram.c b/board/netstal/hcu5/sdram.c index 5435de1..d3c2233 100644 --- a/board/netstal/hcu5/sdram.c +++ b/board/netstal/hcu5/sdram.c @@ -165,19 +165,25 @@ static void program_ecc(unsigned long start_address, unsigned long num_bytes) u32 val; char str[] = "ECC generation -"; #if defined(CONFIG_PRAM) - u32 *magic; - - /* Check whether vxWorks is using EDR logging, if yes zero */ - /* also PostMortem and user reserved memory */ - magic = (u32 *)in_be32((u32 *)(start_address + num_bytes - - (CONFIG_PRAM*1024) + sizeof(u32))); - - debug("\n%s: CONFIG_PRAM %d kB magic 0x%x 0x%p -> 0x%x\n", __FUNCTION__, - CONFIG_PRAM, - start_address + num_bytes - (CONFIG_PRAM*1024) + sizeof(u32), - magic, in_be32(magic)); - if (in_be32(magic) == 0xbeefbabe) - num_bytes -= (CONFIG_PRAM*1024) - PM_RESERVED_MEM; + u32 *magicPtr; + u32 magic; + + if ((mfspr(dbcr0) & 0x80000000) == 0) { + /* only if no external debugger is alive! + * Check whether vxWorks is using EDR logging, if yes zero + * also PostMortem and user reserved memory + */ + magicPtr = (u32 *)(start_address + num_bytes - + (CONFIG_PRAM*1024) + sizeof(u32)); + magic = in_be32(magicPtr); + debug("%s: CONFIG_PRAM %d kB magic 0x%x 0x%p\n", + __FUNCTION__, CONFIG_PRAM, + magicPtr, magic); + if (magic == 0xbeefbabe) { + printf("%s: preserving at %p\n", __FUNCTION__, magicPtr); + num_bytes -= (CONFIG_PRAM*1024) - PM_RESERVED_MEM; + } + } #endif sync(); |