summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | mkimage: Add a quiet modeSimon Glass2016-05-233-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some build systems want to be quiet unless there is a problem. At present mkimage displays quite a bit of information when generating a FIT file. Add a '-q' flag to silence this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | image-fit: Don't display an error in fit_set_timestamp()Simon Glass2016-05-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function returns an error code and its caller may be able to fix the error. For example fit_handle_file() expands the device tree to fit if there is a lack of space. In this case the caller does not want an error displayed. It is confusing, since it suggests that something is wrong, when it fact everything is fine. Drop the error. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | malloc: improve memalign fragmentation fixStephen Warren2016-05-231-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4f144a416469 "malloc: work around some memalign fragmentation issues" enhanced memalign() so that it can succeed in more cases where heap fragmentation is present. However, it did not solve as many cases as it could. This patch enhances the code to cover more cases. The alignment code works by allocating more space than the user requests, then adjusting the returned pointer to achieve alignment. In general, one must allocate "alignment" bytes more than the user requested in order to guarantee that alignment is possible. This is what the original code does. The previous enhancement attempted a second allocation if the padded allocation failed, and succeeded if that allocation just happened to be aligned; a fluke that happened often in practice. There are still cases where this could fail, yet where it is still possible to honor the user's allocation request. In particular, if the heap contains a free region that is large enough for the user's request, and for leading padding to ensure alignment, but has no or little space for any trailing padding. In this case, we can make a third(!) allocation attempt after calculating exactly the size of the leading padding required to achieve alignment, which is the minimal over-allocation needed for the overall memalign() operation to succeed if the third and second allocations end up at the same location. This patch isn't checkpatch-clean, since it conforms to the existing coding style in dlmalloc.c, which is different to the rest of U-Boot. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | pico-imx6ul: Select CONFIG_HUSH_PARSER optionFabio Estevam2016-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select CONFIG_HUSH_PARSER option in order to fix the following problem: Unknown command 'if' - try 'help' Unknown command 'then' - try 'help' Unknown command 'else' - try 'help' Unknown command 'fi' - try 'help' Reported-by: Daiane Angolini <daiane.angolini@nxp.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Daiane Angolini <daiane.angolini@nxp.com>
| * | eeprom: merge cmdline parsing of eeprom commandsNikita Kiryanov2016-05-201-64/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the parsing of layout aware and layout unaware eeprom commands into one parsing function. With this change, layout aware commands now follow the eeprom read and eeprom write conventions of making i2c bus and i2c address parameters optional. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | eeprom: use eeprom_execute_command for all eeprom functionsNikita Kiryanov2016-05-201-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update eeprom_execute_command() and related code to accommodate both layout aware and layout unaware functions. No functional changes. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> [trini: Make eeprom_execute_command have ulong for i2c_addr] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | eeprom: refactor i2c bus and devaddr parsingNikita Kiryanov2016-05-201-26/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce parse_i2c_bus_addr() to generalize the parsing of i2c bus number and i2c device address. This is done in preparation for merging layout aware and layout unaware command parsing into one function. No functional changes. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | arm: cm-t43: add support for eeprom layout comandsNikita Kiryanov2016-05-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add support for EEPROM and EEPROM layout commands for CM-T43. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | arm: cm-t35: add support for eeprom layout comandsNikita Kiryanov2016-05-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add support for EEPROM and EEPROM layout commands for CM-T35. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | arm: cm-t3517: add support for eeprom layout comandsNikita Kiryanov2016-05-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add support for EEPROM and EEPROM layout commands for CM-T3517. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | arm: cm-t54: add support for eeprom layout comandsNikita Kiryanov2016-05-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add support for EEPROM and EEPROM layout commands for CM-T54. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | arm: cm-t335: add support for eeprom layout comandsNikita Kiryanov2016-05-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add support for EEPROM and EEPROM layout commands for CM-T335. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | arm: cm-fx6: add support for eeprom layout comandsNikita Kiryanov2016-05-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add support for EEPROM and EEPROM layout commands for CM-FX6. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | compulab: add support for layout aware eeprom commandsNikita Kiryanov2016-05-201-0/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add layout definitions and implement functions for field printing/updating, layout detection, layout assignment, and layout parsing. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | cmd: eeprom: add support for layout aware commandsNikita Kiryanov2016-05-207-1/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the (optional) eeprom print and eeprom update commands. These commands are eeprom layout aware: * The eeprom print command prints the contents of the eeprom in a human readable way (eeprom layout fields, and data formatted to be fit for human consumption). * The eeprom update command allows user to update eeprom fields by specifying the field name, and providing the new data in a human readable format (same format as displayed by the eeprom print command). * Both commands can either auto detect the layout, or be told which layout to use. New CONFIG options: CONFIG_CMD_EEPROM_LAYOUT - enables commands. CONFIG_EEPROM_LAYOUT_HELP_STRING - tells user what layout names are supported Feature API: __weak int parse_layout_version(char *str) - override to provide your own layout name parsing __weak void __eeprom_layout_assign(struct eeprom_layout *layout, int layout_version); - override to setup the layout metadata based on the version __weak int eeprom_layout_detect(unsigned char *data) - override to provide your own algorithm for detecting layout version eeprom_field.c - contains various printing and updating functions for common types of eeprom fields. Can be used for defining custom layouts. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | cmd: eeprom: add bus switching support for all i2c driversNikita Kiryanov2016-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c_init function is always provided when CONFIG_SYS_I2C is defined. No need to limit ourselves to just one supported I2C driver (soft_i2c). Update the #ifdef conditions to support bus switching for all I2C drivers. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
| * | arm: mvebu: theadorable: Enable CONFIG_ZERO_BOOTDELAY_CHECKStefan Roese2016-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | Enable bootdelay 0 check so that booting can be interrupted even with bootdelay configured to 0. Signed-off-by: Stefan Roese <sr@denx.de>
| * | arm: mvebu: a38x: Weed out floating point useMarek Vasut2016-05-201-19/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reason unknown, recently, the DDR init code writers are really fond of hiding some small floating point operating deep in their creations. This patch removes one from the Marvell A38x code. Instead of returning size of chip as float from ddr3_get_device_size() in GiB units, return it as int in MiB units. Since this would interfere with the huge switch code in ddr3_calc_mem_cs_size(), rework the code to match the change. Before this patch, the cs_mem_size variable could have these values: ( { 16, 32 } x { 8, 16 } x { 0.01, 0.5, 1, 2, 4, 8 } ) / 8 = { 0.000000, 0.001250, 0.002500, 0.005000, 0.062500, 0.125000, 0.250000, 0.500000, 1.000000, 2.000000, 4.000000, } The switch code checked for a subset of the resulting RAM sizes, which is in range 128 MiB ... 2048 MiB. With this patch, the cs_mem_size variable can have these values: ( { 16, 32 } x { 8, 16 } x { 0, 512, 1024, 2048, 4096, 8192 } ) / 8 = { 0, 64, 128, 256, 512, 1024, 2048, 4096 } To retain previous behavior, filter out 0 MiB (invalid size), 64 MiB and 4096 MiB options. Removing the floating point stuff also saves 1.5k from text segment: clearfog : spl/u-boot-spl:all -1592 spl/u-boot-spl:text -1592 Signed-off-by: Marek Vasut <marex@denx.de> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * Merge git://git.denx.de/u-boot-dmTom Rini2016-05-17136-2749/+5419
| |\
| | * dm: mmc: test: Add tests for MMCSimon Glass2016-05-172-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | Add a simple test which checks that a sandbox-emulated SD card can be used correctly. This tests plumbing through the MMC stack's block-device implementaion. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: sandbox: mmc: Enable building MMC code for sandboxSimon Glass2016-05-173-2/+6
| | | | | | | | | | | | | | | | | | | | | Enable building the MMC code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: sandbox: Add an SD-card emulationSimon Glass2016-05-172-2/+143
| | | | | | | | | | | | | | | | | | | | | | | | Add an emulation of an SD card to sandbox, allowing MMC to be used in tests. The emulation is very simple, supporting only card detection and reading test data. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Add support for driver-model block devicesSimon Glass2016-05-175-30/+58
| | | | | | | | | | | | | | | | | | | | | Add support for enabling CONFIG_BLK with MMC. This involves changing a few functions to use struct udevice and adding a MMC block device driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Add a way to bind MMC devices with driver modelSimon Glass2016-05-172-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binding an MMC device when CONFIG_BLK is enabled requires that a block device be bound as a child of the MMC device. Add a function to do this. The mmc_create() method will be used only when DM_BLK is disabled. Add an unbind method also. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Implement the MMC functions for block devicesSimon Glass2016-05-172-1/+109
| | | | | | | | | | | | | | | | | | | | | | | | Implement the functions in mmc_legacy.c for driver-model block devices, so that MMC can use driver model for these. This allows CONFIG_BLK to be enabled with DM_MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: sandbox: Only enable the sandbox MMC driver when validSimon Glass2016-05-172-1/+7
| | | | | | | | | | | | | | | | | | | | | This driver will require generic MMC and block-device support in a future commit. To avoid test errors, make this change now. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Adjust mmc_switch_part() to use a struct mmcSimon Glass2016-05-171-8/+4
| | | | | | | | | | | | | | | | | | | | | Instead of looking up the MMC device by number, just pass it in. This makes it possible to use this function with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: blk: Use the correct error code for blk_get_device_by_str()Simon Glass2016-05-171-3/+3
| | | | | | | | | | | | | | | | | | | | | Return -EINVAL instead of -1 in this function, to provide a more meaningful error. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Move the device list into a separate fileSimon Glass2016-05-176-121/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | At present the MMC subsystem maintains its own list of MMC devices. This cannot work with driver model, which needs to maintain this itself. Move the list code into a separate 'legacy' file. The core MMC code remains, and will be shared with the driver-model implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Set up the device pointer when using the MMC uclassSimon Glass2016-05-177-1/+14
| | | | | | | | | | | | | | | | | | | | | Update the existing drivers to set up this new pointer. This will be required by the MMC uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: blk: Add a comment as to why the bdev member is neededSimon Glass2016-05-171-0/+5
| | | | | | | | | | | | | | | | | | | | | This member should be explained, since it is not obvious why it is needed. Add a comment. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: part: Drop the block_drvr tableSimon Glass2016-05-172-64/+30
| | | | | | | | | | | | | | | | | | | | | This is not needed since we can use the functions provided by the legacy block device support. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: part: Use the legacy block driver for hardware partition supportSimon Glass2016-05-171-11/+1
| | | | | | | | | | | | | | | | | | Drop use of the table in part.c for this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: blk: Add functions to select a hardware partitionSimon Glass2016-05-172-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | The block device uclass does not currently support selecting a particular hardware partition but this is needed for MMC. Add it so that the blk API can support MMC properly. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Use the new select_hwpart() APISimon Glass2016-05-177-15/+22
| | | | | | | | | | | | | | | | | | Avoid calling directly into the MMC code - use the new API call instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: spl: Use the legacy block interface in SPLSimon Glass2016-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | Bring this in for SPL so that we can use generic code for loading from block devices. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Add a function to obtain the block deviceSimon Glass2016-05-172-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | The MMC block device is contained within struct mmc. But with driver model this will not be the case. Add a function to obtain the block device. We can later implement this for CONFIG_BLK. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Implement the select_hwpart() methodSimon Glass2016-05-171-0/+22
| | | | | | | | | | | | | | | | | | | | | Implement this method so that hardware partitions will work correctly with MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: mmc: Move mmc_switch_part() above its callersSimon Glass2016-05-171-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | This function is defined after it is used. In preparation for making it static, move it up a little. Also drop the printf() which should not appear in a driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: blk: Free the block device name when unboundSimon Glass2016-05-171-2/+10
| | | | | | | | | | | | | | | | | | | | | Mark the device name as allocated so that it will be freed correctly when the device is unbound. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: core: Allow device names to be freed automaticallySimon Glass2016-05-173-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices have a name that is stored in allocated memory. At present there is no mechanism to free this memory when the device is unbound. Add a device flag to track whether a name is allocated and a function to add the flag. Free the memory when the device is unbound. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: blk: Fix allocation of block-device numberingSimon Glass2016-05-171-9/+9
| | | | | | | | | | | | | | | | | | | | | Due to code ordering the block devices are not numbered sequentially. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: sandbox: Enable systemaceSimon Glass2016-05-171-0/+4
| | | | | | | | | | | | | | | | | | | | | Enable building the systemace code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: systemace: Add driver-mode block-device supportSimon Glass2016-05-171-0/+44
| | | | | | | | | | | | | | | | | | Add support for CONFIG_BLK to the systemace driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: systemace: Reorder function to avoid forward declarataionsSimon Glass2016-05-171-31/+26
| | | | | | | | | | | | | | | | | | | | | Move the systemace_get_dev() function below systemace_read() so that we can avoid a forward declaration. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: blk: Add a easier way to create a named block deviceSimon Glass2016-05-173-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | Add a function that automatically builds the device name given the parent and a supplied string. Most callers will want to do this, so putting this functionality in one place makes more sense. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: blk: Allow blk_create_device() to allocate the device numberSimon Glass2016-05-172-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | Allow a devnum parameter of -1 to indicate that the device number should be alocated automatically. The next highest available device number for that interface type is used. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: sandbox: Enable SATASimon Glass2016-05-171-0/+3
| | | | | | | | | | | | | | | | | | | | | Enable building the SATA code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: sata: Add support for driver-model block devicesSimon Glass2016-05-171-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | Add driver-model block-device support to the SATA implementation. This is just a dummy implementation for now, since the SATA low-level API uses numbered devices and that doesn't fit with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * dm: sandbox: Enable SCSISimon Glass2016-05-171-0/+6
| | | | | | | | | | | | | | | | | | | | | Enable building the SCSI code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud