aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-27common: move BUILD_BUG_ON define to common.hHeiko Schocher2-3/+3
see discussion also here: http://patchwork.ozlabs.org/patch/75309/ Signed-off-by: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de> cc: Holger Brunck <holger.brunck@keymile.com>
2011-07-27km/common: enable cramfs and cramfs cmdlineHolger Brunck1-1/+3
All the km boards uses CRAMFS images where the kernel is stored. This isn't architecture specific because we use it on ARM and POWERPC. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27powerpc/km82xx: remove 82xx specific functions from common.cHolger Brunck4-68/+69
Common code should be valid for more than one architecture, therefore the km82xx specific code was removed from common.c. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27km/common: remove fdt_(gs)et_node_and_valueHolger Brunck1-55/+0
This code is unused and therefore dead code. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27km/common: move ivm functions from to ivm.cHolger Brunck6-321/+352
The file common.c grows in the past. So move the IVM specific code into an ivm.c file. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27km/common: remove saveenv from do_checkboardidhwkeyHolger Brunck1-6/+1
This is unneeded here because we save the environment when the board boots the first time. At this time we have set the values already. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27km/common: force set ethaddr after reading IVMHolger Brunck1-2/+1
The ethaddr is stored inside the inventory eeprom. During boottime this value was read out and the ethaddr variable was set. Previously this was only done if it ethaddr == NULL but this is wrong for our ARM boards. Because ethaddr is at this stage never NULL for ARM due to the random calculation of a MAC address in mvgbe.c. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27km/common: remove obsolete defines and headerHolger Brunck2-139/+0
These defines and the header keymile_hdlc_enet.h are obsolete due to the removed hdlc code. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27km/common: simplify debug environmentHolger Brunck18-45/+68
The debug environment which is stored in textfiles in the scripts directory was reworked. Two usecase are now present which can be executed simply from the default environment: run develop: this configures the environment to setup the rootfs via nfs run ramfs: this configures the environment to setup the rootfs in ram Each architecture now has a "arch" variable which is used to load the architecture specific debug scripts and to set the rootpath for NFS. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27km/common: add test sw starting variableThomas Herzmann1-0/+2
The test SW is started when the test_bank variable is set. Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2011-07-27km/common: rework and simplify default environmentHolger Brunck3-94/+35
This is the second step to simplify and decrease the default environment for the keymile boards. The release usecase formaly used to set the production environment was removed and the default configuration is now the production environment. So the formar environment variable "release" which has done a lot of things in the past, simply erase the current environment and do a reset which forces u-boot to setup the default environment again. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de>
2011-07-27part_dos: fix crash with big sector sizeSergei Shtylyov2-10/+3
Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it tries to read the MBR into 512-byte buffer situated on stack. Instead use the variable length arrays to be safe with any large sector size. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2011-07-27post, memorytest: add support for none powerpc archsHeiko Schocher1-2/+6
change bd->bi_memsize to gd->ram_size, as this is defined on all archs, so this post test can used on none powerpc archs too. Signed-off-by: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <hs@denx.de> cc: Mike Frysinger <vapier@gentoo.org>
2011-07-27post, memorytest: fix if vstart is not = 0x0Heiko Schocher1-2/+3
Signed-off-by: Heiko Schocher <hs@denx.de>
2011-07-27net: Add SMSC89128 supportPhil Edworthy1-0/+2
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Cc: Ben Warren <biggerbadderben@gmail.com>
2011-07-27digsy_mtc: move board into vendor dir and add vendor logoAnatolij Gustschin12-4/+8
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-07-27mpc5200: digsy_mtc: add support for writing 'appreg' valueAnatolij Gustschin1-6/+40
Up to now only reading 'appreg' value was implemented in the digsyMTC special 'mtc appreg' command. Extend the command to support writing appreg value, too. Signed-off-by: Werner Pfister <Pfister_Werner@intercontrol.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
2011-07-27mpc5200: digsy_mtc: add support for graphic extension boardAnatolij Gustschin4-3/+154
Add detection and initialisation for graphic extension board and support splash screen when booting. Enable "bmp" command in the board configuration and provide "disp" command to be able to switch the display on/off. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
2011-07-27phylib: Detect link on 10G devices correctlyAndy Fleming2-2/+14
gen10g_startup() had 2 bugs: 1) It had a boolean logic error in checking the MMD mask, and always checked all of them. 2) It checked devices which don't actually report link state, which meant that it would never believe the link was fully up. Fix the boolean logic, and then mask the MMD mask so only link-reporting devices are checked. Signed-off-by: Andy Fleming <afleming@freescale.com> Reported-by: Ed Swarthout <Ed.Swarthout@freescale.com>
2011-07-27bootp: add ntpserver option to bootp requestLuuk Paulussen1-0/+15
Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz> Acked-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Ben Warren <biggerbadderben@gmail.com>
2011-07-26add command fitupd to run an update from a FIT imageAndreas Pretzsch3-0/+42
Command calls update_tftp() analogous to automatic update described in doc/README.update. Usage: fitupd [addr] - run update from FIT image at addr or from tftp 'updatefile' Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
2011-07-26automatic update from FIT image: add optional address parameterAndreas Pretzsch2-8/+16
Current update_tftp() flow: 1.) fetch "updatefile" from defined TFTP server 2.) check if FIT format 3.) flash contained images Add an address parameter to update_tftp(). If this address is non-zero, skip the TFTP transfer and use the image at this address. Also extend update_tftp() to return success/fail. Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
2011-07-26post: fix indendation/brace confusionJames Kosin1-12/+12
The post.c code is missing braces around the pass case, and as a result, the diagnostic function will post both fail and pass for a failed test. The reason for this bug is probably the incorrect indentation used, so when reading the code it seems like there are proper braces. Indent the code to the correct depth and put proper braces around the "else" branch of the "if" statement. Signed-off-by: James Kosin <jkosin@intcomgrp.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26fix unconfigured out-of-tree building of toolsMike Frysinger1-0/+1
Now that the tools target requires the generated version header file, we need to make sure that the directory it writes to exists. In a configured tree, this is taken care of for us. But in an unconfigured one, the dir does not yet exist causing a build error like so: /bin/sh: line 5: ..../u-boot_build/include/version_autogenerated.h.tmp: No such file or directory So create the dir for this file before we attempt to generate it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26panic: add noreturn attributeMike Frysinger1-1/+1
Since panic() never returns, we should add an appropriate attribute to let gcc improve optimization around it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26simplify clobber behavior with out-of-tree buildsMike Frysinger1-4/+1
The targets/prerequisites are the same here; the rules only differ in the recipes. So move the if logic protection to the recipe part so we can keep the rest the same. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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>