summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-26post: new nor flash testMike Frysinger4-2/+123
This adds a simple flash test to automatically verify erasing, writing, and reading of sectors. The code is based on existing Blackfin tests but generalized for everyone to use. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26post: use ARRAY_SIZEMike Frysinger25-52/+28
We've got a handy dandy macro already for calculating the number of elements in an array, so use it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26post: add gpio hotkey supportMike Frysinger1-0/+21
Now that we have the generic GPIO layer, we can easily provide a common implementation for the post_hotkeys_pressed() function based on it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26serial: implement common uart post testMike Frysinger2-0/+95
The current arch/driver specific UART posts basically boil down to setting the UART to loop back mode, then reading and writing data. If we ignore the loop back part, the rest can be built upon the existing common serial API. So let's do just that. First add a call back for serial drivers to implement loop back control. Then write a post test that walks all of the serial drivers, puts them into loop back mode, and verifies that reading/writing at all the diff baud rates is OK. If a serial driver doesn't support loop back mode (either it can't or it hasn't done so yet), then skip it. This should allow for people to easily migrate to the new post test with existing serial drivers. I haven't touched the few already existing uart post tests as I don't the hardware or knowledge of converting them over. So I've marked the new test as weak which will allow the existing tests to override the default until they are converted. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26serial: drop useless ctlr fieldMike Frysinger9-37/+22
The multi serial support has a "ctlr" field which almost no one uses, but everyone is forced to set to useless strings. So punt it. Funny enough, the only code that actually reads this field (the mpc8xx driver) has a typo where it meant to look for the SCC driver. Fix it while converting the check to use the name field. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Heiko Schocher <hs@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rix <Tom.Rix@windriver.com> CC: Minkyu Kang <mk7.kang@samsung.com> CC: Craig Nauman <cnauman@diagraph.com> CC: Marek Vasut <marek.vasut@gmail.com> CC: Prafulla Wadaskar <prafulla@marvell.com> CC: Mahavir Jain <mjain@marvell.com>
2011-07-26serial: drop serial_register return valueMike Frysinger1-3/+1
The serial_register function never fails (always return 0), so change it to a void function to avoid wasting overhead on it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26serial: push default_serial_console to driversMike Frysinger8-68/+80
Rather than sticking arch/board/driver specific logic in the common serial code, push it all out to the respective drivers. The serial drivers declare these funcs weak so that boards can still override things with their own definition. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Heiko Schocher <hs@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rix <Tom.Rix@windriver.com> CC: Minkyu Kang <mk7.kang@samsung.com> CC: Craig Nauman <cnauman@diagraph.com> CC: Prafulla Wadaskar <prafulla@marvell.com> CC: Mahavir Jain <mjain@marvell.com> Tested-by: Minkyu Kang <mk7.kang@samsung.com>
2011-07-26disable security warning flags when possibleMike Frysinger1-0/+4
Some toolchains enable security warning flags by default, but these don't really make sense in the u-boot world. Such as forcing changes like: -printf(foo); +printf("%s", foo); So disable the flags when the compiler supports them. Linux has already merged a similar change in their build system. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26cmd_usage: constifyMike Frysinger2-2/+2
The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26constify default envMike Frysinger3-4/+4
I can't see any obvious needs for the default environment to be writable, so make it const. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26env: allow people to force envcrc buildingMike Frysinger4-4/+18
For people who want to manually extract the embedded environment so that it can be manually packed into the final u-boot image, add a config opt to force building of the envcrc tool. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26sf: sst: support newer standardized flashesMike Frysinger1-2/+20
Newer SST flashes have dropped the Auto Address Increment (AAI) word programming (WP) modes in favor of the standard page programming mode that most flashes now support. So add a flags field to the different flashes to support both modes with new and old styles. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26sf: unify write disable commandsMike Frysinger2-1/+10
Every spi flash uses the same write disable command, so unify this in the common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Fixed commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-07-26sf: eon/stmicro: inline useless ID definesMike Frysinger2-20/+9
These defines are used in only one place, so just inline them. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26sf: kill off now-unused local stateMike Frysinger5-123/+61
Now that the common spi_flash structure tracks all the info that these drivers need, kill off their local state indirection and use just what the common code provides. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26sf: unify write funcsMike Frysinger8-325/+80
Once we add a new page_size field for write lengths, we can unify the write methods for most of the spi flash drivers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26sf: unify write enable commandsMike Frysinger9-8/+16
Every spi flash uses the same write enable command, so unify this in the common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26MAKEALL: add -h/--help optionsMike Frysinger1-52/+50
Convert all the comments at the top of the file into help text for people to easily get at with standard -h/--help options. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Detlev Zundel <dzu@denx.de>
2011-07-26Timer: Remove reset_timer_masked()Graeme Russ26-202/+47
In some circumstances, reset_timer_masked() was called be timer_init() in order to perform architecture specific timer initialisation. In such cases, the required code in reset_timer_masked() has been moved into timer_init()
2011-07-26Timer: Fix at91rm9200/spi.c timer usageGraeme Russ1-2/+3
2011-07-26Timer: Remove reset_timer() for non-Nios2 archesGraeme Russ49-270/+9
2011-07-26Timer: Allow reset_timer() only for systems with low resolution timersGraeme Russ5-0/+9
2011-07-26Timer: Remove set_timer completelyGraeme Russ49-254/+5
2011-07-26Remove calls to set_timer outside arch/Graeme Russ3-12/+18
There is no need to use set_timer(). Replace with appropriate use of get_timer() Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de>
2011-07-26spl: add support for omap-common librariesDaniel Schwierzeck1-0/+7
Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2011-07-26spl: Add support for common libraries and driversDaniel Schwierzeck1-0/+11
Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2011-07-26replace CONFIG_PRELOADER with CONFIG_SPL_BUILDAneesh V22-70/+70
replace all occurences of CONFIG_PRELOADER with CONFIG_SPL_BUILD Signed-off-by: Aneesh V <aneesh@ti.com>
2011-07-26scaled down version of generic libraries for SPLAneesh V5-8/+23
Signed-off-by: Aneesh V <aneesh@ti.com>
2011-07-26arm: adjust PLATFORM_LIBS for SPLAneesh V1-3/+10
Signed-off-by: Aneesh V <aneesh@ti.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-07-26Hook SPL build-system into toplevel MakefileDaniel Schwierzeck1-0/+5
Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2011-07-26Extend build-system for SPL frameworkDaniel Schwierzeck2-2/+35
Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2011-07-26spl: add initial support for a generic SPL frameworkDaniel Schwierzeck4-0/+205
Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2011-07-26Use ALL-y style instead of ifeq blocks for better readabilityDaniel Schwierzeck7-20/+12
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2011-07-26Fix: watchdog timed out, if using md5 commandJens Scharsig1-1/+1
* Fix: if using md5 command watchdog timed out * change function call md5(..) to the watchdog-safe variant md5_wd(..) to support watchdog reset Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
2011-07-26Fix: watchdog timed out, if using sha1 commandJens Scharsig1-1/+1
* Fix: if using sha1 command watchdog timed out * change function call sha1_csum(..) to the watchdog-safe variant sha1_csum_wd(..) to support watchdog reset Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
2011-07-26command/cmd_cache.c: Add optional flush argumentsMatthew McClintock1-9/+28
It might be desirable to have the ability to flush icache/dcache within u-boot, this patch gives each arch the ability to provide a flush_dcache/flush_icache function to let u-boot flush caches from the prompt Signed-off-by: Matthew McClintock <msm@freescale.com>
2011-07-26common/cmd_ximg.c: add ifdef protection for gzip uncompressionMatthew McClintock1-0/+2
Print a message if we do not have the ability to uncompress a gzip image. Before, u-boot would just assume the routines were available Signed-off-by: Matthew McClintock <msm@freescale.com>
2011-07-26disk/part.c: Make features optionalMatthew McClintock10-4/+33
If we don't want to build support for any partition types we can now add #undef CONFIG_PARTITIONS in a board config file to keep this from being compiled in. Otherwise boards assume this is compiled in by default Signed-off-by: Matthew McClintock <msm@freescale.com>
2011-07-26miiphy: use strncpy() not sprintf()Laurence Withers1-10/+4
In miiphy_register() the new device's name was initialised by passing a string parameter as the format string to sprintf(). As this would cause problems if it ever contained a '%' symbol, switch to using strncpy() instead. Signed-off-by: Laurence Withers <lwithers@guralp.com> Cc: Andy Fleming <afleming@freescale.com>
2011-07-26powerpc: Fix device tree padding associated with ramdiskKumar Gala1-1/+3
When booting with a ramdisk we bump the amount of memory reserved for the device tree by FDT_RAMDISK_OVERHEAD. However we did not increase the actual size in the device tree blob to match. Its possible on boundary cases that we dont have enough memory according to the device tree blob and get errors like: WARNING: could not set linux,initrd-end FDT_ERR_NOSPACE We can easily fix this by setting the device tree size at the same time we bump the amount of memory reserved for the device tree. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2011-07-26Revert "post, memory test: add memory_post_test() to include file"Wolfgang Denk1-1/+0
This reverts commit f18714dd61331b48ab9dc0ef717d61f1441a0e17 which cuases compile errors on a number of boards. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-07-26Fix: if using crc32 command watchdog timed outJens Scharsig1-2/+2
* Fix: if using crc32 command watchdog timed out * change function call crc32(..) to the watchdog-safe variant crc_32_wd(..) to support watchdog reset Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
2011-07-26memcpy/memmove: Do not copy to same addressMatthias Weisser1-0/+6
In some cases (e.g. bootm with a elf payload which is already at the right position) there is a in place copy of data to the same address. Catching this saves some ms while booting. Signed-off-by: Matthias Weisser <weisserm@arcor.de>
2011-07-26scsi/ahci: add support for non-PCI controllersRob Herring4-10/+70
Add support for AHCI controllers that are not PCI based. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Wolfgang Denk <wd@denx.de>
2011-07-26scsi/ahci: ata id little endian fixRob Herring1-1/+1
The ata id string always needs swapping, not just on BE machines. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2011-07-26post, memory test: add memory_post_test() to include fileHeiko Schocher1-0/+1
This include is needed, if this memory test is used "outside" from post code, for example booting with nand_spl, and using this memory test before copying u-boot code to RAM and jumping to it. Signed-off-by: Heiko Schocher <hs@denx.de>
2011-07-26andes_spi: add andes_spi interfaceMacpaul Lin3-0/+431
andes_spi is an spi interface developed by Andes Tech. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26cosmetic, main: correct indentation/spacing issuesJason Hobbs1-6/+6
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-07-26cosmetic, main: clean up declarations of abortbootJason Hobbs1-6/+2
Remove an unneeded prototype declaration from the top of main.c, and use plain inline instead of __inline__ to please checkpatch. Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-07-26net: designware: fix uninitialized phy_addr usageMike Frysinger1-0/+2
When CONFIG_DW_SEARCH_PHY is disabled, the local phy_addr variable never gets initialized which causes random behavior at runtime and a gcc warning. So set it by default to the stored phy address. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Vipin Kumar <vipin.kumar@st.com> Fix commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>