[U-Boot] [PATCH] ARM: cfi_flash: Avoid generation of unaligned accesses

2013-04-28 Thread Andrew Gabbasov
seems quite expensive, just force the compiler to use -mno-unaligned-access. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mtd/Makefile |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index 543c845..a120f0b 100644

[U-Boot] [PATCH] ARM: cfi_flash: Fix unaligned accesses to cfi_qry structure

2013-04-29 Thread Andrew Gabbasov
macros to access such fields. It removes possible unaligned accesses in cfi_flash driver. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mtd/cfi_flash.c | 23 +-- include/mtd/cfi_flash.h | 18 +++--- 2 files changed, 24 insertions(+), 17

[U-Boot] [PATCH] mx6: mx6qsabrelite/nitrogen6x: Fix use of gpio number in SF chip select

2013-05-30 Thread Andrew Gabbasov
The number of gpio signal is packed inside CONFIG_SF_DEFAULT_CS macro (shifted and or'ed with chip select), so it's incorrect to pass that macro directly as an argument to gpio_direction_output() call. The gpio number should be extracted (shifted back) before that. Signed-off-by: Andrew Gabbasov

[U-Boot] [PATCH] mx6: mx6qsabrelite/nitrogen6x: Remove incorrect setting of gpio CS signal

2013-05-30 Thread Andrew Gabbasov
, before any actual activity happens on the bus. So, it is safe to just remove the gpio_direction_output call, that works incorrectly, thus making no effect, anyway. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- board/boundary/nitrogen6x/nitrogen6x.c|1 - board/freescale

[U-Boot] [PATCH] fsl_esdhc: Do not clear interrupt status bits until data processed

2013-06-11 Thread Andrew Gabbasov
masking. Reported-by: Dirk Behme dirk.be...@de.bosch.com Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/fsl_esdhc.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 861f4b9..b501b4d 100644

[U-Boot] [PATCH] mx6: Fix calculation of emi_slow clock rate

2013-07-04 Thread Andrew Gabbasov
'. Signed-off-by: Jason Liu r64...@freescale.com Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- arch/arm/cpu/armv7/mx6/clock.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 3c0d908

[U-Boot] [PATCH] mx6: fsl_esdhc: Fix waiting for DMA operation completion

2013-04-02 Thread Andrew Gabbasov
, or if some delay is added after transfer completion. Adding extra waiting for DMA completion after Transfer Complete event fixes this issue. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/fsl_esdhc.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc

[U-Boot] [Patch] fsl_esdhc: Fix DMA transfer completion waiting loop

2013-04-08 Thread Andrew Gabbasov
Error condition is added to the list of data errors, checked in the loop. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/fsl_esdhc.c |3 +-- include/fsl_esdhc.h |4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b

[U-Boot] [PATCH] command.c: Fix auto-completion for the full commands list case

2013-12-27 Thread Andrew Gabbasov
Compiling of full list of commands does not advance the counter, so it always results in an empty list. This seems to be (inadvertently?) introduced by commit 6c7c946cadfafdea80eb930e3181085b907a0362. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- common/command.c |4 ++-- 1

[U-Boot] [PATCH] mmc: Handle switch error status bit in MMC card status

2014-03-24 Thread 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. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/mmc.c |4

[U-Boot] [PATCH] mmc: fsl_esdhc: fix calculation of timeout for data transactions

2014-03-24 Thread Andrew Gabbasov
calculation instead. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/fsl_esdhc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 7b146a3..f4d3132 100644 --- a/drivers/mmc

[U-Boot] [PATCH] mmc: fsl_esdhc: add controller reset in case of data related errors too

2014-03-24 Thread Andrew Gabbasov
The controller reset is performed now if command error occurs. This commit adds the reset for the case of data related errors too. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/fsl_esdhc.c | 63 +++ 1 file changed, 36

[U-Boot] [PATCH v2] mmc: Handle switch error status bit in MMC card status

2014-04-03 Thread 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. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/mmc.c |4

[U-Boot] [PATCH 0/4] mmc: Fix recognition and selection of Dual Data Rate mode

2014-12-01 Thread Andrew Gabbasov
to the community. Andrew Gabbasov (4): mmc: Fix handling of bus widths and DDR card capabilities mmc: Fix Dual Data Rate capability recognition mmc: Fix block length for DDR mode mmc: dw_mmc: Use active DDR mode flag common/cmd_mmc.c | 3 ++- drivers/mmc/dw_mmc.c | 2 +- drivers/mmc

[U-Boot] [PATCH 1/4] mmc: Fix handling of bus widths and DDR card capabilities

2014-12-01 Thread Andrew Gabbasov
handling and code syntax layout. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- common/cmd_mmc.c | 3 ++- drivers/mmc/mmc.c | 52 +++- include/mmc.h | 1 + 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/common

[U-Boot] [PATCH 2/4] mmc: Fix Dual Data Rate capability recognition

2014-12-01 Thread 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: Andrew Gabbasov andrew_gabba...@mentor.com

[U-Boot] [PATCH 4/4] mmc: dw_mmc: Use active DDR mode flag

2014-12-01 Thread Andrew Gabbasov
The card_caps bit should denote the card capability to use DDR mode, but we need the flag indicating that the DDR mode is active. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc

[U-Boot] [PATCH 3/4] mmc: Fix block length for DDR mode

2014-12-01 Thread 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: Andrew Gabbasov andrew_gabba...@mentor.com

[U-Boot] [PATCH 1/2] mmc: Avoid redundant switching to 1-bit bus width for MMC cards

2014-12-25 Thread Andrew Gabbasov
it would be incorrect to just remove the 1-bit bus width case from the list, it should still be processed in some cases. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com Tested-by: Alexey Brodkin abrod...@synopsys.com --- drivers/mmc/mmc.c | 12 1 file changed, 12 insertions

[U-Boot] [PATCH 0/2] Fix some corner cases in bus width setting

2014-12-25 Thread Andrew Gabbasov
of earlier versions than MMC standard version 4.0 do not support wider bus widths, so it doesn't make sense to even try to switch the bus width for such cards. Andrew Gabbasov (2): mmc: Avoid redundant switching to 1-bit bus width for MMC cards mmc: Skip changing bus width for MMC cards earlier

[U-Boot] [PATCH 2/2] mmc: Skip changing bus width for MMC cards earlier than version 4.0

2014-12-25 Thread Andrew Gabbasov
the entire bus width related activity for earlier versions. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com Tested-by: Alexey Brodkin abrod...@synopsys.com --- drivers/mmc/mmc.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index

[U-Boot] [PATCH 5/6] mmc: Restructure polling loops to avoid extra delays

2015-03-19 Thread Andrew Gabbasov
the delay just before exiting on timeout conditions. Restructure all these loops to check the respective conditions before making a delay for the next loop pass, and to appropriately exit without the delay. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/mmc.c | 27

[U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR only if it is still not ready

2015-03-19 Thread Andrew Gabbasov
and skip it appropriately. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/mmc.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index d073d79..42af47c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers

[U-Boot] [PATCH 6/6] mmc: Fix splitting device initialization

2015-03-19 Thread Andrew Gabbasov
-executed from mmc_init function. Set the init_in_progress flag in all non-error cases. Also, move flags setting statements around so that the flags are not set in error paths. Also, IN_PROGRESS return status becomes unnecessary, so get rid of it. Signed-off-by: Andrew Gabbasov andrew_gabba

Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR only if it is still not ready

2015-03-20 Thread Andrew Gabbasov
. In this case trying to continue polling the card with CMD1 in mmc_complete_op_cond is incorrect and may lead to unpredictable results. So check the flag before polling and skip it appropriately. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/mmc.c | 20

Re: [U-Boot] [PATCH] mmc: fix OCR Polling

2015-03-20 Thread Andrew Gabbasov
Hi Peng, From: Peng.Fan at freescale.com (Peng Fan) Date: Thu, 19 Mar 2015 16:22:46 +0800 Subject: [U-Boot] [PATCH] mmc: fix OCR Polling If in mmc_send_op_cond, OCR_BUSY is set in CMD1's response, then state is transfered to Ready state, and there is no need to send CMD1 again. Otherwise

[U-Boot] [PATCH 0/6] mmc: Fix OCR polling and splitted initialization

2015-03-19 Thread Andrew Gabbasov
not directly related to the patched code area, but just uses the occasion to fix the typo. This is a series of patches, the next patch depending on previous ones, so that should be applied in order, on top of previous ones. Andrew Gabbasov (6): mmc: Fix typo in MMC type checking macro mmc

[U-Boot] [PATCH 1/6] mmc: Fix typo in MMC type checking macro

2015-03-19 Thread Andrew Gabbasov
The version flag constant name used in IS_MMC macro is incorrect/undefined. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- include/mmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mmc.h b/include/mmc.h index 2ad0f19..a251531 100644 --- a/include

[U-Boot] [PATCH 3/6] mmc: Do not pass external mmc_cmd structure to mmc_send_op_cond_iter()

2015-03-19 Thread Andrew Gabbasov
it as an argument from the caller. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/mmc.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index fe00a19..d073d79 100644 --- a/drivers/mmc/mmc.c +++ b

[U-Boot] [PATCH 2/6] mmc: Avoid extra duplicate entry in mmc device structure

2015-03-19 Thread Andrew Gabbasov
, these fields have actually the same data, just in different time periods. It's easier to use the same 'ocr' field in both cases at once, without temporary using of the 'op_cond_response' field. Signed-off-by: Andrew Gabbasov andrew_gabba...@mentor.com --- drivers/mmc/mmc.c | 13 +++-- include

Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR only if it is still not ready

2015-03-24 Thread Andrew Gabbasov
On 3/23/2015 12:38 AM, Andrew Gabbasov wrote: Hi Troy, From: Troy Kisky [mailto:troy.ki...@boundarydevices.com] Sent: Friday, March 20, 2015 9:39 PM To: peng@freescale.com; Gabbasov, Andrew; u-boot@lists.denx.de Cc: Eric Nelson Subject: Re: [U-Boot] [PATCH 4/6] mmc: Continue

Re: [U-Boot] [PATCH] mmc: fix OCR Polling

2015-03-30 Thread Andrew Gabbasov
Hi Pantelis, From: Pantelis Antoniou [mailto:pantelis.anton...@gmail.com] Sent: Friday, March 27, 2015 9:32 PM To: Gabbasov, Andrew Cc: Peng Fan; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] mmc: fix OCR Polling Hi Andrew, Peng, On Mar 23, 2015, at 01:23 , Andrew Gabbasov

Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR only if it is still not ready

2015-03-24 Thread Andrew Gabbasov
/2015 9:33 AM, Andrew Gabbasov wrote: Hi Troy, From: Troy Kisky [mailto:troy.ki...@boundarydevices.com] Sent: Monday, March 23, 2015 11:09 PM To: Gabbasov, Andrew; peng@freescale.com; u-boot@lists.denx.de Cc: Eric Nelson Subject: Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC

Re: [U-Boot] [PATCH] mmc: fix OCR Polling

2015-03-23 Thread Andrew Gabbasov
Hi Peng, From: Peng Fan [mailto:peng@freescale.com] Sent: Saturday, March 21, 2015 1:34 PM To: Gabbasov, Andrew; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] mmc: fix OCR Polling [skipped] After this patch, if the busy flag is indeed already set (so that the loop body is

Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR only if it is still not ready

2015-03-23 Thread Andrew Gabbasov
Hi Troy, From: Troy Kisky [mailto:troy.ki...@boundarydevices.com] Sent: Friday, March 20, 2015 9:39 PM To: peng@freescale.com; Gabbasov, Andrew; u-boot@lists.denx.de Cc: Eric Nelson Subject: Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR only if it is still not ready