summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* storage/usb.c: fix test_unit_readyMichael Grzeschik2011-12-071-2/+2
| | | | | | | | | | | | This is needed for the ohci-at91 to work. In u-boot this function was transmitting a cmdlen of 12, by the initial commit. There are similar functions like usb_request_sense, usb_read_capacity nearby which also transmit 12 byte per default on u-boot, which probably also need a fix. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: add the probe parameter if any error happened during the probeJean-Christophe PLAGNIOL-VILLARD2011-12-051-1/+1
| | | | | | | as example today if the timeout happened we can not probe the SD card again Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: make serial gadget resistant to cable unplugRobert Jarzmik2011-12-051-6/+18
| | | | | | | | | | | | | | As USB can have its cable plugged out anytime, make the serial gadget reliable in case of unplugging : - unregister the gadget_serial provided console - don't stay forever in the read loop if connection was cut This behaviour relies on correct implementation of usb_gadget_poll(), which should return an error if the USB cable was removed. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: add USB serial connect and disconnectRobert Jarzmik2011-12-051-1/+4
| | | | | | | | | | | | | The serial gadget can only work if the serial function is properly connected on USB trigger (ie. on SET_CONFIGURATION or SET_INTERFACE USB message triggering set_alt() in composite.c). Make this connection and handle also the disconnection in f_serial. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: use generic usb_gadget_poll() in u_serialRobert Jarzmik2011-12-051-3/+2
| | | | | | | | | Use the generic gadget polling function instead of the specific fsl function. This is a fix from a leftover in gadget development. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: add pxa27x_udc driverRobert Jarzmik2011-12-055-0/+1951
| | | | | | | | | Adapt mainline kernel pxa27x_udc driver to barebox : - remove function header comments as they are in mainline - test it with serial gadget Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: add console unregisteringRobert Jarzmik2011-12-053-6/+23
| | | | | | | | | | | Some console are transient, like the USB connected serial console which should be removed when the USB connection is severed. Enable console removal for such devices. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx: add mx53 SMD board supportJean-Christophe PLAGNIOL-VILLARD2011-12-0510-0/+414
| | | | | | | | | | | with: - uarts - sd and emmc - fec Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mx53 loco: update sd supportJean-Christophe PLAGNIOL-VILLARD2011-12-051-1/+35
| | | | | | | | update to use card detect add sd3 card support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-esdhc: add support of card detectJean-Christophe PLAGNIOL-VILLARD2011-12-058-11/+92
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mx53: fix devid for imx53_add_mmc1/2Jean-Christophe PLAGNIOL-VILLARD2011-12-051-2/+2
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/cramfs-fix' into nextSascha Hauer2011-12-053-61/+38
|\
| * fix cramfs support broken since zlib updateSascha Hauer2011-12-053-61/+38
| | | | | | | | | | | | | | cramfs does not compile since we updated zlib to the kernel version. Fix this by using the kernel version of uncompress.c Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu/resources' into nextSascha Hauer2011-12-0517-15/+299
|\ \
| * | implement resource management for platform devicesSascha Hauer2011-12-042-7/+28
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | register sdram as resourcesSascha Hauer2011-12-042-0/+63
| | | | | | | | | | | | | | | | | | | | | Also, request the sdram regions used by the barebox binary, bss, malloc space and stack. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | add iomem command to show iomem usageSascha Hauer2011-12-033-0/+64
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | add resource management functionsSascha Hauer2011-12-033-0/+136
| | | | | | | | | | | | | | | | | | | | | It is time to track our memory usage. Add a simple resource management. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fix malloc space sizesSascha Hauer2011-12-037-8/+8
| | | | | | | | | | | | | | | | | | end is start + size - 1, not start + size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'pu/imx53-sdhc' into nextSascha Hauer2011-12-052-2/+11
|\ \ \
| * | | mci imx-esdhc: do not overwrite probed host capsSascha Hauer2011-12-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The caps are read from the hardware but overwritten afterwards. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM i.MX53: Adjust MMC clock frequencies to 200MHzSascha Hauer2011-12-051-0/+9
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci imx esdhc: enable i.MX53 fix for i.MX51 aswellSascha Hauer2011-12-051-1/+2
| | |/ | |/| | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | ramfs: increase chunk size to 8192 bytesSascha Hauer2011-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | dlmalloc seems to work more efficient with this chunk size. Copying a bigger file (3MB) takes 271ms vs. 125ms on a i.MX27 board. Even bigger chunk sizes do not further improve performance. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | add armlinux specific magicvar descriptionsSascha Hauer2011-12-051-0/+5
|/ / | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / arm/mach-pxa: Initial Intel/Marvell PXA supportMarc Kleine-Budde2011-12-0528-0/+2382
|/ | | | | | | | | | | | The core support was brought by Marc and Sascha. The cache choice was fixed by Luotao Fu. Some gpio and devices addons were provided by Robert. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nand: base: Improve error reporting if reading NAND-ID failsWolfram Sang2011-11-291-3/+5
| | | | | | | | | - use KERN_ERR for messages when NAND-ID detection fails - report the IDs also if not found - print the errno if nand_scan failed Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: remove dead codeSascha Hauer2011-11-291-8/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use generic uncompress functionSascha Hauer2011-11-291-27/+4
| | | | | | | | | This simplifies the code somewhat. The user visible change here is that we now ignore the compression specified in the uImage. Instead we detect the compression type from the data which also means that we now support lzo compressed uImages. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove now unused unlzo functionSascha Hauer2011-11-292-27/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* update configs and default envs for uncompressSascha Hauer2011-11-2930-30/+30
| | | | | | | uncompress is the replacement for unlzo. Adjust environments and defconfigs accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add generic uncompress commandSascha Hauer2011-11-293-17/+18
| | | | | | | | Using the new uncompress function we can now implement a command which can uncompress all known compression types. This supplements the unlzo command. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add generic uncompress functionSascha Hauer2011-11-293-0/+179
| | | | | | | | uncompress() has the same prototype as the various kernel decompress functions. It automatically detects the compression type and selects the correct uncompress function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lzo: export decompress_unlzo functionSascha Hauer2011-11-292-2/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add file detection supportSascha Hauer2011-11-293-0/+123
| | | | | | | | | | | | | | | Several filetypes can be autodetected. Barebox could make use of this in several ways: - Add a command to detect filetypes - detect arm zImages and uImages to unify the different boot commands - maybe detect UBI or JFFS2 images to construct parts of the kernel command line - select correct uncompression function based on filetype This patch adds basic support to detect filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: do not select uncompression methodsSascha Hauer2011-11-292-14/+2
| | | | | | | Instead, let the user select them manually so that bootm supports all compression types compiled in. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: prompt for uncompression functionsSascha Hauer2011-11-292-2/+5
| | | | | | | | Allow the user to manually select the uncompression support he wants to have so that we have a single point where a user can see which uncompression support will be compiled in. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove old zlibSascha Hauer2011-11-293-2677/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add kernel gunzip implementationSascha Hauer2011-11-2919-7/+3036
| | | | | | | The kernel uncompression functions have a unified API so use this implementation to get it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove old bzlibSascha Hauer2011-11-296-3095/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* use kernel bunzip implementationSascha Hauer2011-11-294-12/+779
| | | | | | | | The kernel uncompression functions have a unified API. Switch to the kernel implementation to unify the different uncompression APIs. As a bonus the kernel implementation is much smaller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts/mkimage.c: remove unnecessary includeSascha Hauer2011-11-291-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm bootm: remove unnecessary includeSascha Hauer2011-11-291-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* armlinux: remove unnecessary includeSascha Hauer2011-11-291-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use initrd_address and initrd_sizeSascha Hauer2011-11-293-10/+12
| | | | | | Make these fields in struct image_data the reference for image handlers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: push relocate_image up to the generic commandSascha Hauer2011-11-295-16/+17
| | | | | | | | | All handlers used to just relocate the image without any checks, so we are doomed if we write outside of SDRAM or will overwrite ourselves. Move the relocation up to the generic part where we have a chance of catching these issues. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm relocate_image: honour load_addressSascha Hauer2011-11-291-7/+7
| | | | | | | | | the uImage should be relocated to load_address. This is handled correctly in gzip/bzip2 compressed images, but not in uncompressed images. fix this. Also, when a variable is not used once without casting to another type it probably means that its type is wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: fix typo, update help strSascha Hauer2011-11-291-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: do not require -L after -rSascha Hauer2011-11-292-8/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: fix various memory leaksSascha Hauer2011-11-292-8/+12
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>