aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2010-05-06x86: Use CONFIG_SERIAL_MULTIGraeme Russ
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-05cmd_onenand.c: moved to standard subcommand handlingFrans Meulenbroeks
On the fly also fixed the following things: - write help talked about a parameter oob, but that one was not used, so removed it from the help message. - the test command also allowed a force subcommand but didn't use it. eliminated the code. - do_onenand made static - do_onenand contained int blocksize; ... mtd = &onenand_mtd; this = mtd->priv; blocksize = (1 << this->erase_shift); As blocksize was not used the last two statements were unneeded so removed them. The first statement (mtd = ....) assigns to a global. Not sure if it is needed, and since I could not test this, left the line for now Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-05-04Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk
2010-04-30SAMSUNG: serial: modify name from s5pc1xx to s5pMinkyu Kang
Because of other s5p series SoC will use these serial functions, modify function's name and structure's name. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-04-28mtdparts: get rid of custom DEBUG macro, use debug()Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-04-28mtdparts: fix write through NULL pointerWolfgang Denk
The "mtdparts add" command wrote through a NULL pointer - on many systems this went unnoticed (PowerPC has writable RAM there, some ARM systems have ROM where a write has no effect), but on arm1136 (i.MX31) it crashed the system. Add appropriate checks. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-04-24mpc512x: add multi serial PSC supportAnatolij Gustschin
Extend mpc512x serial driver to support multiple PSC ports. Subsequent patches for PDM360NG board support make use of this functionality by defining CONFIG_SERIAL_MULTI in the board config file. Additionally the used PSC devices are specified by defining e.g. CONFIG_SYS_PSC1, CONFIG_SYS_PSC4 and CONFIG_SYS_PSC6. Support for PSC devices other than 1, 3, 4 and 6 is not added by this patch because these aren't used currently. In the future it can be easily added using DECLARE_PSC_SERIAL_FUNCTIONS(N) and INIT_PSC_SERIAL_STRUCTURE(N) macros in cpu/mpc512x/serial.c. Additionally you have to add code for registering added devices in serial_initialize() in common/serial.c. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-04-21Move arch/ppc to arch/powerpcStefan Roese
As discussed on the list, move "arch/ppc" to "arch/powerpc" to better match the Linux directory structure. Please note that this patch also changes the "ppc" target in MAKEALL to "powerpc" to match this new infrastructure. But "ppc" is kept as an alias for now, to not break compatibility with scripts using this name. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Anatolij Gustschin <agust@denx.de>
2010-04-10FIX: watchdog timeout, while waiting for inputJens Scharsig
* add WATCHDOG_RESET to !tstc() loops * prevents watchdog timeout, while waiting for input, if CONFIG_BOOT_RETRY_TIME or CONFIG_SHOW_ACTIVITY defined Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
2010-04-10malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failurekarl.beldan@gmail.com
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
2010-04-09cmd_bmp.c: add standard subcommand handlingFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de>
2010-04-09Merge branch 'master' of git://git.denx.de/u-boot-ubiWolfgang Denk
2010-04-09cmd_ubi: Fix uninitialized variable warningPeter Tyser
gcc 3.4.6 previously reported the following error on many MIPS boards which utilize UBI: cmd_ubi.c:193: warning: 'vol' might be used uninitialized in this function The current code is structured such that 'vol' will never be used when it is NULL anyway, but gcc isn't smart enough to figure this out. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Stefan Roese <sr@denx.de>
2010-04-08USB storage probeKim B. Heino
While debugging one ill behaving USB device I found two bugs in USB storage probe. usb_stor_get_info() returns -1 (error), 0 (skip) or 1 (ok). First part of this patch fixes error case. Second part fixes usb_inquiry()'s retry counter handling. Original code had retry = -1 on error case, not retry = 0 as checked in the next line. Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
2010-04-08USB storage countKim B. Heino
Here's another USB storage patch. Currently U-Boot handles storage devices #0 - #4 as valid devices, even if there is none connected. This patch fixes usb_stor_get_dev() to check detected device count instead of MAX-define. This is very important for ill behaving devices. usb_dev_desc[] can be partially initialized if device probe fails. After fixing get_dev() it was easy to fix "usb part" etc commands. Previously it outputed "Unknown partition table" five times, now it's "no USB devices available". Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
2010-04-07fdt: Add fdt_del_node_and_alias helperKumar Gala
Add a helper function that given an alias will delete both the node the alias points to and the alias itself Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2010-04-01Merge branch 'next'Wolfgang Denk
2010-03-29bootm, linux: fix booting Multi-File Image with "kernel+ramdisk+fdt"Heiko Schocher
Booting a "Multi-File Image" including a linux kernel, ramdisk and fdt, generated with mkimage -A ppc \ -O linux \ -T multi \ -C gzip \ -a 00000000 \ -e 00000000 \ -n "kernel-2.6+initrd+dtb" \ -d "vmlinux.bin.gz:ramdisk_image.gz:board.dtb" \ multi.bin actually fails, because ramdisk start and end addresses didn;t get initialized. This patch fixes this issue. Tested on the KUP4K board. Signed-off-by: Heiko Schocher <hs@denx.de>
2010-03-29i2c: made unused function i2c_mux_add_device staticFrans Meulenbroeks
and removed it from the .h file Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29cmd_i2c: introduced get_alen helper functionFrans Meulenbroeks
The code to parse alen appeared 6 times in the function. Factored this out in a small helper function Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29cmd_i2c: moved a define to before the functionsFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29cmd_i2c: moved mispositioned comment for i2c mdFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29cmd_i2c.c: declared local functions as staticFrans Meulenbroeks
Declared all functions that were not called outside the file as static Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29Merge remote branch 'origin/master' into nextWolfgang Denk
2010-03-28cmd_usb.c: print debug messages only when DEBUG is definedWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-28Merge branch 'next' of git://git.denx.de/u-boot-coldfire into nextWolfgang Denk
2010-03-24fix cmd_bdinfo.c:354: warning: 'print_eth' defined but not usedPhilippe De Muyter
This fixes the following warnings when running MAKEALL for coldfire : cmd_bdinfo.c:354: warning: 'print_eth' defined but not used Signed-off-by: Philippe De Muyter <phdm at macqel.be>
2010-03-24lcd: make 16bpp workAlessandro Rubini
Support for 16bpp was supposed to be in the code but was not working. This makes it work and has been tested in the nhk8815 board. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-03-23cmd_nand: show nand scrub confirmation characterFlorian Fainelli
When issuing a nand scrub command, the entered character is not displayed this may be confusing. This patch makes the input character being displayed if it is a 'y' so that an user knows he is about to scrub his nand. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2010-03-21Merge remote branch 'origin/master' into nextWolfgang Denk
2010-03-21fdt_support: add partitions fixup in mtd nodeAnatolij Gustschin
Allow overwriting defined partitions in the device tree blob using partition info defined in the 'mtdparts' environment variable. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Gerald Van Baren <vanbaren@cideas.com>
2010-03-21cmd history: Match history buffer size to console bufferJohn Schmoller
Match history buffer size to console buffer size. History buffer size was hard coded to 256, artificially limiting the command buffer size. The history buffer now tracks CONFIG_SYS_CBSIZE. Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
2010-03-21console: Fix console buffer overrunJohn Schmoller
When CONFIG_SYS_CBSIZE equals MAX_CMDBUF_SIZE, a command string of maximum length will overwrite part of the history buffer, causing the board to die. Expand the console_buffer and hist_lines buffer by one character each to hold the missing NULL char. Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
2010-03-21cmd_setexpr: allow memory addresses in expressionsFrans Meulenbroeks
This patch add functionality to use memory addresses in expressions. This increases the power of expressions substantially It adheres to the standard convemtions: memory addresses can be given in the format *address (e.g. *1000) Rationale for this change is that it allows masking off bits from a byte that is obtained by reading data from e.g. i2c. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Fix warning: control reaches end of non-void function Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-21cmd_i2c.c: added i2c read to memory functionFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21cmd_i2c.c: sorted commands alphabeticallyFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21cmd_i2c.c: reworked subcommand handlingFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21cmd_bootm.c: made subcommand array staticFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21cmd_i2c.c: reduced subaddress length to 3 bytesFrans Meulenbroeks
according to some of the comments the subaddress length is 1 or 2, but we are being prepared for the case it becomes 3. However the code also accepted 4. This repairs this by changing the constand 4 to 3. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21console.c: fix problem with splashimageAnatolij Gustschin
If a board uses cfb_console driver and splash image and also defines CONFIG_SILENT_CONSOLE, the user is locked out even if "silent" is not set. It is not possible to get any output, neither on vga console device nor on serial console after redirecting the output to the serial console, since the GD_FLG_SILENT flag remains set. Fix the problem by redirecting the output from frame buffer to serial console if splashimage is used. Only suppress the output if "silent" environment variable was set and don't set the GD_FLG_SILENT flag arbitrarily. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-03-21cmd_mmc remove \nFrans Meulenbroeks
This patch removes the \n after the help message for mmcinfo. This resulted in an empty line being displayed after the mmcinfo line when the help command was given. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-12Prepare v2010.03-rc1v2010.03-rc1Wolfgang Denk
Coding style cleanup, update CHANGELOG. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-12Cosmetic change - indentation correction.Michael Zaidman
Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
2010-03-12cmd_mtdparts.c: prevent printbuffer overflowsAnatolij Gustschin
The length of configured MTDPARTS_DEFAULT string could be greater than console printbuffer size. Replace printf() by puts() to avoid potential buffer overflows. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-03-11Move CONFIG_UPDATE_TFTP code after CONFIG_PREBOOTWolfgang Denk
The auto-update feature (CONFIG_UPDATE_TFTP) requires that the env variable serverip be set for the TFTP access. If DHCP is to be used to get the serverip env variable, this doesn't work as DHCP happens after the auto-update attempt has run. A solution is to run DHCP in PREBOOT, but even this is too late. To solve this, we move update_tftp() below the PREBOOT stuff. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-11PPC: Record U-Boot's relocated address in RAM and show in bdinfo.Richard Retanubun
This patch uses gd->relocaddr variable to store uboot's relocated address in RAM and shows it in bdinfo command. This patch moves CONFIG_AMIGAONEG3SE style copying of the address in board_init_f to just before relocation is actually done. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Tested-by: Detlev Zundel <dzu@denx.de>
2010-02-24cmd_itest.c: fix pointer dereferencingFrans Meulenbroeks
fix pointer dereferencing if the size is .b and .w an 8 or 16 bit access is done. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de>
2010-02-06net: Use 0.5 sec timeout in miiphy_reset() instead of counting loopStefan Roese
This patch fixes a problem I've notived on a buggy PPC4xx system. This system has problems with the PHY MDIO communication and seemed to be stuck/crashed in miiphy_reset(). But degugging revealed, that the CPU didn't crash, but "only" hung in this counting loop for about 2 minutes. This patch now uses a real timeout of 0.5 seconds (as mentioned in the comment in miiphy_reset). Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-02-03USB: usb_control_msg wait for driver ISR to set status.Remy Bohmer
This patch changes usb_control_msg back to the state prior to commit 48867208444cb2a82e2af9c3249e90b7ed4a1751. The USB driver ISR routine may update the status. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-02-03Merge branch 'master' of git://git.denx.de/u-boot-nand-flashWolfgang Denk