- 19 1月, 2015 9 次提交
-
-
由 Diego Santa Cruz 提交于
This adds an API to do hardware partitioning on eMMC devices. The new mmc_hwpart_config() function does the partitioning in one go. As the different attributes and partitioning options on eMMC may be interdependent validation has to be done based on the complete partitioning configuration. The function accepts three modes: - MMC_HWPART_CONF_CHECK: just validates that the configuration is valid. - MMC_HWPART_CONF_SET: validates and sets all the fields in EXT_CSD but without setting the "partitioning completed" bit, and thus is reversible. - MMC_HWPART_CONF_COMPLETE: does everything and is thus not reversible. Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
The mmc_startup() function uses the ext_csd data even if reading it from the mmc device failed. This bug was introduced in commit bc897b1d. We now bail out if reading it fails, this should not be a problem as ext_csd was introduced in MMC 4.0 and this code is conditional on MMC >= 4.0. Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
The eMMC spec says that partitioning is only effective after the PARTITION_SETTING_COMPLETED is set in EXT_CSD (and a power cycle was done, but that we cannot know). Thus the partition sizes and attributes should be ignored when that bit is not set, otherwise the various capacities are not coherent (e.g., the user data capacity will be that of the unpartitioned device while partition sizes would be non-zero). Prescence of non-zero partitioning data is nevertheless still used to activate the high-capacity size definitions (EXT_CSD_ERASE_GROUP_DEF) as it is necessary to set that to write any of the partitioning fields in EXT_CSD, so having partitioning data means someone previously activated that and we should keep it activated. Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
Read the eMMC high capacity write protect group size at mmc device initialization. This is useful to correctly partition an eMMC device, as partitions need to be aligned to this size. Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
The erase_grp_size in struct mmc is to be a size in 512-byte sectors but the code used to compute it for eMMC when EXT_CSD_ERASE_GROUP_DEF is enabled computed it as bytes, leading to erase sizes and alignment much larger than what is actually required by the mmc device. Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
This modification reads the size of the eMMC enhanced user data area upon initialization of an mmc device, it will be used later by mmcinfo. Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
The eMMC spec mandates that the high-capacity group size definitions should be enabled when the device is partitioned (by setting ERASE_GROUP_DEF in EXT_CSD). The current test to determine when this is required misses a few cases. In particular a device may have been partitioned without setting the enhanced attribute on any partition or partitioning may be completed without creating any extra partitions. This change moves the code to set ERASE_GROUP_DEF to after reading all partition information. It is also enabled when PARTITIONING_SETTING_COMPLETED is set as it is necessary to enable ERASE_GROUP_DEF before setting that bit, so it means that the user previously switched to the high capacity definitions. Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
由 Diego Santa Cruz 提交于
This extends the mmcinfo command's output to show which eMMC partitions have the enhanced attribute set. Note that the eMMC spec says that if the enhanced attribute is supported then the boot and RPMB partitions are of the enhanced type. The output of mmcinfo becomes: Device: OMAP SD/MMC Manufacturer ID: fe OEM: 14e Name: MMC16 Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.41 High Capacity: Yes Capacity: 13.8 GiB Bus Width: 4-bit User Capacity: 13.8 GiB ENH Boot Capacity: 16 MiB ENH RPMB Capacity: 128 KiB ENH GP1 Capacity: 64 MiB ENH GP2 Capacity: 64 MiB ENH Signed-off-by: NDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
-
- 13 12月, 2014 6 次提交
-
-
由 Andrew Gabbasov 提交于
Block length for write and read commands is fixed to 512 bytes when the card is in Dual Data Rate mode. If block length read from CSD is different, make sure the driver will use correct length in all further calculations and settings. Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com>
-
由 Andrew Gabbasov 提交于
Since the driver doesn't work in 1.2V or 1.8V signaling level modes, Dual Data Rate mode can be supported by the driver only if it is supported by the card in regular 3.3V mode. So, check for a particular single bit in card type field. Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com>
-
由 Andrew Gabbasov 提交于
If the MMC_MODE_DDR_52MHz flag is set in card capabilities bitmask, it is never cleared, even if switching to DDR mode fails, and if the controller driver uses this flag to check the DDR mode, it can take incorrect actions. Also, DDR related checks in mmc_startup() incorrectly handle the case when the host controller does not support some bus widths (e.g. can't support 8 bits), since the host_caps is checked for DDR bit, but not bus width bits. This fix clearly separates using of card_caps bitmask, having there the flags for the capabilities, that the card can support, and actual operation mode, described outside of card_caps (i.e. bus_width and ddr_mode fields in mmc structure). Separate host controller drivers may need to be updated to use the actual flags. Respectively, the capabilities checks in mmc_startup are made more correct and clear. Also, some clean up is made with errors handling and code syntax layout. Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com>
-
由 Markus Niebel 提交于
Signed-off-by: NMarkus Niebel <Markus.Niebel@tq-group.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
-
由 Markus Niebel 提交于
if the card claims to be high capacity and the card is partitioned the capacity shall still be read from ext_csd SEC_COUNT even if the resulting capacity is smaller than 2 GiB Signed-off-by: NMarkus Niebel <Markus.Niebel@tq-group.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
-
由 Lubomir Popov 提交于
If print_mmc_devices() was called with a '\n' separator (as done for example by the "mmc list" command), it offset the 2-nd and all subsequent lines by one space. Fixing this. Signed-off-by: NLubomir Popov <l-popov@ti.com>
-
- 05 12月, 2014 1 次提交
-
-
由 Paul Kocialkowski 提交于
Some devices may use non-standard combinations of regulators to power MMC: this allows these devices to provide a board-specific MMC power init function to set everything up in their own way. Signed-off-by: NPaul Kocialkowski <contact@paulk.fr> Reviewed-by: NTom Rini <trini@ti.com>
-
- 03 10月, 2014 3 次提交
-
-
由 Mario Schuknecht 提交于
After setting the bus width, the extended CSD register is read. Some selected fields are compared with previously read extended CSD register fields. In this comparison the EXT_CSD_ERASE_GROUP_DEF field is compared. But this field is previously written under certain circumstances. And then the comparison fails. Only compare read-only fields. Therefore compare field EXT_CSD_HC_WP_GRP_SIZE instead of field EXT_CSD_ERASE_GROUP_DEF. Signed-off-by: NMario Schuknecht <mario.schuknecht@dresearch-fe.de> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
由 Peter Bigot 提交于
The capacity and lba for an MMC device with part_num 0 reflects the whole device. When mmc_switch_part() successfully switches to a partition, the capacity is changed to that partition. As partition 0 does not physically exist, attempts to switch back to the whole device will indicate an error, but the capacity setting for the whole device must still be restored to match the partition. Signed-off-by: NPeter A. Bigot <pab@pabigot.com> Tested-by: NTom Rini <trini@ti.com> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
由 Hannes Petermaier 提交于
if we set manually this bit on the eMMC card using mmc_switch(...), we also have to set it within our (before read) internal structure 'ext_csd'. Otherwise following checks on this will fail. Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: NHannes Petermaier <oe5hpm@oevsv.at>
-
- 19 7月, 2014 2 次提交
-
-
由 Jeroen Hofstee 提交于
Add missing prototypes for global functions and make local functions static. cc: panto@antoniou-consulting.com Signed-off-by: NJeroen Hofstee <jeroen@myspectrum.nl>
-
由 Jeroen Hofstee 提交于
use weak instead of alias to prevent some clang warnings. Signed-off-by: NJeroen Hofstee <jeroen@myspectrum.nl>
-
- 12 6月, 2014 1 次提交
-
-
由 Stephen Warren 提交于
Rather than just returning -1 everywhere, try to return something meaningful from mmc_select_hwpart(). Note that most other MMC functions don't do this, including functions called from mmc_select_hwpart(), so I'm not sure how effective this will be. Still, it's one less place with hard-coded -1. Suggested-by: NPantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: NStephen Warren <swarren@nvidia.com> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 23 5月, 2014 3 次提交
-
-
由 Stephen Warren 提交于
This enables specifying which eMMC HW partition to target for any U-Boot command that uses the generic get_partition() function to parse its command-line arguments. Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: NStephen Warren <swarren@nvidia.com>
-
由 Andrew Gabbasov 提交于
MMC switch command for unsupported feature (e.g. bus width) sets a switch error bit in card status. This bit should be checked, and, if it's set, no access with new controller settings should be performed. Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com>
-
由 Mateusz Zalega 提交于
mmc_init() doesn't call get_timer() anymore if MMC is already initialized. <panto> Minor formatting fix. Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: NMateusz Zalega <m.zalega@samsung.com>
-
- 16 5月, 2014 2 次提交
-
-
由 Jaehoon Chung 提交于
Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Tested-by: NLukasz Majewski <l.majewski@samsung.com> Acked-by: NLukasz Majewski <l.majewski@samsung.com> Signed-off-by: NMinkyu Kang <mk7.kang@samsung.com>
-
由 Jaehoon Chung 提交于
Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Reviewed-by: NLukasz Majeski <l.majewski@samsung.com> Tested-by: NLukasz Majewski <l.majewski@samsung.com> Acked-by: NLukasz Majewski <l.majewski@samsung.com> Signed-off-by: NMinkyu Kang <mk7.kang@samsung.com>
-
- 02 4月, 2014 1 次提交
-
-
由 Tom Rini 提交于
Some eMMC chips may need the RST_n_FUNCTION bit set to a non-zero value in order for warm reset of the system to work. Details on this being required will be part of the eMMC datasheet. Also add using this command to the dra7xx README. * Whitespace fix by panto Signed-off-by: NTom Rini <trini@ti.com> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 24 3月, 2014 2 次提交
-
-
由 Pantelis Antoniou 提交于
The way that struct mmc was implemented was a bit of a mess; configuration and internal state all jumbled up in a single structure. On top of that the way initialization is done with mmc_register leads to a lot of duplicated code in drivers. Typically the initialization got something like this in every driver. struct mmc *mmc = malloc(sizeof(struct mmc)); memset(mmc, 0, sizeof(struct mmc); /* fill in fields of mmc struct */ /* store private data pointer */ mmc_register(mmc); By using the new mmc_create call one just passes an mmc config struct and an optional private data pointer like this: struct mmc = mmc_create(&cfg, priv); All in tree drivers have been updated to the new form, and expect mmc_register to go away before long. Changes since v1: * Use calloc instead of manually calling memset. * Mark mmc_register as deprecated. Signed-off-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
由 Pantelis Antoniou 提交于
Remove the in-structure ops and put them in mmc_ops with a constant pointer to it. This makes the mmc structure smaller as well as conserving code space (in theory). All in-tree drivers are converted as well; this is done in a single patch in order to not break git bisect. Changes since V1: Fix compilation b0rked issue on omap platforms where OMAP_GPIO was not set. Signed-off-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 08 2月, 2014 3 次提交
-
-
由 Tom Rini 提交于
The open and close mmc sub-commands implement a hard-coded set of values specific to the SMDK5250 platform. Remove these commands as what they did can be done instead with a series of mmc dev / bootpart / bootbus commands instead now. Cc: Amar <amarendra.xt@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NTom Rini <trini@ti.com> Signed-off-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
由 Tom Rini 提交于
Add a bootbus sub-command to the mmc command to allow for setting the boot_bus_width, reset_boot_bus_width and boot_mode fields of BOOT_BUS_WIDTH (EXT_CSD[177]). Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NTom Rini <trini@ti.com> Signed-off-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
由 Tom Rini 提交于
Add a partconf sub-command to the mmc command to allow for setting the boot_ack, boot_partition and partition_access fields of PARTITION_CONFIG (formerly BOOT_CONFIG, EXT_CSD[179]). Part of this requires changing the check for 'part' from an strncmp to a strcmp, like the rest of the sub-commands. Cc: Andy Fleming <afleming@gmail.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NTom Rini <trini@ti.com> Signed-off-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 07 2月, 2014 1 次提交
-
-
由 Stephen Warren 提交于
U-Boot currently sets MMC cards' RCA register to 0. This value is reserved according to the specification. Use a value of 1 instead, just like the Linux kernel. Signed-off-by: NStephen Warren <swarren@nvidia.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 09 1月, 2014 1 次提交
-
-
由 Markus Niebel 提交于
The eMMC and the SD-Card specifications describe the optional SET_DSR command. During measurements at our lab we found that some cards implementing this feature having really strong driver strengts per default. This can lead to voltage peaks above the specification of the host on signal edges for data sent from a card to the host. Since availability of a given card type may be shorter than the time a certain hardware will be produced it is useful to have support for this command (Alternative would be changing termination resistors and adapting the driver strength of the host to the used card.) Following proposal for an implementation: - new field that reflects CSD field DSR_IMP in struct mmc - new field for design specific DSR value in struct mmc - board code can set DSR value in mmc struct just after registering an controller - mmc_startup sends the the stored DSR value before selecting a card, if DSR_IMP is set Additionally the mmc command is extended to make is possible to play around with different DSR values. The concept was tested on a i.MX53 based platform using a Micron eMMC card where the default DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use this feature for instance on a mx53loco one have to add a call to mmc_set_dsr() in board_mmc_init() after calling fsl_esdhc_initialize() for the eMMC. Signed-off-by: NMarkus Niebel <Markus.Niebel@tqs.de> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 31 10月, 2013 1 次提交
-
-
由 Oliver Metz 提交于
EXT_CSD_ERASE_GROUP_DEF is lost every time after a reset or power off. Set it if device has enhanced partitions. Signed-off-by: NOliver Metz <oliver@freetz.org> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 20 9月, 2013 1 次提交
-
-
由 Paul Burton 提交于
For SPL builds this is just dead code since we'll only need to read. Eliminating it results in a significant size reduction for the SPL binary, which may be critical for certain platforms where the binary size is highly constrained. Signed-off-by: NPaul Burton <paul.burton@imgtec.com> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 18 9月, 2013 2 次提交
-
-
由 Paul Burton 提交于
If we don't have CONFIG_SPL_LIBCOMMON_SUPPORT defined then stdio & *printf functions are unavailable & calling them will cause a link failure. Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
-
由 Oleksandr Tyshchenko 提交于
Do not call a memset for unused variable backup every time. Remove unused variable from function. Signed-off-by: NOleksandr Tyshchenko <oleksandr.tyshchenko@ti.com> Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
-
- 21 8月, 2013 1 次提交
-
-
由 Ying Zhang 提交于
The code from the internal on-chip ROM. It loads the final uboot image into DDR, then jump to it to begin execution. The SPL's size is sizeable, the maximum size must not exceed the size of L2 SRAM. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are two stage uboot images: * spl_boot, 96KB size. The env variables are copied to L2 SRAM, so that ddr spd code can get the interleaving mode setting in env. It loads final uboot image from offset 96KB. * final uboot image, size is variable depends on the functions enabled. Signed-off-by: NYing Zhang <b40530@freescale.com> Acked-by: NYork Sun <yorksun@freescale.com>
-