mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-04 02:36:38 +03:00
Compare commits
64 Commits
v2011.06-r
...
v2011.06
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1af6f532e | ||
|
|
177f38609b | ||
|
|
181f565c2d | ||
|
|
ae46d2a952 | ||
|
|
b17ce92a42 | ||
|
|
9623c158f6 | ||
|
|
1ed63c5498 | ||
|
|
29161f47d0 | ||
|
|
904ec57b33 | ||
|
|
973af335e6 | ||
|
|
10c9787e68 | ||
|
|
d697d79f8d | ||
|
|
080b7643fb | ||
|
|
8b5ab4c1b6 | ||
|
|
af0504858c | ||
|
|
517c5dfed5 | ||
|
|
66463e60df | ||
|
|
363613a08d | ||
|
|
3053fa0bfb | ||
|
|
ce04bb41a6 | ||
|
|
009e464802 | ||
|
|
20f172815d | ||
|
|
c3dc3dfb7e | ||
|
|
2ad6e27dcd | ||
|
|
28abd48f50 | ||
|
|
d51dfff7af | ||
|
|
566e5cf451 | ||
|
|
79cfe42261 | ||
|
|
282e27c0b7 | ||
|
|
6c169c12d7 | ||
|
|
2321bfe425 | ||
|
|
fd2f565809 | ||
|
|
d0a94620a8 | ||
|
|
95d50e5ce7 | ||
|
|
96fd99067f | ||
|
|
576e7a10c4 | ||
|
|
9b372b2c8e | ||
|
|
8c6407fce3 | ||
|
|
b8d41dda22 | ||
|
|
8073399444 | ||
|
|
fc97102810 | ||
|
|
61a58a16f8 | ||
|
|
953ee4d09e | ||
|
|
e845f9006a | ||
|
|
22a9ea974b | ||
|
|
154f53488e | ||
|
|
3712982019 | ||
|
|
574fa1f02e | ||
|
|
56ccd36fa1 | ||
|
|
0f33ef946a | ||
|
|
d59772eb75 | ||
|
|
29b83d9833 | ||
|
|
9571865e0d | ||
|
|
84b8085638 | ||
|
|
43f13e4ad7 | ||
|
|
ba8dcca78d | ||
|
|
ac88e66e14 | ||
|
|
4e37731a27 | ||
|
|
4ac2e2d69f | ||
|
|
ba5c122846 | ||
|
|
acf04b3059 | ||
|
|
1b48f126d6 | ||
|
|
9aeab10bd4 | ||
|
|
867f54cc35 |
51
MAINTAINERS
51
MAINTAINERS
@@ -302,6 +302,11 @@ Dan Malek <dan@embeddedalley.com>
|
||||
stxssa MPC85xx
|
||||
stxxtc MPC8xx
|
||||
|
||||
Ryan Mallon <ryan@bluewatersys.com>
|
||||
|
||||
snapper9260 ARM926EJS (AT91SAM9260 SoC)
|
||||
snapper9g20 ARM926EJS (AT91SAM9G20 SoC)
|
||||
|
||||
Eran Man <eran@nbase.co.il>
|
||||
|
||||
EVB64260_750CX MPC750CX
|
||||
@@ -564,8 +569,8 @@ Stefano Babic <sbabic@denx.de>
|
||||
ea20 davinci
|
||||
mx35pdk i.MX35
|
||||
mx51evk i.MX51
|
||||
polaris xscale
|
||||
trizepsiv xscale
|
||||
polaris xscale/pxa
|
||||
trizepsiv xscale/pxa
|
||||
vision2 i.MX51
|
||||
|
||||
Jason Liu <r64343@freescale.com>
|
||||
@@ -598,7 +603,7 @@ Andreas Bie
|
||||
|
||||
Cliff Brake <cliff.brake@gmail.com>
|
||||
|
||||
pxa255_idp xscale
|
||||
pxa255_idp xscale/pxa
|
||||
|
||||
Rick Bronson <rick@efn.org>
|
||||
|
||||
@@ -672,7 +677,6 @@ Grazvydas Ignotas <notasas@gmail.com>
|
||||
Gary Jennejohn <garyj@denx.de>
|
||||
|
||||
smdk2400 ARM920T
|
||||
trab ARM920T
|
||||
|
||||
Matthias Kaehlcke <matthias@kaehlcke.net>
|
||||
edb9301 ARM920T (EP9301)
|
||||
@@ -713,7 +717,7 @@ Sergey Kubushyn <ksi@koi8.net>
|
||||
|
||||
Prakash Kumar <prakash@embedx.com>
|
||||
|
||||
cerf250 xscale
|
||||
cerf250 xscale/pxa
|
||||
|
||||
Vipin Kumar <vipin.kumar@st.com>
|
||||
|
||||
@@ -791,9 +795,9 @@ John Rigby <jcrigby@gmail.com>
|
||||
|
||||
Stefan Roese <sr@denx.de>
|
||||
|
||||
ixdpg425 xscale
|
||||
pdnb3 xscale
|
||||
scpu xscale
|
||||
ixdpg425 xscale/ixp
|
||||
pdnb3 xscale/ixp
|
||||
scpu xscale/ixp
|
||||
|
||||
Alessandro Rubini <rubini@unipv.it>
|
||||
Nomadik Linux Team <STN_WMM_nomadik_linux@list.st.com>
|
||||
@@ -819,15 +823,16 @@ Heiko Schocher <hs@denx.de>
|
||||
|
||||
Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
|
||||
csb226 xscale
|
||||
innokom xscale
|
||||
csb226 xscale/pxa
|
||||
innokom xscale/pxa
|
||||
|
||||
Michael Schwingen <michael@schwingen.org>
|
||||
|
||||
actux1 xscale
|
||||
actux2 xscale
|
||||
actux3 xscale
|
||||
actux4 xscale
|
||||
actux1 xscale/ixp
|
||||
actux2 xscale/ixp
|
||||
actux3 xscale/ixp
|
||||
actux4 xscale/ixp
|
||||
dvlhost xscale/ixp
|
||||
|
||||
Andrea Scian <andrea.scian@dave-tech.it>
|
||||
|
||||
@@ -851,12 +856,12 @@ Greg Ungerer <greg.ungerer@opengear.com>
|
||||
|
||||
Marek Vasut <marek.vasut@gmail.com>
|
||||
|
||||
balloon3 xscale
|
||||
colibri_pxa270 xscale
|
||||
palmld xscale
|
||||
palmtc xscale
|
||||
vpac270 xscale
|
||||
zipitz2 xscale
|
||||
balloon3 xscale/pxa
|
||||
colibri_pxa270 xscale/pxa
|
||||
palmld xscale/pxa
|
||||
palmtc xscale/pxa
|
||||
vpac270 xscale/pxa
|
||||
zipitz2 xscale/pxa
|
||||
efikamx i.MX51
|
||||
|
||||
Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
|
||||
@@ -907,9 +912,9 @@ Sughosh Ganu <urwithsughosh@gmail.com>
|
||||
Unknown / orphaned boards:
|
||||
Board CPU Last known maintainer / Comment
|
||||
.........................................................................
|
||||
cradle xscale Kyle Harris <kharris@nexus-tech.net> / dead address
|
||||
ixdp425 xscale Kyle Harris <kharris@nexus-tech.net> / dead address
|
||||
lubbock xscale Kyle Harris <kharris@nexus-tech.net> / dead address
|
||||
cradle xscale/pxa Kyle Harris <kharris@nexus-tech.net> / dead address
|
||||
ixdp425 xscale/ixp Kyle Harris <kharris@nexus-tech.net> / dead address
|
||||
lubbock xscale/pxa Kyle Harris <kharris@nexus-tech.net> / dead address
|
||||
|
||||
imx31_phycore_eet i.MX31 Guennadi Liakhovetski <g.liakhovetski@gmx.de> / resigned
|
||||
mx31ads i.MX31 Guennadi Liakhovetski <g.liakhovetski@gmx.de> / resigned
|
||||
|
||||
4
MAKEALL
4
MAKEALL
@@ -374,7 +374,6 @@ LIST_ARM9=" \
|
||||
spear320 \
|
||||
spear600 \
|
||||
suen3 \
|
||||
trab \
|
||||
VCMA9 \
|
||||
versatile \
|
||||
versatileab \
|
||||
@@ -454,9 +453,6 @@ LIST_at91="$(boards_by_soc at91)\
|
||||
at91sam9g20ek \
|
||||
at91sam9m10g45ek \
|
||||
at91sam9rlek \
|
||||
CPUAT91 \
|
||||
CPU9260 \
|
||||
CPU9G20 \
|
||||
pm9g45 \
|
||||
SBC35_A9G20 \
|
||||
TNY_A9260 \
|
||||
|
||||
142
Makefile
142
Makefile
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# (C) Copyright 2000-2010
|
||||
# (C) Copyright 2000-2011
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
@@ -24,7 +24,7 @@
|
||||
VERSION = 2011
|
||||
PATCHLEVEL = 06
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION =
|
||||
ifneq "$(SUBLEVEL)" ""
|
||||
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
||||
else
|
||||
@@ -140,7 +140,7 @@ SUBDIRS = tools \
|
||||
examples/standalone \
|
||||
examples/api
|
||||
|
||||
.PHONY : $(SUBDIRS)
|
||||
.PHONY : $(SUBDIRS) $(VERSION_FILE)
|
||||
|
||||
ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
|
||||
|
||||
@@ -163,6 +163,36 @@ endif
|
||||
# load other configuration
|
||||
include $(TOPDIR)/config.mk
|
||||
|
||||
# If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
|
||||
# that (or fail if absent). Otherwise, search for a linker script in a
|
||||
# standard location.
|
||||
|
||||
ifndef LDSCRIPT
|
||||
#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
|
||||
ifdef CONFIG_SYS_LDSCRIPT
|
||||
# need to strip off double quotes
|
||||
LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef LDSCRIPT
|
||||
ifeq ($(CONFIG_NAND_U_BOOT),y)
|
||||
LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
|
||||
endif
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
$(error could not find linker script)
|
||||
endif
|
||||
endif
|
||||
|
||||
#########################################################################
|
||||
# U-Boot objects....order is important (i.e. start must be first)
|
||||
|
||||
@@ -236,7 +266,7 @@ endif
|
||||
LIBS += drivers/rtc/librtc.o
|
||||
LIBS += drivers/serial/libserial.o
|
||||
LIBS += drivers/twserial/libtws.o
|
||||
LIBS += drivers/usb/eth/libusb_eth.a
|
||||
LIBS += drivers/usb/eth/libusb_eth.o
|
||||
LIBS += drivers/usb/gadget/libusb_gadget.o
|
||||
LIBS += drivers/usb/host/libusb_host.o
|
||||
LIBS += drivers/usb/musb/libusb_musb.o
|
||||
@@ -263,7 +293,7 @@ LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
|
||||
endif
|
||||
|
||||
LIBS := $(addprefix $(obj),$(sort $(LIBS)))
|
||||
.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
|
||||
.PHONY : $(LIBS) $(TIMESTAMP_FILE)
|
||||
|
||||
LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
|
||||
LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
|
||||
@@ -422,19 +452,6 @@ mmc_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend
|
||||
|
||||
$(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl
|
||||
|
||||
$(VERSION_FILE):
|
||||
@( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \
|
||||
printf '#define PLAIN_VERSION "%s%s"\n' \
|
||||
"$(U_BOOT_VERSION)" "$${localvers}" ; \
|
||||
printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \
|
||||
"$(U_BOOT_VERSION)" "$${localvers}" ; \
|
||||
) > $@.tmp
|
||||
@( printf '#define CC_VERSION_STRING "%s"\n' \
|
||||
'$(shell $(CC) --version | head -n 1)' )>> $@.tmp
|
||||
@( printf '#define LD_VERSION_STRING "%s"\n' \
|
||||
'$(shell $(LD) -v | head -n 1)' )>> $@.tmp
|
||||
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
|
||||
|
||||
$(TIMESTAMP_FILE):
|
||||
@LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
|
||||
@LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
|
||||
@@ -509,20 +526,33 @@ $(obj)lib/asm-offsets.s: $(obj)include/autoconf.mk.dep \
|
||||
else # !config.mk
|
||||
all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
|
||||
$(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
|
||||
$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) \
|
||||
$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) \
|
||||
updater depend dep tags ctags etags cscope $(obj)System.map:
|
||||
@echo "System not configured - see README" >&2
|
||||
@ exit 1
|
||||
|
||||
tools:
|
||||
tools: $(VERSION_FILE)
|
||||
$(MAKE) -C $@ all
|
||||
endif # config.mk
|
||||
|
||||
$(VERSION_FILE):
|
||||
@( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \
|
||||
printf '#define PLAIN_VERSION "%s%s"\n' \
|
||||
"$(U_BOOT_VERSION)" "$${localvers}" ; \
|
||||
printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \
|
||||
"$(U_BOOT_VERSION)" "$${localvers}" ; \
|
||||
) > $@.tmp
|
||||
@( printf '#define CC_VERSION_STRING "%s"\n' \
|
||||
'$(shell $(CC) --version | head -n 1)' )>> $@.tmp
|
||||
@( printf '#define LD_VERSION_STRING "%s"\n' \
|
||||
'$(shell $(LD) -v | head -n 1)' )>> $@.tmp
|
||||
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
|
||||
|
||||
easylogo env gdb:
|
||||
$(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}
|
||||
gdbtools: gdb
|
||||
|
||||
tools-all: easylogo env gdb
|
||||
tools-all: easylogo env gdb $(VERSION_FILE)
|
||||
$(MAKE) -C tools HOST_TOOLS_ALL=y
|
||||
|
||||
.PHONY : CHANGELOG
|
||||
@@ -766,43 +796,6 @@ M5485HFE_config : unconfig
|
||||
## ARM926EJ-S Systems
|
||||
#########################################################################
|
||||
|
||||
at91sam9260ek_nandflash_config \
|
||||
at91sam9260ek_dataflash_cs0_config \
|
||||
at91sam9260ek_dataflash_cs1_config \
|
||||
at91sam9260ek_config \
|
||||
at91sam9g20ek_nandflash_config \
|
||||
at91sam9g20ek_dataflash_cs0_config \
|
||||
at91sam9g20ek_dataflash_cs1_config \
|
||||
at91sam9g20ek_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@if [ "$(findstring 9g20,$@)" ] ; then \
|
||||
echo "#define CONFIG_AT91SAM9G20EK 1" >>$(obj)include/config.h ; \
|
||||
else \
|
||||
echo "#define CONFIG_AT91SAM9260EK 1" >>$(obj)include/config.h ; \
|
||||
fi;
|
||||
@if [ "$(findstring _nandflash,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \
|
||||
elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \
|
||||
else \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1" >>$(obj)include/config.h ; \
|
||||
fi;
|
||||
@$(MKCONFIG) -n $@ -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
|
||||
|
||||
at91sam9xeek_nandflash_config \
|
||||
at91sam9xeek_dataflash_cs0_config \
|
||||
at91sam9xeek_dataflash_cs1_config \
|
||||
at91sam9xeek_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@if [ "$(findstring _nandflash,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \
|
||||
elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \
|
||||
else \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1" >>$(obj)include/config.h ; \
|
||||
fi;
|
||||
@$(MKCONFIG) -n $@ -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
|
||||
|
||||
at91sam9261ek_nandflash_config \
|
||||
at91sam9261ek_dataflash_cs0_config \
|
||||
at91sam9261ek_dataflash_cs3_config \
|
||||
@@ -857,14 +850,6 @@ at91sam9rlek_config : unconfig
|
||||
fi;
|
||||
@$(MKCONFIG) -n $@ -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
|
||||
|
||||
CPU9G20_128M_config \
|
||||
CPU9G20_config \
|
||||
CPU9260_128M_config \
|
||||
CPU9260_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
|
||||
@$(MKCONFIG) -n $@ -a cpu9260 arm arm926ejs cpu9260 eukrea at91
|
||||
|
||||
at91sam9m10g45ek_nandflash_config \
|
||||
at91sam9m10g45ek_dataflash_config \
|
||||
at91sam9m10g45ek_dataflash_cs0_config \
|
||||
@@ -982,29 +967,6 @@ SX1_config: unconfig
|
||||
fi;
|
||||
@$(MKCONFIG) -n $@ SX1 arm arm925t sx1
|
||||
|
||||
# TRAB default configuration: 8 MB Flash, 32 MB RAM
|
||||
trab_config \
|
||||
trab_bigram_config \
|
||||
trab_bigflash_config \
|
||||
trab_old_config: unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@mkdir -p $(obj)board/trab
|
||||
@[ -z "$(findstring _bigram,$@)" ] || \
|
||||
{ echo "#define CONFIG_FLASH_8MB" >>$(obj)include/config.h ; \
|
||||
echo "#define CONFIG_RAM_32MB" >>$(obj)include/config.h ; \
|
||||
}
|
||||
@[ -z "$(findstring _bigflash,$@)" ] || \
|
||||
{ echo "#define CONFIG_FLASH_16MB" >>$(obj)include/config.h ; \
|
||||
echo "#define CONFIG_RAM_16MB" >>$(obj)include/config.h ; \
|
||||
echo "CONFIG_SYS_TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \
|
||||
}
|
||||
@[ -z "$(findstring _old,$@)" ] || \
|
||||
{ echo "#define CONFIG_FLASH_8MB" >>$(obj)include/config.h ; \
|
||||
echo "#define CONFIG_RAM_16MB" >>$(obj)include/config.h ; \
|
||||
echo "CONFIG_SYS_TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \
|
||||
}
|
||||
@$(MKCONFIG) -n $@ -a trab arm arm920t trab - s3c24x0
|
||||
|
||||
tx25_config : unconfig
|
||||
@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
|
||||
@$(MKCONFIG) $@ arm arm926ejs tx25 karo mx25
|
||||
@@ -1124,7 +1086,7 @@ clean:
|
||||
@rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \
|
||||
$(obj)board/matrix_vision/*/bootscript.img \
|
||||
$(obj)board/netstar/{eeprom,crcek,crcit,*.srec,*.bin} \
|
||||
$(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom \
|
||||
$(obj)board/voiceblue/eeprom \
|
||||
$(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \
|
||||
$(obj)u-boot.lds \
|
||||
$(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]
|
||||
|
||||
3
README
3
README
@@ -716,7 +716,6 @@ The following options need to be configured:
|
||||
CONFIG_CMD_SPI * SPI serial bus support
|
||||
CONFIG_CMD_TFTPSRV * TFTP transfer in server mode
|
||||
CONFIG_CMD_USB * USB support
|
||||
CONFIG_CMD_VFD * VFD support (TRAB)
|
||||
CONFIG_CMD_CDP * Cisco Discover Protocol support
|
||||
CONFIG_CMD_FSL * Microblaze FSL support
|
||||
|
||||
@@ -2230,7 +2229,7 @@ FIT uImage format:
|
||||
Modem Support:
|
||||
--------------
|
||||
|
||||
[so far only for SMDK2400 and TRAB boards]
|
||||
[so far only for SMDK2400 boards]
|
||||
|
||||
- Modem support enable:
|
||||
CONFIG_MODEM_SUPPORT
|
||||
|
||||
@@ -62,6 +62,13 @@ PLATFORM_LIBS += $(OBJTREE)/arch/arm/lib/eabi_compat.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SYS_LDSCRIPT
|
||||
# need to strip off double quotes
|
||||
LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
|
||||
else
|
||||
LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
|
||||
endif
|
||||
|
||||
# needed for relocation
|
||||
ifndef CONFIG_NAND_SPL
|
||||
LDFLAGS_u-boot += -pie
|
||||
|
||||
@@ -42,7 +42,7 @@ void __attribute__((weak)) board_reset(void)
|
||||
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
at91_st_t *st = (at91_st_t *) AT91_ST_BASE;
|
||||
at91_st_t *st = (at91_st_t *) ATMEL_BASE_ST;
|
||||
#if defined(CONFIG_AT91RM9200_USART)
|
||||
/*shutdown the console to avoid strange chars during reset */
|
||||
serial_exit();
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91_tc.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
@@ -44,11 +44,11 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
/* enables TC1.0 clock */
|
||||
writel(1 << AT91_ID_TC0, &pmc->pcer); /* enable clock */
|
||||
writel(1 << ATMEL_ID_TC0, &pmc->pcer); /* enable clock */
|
||||
|
||||
writel(0, &tc->bcr);
|
||||
writel(AT91_TC_BMR_TC0XC0S_NONE | AT91_TC_BMR_TC1XC1S_NONE |
|
||||
@@ -96,14 +96,14 @@ void __udelay(unsigned long usec)
|
||||
void reset_timer_masked(void)
|
||||
{
|
||||
/* reset time */
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC;
|
||||
gd->lastinc = readl(&tc->tc[0].cv) & 0x0000ffff;
|
||||
gd->tbl = 0;
|
||||
}
|
||||
|
||||
ulong get_timer_raw(void)
|
||||
{
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC;
|
||||
u32 now;
|
||||
|
||||
now = readl(&tc->tc[0].cv) & 0x0000ffff;
|
||||
|
||||
@@ -177,7 +177,7 @@ ulong get_tbclk(void)
|
||||
{
|
||||
ulong tbclk;
|
||||
|
||||
#if defined(CONFIG_SMDK2400) || defined(CONFIG_TRAB)
|
||||
#if defined(CONFIG_SMDK2400)
|
||||
tbclk = timer_load_val * 100;
|
||||
#elif defined(CONFIG_SBC2410X) || \
|
||||
defined(CONFIG_SMDK2410) || \
|
||||
@@ -198,12 +198,6 @@ void reset_cpu(ulong ignored)
|
||||
{
|
||||
struct s3c24x0_watchdog *watchdog;
|
||||
|
||||
#ifdef CONFIG_TRAB
|
||||
extern void disable_vfd(void);
|
||||
|
||||
disable_vfd();
|
||||
#endif
|
||||
|
||||
watchdog = s3c24x0_get_base_watchdog();
|
||||
|
||||
/* Disable watchdog */
|
||||
|
||||
@@ -230,37 +230,37 @@ SMRDATA1:
|
||||
.word CONFIG_SYS_SDRC_MDR_VAL
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL2
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL1
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL3
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL2
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL3
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL4
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL5
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL6
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL7
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL8
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL9
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL4
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL10
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL5
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL11
|
||||
.word AT91_ASM_SDRAMC_TR
|
||||
.word CONFIG_SYS_SDRC_TR_VAL2
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL12
|
||||
/* User reset enable*/
|
||||
.word AT91_ASM_RSTC_MR
|
||||
|
||||
@@ -27,6 +27,11 @@ BIG_ENDIAN = y
|
||||
PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian
|
||||
|
||||
PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100
|
||||
|
||||
# -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error
|
||||
PLATFORM_RELFLAGS += -ffunction-sections
|
||||
LDFLAGS_u-boot += --gc-sections
|
||||
|
||||
# =========================================================================
|
||||
#
|
||||
# Supply options according to compiler version
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include <asm/arch/ixp425.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
ulong loops_per_jiffy;
|
||||
|
||||
static void cache_flush(void);
|
||||
|
||||
#if defined(CONFIG_DISPLAY_CPUINFO)
|
||||
@@ -51,17 +49,14 @@ int print_cpuinfo (void)
|
||||
puts("CPU: Intel IXP425 at ");
|
||||
switch ((id & 0x000003f0) >> 4) {
|
||||
case 0x1c:
|
||||
loops_per_jiffy = 887467;
|
||||
speed = 533;
|
||||
break;
|
||||
|
||||
case 0x1d:
|
||||
loops_per_jiffy = 666016;
|
||||
speed = 400;
|
||||
break;
|
||||
|
||||
case 0x1f:
|
||||
loops_per_jiffy = 442901;
|
||||
speed = 266;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ LIB := $(obj)libnpe.o
|
||||
|
||||
LOCAL_CFLAGS += -I$(TOPDIR)/arch/arm/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
|
||||
CFLAGS += $(LOCAL_CFLAGS)
|
||||
CPPFLAGS += $(LOCAL_CFLAGS) # needed for depend
|
||||
HOSTCFLAGS += $(LOCAL_CFLAGS)
|
||||
|
||||
COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \
|
||||
|
||||
@@ -359,36 +359,53 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
|
||||
|
||||
debug("%s: 1\n", __FUNCTION__);
|
||||
|
||||
miiphy_read (dev->name, p_npe->phy_no, MII_BMSR, ®_short);
|
||||
#ifdef CONFIG_MII_NPE0_FIXEDLINK
|
||||
if (0 == p_npe->eth_id) {
|
||||
speed = CONFIG_MII_NPE0_SPEED;
|
||||
duplex = CONFIG_MII_NPE0_FULLDUPLEX ? FULL : HALF;
|
||||
} else
|
||||
#endif
|
||||
#ifdef CONFIG_MII_NPE1_FIXEDLINK
|
||||
if (1 == p_npe->eth_id) {
|
||||
speed = CONFIG_MII_NPE1_SPEED;
|
||||
duplex = CONFIG_MII_NPE1_FULLDUPLEX ? FULL : HALF;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
miiphy_read(dev->name, p_npe->phy_no, MII_BMSR, ®_short);
|
||||
|
||||
/*
|
||||
* Wait if PHY is capable of autonegotiation and autonegotiation is not complete
|
||||
*/
|
||||
if ((reg_short & BMSR_ANEGCAPABLE) && !(reg_short & BMSR_ANEGCOMPLETE)) {
|
||||
puts ("Waiting for PHY auto negotiation to complete");
|
||||
i = 0;
|
||||
while (!(reg_short & BMSR_ANEGCOMPLETE)) {
|
||||
/*
|
||||
* Timeout reached ?
|
||||
*/
|
||||
if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
|
||||
puts (" TIMEOUT !\n");
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* Wait if PHY is capable of autonegotiation and
|
||||
* autonegotiation is not complete
|
||||
*/
|
||||
if ((reg_short & BMSR_ANEGCAPABLE) &&
|
||||
!(reg_short & BMSR_ANEGCOMPLETE)) {
|
||||
puts("Waiting for PHY auto negotiation to complete");
|
||||
i = 0;
|
||||
while (!(reg_short & BMSR_ANEGCOMPLETE)) {
|
||||
/*
|
||||
* Timeout reached ?
|
||||
*/
|
||||
if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
|
||||
puts(" TIMEOUT !\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if ((i++ % 1000) == 0) {
|
||||
putc ('.');
|
||||
miiphy_read (dev->name, p_npe->phy_no, MII_BMSR, ®_short);
|
||||
if ((i++ % 1000) == 0) {
|
||||
putc('.');
|
||||
miiphy_read(dev->name, p_npe->phy_no,
|
||||
MII_BMSR, ®_short);
|
||||
}
|
||||
udelay(1000); /* 1 ms */
|
||||
}
|
||||
udelay (1000); /* 1 ms */
|
||||
puts(" done\n");
|
||||
/* another 500 ms (results in faster booting) */
|
||||
udelay(500000);
|
||||
}
|
||||
puts (" done\n");
|
||||
udelay (500000); /* another 500 ms (results in faster booting) */
|
||||
speed = miiphy_speed(dev->name, p_npe->phy_no);
|
||||
duplex = miiphy_duplex(dev->name, p_npe->phy_no);
|
||||
}
|
||||
|
||||
speed = miiphy_speed (dev->name, p_npe->phy_no);
|
||||
duplex = miiphy_duplex (dev->name, p_npe->phy_no);
|
||||
|
||||
if (p_npe->print_speed) {
|
||||
p_npe->print_speed = 0;
|
||||
printf ("ENET Speed is %d Mbps - %s duplex connection\n",
|
||||
@@ -621,9 +638,12 @@ int npe_initialize(bd_t * bis)
|
||||
if (ixFeatureCtrlDeviceRead() == IX_FEATURE_CTRL_DEVICE_TYPE_IXP42X) {
|
||||
switch (ixFeatureCtrlProductIdRead() & IX_FEATURE_CTRL_SILICON_STEPPING_MASK) {
|
||||
case IX_FEATURE_CTRL_SILICON_TYPE_B0:
|
||||
default: /* newer than B0 */
|
||||
/*
|
||||
* If it is B0 Silicon, we only enable port when its corresponding
|
||||
* Eth Coprocessor is available.
|
||||
* If it is B0 or newer Silicon, we
|
||||
* only enable port when its
|
||||
* corresponding Eth Coprocessor is
|
||||
* available.
|
||||
*/
|
||||
if (ixFeatureCtrlComponentCheck(IX_FEATURECTRL_ETH0) ==
|
||||
IX_FEATURE_CTRL_COMPONENT_ENABLED)
|
||||
|
||||
@@ -65,7 +65,8 @@
|
||||
.endm
|
||||
|
||||
.globl _start
|
||||
_start: b reset
|
||||
_start:
|
||||
ldr pc, _reset
|
||||
ldr pc, _undefined_instruction
|
||||
ldr pc, _software_interrupt
|
||||
ldr pc, _prefetch_abort
|
||||
@@ -74,6 +75,7 @@ _start: b reset
|
||||
ldr pc, _irq
|
||||
ldr pc, _fiq
|
||||
|
||||
_reset: .word reset
|
||||
_undefined_instruction: .word undefined_instruction
|
||||
_software_interrupt: .word software_interrupt
|
||||
_prefetch_abort: .word prefetch_abort
|
||||
@@ -167,12 +169,6 @@ reset:
|
||||
str r1, [r2]
|
||||
|
||||
/* make sure flash is visible at 0 */
|
||||
#if 0
|
||||
ldr r2, =IXP425_EXP_CFG0
|
||||
ldr r1, [r2]
|
||||
orr r1, r1, #0x80000000
|
||||
str r1, [r2]
|
||||
#endif
|
||||
mov r1, #CONFIG_SYS_SDR_CONFIG
|
||||
ldr r2, =IXP425_SDR_CONFIG
|
||||
str r1, [r2]
|
||||
@@ -216,19 +212,6 @@ reset:
|
||||
str r1, [r4]
|
||||
DELAY_FOR 0x4000, r0
|
||||
|
||||
/* copy */
|
||||
mov r0, #0
|
||||
mov r4, r0
|
||||
add r2, r0, #CONFIG_SYS_MONITOR_LEN
|
||||
mov r1, #0x10000000
|
||||
mov r5, r1
|
||||
|
||||
30:
|
||||
ldr r3, [r0], #4
|
||||
str r3, [r1], #4
|
||||
cmp r0, r2
|
||||
bne 30b
|
||||
|
||||
/* invalidate I & D caches & BTB */
|
||||
mcr p15, 0, r0, c7, c7, 0
|
||||
CPWAIT r0
|
||||
@@ -241,19 +224,12 @@ reset:
|
||||
mcr p15, 0, r0, c7, c10, 4
|
||||
CPWAIT r0
|
||||
|
||||
/* move flash to 0x50000000 */
|
||||
/* remove flash mirror at 0x00000000 */
|
||||
ldr r2, =IXP425_EXP_CFG0
|
||||
ldr r1, [r2]
|
||||
bic r1, r1, #0x80000000
|
||||
str r1, [r2]
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
/* invalidate I & Data TLB */
|
||||
mcr p15, 0, r0, c8, c7, 0
|
||||
CPWAIT r0
|
||||
@@ -269,7 +245,7 @@ reset:
|
||||
orr r0,r0,#0x13
|
||||
msr cpsr,r0
|
||||
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
/* Set initial stackpointer in SDRAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
@@ -575,33 +551,5 @@ reset_cpu:
|
||||
str r1, [r2]
|
||||
b reset_endless
|
||||
|
||||
|
||||
reset_endless:
|
||||
|
||||
b reset_endless
|
||||
|
||||
#ifdef CONFIG_USE_IRQ
|
||||
|
||||
.LC0: .word loops_per_jiffy
|
||||
|
||||
/*
|
||||
* 0 <= r0 <= 2000
|
||||
*/
|
||||
.globl __udelay
|
||||
__udelay:
|
||||
mov r2, #0x6800
|
||||
orr r2, r2, #0x00db
|
||||
mul r0, r2, r0
|
||||
ldr r2, .LC0
|
||||
ldr r2, [r2] @ max = 0x0fffffff
|
||||
mov r0, r0, lsr #11 @ max = 0x00003fff
|
||||
mov r2, r2, lsr #11 @ max = 0x0003ffff
|
||||
mul r0, r2, r0 @ max = 2^32-1
|
||||
movs r0, r0, lsr #6
|
||||
|
||||
delay_loop:
|
||||
subs r0, r0, #1
|
||||
bne delay_loop
|
||||
mov pc, lr
|
||||
|
||||
#endif /* CONFIG_USE_IRQ */
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/*
|
||||
* (C) Copyright 2010
|
||||
* Michael Schwingen, michael@schwingen.org
|
||||
*
|
||||
* (C) Copyright 2006
|
||||
* Stefan Roese, DENX Software Engineering, sr@denx.de.
|
||||
*
|
||||
@@ -31,105 +34,94 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/ixp425.h>
|
||||
#include <asm/io.h>
|
||||
#include <div64.h>
|
||||
|
||||
#ifdef CONFIG_TIMER_IRQ
|
||||
|
||||
#define FREQ 66666666
|
||||
#define CLOCK_TICK_RATE (((FREQ / CONFIG_SYS_HZ & ~IXP425_OST_RELOAD_MASK) + 1) * CONFIG_SYS_HZ)
|
||||
#define LATCH ((CLOCK_TICK_RATE + CONFIG_SYS_HZ/2) / CONFIG_SYS_HZ) /* For divider */
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/*
|
||||
* When interrupts are enabled, use timer 2 for time/delay generation...
|
||||
* The IXP42x time-stamp timer runs at 2*OSC_IN (66.666MHz when using a
|
||||
* 33.333MHz crystal).
|
||||
*/
|
||||
|
||||
static volatile ulong timestamp;
|
||||
|
||||
static void timer_isr(void *data)
|
||||
static inline unsigned long long tick_to_time(unsigned long long tick)
|
||||
{
|
||||
unsigned int *pTime = (unsigned int *)data;
|
||||
|
||||
(*pTime)++;
|
||||
|
||||
/*
|
||||
* Reset IRQ source
|
||||
*/
|
||||
*IXP425_OSST = IXP425_OSST_TIMER_2_PEND;
|
||||
tick *= CONFIG_SYS_HZ;
|
||||
do_div(tick, CONFIG_IXP425_TIMER_CLK);
|
||||
return tick;
|
||||
}
|
||||
|
||||
ulong get_timer (ulong base)
|
||||
static inline unsigned long long time_to_tick(unsigned long long time)
|
||||
{
|
||||
return timestamp - base;
|
||||
time *= CONFIG_IXP425_TIMER_CLK;
|
||||
do_div(time, CONFIG_SYS_HZ);
|
||||
return time;
|
||||
}
|
||||
|
||||
void reset_timer (void)
|
||||
static inline unsigned long long us_to_tick(unsigned long long us)
|
||||
{
|
||||
timestamp = 0;
|
||||
us = us * CONFIG_IXP425_TIMER_CLK + 999999;
|
||||
do_div(us, 1000000);
|
||||
return us;
|
||||
}
|
||||
|
||||
int timer_init (void)
|
||||
unsigned long long get_ticks(void)
|
||||
{
|
||||
/* install interrupt handler for timer */
|
||||
irq_install_handler(IXP425_TIMER_2_IRQ, timer_isr, (void *)×tamp);
|
||||
ulong now = readl(IXP425_OSTS_B);
|
||||
|
||||
/* setup the Timer counter value */
|
||||
*IXP425_OSRT2 = (LATCH & ~IXP425_OST_RELOAD_MASK) | IXP425_OST_ENABLE;
|
||||
|
||||
/* enable timer irq */
|
||||
*IXP425_ICMR = (1 << IXP425_TIMER_2_IRQ);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
ulong get_timer (ulong base)
|
||||
{
|
||||
return get_timer_masked () - base;
|
||||
}
|
||||
|
||||
void ixp425_udelay(unsigned long usec)
|
||||
{
|
||||
/*
|
||||
* This function has a max usec, but since it is called from udelay
|
||||
* we should not have to worry... be happy
|
||||
*/
|
||||
unsigned long usecs = CONFIG_SYS_HZ/1000000L & ~IXP425_OST_RELOAD_MASK;
|
||||
|
||||
*IXP425_OSST = IXP425_OSST_TIMER_1_PEND;
|
||||
usecs |= IXP425_OST_ONE_SHOT | IXP425_OST_ENABLE;
|
||||
*IXP425_OSRT1 = usecs;
|
||||
while (!(*IXP425_OSST & IXP425_OSST_TIMER_1_PEND));
|
||||
}
|
||||
|
||||
void __udelay (unsigned long usec)
|
||||
{
|
||||
while (usec--) ixp425_udelay(1);
|
||||
}
|
||||
|
||||
static ulong reload_constant = 0xfffffff0;
|
||||
|
||||
void reset_timer_masked (void)
|
||||
{
|
||||
ulong reload = reload_constant | IXP425_OST_ONE_SHOT | IXP425_OST_ENABLE;
|
||||
|
||||
*IXP425_OSST = IXP425_OSST_TIMER_1_PEND;
|
||||
*IXP425_OSRT1 = reload;
|
||||
}
|
||||
|
||||
ulong get_timer_masked (void)
|
||||
{
|
||||
/*
|
||||
* Note that it is possible for this to wrap!
|
||||
* In this case we return max.
|
||||
*/
|
||||
ulong current = *IXP425_OST1;
|
||||
if (*IXP425_OSST & IXP425_OSST_TIMER_1_PEND)
|
||||
{
|
||||
return reload_constant;
|
||||
if (readl(IXP425_OSST) & IXP425_OSST_TIMER_TS_PEND) {
|
||||
/* rollover of timestamp timer register */
|
||||
gd->timestamp += (0xFFFFFFFF - gd->lastinc) + now + 1;
|
||||
writel(IXP425_OSST_TIMER_TS_PEND, IXP425_OSST);
|
||||
} else {
|
||||
/* move stamp forward with absolut diff ticks */
|
||||
gd->timestamp += (now - gd->lastinc);
|
||||
}
|
||||
return (reload_constant - current);
|
||||
gd->lastinc = now;
|
||||
return gd->timestamp;
|
||||
}
|
||||
|
||||
|
||||
void reset_timer_masked(void)
|
||||
{
|
||||
/* capture current timestamp counter */
|
||||
gd->lastinc = readl(IXP425_OSTS_B);
|
||||
/* start "advancing" time stamp from 0 */
|
||||
gd->timestamp = 0;
|
||||
}
|
||||
|
||||
void reset_timer(void)
|
||||
{
|
||||
reset_timer_masked();
|
||||
}
|
||||
|
||||
ulong get_timer_masked(void)
|
||||
{
|
||||
return tick_to_time(get_ticks());
|
||||
}
|
||||
|
||||
ulong get_timer(ulong base)
|
||||
{
|
||||
return get_timer_masked() - base;
|
||||
}
|
||||
|
||||
void set_timer(ulong t)
|
||||
{
|
||||
gd->timestamp = time_to_tick(t);
|
||||
}
|
||||
|
||||
/* delay x useconds AND preserve advance timestamp value */
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
unsigned long long tmp;
|
||||
|
||||
tmp = get_ticks() + us_to_tick(usec);
|
||||
|
||||
while (get_ticks() < tmp)
|
||||
;
|
||||
}
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
writel(IXP425_OSST_TIMER_TS_PEND, IXP425_OSST);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
.text :
|
||||
{
|
||||
arch/arm/cpu/ixp/start.o(.text)
|
||||
*(.text)
|
||||
arch/arm/cpu/ixp/start.o(.text*)
|
||||
*(.text*)
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
@@ -40,7 +40,7 @@ SECTIONS
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : {
|
||||
*(.data)
|
||||
*(.data*)
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
@@ -67,7 +67,7 @@ SECTIONS
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
}
|
||||
|
||||
@@ -26,18 +26,18 @@
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x11C)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x11C)
|
||||
#elif defined(CONFIG_AT91SAM9261)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x30)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x30)
|
||||
#elif defined(CONFIG_AT91SAM9263)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x120)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x120)
|
||||
#elif defined(CONFIG_AT91SAM9G45)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x128)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x128)
|
||||
#else
|
||||
#error AT91_ASM_MATRIX_CSA0 is not definied for current CPU
|
||||
#endif
|
||||
|
||||
#define AT91_ASM_MATRIX_MCFG AT91_MATRIX_BASE
|
||||
#define AT91_ASM_MATRIX_MCFG ATMEL_BASE_MATRIX
|
||||
|
||||
#else
|
||||
#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
#ifndef AT91_MC_H
|
||||
#define AT91_MC_H
|
||||
|
||||
#define AT91_ASM_MC_EBI_CSA (AT91_MC_BASE + 0x60)
|
||||
#define AT91_ASM_MC_EBI_CFG (AT91_MC_BASE + 0x64)
|
||||
#define AT91_ASM_MC_SMC_CSR0 (AT91_MC_BASE + 0x70)
|
||||
#define AT91_ASM_MC_SDRAMC_MR (AT91_MC_BASE + 0x90)
|
||||
#define AT91_ASM_MC_SDRAMC_TR (AT91_MC_BASE + 0x94)
|
||||
#define AT91_ASM_MC_SDRAMC_CR (AT91_MC_BASE + 0x98)
|
||||
#define AT91_ASM_MC_EBI_CSA (ATMEL_BASE_MC + 0x60)
|
||||
#define AT91_ASM_MC_EBI_CFG (ATMEL_BASE_MC + 0x64)
|
||||
#define AT91_ASM_MC_SMC_CSR0 (ATMEL_BASE_MC + 0x70)
|
||||
#define AT91_ASM_MC_SDRAMC_MR (ATMEL_BASE_MC + 0x90)
|
||||
#define AT91_ASM_MC_SDRAMC_TR (ATMEL_BASE_MC + 0x94)
|
||||
#define AT91_ASM_MC_SDRAMC_CR (ATMEL_BASE_MC + 0x98)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
|
||||
#define AT91_ASM_PIO_RANGE 0x200
|
||||
#define AT91_ASM_PIOC_ASR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x70)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x70)
|
||||
#define AT91_ASM_PIOC_BSR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x74)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x74)
|
||||
#define AT91_ASM_PIOC_PDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x04)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x04)
|
||||
#define AT91_ASM_PIOC_PUDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x60)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x60)
|
||||
|
||||
#define AT91_ASM_PIOD_PDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x04)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x04)
|
||||
#define AT91_ASM_PIOD_PUDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x60)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x60)
|
||||
#define AT91_ASM_PIOD_ASR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x70)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x70)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
#ifndef AT91_PMC_H
|
||||
#define AT91_PMC_H
|
||||
|
||||
#define AT91_ASM_PMC_MOR (AT91_PMC_BASE + 0x20)
|
||||
#define AT91_ASM_PMC_PLLAR (AT91_PMC_BASE + 0x28)
|
||||
#define AT91_ASM_PMC_PLLBR (AT91_PMC_BASE + 0x2c)
|
||||
#define AT91_ASM_PMC_MCKR (AT91_PMC_BASE + 0x30)
|
||||
#define AT91_ASM_PMC_SR (AT91_PMC_BASE + 0x68)
|
||||
#define AT91_ASM_PMC_MOR (ATMEL_BASE_PMC + 0x20)
|
||||
#define AT91_ASM_PMC_PLLAR (ATMEL_BASE_PMC + 0x28)
|
||||
#define AT91_ASM_PMC_PLLBR (ATMEL_BASE_PMC + 0x2c)
|
||||
#define AT91_ASM_PMC_MCKR (ATMEL_BASE_PMC + 0x30)
|
||||
#define AT91_ASM_PMC_SR (ATMEL_BASE_PMC + 0x68)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef AT91_RSTC_H
|
||||
#define AT91_RSTC_H
|
||||
|
||||
#define AT91_ASM_RSTC_MR (AT91_RSTC_BASE + 0x08)
|
||||
#define AT91_ASM_RSTC_MR (ATMEL_BASE_RSTC + 0x08)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#define AT91_ASM_WDT_MR (AT91_WDT_BASE + 0x04)
|
||||
#define AT91_ASM_WDT_MR (ATMEL_BASE_WDT + 0x04)
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -21,115 +21,126 @@
|
||||
#ifndef __AT91RM9200_H__
|
||||
#define __AT91RM9200_H__
|
||||
|
||||
#define CONFIG_AT91FAMILY /* it's a member of AT91 */
|
||||
#define CONFIG_ARM920T /* This is an ARM920T Core */
|
||||
|
||||
/* Periperial Identifiers */
|
||||
|
||||
#define AT91_ID_SYS 1 /* System Peripheral */
|
||||
#define AT91_ID_PIOA 2 /* PIO port A */
|
||||
#define AT91_ID_PIOB 3 /* PIO port B */
|
||||
#define AT91_ID_PIOC 4 /* PIO port C */
|
||||
#define AT91_ID_PIOD 5 /* PIO port D BGA only */
|
||||
#define AT91_ID_USART0 6 /* USART 0 */
|
||||
#define AT91_ID_USART1 7 /* USART 1 */
|
||||
#define AT91_ID_USART2 8 /* USART 2 */
|
||||
#define AT91_ID_USART3 9 /* USART 3 */
|
||||
#define AT91_ID_MCI 10 /* Multimedia Card Interface */
|
||||
#define AT91_ID_UDP 11 /* USB Device Port */
|
||||
#define AT91_ID_TWI 12 /* Two Wire Interface */
|
||||
#define AT91_ID_SPI 13 /* Serial Peripheral Interface */
|
||||
#define AT91_ID_SSC0 14 /* Synch. Serial Controller 0 */
|
||||
#define AT91_ID_SSC1 15 /* Synch. Serial Controller 1 */
|
||||
#define AT91_ID_SSC2 16 /* Synch. Serial Controller 2 */
|
||||
#define AT91_ID_TC0 17 /* Timer Counter 0 */
|
||||
#define AT91_ID_TC1 18 /* Timer Counter 1 */
|
||||
#define AT91_ID_TC2 19 /* Timer Counter 2 */
|
||||
#define AT91_ID_TC3 20 /* Timer Counter 3 */
|
||||
#define AT91_ID_TC4 21 /* Timer Counter 4 */
|
||||
#define AT91_ID_TC5 22 /* Timer Counter 5 */
|
||||
#define AT91_ID_UHP 23 /* OHCI USB Host Port */
|
||||
#define AT91_ID_EMAC 24 /* Ethernet MAC */
|
||||
#define AT91_ID_IRQ0 25 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ1 26 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ2 27 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ3 28 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ4 29 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ5 30 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ6 31 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_SYS 1 /* System Peripheral */
|
||||
#define ATMEL_ID_PIOA 2 /* PIO port A */
|
||||
#define ATMEL_ID_PIOB 3 /* PIO port B */
|
||||
#define ATMEL_ID_PIOC 4 /* PIO port C */
|
||||
#define ATMEL_ID_PIOD 5 /* PIO port D BGA only */
|
||||
#define ATMEL_ID_USART0 6 /* USART 0 */
|
||||
#define ATMEL_ID_USART1 7 /* USART 1 */
|
||||
#define ATMEL_ID_USART2 8 /* USART 2 */
|
||||
#define ATMEL_ID_USART3 9 /* USART 3 */
|
||||
#define ATMEL_ID_MCI 10 /* Multimedia Card Interface */
|
||||
#define ATMEL_ID_UDP 11 /* USB Device Port */
|
||||
#define ATMEL_ID_TWI 12 /* Two Wire Interface */
|
||||
#define ATMEL_ID_SPI 13 /* Serial Peripheral Interface */
|
||||
#define ATMEL_ID_SSC0 14 /* Synch. Serial Controller 0 */
|
||||
#define ATMEL_ID_SSC1 15 /* Synch. Serial Controller 1 */
|
||||
#define ATMEL_ID_SSC2 16 /* Synch. Serial Controller 2 */
|
||||
#define ATMEL_ID_TC0 17 /* Timer Counter 0 */
|
||||
#define ATMEL_ID_TC1 18 /* Timer Counter 1 */
|
||||
#define ATMEL_ID_TC2 19 /* Timer Counter 2 */
|
||||
#define ATMEL_ID_TC3 20 /* Timer Counter 3 */
|
||||
#define ATMEL_ID_TC4 21 /* Timer Counter 4 */
|
||||
#define ATMEL_ID_TC5 22 /* Timer Counter 5 */
|
||||
#define ATMEL_ID_UHP 23 /* OHCI USB Host Port */
|
||||
#define ATMEL_ID_EMAC 24 /* Ethernet MAC */
|
||||
#define ATMEL_ID_IRQ0 25 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ1 26 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ2 27 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ3 28 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ4 29 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ5 30 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ6 31 /* Advanced Interrupt Controller */
|
||||
|
||||
#define AT91_USB_HOST_BASE 0x00300000
|
||||
#define ATMEL_USB_HOST_BASE 0x00300000
|
||||
|
||||
#define AT91_TC_BASE 0xFFFA0000
|
||||
#define AT91_UDP_BASE 0xFFFB0000
|
||||
#define AT91_MCI_BASE 0xFFFB4000
|
||||
#define AT91_TWI_BASE 0xFFFB8000
|
||||
#define AT91_EMAC_BASE 0xFFFBC000
|
||||
#define AT91_USART_BASE 0xFFFC0000 /* 4x 0x4000 Offset */
|
||||
#define AT91_SCC_BASE 0xFFFD0000 /* 4x 0x4000 Offset */
|
||||
#define AT91_SPI_BASE 0xFFFE0000
|
||||
#define ATMEL_BASE_TC 0xFFFA0000
|
||||
#define ATMEL_BASE_UDP 0xFFFB0000
|
||||
#define ATMEL_BASE_MCI 0xFFFB4000
|
||||
#define ATMEL_BASE_TWI 0xFFFB8000
|
||||
#define ATMEL_BASE_EMAC 0xFFFBC000
|
||||
#define ATMEL_BASE_USART 0xFFFC0000 /* 4x 0x4000 Offset */
|
||||
#define ATMEL_BASE_USART0 ATMEL_BASE_USART
|
||||
#define ATMEL_BASE_USART1 (ATMEL_BASE_USART + 0x4000)
|
||||
#define ATMEL_BASE_USART2 (ATMEL_BASE_USART + 0x8000)
|
||||
#define ATMEL_BASE_USART3 (ATMEL_BASE_USART + 0xC000)
|
||||
|
||||
#define AT91_AIC_BASE 0xFFFFF000
|
||||
#define AT91_DBGU_BASE 0xFFFFF200
|
||||
#define AT91_PIO_BASE 0xFFFFF400 /* 4x 0x200 Offset */
|
||||
#define AT91_PMC_BASE 0xFFFFFC00
|
||||
#define AT91_ST_BASE 0xFFFFFD00
|
||||
#define AT91_ST_BASE 0xFFFFFD00
|
||||
#define AT91_RTC_BASE 0xFFFFFE00
|
||||
#define AT91_MC_BASE 0xFFFFFF00
|
||||
#define ATMEL_BASE_SCC 0xFFFD0000 /* 4x 0x4000 Offset */
|
||||
#define ATMEL_BASE_SPI 0xFFFE0000
|
||||
|
||||
#define ATMEL_BASE_AIC 0xFFFFF000
|
||||
#define ATMEL_BASE_DBGU 0xFFFFF200
|
||||
#define ATMEL_BASE_PIO 0xFFFFF400 /* 4x 0x200 Offset */
|
||||
#define ATMEL_BASE_PMC 0xFFFFFC00
|
||||
#define ATMEL_BASE_ST 0xFFFFFD00
|
||||
#define ATMEL_BASE_RTC 0xFFFFFE00
|
||||
#define ATMEL_BASE_MC 0xFFFFFF00
|
||||
|
||||
#define AT91_PIO_BASE ATMEL_BASE_PIO
|
||||
|
||||
/* AT91RM9200 Periperial Multiplexing A */
|
||||
/* Port A */
|
||||
#define AT91_PMX_AA_EREFCK 0x00000080
|
||||
#define AT91_PMX_AA_ETXCK 0x00000080
|
||||
#define AT91_PMX_AA_ETXEN 0x00000100
|
||||
#define AT91_PMX_AA_ETX0 0x00000200
|
||||
#define AT91_PMX_AA_ETX1 0x00000400
|
||||
#define AT91_PMX_AA_ECRS 0x00000800
|
||||
#define AT91_PMX_AA_ECRSDV 0x00000800
|
||||
#define AT91_PMX_AA_ERX0 0x00001000
|
||||
#define AT91_PMX_AA_ERX1 0x00002000
|
||||
#define AT91_PMX_AA_ERXER 0x00004000
|
||||
#define AT91_PMX_AA_EMDC 0x00008000
|
||||
#define AT91_PMX_AA_EMDIO 0x00010000
|
||||
#define ATMEL_PMX_AA_EREFCK 0x00000080
|
||||
#define ATMEL_PMX_AA_ETXCK 0x00000080
|
||||
#define ATMEL_PMX_AA_ETXEN 0x00000100
|
||||
#define ATMEL_PMX_AA_ETX0 0x00000200
|
||||
#define ATMEL_PMX_AA_ETX1 0x00000400
|
||||
#define ATMEL_PMX_AA_ECRS 0x00000800
|
||||
#define ATMEL_PMX_AA_ECRSDV 0x00000800
|
||||
#define ATMEL_PMX_AA_ERX0 0x00001000
|
||||
#define ATMEL_PMX_AA_ERX1 0x00002000
|
||||
#define ATMEL_PMX_AA_ERXER 0x00004000
|
||||
#define ATMEL_PMX_AA_EMDC 0x00008000
|
||||
#define ATMEL_PMX_AA_EMDIO 0x00010000
|
||||
|
||||
#define AT91_PMX_AA_TXD2 0x00810000
|
||||
#define ATMEL_PMX_AA_TXD2 0x00810000
|
||||
|
||||
#define AT91_PMX_AA_TWD 0x02000000
|
||||
#define AT91_PMX_AA_TWCK 0x04000000
|
||||
#define ATMEL_PMX_AA_TWD 0x02000000
|
||||
#define ATMEL_PMX_AA_TWCK 0x04000000
|
||||
|
||||
/* Port B */
|
||||
#define AT91_PMX_BA_ERXCK 0x00080000
|
||||
#define AT91_PMX_BA_ECOL 0x00040000
|
||||
#define AT91_PMX_BA_ERXDV 0x00020000
|
||||
#define AT91_PMX_BA_ERX3 0x00010000
|
||||
#define AT91_PMX_BA_ERX2 0x00008000
|
||||
#define AT91_PMX_BA_ETXER 0x00004000
|
||||
#define AT91_PMX_BA_ETX3 0x00002000
|
||||
#define AT91_PMX_BA_ETX2 0x00001000
|
||||
#define ATMEL_PMX_BA_ERXCK 0x00080000
|
||||
#define ATMEL_PMX_BA_ECOL 0x00040000
|
||||
#define ATMEL_PMX_BA_ERXDV 0x00020000
|
||||
#define ATMEL_PMX_BA_ERX3 0x00010000
|
||||
#define ATMEL_PMX_BA_ERX2 0x00008000
|
||||
#define ATMEL_PMX_BA_ETXER 0x00004000
|
||||
#define ATMEL_PMX_BA_ETX3 0x00002000
|
||||
#define ATMEL_PMX_BA_ETX2 0x00001000
|
||||
|
||||
/* Port B */
|
||||
|
||||
#define AT91_PMX_CA_BFCK 0x00000001
|
||||
#define AT91_PMX_CA_BFRDY 0x00000002
|
||||
#define AT91_PMX_CA_SMOE 0x00000002
|
||||
#define AT91_PMX_CA_BFAVD 0x00000004
|
||||
#define AT91_PMX_CA_BFBAA 0x00000008
|
||||
#define AT91_PMX_CA_SMWE 0x00000008
|
||||
#define AT91_PMX_CA_BFOE 0x00000010
|
||||
#define AT91_PMX_CA_BFWE 0x00000020
|
||||
#define AT91_PMX_CA_NWAIT 0x00000040
|
||||
#define AT91_PMX_CA_A23 0x00000080
|
||||
#define AT91_PMX_CA_A24 0x00000100
|
||||
#define AT91_PMX_CA_A25 0x00000200
|
||||
#define AT91_PMX_CA_CFRNW 0x00000200
|
||||
#define AT91_PMX_CA_NCS4 0x00000400
|
||||
#define AT91_PMX_CA_CFCS 0x00000400
|
||||
#define AT91_PMX_CA_NCS5 0x00000800
|
||||
#define AT91_PMX_CA_CFCE1 0x00001000
|
||||
#define AT91_PMX_CA_NCS6 0x00001000
|
||||
#define AT91_PMX_CA_CFCE2 0x00002000
|
||||
#define AT91_PMX_CA_NCS7 0x00002000
|
||||
#define AT91_PMX_CA_D16_31 0xFFFF0000
|
||||
#define ATMEL_PMX_CA_BFCK 0x00000001
|
||||
#define ATMEL_PMX_CA_BFRDY 0x00000002
|
||||
#define ATMEL_PMX_CA_SMOE 0x00000002
|
||||
#define ATMEL_PMX_CA_BFAVD 0x00000004
|
||||
#define ATMEL_PMX_CA_BFBAA 0x00000008
|
||||
#define ATMEL_PMX_CA_SMWE 0x00000008
|
||||
#define ATMEL_PMX_CA_BFOE 0x00000010
|
||||
#define ATMEL_PMX_CA_BFWE 0x00000020
|
||||
#define ATMEL_PMX_CA_NWAIT 0x00000040
|
||||
#define ATMEL_PMX_CA_A23 0x00000080
|
||||
#define ATMEL_PMX_CA_A24 0x00000100
|
||||
#define ATMEL_PMX_CA_A25 0x00000200
|
||||
#define ATMEL_PMX_CA_CFRNW 0x00000200
|
||||
#define ATMEL_PMX_CA_NCS4 0x00000400
|
||||
#define ATMEL_PMX_CA_CFCS 0x00000400
|
||||
#define ATMEL_PMX_CA_NCS5 0x00000800
|
||||
#define ATMEL_PMX_CA_CFCE1 0x00001000
|
||||
#define ATMEL_PMX_CA_NCS6 0x00001000
|
||||
#define ATMEL_PMX_CA_CFCE2 0x00002000
|
||||
#define ATMEL_PMX_CA_NCS7 0x00002000
|
||||
#define ATMEL_PMX_CA_D16_31 0xFFFF0000
|
||||
|
||||
#define CONFIG_SYS_AT91_CPU_NAME "AT91RM9200"
|
||||
#define ATMEL_PIO_PORTS 4 /* theese SoCs have 4 PIO */
|
||||
#define ATMEL_PMC_UHP AT91RM9200_PMC_UHP
|
||||
|
||||
#define CONFIG_SYS_ATMEL_CPU_NAME "AT91RM9200"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
*/
|
||||
#define ATMEL_PIO_PORTS 3 /* these SoCs have 3 PIO */
|
||||
#define ATMEL_PMC_UHP AT91SAM926x_PMC_UHP
|
||||
#define ATMEL_BASE_PIO ATMEL_BASE_PIOA
|
||||
|
||||
/*
|
||||
* SoC specific defines
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
* Other misc defines
|
||||
*/
|
||||
#define ATMEL_PIO_PORTS 3 /* theese SoCs have 3 PIO */
|
||||
#define ATMEL_BASE_PIO ATMEL_BASE_PIOA
|
||||
|
||||
/*
|
||||
* SoC specific defines
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
* Other misc defines
|
||||
*/
|
||||
#define ATMEL_PIO_PORTS 5 /* this SoCs has 5 PIO */
|
||||
#define ATMEL_BASE_PIO ATMEL_BASE_PIOA
|
||||
|
||||
/*
|
||||
* Cpu Name
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#ifndef AT91_SDRAMC_BASE
|
||||
#define AT91_SDRAMC_BASE AT91_SDRAMC0_BASE
|
||||
#ifndef ATMEL_BASE_SDRAMC
|
||||
#define ATMEL_BASE_SDRAMC AT91_SDRAMC0_BASE
|
||||
#endif
|
||||
|
||||
#define AT91_ASM_SDRAMC_MR AT91_SDRAMC_BASE
|
||||
#define AT91_ASM_SDRAMC_TR (AT91_SDRAMC_BASE + 0x04)
|
||||
#define AT91_ASM_SDRAMC_CR (AT91_SDRAMC_BASE + 0x08)
|
||||
#define AT91_ASM_SDRAMC_MDR (AT91_SDRAMC_BASE + 0x24)
|
||||
#define AT91_ASM_SDRAMC_MR ATMEL_BASE_SDRAMC
|
||||
#define AT91_ASM_SDRAMC_TR (ATMEL_BASE_SDRAMC + 0x04)
|
||||
#define AT91_ASM_SDRAMC_CR (ATMEL_BASE_SDRAMC + 0x08)
|
||||
#define AT91_ASM_SDRAMC_MDR (ATMEL_BASE_SDRAMC + 0x24)
|
||||
|
||||
#endif
|
||||
|
||||
/* SDRAM Controller (SDRAMC) registers */
|
||||
#define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */
|
||||
#define AT91_SDRAMC_MR (ATMEL_BASE_SDRAMC + 0x00) /* SDRAM Controller Mode Register */
|
||||
#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
|
||||
#define AT91_SDRAMC_MODE_NORMAL 0
|
||||
#define AT91_SDRAMC_MODE_NOP 1
|
||||
@@ -41,10 +41,10 @@
|
||||
#define AT91_SDRAMC_MODE_EXT_LMR 5
|
||||
#define AT91_SDRAMC_MODE_DEEP 6
|
||||
|
||||
#define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */
|
||||
#define AT91_SDRAMC_TR (ATMEL_BASE_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */
|
||||
#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */
|
||||
|
||||
#define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */
|
||||
#define AT91_SDRAMC_CR (ATMEL_BASE_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */
|
||||
#define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */
|
||||
#define AT91_SDRAMC_NC_8 (0 << 0)
|
||||
#define AT91_SDRAMC_NC_9 (1 << 0)
|
||||
@@ -71,7 +71,7 @@
|
||||
#define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */
|
||||
#define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */
|
||||
|
||||
#define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */
|
||||
#define AT91_SDRAMC_LPR (ATMEL_BASE_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */
|
||||
#define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */
|
||||
#define AT91_SDRAMC_LPCB_DISABLE 0
|
||||
#define AT91_SDRAMC_LPCB_SELF_REFRESH 1
|
||||
@@ -85,13 +85,13 @@
|
||||
#define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12)
|
||||
#define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12)
|
||||
|
||||
#define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */
|
||||
#define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */
|
||||
#define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */
|
||||
#define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */
|
||||
#define AT91_SDRAMC_IER (ATMEL_BASE_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */
|
||||
#define AT91_SDRAMC_IDR (ATMEL_BASE_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */
|
||||
#define AT91_SDRAMC_IMR (ATMEL_BASE_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */
|
||||
#define AT91_SDRAMC_ISR (ATMEL_BASE_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */
|
||||
#define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */
|
||||
|
||||
#define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory Device Register */
|
||||
#define AT91_SDRAMC_MDR (ATMEL_BASE_SDRAMC + 0x24) /* SDRAM Memory Device Register */
|
||||
#define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */
|
||||
#define AT91_SDRAMC_MD_SDRAM 0
|
||||
#define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#ifndef AT91_SMC_BASE
|
||||
#define AT91_SMC_BASE AT91_SMC0_BASE
|
||||
#ifndef ATMEL_BASE_SMC
|
||||
#define ATMEL_BASE_SMC ATMEL_BASE_SMC0
|
||||
#endif
|
||||
|
||||
#define AT91_ASM_SMC_SETUP0 AT91_SMC_BASE
|
||||
#define AT91_ASM_SMC_PULSE0 (AT91_SMC_BASE + 0x04)
|
||||
#define AT91_ASM_SMC_CYCLE0 (AT91_SMC_BASE + 0x08)
|
||||
#define AT91_ASM_SMC_MODE0 (AT91_SMC_BASE + 0x0C)
|
||||
#define AT91_ASM_SMC_SETUP0 ATMEL_BASE_SMC
|
||||
#define AT91_ASM_SMC_PULSE0 (ATMEL_BASE_SMC + 0x04)
|
||||
#define AT91_ASM_SMC_CYCLE0 (ATMEL_BASE_SMC + 0x08)
|
||||
#define AT91_ASM_SMC_MODE0 (ATMEL_BASE_SMC + 0x0C)
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -391,9 +391,8 @@
|
||||
#define IXP425_TIMER_REG(x) (IXP425_TIMER_BASE_PHYS+(x))
|
||||
#endif
|
||||
|
||||
#if 0 /* test-only: also defined in npe/include/... */
|
||||
#define IXP425_OSTS IXP425_TIMER_REG(IXP425_OSTS_OFFSET)
|
||||
#endif
|
||||
/* _B to avoid collision: also defined in npe/include/... */
|
||||
#define IXP425_OSTS_B IXP425_TIMER_REG(IXP425_OSTS_OFFSET)
|
||||
#define IXP425_OST1 IXP425_TIMER_REG(IXP425_OST1_OFFSET)
|
||||
#define IXP425_OSRT1 IXP425_TIMER_REG(IXP425_OSRT1_OFFSET)
|
||||
#define IXP425_OST2 IXP425_TIMER_REG(IXP425_OST2_OFFSET)
|
||||
|
||||
@@ -22,88 +22,21 @@
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _IXP425PCI_H_
|
||||
#define _IXP425PCI_H_
|
||||
#ifndef _IXP425PCI_H
|
||||
#define _IXP425PCI_H
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define OK 0
|
||||
#define ERROR -1
|
||||
#define BOOL int
|
||||
|
||||
#define IXP425_PCI_MAX_BAR_PER_FUNC 6
|
||||
#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC * \
|
||||
IXP425_PCI_MAX_FUNC_ON_BUS)
|
||||
|
||||
enum PciBarId
|
||||
{
|
||||
CSR_BAR=0,
|
||||
IO_BAR,
|
||||
SD_BAR,
|
||||
NO_BAR
|
||||
};
|
||||
|
||||
/*Base address register descriptor*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned int address;
|
||||
} PciBar;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int bus;
|
||||
unsigned int device;
|
||||
unsigned int func;
|
||||
unsigned int irq;
|
||||
BOOL error;
|
||||
unsigned short vendor_id;
|
||||
unsigned short device_id;
|
||||
/*We need an extra entry in this array for dummy placeholder*/
|
||||
PciBar bar[IXP425_PCI_MAX_BAR_PER_FUNC + 1];
|
||||
} PciDevice;
|
||||
struct pci_controller;
|
||||
extern void pci_ixp_init(struct pci_controller *hose);
|
||||
|
||||
/* Mask definitions*/
|
||||
#define IXP425_PCI_TOP_WORD_OF_LONG_MASK 0xffff0000
|
||||
#define IXP425_PCI_TOP_BYTE_OF_LONG_MASK 0xff000000
|
||||
#define IXP425_PCI_BOTTOM_WORD_OF_LONG_MASK 0x0000ffff
|
||||
#define IXP425_PCI_BOTTOM_TRIBYTES_OF_LONG_MASK 0x00ffffff
|
||||
#define IXP425_PCI_BOTTOM_NIBBLE_OF_LONG_MASK 0x0000000f
|
||||
#define IXP425_PCI_MAX_UINT32 0xffffffff
|
||||
|
||||
|
||||
#define IXP425_PCI_BAR_QUERY 0xffffffff
|
||||
|
||||
#define IXP425_PCI_BAR_MEM_BASE 0x100000
|
||||
#define IXP425_PCI_BAR_IO_BASE 0x000000
|
||||
|
||||
/*define the maximum number of bus segments - we support a single segment*/
|
||||
#define IXP425_PCI_MAX_BUS 1
|
||||
/*define the maximum number of cards per bus segment*/
|
||||
#define IXP425_PCI_MAX_DEV 4
|
||||
/*define the maximum number of functions per device*/
|
||||
#define IXP425_PCI_MAX_FUNC 8
|
||||
/* define the maximum number of separate functions that we can
|
||||
potentially have on the bus*/
|
||||
#define IXP425_PCI_MAX_FUNC_ON_BUS (1+ IXP425_PCI_MAX_FUNC * \
|
||||
IXP425_PCI_MAX_DEV * \
|
||||
IXP425_PCI_MAX_BUS)
|
||||
/*define the maximum number of BARs per function*/
|
||||
#define IXP425_PCI_MAX_BAR_PER_FUNC 6
|
||||
#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC * \
|
||||
IXP425_PCI_MAX_FUNC_ON_BUS)
|
||||
|
||||
#define PCI_NP_CBE_BESL (4)
|
||||
#define PCI_NP_AD_FUNCSL (8)
|
||||
|
||||
#define REG_WRITE(b,o,v) (*(volatile unsigned int*)((b+o))=(v))
|
||||
#define REG_READ(b,o,v) ((v)=(*(volatile unsigned int*)((b+o))))
|
||||
|
||||
#define PCI_DELAY 500
|
||||
#define USEC_LOOP_COUNT 533
|
||||
#define PCI_SETTLE_USEC 200
|
||||
#define PCI_MIN_RESET_ASSERT_USEC 2000
|
||||
|
||||
/*Register addressing definitions for PCI controller configuration
|
||||
and status registers*/
|
||||
|
||||
@@ -150,28 +83,6 @@ typedef struct
|
||||
#define NP_CMD_CONFIGWRITE (0xb)
|
||||
*/
|
||||
|
||||
/*define the default setting of the AHB memory base reg*/
|
||||
#define IXP425_PCI_AHBMEMBASE_DEFAULT 0x00010203
|
||||
#define IXP425_PCI_AHBIOBASE_DEFAULT 0x0
|
||||
#define IXP425_PCI_PCIMEMBASE_DEFAULT 0x0
|
||||
|
||||
/*define the default settings for the controller's BARs*/
|
||||
#ifdef IXP425_PCI_SIMPLE_MAPPING
|
||||
#define IXP425_PCI_BAR_0_DEFAULT 0x00000000
|
||||
#define IXP425_PCI_BAR_1_DEFAULT 0x01000000
|
||||
#define IXP425_PCI_BAR_2_DEFAULT 0x02000000
|
||||
#define IXP425_PCI_BAR_3_DEFAULT 0x03000000
|
||||
#define IXP425_PCI_BAR_4_DEFAULT 0x00000000
|
||||
#define IXP425_PCI_BAR_5_DEFAULT 0x00000000
|
||||
#else
|
||||
#define IXP425_PCI_BAR_0_DEFAULT 0x40000000
|
||||
#define IXP425_PCI_BAR_1_DEFAULT 0x41000000
|
||||
#define IXP425_PCI_BAR_2_DEFAULT 0x42000000
|
||||
#define IXP425_PCI_BAR_3_DEFAULT 0x43000000
|
||||
#define IXP425_PCI_BAR_4_DEFAULT 0x00000000
|
||||
#define IXP425_PCI_BAR_5_DEFAULT 0x00000000
|
||||
#endif
|
||||
|
||||
/*Configuration Port register bit definitions*/
|
||||
#define PCI_CRP_WRITE BIT(16)
|
||||
|
||||
@@ -228,17 +139,6 @@ typedef struct
|
||||
#define PCI_CFG_SPECIAL_USE 0x41
|
||||
#define PCI_CFG_MODE 0x43
|
||||
|
||||
/*Specify the initial command we send to PCI devices*/
|
||||
#define INITIAL_PCI_CMD (PCI_CMD_IO_ENABLE \
|
||||
| PCI_CMD_MEM_ENABLE \
|
||||
| PCI_CMD_MASTER_ENABLE \
|
||||
| PCI_CMD_WI_ENABLE)
|
||||
|
||||
/*define the sub vendor and subsystem to be used */
|
||||
#define IXP425_PCI_SUB_VENDOR_SYSTEM 0x00000000
|
||||
|
||||
#define PCI_IRQ_LINES 4
|
||||
|
||||
#define PCI_CMD_IO_ENABLE 0x0001 /* IO access enable */
|
||||
#define PCI_CMD_MEM_ENABLE 0x0002 /* memory access enable */
|
||||
#define PCI_CMD_MASTER_ENABLE 0x0004 /* bus master enable */
|
||||
@@ -287,26 +187,4 @@ typedef struct
|
||||
#define PCI_DMACTRL_PADC1 BIT(14)
|
||||
#define PCI_DMACTRL_PADE1 BIT(15)
|
||||
|
||||
/* GPIO related register */
|
||||
#undef IXP425_GPIO_GPOUTR
|
||||
#undef IXP425_GPIO_GPOER
|
||||
#undef IXP425_GPIO_GPINR
|
||||
#undef IXP425_GPIO_GPISR
|
||||
#undef IXP425_GPIO_GPIT1R
|
||||
#undef IXP425_GPIO_GPIT2R
|
||||
#undef IXP425_GPIO_GPCLKR
|
||||
|
||||
#define IXP425_GPIO_GPOUTR 0xC8004000
|
||||
#define IXP425_GPIO_GPOER 0xC8004004
|
||||
#define IXP425_GPIO_GPINR 0xC8004008
|
||||
#define IXP425_GPIO_GPISR 0xC800400C
|
||||
#define IXP425_GPIO_GPIT1R 0xC8004010
|
||||
#define IXP425_GPIO_GPIT2R 0xC8004014
|
||||
#define IXP425_GPIO_GPCLKR 0xC8004018
|
||||
|
||||
#define READ_GPIO_REG(addr,val) \
|
||||
(val) = *((volatile int *)(addr));
|
||||
#define WRITE_GPIO_REG(addr,val) \
|
||||
*((volatile int *)(addr)) = (val);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,9 +41,6 @@ typedef struct global_data {
|
||||
unsigned long env_addr; /* Address of Environment struct */
|
||||
unsigned long env_valid; /* Checksum of Environment valid? */
|
||||
unsigned long fb_base; /* base address of frame buffer */
|
||||
#ifdef CONFIG_VFD
|
||||
unsigned char vfd_type; /* display type */
|
||||
#endif
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
unsigned long sdhc_clk;
|
||||
#endif
|
||||
@@ -63,6 +60,9 @@ typedef struct global_data {
|
||||
unsigned long tbu;
|
||||
unsigned long long timer_reset_value;
|
||||
unsigned long lastinc;
|
||||
#endif
|
||||
#ifdef CONFIG_IXP425
|
||||
unsigned long timestamp;
|
||||
#endif
|
||||
unsigned long relocaddr; /* Start address of U-Boot in RAM */
|
||||
phys_size_t ram_size; /* RAM size */
|
||||
|
||||
@@ -262,9 +262,6 @@ init_fnc_t *init_sequence[] = {
|
||||
init_func_i2c,
|
||||
#endif
|
||||
dram_init, /* configure available RAM banks */
|
||||
#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI)
|
||||
arm_pci_init,
|
||||
#endif
|
||||
NULL,
|
||||
};
|
||||
|
||||
@@ -344,17 +341,6 @@ void board_init_f (ulong bootflag)
|
||||
addr &= ~(4096 - 1);
|
||||
debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
|
||||
|
||||
#ifdef CONFIG_VFD
|
||||
# ifndef PAGE_SIZE
|
||||
# define PAGE_SIZE 4096
|
||||
# endif
|
||||
/*
|
||||
* reserve memory for VFD display (always full pages)
|
||||
*/
|
||||
addr -= vfd_setmem (addr);
|
||||
gd->fb_base = addr;
|
||||
#endif /* CONFIG_VFD */
|
||||
|
||||
#ifdef CONFIG_LCD
|
||||
#ifdef CONFIG_FB_ADDR
|
||||
gd->fb_base = CONFIG_FB_ADDR;
|
||||
@@ -533,10 +519,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
|
||||
/* initialize environment */
|
||||
env_relocate ();
|
||||
|
||||
#ifdef CONFIG_VFD
|
||||
/* must do this after the framebuffer is allocated */
|
||||
drv_vfd_init();
|
||||
#endif /* CONFIG_VFD */
|
||||
#if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI)
|
||||
arm_pci_init();
|
||||
#endif
|
||||
|
||||
/* IP Address */
|
||||
gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
|
||||
|
||||
@@ -76,10 +76,6 @@ LDR_FLAGS += $(LDR_FLAGS-y)
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
|
||||
|
||||
ifeq ($(wildcard $(TOPDIR)/board/$(BOARD)/u-boot.lds*),)
|
||||
LDSCRIPT = $(obj)arch/$(ARCH)/lib/u-boot.lds.S
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_SYS_TEXT_BASE),)
|
||||
$(error do not set CONFIG_SYS_TEXT_BASE for Blackfin boards)
|
||||
endif
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <asm/blackfin.h>
|
||||
#include <asm/mach-common/bits/bootrom.h>
|
||||
#include "cpu.h"
|
||||
|
||||
/* A system soft reset makes external memory unusable so force
|
||||
@@ -29,46 +30,40 @@ static void bfin_reset(void)
|
||||
*/
|
||||
__builtin_bfin_ssync();
|
||||
|
||||
/* The bootrom checks to see how it was reset and will
|
||||
* automatically perform a software reset for us when
|
||||
* it starts executing after the core reset.
|
||||
/* Initiate System software reset. */
|
||||
bfin_write_SWRST(0x7);
|
||||
|
||||
/* Due to the way reset is handled in the hardware, we need
|
||||
* to delay for 10 SCLKS. The only reliable way to do this is
|
||||
* to calculate the CCLK/SCLK ratio and multiply 10. For now,
|
||||
* we'll assume worse case which is a 1:15 ratio.
|
||||
*/
|
||||
if (ANOMALY_05000353 || ANOMALY_05000386) {
|
||||
/* Initiate System software reset. */
|
||||
bfin_write_SWRST(0x7);
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC0 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 10)
|
||||
: "LC0", "LB0", "LT0"
|
||||
);
|
||||
|
||||
/* Due to the way reset is handled in the hardware, we need
|
||||
* to delay for 10 SCLKS. The only reliable way to do this is
|
||||
* to calculate the CCLK/SCLK ratio and multiply 10. For now,
|
||||
* we'll assume worse case which is a 1:15 ratio.
|
||||
*/
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC0 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 10)
|
||||
: "LC0", "LB0", "LT0"
|
||||
);
|
||||
/* Clear System software reset */
|
||||
bfin_write_SWRST(0);
|
||||
|
||||
/* Clear System software reset */
|
||||
bfin_write_SWRST(0);
|
||||
|
||||
/* The BF526 ROM will crash during reset */
|
||||
/* The BF526 ROM will crash during reset */
|
||||
#if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__)
|
||||
bfin_read_SWRST();
|
||||
bfin_read_SWRST();
|
||||
#endif
|
||||
|
||||
/* Wait for the SWRST write to complete. Cannot rely on SSYNC
|
||||
* though as the System state is all reset now.
|
||||
*/
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC1 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 1)
|
||||
: "LC1", "LB1", "LT1"
|
||||
);
|
||||
}
|
||||
/* Wait for the SWRST write to complete. Cannot rely on SSYNC
|
||||
* though as the System state is all reset now.
|
||||
*/
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC1 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 1)
|
||||
: "LC1", "LB1", "LT1"
|
||||
);
|
||||
|
||||
while (1)
|
||||
/* Issue core reset */
|
||||
@@ -84,7 +79,10 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
if (board_reset)
|
||||
board_reset();
|
||||
while (1)
|
||||
asm("jump (%0);" : : "a" (bfin_reset));
|
||||
if (ANOMALY_05000353 || ANOMALY_05000386)
|
||||
while (1)
|
||||
asm("jump (%0);" : : "a" (bfin_reset));
|
||||
else
|
||||
bfrom_SoftReset((void *)(L1_SRAM_SCRATCH_END - 20));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
/* Correct IRDA resistor problem / Set PA23_TXD in Output */
|
||||
writel(AT91_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_EB_CPUX9K2;
|
||||
/* adress of boot parameters */
|
||||
@@ -147,7 +147,7 @@ int dram_init(void)
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
rc = at91emac_register(bis, (u32) AT91_EMAC_BASE);
|
||||
rc = at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
@@ -164,9 +164,9 @@ int board_eth_init(bd_t *bis)
|
||||
void cpux9k2_nand_hw_init(void)
|
||||
{
|
||||
unsigned long csr;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_mc_t *mc = (at91_mc_t *) AT91_MC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_mc_t *mc = (at91_mc_t *) ATMEL_BASE_MC;
|
||||
|
||||
/* Setup Smart Media, fitst enable the address range of CS3 */
|
||||
writel(readl(&mc->ebi.csa) | AT91_EBI_CSA_CS3A, &mc->ebi.csa);
|
||||
@@ -178,23 +178,23 @@ void cpux9k2_nand_hw_init(void)
|
||||
AT91_SMC_CSR_WSEN;
|
||||
writel(csr, &mc->smc.csr[3]);
|
||||
|
||||
writel(AT91_PMX_CA_SMOE | AT91_PMX_CA_SMWE, &pio->pioc.asr);
|
||||
writel(AT91_PMX_CA_BFCK | AT91_PMX_CA_SMOE | AT91_PMX_CA_SMWE,
|
||||
writel(ATMEL_PMX_CA_SMOE | ATMEL_PMX_CA_SMWE, &pio->pioc.asr);
|
||||
writel(ATMEL_PMX_CA_BFCK | ATMEL_PMX_CA_SMOE | ATMEL_PMX_CA_SMWE,
|
||||
&pio->pioc.pdr);
|
||||
|
||||
/* Configure PC2 as input (signal Nand READY ) */
|
||||
writel(AT91_PMX_CA_BFAVD, &pio->pioc.per);
|
||||
writel(AT91_PMX_CA_BFAVD, &pio->pioc.odr); /* disable output */
|
||||
writel(AT91_PMX_CA_BFCK, &pio->pioc.codr);
|
||||
writel(ATMEL_PMX_CA_BFAVD, &pio->pioc.per);
|
||||
writel(ATMEL_PMX_CA_BFAVD, &pio->pioc.odr); /* disable output */
|
||||
writel(ATMEL_PMX_CA_BFCK, &pio->pioc.codr);
|
||||
|
||||
/* PIOC clock enabling */
|
||||
writel(1 << AT91_ID_PIOC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
|
||||
}
|
||||
|
||||
static void board_nand_hwcontrol(struct mtd_info *mtd,
|
||||
int cmd, unsigned int ctrl)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
struct nand_chip *this = mtd->priv;
|
||||
ulong IO_ADDR_W = (ulong) this->IO_ADDR_W;
|
||||
|
||||
@@ -219,7 +219,7 @@ static void board_nand_hwcontrol(struct mtd_info *mtd,
|
||||
|
||||
static int board_nand_dev_ready(struct mtd_info *mtd)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
return ((readl(&pio->pioc.pdsr) & (1 << 2)) != 0);
|
||||
}
|
||||
|
||||
@@ -248,8 +248,8 @@ int drv_video_init(void)
|
||||
#endif
|
||||
char *s;
|
||||
unsigned long csr;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_mc_t *mc = (at91_mc_t *) AT91_MC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_mc_t *mc = (at91_mc_t *) ATMEL_BASE_MC;
|
||||
|
||||
printf("Init Video as ");
|
||||
s = getenv("displaywidth");
|
||||
@@ -270,7 +270,7 @@ int drv_video_init(void)
|
||||
AT91_SMC_CSR_ACSS_STANDARD | AT91_SMC_CSR_DBW_16 |
|
||||
AT91_SMC_CSR_BAT_16 | AT91_SMC_CSR_WSEN;
|
||||
writel(csr, &mc->smc.csr[2]);
|
||||
writel(1 << AT91_ID_PIOB, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOB, &pmc->pcer);
|
||||
|
||||
vcxk_init(display_width, display_height);
|
||||
#ifdef CONFIG_SPLASH_SCREEN
|
||||
@@ -290,11 +290,11 @@ int drv_video_init(void)
|
||||
void i2c_init_board(void)
|
||||
{
|
||||
u32 pin;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
writel(1 << AT91_ID_PIOA, &pmc->pcer);
|
||||
pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
|
||||
writel(1 << ATMEL_ID_PIOA, &pmc->pcer);
|
||||
pin = ATMEL_PMX_AA_TWD | ATMEL_PMX_AA_TWCK;
|
||||
writel(pin, &pio->pioa.idr);
|
||||
writel(pin, &pio->pioa.pudr);
|
||||
writel(pin, &pio->pioa.per);
|
||||
@@ -310,7 +310,7 @@ void i2c_init_board(void)
|
||||
|
||||
void __led_toggle(led_id_t mask)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
if (readl(&pio->piod.odsr) & mask)
|
||||
writel(mask, &pio->piod.codr);
|
||||
@@ -320,10 +320,10 @@ void __led_toggle(led_id_t mask)
|
||||
|
||||
void __led_init(led_id_t mask, int state)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
writel(1 << AT91_ID_PIOD, &pmc->pcer); /* Enable PIOB clock */
|
||||
writel(1 << ATMEL_ID_PIOD, &pmc->pcer); /* Enable PIOB clock */
|
||||
/* Disable peripherals on LEDs */
|
||||
writel(STATUS_LED_BIT | STATUS_LED_BIT1, &pio->piod.per);
|
||||
/* Enable pins as outputs */
|
||||
@@ -336,7 +336,7 @@ void __led_init(led_id_t mask, int state)
|
||||
|
||||
void __led_set(led_id_t mask, int state)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
if (state == STATUS_LED_ON)
|
||||
writel(mask, &pio->piod.codr);
|
||||
else
|
||||
|
||||
@@ -37,49 +37,57 @@
|
||||
#include <asm/arch/ixp425.h>
|
||||
#include <asm/io.h>
|
||||
#include <miiphy.h>
|
||||
#ifdef CONFIG_PCI
|
||||
#include <pci.h>
|
||||
#include <asm/arch/ixp425pci.h>
|
||||
#endif
|
||||
|
||||
#include "actux1_hw.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
/* CS5: Debug port */
|
||||
writel(0x9d520003, IXP425_EXP_CS5);
|
||||
/* CS6: HwRel */
|
||||
writel(0x81860001, IXP425_EXP_CS6);
|
||||
/* CS7: LEDs */
|
||||
writel(0x80900003, IXP425_EXP_CS7);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_ACTUX1;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = 0x00000100;
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
|
||||
|
||||
/* Setup GPIO's for PCI INTA */
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI1_INTA);
|
||||
GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI1_INTA);
|
||||
/* Setup GPIOs for PCI INTA */
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI1_INTA);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI1_INTA);
|
||||
|
||||
/* Setup GPIO's for 33MHz clock output */
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
*IXP425_GPIO_GPCLKR = 0x011001FF;
|
||||
/* Setup GPIOs for 33MHz clock output */
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
writel(0x011001FF, IXP425_GPIO_GPCLKR);
|
||||
|
||||
/* CS5: Debug port */
|
||||
*IXP425_EXP_CS5 = 0x9d520003;
|
||||
/* CS6: HwRel */
|
||||
*IXP425_EXP_CS6 = 0x81860001;
|
||||
/* CS7: LEDs */
|
||||
*IXP425_EXP_CS7 = 0x80900003;
|
||||
udelay(533);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
|
||||
|
||||
udelay (533);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
|
||||
ACTUX1_LED1(2);
|
||||
ACTUX1_LED2(2);
|
||||
ACTUX1_LED3(0);
|
||||
ACTUX1_LED4(0);
|
||||
ACTUX1_LED5(0);
|
||||
ACTUX1_LED6(0);
|
||||
ACTUX1_LED7(0);
|
||||
|
||||
ACTUX1_LED1 (2);
|
||||
ACTUX1_LED2 (2);
|
||||
ACTUX1_LED3 (0);
|
||||
ACTUX1_LED4 (0);
|
||||
ACTUX1_LED5 (0);
|
||||
ACTUX1_LED6 (0);
|
||||
ACTUX1_LED7 (0);
|
||||
|
||||
ACTUX1_HS (ACTUX1_HS_DCD);
|
||||
ACTUX1_HS(ACTUX1_HS_DCD);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -87,21 +95,21 @@ int board_init (void)
|
||||
/*
|
||||
* Check Board Identity
|
||||
*/
|
||||
int checkboard (void)
|
||||
int checkboard(void)
|
||||
{
|
||||
char buf[64];
|
||||
int i = getenv_f("serial#", buf, sizeof(buf));
|
||||
|
||||
puts ("Board: AcTux-1 rev.");
|
||||
putc (ACTUX1_BOARDREL + 'A' - 1);
|
||||
puts("Board: AcTux-1 rev.");
|
||||
putc(ACTUX1_BOARDREL + 'A' - 1);
|
||||
|
||||
if (i > 0) {
|
||||
puts(", serial# ");
|
||||
puts(buf);
|
||||
}
|
||||
putc ('\n');
|
||||
putc('\n');
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -110,39 +118,36 @@ int checkboard (void)
|
||||
* 1 = Rev. A
|
||||
* 2 = Rev. B
|
||||
*************************************************************************/
|
||||
u32 get_board_rev (void)
|
||||
u32 get_board_rev(void)
|
||||
{
|
||||
return ACTUX1_BOARDREL;
|
||||
}
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
return (0);
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI)
|
||||
extern struct pci_controller hose;
|
||||
extern void pci_ixp_init (struct pci_controller *hose);
|
||||
|
||||
void pci_init_board (void)
|
||||
#ifdef CONFIG_PCI
|
||||
struct pci_controller hose;
|
||||
|
||||
void pci_init_board(void)
|
||||
{
|
||||
extern void pci_ixp_init (struct pci_controller *hose);
|
||||
pci_ixp_init (&hose);
|
||||
pci_ixp_init(&hose);
|
||||
}
|
||||
#endif
|
||||
|
||||
void reset_phy (void)
|
||||
void reset_phy(void)
|
||||
{
|
||||
u16 id1, id2;
|
||||
|
||||
/* initialize the PHY */
|
||||
miiphy_reset ("NPE0", CONFIG_PHY_ADDR);
|
||||
miiphy_reset("NPE0", CONFIG_PHY_ADDR);
|
||||
|
||||
miiphy_read ("NPE0", CONFIG_PHY_ADDR, MII_PHYSID1, &id1);
|
||||
miiphy_read ("NPE0", CONFIG_PHY_ADDR, MII_PHYSID2, &id2);
|
||||
miiphy_read("NPE0", CONFIG_PHY_ADDR, MII_PHYSID1, &id1);
|
||||
miiphy_read("NPE0", CONFIG_PHY_ADDR, MII_PHYSID2, &id2);
|
||||
|
||||
id2 &= 0xFFF0; /* mask out revision bits */
|
||||
|
||||
@@ -153,9 +158,9 @@ void reset_phy (void)
|
||||
* LED2 (unused) = LINK,
|
||||
* LED3(red) = Coll
|
||||
*/
|
||||
miiphy_write ("NPE0", CONFIG_PHY_ADDR, 20, 0xD432);
|
||||
miiphy_write("NPE0", CONFIG_PHY_ADDR, 20, 0xD432);
|
||||
} else if (id1 == 0x143 && id2 == 0xbc30) {
|
||||
/* BCM5241: default values are OK */
|
||||
} else
|
||||
printf ("unknown ethernet PHY ID: %x %x\n", id1, id2);
|
||||
printf("unknown ethernet PHY ID: %x %x\n", id1, id2);
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x00e00000
|
||||
|
||||
# include NPE ethernet driver
|
||||
BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
|
||||
@@ -30,15 +30,15 @@ SECTIONS
|
||||
|
||||
. = ALIGN (4);
|
||||
.text : {
|
||||
arch/arm/cpu/ixp/start.o(.text)
|
||||
lib/string.o(.text)
|
||||
lib/vsprintf.o(.text)
|
||||
arch/arm/lib/board.o(.text)
|
||||
common/dlmalloc.o(.text)
|
||||
arch/arm/cpu/ixp/cpu.o(.text)
|
||||
arch/arm/cpu/ixp/start.o(.text*)
|
||||
net/libnet.o(.text*)
|
||||
board/actux1/libactux1.o(.text*)
|
||||
arch/arm/cpu/ixp/libixp.o(.text*)
|
||||
drivers/serial/libserial.o(.text*)
|
||||
|
||||
. = env_offset;
|
||||
common/env_embedded.o(.ppcenv)
|
||||
* (.text)
|
||||
*(.text*)
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
@@ -47,7 +47,7 @@ SECTIONS
|
||||
}
|
||||
. = ALIGN (4);
|
||||
.data : {
|
||||
*(.data)
|
||||
*(.data*)
|
||||
}
|
||||
. = ALIGN (4);
|
||||
.got : {
|
||||
@@ -61,10 +61,27 @@ SECTIONS
|
||||
__u_boot_cmd_end =.;
|
||||
|
||||
. = ALIGN (4);
|
||||
__bss_start =.;
|
||||
.bss (NOLOAD): {
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
.rel.dyn : {
|
||||
__rel_dyn_start = .;
|
||||
*(.rel*)
|
||||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
.dynsym : {
|
||||
__dynsym_start = .;
|
||||
*(.dynsym)
|
||||
}
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss*)
|
||||
. = ALIGN(4);
|
||||
_end = .;
|
||||
}
|
||||
__bss_end__ =.;
|
||||
/DISCARD/ : { *(.dynstr*) }
|
||||
/DISCARD/ : { *(.dynamic*) }
|
||||
/DISCARD/ : { *(.plt*) }
|
||||
/DISCARD/ : { *(.interp*) }
|
||||
/DISCARD/ : { *(.gnu*) }
|
||||
}
|
||||
|
||||
@@ -43,50 +43,55 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
/* CS1: IPAC-X */
|
||||
writel(0x94d10013, IXP425_EXP_CS1);
|
||||
/* CS5: Debug port */
|
||||
writel(0x9d520003, IXP425_EXP_CS5);
|
||||
/* CS6: HW release register */
|
||||
writel(0x81860001, IXP425_EXP_CS6);
|
||||
/* CS7: LEDs */
|
||||
writel(0x80900003, IXP425_EXP_CS7);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_ACTUX2;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = 0x00000100;
|
||||
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_ETHRST);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DCD);
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_ETHRST);
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DCD);
|
||||
|
||||
/* Setup GPIO's for Interrupt inputs */
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT);
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT);
|
||||
/* Setup GPIOs for Interrupt inputs */
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_DBGINT);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_ETHINT);
|
||||
|
||||
/* Setup GPIO's for 33MHz clock output */
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
*IXP425_GPIO_GPCLKR = 0x011001FF;
|
||||
/* Setup GPIOs for 33MHz clock output */
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
writel(0x011001FF, IXP425_GPIO_GPCLKR);
|
||||
|
||||
/* CS1: IPAC-X */
|
||||
*IXP425_EXP_CS1 = 0x94d10013;
|
||||
/* CS5: Debug port */
|
||||
*IXP425_EXP_CS5 = 0x9d520003;
|
||||
/* CS6: HW release register */
|
||||
*IXP425_EXP_CS6 = 0x81860001;
|
||||
/* CS7: LEDs */
|
||||
*IXP425_EXP_CS7 = 0x80900003;
|
||||
udelay(533);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_ETHRST);
|
||||
|
||||
udelay (533);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
|
||||
|
||||
ACTUX2_LED1 (1);
|
||||
ACTUX2_LED2 (0);
|
||||
ACTUX2_LED3 (0);
|
||||
ACTUX2_LED4 (0);
|
||||
ACTUX2_LED1(1);
|
||||
ACTUX2_LED2(0);
|
||||
ACTUX2_LED3(0);
|
||||
ACTUX2_LED4(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -94,29 +99,27 @@ int board_init (void)
|
||||
/*
|
||||
* Check Board Identity
|
||||
*/
|
||||
int checkboard (void)
|
||||
int checkboard(void)
|
||||
{
|
||||
char buf[64];
|
||||
int i = getenv_f("serial#", buf, sizeof(buf));
|
||||
|
||||
puts ("Board: AcTux-2 rev.");
|
||||
putc (ACTUX2_BOARDREL + 'A' - 1);
|
||||
puts("Board: AcTux-2 rev.");
|
||||
putc(ACTUX2_BOARDREL + 'A' - 1);
|
||||
|
||||
if (i > 0) {
|
||||
puts(", serial# ");
|
||||
puts(buf);
|
||||
}
|
||||
putc ('\n');
|
||||
putc('\n');
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
return (0);
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -125,13 +128,13 @@ int dram_init (void)
|
||||
* 1 = Rev. A
|
||||
* 2 = Rev. B
|
||||
*************************************************************************/
|
||||
u32 get_board_rev (void)
|
||||
u32 get_board_rev(void)
|
||||
{
|
||||
return ACTUX2_BOARDREL;
|
||||
}
|
||||
|
||||
void reset_phy (void)
|
||||
void reset_phy(void)
|
||||
{
|
||||
/* init IcPlus IP175C ethernet switch to native IP175C mode */
|
||||
miiphy_write ("NPE0", 29, 31, 0x175C);
|
||||
miiphy_write("NPE0", 29, 31, 0x175C);
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x00e00000
|
||||
|
||||
# include NPE ethernet driver
|
||||
BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
|
||||
@@ -30,34 +30,29 @@ SECTIONS
|
||||
|
||||
. = ALIGN (4);
|
||||
.text : {
|
||||
arch/arm/cpu/ixp/start.o(.text)
|
||||
lib/string.o(.text)
|
||||
lib/vsprintf.o(.text)
|
||||
arch/arm/lib/board.o(.text)
|
||||
common/dlmalloc.o(.text)
|
||||
arch/arm/cpu/ixp/cpu.o(.text)
|
||||
arch/arm/cpu/ixp/start.o(.text*)
|
||||
net/libnet.o(.text*)
|
||||
board/actux2/libactux2.o(.text*)
|
||||
arch/arm/cpu/ixp/libixp.o(.text*)
|
||||
drivers/serial/libserial.o(.text*)
|
||||
|
||||
. = env_offset;
|
||||
common/env_embedded.o (.ppcenv)
|
||||
|
||||
* (.text)
|
||||
common/env_embedded.o(.ppcenv)
|
||||
*(.text*)
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
.rodata : {
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
.data : {
|
||||
*(.data)
|
||||
*(.data*)
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
.got : {
|
||||
*(.got)
|
||||
}
|
||||
|
||||
. =.;
|
||||
__u_boot_cmd_start =.;
|
||||
.u_boot_cmd : {
|
||||
@@ -66,10 +61,27 @@ SECTIONS
|
||||
__u_boot_cmd_end =.;
|
||||
|
||||
. = ALIGN (4);
|
||||
__bss_start =.;
|
||||
.bss (NOLOAD): {
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
.rel.dyn : {
|
||||
__rel_dyn_start = .;
|
||||
*(.rel*)
|
||||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
.dynsym : {
|
||||
__dynsym_start = .;
|
||||
*(.dynsym)
|
||||
}
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss*)
|
||||
. = ALIGN(4);
|
||||
_end = .;
|
||||
}
|
||||
__bss_end__ =.;
|
||||
/DISCARD/ : { *(.dynstr*) }
|
||||
/DISCARD/ : { *(.dynamic*) }
|
||||
/DISCARD/ : { *(.plt*) }
|
||||
/DISCARD/ : { *(.interp*) }
|
||||
/DISCARD/ : { *(.gnu*) }
|
||||
}
|
||||
|
||||
@@ -36,72 +36,76 @@
|
||||
#include <malloc.h>
|
||||
#include <asm/arch/ixp425.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#include <miiphy.h>
|
||||
|
||||
#include "actux3_hw.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
/* CS1: IPAC-X */
|
||||
writel(0x94d10013, IXP425_EXP_CS1);
|
||||
/* CS5: Debug port */
|
||||
writel(0x9d520003, IXP425_EXP_CS5);
|
||||
/* CS6: Release/Option register */
|
||||
writel(0x81860001, IXP425_EXP_CS6);
|
||||
/* CS7: LEDs */
|
||||
writel(0x80900003, IXP425_EXP_CS7);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_ACTUX3;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = 0x00000100;
|
||||
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED5_GN);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_RT);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_GN);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_ETHRST);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DCD);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED5_GN);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED6_RT);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED6_GN);
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_ETHRST);
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_DSR);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DCD);
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED5_GN);
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_RT);
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_GN);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED5_GN);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED6_RT);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED6_GN);
|
||||
|
||||
/*
|
||||
* Setup GPIO's for Interrupt inputs
|
||||
*/
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT);
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_DBGINT);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_ETHINT);
|
||||
|
||||
/*
|
||||
* Setup GPIO's for 33MHz clock output
|
||||
*/
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
*IXP425_GPIO_GPCLKR = 0x011001FF;
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
writel(0x011001FF, IXP425_GPIO_GPCLKR);
|
||||
|
||||
/* CS1: IPAC-X */
|
||||
*IXP425_EXP_CS1 = 0x94d10013;
|
||||
/* CS5: Debug port */
|
||||
*IXP425_EXP_CS5 = 0x9d520003;
|
||||
/* CS6: Release/Option register */
|
||||
*IXP425_EXP_CS6 = 0x81860001;
|
||||
/* CS7: LEDs */
|
||||
*IXP425_EXP_CS7 = 0x80900003;
|
||||
/* we need a minimum PCI reset pulse width after enabling the clock */
|
||||
udelay(533);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_ETHRST);
|
||||
|
||||
udelay (533);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
|
||||
|
||||
ACTUX3_LED1_RT (1);
|
||||
ACTUX3_LED1_GN (0);
|
||||
ACTUX3_LED2_RT (0);
|
||||
ACTUX3_LED2_GN (0);
|
||||
ACTUX3_LED3_RT (0);
|
||||
ACTUX3_LED3_GN (0);
|
||||
ACTUX3_LED4_GN (0);
|
||||
ACTUX3_LED5_RT (0);
|
||||
ACTUX3_LED1_RT(1);
|
||||
ACTUX3_LED1_GN(0);
|
||||
ACTUX3_LED2_RT(0);
|
||||
ACTUX3_LED2_GN(0);
|
||||
ACTUX3_LED3_RT(0);
|
||||
ACTUX3_LED3_GN(0);
|
||||
ACTUX3_LED4_GN(0);
|
||||
ACTUX3_LED5_RT(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -109,21 +113,21 @@ int board_init (void)
|
||||
/*
|
||||
* Check Board Identity
|
||||
*/
|
||||
int checkboard (void)
|
||||
int checkboard(void)
|
||||
{
|
||||
char buf[64];
|
||||
int i = getenv_f("serial#", buf, sizeof(buf));
|
||||
|
||||
puts ("Board: AcTux-3 rev.");
|
||||
putc (ACTUX3_BOARDREL + 'A' - 1);
|
||||
puts("Board: AcTux-3 rev.");
|
||||
putc(ACTUX3_BOARDREL + 'A' - 1);
|
||||
|
||||
if (i > 0) {
|
||||
puts (", serial# ");
|
||||
puts (buf);
|
||||
}
|
||||
putc ('\n');
|
||||
putc('\n');
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -132,34 +136,32 @@ int checkboard (void)
|
||||
* 1 = Rev. A
|
||||
* 2 = Rev. B
|
||||
*************************************************************************/
|
||||
u32 get_board_rev (void)
|
||||
u32 get_board_rev(void)
|
||||
{
|
||||
return ACTUX3_BOARDREL;
|
||||
}
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
return (0);
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void reset_phy (void)
|
||||
void reset_phy(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* initialize the PHY */
|
||||
miiphy_reset ("NPE0", CONFIG_PHY_ADDR);
|
||||
miiphy_reset("NPE0", CONFIG_PHY_ADDR);
|
||||
|
||||
/* all LED outputs = Link/Act */
|
||||
miiphy_write ("NPE0", CONFIG_PHY_ADDR, 0x16, 0x0AAA);
|
||||
miiphy_write("NPE0", CONFIG_PHY_ADDR, 0x16, 0x0AAA);
|
||||
|
||||
/*
|
||||
* The Marvell 88E6060 switch comes up with all ports disabled.
|
||||
* set all ethernet switch ports to forwarding state
|
||||
*/
|
||||
for (i = 1; i <= 5; i++)
|
||||
miiphy_write ("NPE0", CONFIG_PHY_ADDR + 8 + i, 0x04, 0x03);
|
||||
miiphy_write("NPE0", CONFIG_PHY_ADDR + 8 + i, 0x04, 0x03);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x00e00000
|
||||
|
||||
# include NPE ethernet driver
|
||||
BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
|
||||
@@ -30,34 +30,29 @@ SECTIONS
|
||||
|
||||
. = ALIGN (4);
|
||||
.text : {
|
||||
arch/arm/cpu/ixp/start.o (.text)
|
||||
lib/string.o (.text)
|
||||
lib/vsprintf.o (.text)
|
||||
arch/arm/lib/board.o (.text)
|
||||
common/dlmalloc.o (.text)
|
||||
arch/arm/cpu/ixp/cpu.o (.text)
|
||||
arch/arm/cpu/ixp/start.o(.text*)
|
||||
net/libnet.o(.text*)
|
||||
board/actux3/libactux3.o(.text*)
|
||||
arch/arm/cpu/ixp/libixp.o(.text*)
|
||||
drivers/serial/libserial.o(.text*)
|
||||
|
||||
. = env_offset;
|
||||
common/env_embedded.o (.ppcenv)
|
||||
|
||||
* (.text)
|
||||
common/env_embedded.o(.ppcenv)
|
||||
*(.text*)
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
. = ALIGN(4);
|
||||
.rodata : {
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
. = ALIGN(4);
|
||||
.data : {
|
||||
*(.data)
|
||||
*(.data*)
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
. = ALIGN(4);
|
||||
.got : {
|
||||
*(.got)
|
||||
}
|
||||
|
||||
. =.;
|
||||
__u_boot_cmd_start =.;
|
||||
.u_boot_cmd : {
|
||||
@@ -66,10 +61,27 @@ SECTIONS
|
||||
__u_boot_cmd_end =.;
|
||||
|
||||
. = ALIGN (4);
|
||||
__bss_start =.;
|
||||
.bss (NOLOAD): {
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
.rel.dyn : {
|
||||
__rel_dyn_start = .;
|
||||
*(.rel*)
|
||||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
.dynsym : {
|
||||
__dynsym_start = .;
|
||||
*(.dynsym)
|
||||
}
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss*)
|
||||
. = ALIGN(4);
|
||||
_end = .;
|
||||
}
|
||||
__bss_end__ =.;
|
||||
/DISCARD/ : { *(.dynstr*) }
|
||||
/DISCARD/ : { *(.dynamic*) }
|
||||
/DISCARD/ : { *(.plt*) }
|
||||
/DISCARD/ : { *(.interp*) }
|
||||
/DISCARD/ : { *(.gnu*) }
|
||||
}
|
||||
|
||||
@@ -35,92 +35,107 @@
|
||||
#include <command.h>
|
||||
#include <malloc.h>
|
||||
#include <asm/arch/ixp425.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <miiphy.h>
|
||||
#ifdef CONFIG_PCI
|
||||
#include <pci.h>
|
||||
#include <asm/arch/ixp425pci.h>
|
||||
#endif
|
||||
|
||||
#include "actux4_hw.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
writel(0xbd113c42, IXP425_EXP_CS1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_ACTUX4;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = 0x00000100;
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_nPWRON);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_nPWRON);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_nPWRON);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_nPWRON);
|
||||
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
|
||||
|
||||
/* led not populated on board*/
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED3);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED3);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED3);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED3);
|
||||
|
||||
/* middle LED */
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED2);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED2);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED2);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED2);
|
||||
|
||||
/* right LED */
|
||||
/* weak pulldown = LED weak on */
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_LED1);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED1);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_LED1);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED1);
|
||||
|
||||
/* Setup GPIO's for Interrupt inputs */
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTA);
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTB);
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTC);
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_RTCINT);
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTA);
|
||||
GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTB);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTA);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTB);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTC);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_RTCINT);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTA);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTB);
|
||||
|
||||
GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTA);
|
||||
GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTB);
|
||||
GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTC);
|
||||
GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_RTCINT);
|
||||
GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTA);
|
||||
GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTB);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTA);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTB);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTC);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_RTCINT);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTA);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTB);
|
||||
|
||||
/* Setup GPIO's for 33MHz clock output */
|
||||
*IXP425_GPIO_GPCLKR = 0x011001FF;
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
|
||||
writel(0x011001FF, IXP425_GPIO_GPCLKR);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
|
||||
|
||||
*IXP425_EXP_CS1 = 0xbd113c42;
|
||||
|
||||
udelay (10000);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
|
||||
udelay (10000);
|
||||
GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
|
||||
udelay (10000);
|
||||
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
|
||||
udelay(10000);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
|
||||
udelay(10000);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
|
||||
udelay(10000);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Check Board Identity */
|
||||
int checkboard (void)
|
||||
int checkboard(void)
|
||||
{
|
||||
puts ("Board: AcTux-4\n");
|
||||
return (0);
|
||||
puts("Board: AcTux-4\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
return (0);
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
struct pci_controller hose;
|
||||
|
||||
void pci_init_board(void)
|
||||
{
|
||||
pci_ixp_init(&hose);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hardcoded flash setup:
|
||||
* Flash 0 is a non-CFI SST 39VF020 flash, 8 bit flash / 8 bit bus.
|
||||
* Flash 1 is an Intel *16 flash using the CFI driver.
|
||||
*/
|
||||
ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t * info)
|
||||
ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
|
||||
{
|
||||
if (banknum == 0) { /* non-CFI boot flash */
|
||||
info->portwidth = 1;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x00e00000
|
||||
|
||||
# include NPE ethernet driver
|
||||
BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
||||
#include <netdev.h>
|
||||
@@ -48,28 +48,28 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
static void afeb9260_nand_hw_init(void)
|
||||
{
|
||||
unsigned long csa;
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA,
|
||||
csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
/* Assign CS3 to NAND/SmartMedia Interface */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
at91_sys_write(AT91_SMC_SETUP(3),
|
||||
AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) |
|
||||
AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
|
||||
at91_sys_write(AT91_SMC_PULSE(3),
|
||||
AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
|
||||
AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
|
||||
at91_sys_write(AT91_SMC_CYCLE(3),
|
||||
AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
|
||||
at91_sys_write(AT91_SMC_MODE(3),
|
||||
AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
|
||||
AT91_SMC_EXNWMODE_DISABLE |
|
||||
AT91_SMC_DBW_8 |
|
||||
AT91_SMC_TDF_(2));
|
||||
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
|
||||
writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
|
||||
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
AT91_SMC_MODE_TDF_CYCLE(2),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
@@ -81,10 +81,15 @@ static void afeb9260_nand_hw_init(void)
|
||||
#ifdef CONFIG_MACB
|
||||
static void afeb9260_macb_hw_init(void)
|
||||
{
|
||||
unsigned long rstc;
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
|
||||
struct at91_rstc *rstc = (struct at91_rstc *)ATMEL_BASE_RSTC;
|
||||
unsigned long erstl;
|
||||
|
||||
|
||||
/* Enable EMAC clock */
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/* Enable clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
|
||||
|
||||
/*
|
||||
* Disable pull-up on:
|
||||
@@ -103,24 +108,22 @@ static void afeb9260_macb_hw_init(void)
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUDR);
|
||||
&pioa->pudr);
|
||||
|
||||
rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
|
||||
erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK;
|
||||
|
||||
/* Need to reset PHY -> 500ms reset */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
AT91_RSTC_ERSTL | (0x0D << 8) |
|
||||
AT91_RSTC_URSTEN);
|
||||
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(13) |
|
||||
AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr);
|
||||
|
||||
/* Wait for end hardware reset */
|
||||
while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
|
||||
|
||||
while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL))
|
||||
;
|
||||
/* Restore NRST value */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(rstc) |
|
||||
AT91_RSTC_URSTEN);
|
||||
writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN,
|
||||
&rstc->mr);
|
||||
|
||||
|
||||
/* Re-enable pull-up */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
@@ -129,23 +132,29 @@ static void afeb9260_macb_hw_init(void)
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUER);
|
||||
&pioa->puer);
|
||||
|
||||
at91_macb_hw_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
/* Enable clocks for all PIOs */
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
return 0;
|
||||
}
|
||||
int board_init(void)
|
||||
{
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
/* arch number of AT91SAM9260EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AFEB9260;
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
afeb9260_nand_hw_init();
|
||||
#endif
|
||||
@@ -159,8 +168,10 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
|
||||
gd->ram_size = get_ram_size(
|
||||
(void *)CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_SIZE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -174,7 +185,7 @@ int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0, (void *)AT91SAM9260_BASE_EMAC, 0x01);
|
||||
rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x01);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ int board_init(void)
|
||||
* Correct IRDA resistor problem
|
||||
* Set PA23_TXD in Output
|
||||
*/
|
||||
writel(AT91_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
|
||||
/* arch number of AT91RM9200EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
|
||||
@@ -65,6 +65,6 @@ int dram_init (void)
|
||||
#ifdef CONFIG_DRIVER_AT91EMAC
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return at91emac_register(bis, (u32) AT91_EMAC_BASE);
|
||||
return at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_pio.h>
|
||||
|
||||
/* bit mask in PIO port B */
|
||||
#define GREEN_LED (1<<0)
|
||||
@@ -36,47 +38,47 @@
|
||||
|
||||
void green_LED_on(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(GREEN_LED, &pio->piob.codr);
|
||||
}
|
||||
|
||||
void yellow_LED_on(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(YELLOW_LED, &pio->piob.codr);
|
||||
}
|
||||
|
||||
void red_LED_on(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(RED_LED, &pio->piob.codr);
|
||||
}
|
||||
|
||||
void green_LED_off(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(GREEN_LED, &pio->piob.sodr);
|
||||
}
|
||||
|
||||
void yellow_LED_off(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(YELLOW_LED, &pio->piob.sodr);
|
||||
}
|
||||
|
||||
void red_LED_off(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(RED_LED, &pio->piob.sodr);
|
||||
}
|
||||
|
||||
void coloured_LED_init (void)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
|
||||
/* Enable PIOB clock */
|
||||
writel(1 << AT91_ID_PIOB, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOB, &pmc->pcer);
|
||||
|
||||
/* Disable peripherals on LEDs */
|
||||
writel(GREEN_LED | YELLOW_LED | RED_LED, &pio->piob.per);
|
||||
|
||||
@@ -23,17 +23,16 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/at91sam9260_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
|
||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
||||
#include <net.h>
|
||||
# include <net.h>
|
||||
#endif
|
||||
#include <netdev.h>
|
||||
|
||||
@@ -47,49 +46,53 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
static void at91sam9260ek_nand_hw_init(void)
|
||||
{
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
unsigned long csa;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA,
|
||||
csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
/* Assign CS3 to NAND/SmartMedia Interface */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
at91_sys_write(AT91_SMC_SETUP(3),
|
||||
AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) |
|
||||
AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0));
|
||||
at91_sys_write(AT91_SMC_PULSE(3),
|
||||
AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
|
||||
AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
|
||||
at91_sys_write(AT91_SMC_CYCLE(3),
|
||||
AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
|
||||
at91_sys_write(AT91_SMC_MODE(3),
|
||||
AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
|
||||
AT91_SMC_EXNWMODE_DISABLE |
|
||||
writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
|
||||
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
#ifdef CONFIG_SYS_NAND_DBW_16
|
||||
AT91_SMC_DBW_16 |
|
||||
AT91_SMC_MODE_DBW_16 |
|
||||
#else /* CONFIG_SYS_NAND_DBW_8 */
|
||||
AT91_SMC_DBW_8 |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
#endif
|
||||
AT91_SMC_TDF_(2));
|
||||
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
|
||||
AT91_SMC_MODE_TDF_CYCLE(2),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
|
||||
/* Enable NandFlash */
|
||||
at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACB
|
||||
static void at91sam9260ek_macb_hw_init(void)
|
||||
{
|
||||
unsigned long rstc;
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
|
||||
struct at91_rstc *rstc = (struct at91_rstc *)ATMEL_BASE_RSTC;
|
||||
unsigned long erstl;
|
||||
|
||||
/* Enable clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
|
||||
/* Enable EMAC clock */
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/*
|
||||
* Disable pull-up on:
|
||||
@@ -103,48 +106,57 @@ static void at91sam9260ek_macb_hw_init(void)
|
||||
* PHY has internal pull-down
|
||||
*/
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUDR);
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
&pioa->pudr);
|
||||
|
||||
rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
|
||||
erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK;
|
||||
|
||||
/* Need to reset PHY -> 500ms reset */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(AT91_RSTC_ERSTL & (0x0D << 8)) |
|
||||
AT91_RSTC_URSTEN);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(13) |
|
||||
AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr);
|
||||
|
||||
/* Wait for end hardware reset */
|
||||
while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
|
||||
while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL))
|
||||
;
|
||||
|
||||
/* Restore NRST value */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(rstc) |
|
||||
AT91_RSTC_URSTEN);
|
||||
writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN,
|
||||
&rstc->mr);
|
||||
|
||||
/* Re-enable pull-up */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUER);
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
&pioa->puer);
|
||||
|
||||
/* Initialize EMAC=MACB hardware */
|
||||
at91_macb_hw_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable clocks for all PIOs */
|
||||
writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
#ifdef CONFIG_AT91SAM9G20EK
|
||||
/* arch number of AT91SAM9260EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
|
||||
@@ -153,9 +165,9 @@ int board_init(void)
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
|
||||
#endif
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
at91sam9260ek_nand_hw_init();
|
||||
#endif
|
||||
@@ -171,8 +183,9 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
|
||||
gd->ram_size = get_ram_size(
|
||||
(void *)CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -186,7 +199,7 @@ int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0, (void *)AT91SAM9260_BASE_EMAC, 0x00);
|
||||
rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x00);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x23f00000
|
||||
@@ -23,16 +23,12 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
|
||||
void coloured_LED_init(void)
|
||||
{
|
||||
/* Enable clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOA);
|
||||
|
||||
/* Clock is enabled in board_early_init_f() */
|
||||
at91_set_gpio_output(CONFIG_RED_LED, 1);
|
||||
at91_set_gpio_output(CONFIG_GREEN_LED, 1);
|
||||
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --dma 6
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#
|
||||
# (C) Copyright 2000-2006
|
||||
# (C) Copyright 2003-2008
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# (C) Copyright 2011 Bluewater Systems
|
||||
# Ryan Mallon <ryan@bluewatersys.com>
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
@@ -12,7 +15,7 @@
|
||||
#
|
||||
# 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
|
||||
# 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
|
||||
@@ -25,38 +28,17 @@ include $(TOPDIR)/config.mk
|
||||
|
||||
LIB = $(obj)lib$(BOARD).o
|
||||
|
||||
COBJS := trab.o flash.o vfd.o cmd_trab.o memory.o tsc2000.o auto_update.o
|
||||
SOBJS := lowlevel_init.o
|
||||
COBJS-y += snapper9260.o
|
||||
|
||||
COBJS_FKT := trab_fkt.o rs485.o tsc2000.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(COBJS_FKT:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS-y))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
OBJS_FKT := $(addprefix $(obj),$(COBJS_FKT))
|
||||
|
||||
LOAD_ADDR = 0xc100000
|
||||
|
||||
#########################################################################
|
||||
|
||||
all: $(LIB) $(obj)trab_fkt.srec $(obj)trab_fkt.bin
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||
$(call cmd_link_o_target, $(OBJS) $(SOBJS))
|
||||
|
||||
$(obj)trab_fkt.srec: $(OBJS_FKT) $(LIB)
|
||||
$(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e trab_fkt $^ $(LIB) \
|
||||
-L$(obj)../../examples/standalone -lstubs \
|
||||
-L$(obj)../../lib -lgeneric \
|
||||
$(PLATFORM_LIBS)
|
||||
$(OBJCOPY) -O srec $(<:.o=) $@
|
||||
|
||||
$(obj)trab_fkt.bin: $(obj)trab_fkt.srec
|
||||
$(OBJCOPY) -I srec -O binary $< $@
|
||||
|
||||
clean:
|
||||
rm -f $(SOBJS) $(OBJS) $(OBJS_FKT)
|
||||
rm -f $(SOBJS) $(OBJS)
|
||||
|
||||
distclean: clean
|
||||
rm -f $(LIB) core *.bak $(obj).depend
|
||||
169
board/bluewater/snapper9260/snapper9260.c
Normal file
169
board/bluewater/snapper9260/snapper9260.c
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Bluewater Systems Snapper 9260/9G20 modules
|
||||
*
|
||||
* (C) Copyright 2011 Bluewater Systems
|
||||
* Author: Andre Renaud <andre@bluewatersys.com>
|
||||
* Author: Ryan Mallon <ryan@bluewatersys.com>
|
||||
*
|
||||
* 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 <asm/io.h>
|
||||
#include <asm/arch/at91sam9260_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <net.h>
|
||||
#include <netdev.h>
|
||||
#include <i2c.h>
|
||||
#include <pca953x.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* IO Expander pins */
|
||||
#define IO_EXP_ETH_RESET (0 << 1)
|
||||
#define IO_EXP_ETH_POWER (1 << 1)
|
||||
|
||||
static void macb_hw_init(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
|
||||
struct at91_rstc *rstc = (struct at91_rstc *)ATMEL_BASE_RSTC;
|
||||
unsigned long erstl;
|
||||
|
||||
/* Enable clock */
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/* Disable pull-ups to prevent PHY going into test mode */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA18),
|
||||
&pioa->pudr);
|
||||
|
||||
/* Power down ethernet */
|
||||
pca953x_set_dir(0x28, IO_EXP_ETH_POWER, PCA953X_DIR_OUT);
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_POWER, 1);
|
||||
|
||||
/* Hold ethernet in reset */
|
||||
pca953x_set_dir(0x28, IO_EXP_ETH_RESET, PCA953X_DIR_OUT);
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_RESET, 0);
|
||||
|
||||
/* Enable ethernet power */
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_POWER, 0);
|
||||
|
||||
/* Need to reset PHY -> 500ms reset */
|
||||
erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK;
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(13) |
|
||||
AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr);
|
||||
|
||||
/* Wait for end hardware reset */
|
||||
while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL))
|
||||
;
|
||||
|
||||
/* Restore NRST value */
|
||||
writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
|
||||
/* Bring the ethernet out of reset */
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_RESET, 1);
|
||||
|
||||
/* The phy internal reset take 21ms */
|
||||
udelay(21 * 1000);
|
||||
|
||||
/* Re-enable pull-up */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA18),
|
||||
&pioa->puer);
|
||||
|
||||
at91_macb_hw_init();
|
||||
}
|
||||
|
||||
static void nand_hw_init(void)
|
||||
{
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
unsigned long csa;
|
||||
|
||||
/* Enable CS3 as NAND/SmartMedia */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
writel(AT91_SMC_SETUP_NWE(2) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(2) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(4) | AT91_SMC_PULSE_NCS_WR(4) |
|
||||
AT91_SMC_PULSE_NRD(4) | AT91_SMC_PULSE_NCS_RD(4),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(7) | AT91_SMC_CYCLE_NRD(7),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
AT91_SMC_MODE_TDF_CYCLE(3),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
|
||||
/* Enable NandFlash */
|
||||
at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable PIO clocks */
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC), &pmc->pcer);
|
||||
|
||||
/* The mach-type is the same for both Snapper 9260 and 9G20 */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_SNAPPER_9260;
|
||||
|
||||
/* Address of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
/* Initialise peripherals */
|
||||
at91_seriald_hw_init();
|
||||
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
|
||||
nand_hw_init();
|
||||
macb_hw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x1f);
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void reset_phy(void)
|
||||
{
|
||||
}
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --dma 6
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0xa0000000
|
||||
|
||||
# PLATFORM_CPPFLAGS += -DDEBUG
|
||||
50
board/dvlhost/Makefile
Normal file
50
board/dvlhost/Makefile
Normal file
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# (C) Copyright 2000-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# 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 $(TOPDIR)/config.mk
|
||||
|
||||
LIB = $(obj)lib$(BOARD).o
|
||||
|
||||
COBJS := dvlhost.o watchdog.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS)
|
||||
$(call cmd_link_o_target, $(OBJS))
|
||||
|
||||
clean:
|
||||
rm -f $(SOBJS) $(OBJS)
|
||||
|
||||
distclean: clean
|
||||
rm -f $(LIB) core *.bak $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
130
board/dvlhost/dvlhost.c
Normal file
130
board/dvlhost/dvlhost.c
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Michael Schwingen, michael@schwingen.org
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* 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 <config.h>
|
||||
#include <command.h>
|
||||
#include <malloc.h>
|
||||
#include <asm/arch/ixp425.h>
|
||||
#include <asm/io.h>
|
||||
#include <miiphy.h>
|
||||
#ifdef CONFIG_PCI
|
||||
#include <pci.h>
|
||||
#include <asm/arch/ixp425pci.h>
|
||||
#endif
|
||||
|
||||
#include "dvlhost_hw.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
/* CS1: LED Latch */
|
||||
writel(0xBFFF0002, IXP425_EXP_CS1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_DVLHOST;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = 0x00000100;
|
||||
|
||||
/* Setup GPIOs used as output */
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_WDGTRIGGER);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DLAN_PAIRING);
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_PCIRST);
|
||||
|
||||
/*
|
||||
* LED latch enable and watchdog enable are tied to the same GPIO,
|
||||
* so we need to trigger the watchdog if we want to enable the LEDs.
|
||||
*/
|
||||
#ifdef CONFIG_HW_WATCHDOG
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_WDG_LED_EN);
|
||||
#else
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_WDG_LED_EN);
|
||||
#endif
|
||||
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_WDGTRIGGER);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DLAN_PAIRING);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_WDG_LED_EN);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCIRST);
|
||||
|
||||
/* Setup GPIOs for Interrupt inputs */
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_BTN_WLAN);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_BTN_PAIRING);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_BTN_RESET);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_IRQA);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_IRQB);
|
||||
|
||||
/* Setup GPIO's for 33MHz clock output */
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
writel(0x01FF01FF, IXP425_GPIO_GPCLKR);
|
||||
|
||||
/* turn off all LEDs */
|
||||
writew(0x0000, DVLHOST_LED_LATCH);
|
||||
|
||||
udelay(533);
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_PCIRST);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Check Board Identity */
|
||||
int checkboard(void)
|
||||
{
|
||||
char *s = getenv("serial#");
|
||||
|
||||
puts("Board: dLAN 200AV (dvlhost)");
|
||||
|
||||
if (s != NULL) {
|
||||
puts(", serial# ");
|
||||
puts(s);
|
||||
}
|
||||
putc('\n');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
struct pci_controller hose;
|
||||
|
||||
void pci_init_board(void)
|
||||
{
|
||||
pci_ixp_init(&hose);
|
||||
}
|
||||
#endif
|
||||
|
||||
void reset_phy(void)
|
||||
{
|
||||
/* init IcPlus IP175C ethernet switch to native IP175C mode */
|
||||
miiphy_write("NPE1", 29, 31, 0x175C);
|
||||
}
|
||||
47
board/dvlhost/dvlhost_hw.h
Normal file
47
board/dvlhost/dvlhost_hw.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Michael Schwingen, michael@schwingen.org
|
||||
*
|
||||
* hardware register definitions for the
|
||||
* dLAN200 AV Wireless G ("dvlhost") board.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef _DVLHOST_HW_H
|
||||
#define _DVLHOST_HW_H
|
||||
|
||||
/*
|
||||
* GPIO settings
|
||||
*/
|
||||
#define CONFIG_SYS_GPIO_WDGTRIGGER 0 /* Out */
|
||||
#define CONFIG_SYS_GPIO_BTN_WLAN 1
|
||||
#define CONFIG_SYS_GPIO_BTN_PAIRING 6
|
||||
#define CONFIG_SYS_GPIO_DLAN_PAIRING 7 /* Out */
|
||||
#define CONFIG_SYS_GPIO_BTN_RESET 9
|
||||
#define CONFIG_SYS_GPIO_IRQB 10
|
||||
#define CONFIG_SYS_GPIO_IRQA 11
|
||||
#define CONFIG_SYS_GPIO_WDG_LED_EN 12 /* Out */
|
||||
#define CONFIG_SYS_GPIO_PCIRST 13 /* Out */
|
||||
#define CONFIG_SYS_GPIO_PCI_CLK 14 /* Out */
|
||||
#define CONFIG_SYS_GPIO_EXTBUS_CLK 15 /* Out */
|
||||
|
||||
#define DVLHOST_LED_LATCH IXP425_EXP_BUS_CS1_BASE_PHYS
|
||||
|
||||
#endif
|
||||
87
board/dvlhost/u-boot.lds
Normal file
87
board/dvlhost/u-boot.lds
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
OUTPUT_FORMAT ("elf32-bigarm", "elf32-bigarm", "elf32-bigarm")
|
||||
OUTPUT_ARCH (arm)
|
||||
ENTRY (_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x00000000;
|
||||
|
||||
. = ALIGN (4);
|
||||
.text : {
|
||||
arch/arm/cpu/ixp/start.o(.text*)
|
||||
net/libnet.o(.text*)
|
||||
board/dvlhost/libdvlhost.o(.text*)
|
||||
arch/arm/cpu/ixp/libixp.o(.text*)
|
||||
drivers/serial/libserial.o(.text*)
|
||||
|
||||
. = env_offset;
|
||||
common/env_embedded.o(.ppcenv)
|
||||
*(.text*)
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
.rodata : {
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
. = ALIGN (4);
|
||||
.data : {
|
||||
*(.data*)
|
||||
}
|
||||
. = ALIGN (4);
|
||||
.got : {
|
||||
*(.got)
|
||||
}
|
||||
. =.;
|
||||
__u_boot_cmd_start =.;
|
||||
.u_boot_cmd : {
|
||||
*(.u_boot_cmd)
|
||||
}
|
||||
__u_boot_cmd_end =.;
|
||||
|
||||
. = ALIGN (4);
|
||||
.rel.dyn : {
|
||||
__rel_dyn_start = .;
|
||||
*(.rel*)
|
||||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
.dynsym : {
|
||||
__dynsym_start = .;
|
||||
*(.dynsym)
|
||||
}
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss*)
|
||||
. = ALIGN(4);
|
||||
_end = .;
|
||||
}
|
||||
__bss_end__ =.;
|
||||
/DISCARD/ : { *(.dynstr*) }
|
||||
/DISCARD/ : { *(.dynamic*) }
|
||||
/DISCARD/ : { *(.plt*) }
|
||||
/DISCARD/ : { *(.interp*) }
|
||||
/DISCARD/ : { *(.gnu*) }
|
||||
}
|
||||
43
board/dvlhost/watchdog.c
Normal file
43
board/dvlhost/watchdog.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Michael Schwingen, michael@schwingen.org
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* 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 <config.h>
|
||||
#include <asm/io.h>
|
||||
#include "dvlhost_hw.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_HW_WATCHDOG
|
||||
#include <watchdog.h>
|
||||
#include <asm/arch/ixp425.h>
|
||||
|
||||
void hw_watchdog_reset(void)
|
||||
{
|
||||
unsigned int x;
|
||||
x = readl(IXP425_GPIO_GPOUTR);
|
||||
x ^= (1 << (CONFIG_SYS_GPIO_WDGTRIGGER));
|
||||
writel(x, IXP425_GPIO_GPOUTR);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HW_WATCHDOG */
|
||||
@@ -31,7 +31,8 @@
|
||||
#include <mmc.h>
|
||||
#include <i2c.h>
|
||||
#include <spi.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91sam9260_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
@@ -39,35 +40,35 @@
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/at91_shdwn.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
static void nand_hw_init(void)
|
||||
{
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
unsigned long csa;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA,
|
||||
csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
/* Assign CS3 to NAND/SmartMedia Interface */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
at91_sys_write(AT91_SMC_SETUP(3),
|
||||
AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) |
|
||||
AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0));
|
||||
at91_sys_write(AT91_SMC_PULSE(3),
|
||||
AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
|
||||
AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
|
||||
at91_sys_write(AT91_SMC_CYCLE(3),
|
||||
AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
|
||||
at91_sys_write(AT91_SMC_MODE(3),
|
||||
AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
|
||||
AT91_SMC_EXNWMODE_DISABLE |
|
||||
AT91_SMC_DBW_8 |
|
||||
AT91_SMC_TDF_(2));
|
||||
writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
|
||||
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
AT91_SMC_MODE_TDF_CYCLE(2),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
@@ -80,8 +81,10 @@ static void nand_hw_init(void)
|
||||
#ifdef CONFIG_MACB
|
||||
static void macb_hw_init(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable EMAC clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/* Initialize EMAC=MACB hardware */
|
||||
at91_macb_hw_init();
|
||||
@@ -92,14 +95,16 @@ static void macb_hw_init(void)
|
||||
/* this is a weak define that we are overriding */
|
||||
int board_mmc_init(bd_t *bd)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable MCI clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
|
||||
writel(1 << ATMEL_ID_MCI, &pmc->pcer);
|
||||
|
||||
/* Initialize MCI hardware */
|
||||
at91_mci_hw_init();
|
||||
|
||||
/* This calls the atmel_mmc_init in gen_atmel_mci.c */
|
||||
return atmel_mci_init((void *)AT91_BASE_MCI);
|
||||
return atmel_mci_init((void *)ATMEL_BASE_MCI);
|
||||
}
|
||||
|
||||
/* this is a weak define that we are overriding */
|
||||
@@ -120,7 +125,8 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_shdwn *shdwn = (struct at91_shdwn *)AT91_SHDWN_BASE;
|
||||
struct at91_shdwn *shdwn = (struct at91_shdwn *)ATMEL_BASE_SHDWN;
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/*
|
||||
* make sure the board can be powered on by
|
||||
@@ -130,9 +136,9 @@ int board_early_init_f(void)
|
||||
&shdwn->mr);
|
||||
|
||||
/* Enable clocks for all PIOs */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOA);
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOB);
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
|
||||
writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
|
||||
/* set SCL0 and SDA0 to open drain */
|
||||
at91_set_pio_output(I2C0_PORT, SCL0_PIN, 1);
|
||||
@@ -159,7 +165,7 @@ int board_init(void)
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
nand_hw_init();
|
||||
#endif
|
||||
@@ -211,7 +217,7 @@ int board_eth_init(bd_t *bis)
|
||||
int num = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0,
|
||||
(void *)AT91_EMAC_BASE,
|
||||
(void *)ATMEL_BASE_EMAC0,
|
||||
CONFIG_SYS_PHY_ID);
|
||||
if (!rc)
|
||||
num++;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Lead Tech Design <www.leadtechdesign.com>
|
||||
* Ilko Iliev <www.ronetix.at>
|
||||
*
|
||||
* (C) Copyright 2009
|
||||
* (C) Copyright 2009-2011
|
||||
* Eric Benard <eric@eukrea.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
@@ -27,16 +27,15 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/sizes.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_matrix.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/at91_matrix.h>
|
||||
#include <asm/arch/at91_pio.h>
|
||||
#include <asm/arch/clk.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
||||
#include <net.h>
|
||||
@@ -54,9 +53,9 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
static void cpu9260_nand_hw_init(void)
|
||||
{
|
||||
unsigned long csa;
|
||||
at91_smc_t *smc = (at91_smc_t *) AT91_SMC_BASE;
|
||||
at91_matrix_t *matrix = (at91_matrix_t *) AT91_MATRIX_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_smc_t *smc = (at91_smc_t *) ATMEL_BASE_SMC;
|
||||
at91_matrix_t *matrix = (at91_matrix_t *) ATMEL_BASE_MATRIX;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = readl(&matrix->csa) | AT91_MATRIX_CSA_EBI_CS3A;
|
||||
@@ -93,7 +92,7 @@ static void cpu9260_nand_hw_init(void)
|
||||
&smc->cs[3].mode);
|
||||
#endif
|
||||
|
||||
writel(1 << AT91SAM9260_ID_PIOC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
@@ -107,11 +106,11 @@ static void cpu9260_nand_hw_init(void)
|
||||
static void cpu9260_macb_hw_init(void)
|
||||
{
|
||||
unsigned long rstcmr;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_rstc_t *rstc = (at91_rstc_t *) AT91_RSTC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_rstc_t *rstc = (at91_rstc_t *) ATMEL_BASE_RSTC;
|
||||
|
||||
/* Enable clock */
|
||||
writel(1 << AT91SAM9260_ID_EMAC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
at91_set_pio_pullup(AT91_PIO_PORTA, 17, 1);
|
||||
|
||||
@@ -136,14 +135,14 @@ static void cpu9260_macb_hw_init(void)
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
writel((1 << AT91SAM9260_ID_PIOA) |
|
||||
(1 << AT91SAM9260_ID_PIOC) |
|
||||
(1 << AT91SAM9260_ID_PIOB),
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -184,7 +183,7 @@ int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0, (void *)AT91_EMAC_BASE, 0);
|
||||
rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
static unsigned int saved_state[4] = {STATUS_LED_OFF, STATUS_LED_OFF,
|
||||
STATUS_LED_OFF, STATUS_LED_OFF};
|
||||
|
||||
void coloured_LED_init(void)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable clock */
|
||||
writel(1 << AT91SAM9260_ID_PIOC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
|
||||
|
||||
at91_set_pio_output(CONFIG_RED_LED, 1);
|
||||
at91_set_pio_output(CONFIG_GREEN_LED, 1);
|
||||
|
||||
@@ -63,7 +63,7 @@ int dram_init(void)
|
||||
#ifdef CONFIG_DRIVER_AT91EMAC
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return at91emac_register(bis, (u32) AT91_EMAC_BASE);
|
||||
return at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -71,8 +71,8 @@ int board_eth_init(bd_t *bis)
|
||||
void i2c_init_board(void)
|
||||
{
|
||||
u32 pin;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
writel(1 << AT91_ID_PIOA, &pmc->pcer);
|
||||
pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x87f00000
|
||||
@@ -28,15 +28,21 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init (void)
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
}
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -94,6 +100,11 @@ int board_init (void)
|
||||
readb(CS4_BASE + 8);
|
||||
readb(CS4_BASE + 7);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX31ADS; /* board id for linux */
|
||||
gd->bd->bi_boot_params = 0x80000100; /* adress of boot parameters */
|
||||
|
||||
|
||||
@@ -48,23 +48,47 @@ SECTIONS
|
||||
|
||||
*(.text)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
.data : {
|
||||
*(.data)
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.got : { *(.got) }
|
||||
|
||||
. = .;
|
||||
__u_boot_cmd_start = .;
|
||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||
__u_boot_cmd_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_start = .;
|
||||
.bss : { *(.bss) . = ALIGN(4); }
|
||||
__bss_end__ = .;
|
||||
|
||||
.rel.dyn : {
|
||||
__rel_dyn_start = .;
|
||||
*(.rel*)
|
||||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
.dynsym : {
|
||||
__dynsym_start = .;
|
||||
*(.dynsym)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
}
|
||||
|
||||
/DISCARD/ : { *(.bss*) }
|
||||
/DISCARD/ : { *(.dynstr*) }
|
||||
/DISCARD/ : { *(.dynsym*) }
|
||||
/DISCARD/ : { *(.dynamic*) }
|
||||
/DISCARD/ : { *(.hash*) }
|
||||
/DISCARD/ : { *(.plt*) }
|
||||
/DISCARD/ : { *(.interp*) }
|
||||
/DISCARD/ : { *(.gnu*) }
|
||||
}
|
||||
|
||||
@@ -308,7 +308,8 @@ int board_eth_init(bd_t *bis)
|
||||
* ft_codec_setup - fix up the clock-frequency property of the codec node
|
||||
*
|
||||
* Update the clock-frequency property based on the value of the 'audclk'
|
||||
* hwconfig option. If audclk is not specified, then default to 12.288MHz.
|
||||
* hwconfig option. If audclk is not specified, then don't write anything
|
||||
* to the device tree, because it means that the codec clock is disabled.
|
||||
*/
|
||||
static void ft_codec_setup(void *blob, const char *compatible)
|
||||
{
|
||||
@@ -317,12 +318,15 @@ static void ft_codec_setup(void *blob, const char *compatible)
|
||||
u32 freq;
|
||||
|
||||
audclk = hwconfig_arg("audclk", &arglen);
|
||||
if (audclk && (strncmp(audclk, "11", 2) == 0))
|
||||
freq = 11289600;
|
||||
else
|
||||
freq = 12288000;
|
||||
if (audclk) {
|
||||
if (strncmp(audclk, "11", 2) == 0)
|
||||
freq = 11289600;
|
||||
else
|
||||
freq = 12288000;
|
||||
|
||||
do_fixup_by_compat_u32(blob, compatible, "clock-frequency", freq, 1);
|
||||
do_fixup_by_compat_u32(blob, compatible, "clock-frequency",
|
||||
freq, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ft_board_setup(void *blob, bd_t *bd)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x87f00000
|
||||
@@ -30,15 +30,24 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_PCM037; /* board id for linux */
|
||||
gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
__REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */
|
||||
__REG(CSCR_L(0)) = 0x10000d03;
|
||||
@@ -62,9 +71,6 @@ int board_init (void)
|
||||
mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
|
||||
mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_PCM037; /* board id for linux */
|
||||
gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#
|
||||
CONFIG_SYS_TEXT_BASE = 0x00f80000
|
||||
@@ -1,427 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
|
||||
*
|
||||
* (C) Copyright 2001
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* 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 <linux/byteorder/swab.h>
|
||||
|
||||
|
||||
flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
||||
|
||||
/* Board support for 1 or 2 flash devices */
|
||||
#undef FLASH_PORT_WIDTH32
|
||||
#define FLASH_PORT_WIDTH16
|
||||
|
||||
#ifdef FLASH_PORT_WIDTH16
|
||||
#define FLASH_PORT_WIDTH ushort
|
||||
#define FLASH_PORT_WIDTHV vu_short
|
||||
#define SWAP(x) x
|
||||
#else
|
||||
#define FLASH_PORT_WIDTH ulong
|
||||
#define FLASH_PORT_WIDTHV vu_long
|
||||
#define SWAP(x) __swab32(x)
|
||||
#endif
|
||||
|
||||
#define FPW FLASH_PORT_WIDTH
|
||||
#define FPWV FLASH_PORT_WIDTHV
|
||||
|
||||
#define mb() __asm__ __volatile__ ("" : : : "memory")
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Functions
|
||||
*/
|
||||
static ulong flash_get_size (FPW * addr, flash_info_t * info);
|
||||
static int write_data (flash_info_t * info, ulong dest, FPW data);
|
||||
static void flash_get_offsets (ulong base, flash_info_t * info);
|
||||
void inline spin_wheel (void);
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
unsigned long flash_init (void)
|
||||
{
|
||||
int i;
|
||||
ulong size = 0;
|
||||
|
||||
for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
flash_get_size ((FPW *) PHYS_FLASH_1, &flash_info[i]);
|
||||
flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
|
||||
break;
|
||||
default:
|
||||
panic ("configured too many flash banks!\n");
|
||||
break;
|
||||
}
|
||||
size += flash_info[i].size;
|
||||
}
|
||||
|
||||
/* Protect monitor and environment sectors
|
||||
*/
|
||||
flash_protect (FLAG_PROTECT_SET,
|
||||
CONFIG_SYS_FLASH_BASE,
|
||||
CONFIG_SYS_FLASH_BASE + _bss_start - _armboot_start,
|
||||
&flash_info[0]);
|
||||
|
||||
flash_protect (FLAG_PROTECT_SET,
|
||||
CONFIG_ENV_ADDR,
|
||||
CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
static void flash_get_offsets (ulong base, flash_info_t * info)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
|
||||
for (i = 0; i < info->sector_count; i++) {
|
||||
info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
|
||||
info->protect[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
void flash_print_info (flash_info_t * info)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
printf ("missing or unknown FLASH type\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (info->flash_id & FLASH_VENDMASK) {
|
||||
case FLASH_MAN_INTEL:
|
||||
printf ("INTEL ");
|
||||
break;
|
||||
default:
|
||||
printf ("Unknown Vendor ");
|
||||
break;
|
||||
}
|
||||
|
||||
switch (info->flash_id & FLASH_TYPEMASK) {
|
||||
case FLASH_28F128J3A:
|
||||
printf ("28F128J3A\n");
|
||||
break;
|
||||
default:
|
||||
printf ("Unknown Chip Type\n");
|
||||
break;
|
||||
}
|
||||
|
||||
printf (" Size: %ld MB in %d Sectors\n",
|
||||
info->size >> 20, info->sector_count);
|
||||
|
||||
printf (" Sector Start Addresses:");
|
||||
for (i = 0; i < info->sector_count; ++i) {
|
||||
if ((i % 5) == 0)
|
||||
printf ("\n ");
|
||||
printf (" %08lX%s",
|
||||
info->start[i], info->protect[i] ? " (RO)" : " ");
|
||||
}
|
||||
printf ("\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The following code cannot be run from FLASH!
|
||||
*/
|
||||
static ulong flash_get_size (FPW * addr, flash_info_t * info)
|
||||
{
|
||||
volatile FPW value;
|
||||
|
||||
/* Write auto select command: read Manufacturer ID */
|
||||
addr[0x5555] = (FPW) 0x00AA00AA;
|
||||
addr[0x2AAA] = (FPW) 0x00550055;
|
||||
addr[0x5555] = (FPW) 0x00900090;
|
||||
|
||||
mb ();
|
||||
value = addr[0];
|
||||
|
||||
switch (value) {
|
||||
|
||||
case (FPW) INTEL_MANUFACT:
|
||||
info->flash_id = FLASH_MAN_INTEL;
|
||||
break;
|
||||
|
||||
default:
|
||||
info->flash_id = FLASH_UNKNOWN;
|
||||
info->sector_count = 0;
|
||||
info->size = 0;
|
||||
addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
|
||||
return (0); /* no or unknown flash */
|
||||
}
|
||||
|
||||
mb ();
|
||||
value = addr[1]; /* device ID */
|
||||
|
||||
switch (value) {
|
||||
|
||||
case (FPW) INTEL_ID_28F128J3A:
|
||||
info->flash_id += FLASH_28F128J3A;
|
||||
info->sector_count = 128;
|
||||
info->size = 0x02000000;
|
||||
break; /* => 16 MB */
|
||||
|
||||
default:
|
||||
info->flash_id = FLASH_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
if (info->sector_count > CONFIG_SYS_MAX_FLASH_SECT) {
|
||||
printf ("** ERROR: sector count %d > max (%d) **\n",
|
||||
info->sector_count, CONFIG_SYS_MAX_FLASH_SECT);
|
||||
info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
|
||||
}
|
||||
|
||||
addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
|
||||
|
||||
return (info->size);
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int flash_erase (flash_info_t * info, int s_first, int s_last)
|
||||
{
|
||||
int flag, prot, sect;
|
||||
ulong type;
|
||||
int rcode = 0;
|
||||
|
||||
if ((s_first < 0) || (s_first > s_last)) {
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
printf ("- missing\n");
|
||||
} else {
|
||||
printf ("- no sectors to erase\n");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
type = (info->flash_id & FLASH_VENDMASK);
|
||||
if ((type != FLASH_MAN_INTEL)) {
|
||||
printf ("Can't erase unknown flash type %08lx - aborted\n",
|
||||
info->flash_id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
prot = 0;
|
||||
for (sect = s_first; sect <= s_last; ++sect) {
|
||||
if (info->protect[sect]) {
|
||||
prot++;
|
||||
}
|
||||
}
|
||||
|
||||
if (prot) {
|
||||
printf ("- Warning: %d protected sectors will not be erased!\n", prot);
|
||||
} else {
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts ();
|
||||
|
||||
/* Start erase on unprotected sectors */
|
||||
for (sect = s_first; sect <= s_last; sect++) {
|
||||
if (info->protect[sect] == 0) { /* not protected */
|
||||
FPWV *addr = (FPWV *) (info->start[sect]);
|
||||
FPW status;
|
||||
|
||||
printf ("Erasing sector %2d ... ", sect);
|
||||
|
||||
/* arm simple, non interrupt dependent timer */
|
||||
reset_timer_masked ();
|
||||
|
||||
*addr = (FPW) 0x00500050; /* clear status register */
|
||||
*addr = (FPW) 0x00200020; /* erase setup */
|
||||
*addr = (FPW) 0x00D000D0; /* erase confirm */
|
||||
|
||||
while (((status =
|
||||
*addr) & (FPW) 0x00800080) !=
|
||||
(FPW) 0x00800080) {
|
||||
if (get_timer_masked () >
|
||||
CONFIG_SYS_FLASH_ERASE_TOUT) {
|
||||
printf ("Timeout\n");
|
||||
*addr = (FPW) 0x00B000B0; /* suspend erase */
|
||||
*addr = (FPW) 0x00FF00FF; /* reset to read mode */
|
||||
rcode = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*addr = (FPW) 0x00500050; /* clear status register cmd. */
|
||||
*addr = (FPW) 0x00FF00FF; /* resest to read mode */
|
||||
|
||||
printf (" done\n");
|
||||
}
|
||||
}
|
||||
return rcode;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Copy memory to flash, returns:
|
||||
* 0 - OK
|
||||
* 1 - write timeout
|
||||
* 2 - Flash not erased
|
||||
* 4 - Flash not identified
|
||||
*/
|
||||
|
||||
int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
|
||||
{
|
||||
ulong cp, wp;
|
||||
FPW data;
|
||||
int count, i, l, rc, port_width;
|
||||
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* get lower word aligned address */
|
||||
#ifdef FLASH_PORT_WIDTH16
|
||||
wp = (addr & ~1);
|
||||
port_width = 2;
|
||||
#else
|
||||
wp = (addr & ~3);
|
||||
port_width = 4;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* handle unaligned start bytes
|
||||
*/
|
||||
if ((l = addr - wp) != 0) {
|
||||
data = 0;
|
||||
for (i = 0, cp = wp; i < l; ++i, ++cp) {
|
||||
data = (data << 8) | (*(uchar *) cp);
|
||||
}
|
||||
for (; i < port_width && cnt > 0; ++i) {
|
||||
data = (data << 8) | *src++;
|
||||
--cnt;
|
||||
++cp;
|
||||
}
|
||||
for (; cnt == 0 && i < port_width; ++i, ++cp) {
|
||||
data = (data << 8) | (*(uchar *) cp);
|
||||
}
|
||||
|
||||
if ((rc = write_data (info, wp, SWAP (data))) != 0) {
|
||||
return (rc);
|
||||
}
|
||||
wp += port_width;
|
||||
}
|
||||
|
||||
/*
|
||||
* handle word aligned part
|
||||
*/
|
||||
count = 0;
|
||||
while (cnt >= port_width) {
|
||||
data = 0;
|
||||
for (i = 0; i < port_width; ++i) {
|
||||
data = (data << 8) | *src++;
|
||||
}
|
||||
if ((rc = write_data (info, wp, SWAP (data))) != 0) {
|
||||
return (rc);
|
||||
}
|
||||
wp += port_width;
|
||||
cnt -= port_width;
|
||||
if (count++ > 0x800) {
|
||||
spin_wheel ();
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cnt == 0) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* handle unaligned tail bytes
|
||||
*/
|
||||
data = 0;
|
||||
for (i = 0, cp = wp; i < port_width && cnt > 0; ++i, ++cp) {
|
||||
data = (data << 8) | *src++;
|
||||
--cnt;
|
||||
}
|
||||
for (; i < port_width; ++i, ++cp) {
|
||||
data = (data << 8) | (*(uchar *) cp);
|
||||
}
|
||||
|
||||
return (write_data (info, wp, SWAP (data)));
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Write a word or halfword to Flash, returns:
|
||||
* 0 - OK
|
||||
* 1 - write timeout
|
||||
* 2 - Flash not erased
|
||||
*/
|
||||
static int write_data (flash_info_t * info, ulong dest, FPW data)
|
||||
{
|
||||
FPWV *addr = (FPWV *) dest;
|
||||
ulong status;
|
||||
int flag;
|
||||
|
||||
/* Check if Flash is (sufficiently) erased */
|
||||
if ((*addr & data) != data) {
|
||||
printf ("not erased at %08lx (%lx)\n", (ulong) addr,
|
||||
(ulong) * addr);
|
||||
return (2);
|
||||
}
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts ();
|
||||
|
||||
*addr = (FPW) 0x00400040; /* write setup */
|
||||
*addr = data;
|
||||
|
||||
/* arm simple, non interrupt dependent timer */
|
||||
reset_timer_masked ();
|
||||
|
||||
/* wait while polling the status register */
|
||||
while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
|
||||
if (get_timer_masked () > CONFIG_SYS_FLASH_WRITE_TOUT) {
|
||||
*addr = (FPW) 0x00FF00FF; /* restore read mode */
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
*addr = (FPW) 0x00FF00FF; /* restore read mode */
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
void inline spin_wheel (void)
|
||||
{
|
||||
static int p = 0;
|
||||
static char w[] = "\\/-";
|
||||
|
||||
printf ("\010%c", w[p]);
|
||||
(++p == 3) ? (p = 0) : 0;
|
||||
}
|
||||
@@ -33,24 +33,82 @@
|
||||
#include <malloc.h>
|
||||
#include <netdev.h>
|
||||
#include <asm/arch/ixp425.h>
|
||||
#include <asm/io.h>
|
||||
#ifdef CONFIG_PCI
|
||||
#include <pci.h>
|
||||
#include <asm/arch/ixp425pci.h>
|
||||
#endif
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define IXDP425_LED_PORT 0x52000000 /* 4-digit hex display */
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
/* CS2: LED port */
|
||||
writel(0xbcff0002, IXP425_EXP_CS2);
|
||||
writew(0x0001, IXDP425_LED_PORT); /* output postcode to LEDs */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
#ifndef CONFIG_PCI_PNP
|
||||
static struct pci_config_table pci_ixpdp425_config_table[] = {
|
||||
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x00, PCI_ANY_ID,
|
||||
pci_cfgfunc_config_device,
|
||||
{ 0x400,
|
||||
0x40000000,
|
||||
PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER } },
|
||||
|
||||
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x01, PCI_ANY_ID,
|
||||
pci_cfgfunc_config_device,
|
||||
{ 0x800,
|
||||
0x40010000,
|
||||
PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER } },
|
||||
|
||||
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x02, PCI_ANY_ID,
|
||||
pci_cfgfunc_config_device,
|
||||
{ 0xc00,
|
||||
0x40020000,
|
||||
PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER } },
|
||||
|
||||
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x03, PCI_ANY_ID,
|
||||
pci_cfgfunc_config_device,
|
||||
{ 0x1000,
|
||||
0x40030000,
|
||||
PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER } },
|
||||
{ }
|
||||
};
|
||||
#endif
|
||||
|
||||
struct pci_controller hose = {
|
||||
#ifndef CONFIG_PCI_PNP
|
||||
config_table: pci_ixpdp425_config_table,
|
||||
#endif
|
||||
};
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
|
||||
/*
|
||||
* Miscelaneous platform dependent initialisations
|
||||
*/
|
||||
int board_init (void)
|
||||
int board_init(void)
|
||||
{
|
||||
writew(0x0002, IXDP425_LED_PORT); /* output postcode to LEDs */
|
||||
|
||||
#ifdef CONFIG_IXDPG425
|
||||
/* arch number of IXDP */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_IXDPG425;
|
||||
#else
|
||||
/* arch number of IXDP */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_IXDP425;
|
||||
#endif
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = 0x00000100;
|
||||
|
||||
#ifdef CONFIG_IXDPG425
|
||||
/* arch number of IXDP */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_IXDPG425;
|
||||
|
||||
/*
|
||||
* Get realtek RTL8305 switch and SLIC out of reset
|
||||
*/
|
||||
@@ -60,19 +118,56 @@ int board_init (void)
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_SLIC_RESET_N);
|
||||
|
||||
/*
|
||||
* Setup GPIO's for PCI INTA & INTB
|
||||
* Setup GPIOs for PCI INTA & INTB
|
||||
*/
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTA_N);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTA_N);
|
||||
GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTB_N);
|
||||
GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTB_N);
|
||||
|
||||
/*
|
||||
* Setup GPIO's for 33MHz clock output
|
||||
*/
|
||||
*IXP425_GPIO_GPCLKR = 0x01FF01FF;
|
||||
/* Setup GPIOs for 33MHz clock output */
|
||||
writel(0x01FF01FF, IXP425_GPIO_GPCLKR);
|
||||
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
|
||||
/* set GPIO8..11 interrupt type to active low */
|
||||
writel((0x1 << 9) | (0x1 << 6) | (0x1 << 3) | 0x1, IXP425_GPIO_GPIT2R);
|
||||
|
||||
/* clear pending interrupts */
|
||||
writel(-1, IXP425_GPIO_GPISR);
|
||||
|
||||
/* assert PCI reset */
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_SLIC_RESET_N);
|
||||
|
||||
udelay(533);
|
||||
|
||||
/* deassert PCI reset */
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_SLIC_RESET_N);
|
||||
|
||||
udelay(533);
|
||||
|
||||
#else /* IXDP425 */
|
||||
/* Setup GPIOs for 33MHz ExpBus and PCI clock output */
|
||||
writel(0x01FF01FF, IXP425_GPIO_GPCLKR);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
|
||||
GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_RESET_N);
|
||||
|
||||
/* set GPIO8..11 interrupt type to active low */
|
||||
writel((0x1 << 9) | (0x1 << 6) | (0x1 << 3) | 0x1, IXP425_GPIO_GPIT2R);
|
||||
/* clear pending interrupts */
|
||||
writel(-1, IXP425_GPIO_GPISR);
|
||||
|
||||
/* assert PCI reset */
|
||||
GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_PCI_RESET_N);
|
||||
|
||||
udelay(533);
|
||||
|
||||
/* deassert PCI reset */
|
||||
GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_PCI_RESET_N);
|
||||
|
||||
udelay(533);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
@@ -98,30 +193,46 @@ int checkboard(void)
|
||||
}
|
||||
putc('\n');
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
return (0);
|
||||
/* we can only map 64MB via PCI, so we limit memory
|
||||
until a better solution is implemented. */
|
||||
#ifdef CONFIG_PCI
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 64<<20);
|
||||
#else
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 256<<20);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI)
|
||||
extern struct pci_controller hose;
|
||||
extern void pci_ixp_init(struct pci_controller * hose);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
void pci_init_board(void)
|
||||
{
|
||||
extern void pci_ixp_init (struct pci_controller *hose);
|
||||
|
||||
pci_ixp_init(&hose);
|
||||
}
|
||||
|
||||
/*
|
||||
* dev 0 on the PCI bus is not the host bridge, so we have to override
|
||||
* these functions in order to not skip PCI slot 0 during configuration.
|
||||
*/
|
||||
int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int pci_print_dev(struct pci_controller *hose, pci_dev_t dev)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return pci_eth_init(bis);
|
||||
#ifdef CONFIG_PCI
|
||||
pci_eth_init(bis);
|
||||
#endif
|
||||
return cpu_eth_init(bis);
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# with relocation CONFIG_SYS_TEXT_BASE can be anything, and making it 0
|
||||
# makes relative and absolute relocation fixups interchangeable.
|
||||
#CONFIG_SYS_TEXT_BASE = 0
|
||||
|
||||
CONFIG_SYS_TEXT_BASE = 0xc0000000
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0xa0000000
|
||||
@@ -29,21 +29,21 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
dram_init_banksize (void)
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
}
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
__REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */
|
||||
__REG(CSCR_L(0)) = 0xa0330d01;
|
||||
@@ -71,6 +71,11 @@ int board_init (void)
|
||||
/* start SPI2 clock */
|
||||
__REG(CCM_CGR2) = __REG(CCM_CGR2) | (3 << 4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX31LITE; /* board id for linux */
|
||||
gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#
|
||||
# board/mx1ads/config.mk
|
||||
#
|
||||
# (c) Copyright 2004
|
||||
# Techware Information Technology, Inc.
|
||||
# http://www.techware.com.tw/
|
||||
#
|
||||
# Ming-Len Wu <minglen_wu@techware.com.tw>
|
||||
#
|
||||
# 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
|
||||
|
||||
CONFIG_SYS_TEXT_BASE = 0x08400000
|
||||
@@ -78,7 +78,7 @@ void SetAsynchMode (void)
|
||||
|
||||
static u32 mc9328sid;
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
volatile unsigned int tmp;
|
||||
|
||||
@@ -112,10 +112,6 @@ int board_init (void)
|
||||
|
||||
SetAsynchMode ();
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX1ADS;
|
||||
|
||||
gd->bd->bi_boot_params = 0x08000100; /* adress of boot parameters */
|
||||
|
||||
icache_enable ();
|
||||
dcache_enable ();
|
||||
|
||||
@@ -133,6 +129,15 @@ int board_init (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX1ADS;
|
||||
|
||||
gd->bd->bi_boot_params = 0x08000100; /* adress of boot parameters */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_late_init (void)
|
||||
{
|
||||
|
||||
@@ -161,12 +166,18 @@ int board_late_init (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_NET
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#
|
||||
CONFIG_SYS_TEXT_BASE = 0x01f00000
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user