summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* jffs2: add sector_size field to part_info structureIlya Yanok2008-12-09-3/+17
| | | | | | | This patch adds sector_size field to part_info structure (used by new JFFS2 code). Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* Merge branch 'master' of git://git.denx.de/u-boot-netWolfgang Denk2008-12-09-8/+12
|\
| * net: Fix download command parsingPeter Tyser2008-12-04-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_SYS_HUSH_PARSER is defined network download commands with 1 argument in the format 'tftp "/path/file"' do not work as expected. The hush command parser strips the quotes from "/path/file" which causes the network commands to interpret "/path/file" as an address instead of the intended filename. The previous check for a leading quote in netboot_common() was replaced with a check which ensures only valid numbers are treated as addresses. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* | jffs2: rename devices_init () in common/jffs2.cHeiko Schocher2008-12-08-7/+7
| | | | | | | | | | | | | | | | rename devices_init () in common/jffs2.c to jffs2_devices_init (), because there is also a devices_init () in common/devices.c. Signed-off-by: Heiko Schocher <hs@denx.de>
* | common/cmd_ide.c: Corrected endian order printing for compact flash serial ↵Richard Retanubun2008-12-07-3/+4
| | | | | | | | | | | | | | | | number. Corrected endian order printing for compact flash serial number. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
* | IOMUX: Add console multiplexing support.Gary Jennejohn2008-12-07-1/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modifications to support console multiplexing. This is controlled using CONFIG_SYS_CONSOLE_MUX in the board configuration file. This allows a user to specify multiple console devices in the environment with a command like this: setenv stdin serial,nc. As a result, the user can enter text on both the serial and netconsole interfaces. All devices - stdin, stdout and stderr - can be set in this manner. 1) common/iomux.c and include/iomux.h contain the environment setting implementation. 2) doc/README.iomux contains a somewhat more detailed description. 3) The implementation in (1) is called from common/cmd_nvedit.c to handle setenv and from common/console.c to handle initialization of input/output devices at boot time. 4) common/console.c also contains the code needed to poll multiple console devices for input and send output to all devices registered for output. 5) include/common.h includes iomux.h and common/Makefile generates iomux.o when CONFIG_SYS_CONSOLE_MUX is set. Signed-off-by: Gary Jennejohn <garyj@denx.de>
* | strings: use puts() rather than printf()Mike Frysinger2008-12-07-1/+2
| | | | | | | | | | | | | | | | When running `strings` on really long strings, the stack tends to get smashed due to printf(). Switch to puts() instead since we're only passing the data through. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | cmd_elf.c: Cleanup bootvx and handle new CONFIG_SYS_VXWORKS parametersNiklaus Giger2008-12-07-47/+30
| | | | | | | | | | | | | | | | | | | | | | | | - fix size too small by one in sprintf - changed old (pre 2004) device name ibmEmac to emac - boot device may be overriden in board config - servername may be defined in board config - additional parameters may be defined in board config - fixed some line wrappings - replaced redundant MAX define by max Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
* | lcd: Let the board code show board-specific info cleanupPeter Tyser2008-12-07-1/+0
| | | | | | | | | | | | | | remove unneeded version.h from lcd.c Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* | FPGA: move fpga drivers to drivers/fpgaJean-Christophe PLAGNIOL-VILLARD2008-12-05-3715/+0
|/ | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbWolfgang Denk2008-12-05-299/+337
|\
| * Remove obsolete command (apply afte USB style patch, 80 chars strict)Michael Trimarchi2008-11-28-9/+0
| | | | | | | | | | | | | | Remove USB obsolete commmand Signed-off-by: Michael Trimarchi <trimarchi@gandalf.sssup.it> Signed-off-by: Remy Böhmer <linux@bohmer.net>
| * USB style patch, 80 chars strictMichael Trimarchi2008-11-28-294/+341
| | | | | | | | | | | | | | USB Code style patch Signed-off-by: Michael Trimarchi <trimarchi@gandalf.sssup.it> Signed-off-by: Remy Böhmer <linux@bohmer.net>
* | OneNAND: Add missing mtd info struct before calling onenand_erase()Stefan Roese2008-12-02-0/+1
|/ | | | | | | | Without this patch "saveenv" crashes when MTD partitions are enabled (e.g. for use in UBI) via CONFIG_MTD_PARTITIONS. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
* UBI: Add proof-of-concept CFI flash supportPiotr Ziecik2008-11-24-1/+9
| | | | | | | With this patch UBI can be used on CFI flash chips. Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* UBI: Change parsing of size in commands to default to hexStefan Roese2008-11-24-32/+4
| | | | | | | | | Currently the size parameters of the UBI commands (e.g. "ubi write") are decoded as decimal instead of hex as default. This patch now interprets all these values consistantly as hex, as all other standard U-Boot commands do. Signed-off-by: Stefan Roese <sr@denx.de>
* UBI: Add UBI command supportKyungmin Park2008-11-19-0/+629
| | | | | | | | | | | | | | This patch adds these UBI commands: ubi part [nand|onenand] [part] - Show or set current partition ubi info [l[ayout]] -Display volume and UBI layout information ubi create[vol] volume [size] [type] - Create volume name with size ubi write[vol] address volume size - Write volume from address with size ubi read[vol] address volume [size] - Read volume to address with size ubi remove[vol] volume - Remove volume Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Stefan Roese <sr@denx.de>
* common/Makefile: create others group for non core, environment and command filesJean-Christophe PLAGNIOL-VILLARD2008-11-02-2/+5
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Consolidate MAX/MIN definitionsAndy Fleming2008-11-02-8/+0
| | | | | | | There were several, now there is one (two if you count the lower-case versions). Signed-off-by: Andy Fleming <afleming@freescale.com>
* Coding Style cleanup, update CHANGELOGWolfgang Denk2008-11-02-6/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* fdt_resize(): ensure minimum paddingPeter Korsgaard2008-10-30-2/+5
| | | | | | | | | fdt_add_mem_rsv() requires space for a struct fdt_reserve_entry (16 bytes), so make sure that fdt_resize at least adds that much padding, no matter what the location or size of the fdt is. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Andy Fleming <afleming@freescale.com>
* NAND: Align right column of the shorthelp with other commands.Scott Wood2008-10-29-1/+1
| | | | | | | I accidentally broke this in when making consistent the partial alignment of the longhelp. Signed-off-by: Scott Wood <scottwood@freescale.com>
* bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}Kumar Gala2008-10-29-0/+20
| | | | | | Added the ability to config out bootm support for Linux, NetBSD, RTEMS Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: Add subcommandsKumar Gala2008-10-29-1/+167
| | | | | | | | | | | | | | Add the ability to break the steps of the bootm command into several subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go. This allows us to do things like manipulate device trees before they are passed to a booting kernel or setup memory for a secondary core in multicore situations. Not all OS types support all subcommands (currently only start, loados, ramdisk, fdt, and go are supported). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: Move to using a function pointer table for the boot os functionKumar Gala2008-10-29-37/+31
| | | | | | | | This removes a bit of code and makes it easier for the upcoming sub bootm command support to call into the proper OS specific handler. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-videoWolfgang Denk2008-10-28-80/+20
|\
| * lcd: Let the board code show board-specific infoHaavard Skinnemoen2008-10-27-79/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The information displayed when CONFIG_LCD_INFO is set is inherently board-specific, so it should be done by the board code. The current code dealing with this only handles two cases, and is already a horrible mess of #ifdeffery. Yes, this duplicates some code, but it also allows boards to print more board-specific information; this used to be very difficult. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * lcd: Set lcd_is_enabled before clearing the screenHaavard Skinnemoen2008-10-25-1/+1
| | | | | | | | | | | | | | | | This allows the logo/info rendering routines to use the regular lcd_putc/lcd_puts/lcd_printf calls. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * lcd: Implement lcd_printf()Haavard Skinnemoen2008-10-25-0/+14
| | | | | | | | | | | | | | | | | | lcd_printf() has a prototype in include/lcd.h but no implementation. Fix this by borrowing the lcd_printf() implementation from the cogent board code (which appears to use its own LCD framework.) Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | fdt: Added helper to set PCI dma-ranges propertyKumar Gala2008-10-24-0/+69
| | | | | | | | | | | | | | | | | | | | | | Added fdt_pci_dma_ranges() that parses the pci_region info from the struct pci_controller and populates the dma-ranges based on it. The max # of windws/dma-ranges we support is 3 since on embedded PowerPC based systems this is the max number of windows. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
* | fdt: Add fdt_getprop_u32_default helpersKumar Gala2008-10-24-0/+27
|/ | | | | | | | | Add helper functions to return find a node and return it's property or a default value. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* Merge git://git.denx.de/u-boot into x1Markus Klotzbuecher2008-10-21-647/+1343
|\ | | | | | | | | | | Conflicts: drivers/usb/usb_ohci.c
| * Added arch_lmb_reserve to allow arch specific memory regions protectionKumar Gala2008-10-18-0/+7
| | | | | | | | | | | | | | | | | | Each architecture has different ways of determine what regions of memory might not be valid to get overwritten when we boot. This provides a hook to allow them to reserve any regions they care about. Currently only ppc, m68k and sparc need/use this. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-598/+598
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * Expose command table search for sub-commandsKumar Gala2008-10-18-4/+10
| | | | | | | | | | | | | | | | | | Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * hush: add showvar command for hush shell.Heiko Schocher2008-10-18-8/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new command shows the local variables defined in the hush shell: => help showvar showvar - print values of all hushshell variables showvar name ... - print value of hushshell variable 'name' Also make the set_local_var() and unset_local_var () no longer static, so it is possible to define local hush shell variables at boot time. If CONFIG_HUSH_INIT_VAR is defined, u-boot calls hush_init_var (), where boardspecific code can define local hush shell variables at boottime. Signed-off-by: Heiko Schocher <hs@denx.de>
| * I2C: adding new "i2c bus" Command to the I2C Subsystem.Heiko Schocher2008-10-18-0/+267
| | | | | | | | | | | | | | With this Command it is possible to add new I2C Busses, which are behind 1 .. n I2C Muxes. Details see README. Signed-off-by: Heiko Schocher <hs@denx.de>
| * I2C: add new command i2c reset.Heiko Schocher2008-10-18-0/+9
| | | | | | | | | | | | | | | | | | | | | | If I2C Bus is blocked (see doc/I2C_Edge_Conditions), it is not possible to get out of this, until the complete Hardware gets a reset. This new commando calls again i2c_init (and that calls i2c_init_board if defined), which will deblock the I2C Bus. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de>
| * CONFIG_EFI_PARTITION: Added support for EFI partition in cmd_ext2fs.crichardretanubun2008-10-18-2/+2
| | | | | | | | | | Added support for CONFIG_EFI_PARTITION to ext2 commands. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com>
| * FIT: output image load address for type 'firmware', fix message while thereBartlomiej Sieka2008-10-18-3/+9
| | | | | | | | | | | | | | Now that the auto-update feature uses the 'firmware' type for updates, it is useful to inspect the load address of such images. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
| * Automatic software update from TFTP serverBartlomiej Sieka2008-10-18-0/+323
| | | | | | | | | | | | | | | | | | | | | | The auto-update feature allows to automatically download software updates from a TFTP server and store them in Flash memory during boot. Updates are contained in a FIT file and protected with SHA-1 checksum. More detailed description can be found in doc/README.update. Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
| * flash: factor out adjusting of Flash address to the end of sectorBartlomiej Sieka2008-10-18-33/+42
| | | | | | | | | | | | | | | | | | | | The upcoming automatic update feature needs the ability to adjust an address within Flash to the end of its respective sector. Factor out this functionality to a new function flash_sect_roundb(). Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * Adds two more ethernet interface to 83xxrichardretanubun2008-10-18-0/+26
| | | | | | | | | | | | | | | | | | Added as a convenience for other platforms that uses MPC8360 (has 8 UCC). Six eth interface is chosen because the platform I am using combines UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * cmd_i2c: Fix help for CONFIG_I2C_CMD_TREE && !CONFIG_I2C_MULTI_BUSPeter Tyser2008-10-14-4/+4
| | | | | | | | | | | | | | | | | | | | Original code displayed: => help i2c i2c i2c speed [speed] - show or set I2C bus speed i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device ... Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
| * cmd_spi: remove broken signed casting for displayMike Frysinger2008-10-14-2/+1
| | | | | | | | | | | | | | | | Since we're working with unsigned data, you can't apply a signed pointer cast and then attempt to print the result. Otherwise you get wrong output when the sign bit is set like "0xFF" incorrectly extended to "0xFFFFFFFF". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * strings cmd: drop old CONFIG_CFG_STRINGS defineMike Frysinger2008-10-14-4/+0
| | | | | | | | | | | | | | We don't need CONFIG_CFG_STRINGS anymore now that we have the define CONFIG_CMD_STRINGS and Makefile control. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Fix lzma uncompress call (image_start wrongly used instead image_len)Luigi 'Comio' Mantellini2008-10-13-1/+1
| | | | | | | | Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
* | fix USB initialisation procedureRemy Bohmer2008-10-14-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes. At some places directly 8,16,32,64 was used instead of the encoded value. Made a enum for the options to make this more clear and to help preventing similar errors in the future. After fixing this bug it became clear that another bug existed where the 'pipe' is and-ed with PIPE_* flags, where it should have been 'usb_pipetype(pipe)', or even better usb_pipeint(pipe). Also removed the triple 'get_device_descriptor' sequence, it has no use, and Windows nor Linux behaves that way. There is also a poll going on with a timeout when usb_control_msg() fails. However, the poll is useless, because the flag will never be set on a error, because there is no code that runs in a parallel that can set this flag. Changed this to something more logical. Tested on AT91SAM9261ek and compared the flow on the USB bus to what Linux is doing. There is no difference anymore in the early initialisation sequence. Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* | USB layer of U-Boot causes USB protocol errors while using USB memory sticksRemy Bohmer2008-09-17-20/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several differences between Linux, Windows and U-boot for initialising the USB devices. While analysing the behaviour of U-boot it turned out that U-boot does things really different, and some are wrong (compared to the USB standard). This patch fixes some errors: * The NEW_init procedure that was already in the code is good, while the old procedure is wrong. See code comments for more info. * On a Control request the data returned by the device can be more than 8 bytes, while the host limits it to 8 bytes. This caused the host to generate a DataOverrun error. This results in a lot of USB sticks not being recognised, and the transmission ended frequently with a CTL:TIMEOUT Error. * Added a flag CONFIG_LEGACY_USB_INIT_SEQ to allow users to use the old init procedure. Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* | Refactoring parts of the common USB OHCI codeRemy Bohmer2008-09-17-236/+306
| | | | | | | | | | | | | | | | | | | | | | | | This patch refactors some large routines of the USB OHCI code by making some routines smaller and more readable which helps debugging and understanding the code. (Makes the code looks somewhat more like the Linux implementation.) Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant) Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Markus Klotzbuecher <mk@denx.de>