- May 20, 2016
-
-
Nikita Kiryanov authored
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>
-
Nikita Kiryanov authored
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>
-
Stefan Roese authored
Enable bootdelay 0 check so that booting can be interrupted even with bootdelay configured to 0. Signed-off-by:
Stefan Roese <sr@denx.de>
-
Marek Vasut authored
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>
-
- May 17, 2016
-
-
git://git.denx.de/u-boot-dmTom Rini authored
-
git://www.denx.de/git/u-boot-imxTom Rini authored
-
Simon Glass authored
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>
-
Simon Glass authored
Enable building the MMC code for sandbox. This increases build coverage for sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
Return -EINVAL instead of -1 in this function, to provide a more meaningful error. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
Drop use of the table in part.c for this feature. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
Avoid calling directly into the MMC code - use the new API call instead. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
Implement this method so that hardware partitions will work correctly with MMC. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
Due to code ordering the block devices are not numbered sequentially. Fix this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Enable building the systemace code for sandbox. This increases build coverage for sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add support for CONFIG_BLK to the systemace driver. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
Enable building the SATA code for sandbox. This increases build coverage for sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
Enable building the SCSI code for sandbox. This increases build coverage for sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add driver-model block-device support to the SCSI implementation. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Enable building the IDE code for sandbox. This is for build coverage only. It does not currently work. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add driver-model block-device support to the IDE implementation. Signed-off-by:
Simon Glass <sjg@chromium.org>
-