Compare commits
153 Commits
v1.3.3-rc1
...
v1.3.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
180a90abda | ||
|
|
a734c06bf7 | ||
|
|
16bedc661d | ||
|
|
3cc27b426a | ||
|
|
311f344693 | ||
|
|
a559317143 | ||
|
|
91f221317a | ||
|
|
dd22394413 | ||
|
|
a9da341df1 | ||
|
|
a38dc3ea86 | ||
|
|
4f805c1e3a | ||
|
|
35fca4c44d | ||
|
|
cda2a4a996 | ||
|
|
2dd7082e06 | ||
|
|
fdd1247a66 | ||
|
|
a8409f4f1a | ||
|
|
cf39b07948 | ||
|
|
085551c05c | ||
|
|
1510b82d50 | ||
|
|
70fab1908f | ||
|
|
65dcfa7920 | ||
|
|
5ddd67efa5 | ||
|
|
ee0cfa7080 | ||
|
|
02b9b22446 | ||
|
|
c9dca3c3f3 | ||
|
|
20e5ed1374 | ||
|
|
79dd171268 | ||
|
|
869d14b4cc | ||
|
|
f3612a7b19 | ||
|
|
36f32675f4 | ||
|
|
91a616741f | ||
|
|
881031d973 | ||
|
|
e5e9d6c9c0 | ||
|
|
cfd60441d8 | ||
|
|
cce9cfdabc | ||
|
|
9606b3c81b | ||
|
|
ceb6b4fbe1 | ||
|
|
2ab02fd456 | ||
|
|
f3f3175746 | ||
|
|
1b5605ca57 | ||
|
|
c59518e159 | ||
|
|
273c37d843 | ||
|
|
bc11756daf | ||
|
|
f3b6d528e4 | ||
|
|
7ea8325b41 | ||
|
|
4604f552a9 | ||
|
|
356cd17cc2 | ||
|
|
597f6c26a1 | ||
|
|
726c0f1e5f | ||
|
|
574b319512 | ||
|
|
045b4d2d71 | ||
|
|
4d49b28038 | ||
|
|
878b3b1e19 | ||
|
|
1df368aed3 | ||
|
|
8fbc985bda | ||
|
|
e419e12d04 | ||
|
|
f5a2425919 | ||
|
|
4d31cdc45d | ||
|
|
ef2642625c | ||
|
|
a00eccfebc | ||
|
|
cb5d88b961 | ||
|
|
d1c1ba85c7 | ||
|
|
4adb3023de | ||
|
|
b9bbefce1a | ||
|
|
66f5fa9263 | ||
|
|
a5fe514e8a | ||
|
|
49387dba91 | ||
|
|
908261f3fd | ||
|
|
0f8c62a14b | ||
|
|
12a67a9e51 | ||
|
|
b83dcc13ae | ||
|
|
6adf61dc4c | ||
|
|
fb98f94fcb | ||
|
|
7c0773fde6 | ||
|
|
aa737945e6 | ||
|
|
4acc2a108a | ||
|
|
ccf1ad535a | ||
|
|
3648085c46 | ||
|
|
4a89b766bf | ||
|
|
6fdd002689 | ||
|
|
fa956fde60 | ||
|
|
8e90cd0447 | ||
|
|
b71190f325 | ||
|
|
9acde129cc | ||
|
|
bd98ee60df | ||
|
|
c4e5f52a58 | ||
|
|
27c38689d0 | ||
|
|
6d12e697de | ||
|
|
4d77f5102d | ||
|
|
56bb37e4b9 | ||
|
|
0072b78be2 | ||
|
|
141ba1cad8 | ||
|
|
ea638951ac | ||
|
|
50f93d30da | ||
|
|
d2c6fbec43 | ||
|
|
fed4de0135 | ||
|
|
12bc4e9425 | ||
|
|
1b9ed2574a | ||
|
|
f32f7fe7bd | ||
|
|
886d90176f | ||
|
|
b7166e05a5 | ||
|
|
378e7ec95d | ||
|
|
33a4a70d48 | ||
|
|
58b575e575 | ||
|
|
e7419b243a | ||
|
|
42ffcec3f9 | ||
|
|
de109d9097 | ||
|
|
4f27098e5b | ||
|
|
ea9202a659 | ||
|
|
7661729935 | ||
|
|
ca9351280f | ||
|
|
b7fcc4c139 | ||
|
|
f7b16a0a4d | ||
|
|
ea6f66894f | ||
|
|
70a0f81412 | ||
|
|
8466647684 | ||
|
|
3a427fd2ec | ||
|
|
8ea08e5be6 | ||
|
|
45239cf415 | ||
|
|
ef7d30b143 | ||
|
|
cf6cc01427 | ||
|
|
fd2d2d1025 | ||
|
|
b2d527a8b9 | ||
|
|
f4c4d21a88 | ||
|
|
0e715a7a3f | ||
|
|
138105efe1 | ||
|
|
cab99d6f32 | ||
|
|
4ec9d78fe5 | ||
|
|
85ad184b3b | ||
|
|
135846d6ec | ||
|
|
e037a4c272 | ||
|
|
18ec19e4aa | ||
|
|
eea5a743a2 | ||
|
|
2ef7503a59 | ||
|
|
40cb90ee2b | ||
|
|
13e0b8f7ca | ||
|
|
707fa917cc | ||
|
|
6aee00f5e6 | ||
|
|
3e4615ab7f | ||
|
|
dd5748bcd6 | ||
|
|
413bf58626 | ||
|
|
db9084de28 | ||
|
|
c71abba3cb | ||
|
|
f2c288a353 | ||
|
|
4ca79f477e | ||
|
|
ff8a7aa24a | ||
|
|
5cd0130ecc | ||
|
|
624ce3428a | ||
|
|
5379cd15dd | ||
|
|
7602ed50a2 | ||
|
|
144eec777a | ||
|
|
941d696d25 | ||
|
|
03c6cd39f9 |
@@ -408,6 +408,10 @@ John Zhan <zhanz@sinovee.com>
|
|||||||
|
|
||||||
svm_sc8xx MPC8xx
|
svm_sc8xx MPC8xx
|
||||||
|
|
||||||
|
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
||||||
|
|
||||||
|
linkstation MPC8241
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
Unknown / orphaned boards:
|
Unknown / orphaned boards:
|
||||||
@@ -603,7 +607,7 @@ Thomas Lange <thomas@corelatus.se>
|
|||||||
dbau1x00 MIPS32 Au1000
|
dbau1x00 MIPS32 Au1000
|
||||||
gth2 MIPS32 Au1000
|
gth2 MIPS32 Au1000
|
||||||
|
|
||||||
Vlad Lungu <vlad@comsys.ro>
|
Vlad Lungu <vlad.lungu@windriver.com>
|
||||||
qemu_mips MIPS32
|
qemu_mips MIPS32
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|||||||
2
MAKEALL
2
MAKEALL
@@ -42,6 +42,7 @@ LIST_5xxx=" \
|
|||||||
fo300 \
|
fo300 \
|
||||||
icecube_5100 \
|
icecube_5100 \
|
||||||
icecube_5200 \
|
icecube_5200 \
|
||||||
|
inka4x0 \
|
||||||
lite5200b \
|
lite5200b \
|
||||||
mcc200 \
|
mcc200 \
|
||||||
mecp5200 \
|
mecp5200 \
|
||||||
@@ -305,6 +306,7 @@ LIST_8260=" \
|
|||||||
TQM8260_AC \
|
TQM8260_AC \
|
||||||
TQM8260_AD \
|
TQM8260_AD \
|
||||||
TQM8260_AE \
|
TQM8260_AE \
|
||||||
|
TQM8272 \
|
||||||
ZPC1900 \
|
ZPC1900 \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
38
Makefile
38
Makefile
@@ -24,7 +24,7 @@
|
|||||||
VERSION = 1
|
VERSION = 1
|
||||||
PATCHLEVEL = 3
|
PATCHLEVEL = 3
|
||||||
SUBLEVEL = 3
|
SUBLEVEL = 3
|
||||||
EXTRAVERSION = -rc1
|
EXTRAVERSION =
|
||||||
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
||||||
VERSION_FILE = $(obj)include/version_autogenerated.h
|
VERSION_FILE = $(obj)include/version_autogenerated.h
|
||||||
|
|
||||||
@@ -201,7 +201,6 @@ OBJS := $(addprefix $(obj),$(OBJS))
|
|||||||
LIBS = lib_generic/libgeneric.a
|
LIBS = lib_generic/libgeneric.a
|
||||||
LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
|
LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
|
||||||
"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
|
"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
|
||||||
LIBS += board/$(BOARDDIR)/lib$(BOARD).a
|
|
||||||
LIBS += cpu/$(CPU)/lib$(CPU).a
|
LIBS += cpu/$(CPU)/lib$(CPU).a
|
||||||
ifdef SOC
|
ifdef SOC
|
||||||
LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
|
LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
|
||||||
@@ -248,6 +247,9 @@ LIBS += post/libpost.a
|
|||||||
LIBS := $(addprefix $(obj),$(LIBS))
|
LIBS := $(addprefix $(obj),$(LIBS))
|
||||||
.PHONY : $(LIBS) $(VERSION_FILE)
|
.PHONY : $(LIBS) $(VERSION_FILE)
|
||||||
|
|
||||||
|
LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
|
||||||
|
LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
|
||||||
|
|
||||||
# Add GCC lib
|
# Add GCC lib
|
||||||
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
|
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
|
||||||
|
|
||||||
@@ -270,7 +272,7 @@ U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
__OBJS := $(subst $(obj),,$(OBJS))
|
__OBJS := $(subst $(obj),,$(OBJS))
|
||||||
__LIBS := $(subst $(obj),,$(LIBS))
|
__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#########################################################################
|
#########################################################################
|
||||||
@@ -313,8 +315,9 @@ $(obj)u-boot.sha1: $(obj)u-boot.bin
|
|||||||
$(obj)u-boot.dis: $(obj)u-boot
|
$(obj)u-boot.dis: $(obj)u-boot
|
||||||
$(OBJDUMP) -d $< > $@
|
$(OBJDUMP) -d $< > $@
|
||||||
|
|
||||||
$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
|
$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
|
||||||
UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
|
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
|
||||||
|
sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
|
||||||
cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
|
cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
|
||||||
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
|
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
|
||||||
-Map u-boot.map -o u-boot
|
-Map u-boot.map -o u-boot
|
||||||
@@ -325,6 +328,9 @@ $(OBJS): depend $(obj)include/autoconf.mk
|
|||||||
$(LIBS): depend $(obj)include/autoconf.mk
|
$(LIBS): depend $(obj)include/autoconf.mk
|
||||||
$(MAKE) -C $(dir $(subst $(obj),,$@))
|
$(MAKE) -C $(dir $(subst $(obj),,$@))
|
||||||
|
|
||||||
|
$(LIBBOARD): depend $(LIBS) $(obj)include/autoconf.mk
|
||||||
|
$(MAKE) -C $(dir $(subst $(obj),,$@))
|
||||||
|
|
||||||
$(SUBDIRS): depend $(obj)include/autoconf.mk
|
$(SUBDIRS): depend $(obj)include/autoconf.mk
|
||||||
$(MAKE) -C $@ all
|
$(MAKE) -C $@ all
|
||||||
|
|
||||||
@@ -346,11 +352,9 @@ $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
|
|||||||
cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
|
cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
|
||||||
|
|
||||||
$(VERSION_FILE):
|
$(VERSION_FILE):
|
||||||
@( echo -n "#define U_BOOT_VERSION \"U-Boot " ; \
|
@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
|
||||||
echo -n "$(U_BOOT_VERSION)" ; \
|
'$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \
|
||||||
echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
|
) > $@.tmp
|
||||||
$(TOPDIR)) ; \
|
|
||||||
echo "\"" ) > $@.tmp
|
|
||||||
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
|
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
|
||||||
|
|
||||||
gdbtools:
|
gdbtools:
|
||||||
@@ -420,13 +424,19 @@ $(obj)System.map: $(obj)u-boot
|
|||||||
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
|
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
|
||||||
# the dep file is only include in this top level makefile to determine when
|
# the dep file is only include in this top level makefile to determine when
|
||||||
# to regenerate the autoconf.mk file.
|
# to regenerate the autoconf.mk file.
|
||||||
$(obj)include/autoconf.mk: $(obj)include/config.h $(VERSION_FILE)
|
$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
|
||||||
@$(XECHO) Generating include/autoconf.mk ; \
|
@$(XECHO) Generating $@ ; \
|
||||||
set -e ; \
|
set -e ; \
|
||||||
: Generate the dependancies ; \
|
: Generate the dependancies ; \
|
||||||
$(CC) -x c -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > $@.dep ; \
|
$(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \
|
||||||
|
-MQ $(obj)include/autoconf.mk include/common.h > $@
|
||||||
|
|
||||||
|
$(obj)include/autoconf.mk: $(obj)include/config.h
|
||||||
|
@$(XECHO) Generating $@ ; \
|
||||||
|
set -e ; \
|
||||||
: Extract the config macros ; \
|
: Extract the config macros ; \
|
||||||
$(CPP) $(CFLAGS) -dM include/common.h | sed -n -f tools/scripts/define2mk.sed > $@
|
$(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
|
||||||
|
sed -n -f tools/scripts/define2mk.sed > $@
|
||||||
|
|
||||||
sinclude $(obj)include/autoconf.mk.dep
|
sinclude $(obj)include/autoconf.mk.dep
|
||||||
|
|
||||||
|
|||||||
5
README
5
README
@@ -623,7 +623,6 @@ The following options need to be configured:
|
|||||||
CONFIG_CMD_SPI * SPI serial bus support
|
CONFIG_CMD_SPI * SPI serial bus support
|
||||||
CONFIG_CMD_USB * USB support
|
CONFIG_CMD_USB * USB support
|
||||||
CONFIG_CMD_VFD * VFD support (TRAB)
|
CONFIG_CMD_VFD * VFD support (TRAB)
|
||||||
CONFIG_CMD_BSP * Board SPecific functions
|
|
||||||
CONFIG_CMD_CDP * Cisco Discover Protocol support
|
CONFIG_CMD_CDP * Cisco Discover Protocol support
|
||||||
CONFIG_CMD_FSL * Microblaze FSL support
|
CONFIG_CMD_FSL * Microblaze FSL support
|
||||||
|
|
||||||
@@ -1561,6 +1560,10 @@ The following options need to be configured:
|
|||||||
before giving up the operation. If not defined, a
|
before giving up the operation. If not defined, a
|
||||||
default value of 5 is used.
|
default value of 5 is used.
|
||||||
|
|
||||||
|
CONFIG_ARP_TIMEOUT
|
||||||
|
|
||||||
|
Timeout waiting for an ARP reply in milliseconds.
|
||||||
|
|
||||||
- Command Interpreter:
|
- Command Interpreter:
|
||||||
CONFIG_AUTO_COMPLETE
|
CONFIG_AUTO_COMPLETE
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#include <environment.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <api_public.h>
|
#include <api_public.h>
|
||||||
|
|
||||||
@@ -40,7 +41,6 @@
|
|||||||
|
|
||||||
/* U-Boot routines needed */
|
/* U-Boot routines needed */
|
||||||
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
|
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
|
||||||
extern uchar *env_get_addr(int);
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
@@ -582,7 +582,7 @@ int syscall(int call, int *retval, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
if (call < 0 || call >= calls_no || calls_table[call] == NULL) {
|
if (call < 0 || call >= calls_no) {
|
||||||
debugf("invalid call #%d\n", call);
|
debugf("invalid call #%d\n", call);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
# MA 02111-1307 USA
|
# MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/textbase.mk
|
sinclude $(OBJTREE)/board/$(BOARDDIR)/textbase.mk
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xFE000000
|
TEXT_BASE = 0xFE000000
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||||
|
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xFFFC0000
|
TEXT_BASE = 0xFFF80000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(debug),1)
|
ifeq ($(debug),1)
|
||||||
|
|||||||
@@ -476,8 +476,37 @@ void ft_board_setup(void *blob, bd_t *bd)
|
|||||||
val[3] = gd->bd->bi_flashsize;
|
val[3] = gd->bd->bi_flashsize;
|
||||||
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
|
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
|
||||||
val, sizeof(val), 1);
|
val, sizeof(val), 1);
|
||||||
if (rc)
|
if (rc) {
|
||||||
printf("Unable to update property NOR mapping, err=%s\n",
|
printf("Unable to update property NOR mapping, err=%s\n",
|
||||||
fdt_strerror(rc));
|
fdt_strerror(rc));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gd->board_type == BOARD_CANYONLANDS_SATA) {
|
||||||
|
/*
|
||||||
|
* When SATA is selected we need to disable the first PCIe
|
||||||
|
* node in the device tree, so that Linux doesn't initialize
|
||||||
|
* it.
|
||||||
|
*/
|
||||||
|
rc = fdt_find_and_setprop(blob, "/plb/pciex@d00000000", "status",
|
||||||
|
"disabled", sizeof("disabled"), 1);
|
||||||
|
if (rc) {
|
||||||
|
printf("Unable to update property status in PCIe node, err=%s\n",
|
||||||
|
fdt_strerror(rc));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gd->board_type == BOARD_CANYONLANDS_PCIE) {
|
||||||
|
/*
|
||||||
|
* When PCIe is selected we need to disable the SATA
|
||||||
|
* node in the device tree, so that Linux doesn't initialize
|
||||||
|
* it.
|
||||||
|
*/
|
||||||
|
rc = fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status",
|
||||||
|
"disabled", sizeof("disabled"), 1);
|
||||||
|
if (rc) {
|
||||||
|
printf("Unable to update property status in PCIe node, err=%s\n",
|
||||||
|
fdt_strerror(rc));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
||||||
|
|||||||
@@ -24,20 +24,12 @@
|
|||||||
# AMCC 460EX/460GT Evaluation Board (Canyonlands) board
|
# AMCC 460EX/460GT Evaluation Board (Canyonlands) board
|
||||||
#
|
#
|
||||||
|
|
||||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
|
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||||
|
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xFFFA0000
|
TEXT_BASE = 0xFFFA0000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_NAND_U_BOOT),y)
|
|
||||||
LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_PCIBOOT_U_BOOT),y)
|
|
||||||
LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
|
|
||||||
endif
|
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += -DCONFIG_440=1
|
PLATFORM_CPPFLAGS += -DCONFIG_440=1
|
||||||
|
|
||||||
ifeq ($(debug),1)
|
ifeq ($(debug),1)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
# AMCC 440SPe Evaluation (Katmai) board
|
# AMCC 440SPe Evaluation (Katmai) board
|
||||||
#
|
#
|
||||||
|
|
||||||
TEXT_BASE = 0xfffc0000
|
TEXT_BASE = 0xFFFA0000
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += -DCONFIG_440=1
|
PLATFORM_CPPFLAGS += -DCONFIG_440=1
|
||||||
|
|
||||||
|
|||||||
@@ -230,14 +230,22 @@ int misc_init_r(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int board_emac_count(void)
|
static int is_405exr(void)
|
||||||
{
|
{
|
||||||
u32 pvr = get_pvr();
|
u32 pvr = get_pvr();
|
||||||
|
|
||||||
|
if (pvr & 0x00000004)
|
||||||
|
return 0; /* bit 2 set -> 405EX */
|
||||||
|
|
||||||
|
return 1; /* bit 2 cleared -> 405EXr */
|
||||||
|
}
|
||||||
|
|
||||||
|
int board_emac_count(void)
|
||||||
|
{
|
||||||
/*
|
/*
|
||||||
* 405EXr only has one EMAC interface, 405EX has two
|
* 405EXr only has one EMAC interface, 405EX has two
|
||||||
*/
|
*/
|
||||||
if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA))
|
if (is_405exr())
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 2;
|
return 2;
|
||||||
@@ -245,12 +253,10 @@ int board_emac_count(void)
|
|||||||
|
|
||||||
static int board_pcie_count(void)
|
static int board_pcie_count(void)
|
||||||
{
|
{
|
||||||
u32 pvr = get_pvr();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 405EXr only has one EMAC interface, 405EX has two
|
* 405EXr only has one EMAC interface, 405EX has two
|
||||||
*/
|
*/
|
||||||
if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA))
|
if (is_405exr())
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 2;
|
return 2;
|
||||||
@@ -259,9 +265,8 @@ static int board_pcie_count(void)
|
|||||||
int checkboard (void)
|
int checkboard (void)
|
||||||
{
|
{
|
||||||
char *s = getenv("serial#");
|
char *s = getenv("serial#");
|
||||||
u32 pvr = get_pvr();
|
|
||||||
|
|
||||||
if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA))
|
if (is_405exr())
|
||||||
printf("Board: Haleakala - AMCC PPC405EXr Evaluation Board");
|
printf("Board: Haleakala - AMCC PPC405EXr Evaluation Board");
|
||||||
else
|
else
|
||||||
printf("Board: Kilauea - AMCC PPC405EX Evaluation Board");
|
printf("Board: Kilauea - AMCC PPC405EX Evaluation Board");
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <spd_sdram.h>
|
#include <spd_sdram.h>
|
||||||
|
#include <libfdt.h>
|
||||||
|
#include <fdt_support.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
@@ -554,3 +556,24 @@ void board_reset(void)
|
|||||||
/* give reset to BCSR */
|
/* give reset to BCSR */
|
||||||
*(unsigned char *)(CFG_BCSR_BASE | 0x06) = 0x09;
|
*(unsigned char *)(CFG_BCSR_BASE | 0x06) = 0x09;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
|
||||||
|
void ft_board_setup(void *blob, bd_t *bd)
|
||||||
|
{
|
||||||
|
u32 val[4];
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
ft_cpu_setup(blob, bd);
|
||||||
|
|
||||||
|
/* Fixup NOR mapping */
|
||||||
|
val[0] = 0; /* chip select number */
|
||||||
|
val[1] = 0; /* always 0 */
|
||||||
|
val[2] = gd->bd->bi_flashstart;
|
||||||
|
val[3] = gd->bd->bi_flashsize;
|
||||||
|
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
|
||||||
|
val, sizeof(val), 1);
|
||||||
|
if (rc)
|
||||||
|
printf("Unable to update property NOR mapping, err=%s\n",
|
||||||
|
fdt_strerror(rc));
|
||||||
|
}
|
||||||
|
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# (C) Copyright 2003-2008
|
# (C) Copyright 2003-2008
|
||||||
# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||||
#
|
#
|
||||||
# See file CREDITS for list of people who contributed to this
|
# See file CREDITS for list of people who contributed to this
|
||||||
# project.
|
# project.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/arch/at91cap9.h>
|
#include <asm/arch/at91cap9.h>
|
||||||
#include <asm/arch/at91cap9_matrix.h>
|
#include <asm/arch/at91cap9_matrix.h>
|
||||||
#include <asm/arch/at91sam926x_mc.h>
|
#include <asm/arch/at91sam9_smc.h>
|
||||||
#include <asm/arch/at91_pmc.h>
|
#include <asm/arch/at91_pmc.h>
|
||||||
#include <asm/arch/at91_rstc.h>
|
#include <asm/arch/at91_rstc.h>
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
|
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* (C) Copyright 2008
|
||||||
|
* Ulf Samuelsson <ulf@atmel.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2002
|
* (C) Copyright 2002
|
||||||
* Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
|
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
* project.
|
* project.
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* (C) Copyright 2008
|
||||||
|
* Ulf Samuelsson <ulf@atmel.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# (C) Copyright 2003-2008
|
# (C) Copyright 2003-2008
|
||||||
# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||||
#
|
#
|
||||||
# See file CREDITS for list of people who contributed to this
|
# See file CREDITS for list of people who contributed to this
|
||||||
# project.
|
# project.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/arch/at91sam9260.h>
|
#include <asm/arch/at91sam9260.h>
|
||||||
#include <asm/arch/at91sam9260_matrix.h>
|
#include <asm/arch/at91sam9260_matrix.h>
|
||||||
#include <asm/arch/at91sam926x_mc.h>
|
#include <asm/arch/at91sam9_smc.h>
|
||||||
#include <asm/arch/at91_pmc.h>
|
#include <asm/arch/at91_pmc.h>
|
||||||
#include <asm/arch/at91_rstc.h>
|
#include <asm/arch/at91_rstc.h>
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
|
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* (C) Copyright 2008
|
||||||
|
* Ulf Samuelsson <ulf@atmel.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2002
|
* (C) Copyright 2002
|
||||||
* Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
|
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
* project.
|
* project.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
# 0x00100000 boot from RAM (for testing only)
|
# 0x00100000 boot from RAM (for testing only)
|
||||||
#
|
#
|
||||||
|
|
||||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
|
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||||
|
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
## Standard: boot high
|
## Standard: boot high
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ int checkboard (void)
|
|||||||
uint pci_slot = get_pci_slot ();
|
uint pci_slot = get_pci_slot ();
|
||||||
|
|
||||||
uint cpu_board_rev = get_cpu_board_revision ();
|
uint cpu_board_rev = get_cpu_board_revision ();
|
||||||
|
uint svr;
|
||||||
|
|
||||||
printf ("Board: CDS Version 0x%02x, PCI Slot %d\n",
|
printf ("Board: CDS Version 0x%02x, PCI Slot %d\n",
|
||||||
get_board_version (), pci_slot);
|
get_board_version (), pci_slot);
|
||||||
@@ -71,11 +72,15 @@ int checkboard (void)
|
|||||||
*/
|
*/
|
||||||
local_bus_init ();
|
local_bus_init ();
|
||||||
|
|
||||||
|
svr = get_svr();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fix CPU2 errata: A core hang possible while executing a
|
* Fix CPU2 errata: A core hang possible while executing a
|
||||||
* msync instruction and a snoopable transaction from an I/O
|
* msync instruction and a snoopable transaction from an I/O
|
||||||
* master tagged to make quick forward progress is present.
|
* master tagged to make quick forward progress is present.
|
||||||
|
* Fixed in Silicon Rev.2.1
|
||||||
*/
|
*/
|
||||||
|
if (!(SVR_MAJ(svr) >= 2 && SVR_MIN(svr) >= 1))
|
||||||
ecm->eebpcr |= (1 << 16);
|
ecm->eebpcr |= (1 << 16);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -22,4 +22,4 @@
|
|||||||
TEXT_BASE = 0xfff00000
|
TEXT_BASE = 0xfff00000
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx=1
|
PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx=1
|
||||||
PLATFORM_CPPFLAGS += -DCONFIG_MPC8610=1 -maltivec -mabi=altivec -msoft-float -O2
|
PLATFORM_CPPFLAGS += -DCONFIG_MPC8610=1 -maltivec -mabi=altivec -msoft-float
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ long int fixed_sdram(void)
|
|||||||
ddr->cs0_bnds = 0x0000001f;
|
ddr->cs0_bnds = 0x0000001f;
|
||||||
ddr->cs0_config = 0x80010202;
|
ddr->cs0_config = 0x80010202;
|
||||||
|
|
||||||
ddr->ext_refrec = 0x00000000;
|
ddr->timing_cfg_3 = 0x00000000;
|
||||||
ddr->timing_cfg_0 = 0x00260802;
|
ddr->timing_cfg_0 = 0x00260802;
|
||||||
ddr->timing_cfg_1 = 0x3935d322;
|
ddr->timing_cfg_1 = 0x3935d322;
|
||||||
ddr->timing_cfg_2 = 0x14904cc8;
|
ddr->timing_cfg_2 = 0x14904cc8;
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ fixed_sdram(void)
|
|||||||
|
|
||||||
ddr->cs0_bnds = CFG_DDR_CS0_BNDS;
|
ddr->cs0_bnds = CFG_DDR_CS0_BNDS;
|
||||||
ddr->cs0_config = CFG_DDR_CS0_CONFIG;
|
ddr->cs0_config = CFG_DDR_CS0_CONFIG;
|
||||||
ddr->ext_refrec = CFG_DDR_EXT_REFRESH;
|
ddr->timing_cfg_3 = CFG_DDR_TIMING_3;
|
||||||
ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
|
ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
|
||||||
ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
|
ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
|
||||||
ddr->timing_cfg_2 = CFG_DDR_TIMING_2;
|
ddr->timing_cfg_2 = CFG_DDR_TIMING_2;
|
||||||
|
|||||||
@@ -23,18 +23,21 @@
|
|||||||
|
|
||||||
include $(TOPDIR)/config.mk
|
include $(TOPDIR)/config.mk
|
||||||
|
|
||||||
LIB = lib$(BOARD).a
|
LIB = $(obj)lib$(BOARD).a
|
||||||
|
|
||||||
OBJS = $(BOARD).o ide.o hwctl.o avr.o
|
OBJS = $(BOARD).o ide.o hwctl.o avr.o
|
||||||
|
|
||||||
$(LIB): .depend $(OBJS) $(SOBJS)
|
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||||
$(AR) crv $@ $(OBJS) $(SOBJS)
|
OBJS := $(addprefix $(obj),$(OBJS))
|
||||||
|
|
||||||
|
$(LIB): $(obj).depend $(OBJS)
|
||||||
|
$(AR) crv $@ $(OBJS)
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
|
# defines $(obj).depend target
|
||||||
$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
|
include $(SRCTREE)/rules.mk
|
||||||
|
|
||||||
sinclude .depend
|
sinclude $(obj).depend
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
# 0x07F00000 boot from RAM
|
# 0x07F00000 boot from RAM
|
||||||
#
|
#
|
||||||
|
|
||||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
|
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||||
|
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
# For flash image - all models
|
# For flash image - all models
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
/*--------------------------------------------------------------*/
|
/*--------------------------------------------------------------*/
|
||||||
static inline void miconCntl_SendUart(unsigned char dat)
|
static inline void miconCntl_SendUart(unsigned char dat)
|
||||||
{
|
{
|
||||||
out_8((char *)AVR_PORT, dat);
|
out_8((unsigned char *)AVR_PORT, dat);
|
||||||
mdelay(1);
|
mdelay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/mmu.h>
|
#include <asm/mmu.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
#include <asm/cache.h>
|
||||||
#include <ppc440.h>
|
#include <ppc440.h>
|
||||||
#include <watchdog.h>
|
#include <watchdog.h>
|
||||||
|
|
||||||
@@ -59,7 +60,6 @@
|
|||||||
extern int denali_wait_for_dlllock(void);
|
extern int denali_wait_for_dlllock(void);
|
||||||
extern void denali_core_search_data_eye(void);
|
extern void denali_core_search_data_eye(void);
|
||||||
extern void dcbz_area(u32 start_address, u32 num_bytes);
|
extern void dcbz_area(u32 start_address, u32 num_bytes);
|
||||||
extern void dflush(void);
|
|
||||||
|
|
||||||
static u32 is_ecc_enabled(void)
|
static u32 is_ecc_enabled(void)
|
||||||
{
|
{
|
||||||
@@ -106,6 +106,7 @@ static void program_ecc(u32 start_address,
|
|||||||
{
|
{
|
||||||
u32 val;
|
u32 val;
|
||||||
u32 current_addr = start_address;
|
u32 current_addr = start_address;
|
||||||
|
u32 size;
|
||||||
int bytes_remaining;
|
int bytes_remaining;
|
||||||
|
|
||||||
sync();
|
sync();
|
||||||
@@ -123,12 +124,18 @@ static void program_ecc(u32 start_address,
|
|||||||
* watchdog.
|
* watchdog.
|
||||||
*/
|
*/
|
||||||
while (bytes_remaining > 0) {
|
while (bytes_remaining > 0) {
|
||||||
dcbz_area(current_addr, min((64 << 20), bytes_remaining));
|
size = min((64 << 20), bytes_remaining);
|
||||||
|
|
||||||
|
/* Write zero's to SDRAM */
|
||||||
|
dcbz_area(current_addr, size);
|
||||||
|
|
||||||
|
/* Write modified dcache lines back to memory */
|
||||||
|
clean_dcache_range(current_addr, current_addr + size);
|
||||||
|
|
||||||
current_addr += 64 << 20;
|
current_addr += 64 << 20;
|
||||||
bytes_remaining -= 64 << 20;
|
bytes_remaining -= 64 << 20;
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
}
|
}
|
||||||
dflush();
|
|
||||||
|
|
||||||
sync();
|
sync();
|
||||||
wait_ddr_idle();
|
wait_ddr_idle();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
# 0xFFF00000 boot high (standard configuration)
|
# 0xFFF00000 boot high (standard configuration)
|
||||||
#
|
#
|
||||||
|
|
||||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
|
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||||
|
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xFFF00000
|
TEXT_BASE = 0xFFF00000
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ lowlevel_init:
|
|||||||
mov r1, #CS4_BASE
|
mov r1, #CS4_BASE
|
||||||
ldrh r1, [r1, #0x2]
|
ldrh r1, [r1, #0x2]
|
||||||
/* Is 27MHz switch set? */
|
/* Is 27MHz switch set? */
|
||||||
ands r1, r1, #0x16
|
ands r1, r1, #0x10
|
||||||
|
|
||||||
/* 532-133-66.5 */
|
/* 532-133-66.5 */
|
||||||
ldr r0, =CCM_BASE
|
ldr r0, =CCM_BASE
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/mmu.h>
|
#include <asm/mmu.h>
|
||||||
|
#include <asm/cache.h>
|
||||||
#include <ppc440.h>
|
#include <ppc440.h>
|
||||||
|
|
||||||
void hcu_led_set(u32 value);
|
void hcu_led_set(u32 value);
|
||||||
void dcbz_area(u32 start_address, u32 num_bytes);
|
void dcbz_area(u32 start_address, u32 num_bytes);
|
||||||
void dflush(void);
|
|
||||||
|
|
||||||
#define DDR_DCR_BASE 0x10
|
#define DDR_DCR_BASE 0x10
|
||||||
#define ddrcfga (DDR_DCR_BASE+0x0) /* DDR configuration address reg */
|
#define ddrcfga (DDR_DCR_BASE+0x0) /* DDR configuration address reg */
|
||||||
@@ -185,14 +185,14 @@ static void program_ecc(unsigned long start_address, unsigned long num_bytes)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
sync();
|
sync();
|
||||||
eieio();
|
|
||||||
|
|
||||||
puts(str);
|
puts(str);
|
||||||
|
|
||||||
/* ECC bit set method for cached memory */
|
/* ECC bit set method for cached memory */
|
||||||
/* Fast method, no noticeable delay */
|
/* Fast method, no noticeable delay */
|
||||||
dcbz_area(start_address, num_bytes);
|
dcbz_area(start_address, num_bytes);
|
||||||
dflush();
|
/* Write modified dcache lines back to memory */
|
||||||
|
clean_dcache_range(start_address, start_address + num_bytes);
|
||||||
blank_string(strlen(str));
|
blank_string(strlen(str));
|
||||||
|
|
||||||
/* Clear error status */
|
/* Clear error status */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
By Vlad Lungu vlad@comsys.ro 2007-Oct-01
|
By Vlad Lungu vlad.lungu@windriver.com 2007-Oct-01
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
Qemu is a full system emulator. See
|
Qemu is a full system emulator. See
|
||||||
|
|
||||||
@@ -9,3 +9,7 @@ Limitations & comments
|
|||||||
Supports the "-m mips" configuration of qemu: serial,NE2000,IDE.
|
Supports the "-m mips" configuration of qemu: serial,NE2000,IDE.
|
||||||
Support is big endian only for now (or at least this is what I tested).
|
Support is big endian only for now (or at least this is what I tested).
|
||||||
Derived from au1x00 with a lot of things cut out.
|
Derived from au1x00 with a lot of things cut out.
|
||||||
|
|
||||||
|
Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with
|
||||||
|
recent qemu versions. When using emulated flash, launch with
|
||||||
|
-pflash <filename> and erase mips_bios.bin.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007
|
* (C) Copyright 2007
|
||||||
* Vlad Lungu vlad@comsys.ro
|
* Vlad Lungu vlad.lungu@windriver.com
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
* project.
|
* project.
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ long int fixed_sdram (void)
|
|||||||
ddr->cs1_config = 0x80010101;
|
ddr->cs1_config = 0x80010101;
|
||||||
ddr->cs2_config = 0x00000000;
|
ddr->cs2_config = 0x00000000;
|
||||||
ddr->cs3_config = 0x00000000;
|
ddr->cs3_config = 0x00000000;
|
||||||
ddr->ext_refrec = 0x00000000;
|
ddr->timing_cfg_3 = 0x00000000;
|
||||||
ddr->timing_cfg_0 = 0x00220802;
|
ddr->timing_cfg_0 = 0x00220802;
|
||||||
ddr->timing_cfg_1 = 0x38377322;
|
ddr->timing_cfg_1 = 0x38377322;
|
||||||
ddr->timing_cfg_2 = 0x0fa044C7;
|
ddr->timing_cfg_2 = 0x0fa044C7;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ long int fixed_sdram (void)
|
|||||||
ddr->cs1_config = CFG_DDR_CS1_CONFIG;
|
ddr->cs1_config = CFG_DDR_CS1_CONFIG;
|
||||||
ddr->cs2_config = CFG_DDR_CS2_CONFIG;
|
ddr->cs2_config = CFG_DDR_CS2_CONFIG;
|
||||||
ddr->cs3_config = CFG_DDR_CS3_CONFIG;
|
ddr->cs3_config = CFG_DDR_CS3_CONFIG;
|
||||||
ddr->ext_refrec = CFG_DDR_EXT_REFRESH;
|
ddr->timing_cfg_3 = CFG_DDR_TIMING_3;
|
||||||
ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
|
ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
|
||||||
ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
|
ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
|
||||||
ddr->timing_cfg_2 = CFG_DDR_TIMING_2;
|
ddr->timing_cfg_2 = CFG_DDR_TIMING_2;
|
||||||
@@ -166,7 +166,7 @@ long int fixed_sdram (void)
|
|||||||
ddr->cs1_config = CFG_DDR2_CS1_CONFIG;
|
ddr->cs1_config = CFG_DDR2_CS1_CONFIG;
|
||||||
ddr->cs2_config = CFG_DDR2_CS2_CONFIG;
|
ddr->cs2_config = CFG_DDR2_CS2_CONFIG;
|
||||||
ddr->cs3_config = CFG_DDR2_CS3_CONFIG;
|
ddr->cs3_config = CFG_DDR2_CS3_CONFIG;
|
||||||
ddr->ext_refrec = CFG_DDR2_EXT_REFRESH;
|
ddr->timing_cfg_3 = CFG_DDR2_EXT_REFRESH;
|
||||||
ddr->timing_cfg_0 = CFG_DDR2_TIMING_0;
|
ddr->timing_cfg_0 = CFG_DDR2_TIMING_0;
|
||||||
ddr->timing_cfg_1 = CFG_DDR2_TIMING_1;
|
ddr->timing_cfg_1 = CFG_DDR2_TIMING_1;
|
||||||
ddr->timing_cfg_2 = CFG_DDR2_TIMING_2;
|
ddr->timing_cfg_2 = CFG_DDR2_TIMING_2;
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ done: movb $0x88, %al
|
|||||||
jmp *%ebp /* return to caller */
|
jmp *%ebp /* return to caller */
|
||||||
|
|
||||||
|
|
||||||
.globl __show_boot_progress
|
.globl show_boot_progress
|
||||||
__show_boot_progress:
|
show_boot_progress:
|
||||||
out %al, $0x80
|
out %al, $0x80
|
||||||
xchg %al, %ah
|
xchg %al, %ah
|
||||||
movw $0x680, %dx
|
movw $0x680, %dx
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
|
|||||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||||
|
|
||||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(SOBJS) $(OBJS)
|
rm -f $(SOBJS) $(OBJS)
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
#define PROBE_BUFFER_SIZE 1024
|
#define PROBE_BUFFER_SIZE 1024
|
||||||
static unsigned char buffer[PROBE_BUFFER_SIZE];
|
static unsigned char buffer[PROBE_BUFFER_SIZE];
|
||||||
|
|
||||||
|
|
||||||
#define SC520_MAX_FLASH_BANKS 1
|
#define SC520_MAX_FLASH_BANKS 1
|
||||||
#define SC520_FLASH_BANK0_BASE 0x38000000 /* BOOTCS */
|
#define SC520_FLASH_BANK0_BASE 0x38000000 /* BOOTCS */
|
||||||
#define SC520_FLASH_BANKSIZE 0x8000000
|
#define SC520_FLASH_BANKSIZE 0x8000000
|
||||||
@@ -62,7 +61,6 @@ flash_info_t flash_info[SC520_MAX_FLASH_BANKS];
|
|||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static u32 _probe_flash(u32 addr, u32 bw, int il)
|
static u32 _probe_flash(u32 addr, u32 bw, int il)
|
||||||
{
|
{
|
||||||
u32 result=0;
|
u32 result=0;
|
||||||
@@ -180,7 +178,6 @@ static u32 _probe_flash(u32 addr, u32 bw, int il)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,11 +212,9 @@ static int identify_flash(unsigned address, int width)
|
|||||||
enable_interrupts();
|
enable_interrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vendor = res >> 16;
|
vendor = res >> 16;
|
||||||
device = res & 0xffff;
|
device = res & 0xffff;
|
||||||
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,7 +380,6 @@ void flash_print_info(flash_info_t *info)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
printf(" Size: %ld MB in %d Sectors\n",
|
printf(" Size: %ld MB in %d Sectors\n",
|
||||||
info->size >> 20, info->sector_count);
|
info->size >> 20, info->sector_count);
|
||||||
|
|
||||||
@@ -399,13 +393,13 @@ void flash_print_info(flash_info_t *info)
|
|||||||
}
|
}
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static u32 _amd_erase_flash(u32 addr, u32 sector)
|
static u32 _amd_erase_flash(u32 addr, u32 sector)
|
||||||
{
|
{
|
||||||
unsigned elapsed;
|
unsigned elapsed;
|
||||||
@@ -467,7 +461,6 @@ static u32 _intel_erase_flash(u32 addr, u32 sector)
|
|||||||
*(volatile u16*)(addr + sector) = 0x0020; /* erase setup */
|
*(volatile u16*)(addr + sector) = 0x0020; /* erase setup */
|
||||||
*(volatile u16*)(addr + sector) = 0x00D0; /* erase confirm */
|
*(volatile u16*)(addr + sector) = 0x00D0; /* erase confirm */
|
||||||
|
|
||||||
|
|
||||||
/* Wait at least 80us - let's wait 1 ms */
|
/* Wait at least 80us - let's wait 1 ms */
|
||||||
__udelay(1000);
|
__udelay(1000);
|
||||||
|
|
||||||
@@ -486,7 +479,6 @@ static u32 _intel_erase_flash(u32 addr, u32 sector)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern int _intel_erase_flash_end;
|
extern int _intel_erase_flash_end;
|
||||||
asm ("_intel_erase_flash_end:\n"
|
asm ("_intel_erase_flash_end:\n"
|
||||||
".long 0\n");
|
".long 0\n");
|
||||||
@@ -548,7 +540,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
|
|||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Start erase on unprotected sectors */
|
/* Start erase on unprotected sectors */
|
||||||
for (sect = s_first; sect<=s_last; sect++) {
|
for (sect = s_first; sect<=s_last; sect++) {
|
||||||
|
|
||||||
@@ -566,7 +557,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
|
|||||||
enable_interrupts();
|
enable_interrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
printf("Erase timed out, sector %d\n", sect);
|
printf("Erase timed out, sector %d\n", sect);
|
||||||
return res;
|
return res;
|
||||||
@@ -576,7 +566,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -586,11 +575,11 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
|
|||||||
* 1 - write timeout
|
* 1 - write timeout
|
||||||
* 2 - Flash not erased
|
* 2 - Flash not erased
|
||||||
*/
|
*/
|
||||||
static int _amd_write_word(unsigned start, unsigned dest, unsigned data)
|
static int _amd_write_word(unsigned start, unsigned dest, u16 data)
|
||||||
{
|
{
|
||||||
volatile u16 *addr2 = (u16*)start;
|
volatile u16 *addr2 = (volatile u16*)start;
|
||||||
volatile u16 *dest2 = (u16*)dest;
|
volatile u16 *dest2 = (volatile u16*)dest;
|
||||||
volatile u16 *data2 = (u16*)&data;
|
volatile u16 *data2 = (volatile u16*)&data;
|
||||||
int i;
|
int i;
|
||||||
unsigned elapsed;
|
unsigned elapsed;
|
||||||
|
|
||||||
@@ -601,7 +590,6 @@ static int _amd_write_word(unsigned start, unsigned dest, unsigned data)
|
|||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
|
|
||||||
|
|
||||||
addr2[0x5555] = 0x00AA;
|
addr2[0x5555] = 0x00AA;
|
||||||
addr2[0x2aaa] = 0x0055;
|
addr2[0x2aaa] = 0x0055;
|
||||||
addr2[0x5555] = 0x00A0;
|
addr2[0x5555] = 0x00A0;
|
||||||
@@ -630,7 +618,6 @@ extern int _amd_write_word_end;
|
|||||||
asm ("_amd_write_word_end:\n"
|
asm ("_amd_write_word_end:\n"
|
||||||
".long 0\n");
|
".long 0\n");
|
||||||
|
|
||||||
|
|
||||||
static int _intel_write_word(unsigned start, unsigned dest, unsigned data)
|
static int _intel_write_word(unsigned start, unsigned dest, unsigned data)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -663,14 +650,12 @@ static int _intel_write_word(unsigned start, unsigned dest, unsigned data)
|
|||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int _intel_write_word_end;
|
extern int _intel_write_word_end;
|
||||||
asm ("_intel_write_word_end:\n"
|
asm ("_intel_write_word_end:\n"
|
||||||
".long 0\n");
|
".long 0\n");
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Copy memory to flash, returns:
|
* Copy memory to flash, returns:
|
||||||
* 0 - OK
|
* 0 - OK
|
||||||
@@ -715,10 +700,8 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wp = (addr & ~3); /* get lower word aligned address */
|
wp = (addr & ~3); /* get lower word aligned address */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* handle unaligned start bytes
|
* handle unaligned start bytes
|
||||||
*/
|
*/
|
||||||
@@ -805,5 +788,4 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ done: movl $0xfffefc32,%edx
|
|||||||
jmp *%ebp /* return to caller */
|
jmp *%ebp /* return to caller */
|
||||||
|
|
||||||
|
|
||||||
.globl __show_boot_progress
|
.globl show_boot_progress
|
||||||
__show_boot_progress:
|
show_boot_progress:
|
||||||
movl $0xfffefc32,%edx
|
movl $0xfffefc32,%edx
|
||||||
xorw $0xffff, %ax
|
xorw $0xffff, %ax
|
||||||
movw %ax,(%edx)
|
movw %ax,(%edx)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# (C) Copyright 2001
|
# (C) Copyright 2001-2008
|
||||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||||
#
|
#
|
||||||
# See file CREDITS for list of people who contributed to this
|
# See file CREDITS for list of people who contributed to this
|
||||||
@@ -22,19 +22,26 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
include $(TOPDIR)/config.mk
|
include $(TOPDIR)/config.mk
|
||||||
|
ifneq ($(OBJTREE),$(SRCTREE))
|
||||||
|
$(shell mkdir -p $(obj)../tqm8xx/)
|
||||||
|
endif
|
||||||
|
|
||||||
LIB = lib$(BOARD).a
|
LIB = $(obj)lib$(BOARD).a
|
||||||
|
|
||||||
OBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o
|
COBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o
|
||||||
|
|
||||||
$(LIB): .depend $(OBJS)
|
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||||
$(AR) crv $@ $(OBJS)
|
OBJS := $(addprefix $(obj),$(COBJS))
|
||||||
|
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||||
|
|
||||||
|
$(LIB): $(obj).depend $(OBJS)
|
||||||
|
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
|
# defines $(obj).depend target
|
||||||
$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
|
include $(SRCTREE)/rules.mk
|
||||||
|
|
||||||
sinclude .depend
|
sinclude $(obj).depend
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
|
||||||
static unsigned char srom[128];
|
|
||||||
extern u16 read_srom_word(int);
|
extern u16 read_srom_word(int);
|
||||||
extern void write_srom_word(int offset, u16 val);
|
extern void write_srom_word(int offset, u16 val);
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
# MarelV38B board
|
# MarelV38B board
|
||||||
#
|
#
|
||||||
|
|
||||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
|
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||||
|
|
||||||
TEXT_BASE = 0xFF000000
|
TEXT_BASE = 0xFF000000
|
||||||
|
|
||||||
|
|||||||
@@ -433,17 +433,6 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify)
|
|||||||
}
|
}
|
||||||
show_boot_progress (105);
|
show_boot_progress (105);
|
||||||
|
|
||||||
#ifdef CONFIG_LOGBUFFER
|
|
||||||
#ifndef CONFIG_ALT_LB_ADDR
|
|
||||||
kbd=gd->bd;
|
|
||||||
/* Prevent initrd from overwriting logbuffer */
|
|
||||||
if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
|
|
||||||
initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
|
|
||||||
debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
|
|
||||||
#else
|
|
||||||
debug ("## Logbuffer at 0x%08lX ", CONFIG_ALT_LB_ADDR);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
if (!fit_image_check_target_arch (fit, os_noffset)) {
|
if (!fit_image_check_target_arch (fit, os_noffset)) {
|
||||||
puts ("Unsupported Architecture\n");
|
puts ("Unsupported Architecture\n");
|
||||||
show_boot_progress (-105);
|
show_boot_progress (-105);
|
||||||
|
|||||||
@@ -52,10 +52,6 @@
|
|||||||
# include <status_led.h>
|
# include <status_led.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __PPC__
|
|
||||||
#include <asm/io.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_IDE_8xx_DIRECT
|
#ifdef CONFIG_IDE_8xx_DIRECT
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
#endif
|
#endif
|
||||||
@@ -1264,7 +1260,7 @@ ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
|
|||||||
#ifdef CONFIG_LBA48
|
#ifdef CONFIG_LBA48
|
||||||
unsigned char lba48 = 0;
|
unsigned char lba48 = 0;
|
||||||
|
|
||||||
if (blknr & 0x0000fffff0000000) {
|
if (blknr & 0x0000fffff0000000ULL) {
|
||||||
/* more than 28 bits used, use 48bit mode */
|
/* more than 28 bits used, use 48bit mode */
|
||||||
lba48 = 1;
|
lba48 = 1;
|
||||||
}
|
}
|
||||||
@@ -1318,8 +1314,13 @@ ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
|
|||||||
/* write high bits */
|
/* write high bits */
|
||||||
ide_outb (device, ATA_SECT_CNT, 0);
|
ide_outb (device, ATA_SECT_CNT, 0);
|
||||||
ide_outb (device, ATA_LBA_LOW, (blknr >> 24) & 0xFF);
|
ide_outb (device, ATA_LBA_LOW, (blknr >> 24) & 0xFF);
|
||||||
|
#ifdef CFG_64BIT_LBA
|
||||||
ide_outb (device, ATA_LBA_MID, (blknr >> 32) & 0xFF);
|
ide_outb (device, ATA_LBA_MID, (blknr >> 32) & 0xFF);
|
||||||
ide_outb (device, ATA_LBA_HIGH, (blknr >> 40) & 0xFF);
|
ide_outb (device, ATA_LBA_HIGH, (blknr >> 40) & 0xFF);
|
||||||
|
#else
|
||||||
|
ide_outb (device, ATA_LBA_MID, 0);
|
||||||
|
ide_outb (device, ATA_LBA_HIGH, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ide_outb (device, ATA_SECT_CNT, 1);
|
ide_outb (device, ATA_SECT_CNT, 1);
|
||||||
@@ -1383,7 +1384,7 @@ ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
|
|||||||
#ifdef CONFIG_LBA48
|
#ifdef CONFIG_LBA48
|
||||||
unsigned char lba48 = 0;
|
unsigned char lba48 = 0;
|
||||||
|
|
||||||
if (blknr & 0x0000fffff0000000) {
|
if (blknr & 0x0000fffff0000000ULL) {
|
||||||
/* more than 28 bits used, use 48bit mode */
|
/* more than 28 bits used, use 48bit mode */
|
||||||
lba48 = 1;
|
lba48 = 1;
|
||||||
}
|
}
|
||||||
@@ -1408,8 +1409,13 @@ ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
|
|||||||
/* write high bits */
|
/* write high bits */
|
||||||
ide_outb (device, ATA_SECT_CNT, 0);
|
ide_outb (device, ATA_SECT_CNT, 0);
|
||||||
ide_outb (device, ATA_LBA_LOW, (blknr >> 24) & 0xFF);
|
ide_outb (device, ATA_LBA_LOW, (blknr >> 24) & 0xFF);
|
||||||
|
#ifdef CFG_64BIT_LBA
|
||||||
ide_outb (device, ATA_LBA_MID, (blknr >> 32) & 0xFF);
|
ide_outb (device, ATA_LBA_MID, (blknr >> 32) & 0xFF);
|
||||||
ide_outb (device, ATA_LBA_HIGH, (blknr >> 40) & 0xFF);
|
ide_outb (device, ATA_LBA_HIGH, (blknr >> 40) & 0xFF);
|
||||||
|
#else
|
||||||
|
ide_outb (device, ATA_LBA_MID, 0);
|
||||||
|
ide_outb (device, ATA_LBA_HIGH, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ide_outb (device, ATA_SECT_CNT, 1);
|
ide_outb (device, ATA_SECT_CNT, 1);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ static inline int str2long(char *p, ulong *num)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
|
arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size)
|
||||||
{
|
{
|
||||||
int idx = nand_curr_device;
|
int idx = nand_curr_device;
|
||||||
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
|
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
|
||||||
@@ -110,7 +110,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
|
|||||||
}
|
}
|
||||||
*off = part->offset;
|
*off = part->offset;
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
if (!(str2long(argv[1], size))) {
|
if (!(str2long(argv[1], (ulong *)size))) {
|
||||||
printf("'%s' is not a number\n", argv[1]);
|
printf("'%s' is not a number\n", argv[1]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
if (!(str2long(argv[1], size))) {
|
if (!(str2long(argv[1], (ulong *)size))) {
|
||||||
printf("'%s' is not a number\n", argv[1]);
|
printf("'%s' is not a number\n", argv[1]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,8 @@ out:
|
|||||||
int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i, dev, ret;
|
int i, dev, ret;
|
||||||
ulong addr, off, size;
|
ulong addr, off;
|
||||||
|
size_t size;
|
||||||
char *cmd, *s;
|
char *cmd, *s;
|
||||||
nand_info_t *nand;
|
nand_info_t *nand;
|
||||||
#ifdef CFG_NAND_QUIET
|
#ifdef CFG_NAND_QUIET
|
||||||
@@ -350,10 +351,10 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||||||
} else if (s != NULL && !strcmp(s, ".oob")) {
|
} else if (s != NULL && !strcmp(s, ".oob")) {
|
||||||
/* read out-of-band data */
|
/* read out-of-band data */
|
||||||
if (read)
|
if (read)
|
||||||
ret = nand->read_oob(nand, off, size, (size_t *) &size,
|
ret = nand->read_oob(nand, off, size, &size,
|
||||||
(u_char *) addr);
|
(u_char *) addr);
|
||||||
else
|
else
|
||||||
ret = nand->write_oob(nand, off, size, (size_t *) &size,
|
ret = nand->write_oob(nand, off, size, &size,
|
||||||
(u_char *) addr);
|
(u_char *) addr);
|
||||||
} else {
|
} else {
|
||||||
if (read)
|
if (read)
|
||||||
@@ -481,7 +482,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
char *ep, *s;
|
char *ep, *s;
|
||||||
ulong cnt;
|
size_t cnt;
|
||||||
image_header_t *hdr;
|
image_header_t *hdr;
|
||||||
int jffs2 = 0;
|
int jffs2 = 0;
|
||||||
#if defined(CONFIG_FIT)
|
#if defined(CONFIG_FIT)
|
||||||
@@ -840,22 +841,23 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||||||
if (strncmp (argv[1], "read", 4) == 0 ||
|
if (strncmp (argv[1], "read", 4) == 0 ||
|
||||||
strncmp (argv[1], "write", 5) == 0) {
|
strncmp (argv[1], "write", 5) == 0) {
|
||||||
ulong addr = simple_strtoul (argv[2], NULL, 16);
|
ulong addr = simple_strtoul (argv[2], NULL, 16);
|
||||||
ulong off = simple_strtoul (argv[3], NULL, 16);
|
off_t off = simple_strtoul (argv[3], NULL, 16);
|
||||||
ulong size = simple_strtoul (argv[4], NULL, 16);
|
size_t size = simple_strtoul (argv[4], NULL, 16);
|
||||||
int cmd = (strncmp (argv[1], "read", 4) == 0) ?
|
int cmd = (strncmp (argv[1], "read", 4) == 0) ?
|
||||||
NANDRW_READ : NANDRW_WRITE;
|
NANDRW_READ : NANDRW_WRITE;
|
||||||
int ret, total;
|
size_t total;
|
||||||
|
int ret;
|
||||||
char *cmdtail = strchr (argv[1], '.');
|
char *cmdtail = strchr (argv[1], '.');
|
||||||
|
|
||||||
if (cmdtail && !strncmp (cmdtail, ".oob", 2)) {
|
if (cmdtail && !strncmp (cmdtail, ".oob", 2)) {
|
||||||
/* read out-of-band data */
|
/* read out-of-band data */
|
||||||
if (cmd & NANDRW_READ) {
|
if (cmd & NANDRW_READ) {
|
||||||
ret = nand_read_oob (nand_dev_desc + curr_device,
|
ret = nand_read_oob (nand_dev_desc + curr_device,
|
||||||
off, size, (size_t *) & total,
|
off, size, &total,
|
||||||
(u_char *) addr);
|
(u_char *) addr);
|
||||||
} else {
|
} else {
|
||||||
ret = nand_write_oob (nand_dev_desc + curr_device,
|
ret = nand_write_oob (nand_dev_desc + curr_device,
|
||||||
off, size, (size_t *) & total,
|
off, size, &total,
|
||||||
(u_char *) addr);
|
(u_char *) addr);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -891,7 +893,7 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||||||
|
|
||||||
ret = nand_legacy_rw (nand_dev_desc + curr_device,
|
ret = nand_legacy_rw (nand_dev_desc + curr_device,
|
||||||
cmd, off, size,
|
cmd, off, size,
|
||||||
(size_t *) & total,
|
&total,
|
||||||
(u_char *) addr);
|
(u_char *) addr);
|
||||||
|
|
||||||
printf (" %d bytes %s: %s\n", total,
|
printf (" %d bytes %s: %s\n", total,
|
||||||
|
|||||||
@@ -68,16 +68,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
/* Function that returns a pointer to a value from the environment */
|
|
||||||
/* (Only memory version supported / needed). */
|
|
||||||
extern uchar *env_get_addr(int);
|
|
||||||
|
|
||||||
/* Function that updates CRC of the enironment */
|
|
||||||
extern void env_crc_update (void);
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Table with supported baudrates (defined in config_xyz.h)
|
* Table with supported baudrates (defined in config_xyz.h)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ extern void env_relocate_spec (void);
|
|||||||
extern uchar env_get_char_spec(int);
|
extern uchar env_get_char_spec(int);
|
||||||
|
|
||||||
static uchar env_get_char_init (int index);
|
static uchar env_get_char_init (int index);
|
||||||
|
uchar (*env_get_char)(int) = env_get_char_init;
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Default settings to be used when no valid environment is found
|
* Default settings to be used when no valid environment is found
|
||||||
@@ -181,19 +182,6 @@ uchar env_get_char_memory (int index)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uchar env_get_char (int index)
|
|
||||||
{
|
|
||||||
uchar c;
|
|
||||||
|
|
||||||
/* if relocated to RAM */
|
|
||||||
if (gd->flags & GD_FLG_RELOC)
|
|
||||||
c = env_get_char_memory(index);
|
|
||||||
else
|
|
||||||
c = env_get_char_init(index);
|
|
||||||
|
|
||||||
return (c);
|
|
||||||
}
|
|
||||||
|
|
||||||
uchar *env_get_addr (int index)
|
uchar *env_get_addr (int index)
|
||||||
{
|
{
|
||||||
if (gd->env_valid) {
|
if (gd->env_valid) {
|
||||||
@@ -227,6 +215,11 @@ void env_relocate (void)
|
|||||||
DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
|
DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* After relocation to RAM, we can always use the "memory" functions
|
||||||
|
*/
|
||||||
|
env_get_char = env_get_char_memory;
|
||||||
|
|
||||||
if (gd->env_valid == 0) {
|
if (gd->env_valid == 0) {
|
||||||
#if defined(CONFIG_GTH) || defined(CFG_ENV_IS_NOWHERE) /* Environment not changable */
|
#if defined(CONFIG_GTH) || defined(CFG_ENV_IS_NOWHERE) /* Environment not changable */
|
||||||
puts ("Using default environment\n\n");
|
puts ("Using default environment\n\n");
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ env_t *env_ptr = NULL;
|
|||||||
|
|
||||||
char * env_name_spec = "EEPROM";
|
char * env_name_spec = "EEPROM";
|
||||||
|
|
||||||
extern uchar env_get_char_memory (int index);
|
|
||||||
|
|
||||||
|
|
||||||
uchar env_get_char_spec (int index)
|
uchar env_get_char_spec (int index)
|
||||||
{
|
{
|
||||||
uchar c;
|
uchar c;
|
||||||
|
|||||||
@@ -378,7 +378,9 @@ void env_relocate_spec (void)
|
|||||||
puts ("*** Warning - some problems detected "
|
puts ("*** Warning - some problems detected "
|
||||||
"reading environment; recovered successfully\n\n");
|
"reading environment; recovered successfully\n\n");
|
||||||
#endif /* CFG_ENV_ADDR_REDUND */
|
#endif /* CFG_ENV_ADDR_REDUND */
|
||||||
|
#ifdef CMD_SAVEENV
|
||||||
memcpy (env_ptr, (void*)flash_addr, CFG_ENV_SIZE);
|
memcpy (env_ptr, (void*)flash_addr, CFG_ENV_SIZE);
|
||||||
|
#endif
|
||||||
#endif /* ! ENV_IS_EMBEDDED || CFG_ENV_ADDR_REDUND */
|
#endif /* ! ENV_IS_EMBEDDED || CFG_ENV_ADDR_REDUND */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ uchar env_get_char_spec (int index)
|
|||||||
int env_init(void)
|
int env_init(void)
|
||||||
{
|
{
|
||||||
#if defined(ENV_IS_EMBEDDED)
|
#if defined(ENV_IS_EMBEDDED)
|
||||||
ulong total;
|
size_t total;
|
||||||
int crc1_ok = 0, crc2_ok = 0;
|
int crc1_ok = 0, crc2_ok = 0;
|
||||||
env_t *tmp_env1, *tmp_env2;
|
env_t *tmp_env1, *tmp_env2;
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ int env_init(void)
|
|||||||
#ifdef CFG_ENV_OFFSET_REDUND
|
#ifdef CFG_ENV_OFFSET_REDUND
|
||||||
int saveenv(void)
|
int saveenv(void)
|
||||||
{
|
{
|
||||||
ulong total;
|
size_t total;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
env_ptr->flags++;
|
env_ptr->flags++;
|
||||||
@@ -188,7 +188,7 @@ int saveenv(void)
|
|||||||
#else /* ! CFG_ENV_OFFSET_REDUND */
|
#else /* ! CFG_ENV_OFFSET_REDUND */
|
||||||
int saveenv(void)
|
int saveenv(void)
|
||||||
{
|
{
|
||||||
ulong total;
|
size_t total;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
puts ("Erasing Nand...");
|
puts ("Erasing Nand...");
|
||||||
@@ -211,7 +211,7 @@ int saveenv(void)
|
|||||||
void env_relocate_spec (void)
|
void env_relocate_spec (void)
|
||||||
{
|
{
|
||||||
#if !defined(ENV_IS_EMBEDDED)
|
#if !defined(ENV_IS_EMBEDDED)
|
||||||
ulong total;
|
size_t total;
|
||||||
int crc1_ok = 0, crc2_ok = 0;
|
int crc1_ok = 0, crc2_ok = 0;
|
||||||
env_t *tmp_env1, *tmp_env2;
|
env_t *tmp_env1, *tmp_env2;
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ void env_relocate_spec (void)
|
|||||||
void env_relocate_spec (void)
|
void env_relocate_spec (void)
|
||||||
{
|
{
|
||||||
#if !defined(ENV_IS_EMBEDDED)
|
#if !defined(ENV_IS_EMBEDDED)
|
||||||
ulong total;
|
size_t total;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
total = CFG_ENV_SIZE;
|
total = CFG_ENV_SIZE;
|
||||||
|
|||||||
@@ -63,8 +63,6 @@ char * env_name_spec = "NVRAM";
|
|||||||
extern uchar default_environment[];
|
extern uchar default_environment[];
|
||||||
extern int default_environment_size;
|
extern int default_environment_size;
|
||||||
|
|
||||||
extern uchar env_get_char_memory (int index);
|
|
||||||
|
|
||||||
#ifdef CONFIG_AMIGAONEG3SE
|
#ifdef CONFIG_AMIGAONEG3SE
|
||||||
uchar env_get_char_spec (int index)
|
uchar env_get_char_spec (int index)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -396,7 +396,6 @@ void *ft_get_prop(void *bphp, const char *propname, int *szp)
|
|||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end)
|
void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end)
|
||||||
{
|
{
|
||||||
u32 *p;
|
u32 *p;
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef USE_HOSTCC
|
#ifndef USE_HOSTCC
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <watchdog.h>
|
#include <watchdog.h>
|
||||||
@@ -36,10 +35,6 @@
|
|||||||
#include <dataflash.h>
|
#include <dataflash.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LOGBUFFER
|
|
||||||
#include <logbuff.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
|
#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
|
||||||
#include <rtc.h>
|
#include <rtc.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -93,6 +88,7 @@ static table_entry_t uimage_arch[] = {
|
|||||||
{ IH_ARCH_MIPS64, "mips64", "MIPS 64 Bit", },
|
{ IH_ARCH_MIPS64, "mips64", "MIPS 64 Bit", },
|
||||||
{ IH_ARCH_NIOS, "nios", "NIOS", },
|
{ IH_ARCH_NIOS, "nios", "NIOS", },
|
||||||
{ IH_ARCH_NIOS2, "nios2", "NIOS II", },
|
{ IH_ARCH_NIOS2, "nios2", "NIOS II", },
|
||||||
|
{ IH_ARCH_PPC, "powerpc", "PowerPC", },
|
||||||
{ IH_ARCH_PPC, "ppc", "PowerPC", },
|
{ IH_ARCH_PPC, "ppc", "PowerPC", },
|
||||||
{ IH_ARCH_S390, "s390", "IBM S390", },
|
{ IH_ARCH_S390, "s390", "IBM S390", },
|
||||||
{ IH_ARCH_SH, "sh", "SuperH", },
|
{ IH_ARCH_SH, "sh", "SuperH", },
|
||||||
@@ -241,7 +237,7 @@ void image_multi_getimg (image_header_t *hdr, ulong idx,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint32_t *size;
|
uint32_t *size;
|
||||||
ulong offset, tail, count, img_data;
|
ulong offset, count, img_data;
|
||||||
|
|
||||||
/* get number of component */
|
/* get number of component */
|
||||||
count = image_multi_count (hdr);
|
count = image_multi_count (hdr);
|
||||||
@@ -257,19 +253,15 @@ void image_multi_getimg (image_header_t *hdr, ulong idx,
|
|||||||
if (idx < count) {
|
if (idx < count) {
|
||||||
*len = uimage_to_cpu (size[idx]);
|
*len = uimage_to_cpu (size[idx]);
|
||||||
offset = 0;
|
offset = 0;
|
||||||
tail = 0;
|
|
||||||
|
|
||||||
/* go over all indices preceding requested component idx */
|
/* go over all indices preceding requested component idx */
|
||||||
for (i = 0; i < idx; i++) {
|
for (i = 0; i < idx; i++) {
|
||||||
/* add up i-th component size */
|
/* add up i-th component size, rounding up to 4 bytes */
|
||||||
offset += uimage_to_cpu (size[i]);
|
offset += (uimage_to_cpu (size[i]) + 3) & ~3 ;
|
||||||
|
|
||||||
/* add up alignment for i-th component */
|
|
||||||
tail += (4 - uimage_to_cpu (size[i]) % 4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate idx-th component data address */
|
/* calculate idx-th component data address */
|
||||||
*data = img_data + offset + tail;
|
*data = img_data + offset;
|
||||||
} else {
|
} else {
|
||||||
*len = 0;
|
*len = 0;
|
||||||
*data = 0;
|
*data = 0;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include <post.h>
|
#include <post.h>
|
||||||
|
|
||||||
#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST)
|
#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING)
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -67,11 +67,9 @@ static int abortboot(int);
|
|||||||
|
|
||||||
char console_buffer[CFG_CBSIZE]; /* console I/O buffer */
|
char console_buffer[CFG_CBSIZE]; /* console I/O buffer */
|
||||||
|
|
||||||
#ifndef CONFIG_CMDLINE_EDITING
|
|
||||||
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen);
|
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen);
|
||||||
static char erase_seq[] = "\b \b"; /* erase sequence */
|
static char erase_seq[] = "\b \b"; /* erase sequence */
|
||||||
static char tab_seq[] = " "; /* used to expand TABs */
|
static char tab_seq[] = " "; /* used to expand TABs */
|
||||||
#endif /* CONFIG_CMDLINE_EDITING */
|
|
||||||
|
|
||||||
#ifdef CONFIG_BOOT_RETRY_TIME
|
#ifdef CONFIG_BOOT_RETRY_TIME
|
||||||
static uint64_t endtime = 0; /* must be set, default is instant timeout */
|
static uint64_t endtime = 0; /* must be set, default is instant timeout */
|
||||||
@@ -947,11 +945,26 @@ int readline_into_buffer (const char *const prompt, char * buffer)
|
|||||||
initted = 1;
|
initted = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* History uses a global array which is not
|
||||||
|
* writable until after relocation to RAM.
|
||||||
|
* Revert to non-history version if still
|
||||||
|
* running from flash.
|
||||||
|
*/
|
||||||
|
if (gd->flags & GD_FLG_RELOC) {
|
||||||
|
if (!initted) {
|
||||||
|
hist_init();
|
||||||
|
initted = 1;
|
||||||
|
}
|
||||||
|
|
||||||
puts (prompt);
|
puts (prompt);
|
||||||
|
|
||||||
rc = cread_line(prompt, p, &len);
|
rc = cread_line(prompt, p, &len);
|
||||||
return rc < 0 ? rc : len;
|
return rc < 0 ? rc : len;
|
||||||
#else
|
|
||||||
|
} else {
|
||||||
|
#endif /* CONFIG_CMDLINE_EDITING */
|
||||||
char * p_buf = p;
|
char * p_buf = p;
|
||||||
int n = 0; /* buffer index */
|
int n = 0; /* buffer index */
|
||||||
int plen = 0; /* prompt length */
|
int plen = 0; /* prompt length */
|
||||||
@@ -1047,12 +1060,13 @@ int readline_into_buffer (const char *const prompt, char * buffer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_CMDLINE_EDITING */
|
#ifdef CONFIG_CMDLINE_EDITING
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_CMDLINE_EDITING
|
|
||||||
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen)
|
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
@@ -1082,7 +1096,6 @@ static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen)
|
|||||||
(*np)--;
|
(*np)--;
|
||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_CMDLINE_EDITING */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
|||||||
46
config.mk
46
config.mk
@@ -69,27 +69,6 @@ PLATFORM_CPPFLAGS+= -D__ARM__
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Load generated board configuration
|
|
||||||
sinclude $(OBJTREE)/include/autoconf.mk
|
|
||||||
|
|
||||||
ifdef ARCH
|
|
||||||
sinclude $(TOPDIR)/$(ARCH)_config.mk # include architecture dependend rules
|
|
||||||
endif
|
|
||||||
ifdef CPU
|
|
||||||
sinclude $(TOPDIR)/cpu/$(CPU)/config.mk # include CPU specific rules
|
|
||||||
endif
|
|
||||||
ifdef SOC
|
|
||||||
sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include SoC specific rules
|
|
||||||
endif
|
|
||||||
ifdef VENDOR
|
|
||||||
BOARDDIR = $(VENDOR)/$(BOARD)
|
|
||||||
else
|
|
||||||
BOARDDIR = $(BOARD)
|
|
||||||
endif
|
|
||||||
ifdef BOARD
|
|
||||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
|
|
||||||
endif
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||||
@@ -127,6 +106,31 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
|
|||||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||||
RANLIB = $(CROSS_COMPILE)RANLIB
|
RANLIB = $(CROSS_COMPILE)RANLIB
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
|
||||||
|
# Load generated board configuration
|
||||||
|
sinclude $(OBJTREE)/include/autoconf.mk
|
||||||
|
|
||||||
|
ifdef ARCH
|
||||||
|
sinclude $(TOPDIR)/$(ARCH)_config.mk # include architecture dependend rules
|
||||||
|
endif
|
||||||
|
ifdef CPU
|
||||||
|
sinclude $(TOPDIR)/cpu/$(CPU)/config.mk # include CPU specific rules
|
||||||
|
endif
|
||||||
|
ifdef SOC
|
||||||
|
sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include SoC specific rules
|
||||||
|
endif
|
||||||
|
ifdef VENDOR
|
||||||
|
BOARDDIR = $(VENDOR)/$(BOARD)
|
||||||
|
else
|
||||||
|
BOARDDIR = $(BOARD)
|
||||||
|
endif
|
||||||
|
ifdef BOARD
|
||||||
|
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
|
||||||
|
endif
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
|
||||||
ifneq (,$(findstring s,$(MAKEFLAGS)))
|
ifneq (,$(findstring s,$(MAKEFLAGS)))
|
||||||
ARFLAGS = cr
|
ARFLAGS = cr
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -329,14 +329,28 @@ _GLOBAL(dcache_status)
|
|||||||
blr
|
blr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Invalidate L2 cache using L2I and polling L2IP
|
* Invalidate L2 cache using L2I and polling L2IP or L2I
|
||||||
*/
|
*/
|
||||||
_GLOBAL(l2cache_invalidate)
|
_GLOBAL(l2cache_invalidate)
|
||||||
sync
|
sync
|
||||||
|
mfspr r3, l2cr
|
||||||
oris r3, r3, L2CR_L2I@h
|
oris r3, r3, L2CR_L2I@h
|
||||||
sync
|
sync
|
||||||
mtspr l2cr, r3
|
mtspr l2cr, r3
|
||||||
sync
|
sync
|
||||||
|
mfspr r3, PVR
|
||||||
|
sync
|
||||||
|
rlwinm r3, r3, 16,16,31
|
||||||
|
cmpli 0,r3,0x8000 /* 7451, 7441 */
|
||||||
|
beq 0,inv_7450
|
||||||
|
cmpli 0,r3,0x8001 /* 7455, 7445 */
|
||||||
|
beq 0,inv_7450
|
||||||
|
cmpli 0,r3,0x8002 /* 7457, 7447 */
|
||||||
|
beq 0,inv_7450
|
||||||
|
cmpli 0,r3,0x8003 /* 7447A */
|
||||||
|
beq 0,inv_7450
|
||||||
|
cmpli 0,r3,0x8004 /* 7448 */
|
||||||
|
beq 0,inv_7450
|
||||||
invl2:
|
invl2:
|
||||||
mfspr r3, l2cr
|
mfspr r3, l2cr
|
||||||
andi. r3, r3, L2CR_L2IP
|
andi. r3, r3, L2CR_L2IP
|
||||||
@@ -348,6 +362,11 @@ invl2:
|
|||||||
mtspr l2cr, r3
|
mtspr l2cr, r3
|
||||||
sync
|
sync
|
||||||
blr
|
blr
|
||||||
|
inv_7450:
|
||||||
|
mfspr r3, l2cr
|
||||||
|
andis. r3, r3, L2CR_L2I@h
|
||||||
|
bne inv_7450
|
||||||
|
blr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable L2 cache
|
* Enable L2 cache
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ static u32 mx31_decode_pll(u32 reg, u32 infreq)
|
|||||||
(mfd * pd)) << 10;
|
(mfd * pd)) << 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 mx31_get_mpl_dpdgck_clk(void)
|
static u32 mx31_get_mpl_dpdgck_clk(void)
|
||||||
{
|
{
|
||||||
u32 infreq;
|
u32 infreq;
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ u32 mx31_get_mpl_dpdgck_clk(void)
|
|||||||
return mx31_decode_pll(__REG(CCM_MPCTL), infreq);
|
return mx31_decode_pll(__REG(CCM_MPCTL), infreq);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 mx31_get_mcu_main_clk(void)
|
static u32 mx31_get_mcu_main_clk(void)
|
||||||
{
|
{
|
||||||
/* For now we assume mpl_dpdgck_clk == mcu_main_clk
|
/* For now we assume mpl_dpdgck_clk == mcu_main_clk
|
||||||
* which should be correct for most boards
|
* which should be correct for most boards
|
||||||
|
|||||||
@@ -69,4 +69,4 @@ int usb_cpu_init_fail (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# endif /* defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) */
|
# endif /* defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) */
|
||||||
#endif /* defined(CONFIG_USB_OHCI) && defined(CFG_USB_OHCI_CPU_INIT) */
|
#endif /* defined(CONFIG_USB_OHCI_NEW) && defined(CFG_USB_OHCI_CPU_INIT) */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# (C) Copyright 2000-2008
|
# (C) Copyright 2000-2008
|
||||||
# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||||
#
|
#
|
||||||
# See file CREDITS for list of people who contributed to this
|
# See file CREDITS for list of people who contributed to this
|
||||||
# project.
|
# project.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* AT91CAP9/SAM9 setup stuff
|
* AT91CAP9/SAM9 setup stuff
|
||||||
*
|
*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
|
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||||
* Lead Tech Design <www.leadtechdesign.com>
|
* Lead Tech Design <www.leadtechdesign.com>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2006
|
* (C) Copyright 2006
|
||||||
* DENX Software Engineering <mk <at> denx.de>
|
* DENX Software Engineering <mk@denx.de>
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
* project.
|
* project.
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ early_board_init_ret:
|
|||||||
/* so we try to indicate progress */
|
/* so we try to indicate progress */
|
||||||
movw $0x01, %ax
|
movw $0x01, %ax
|
||||||
movl $.progress0, %ebp
|
movl $.progress0, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress0:
|
.progress0:
|
||||||
|
|
||||||
/* size memory */
|
/* size memory */
|
||||||
@@ -74,7 +74,7 @@ mem_init_ret:
|
|||||||
/* indicate (lack of) progress */
|
/* indicate (lack of) progress */
|
||||||
movw $0x81, %ax
|
movw $0x81, %ax
|
||||||
movl $.progress0a, %ebp
|
movl $.progress0a, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress0a:
|
.progress0a:
|
||||||
jmp die
|
jmp die
|
||||||
mem_ok:
|
mem_ok:
|
||||||
@@ -82,7 +82,7 @@ mem_ok:
|
|||||||
/* indicate progress */
|
/* indicate progress */
|
||||||
movw $0x02, %ax
|
movw $0x02, %ax
|
||||||
movl $.progress1, %ebp
|
movl $.progress1, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress1:
|
.progress1:
|
||||||
|
|
||||||
/* create a stack after the bss */
|
/* create a stack after the bss */
|
||||||
@@ -104,7 +104,7 @@ no_stack:
|
|||||||
/* indicate (lack of) progress */
|
/* indicate (lack of) progress */
|
||||||
movw $0x82, %ax
|
movw $0x82, %ax
|
||||||
movl $.progress1a, %ebp
|
movl $.progress1a, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress1a:
|
.progress1a:
|
||||||
jmp die
|
jmp die
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ stack_ok:
|
|||||||
/* indicate progress */
|
/* indicate progress */
|
||||||
movw $0x03, %ax
|
movw $0x03, %ax
|
||||||
movl $.progress2, %ebp
|
movl $.progress2, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress2:
|
.progress2:
|
||||||
|
|
||||||
/* copy data section to ram, size must be 4-byte aligned */
|
/* copy data section to ram, size must be 4-byte aligned */
|
||||||
@@ -136,7 +136,7 @@ data_fail:
|
|||||||
/* indicate (lack of) progress */
|
/* indicate (lack of) progress */
|
||||||
movw $0x83, %ax
|
movw $0x83, %ax
|
||||||
movl $.progress2a, %ebp
|
movl $.progress2a, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress2a:
|
.progress2a:
|
||||||
jmp die
|
jmp die
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ data_ok:
|
|||||||
/* indicate progress */
|
/* indicate progress */
|
||||||
movw $0x04, %ax
|
movw $0x04, %ax
|
||||||
movl $.progress3, %ebp
|
movl $.progress3, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress3:
|
.progress3:
|
||||||
|
|
||||||
/* clear bss section in ram, size must be 4-byte aligned */
|
/* clear bss section in ram, size must be 4-byte aligned */
|
||||||
@@ -168,7 +168,7 @@ bss_fail:
|
|||||||
/* indicate (lack of) progress */
|
/* indicate (lack of) progress */
|
||||||
movw $0x84, %ax
|
movw $0x84, %ax
|
||||||
movl $.progress3a, %ebp
|
movl $.progress3a, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress3a:
|
.progress3a:
|
||||||
jmp die
|
jmp die
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ bss_ok:
|
|||||||
/* indicate progress */
|
/* indicate progress */
|
||||||
movw $0x05, %ax
|
movw $0x05, %ax
|
||||||
movl $.progress4, %ebp
|
movl $.progress4, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress4:
|
.progress4:
|
||||||
|
|
||||||
call start_i386boot /* Enter, U-boot! */
|
call start_i386boot /* Enter, U-boot! */
|
||||||
@@ -188,7 +188,7 @@ bss_ok:
|
|||||||
/* indicate (lack of) progress */
|
/* indicate (lack of) progress */
|
||||||
movw $0x85, %ax
|
movw $0x85, %ax
|
||||||
movl $.progress4a, %ebp
|
movl $.progress4a, %ebp
|
||||||
jmp __show_boot_progress
|
jmp show_boot_progress
|
||||||
.progress4a:
|
.progress4a:
|
||||||
|
|
||||||
die: hlt
|
die: hlt
|
||||||
|
|||||||
@@ -240,14 +240,16 @@ NESTED(mips_cache_reset, 0, ra)
|
|||||||
*/
|
*/
|
||||||
move a1, t2
|
move a1, t2
|
||||||
move a2, t4
|
move a2, t4
|
||||||
bal mips_init_icache
|
PTR_LA t7, mips_init_icache
|
||||||
|
jalr t7
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* then initialize D-cache.
|
* then initialize D-cache.
|
||||||
*/
|
*/
|
||||||
move a1, t3
|
move a1, t3
|
||||||
move a2, t5
|
move a2, t5
|
||||||
bal mips_init_dcache
|
PTR_LA t7, mips_init_dcache
|
||||||
|
jalr t7
|
||||||
|
|
||||||
jr RA
|
jr RA
|
||||||
END(mips_cache_reset)
|
END(mips_cache_reset)
|
||||||
@@ -285,6 +287,22 @@ LEAF(dcache_disable)
|
|||||||
jr ra
|
jr ra
|
||||||
END(dcache_disable)
|
END(dcache_disable)
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* dcache_enable - enable cache
|
||||||
|
*
|
||||||
|
* RETURNS: N/A
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
LEAF(dcache_enable)
|
||||||
|
mfc0 t0, CP0_CONFIG
|
||||||
|
ori t0, CONF_CM_CMASK
|
||||||
|
xori t0, CONF_CM_CMASK
|
||||||
|
ori t0, CONF_CM_CACHABLE_NONCOHERENT
|
||||||
|
mtc0 t0, CP0_CONFIG
|
||||||
|
jr ra
|
||||||
|
END(dcache_enable)
|
||||||
|
|
||||||
#ifdef CFG_INIT_RAM_LOCK_MIPS
|
#ifdef CFG_INIT_RAM_LOCK_MIPS
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
# MA 02111-1307 USA
|
# MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
v=$(shell $(AS) --version |grep "GNU assembler" |cut -d. -f2)
|
v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2)
|
||||||
MIPSFLAGS:=$(shell \
|
MIPSFLAGS:=$(shell \
|
||||||
if [ "$v" -lt "14" ]; then \
|
if [ "$v" -lt "14" ]; then \
|
||||||
echo "-mcpu=4kc"; \
|
echo "-mcpu=4kc"; \
|
||||||
|
|||||||
@@ -345,7 +345,8 @@ relocate_code:
|
|||||||
jr t0
|
jr t0
|
||||||
nop
|
nop
|
||||||
|
|
||||||
.gpword _GLOBAL_OFFSET_TABLE_ /* _GLOBAL_OFFSET_TABLE_ - _gp */
|
.word _gp
|
||||||
|
.word _GLOBAL_OFFSET_TABLE_
|
||||||
.word uboot_end_data
|
.word uboot_end_data
|
||||||
.word uboot_end
|
.word uboot_end
|
||||||
.word num_got_entries
|
.word num_got_entries
|
||||||
@@ -358,8 +359,10 @@ in_ram:
|
|||||||
* generated by GNU ld. Skip these reserved entries from relocation.
|
* generated by GNU ld. Skip these reserved entries from relocation.
|
||||||
*/
|
*/
|
||||||
lw t3, -4(t0) /* t3 <-- num_got_entries */
|
lw t3, -4(t0) /* t3 <-- num_got_entries */
|
||||||
lw t4, -16(t0) /* t4 <-- (_GLOBAL_OFFSET_TABLE_ - _gp) */
|
lw t4, -16(t0) /* t4 <-- _GLOBAL_OFFSET_TABLE_ */
|
||||||
add t4, t4, gp /* t4 now holds _GLOBAL_OFFSET_TABLE_ */
|
lw t5, -20(t0) /* t5 <-- _gp */
|
||||||
|
sub t4, t5 /* compute offset*/
|
||||||
|
add t4, t4, gp /* t4 now holds relocated _GLOBAL_OFFSET_TABLE_ */
|
||||||
addi t4, t4, 8 /* Skipping first two entries. */
|
addi t4, t4, 8 /* Skipping first two entries. */
|
||||||
li t2, 2
|
li t2, 2
|
||||||
1:
|
1:
|
||||||
|
|||||||
@@ -25,3 +25,4 @@ PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
|
|||||||
|
|
||||||
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 \
|
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 \
|
||||||
-Wa,-me500 -msoft-float -mno-string
|
-Wa,-me500 -msoft-float -mno-string
|
||||||
|
PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe)
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ int cpu_release(int nr, int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
table[BOOT_ENTRY_ADDR_UPPER] = (u32)(boot_addr >> 32);
|
table[BOOT_ENTRY_ADDR_UPPER] = (u32)(boot_addr >> 32);
|
||||||
|
|
||||||
|
/* ensure all table updates complete before final address write */
|
||||||
|
eieio();
|
||||||
|
|
||||||
table[BOOT_ENTRY_ADDR_LOWER] = (u32)(boot_addr & 0xffffffff);
|
table[BOOT_ENTRY_ADDR_LOWER] = (u32)(boot_addr & 0xffffffff);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -153,7 +157,7 @@ static void pq3_mp_up(unsigned long bootpg)
|
|||||||
/* wait for everyone */
|
/* wait for everyone */
|
||||||
while (timeout) {
|
while (timeout) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 1; i < CONFIG_NR_CPUS; i++) {
|
for (i = 0; i < CONFIG_NR_CPUS; i++) {
|
||||||
if (table[i * NUM_BOOT_ENTRY + BOOT_ENTRY_ADDR_LOWER])
|
if (table[i * NUM_BOOT_ENTRY + BOOT_ENTRY_ADDR_LOWER])
|
||||||
cpu_up_mask |= (1 << i);
|
cpu_up_mask |= (1 << i);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ __secondary_start_page:
|
|||||||
lwz r4,ENTRY_ADDR_LOWER(r10)
|
lwz r4,ENTRY_ADDR_LOWER(r10)
|
||||||
andi. r11,r4,1
|
andi. r11,r4,1
|
||||||
bne 2b
|
bne 2b
|
||||||
|
isync
|
||||||
|
|
||||||
/* get the upper bits of the addr */
|
/* get the upper bits of the addr */
|
||||||
lwz r11,ENTRY_ADDR_UPPER(r10)
|
lwz r11,ENTRY_ADDR_UPPER(r10)
|
||||||
@@ -169,7 +170,7 @@ __secondary_start_page:
|
|||||||
mtspr SPRN_SRR1,r13
|
mtspr SPRN_SRR1,r13
|
||||||
rfi
|
rfi
|
||||||
|
|
||||||
.align 3
|
.align L1_CACHE_SHIFT
|
||||||
.globl __spin_table
|
.globl __spin_table
|
||||||
__spin_table:
|
__spin_table:
|
||||||
.space CONFIG_NR_CPUS*ENTRY_SIZE
|
.space CONFIG_NR_CPUS*ENTRY_SIZE
|
||||||
|
|||||||
@@ -610,8 +610,8 @@ spd_sdram(void)
|
|||||||
/*
|
/*
|
||||||
* Sneak in some Extended Refresh Recovery.
|
* Sneak in some Extended Refresh Recovery.
|
||||||
*/
|
*/
|
||||||
ddr->ext_refrec = (trfc_high << 16);
|
ddr->timing_cfg_3 = (trfc_high << 16);
|
||||||
debug("DDR: ext_refrec = 0x%08x\n", ddr->ext_refrec);
|
debug("DDR: timing_cfg_3 = 0x%08x\n", ddr->timing_cfg_3);
|
||||||
|
|
||||||
ddr->timing_cfg_1 =
|
ddr->timing_cfg_1 =
|
||||||
(0
|
(0
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ _GLOBAL(l2cache_invalidate)
|
|||||||
|
|
||||||
invl2:
|
invl2:
|
||||||
mfspr r3, l2cr
|
mfspr r3, l2cr
|
||||||
andi. r3, r3, L2CR_L2I@h
|
andis. r3, r3, L2CR_L2I@h
|
||||||
bne invl2
|
bne invl2
|
||||||
blr
|
blr
|
||||||
|
|
||||||
|
|||||||
@@ -644,8 +644,8 @@ spd_init(unsigned char i2c_address, unsigned int ddr_num,
|
|||||||
/*
|
/*
|
||||||
* Sneak in some Extended Refresh Recovery.
|
* Sneak in some Extended Refresh Recovery.
|
||||||
*/
|
*/
|
||||||
ddr->ext_refrec = (trfc_high << 16);
|
ddr->timing_cfg_3 = (trfc_high << 16);
|
||||||
debug("DDR: ext_refrec = 0x%08x\n", ddr->ext_refrec);
|
debug("DDR: timing_cfg_3 = 0x%08x\n", ddr->timing_cfg_3);
|
||||||
|
|
||||||
ddr->timing_cfg_1 =
|
ddr->timing_cfg_1 =
|
||||||
(0
|
(0
|
||||||
|
|||||||
@@ -105,8 +105,20 @@ int get_clocks(void)
|
|||||||
get_sys_info(&sys_info);
|
get_sys_info(&sys_info);
|
||||||
gd->cpu_clk = sys_info.freqProcessor;
|
gd->cpu_clk = sys_info.freqProcessor;
|
||||||
gd->bus_clk = sys_info.freqSystemBus;
|
gd->bus_clk = sys_info.freqSystemBus;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The base clock for I2C depends on the actual SOC. Unfortunately,
|
||||||
|
* there is no pattern that can be used to determine the frequency, so
|
||||||
|
* the only choice is to look up the actual SOC number and use the value
|
||||||
|
* for that SOC. This information is taken from application note
|
||||||
|
* AN2919.
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_MPC8610
|
||||||
gd->i2c1_clk = sys_info.freqSystemBus;
|
gd->i2c1_clk = sys_info.freqSystemBus;
|
||||||
gd->i2c2_clk = sys_info.freqSystemBus;
|
#else
|
||||||
|
gd->i2c1_clk = sys_info.freqSystemBus / 2;
|
||||||
|
#endif
|
||||||
|
gd->i2c2_clk = gd->i2c1_clk;
|
||||||
|
|
||||||
if (gd->cpu_clk != 0)
|
if (gd->cpu_clk != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* cpu/ppc4xx/44x_spd_ddr2.c
|
* cpu/ppc4xx/44x_spd_ddr2.c
|
||||||
* This SPD SDRAM detection code supports AMCC PPC44x cpu's with a
|
* This SPD SDRAM detection code supports AMCC PPC44x cpu's with a
|
||||||
* DDR2 controller (non Denali Core). Those are 440SP/SPe.
|
* DDR2 controller (non Denali Core). Those currently are:
|
||||||
|
*
|
||||||
|
* 405: 405EX
|
||||||
|
* 440/460: 440SP/440SPe/460EX/460GT
|
||||||
*
|
*
|
||||||
* (C) Copyright 2007-2008
|
* (C) Copyright 2007-2008
|
||||||
* Stefan Roese, DENX Software Engineering, sr@denx.de.
|
* Stefan Roese, DENX Software Engineering, sr@denx.de.
|
||||||
@@ -40,6 +43,7 @@
|
|||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/mmu.h>
|
#include <asm/mmu.h>
|
||||||
|
#include <asm/cache.h>
|
||||||
|
|
||||||
#if defined(CONFIG_SPD_EEPROM) && \
|
#if defined(CONFIG_SPD_EEPROM) && \
|
||||||
(defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
|
(defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
|
||||||
@@ -237,7 +241,6 @@ static void DQS_calibration_process(void);
|
|||||||
static void ppc440sp_sdram_register_dump(void);
|
static void ppc440sp_sdram_register_dump(void);
|
||||||
int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
|
int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
|
||||||
void dcbz_area(u32 start_address, u32 num_bytes);
|
void dcbz_area(u32 start_address, u32 num_bytes);
|
||||||
void dflush(void);
|
|
||||||
|
|
||||||
static u32 mfdcr_any(u32 dcr)
|
static u32 mfdcr_any(u32 dcr)
|
||||||
{
|
{
|
||||||
@@ -2078,7 +2081,7 @@ static void program_bxcf(unsigned long *dimm_populated,
|
|||||||
if (num_banks == 4)
|
if (num_banks == 4)
|
||||||
ind = 0;
|
ind = 0;
|
||||||
else
|
else
|
||||||
ind = 5;
|
ind = 5 << 8;
|
||||||
switch (num_col_addr) {
|
switch (num_col_addr) {
|
||||||
case 0x08:
|
case 0x08:
|
||||||
mode |= (SDRAM_BXCF_M_AM_0 + ind);
|
mode |= (SDRAM_BXCF_M_AM_0 + ind);
|
||||||
@@ -2355,7 +2358,8 @@ static void program_ecc_addr(unsigned long start_address,
|
|||||||
} else {
|
} else {
|
||||||
/* ECC bit set method for cached memory */
|
/* ECC bit set method for cached memory */
|
||||||
dcbz_area(start_address, num_bytes);
|
dcbz_area(start_address, num_bytes);
|
||||||
dflush();
|
/* Write modified dcache lines back to memory */
|
||||||
|
clean_dcache_range(start_address, start_address + num_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
blank_string(strlen(str));
|
blank_string(strlen(str));
|
||||||
|
|||||||
@@ -346,6 +346,26 @@ int checkcpu (void)
|
|||||||
strcpy(addstr, "No Security support");
|
strcpy(addstr, "No Security support");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PVR_405EX1_RC:
|
||||||
|
puts("EX Rev. C");
|
||||||
|
strcpy(addstr, "Security support");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PVR_405EX2_RC:
|
||||||
|
puts("EX Rev. C");
|
||||||
|
strcpy(addstr, "No Security support");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PVR_405EXR1_RC:
|
||||||
|
puts("EXr Rev. C");
|
||||||
|
strcpy(addstr, "Security support");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PVR_405EXR2_RC:
|
||||||
|
puts("EXr Rev. C");
|
||||||
|
strcpy(addstr, "No Security support");
|
||||||
|
break;
|
||||||
|
|
||||||
#if defined(CONFIG_440)
|
#if defined(CONFIG_440)
|
||||||
case PVR_440GP_RB:
|
case PVR_440GP_RB:
|
||||||
puts("GP Rev. B");
|
puts("GP Rev. B");
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/mmu.h>
|
#include <asm/mmu.h>
|
||||||
|
#include <asm/cache.h>
|
||||||
|
|
||||||
#if defined(CONFIG_SPD_EEPROM) && \
|
#if defined(CONFIG_SPD_EEPROM) && \
|
||||||
(defined(CONFIG_440EPX) || defined(CONFIG_440GRX))
|
(defined(CONFIG_440EPX) || defined(CONFIG_440GRX))
|
||||||
@@ -92,7 +93,6 @@
|
|||||||
extern int denali_wait_for_dlllock(void);
|
extern int denali_wait_for_dlllock(void);
|
||||||
extern void denali_core_search_data_eye(void);
|
extern void denali_core_search_data_eye(void);
|
||||||
extern void dcbz_area(u32 start_address, u32 num_bytes);
|
extern void dcbz_area(u32 start_address, u32 num_bytes);
|
||||||
extern void dflush(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Board-specific Platform code can reimplement spd_ddr_init_hang () if needed
|
* Board-specific Platform code can reimplement spd_ddr_init_hang () if needed
|
||||||
@@ -1201,7 +1201,8 @@ long int initdram(int board_type)
|
|||||||
#else
|
#else
|
||||||
#error Please define CFG_MEM_TOP_HIDE (see README) in your board config file
|
#error Please define CFG_MEM_TOP_HIDE (see README) in your board config file
|
||||||
#endif
|
#endif
|
||||||
dflush();
|
/* Write modified dcache lines back to memory */
|
||||||
|
clean_dcache_range(CFG_SDRAM_BASE, CFG_SDRAM_BASE + dram_size - CFG_MEM_TOP_HIDE);
|
||||||
debug("Completed\n");
|
debug("Completed\n");
|
||||||
sync();
|
sync();
|
||||||
remove_tlb(CFG_SDRAM_BASE, dram_size);
|
remove_tlb(CFG_SDRAM_BASE, dram_size);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* (C) Copyright 2007
|
* (C) Copyright 2007-2008
|
||||||
* Stefan Roese, DENX Software Engineering, sr@denx.de.
|
* Stefan Roese, DENX Software Engineering, sr@denx.de.
|
||||||
*
|
*
|
||||||
* See file CREDITS for list of people who contributed to this
|
* See file CREDITS for list of people who contributed to this
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <ppc4xx.h>
|
#include <ppc4xx.h>
|
||||||
|
|
||||||
#if defined(CONFIG_OF_LIBFDT)
|
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
|
||||||
#include <libfdt.h>
|
#include <libfdt.h>
|
||||||
#include <libfdt_env.h>
|
#include <libfdt_env.h>
|
||||||
#include <fdt_support.h>
|
#include <fdt_support.h>
|
||||||
@@ -35,6 +35,26 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
void __ft_board_setup(void *blob, bd_t *bd)
|
||||||
|
{
|
||||||
|
u32 val[4];
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
ft_cpu_setup(blob, bd);
|
||||||
|
|
||||||
|
/* Fixup NOR mapping */
|
||||||
|
val[0] = 0; /* chip select number */
|
||||||
|
val[1] = 0; /* always 0 */
|
||||||
|
val[2] = gd->bd->bi_flashstart;
|
||||||
|
val[3] = gd->bd->bi_flashsize;
|
||||||
|
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
|
||||||
|
val, sizeof(val), 1);
|
||||||
|
if (rc)
|
||||||
|
printf("Unable to update property NOR mapping, err=%s\n",
|
||||||
|
fdt_strerror(rc));
|
||||||
|
}
|
||||||
|
void ft_board_setup(void *blob, bd_t *bd) __attribute__((weak, alias("__ft_board_setup")));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fixup all PCIe nodes by setting the device_type property
|
* Fixup all PCIe nodes by setting the device_type property
|
||||||
* to "pci-endpoint" instead is "pci" for endpoint ports.
|
* to "pci-endpoint" instead is "pci" for endpoint ports.
|
||||||
@@ -83,8 +103,14 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
|||||||
bd->bi_intfreq, 1);
|
bd->bi_intfreq, 1);
|
||||||
do_fixup_by_path_u32(blob, "/plb", "clock-frequency", sys_info.freqPLB, 1);
|
do_fixup_by_path_u32(blob, "/plb", "clock-frequency", sys_info.freqPLB, 1);
|
||||||
do_fixup_by_path_u32(blob, "/plb/opb", "clock-frequency", sys_info.freqOPB, 1);
|
do_fixup_by_path_u32(blob, "/plb/opb", "clock-frequency", sys_info.freqOPB, 1);
|
||||||
|
|
||||||
|
if (fdt_path_offset(blob, "/plb/opb/ebc") >= 0)
|
||||||
do_fixup_by_path_u32(blob, "/plb/opb/ebc", "clock-frequency",
|
do_fixup_by_path_u32(blob, "/plb/opb/ebc", "clock-frequency",
|
||||||
sys_info.freqEBC, 1);
|
sys_info.freqEBC, 1);
|
||||||
|
else
|
||||||
|
do_fixup_by_path_u32(blob, "/plb/ebc", "clock-frequency",
|
||||||
|
sys_info.freqEBC, 1);
|
||||||
|
|
||||||
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
|
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -103,4 +129,4 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
|||||||
*/
|
*/
|
||||||
fdt_pcie_setup(blob);
|
fdt_pcie_setup(blob);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_OF_LIBFDT */
|
#endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ static u8 pll_fbdv_multi_bits[] = {
|
|||||||
/* values for: 101 - 200 */
|
/* values for: 101 - 200 */
|
||||||
0x78, 0xf1, 0x62, 0xc5, 0x0a, 0x94, 0x28, 0xd0, 0x21, 0xc3,
|
0x78, 0xf1, 0x62, 0xc5, 0x0a, 0x94, 0x28, 0xd0, 0x21, 0xc3,
|
||||||
0x06, 0x8c, 0x18, 0xb0, 0x60, 0xc1, 0x02, 0x84, 0x08, 0x90,
|
0x06, 0x8c, 0x18, 0xb0, 0x60, 0xc1, 0x02, 0x84, 0x08, 0x90,
|
||||||
0x20, 0xc0, 0x01, 0x83, 0x77, 0xff, 0x1f, 0xbf, 0x7f, 0xfe,
|
0x20, 0xc0, 0x01, 0x83, 0x07, 0x8f, 0x1f, 0xbf, 0x7f, 0xfe,
|
||||||
0x7d, 0xfa, 0x75, 0xea, 0x55, 0xaa, 0x54, 0xa9, 0x53, 0xa6,
|
0x7d, 0xfa, 0x75, 0xea, 0x55, 0xaa, 0x54, 0xa9, 0x53, 0xa6,
|
||||||
0x4c, 0x99, 0x33, 0xe7, 0x4e, 0x9d, 0x3b, 0xf7, 0x6e, 0xdd,
|
0x4c, 0x99, 0x33, 0xe7, 0x4e, 0x9d, 0x3b, 0xf7, 0x6e, 0xdd,
|
||||||
0x3a, 0xf4, 0x69, 0xd2, 0x25, 0xcb, 0x16, 0xac, 0x58, 0xb1,
|
0x3a, 0xf4, 0x69, 0xd2, 0x25, 0xcb, 0x16, 0xac, 0x58, 0xb1,
|
||||||
|
|||||||
@@ -1675,35 +1675,6 @@ trap_reloc:
|
|||||||
sync
|
sync
|
||||||
blr
|
blr
|
||||||
function_epilog(dcbz_area)
|
function_epilog(dcbz_area)
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------+
|
|
||||||
| dflush. Assume 32K at vector address is cachable.
|
|
||||||
+----------------------------------------------------------------------------*/
|
|
||||||
function_prolog(dflush)
|
|
||||||
mfmsr r9
|
|
||||||
rlwinm r8,r9,0,15,13
|
|
||||||
rlwinm r8,r8,0,17,15
|
|
||||||
mtmsr r8
|
|
||||||
mfspr r8,dvlim
|
|
||||||
addi r3,r0,0x0000
|
|
||||||
mtspr dvlim,r3
|
|
||||||
mfspr r3,ivpr
|
|
||||||
addi r4,r0,1024
|
|
||||||
mtctr r4
|
|
||||||
..dflush_loop:
|
|
||||||
lwz r6,0x0(r3)
|
|
||||||
addi r3,r3,32
|
|
||||||
bdnz ..dflush_loop
|
|
||||||
addi r3,r3,-32
|
|
||||||
mtctr r4
|
|
||||||
..ag: dcbf r0,r3
|
|
||||||
addi r3,r3,-32
|
|
||||||
bdnz ..ag
|
|
||||||
mtspr dvlim,r8
|
|
||||||
sync
|
|
||||||
mtmsr r9
|
|
||||||
blr
|
|
||||||
function_epilog(dflush)
|
|
||||||
#endif /* CONFIG_440 */
|
#endif /* CONFIG_440 */
|
||||||
#endif /* CONFIG_NAND_SPL */
|
#endif /* CONFIG_NAND_SPL */
|
||||||
|
|
||||||
|
|||||||
@@ -166,17 +166,13 @@ _start_armboot: .word start_armboot
|
|||||||
/* */
|
/* */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* mk@tbd: Fix this! */
|
/* mk@tbd: Fix this! */
|
||||||
#if defined(CONFIG_PXA250) || defined(CONFIG_CPU_MONAHANS)
|
#undef RCSR
|
||||||
#undef ICMR
|
#undef ICMR
|
||||||
#undef OSMR3
|
#undef OSMR3
|
||||||
#undef OSCR
|
#undef OSCR
|
||||||
#undef OWER
|
#undef OWER
|
||||||
#undef OIER
|
#undef OIER
|
||||||
#endif /* CONFIG_PXA250 || CONFIG_CPU_MONAHANS */
|
|
||||||
#ifdef CONFIG_PXA250
|
|
||||||
#undef RCSR
|
|
||||||
#undef CCCR
|
#undef CCCR
|
||||||
#endif /* CONFIG_PXA250 */
|
|
||||||
|
|
||||||
/* Interrupt-Controller base address */
|
/* Interrupt-Controller base address */
|
||||||
IC_BASE: .word 0x40d00000
|
IC_BASE: .word 0x40d00000
|
||||||
|
|||||||
72
disk/part.c
72
disk/part.c
@@ -109,43 +109,44 @@ void dev_print (block_dev_desc_t *dev_desc)
|
|||||||
lbaint_t lba512;
|
lbaint_t lba512;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dev_desc->type==DEV_TYPE_UNKNOWN) {
|
switch (dev_desc->type) {
|
||||||
puts ("not available\n");
|
case IF_TYPE_SCSI:
|
||||||
return;
|
printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n",
|
||||||
}
|
dev_desc->target,dev_desc->lun,
|
||||||
if (dev_desc->if_type==IF_TYPE_SCSI) {
|
|
||||||
printf ("(%d:%d) ", dev_desc->target,dev_desc->lun);
|
|
||||||
}
|
|
||||||
if (dev_desc->if_type==IF_TYPE_IDE) {
|
|
||||||
printf ("Model: %s Firm: %s Ser#: %s\n",
|
|
||||||
dev_desc->vendor,
|
|
||||||
dev_desc->revision,
|
|
||||||
dev_desc->product);
|
|
||||||
}
|
|
||||||
if (dev_desc->if_type==IF_TYPE_SATA) {
|
|
||||||
printf ("Model: %s Firm: %s Ser#: %s\n",
|
|
||||||
dev_desc->vendor,
|
|
||||||
dev_desc->revision,
|
|
||||||
dev_desc->product);
|
|
||||||
} else {
|
|
||||||
printf ("Vendor: %s Prod.: %s Rev: %s\n",
|
|
||||||
dev_desc->vendor,
|
dev_desc->vendor,
|
||||||
dev_desc->product,
|
dev_desc->product,
|
||||||
dev_desc->revision);
|
dev_desc->revision);
|
||||||
|
break;
|
||||||
|
case IF_TYPE_IDE:
|
||||||
|
case IF_TYPE_SATA:
|
||||||
|
printf ("Model: %s Firm: %s Ser#: %s\n",
|
||||||
|
dev_desc->vendor,
|
||||||
|
dev_desc->revision,
|
||||||
|
dev_desc->product);
|
||||||
|
break;
|
||||||
|
case DEV_TYPE_UNKNOWN:
|
||||||
|
default:
|
||||||
|
puts ("not available\n");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
puts (" Type: ");
|
puts (" Type: ");
|
||||||
if (dev_desc->removable)
|
if (dev_desc->removable)
|
||||||
puts ("Removable ");
|
puts ("Removable ");
|
||||||
switch (dev_desc->type & 0x1F) {
|
switch (dev_desc->type & 0x1F) {
|
||||||
case DEV_TYPE_HARDDISK: puts ("Hard Disk");
|
case DEV_TYPE_HARDDISK:
|
||||||
|
puts ("Hard Disk");
|
||||||
break;
|
break;
|
||||||
case DEV_TYPE_CDROM: puts ("CD ROM");
|
case DEV_TYPE_CDROM:
|
||||||
|
puts ("CD ROM");
|
||||||
break;
|
break;
|
||||||
case DEV_TYPE_OPDISK: puts ("Optical Device");
|
case DEV_TYPE_OPDISK:
|
||||||
|
puts ("Optical Device");
|
||||||
break;
|
break;
|
||||||
case DEV_TYPE_TAPE: puts ("Tape");
|
case DEV_TYPE_TAPE:
|
||||||
|
puts ("Tape");
|
||||||
break;
|
break;
|
||||||
default: printf ("# %02X #", dev_desc->type & 0x1F);
|
default:
|
||||||
|
printf ("# %02X #", dev_desc->type & 0x1F);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
puts ("\n");
|
puts ("\n");
|
||||||
@@ -281,19 +282,26 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
|
|||||||
{
|
{
|
||||||
puts ("\nPartition Map for ");
|
puts ("\nPartition Map for ");
|
||||||
switch (dev_desc->if_type) {
|
switch (dev_desc->if_type) {
|
||||||
case IF_TYPE_IDE: puts ("IDE");
|
case IF_TYPE_IDE:
|
||||||
|
puts ("IDE");
|
||||||
break;
|
break;
|
||||||
case IF_TYPE_SATA: puts ("SATA");
|
case IF_TYPE_SATA:
|
||||||
|
puts ("SATA");
|
||||||
break;
|
break;
|
||||||
case IF_TYPE_SCSI: puts ("SCSI");
|
case IF_TYPE_SCSI:
|
||||||
|
puts ("SCSI");
|
||||||
break;
|
break;
|
||||||
case IF_TYPE_ATAPI: puts ("ATAPI");
|
case IF_TYPE_ATAPI:
|
||||||
|
puts ("ATAPI");
|
||||||
break;
|
break;
|
||||||
case IF_TYPE_USB: puts ("USB");
|
case IF_TYPE_USB:
|
||||||
|
puts ("USB");
|
||||||
break;
|
break;
|
||||||
case IF_TYPE_DOC: puts ("DOC");
|
case IF_TYPE_DOC:
|
||||||
|
puts ("DOC");
|
||||||
break;
|
break;
|
||||||
default: puts ("UNKNOWN");
|
default:
|
||||||
|
puts ("UNKNOWN");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printf (" device %d -- Partition Type: %s\n\n",
|
printf (" device %d -- Partition Type: %s\n\n",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ The PPC440EP(x)/GR(x) cpu's can boot directly from NAND FLASH,
|
|||||||
completely without NOR FLASH. This can be done by using the NAND
|
completely without NOR FLASH. This can be done by using the NAND
|
||||||
boot feature of the 440 NAND flash controller (NDFC).
|
boot feature of the 440 NAND flash controller (NDFC).
|
||||||
|
|
||||||
Here a short desciption of the different boot stages:
|
Here a short description of the different boot stages:
|
||||||
|
|
||||||
a) IPL (Initial Program Loader, integrated inside CPU)
|
a) IPL (Initial Program Loader, integrated inside CPU)
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|||||||
18
doc/README.qemu_mips
Normal file
18
doc/README.qemu_mips
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
Notes for the Qemu MIPS port
|
||||||
|
|
||||||
|
Example usage:
|
||||||
|
|
||||||
|
# ln -s u-boot.bin mips_bios.bin
|
||||||
|
start it:
|
||||||
|
qemu-system-mips -L . /dev/null -nographic
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
if you use a qemu version after commit 4224
|
||||||
|
|
||||||
|
create image:
|
||||||
|
# dd of=flash bs=1k count=4k if=/dev/zero
|
||||||
|
# dd of=flash bs=1k conv=notrunc if=u-boot.bin
|
||||||
|
start it:
|
||||||
|
# qemu-system-mips -pflash flash -monitor null -nographic
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
|
|
||||||
/* It should access 16-bit instead of 8-bit */
|
/* It should access 16-bit instead of 8-bit */
|
||||||
static inline void *memcpy(void *dst, const void *src, unsigned int len)
|
static inline void *memcpy_16(void *dst, const void *src, unsigned int len)
|
||||||
{
|
{
|
||||||
void *ret = dst;
|
void *ret = dst;
|
||||||
short *d = dst;
|
short *d = dst;
|
||||||
@@ -358,7 +358,7 @@ static int onenand_read_bufferram(struct mtd_info *mtd, int area,
|
|||||||
bufferram = this->base + area;
|
bufferram = this->base + area;
|
||||||
bufferram += onenand_bufferram_offset(mtd, area);
|
bufferram += onenand_bufferram_offset(mtd, area);
|
||||||
|
|
||||||
memcpy(buffer, bufferram + offset, count);
|
memcpy_16(buffer, bufferram + offset, count);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -385,7 +385,7 @@ static int onenand_sync_read_bufferram(struct mtd_info *mtd, int area,
|
|||||||
|
|
||||||
this->mmcontrol(mtd, ONENAND_SYS_CFG1_SYNC_READ);
|
this->mmcontrol(mtd, ONENAND_SYS_CFG1_SYNC_READ);
|
||||||
|
|
||||||
memcpy(buffer, bufferram + offset, count);
|
memcpy_16(buffer, bufferram + offset, count);
|
||||||
|
|
||||||
this->mmcontrol(mtd, 0);
|
this->mmcontrol(mtd, 0);
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ static int onenand_write_bufferram(struct mtd_info *mtd, int area,
|
|||||||
bufferram = this->base + area;
|
bufferram = this->base + area;
|
||||||
bufferram += onenand_bufferram_offset(mtd, area);
|
bufferram += onenand_bufferram_offset(mtd, area);
|
||||||
|
|
||||||
memcpy(bufferram + offset, buffer, count);
|
memcpy_16(bufferram + offset, buffer, count);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,10 @@ COBJS-y += lan91c96.o
|
|||||||
COBJS-y += macb.o
|
COBJS-y += macb.o
|
||||||
COBJS-y += mcffec.o
|
COBJS-y += mcffec.o
|
||||||
COBJS-y += natsemi.o
|
COBJS-y += natsemi.o
|
||||||
COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o
|
ifeq ($(CONFIG_DRIVER_NE2000),y)
|
||||||
|
COBJS-y += ne2000.o
|
||||||
|
COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
|
||||||
|
endif
|
||||||
COBJS-y += netarm_eth.o
|
COBJS-y += netarm_eth.o
|
||||||
COBJS-y += netconsole.o
|
COBJS-y += netconsole.o
|
||||||
COBJS-y += ns7520_eth.o
|
COBJS-y += ns7520_eth.o
|
||||||
|
|||||||
156
drivers/net/ax88796.c
Normal file
156
drivers/net/ax88796.c
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
/*
|
||||||
|
* (c) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
#include <common.h>
|
||||||
|
#include "ax88796.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set 1 bit data
|
||||||
|
*/
|
||||||
|
static void ax88796_bitset(u32 bit)
|
||||||
|
{
|
||||||
|
/* DATA1 */
|
||||||
|
if( bit )
|
||||||
|
EEDI_HIGH;
|
||||||
|
else
|
||||||
|
EEDI_LOW;
|
||||||
|
|
||||||
|
EECLK_LOW;
|
||||||
|
udelay(1000);
|
||||||
|
EECLK_HIGH;
|
||||||
|
udelay(1000);
|
||||||
|
EEDI_LOW;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get 1 bit data
|
||||||
|
*/
|
||||||
|
static u8 ax88796_bitget(void)
|
||||||
|
{
|
||||||
|
u8 bit;
|
||||||
|
|
||||||
|
EECLK_LOW;
|
||||||
|
udelay(1000);
|
||||||
|
/* DATA */
|
||||||
|
bit = EEDO;
|
||||||
|
EECLK_HIGH;
|
||||||
|
udelay(1000);
|
||||||
|
|
||||||
|
return bit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Send COMMAND to EEPROM
|
||||||
|
*/
|
||||||
|
static void ax88796_eep_cmd(u8 cmd)
|
||||||
|
{
|
||||||
|
ax88796_bitset(BIT_DUMMY);
|
||||||
|
switch(cmd){
|
||||||
|
case MAC_EEP_READ:
|
||||||
|
ax88796_bitset(1);
|
||||||
|
ax88796_bitset(1);
|
||||||
|
ax88796_bitset(0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MAC_EEP_WRITE:
|
||||||
|
ax88796_bitset(1);
|
||||||
|
ax88796_bitset(0);
|
||||||
|
ax88796_bitset(1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MAC_EEP_ERACE:
|
||||||
|
ax88796_bitset(1);
|
||||||
|
ax88796_bitset(1);
|
||||||
|
ax88796_bitset(1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MAC_EEP_EWEN:
|
||||||
|
ax88796_bitset(1);
|
||||||
|
ax88796_bitset(0);
|
||||||
|
ax88796_bitset(0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MAC_EEP_EWDS:
|
||||||
|
ax88796_bitset(1);
|
||||||
|
ax88796_bitset(0);
|
||||||
|
ax88796_bitset(0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ax88796_eep_setaddr(u16 addr)
|
||||||
|
{
|
||||||
|
int i ;
|
||||||
|
|
||||||
|
for( i = 7 ; i >= 0 ; i-- )
|
||||||
|
ax88796_bitset(addr & (1 << i));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get data from EEPROM
|
||||||
|
*/
|
||||||
|
static u16 ax88796_eep_getdata(void)
|
||||||
|
{
|
||||||
|
ushort data = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
ax88796_bitget(); /* DUMMY */
|
||||||
|
for( i = 0 ; i < 16 ; i++ ){
|
||||||
|
data <<= 1;
|
||||||
|
data |= ax88796_bitget();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ax88796_mac_read(u8 *buff)
|
||||||
|
{
|
||||||
|
int i ;
|
||||||
|
u16 data;
|
||||||
|
u16 addr = 0;
|
||||||
|
|
||||||
|
for( i = 0 ; i < 3; i++ )
|
||||||
|
{
|
||||||
|
EECS_HIGH;
|
||||||
|
EEDI_LOW;
|
||||||
|
udelay(1000);
|
||||||
|
/* READ COMMAND */
|
||||||
|
ax88796_eep_cmd(MAC_EEP_READ);
|
||||||
|
/* ADDRESS */
|
||||||
|
ax88796_eep_setaddr(addr++);
|
||||||
|
/* GET DATA */
|
||||||
|
data = ax88796_eep_getdata();
|
||||||
|
*buff++ = (uchar)(data & 0xff);
|
||||||
|
*buff++ = (uchar)((data >> 8) & 0xff);
|
||||||
|
EECLK_LOW;
|
||||||
|
EEDI_LOW;
|
||||||
|
EECS_LOW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_prom(u8* mac_addr)
|
||||||
|
{
|
||||||
|
u8 prom[32];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
ax88796_mac_read(prom);
|
||||||
|
for (i = 0; i < 6; i++){
|
||||||
|
mac_addr[i] = prom[i];
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
@@ -78,140 +78,4 @@
|
|||||||
#define DP_OUT_DATA(_b_, _d_) *( (vu_short *) ((_b_)+ISA_OFFSET)) = (_d_)
|
#define DP_OUT_DATA(_b_, _d_) *( (vu_short *) ((_b_)+ISA_OFFSET)) = (_d_)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set 1 bit data
|
|
||||||
*/
|
|
||||||
static void ax88796_bitset(u32 bit)
|
|
||||||
{
|
|
||||||
/* DATA1 */
|
|
||||||
if( bit )
|
|
||||||
EEDI_HIGH;
|
|
||||||
else
|
|
||||||
EEDI_LOW;
|
|
||||||
|
|
||||||
EECLK_LOW;
|
|
||||||
udelay(1000);
|
|
||||||
EECLK_HIGH;
|
|
||||||
udelay(1000);
|
|
||||||
EEDI_LOW;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get 1 bit data
|
|
||||||
*/
|
|
||||||
static u8 ax88796_bitget(void)
|
|
||||||
{
|
|
||||||
u8 bit;
|
|
||||||
|
|
||||||
EECLK_LOW;
|
|
||||||
udelay(1000);
|
|
||||||
/* DATA */
|
|
||||||
bit = EEDO;
|
|
||||||
EECLK_HIGH;
|
|
||||||
udelay(1000);
|
|
||||||
|
|
||||||
return bit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Send COMMAND to EEPROM
|
|
||||||
*/
|
|
||||||
static void ax88796_eep_cmd(u8 cmd)
|
|
||||||
{
|
|
||||||
ax88796_bitset(BIT_DUMMY);
|
|
||||||
switch(cmd){
|
|
||||||
case MAC_EEP_READ:
|
|
||||||
ax88796_bitset(1);
|
|
||||||
ax88796_bitset(1);
|
|
||||||
ax88796_bitset(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAC_EEP_WRITE:
|
|
||||||
ax88796_bitset(1);
|
|
||||||
ax88796_bitset(0);
|
|
||||||
ax88796_bitset(1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAC_EEP_ERACE:
|
|
||||||
ax88796_bitset(1);
|
|
||||||
ax88796_bitset(1);
|
|
||||||
ax88796_bitset(1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAC_EEP_EWEN:
|
|
||||||
ax88796_bitset(1);
|
|
||||||
ax88796_bitset(0);
|
|
||||||
ax88796_bitset(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAC_EEP_EWDS:
|
|
||||||
ax88796_bitset(1);
|
|
||||||
ax88796_bitset(0);
|
|
||||||
ax88796_bitset(0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ax88796_eep_setaddr(u16 addr)
|
|
||||||
{
|
|
||||||
int i ;
|
|
||||||
for( i = 7 ; i >= 0 ; i-- )
|
|
||||||
ax88796_bitset(addr & (1 << i));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get data from EEPROM
|
|
||||||
*/
|
|
||||||
static u16 ax88796_eep_getdata(void)
|
|
||||||
{
|
|
||||||
ushort data = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
ax88796_bitget(); /* DUMMY */
|
|
||||||
for( i = 0 ; i < 16 ; i++ ){
|
|
||||||
data <<= 1;
|
|
||||||
data |= ax88796_bitget();
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ax88796_mac_read(u8 *buff)
|
|
||||||
{
|
|
||||||
int i ;
|
|
||||||
u16 data, addr = 0;
|
|
||||||
|
|
||||||
for( i = 0 ; i < 3; i++ )
|
|
||||||
{
|
|
||||||
EECS_HIGH;
|
|
||||||
EEDI_LOW;
|
|
||||||
udelay(1000);
|
|
||||||
/* READ COMMAND */
|
|
||||||
ax88796_eep_cmd(MAC_EEP_READ);
|
|
||||||
/* ADDRESS */
|
|
||||||
ax88796_eep_setaddr(addr++);
|
|
||||||
/* GET DATA */
|
|
||||||
data = ax88796_eep_getdata();
|
|
||||||
*buff++ = (uchar)(data & 0xff);
|
|
||||||
*buff++ = (uchar)((data >> 8) & 0xff);
|
|
||||||
EECLK_LOW;
|
|
||||||
EEDI_LOW;
|
|
||||||
EECS_LOW;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int get_prom(u8* mac_addr)
|
|
||||||
{
|
|
||||||
u8 prom[32];
|
|
||||||
int i;
|
|
||||||
|
|
||||||
ax88796_mac_read(prom);
|
|
||||||
for (i = 0; i < 6; i++){
|
|
||||||
mac_addr[i] = prom[i];
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* __DRIVERS_AX88796L_H__ */
|
#endif /* __DRIVERS_AX88796L_H__ */
|
||||||
|
|||||||
@@ -65,14 +65,14 @@ static unsigned short get_reg_init_bus (int regno)
|
|||||||
c = CS8900_BUS16_0;
|
c = CS8900_BUS16_0;
|
||||||
|
|
||||||
CS8900_PPTR = regno;
|
CS8900_PPTR = regno;
|
||||||
return (unsigned short) CS8900_PDATA;
|
return CS8900_PDATA;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned short get_reg (int regno)
|
static unsigned short get_reg (int regno)
|
||||||
{
|
{
|
||||||
CS8900_PPTR = regno;
|
CS8900_PPTR = regno;
|
||||||
return (unsigned short) CS8900_PDATA;
|
return CS8900_PDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ void cs8900_get_enetaddr (uchar * addr)
|
|||||||
if (get_reg_init_bus (PP_ChipID) != 0x630e)
|
if (get_reg_init_bus (PP_ChipID) != 0x630e)
|
||||||
return;
|
return;
|
||||||
eth_reset ();
|
eth_reset ();
|
||||||
if ((get_reg (PP_SelfST) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) ==
|
if ((get_reg (PP_SelfSTAT) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) ==
|
||||||
(PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) {
|
(PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) {
|
||||||
|
|
||||||
/* Load the MAC from EEPROM */
|
/* Load the MAC from EEPROM */
|
||||||
@@ -168,7 +168,6 @@ void cs8900_get_enetaddr (uchar * addr)
|
|||||||
debug ("### Set environment from HW MAC addr = \"%s\"\n", ethaddr);
|
debug ("### Set environment from HW MAC addr = \"%s\"\n", ethaddr);
|
||||||
setenv ("ethaddr", ethaddr);
|
setenv ("ethaddr", ethaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +182,6 @@ void eth_halt (void)
|
|||||||
|
|
||||||
int eth_init (bd_t * bd)
|
int eth_init (bd_t * bd)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* verify chip id */
|
/* verify chip id */
|
||||||
if (get_reg_init_bus (PP_ChipID) != 0x630e) {
|
if (get_reg_init_bus (PP_ChipID) != 0x630e) {
|
||||||
printf ("CS8900 Ethernet chip not found?!\n");
|
printf ("CS8900 Ethernet chip not found?!\n");
|
||||||
@@ -201,7 +199,7 @@ int eth_init (bd_t * bd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get a data block via Ethernet */
|
/* Get a data block via Ethernet */
|
||||||
extern int eth_rx (void)
|
int eth_rx (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
unsigned short rxlen;
|
unsigned short rxlen;
|
||||||
@@ -233,7 +231,7 @@ extern int eth_rx (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Send a data block via Ethernet. */
|
/* Send a data block via Ethernet. */
|
||||||
extern int eth_send (volatile void *packet, int length)
|
int eth_send (volatile void *packet, int length)
|
||||||
{
|
{
|
||||||
volatile unsigned short *addr;
|
volatile unsigned short *addr;
|
||||||
int tmo;
|
int tmo;
|
||||||
@@ -281,7 +279,8 @@ retry:
|
|||||||
|
|
||||||
static void cs8900_e2prom_ready(void)
|
static void cs8900_e2prom_ready(void)
|
||||||
{
|
{
|
||||||
while(get_reg(PP_SelfST) & SI_BUSY);
|
while (get_reg(PP_SelfSTAT) & SI_BUSY)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
|
|||||||
@@ -243,7 +243,6 @@
|
|||||||
|
|
||||||
/* EEPROM Kram */
|
/* EEPROM Kram */
|
||||||
#define SI_BUSY 0x0100
|
#define SI_BUSY 0x0100
|
||||||
#define PP_SelfST 0x0136 /* Self State register */
|
|
||||||
#define PP_EECMD 0x0040 /* NVR Interface Command register */
|
#define PP_EECMD 0x0040 /* NVR Interface Command register */
|
||||||
#define PP_EEData 0x0042 /* NVR Interface Data Register */
|
#define PP_EEData 0x0042 /* NVR Interface Data Register */
|
||||||
#define EEPROM_WRITE_EN 0x00F0
|
#define EEPROM_WRITE_EN 0x00F0
|
||||||
|
|||||||
@@ -95,7 +95,11 @@ struct fec_info_dma fec_info[] = {
|
|||||||
0, /* duplex and speed */
|
0, /* duplex and speed */
|
||||||
0, /* phy name */
|
0, /* phy name */
|
||||||
0, /* phy name init */
|
0, /* phy name init */
|
||||||
|
#ifdef CFG_DMA_USE_INTSRAM
|
||||||
|
DBUF_LENGTH, /* RX BD */
|
||||||
|
#else
|
||||||
0, /* RX BD */
|
0, /* RX BD */
|
||||||
|
#endif
|
||||||
0, /* TX BD */
|
0, /* TX BD */
|
||||||
0, /* rx Index */
|
0, /* rx Index */
|
||||||
0, /* tx Index */
|
0, /* tx Index */
|
||||||
@@ -164,7 +168,8 @@ static void dbg_fec_regs(struct eth_device *dev)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void set_fec_duplex_speed(volatile fecdma_t * fecp, bd_t * bd, int dup_spd)
|
static void set_fec_duplex_speed(volatile fecdma_t * fecp, bd_t * bd,
|
||||||
|
int dup_spd)
|
||||||
{
|
{
|
||||||
if ((dup_spd >> 16) == FULL) {
|
if ((dup_spd >> 16) == FULL) {
|
||||||
/* Set maximum frame length */
|
/* Set maximum frame length */
|
||||||
@@ -513,6 +518,9 @@ int mcdmafec_initialize(bd_t * bis)
|
|||||||
{
|
{
|
||||||
struct eth_device *dev;
|
struct eth_device *dev;
|
||||||
int i;
|
int i;
|
||||||
|
#ifdef CFG_DMA_USE_INTSRAM
|
||||||
|
u32 tmp = CFG_INTSRAM + 0x2000;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
|
for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
|
||||||
|
|
||||||
@@ -533,6 +541,17 @@ int mcdmafec_initialize(bd_t * bis)
|
|||||||
dev->recv = fec_recv;
|
dev->recv = fec_recv;
|
||||||
|
|
||||||
/* setup Receive and Transmit buffer descriptor */
|
/* setup Receive and Transmit buffer descriptor */
|
||||||
|
#ifdef CFG_DMA_USE_INTSRAM
|
||||||
|
fec_info[i].rxbd = (int)fec_info[i].rxbd + tmp;
|
||||||
|
tmp = fec_info[i].rxbd;
|
||||||
|
fec_info[i].txbd =
|
||||||
|
(int)fec_info[i].txbd + tmp + (PKTBUFSRX * sizeof(cbd_t));
|
||||||
|
tmp = fec_info[i].txbd;
|
||||||
|
fec_info[i].txbuf =
|
||||||
|
(int)fec_info[i].txbuf + tmp +
|
||||||
|
(CFG_TX_ETH_BUFFER * sizeof(cbd_t));
|
||||||
|
tmp = fec_info[i].txbuf;
|
||||||
|
#else
|
||||||
fec_info[i].rxbd =
|
fec_info[i].rxbd =
|
||||||
(cbd_t *) memalign(CFG_CACHELINE_SIZE,
|
(cbd_t *) memalign(CFG_CACHELINE_SIZE,
|
||||||
(PKTBUFSRX * sizeof(cbd_t)));
|
(PKTBUFSRX * sizeof(cbd_t)));
|
||||||
@@ -541,6 +560,7 @@ int mcdmafec_initialize(bd_t * bis)
|
|||||||
(CFG_TX_ETH_BUFFER * sizeof(cbd_t)));
|
(CFG_TX_ETH_BUFFER * sizeof(cbd_t)));
|
||||||
fec_info[i].txbuf =
|
fec_info[i].txbuf =
|
||||||
(char *)memalign(CFG_CACHELINE_SIZE, DBUF_LENGTH);
|
(char *)memalign(CFG_CACHELINE_SIZE, DBUF_LENGTH);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ET_DEBUG
|
#ifdef ET_DEBUG
|
||||||
printf("rxbd %x txbd %x\n",
|
printf("rxbd %x txbd %x\n",
|
||||||
|
|||||||
@@ -126,6 +126,9 @@ dp83902a_init(void)
|
|||||||
{
|
{
|
||||||
dp83902a_priv_data_t *dp = &nic;
|
dp83902a_priv_data_t *dp = &nic;
|
||||||
u8* base;
|
u8* base;
|
||||||
|
#if defined(NE2000_BASIC_INIT)
|
||||||
|
int i;
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBUG_FUNCTION();
|
DEBUG_FUNCTION();
|
||||||
|
|
||||||
@@ -755,8 +758,6 @@ static hw_info_t hw_info[] = {
|
|||||||
|
|
||||||
#define NR_INFO (sizeof(hw_info)/sizeof(hw_info_t))
|
#define NR_INFO (sizeof(hw_info)/sizeof(hw_info_t))
|
||||||
|
|
||||||
static hw_info_t default_info = { 0, 0, 0, 0, 0 };
|
|
||||||
|
|
||||||
u8 dev_addr[6];
|
u8 dev_addr[6];
|
||||||
|
|
||||||
#define PCNET_CMD 0x00
|
#define PCNET_CMD 0x00
|
||||||
@@ -764,6 +765,93 @@ u8 dev_addr[6];
|
|||||||
#define PCNET_RESET 0x1f /* Issue a read to reset, a write to clear. */
|
#define PCNET_RESET 0x1f /* Issue a read to reset, a write to clear. */
|
||||||
#define PCNET_MISC 0x18 /* For IBM CCAE and Socket EA cards */
|
#define PCNET_MISC 0x18 /* For IBM CCAE and Socket EA cards */
|
||||||
|
|
||||||
|
static void pcnet_reset_8390(void)
|
||||||
|
{
|
||||||
|
int i, r;
|
||||||
|
|
||||||
|
PRINTK("nic base is %lx\n", nic_base);
|
||||||
|
|
||||||
|
n2k_outb(E8390_NODMA + E8390_PAGE0+E8390_STOP, E8390_CMD);
|
||||||
|
PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD));
|
||||||
|
n2k_outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, E8390_CMD);
|
||||||
|
PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD));
|
||||||
|
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
|
||||||
|
PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD));
|
||||||
|
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
|
||||||
|
|
||||||
|
n2k_outb(n2k_inb(PCNET_RESET), PCNET_RESET);
|
||||||
|
|
||||||
|
for (i = 0; i < 100; i++) {
|
||||||
|
if ((r = (n2k_inb(EN0_ISR) & ENISR_RESET)) != 0)
|
||||||
|
break;
|
||||||
|
PRINTK("got %x in reset\n", r);
|
||||||
|
udelay(100);
|
||||||
|
}
|
||||||
|
n2k_outb(ENISR_RESET, EN0_ISR); /* Ack intr. */
|
||||||
|
|
||||||
|
if (i == 100)
|
||||||
|
printf("pcnet_reset_8390() did not complete.\n");
|
||||||
|
} /* pcnet_reset_8390 */
|
||||||
|
|
||||||
|
int get_prom(u8* mac_addr) __attribute__ ((weak, alias ("__get_prom")));
|
||||||
|
int __get_prom(u8* mac_addr)
|
||||||
|
{
|
||||||
|
u8 prom[32];
|
||||||
|
int i, j;
|
||||||
|
struct {
|
||||||
|
u_char value, offset;
|
||||||
|
} program_seq[] = {
|
||||||
|
{E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/
|
||||||
|
{0x48, EN0_DCFG}, /* Set byte-wide (0x48) access. */
|
||||||
|
{0x00, EN0_RCNTLO}, /* Clear the count regs. */
|
||||||
|
{0x00, EN0_RCNTHI},
|
||||||
|
{0x00, EN0_IMR}, /* Mask completion irq. */
|
||||||
|
{0xFF, EN0_ISR},
|
||||||
|
{E8390_RXOFF, EN0_RXCR}, /* 0x20 Set to monitor */
|
||||||
|
{E8390_TXOFF, EN0_TXCR}, /* 0x02 and loopback mode. */
|
||||||
|
{32, EN0_RCNTLO},
|
||||||
|
{0x00, EN0_RCNTHI},
|
||||||
|
{0x00, EN0_RSARLO}, /* DMA starting at 0x0000. */
|
||||||
|
{0x00, EN0_RSARHI},
|
||||||
|
{E8390_RREAD+E8390_START, E8390_CMD},
|
||||||
|
};
|
||||||
|
|
||||||
|
PRINTK ("trying to get MAC via prom reading\n");
|
||||||
|
|
||||||
|
pcnet_reset_8390 ();
|
||||||
|
|
||||||
|
mdelay (10);
|
||||||
|
|
||||||
|
for (i = 0; i < sizeof (program_seq) / sizeof (program_seq[0]); i++)
|
||||||
|
n2k_outb (program_seq[i].value, program_seq[i].offset);
|
||||||
|
|
||||||
|
PRINTK ("PROM:");
|
||||||
|
for (i = 0; i < 32; i++) {
|
||||||
|
prom[i] = n2k_inb (PCNET_DATAPORT);
|
||||||
|
PRINTK (" %02x", prom[i]);
|
||||||
|
}
|
||||||
|
PRINTK ("\n");
|
||||||
|
for (i = 0; i < NR_INFO; i++) {
|
||||||
|
if ((prom[0] == hw_info[i].a0) &&
|
||||||
|
(prom[2] == hw_info[i].a1) &&
|
||||||
|
(prom[4] == hw_info[i].a2)) {
|
||||||
|
PRINTK ("matched board %d\n", i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((i < NR_INFO) || ((prom[28] == 0x57) && (prom[30] == 0x57))) {
|
||||||
|
PRINTK ("on exit i is %d/%ld\n", i, NR_INFO);
|
||||||
|
PRINTK ("MAC address is ");
|
||||||
|
for (j = 0; j < 6; j++) {
|
||||||
|
mac_addr[j] = prom[j << 1];
|
||||||
|
PRINTK ("%02x:", mac_addr[i]);
|
||||||
|
}
|
||||||
|
PRINTK ("\n");
|
||||||
|
return (i < NR_INFO) ? i : 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
u32 nic_base;
|
u32 nic_base;
|
||||||
|
|
||||||
/* U-boot specific routines */
|
/* U-boot specific routines */
|
||||||
@@ -790,7 +878,7 @@ void uboot_push_tx_done(int key, int val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int eth_init(bd_t *bd) {
|
int eth_init(bd_t *bd) {
|
||||||
static hw_info_t * r;
|
int r;
|
||||||
char ethaddr[20];
|
char ethaddr[20];
|
||||||
|
|
||||||
PRINTK("### eth_init\n");
|
PRINTK("### eth_init\n");
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ are GPL, so this is, of course, GPL.
|
|||||||
|
|
||||||
#define DP_DATA 0x10
|
#define DP_DATA 0x10
|
||||||
#define START_PG 0x50 /* First page of TX buffer */
|
#define START_PG 0x50 /* First page of TX buffer */
|
||||||
|
#define START_PG2 0x48
|
||||||
#define STOP_PG 0x80 /* Last page +1 of RX ring */
|
#define STOP_PG 0x80 /* Last page +1 of RX ring */
|
||||||
|
|
||||||
#define RX_START 0x50
|
#define RX_START 0x50
|
||||||
@@ -90,90 +91,4 @@ are GPL, so this is, of course, GPL.
|
|||||||
#define DP_OUT(_b_, _o_, _d_) *( (vu_char *) ((_b_)+(_o_))) = (_d_)
|
#define DP_OUT(_b_, _o_, _d_) *( (vu_char *) ((_b_)+(_o_))) = (_d_)
|
||||||
#define DP_IN_DATA(_b_, _d_) (_d_) = *( (vu_char *) ((_b_)))
|
#define DP_IN_DATA(_b_, _d_) (_d_) = *( (vu_char *) ((_b_)))
|
||||||
#define DP_OUT_DATA(_b_, _d_) *( (vu_char *) ((_b_))) = (_d_)
|
#define DP_OUT_DATA(_b_, _d_) *( (vu_char *) ((_b_))) = (_d_)
|
||||||
|
|
||||||
static void pcnet_reset_8390(void)
|
|
||||||
{
|
|
||||||
int i, r;
|
|
||||||
|
|
||||||
PRINTK("nic base is %lx\n", nic_base);
|
|
||||||
|
|
||||||
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
|
|
||||||
PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, n2k_inb(E8390_CMD));
|
|
||||||
n2k_outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, E8390_CMD);
|
|
||||||
PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, n2k_inb(E8390_CMD));
|
|
||||||
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
|
|
||||||
PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, n2k_inb(E8390_CMD));
|
|
||||||
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
|
|
||||||
|
|
||||||
n2k_outb(n2k_inb(PCNET_RESET), PCNET_RESET);
|
|
||||||
|
|
||||||
for (i = 0; i < 100; i++) {
|
|
||||||
if ((r = (n2k_inb(EN0_ISR) & ENISR_RESET)) != 0)
|
|
||||||
break;
|
|
||||||
PRINTK("got %x in reset\n", r);
|
|
||||||
udelay(100);
|
|
||||||
}
|
|
||||||
n2k_outb(ENISR_RESET, EN0_ISR); /* Ack intr. */
|
|
||||||
|
|
||||||
if (i == 100)
|
|
||||||
printf("pcnet_reset_8390() did not complete.\n");
|
|
||||||
} /* pcnet_reset_8390 */
|
|
||||||
|
|
||||||
int get_prom(u8* mac_addr)
|
|
||||||
{
|
|
||||||
u8 prom[32];
|
|
||||||
int i, j;
|
|
||||||
struct {
|
|
||||||
u_char value, offset;
|
|
||||||
} program_seq[] = {
|
|
||||||
{E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/
|
|
||||||
{0x48, EN0_DCFG}, /* Set byte-wide (0x48) access. */
|
|
||||||
{0x00, EN0_RCNTLO}, /* Clear the count regs. */
|
|
||||||
{0x00, EN0_RCNTHI},
|
|
||||||
{0x00, EN0_IMR}, /* Mask completion irq. */
|
|
||||||
{0xFF, EN0_ISR},
|
|
||||||
{E8390_RXOFF, EN0_RXCR}, /* 0x20 Set to monitor */
|
|
||||||
{E8390_TXOFF, EN0_TXCR}, /* 0x02 and loopback mode. */
|
|
||||||
{32, EN0_RCNTLO},
|
|
||||||
{0x00, EN0_RCNTHI},
|
|
||||||
{0x00, EN0_RSARLO}, /* DMA starting at 0x0000. */
|
|
||||||
{0x00, EN0_RSARHI},
|
|
||||||
{E8390_RREAD+E8390_START, E8390_CMD},
|
|
||||||
};
|
|
||||||
|
|
||||||
PRINTK ("trying to get MAC via prom reading\n");
|
|
||||||
|
|
||||||
pcnet_reset_8390 ();
|
|
||||||
|
|
||||||
mdelay (10);
|
|
||||||
|
|
||||||
for (i = 0; i < sizeof (program_seq) / sizeof (program_seq[0]); i++)
|
|
||||||
n2k_outb (program_seq[i].value, program_seq[i].offset);
|
|
||||||
|
|
||||||
PRINTK ("PROM:");
|
|
||||||
for (i = 0; i < 32; i++) {
|
|
||||||
prom[i] = n2k_inb (PCNET_DATAPORT);
|
|
||||||
PRINTK (" %02x", prom[i]);
|
|
||||||
}
|
|
||||||
PRINTK ("\n");
|
|
||||||
for (i = 0; i < NR_INFO; i++) {
|
|
||||||
if ((prom[0] == hw_info[i].a0) &&
|
|
||||||
(prom[2] == hw_info[i].a1) &&
|
|
||||||
(prom[4] == hw_info[i].a2)) {
|
|
||||||
PRINTK ("matched board %d\n", i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((i < NR_INFO) || ((prom[28] == 0x57) && (prom[30] == 0x57))) {
|
|
||||||
PRINTK ("on exit i is %d/%ld\n", i, NR_INFO);
|
|
||||||
PRINTK ("MAC address is ");
|
|
||||||
for (j = 0; j < 6; j++) {
|
|
||||||
mac_addr[j] = prom[j << 1];
|
|
||||||
PRINTK ("%02x:", mac_addr[i]);
|
|
||||||
}
|
|
||||||
PRINTK ("\n");
|
|
||||||
return (i < NR_INFO) ? i : 0;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif /* __DRIVERS_NE2000_H__ */
|
#endif /* __DRIVERS_NE2000_H__ */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user