summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* usb: kbd: Add (optional) support for using an interrupt queue for pollingHans de Goede2014-11-04-0/+19
| | | | | | | | | | | | | | | Waiting an interrupt packet to complete in usb_kbd_poll_for_event, causes a 40 ms latency for each call to usb_kbd_testc, which is undesirable. Using control messages leads to lower (but still not 0) latency, but some devices do not work well with control messages (e.g. my kvm behaves funny with them). This commit adds support for using the int_queue mechanism which at least the ehci-hcd driver supports. This allows polling with 0 latency, while using interrupt packets. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: kbd: Cache pipe, interval and packetsizeHans de Goede2014-11-04-21/+13
| | | | | | Instead of looking them up every time we need them. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* stdio: Fix memleak on stdio_deregisterHans de Goede2014-11-04-0/+1
| | | | | | | stdio_register makes a malloc-ed copy of struct stdio_dev through stdio_clone, free the malloc-ed memory on stdio_deregister. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: kbd: Fix memleak on usb_kbd_deregister()Hans de Goede2014-11-04-3/+13
| | | | | | Free the keyboard hid-report buffer and private data on deregister. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: kbd: Remove unused usb_kbd_generic_poll functionHans de Goede2014-11-04-26/+0
| | | | | | This is not used anywhere, so lets remove it. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: Do not power-cycle usb devices on initHans de Goede2014-11-04-39/+0
| | | | | | | Do as the Linux kernel does and power on any ports which are not yet one, this is enough. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: Remove unnecessary portnr lookup from usb_new_deviceHans de Goede2014-11-04-17/+2
| | | | | | | | If the device has a parent, it is instantiated from usb_hub_port_connect_change and the portnr is right there in dev->portnr, so there is no need for this whole dance to look it up. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Merge git://git.denx.de/u-boot-x86Tom Rini2014-10-29-2/+5
|\
| * x86: image: Add new image type for x64_64Simon Glass2014-10-28-2/+5
| | | | | | | | | | | | | | This is a bit odd in that we are permitted to boot images for either, even though they are separate architectures. Signed-off-by: Simon Glass <sjg@chromium.org>
* | kconfig: arm: introduce symbol for ARM CPUsGeorges Savoundararadj2014-10-29-1/+0
|/ | | | | | | | | | | | | | | | | This commit introduces a Kconfig symbol for each ARM CPU: CPU_ARM720T, CPU_ARM920T, CPU_ARM926EJS, CPU_ARM946ES, CPU_ARM1136, CPU_ARM1176, CPU_V7, CPU_PXA, CPU_SA1100. Also, it adds the CPU feature Kconfig symbol HAS_VBAR which is selected for CPU_ARM1176 and CPU_V7. For each target, the corresponding CPU is selected and the definition of SYS_CPU in the corresponding Kconfig file is removed. Also, it removes redundant "string" type in some Kconfig files. Signed-off-by: Georges Savoundararadj <savoundg@gmail.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
* spl: move comment to the right placeAndreas Bießmann2014-10-27-1/+1
| | | | | | | Commit ae83d882f5fdf7aa7c5aec09cfafb593153c25d6 moved the fixed size mentioned in the comment but missed the comment. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* image: Fix Android boot image supportAhmad Draidi2014-10-27-18/+57
| | | | | | | | | | | | | | | This patch makes the following changes: - Set kernel entry point correctly - Append bootargs from image to global bootargs instead of replacing them - Return end address instead of size from android_image_get_end() - Give correct parameter to genimg_get_format() in boot_get_ramdisk() - Move ramdisk message printing from android_image_get_kernel() to android_image_get_ramdisk() Signed-off-by: Ahmad Draidi <ar2000jp@gmail.com> Cc: Tom Rini <trini@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd_mem: call unmap_sysmem() after map_sysmem()Masahiro Yamada2014-10-27-0/+3
| | | | | | | | Actually, unmap_sysmem() does nothing. Just in case. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* common: command: trivial coding style fixesMasahiro Yamada2014-10-27-30/+26
| | | | | | | | | | | | | - Do not insert a whitespace between a function name and an open paranthesis - Fix comment style - Do not split an error message into multiple lines even if it exceeds 80 columns - Do not split "for" statement where it fits in 80 columns - Do not use assignment in if condition Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* common/cmd_io.c: Fix incorrect help for iod/iowBin Meng2014-10-27-3/+3
| | | | | Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* aboot: fix block addressing for don't care chunk typeRob Herring2014-10-27-0/+1
| | | | | | | | | | | CHUNK_TYPE_DONT_CARE should skip over the specified number of blocks, but currently fails to increment the device block address. This results in filesystem images getting written incorrectly. Add the missing block address incrementing. Cc: Steve Rae <srae@broadcom.com> Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Steve Rae <srae@broadcom.com>
* spl: do not hang in spl_register_fat_device but return error value. It ↵Guillaume GARDET2014-10-27-1/+1
| | | | | | | | | | | allows to use both CONFIG_SPL_FAT_SUPPORT and CONFIG_SPL_EXT_SUPPORT. Do not hang in spl_register_fat_device but return an error value. It allows to use both CONFIG_SPL_FAT_SUPPORT and CONFIG_SPL_EXT_SUPPORT. If FAT load fails, then EXT load is tried. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* spl: Add EXT support to SPLGuillaume GARDET2014-10-27-2/+156
| | | | | | | | Add EXT filesystem support to SPL. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> [trini: Fix a warning and checkpatch problems] Signed-off-by: Tom Rini <trini@ti.com>
* Rename some defines containing FAT in their name to be filesystem genericGuillaume GARDET2014-10-27-9/+9
| | | | | | | | | | | Rename some defines containing FAT in their name to be filesystem generic: MMCSD_MODE_FAT => MMCSD_MODE_FS CONFIG_SPL_FAT_LOAD_ARGS_NAME => CONFIG_SPL_FS_LOAD_ARGS_NAME CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME => CONFIG_SPL_FS_LOAD_PAYLOAD_NAME CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION => CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* usb: Use correct printf() format string for uintptr_tSimon Glass2014-10-27-5/+6
| | | | | | Use the inttypes header file to provide this. Signed-off-by: Simon Glass <sjg@chromium.org>
* scsi: Use correct printf() format string for uintptr_tSimon Glass2014-10-27-4/+5
| | | | | | Use the inttypes header file to provide this. Signed-off-by: Simon Glass <sjg@chromium.org>
* Revert "common, env: Fix support for environment in i2c eeprom"Valentin Longchamp2014-10-27-7/+2
| | | | | | | | | | | | | | | | Since i2c_init_all always sets the bus back to CONFIG_SYS_SPD_BUS_NUM for compatibility reasons, it means that any eeprom not located on this CONFIG_SYS_SPD_BUS_NUM is not accessible with the eeprom commands, even if you change the bus number with an i2c dev command before. Furthermore i2c_init_all should disappear and is currently only called from the early board initialisation sequences, it is not suited for other usage. This reverts commit 01a0c64762e902971b34587a8a61b59e9ea51374. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
* cli: hush: Adjust 'run' command to run each line of the env varSimon Glass2014-10-27-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-tiTom Rini2014-10-27-0/+1
|\
| * common: Makefile: allow for spl builds with env_fatFelipe Balbi2014-10-23-0/+1
| | | | | | | | | | | | | | If CONFIG_SPL_BUILD and CONFIG_ENV_IS_IN_FAT are defined, u-boot spl will fail to build. Fix that. Signed-off-by: Felipe Balbi <balbi@ti.com>
* | Merge git://git.denx.de/u-boot-dmTom Rini2014-10-26-36/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix a trivial conflict over adding <dm.h> Conflicts: arch/arm/cpu/armv7/omap3/board.c Signed-off-by: Tom Rini <trini@ti.com>
| * | dm: Move the function for getting GPIO status into the uclassSimon Glass2014-10-23-36/+21
| |/ | | | | | | | | | | This function can be more easily tested if it is in the uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
* | gpio: add protype for name_to_gpioJeroen Hofstee2014-10-25-1/+1
| | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | common/cmd_elf.c: add missing includeJeroen Hofstee2014-10-25-0/+1
| | | | | | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> [trini: bootm.h must come after common.h] Signed-off-by: Tom Rini <trini@ti.com>
* | common:console: add missing includeJeroen Hofstee2014-10-25-1/+2
| | | | | | | | | | | | | | search_device is declared in iomux, but console only had the definition. This prevents a warning. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | modem.c: Switch to debug() from dbg found in common/console.cTom Rini2014-10-25-7/+6
| | | | | | | | Signed-off-by: Tom Rini <trini@ti.com>
* | serial: make local functions staticJeroen Hofstee2014-10-25-7/+7
| | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | image-fit: make local function staticJeroen Hofstee2014-10-25-1/+1
| | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | env_nand: make local functions staticJeroen Hofstee2014-10-25-2/+2
| | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | common: board_r: make local functions staticJeroen Hofstee2014-10-25-4/+4
| | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | common: cmd_elf: make do_bootelf_exec staticJeroen Hofstee2014-10-25-2/+1
| | | | | | | | | | | | | | do_bootelf_exec was a weak function without a prototype nor and strong version. Just make it static. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | misc: use __weakJeroen Hofstee2014-10-25-4/+1
| | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | common: board: use __weakJeroen Hofstee2014-10-24-16/+4
|/ | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* Merge git://git.denx.de/u-boot-dmTom Rini2014-10-22-10/+92
|\
| * dm: cros_ec: Add support for driver modelSimon Glass2014-10-22-0/+30
| | | | | | | | | | | | | | | | Add support for driver model if enabled. This involves minimal changes to the code, mostly just plumbing around the edges. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
| * dm: Convert spi_flash_probe() and 'sf probe' to use driver modelSimon Glass2014-10-22-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want the SPI flash probing feature to operate as a standard driver. Add a driver for the basic probing feature used by most boards. This will be activated by device_probe() as with any other driver. The 'sf probe' command currently keeps track of the SPI slave that it last used. This doesn't work with driver model, since some other driver or system may have probed the device and have access to it too. On the other hand, if we try to probe a device twice the second probe is a nop with driver model. Fix this by searching for the matching device, removing it, and then probing it again. This should work as expected regardless of other device activity. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
| * sf: Tidy up public and private header filesSimon Glass2014-10-22-0/+1
| | | | | | | | | | | | | | | | Since spi_flash.h is supposed to be the public API for SPI flash, move private things to sf_internal.h. Also tidy up a few comment nits. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
| * dm: spi: Adjust cmd_spi to work with driver modelSimon Glass2014-10-22-8/+31
| | | | | | | | | | | | | | | | | | | | | | Driver model uses a different way to find the SPI bus and slave from the numbered devices given on the command line. Adjust the code to suit. We use a generic SPI device, and attach it to the SPI bus before performing the transaction. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
| * dm: Add spi.h header to a few filesSimon Glass2014-10-22-0/+1
| | | | | | | | | | | | | | | | Some files are using SPI functions but not explitly including the SPI header file. Fix this, since driver model needs it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
| * dm: Remove spi_init() from board_r.c when using driver modelSimon Glass2014-10-22-1/+1
| | | | | | | | | | | | | | | | | | | | | | Driver model does its own init, so we don't need this. There is still a call in board_f.c but it is only enabled by CONFIG_HARD_SPI. It is easy enough to disable that option when converting boards which use it to driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
| * dm: spi: Add a uclass for SPISimon Glass2014-10-22-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a uclass which provides access to SPI buses and includes operations required by SPI. For a time driver model will need to co-exist with the legacy SPI interface so some parts of the header file are changed depending on which is in use. The exports are adjusted also since some functions are not available with driver model. Boards must define CONFIG_DM_SPI to use driver model for SPI. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> (Discussed some follow-up comments which will address in future add-ons)
* | x86: Support loading kernel setup from a FITSimon Glass2014-10-22-2/+55
| | | | | | | | | | | | | | | | Add a new setup@ section to the FIT which can be used to provide a setup binary for booting Linux on x86. This makes it possible to boot x86 from a FIT. Signed-off-by: Simon Glass <sjg@chromium.org>
* | sandbox: bootm: Don't fail the architecture checkSimon Glass2014-10-22-1/+1
|/ | | | | | | | Since sandbox is used for testing, it should be able to 'boot' an image from any archhitecture. This allows us to test an image by loading it in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2014-10-20-0/+111
|\
| * crypto/fsl: Add command for encapsulating/decapsulating blobsRuchika Gupta2014-10-16-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freescale's SEC block has built-in Blob Protocol which provides a method for protecting user-defined data across system power cycles. SEC block protects data in a data structure called a Blob, which provides both confidentiality and integrity protection. Encapsulating data as a blob Each time that the Blob Protocol is used to protect data, a different randomly generated key is used to encrypt the data. This random key is itself encrypted using a key which is derived from SoC's non volatile secret key and a 16 bit Key identifier. The resulting encrypted key along with encrypted data is called a blob. The non volatile secure key is available for use only during secure boot. During decapsulation, the reverse process is performed to get back the original data. Commands added -------------- blob enc - encapsulating data as a cryptgraphic blob blob dec - decapsulating cryptgraphic blob to get the data Commands Syntax --------------- blob enc src dst len km Encapsulate and create blob of data $len bytes long at address $src and store the result at address $dst. $km is the 16 byte key modifier is also required for generation/use as key for cryptographic operation. Key modifier should be 16 byte long. blob dec src dst len km Decapsulate the blob of data at address $src and store result of $len byte at addr $dst. $km is the 16 byte key modifier is also required for generation/use as key for cryptographic operation. Key modifier should be 16 byte long. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>