summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fs: Add a Coreboot Filesystem (CBFS) driver and commandsGabe Black2012-10-228-1/+788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds CBFS support and some commands to use it to u-boot. These commands are: cbfsinit - Initialize CBFS support and pull all metadata into RAM. The end of the ROM is an optional parameter which defaults to the standard 0xffffffff and can be used to support multiple CBFSes in a system. The last one set up with cbfsinit is the one that will be used. cbfsinfo - Print information from the CBFS header. cbfsls - Print out the size, type, and name of all the files in the current CBFS. Recognized types are translated into symbolic names. cbfsload - Load a file from CBFS into memory. Like the similar command for fat filesystems, you can optionally provide a maximum size. Support for CBFS is compiled in when the CONFIG_CMD_CBFS option is specified. The CBFS driver can also be used programmatically from within u-boot. If u-boot needs something out of CBFS very early before the heap is configured, it won't be able to use the normal CBFS support which caches some information in memory it allocates from the heap. The cbfs_file_find_uncached function searches a CBFS instance without touching the heap. Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* disk: Address cast and format errorsTaylor Hutt2012-10-221-3/+4
| | | | | | | | This change addresses a few printf-formatting errors, and a typecast error. Signed-off-by: Taylor Hutt <thutt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* disk: Make the disk partition code work with no specific partition typesGabe Black2012-10-221-33/+17
| | | | | | | | | | | | | | | Currently, if the disk partition code is compiled with all of the parition types compiled out, it hits an #error which stops the build. This change adjusts that file so that those functions will fall through to their defaults in those cases instead of breaking the build. These functions are needed because other code calls them, and that code is needed because other config options are overly broad and bring in support we don't need along with support we do. Also reduce repetition of the 6-term #ifdef throughout the file. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* ide: Add printf format string for CONFIG_SYS_64BIT_LBA optionGabe Black2012-10-221-0/+2
| | | | | | | | | The size of an LBA type changes depending on this option. We need to use a different printf() string in each case, so create a define for this. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* kerneldoc: tmpl: Implement template for LG-arraysMarek Vasut2012-10-222-1/+47
| | | | | | | | Implement kerneldoc template for linker-generated arrays. This is the first template in U-Boot that is used to generate kerneldoc style documentation. This template is very basic. Signed-off-by: Marek Vasut <marex@denx.de>
* common: Discard the __u_boot_cmd sectionMarek Vasut2012-10-22173-583/+1
| | | | | | | | | | | The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* common: Convert the U-Boot commands to LG-arraysMarek Vasut2012-10-2210-42/+50
| | | | | | | | | | | | | | | | | | This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* common: Add .u_boot_list into all linker filesMarek Vasut2012-10-22177-1/+853
| | | | | | | | | | Add section for the linker-generated lists into all possible linker files, so that everyone can easily use these lists. This is mostly a mechanical adjustment. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* common: Implement support for linker-generated arraysMarek Vasut2012-10-221-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for linker-generated array. These arrays are a generalization of the U-Boot command declaration approach. Basically, the idea is to generate an array, where elements of the array are statically initialized at compile time and each element is declared separatelly at different place. Such array is assembled together into continuous piece of memory by linker and a pointer to it's first entry can then be retrieved via accessor. The actual implementation relies on placing any variable that is to represent an element of LG-array into particular subsection of the .u_boot_list linker section . The subsection is determined by user options. Once compiled, it is possible to dump all symbols placed in .u_boot_list section and the subsections in which they should be and generate appropriate bounds for each requested subsection of the .u_boot_list section. Each such subsection thus contains __start and __end entries at the begining and end respecitively. This allows for simple run-time traversing of the array, since the symbols are properly defined. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* common: Add symbol handling for generic lists into MakefileMarek Vasut2012-10-2215-25/+152
| | | | | | | | | | | | | | | | | | | | | | | This patch adds essential components for generation of the contents of the linker section that is used by the linker-generated array. All of the contents is held in a separate file, u-boot.lst, which is generated at runtime just before U-Boot is linked. The purpose of this code is to especially generate the appropriate boundary symbols around each subsection in the section carrying the linker-generated arrays. Obviously, the interim linker code for actual placement of the variables into the section is generated too. The generated file, u-boot.lst, is included into u-boot.lds via the linker INCLUDE directive in u-boot.lds . Adjustments are made in the Makefile and spl/Makefile so that the u-boot.lds and u-boot-spl.lds depend on their respective .lst files. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Joe Hershberger <joe.hershberger@ni.com>
* powerpc/usb: fix bug of CPU hang when missing USB PHY clockShengzhou Liu2012-10-221-6/+16
| | | | | | | | | | | | | when missing USB PHY clock, u-boot will hang during USB initialization when issuing "usb start". We should check USBGP[PHY_CLK_VALID] bit to avoid CPU hanging in this case. Due to controller issue of PHY_CLK_VALID in ULPI mode, we set USB_EN before checking PHY_CLK_VALID, otherwise PHY_CLK_VALID doesn't work. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: fallback safely when a configuration descriptor is too largeVincent Palatin2012-10-221-3/+9
| | | | | | | | | | | | | | | When a USB configuration descriptor was larger than our USB buffer (512 bytes), we were skipping the full descriptor reading but then we were still parsing and using it, triggering memory corruptions. Now in that case, it just skips this device enumeration and displays the appropriate message to the user, so he can fix the buffer if he wants. This bug was triggered by some UVC webcams which have very large configuration descriptors (e.g. a couple of kB) describing all their supported video encodings. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* usb: Support the CONFIG_SYS_64BIT_LBA optionGabe Black2012-10-221-10/+14
| | | | | | | | | | | | | | | | usb_storage wouldn't compile when the CONFIG_SYS_64BIT_LBA option is turned on because the used fixed size data types in their exported functions when they should have used lbaint_t for the block count parameter. That meant that when the sizes happened to be the same, when using a 28 bit LBA, the driver would build, but when it wasn't, a 48 bit LBA, things broke. This change adjusts the signatures to use the right type and makes small adjustments in the affected functions. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2012-10-1936-1829/+362
|\ | | | | | | | | | | | | Conflicts: drivers/serial/serial_lh7a40x.c Signed-off-by: Tom Rini <trini@ti.com>
| * arm: fdt: Relocate fdt along with other dataSimon Glass2012-10-191-0/+22
| | | | | | | | | | | | | | | | | | | | | | Rather than leave the fdt down next to the code/data, we really should relocate it along with everything else. For CONFIG_OF_EMBED this happens automatically, but for CONFIG_OF_SEPARATE it does not. Add code to copy the fdt and point to the new copy after relocation. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * actux[123]: Update linker script for ELDK 4.2Tom Rini2012-10-183-3/+3
| | | | | | | | | | | | | | | | With ELDK4.2 libserial.o is too large to fit in the area before the environment. Swap in libinput instead which is a little smaller. Cc: Michael Schwingen <michael@schwingen.org> Signed-off-by: Tom Rini <trini@ti.com>
| * versatile: board configs: Use buffered writes on flash402jagan@gmail.com2012-10-182-0/+3
| | | | | | | | | | | | | | | | | | This patch provides a support to use buffered writes on flash for versatile and vexpress boards. This will certainly increase the flash writes. Signed-off-by: Jagannadha Sutradharudu Teki <402jagan@gmail.com>
| * dm: Move s3c24xx USB driver to a proper placeMarek Vasut2012-10-187-75/+48
| | | | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marex@denx.de> Cc: David Müller <d.mueller@elsoft.ch> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: U-Boot DM <u-boot-dm@lists.denx.de>
| * dm: wdt: arm: Move tnetv107x into drivers/watchdog/Marek Vasut2012-10-184-1/+3
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marex@denx.de> Cc: Oliver Brown <obrown@adventnetworks.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: U-Boot DM <u-boot-dm@lists.denx.de>
| * Remove lh7a40x cpu and serial driverAlbert ARIBAUD2012-10-1614-1792/+27
| | | | | | | | | | | | | | Since commit 957731ed (ARM: remove broken "lpd7a40x" boards), lh7a40x cpu and serial driver have become unused. Remove them. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
| * h2200: Add support for iPAQ h2200 palmtopŁukasz Dałek2012-10-166-0/+291
| | | | | | | | | | | | | | | | | | Add basic support for HP iPAQ h2200 palmtop. h2200 palmtop was targeted to general consumers. It has 64 MB of RAM, 32 MB flash. No intergrated Wi-Fi nor Ethernet. Based on Intel PXA255 processor. It was shipped with Windows CE 4.2 operating system. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* | patman: force git log commands to not use colorAlbert ARIBAUD2012-10-192-2/+3
| | | | | | | | | | | | | | | | | | | | Colored logs confuse patman when analyzing logs. Add --no-color option in git log commands in case the default config has color. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | sandbox: Change global data baudrate to intSimon Glass2012-10-191-1/+1
| | | | | | | | | | | | | | This doesn't need to be a long, so change it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | x86: Change global data baudrate to intSimon Glass2012-10-192-2/+2
| | | | | | | | | | | | | | This doesn't need to be a long, so change it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | nds32: Change global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | | | | | This doesn't need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | mips: Change global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | | | | | This doesn't need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | blackfin: Change global data baudrate to intSimon Glass2012-10-194-4/+4
| | | | | | | | | | | | | | | | | | This doesn't need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | arm: Change global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | | | | | This does not need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | sparc: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | powerpc: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | openrisc: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | nios2: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | microblaze: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | m68k: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | avr32: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Tom Rini <trini@ti.com>
* | sh: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-193-3/+3
| | | | | | | | | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | input: Add ANSI 3.64 escape sequence generation.Hung-Te Lin2012-10-192-15/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To support Non-ASCII keys (ex, Fn, PgUp/Dn, arrow keys, ...), we need to translate key code into escape sequence. (Updated by sjg@chromium.org to move away from a function to store keycodes, so we can easily record how many were sent. We now need to return this from input_send_keycodes() so we know whether keys were generated.) Signed-off-by: Hung-Te Lin <hungte@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | input: Fix i8042 keyboard resetMarc Jones2012-10-191-5/+27
| | | | | | | | | | | | | | | | | | | | | | The i8042 keyboard reset was not checking the results of the output buffer after the reset command. This can jam up some KBC/keyboards. Also, remove a write to the wrong register and the CONFIG setting around the incorrect write. Signed-off-by: Marc Jones <marc.jones@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | input: i8042: Provide feature to disable keyboard before booting kernelLouis Yung-Chieh Lo2012-10-192-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BIOS leaves the keyboard enabled during boot time so that any keystroke would interfere kernel driver initialization. Add a way to disable the keyboard to make sure no scancode will be generated during the boot time. Note that the keyboard will be re-enabled again after the kernel driver is up. This code can be called from the board functions. Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | input: Provide a board specific mechanism to decide whether to skip i8042 initGabe Black2012-10-191-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a board overridable function which can be used to decide whether or not to initialize the i8042 keyboard controller. On systems where it isn't actually connected to anything, this can save a significant amount of boot time. On Stumpy, this saves about 200ms on boot. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | input: Use finer grain udelays while waitng for the i8042 keyboard buffer to ↵Gabe Black2012-10-192-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | empty On x86, the i8042 keyboard controller driver frequently waits for the keyboard input buffer to be empty to make sure the controller has had a chance to process the data it was given. The way the delay loop was structured, if the controller hadn't cleared the corresponding status bit immediately, it would wait 1ms before checking again. If the keyboard responded quickly but not instantly, the driver would still wait a full 1ms when perhaps 1us would have been sufficient. Because udelay is a busy wait anyway, this change decreases the delay between checks to 1us. Also, this change gets rid of a hardcoded 250ms delay. On Stumpy, this saves 100-150ms during boot. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* | env: cosmetic: Consilidate the default env definitionJoe Hershberger2012-10-194-293/+141
| | | | | | | | | | | | | | There used to be a huge structure duplicated 3 times in the source. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@ti.com>
* | disk: initialize name/part fields when returning a whole diskStephen Warren2012-10-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When get_device_and_partition() finds a disk without a partition table, under some conditions, it "returns" a disk_partition_t that describes the entire raw disk. Make sure to initialize all fields in the partition descriptor in that case. The value chosen for name is just some arbitrary descriptive string. The value chosen for info matches the check at the end of get_device_and_partition(). However, it's probably not that important; it's not obvious that the value is really used. Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Tom Rini <trini@ti.com>
* | ColdFire: uart: fix build failure for missing header filesAlison Wang2012-10-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The following commit introduces some build failures for ColdFire platform. commit abaef69fbe683197607febeb2cc619490aca2a10 Author: Marek Vasut <marex@denx.de> Date: Thu Sep 13 16:51:38 2012 +0200 Add the missed header files. Sign-off-by: Alison Wang <b18965@freescale.com>
* | ColdFire: Fix the build error for Freescale m5282evb board.Jason Jin2012-10-191-0/+3
| | | | | | | | | | | | Clean up the lds file and fix the environment build error. Signed-off-by: Jason Jin <Jason.jin@freescale.com>
* | ColdFire: Fix build error for astro mcf53731 board.Jason Jin2012-10-191-53/+11
| | | | | | | | | | | | Fix the build error by clean up the lds file. Signed-off-by: Jason Jin <Jason.jin@freescale.com>
* | m68k: net: Fix unused variable in mcfmii.cMarek Vasut2012-10-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | The following warning was produced, fix it: mcfmii.c: In function 'mcffec_miiphy_write': mcfmii.c:318:8: warning: variable 'rdreg' set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marex@denx.de> Cc: "Jin Zhengxiong-R64188" <R64188@freescale.com> Cc: Jason Jin <jason.jin@freescale.com>
* | m68k: Fix unused variable in board.cMarek Vasut2012-10-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | The following warning was produced, fix it: board.c: In function 'board_init_r': board.c:390:8: warning: unused variable 's' [-Wunused-variable] Signed-off-by: Marek Vasut <marex@denx.de> Cc: "Jin Zhengxiong-R64188" <R64188@freescale.com> Cc: Jason Jin <jason.jin@freescale.com>
* | m68k: Fix unused variable warning in speed.cMarek Vasut2012-10-191-2/+7
| | | | | | | | | | | | | | | | | | | | | | The following warning was produced, fix it: speed.c: In function 'get_clocks': speed.c:94:15: warning: variable 'bPci' set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marex@denx.de> Cc: "Jin Zhengxiong-R64188" <R64188@freescale.com> Cc: Jason Jin <jason.jin@freescale.com>
* | m68k: Fix unused variable warningMarek Vasut2012-10-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | The fbcs variable was unused, producing the following warning: cpu_init.c: In function 'cpu_init_f': cpu_init.c:52:10: warning: unused variable 'fbcs' [-Wunused-variable] Signed-off-by: Marek Vasut <marex@denx.de> Cc: "Jin Zhengxiong-R64188" <R64188@freescale.com> Cc: Jason Jin <jason.jin@freescale.com>
OpenPOWER on IntegriCloud