summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
...
| * | fdt: Rename fdt_create_phandle to fdt_set_phandleKumar Gala2011-09-29-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The old fdt_create_phandle didn't actually create a phandle it just set one. We'll introduce a new helper that actually does creation. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* | | Revert "GCC4.6: Convert various empty macros to inline functions"Wolfgang Denk2011-10-04-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | This reverts commit 60ce53cf9f408d9ad721f8e7a87d6a564e6d5bac. The commit causes build breakage for a number of boards. This results from the fact that now the arguments of debug() actually get referenced (even if there is hope that the compiler will optimize away the debug() call). The obvious fix to that probem (change the code to always declare the referenced variables and data structures) increases the code size, and was this rejected. So it was decided to revert this commit until a better solution is found.
* | GCC4.6: Squash warning in cmd_ubi.c:Marek Vasut2011-10-01-2/+1
| | | | | | | | | | | | | | | | | | cmd_ubi.c: In function ‘ubi_volume_read’: cmd_ubi.c:319:9: warning: variable ‘count_save’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | GCC4,6: Squash warning in cmd_nand.cMarek Vasut2011-10-01-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | cmd_nand.c: In function ‘do_nand’: cmd_nand.c:490:7: warning: variable ‘chip’ set but not used [-Wunused-but-set-variable] cmd_nand.c:489:7: warning: variable ‘part’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Scott Wood <scottwood@freescale.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | GCC4.6: Squash warning in cmd_mem.cMarek Vasut2011-10-01-4/+4
| | | | | | | | | | | | | | | | | | | | | | cmd_mem.c: In function ‘do_mem_loop’: cmd_mem.c:474:25: warning: variable ‘junk’ set but not used [-Wunused-but-set-variable] The assigned variable can be removed because the pointers are volatile so accesses to their addresses are always generated. Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* | GCC4.6: Squash warnings in lcd.cMarek Vasut2011-10-01-4/+5
| | | | | | | | | | | | | | | | | | | | | | lcd.c: In function ‘lcd_drawchars’: lcd.c:214:9: warning: variable ‘off’ set but not used [-Wunused-but-set-variable] lcd.c: In function ‘lcd_display_bitmap’: lcd.c:617:16: warning: variable ‘compression’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* | GCC4.6: Squash warning in cmd_nvedit.cMarek Vasut2011-10-01-2/+1
| | | | | | | | | | | | | | | | cmd_nvedit.c: In function ‘do_env_edit’: cmd_nvedit.c:463:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* | GCC4.6: Squash warning in cmd_flash.cMarek Vasut2011-10-01-4/+6
| | | | | | | | | | | | | | | | cmd_flash.c: In function ‘do_protect’: cmd_flash.c:474:6: warning: variable ‘p’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* | GCC4.6: Convert various empty macros to inline functionsMarek Vasut2011-10-01-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following gcc4.6 problems: cmd_date.c: In function ‘do_date’: cmd_date.c:50:6: warning: variable ‘old_bus’ set but not used [-Wunused-but-set-variable] asix.c: In function ‘asix_init’: asix.c:317:6: warning: variable ‘rx_ctl’ set but not used [-Wunused-but-set-variable] usb.c: In function ‘usb_parse_config’: usb.c:331:17: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable] usb.c: In function ‘usb_hub_port_connect_change’: usb.c:1123:29: warning: variable ‘portchange’ set but not used [-Wunused-but-set-variable] usb.c: In function ‘usb_hub_configure’: usb.c:1183:25: warning: variable ‘hubsts’ set but not used [-Wunused-but-set-variable] usb_storage.c: In function ‘usb_stor_CB_reset’: usb_storage.c:466:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* | console: Squelch pre-console output in console functionsGraeme Russ2011-10-01-0/+18
| | | | | | | | | | | | | | | | | | | | There are some locations in the code which anticipate printf() being called before the console is ready by squelching printf() on gd->have_console. Move this squelching into printf(), vprintf(), puts() and putc(). Also make tstc() and getc() return 0 if console is not yet initialised Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Tested-by: Simon Glass <sjg@chromium.org>
* | IDE: Fix complaints about strict aliasing in cmd_ide.cMarek Vasut2011-10-01-26/+25
| | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | Small refactor to remove duplicate serial codeSimon Glass2011-10-01-44/+20
| | | | | | | | | | | | | | | | This tidies up duplicate code, and checks that default_serial_console() does in fact produce a device. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | cmd_sf: add "update" subcommand to do smart SPI flash updateSimon Glass2011-09-29-3/+83
|/ | | | | | | | | This adds a new SPI flash command which only rewrites blocks if the contents need to change. This can speed up SPI flash programming when much of the data is unchanged from what is already there. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* led: remove camel casing of led identifiers globallyJason Kridner2011-09-13-4/+4
| | | | | | | | | | | | | | | Result of running the following command to address Wolfgang's comment about camel case: for file in `find . | grep '\.[chS]$'`; do perl -i -pe 's/(green|yellow|red|blue)_LED_(on|off)/$1_led_$2/g' $file; done Discussion: http://patchwork.ozlabs.org/patch/84988/ Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* utx8245: fix build breakage due to assert()Wolfgang Denk2011-09-10-6/+0
| | | | | | | | | | | | | | | | | | Commit 21726a7 "Add assert() for debug assertions" broke building the utx8245 board: dlmalloc.c: In function 'do_check_chunk': dlmalloc.c:1660: error: 'sz' undeclared (first use in this function) dlmalloc.c:1660: error: (Each undeclared identifier is reported only once dlmalloc.c:1660: error: for each function it appears in.) dlmalloc.c: In function 'do_check_free_chunk': dlmalloc.c:1689: error: 'next' undeclared (first use in this function) dlmalloc.c: In function 'do_check_malloced_chunk': dlmalloc.c:1748: error: 'sz' undeclared (first use in this function) dlmalloc.c:1750: error: 'room' undeclared (first use in this function) Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org>
* Add assert() for debug assertionsSimon Glass2011-09-10-7/+0
| | | | | | | | | | | | | | | assert() is like BUG_ON() but compiles to nothing unless DEBUG is defined. This is useful when a condition is an error but a board reset is unlikely to fix it, so it is better to soldier on in hope. Assertion failures should be caught during development/test. It turns out that assert() is defined separately in a few places in U-Boot with various meanings. This patch cleans up some of these. Build errors exposed by this change (and defining DEBUG) are also fixed in this patch. Signed-off-by: Simon Glass <sjg@chromium.org>
* YAFFS2: cmd_yaffs2.c - fix build warningsWolfgang Denk2011-09-10-1/+1
| | | | | | | | | Fix these: cmd_yaffs2.c: In function 'do_ywr': cmd_yaffs2.c:69: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'ulong' cmd_yaffs2.c:69: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'ulong' Signed-off-by: Wolfgang Denk <wd@denx.de>
* common: fix behavior of ROUND macro when input is already roundedAnton Staaf2011-09-07-1/+1
| | | | | | | | | | | | | | | | | | | Currently when you call ROUND with a value that is already a multiple of the second parameter it will return a value that is one multiple larger, instead of returning the value passed in. There are only two types of usage of ROUND currently, one in various config files to round CONFIG_SYS_MALLOC_LEN to a multiple of 4096 bytes. The other in cmd_sf.c where the incorrect behavior of ROUND is worked around be subtracting one from the length argument before passing it to ROUND. This patch fixes ROUND and removes the workaround from cmd_sf. It also results in all of the malloc pools that use ROUND to compute their size shrinking by 4KB. Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Mike Frysinger <vapier@gentoo.org>
* ARM: remove broken "evb4510" board.Wolfgang Denk2011-09-07-11/+0
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Curt Brune <curt@cucy.com>
* Flush cache after the OS image is loaded into the memory.Diana CRACIUN2011-09-05-0/+3
| | | | | | | | | | | | | | | | Since we are loading an executable image into memory we need flush it out of the cache to possible maintain coherence on CPUs with split instruction and data caches. We do this for other executable image loading command. On PowerPC once we do this we no longer need to explicitly flush the dcache on multi-core systems in the BOOTM_STATE_OS_PREP phase. We now treat the BOOTM_STATE_OS_PREP as a no-op to maintain backwards compatibility with the bootm subcommand. Signed-off-by: James Yang <James.Yang@freescale.com> Signed-off-by: Diana CRACIUN <Diana.Craciun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* stdio: Fix a possible buffer overflowBradley Bolen2011-09-04-2/+2
| | | | Signed-off-by: Bradley Bolen <bradleybolen at yahoo.com>
* led: Remove state-saving of led for toggle functionality and add toggle ↵Joel A Fernandes2011-09-04-24/+40
| | | | | | | | | | | | | | | | | option to led command * Read the led output state from GPIO instead saving state in memory when it is [re]set * Added a toggle option to the led command Previous discussion: http://lists.denx.de/pipermail/u-boot/2011-May/093068.html Changes since v1: Fixed checkpatch errors Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* led: Fixed setting of STATUS_LED_BIT1 when led_name is 'all'Joel A Fernandes2011-09-04-1/+3
| | | | | | | | | | | | | | | Fix for only one led getting set or reset when the led_name is 'all' Previous discussion: http://lists.denx.de/pipermail/u-boot/2011-May/093068.html Changes since v1: Fixed checkpatch if statement error noticed by Sergei. Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Cc: Sergei Shtylyov <sshtylyov@mvista.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* led: correct off/on locations in structureJason Kridner2011-09-04-2/+2
| | | | | | | | | | | Although the initialization should probably be done with names, the existing implementation has these structures filled in the opposite order. Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* led: added cmd_led to MakefileJason Kridner2011-09-04-0/+1
| | | | | | | | | | Addition of cmd_led into the Makefile wasn't included in the patch applied to u-boot-ti. Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Corrected LED name match finding avoiding extraneous Usage printoutsJason Kridner2011-09-04-2/+3
| | | | | | | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* USB: Move USB_PRINTF() out of ifdef in usb_scan_devices()Marek Vasut2011-08-08-1/+1
| | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* USB: Set portnr so USB1.1 and 1.0 devices work on EHCI controllersMarek Vasut2011-08-08-0/+1
| | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* Convert ISO-8859 files to UTF-8Albert ARIBAUD2011-08-04-1/+1
| | | | | | | | There was a mix of UTF-8 and ISO-8859 files in the U-Boot source tree, which could cause issues with the patchwork review system. This commit converts all ISO-8859 files to UTF-8. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
* hwmon: do not init sensors on startupHeiko Schocher2011-08-04-2/+14
| | | | | | | | | | | | | | | | | The U-Boot Design Principles[1] clearly say: Initialize devices only when they are needed within U-Boot, i.e. don't initialize the Ethernet interface(s) unless U-Boot performs a download over Ethernet; don't initialize any IDE or USB devices unless U-Boot actually tries to load files from these, etc. (and don't forget to shut down these devices after using them - otherwise nasty things may happen when you try to boot your OS). So, do not initialize and read the sensors on startup. Signed-off-by: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de> cc: Holger Brunck <holger.brunck@keymile.com>
* mkimage: Add OMAP boot image supportJohn Rigby2011-08-03-1/+5
| | | | | | | | | | - Add mkimage support for OMAP boot image - Add support for OMAP boot image(MLO) generation in the new SPL framework Signed-off-by: John Rigby <john.rigby@linaro.org> Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk2011-08-02-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-blackfin: Blackfin: jtag-console: fix timer usage Blackfin: switch to common display_options() Blackfin: serial: move early debug strings into .rodata section Blackfin: adi boards: also set stderr to nc with helper Blackfin: update anomaly lists to latest public info Blackfin: serial: convert to bfin_{read,write} helpers Blackfin: split out async setup Blackfin: adi boards: enable pretty flash progress output Blackfin: drop unused dma.h header from start code Blackfin: portmux: allow header to be included in assembly files Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings Blackfin: sync MMR read/write helpers with Linux Blackfin: gpio: optimize free path a little Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR Blackfin: uart: fix printf warning Blackfin: add init.elf helper code Blackfin: dont reset SWRST on newer bf526 parts Blackfin: adi boards: enable multi serial support by default Blackfin: uart: add multiple serial support Blackfin: uart: move debug buffers into local bss
| * Blackfin: uart: add multiple serial supportMike Frysinger2011-07-12-0/+3
| | | | | | | | | | | | | | This brings CONFIG_SERIAL_MULTI support to the Blackfin on-chip UARTs. Ends up adding only ~512bytes per additional UART. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | fpga: constify to fix build warningWolfgang Denk2011-08-01-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compiler warning: cmd_fpga.c:318: warning: passing argument 3 of 'fit_image_get_data' from incompatible pointer type Adding the needed 'const' here entails a whole bunch of additonal changes all over the FPGA code. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andre Schwarz <andre.schwarz@matrix-vision.de> Cc: Murray Jensen <Murray.Jensen@csiro.au> Acked-by: Andre Schwarz<andre.schwarz@matrix-vision.de>
* | Constify getenv(), setenv() and hash code functionsWolfgang Denk2011-07-30-6/+7
| | | | | | | | | | | | | | | | | | | | | | This is needed to get rid of build warnings like main.c:311: warning: passing argument 2 of 'setenv' discards qualifiers from pointer target type which result from commit 09c2e90 "unify version_string". Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andreas Bießmann <andreas.devel@googlemail.com>
* | cleanup: Fix typos and misspellings in various files.Mike Williams2011-07-28-2/+2
| | | | | | | | | | | | | | | | | | | | | | Recieve/Receive recieve/receive Interupt/Interrupt interupt/interrupt Addres/Address addres/address Signed-off-by: Mike Williams <mike@mikebwilliams.com>
* | unify version_stringAndreas Bießmann2011-07-28-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes the architecture specific implementation of version_string where possible. Some architectures use a special place and therefore we provide U_BOOT_VERSION_STRING definition and a common weak symbol version_string. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> CC: Mike Frysinger <vapier@gentoo.org> CC: Peter Pan <pppeterpppan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | mkimage: add UBL header support for booting davinci cpusHeiko Schocher2011-07-28-0/+1
| | | | | | | | | | | | | | | | creating an u-boot.ubl file, which contains the UBL Header needed for booting from NAND with the RBL from TI. For more information read doc/README.ublimage. Signed-off-by: Heiko Schocher <hs@denx.de>
* | cmd_mac: fix help for 'mac read'Michael Jones2011-07-28-1/+1
| | | | | | | | | | | | | | | | | | | | | | In the only implementation of 'mac read', it doesn't display the contents of the eeprom as the help indicated unless compiled with DEBUG. It only re-reads the contents of the EEPROM into memory. Displaying the contents of the EEPROM is done by passing no arguments to 'mac'. Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Detlev Zundel <dzu@denx.de>
* | cmd_mac: cleanup helpMichael Jones2011-07-28-1/+1
| | | | | | | | | | Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Detlev Zundel <dzu@denx.de>
* | cosmetic: spell fixes etc.Michael Jones2011-07-28-3/+3
| | | | | | | | | | Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Detlev Zundel <dzu@denx.de>
* | add command fitupd to run an update from a FIT imageAndreas Pretzsch2011-07-26-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | automatic update from FIT image: add optional address parameterAndreas Pretzsch2011-07-26-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>
* | serial: implement common uart post testMike Frysinger2011-07-26-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | serial: drop serial_register return valueMike Frysinger2011-07-26-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>
* | serial: push default_serial_console to driversMike Frysinger2011-07-26-68/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | cmd_usage: constifyMike Frysinger2011-07-26-1/+1
| | | | | | | | | | | | The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | constify default envMike Frysinger2011-07-26-3/+3
| | | | | | | | | | | | | | 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>
* | env: allow people to force envcrc buildingMike Frysinger2011-07-26-1/+1
| | | | | | | | | | | | | | | | 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>
* | scaled down version of generic libraries for SPLAneesh V2011-07-26-3/+6
| | | | | | | | Signed-off-by: Aneesh V <aneesh@ti.com>