From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?=c3=81lvaro_Fern=c3=a1ndez_Rojas?= Date: Wed, 7 Jun 2017 20:36:17 +0200 Subject: [U-Boot] [PATCH v2 02/10] drivers: spi: consider command bytes when sending transfers In-Reply-To: References: <1495135788-9152-1-git-send-email-noltari@gmail.com> <1495477297-29230-1-git-send-email-noltari@gmail.com> <1495477297-29230-3-git-send-email-noltari@gmail.com> <8e0ac71b-b462-4460-5a70-1dcf9e483e4f@gmail.com> Message-ID: <95ff8fa7-1142-a1c6-34b9-c73e3c5466b6@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hi Jagan, El 07/06/2017 a las 19:28, Jagan Teki escribió: > On Wed, Jun 7, 2017 at 9:03 PM, Álvaro Fernández Rojas > wrote: >> Hi Jagan, >> >> El 7/6/17 a las 9:30, Jagan Teki escribió: >>> On Mon, May 22, 2017 at 11:51 PM, Álvaro Fernández Rojas >>> wrote: >>>> Command bytes are part of the written bytes and they should be taken into >>>> account when sending a spi transfer. >>>> >>>> Signed-off-by: Álvaro Fernández Rojas >>>> --- >>>> v2: Introduce changes requested by Simon Glass: >>>> - Always include command bytes when determining max write size. >>>> >>>> drivers/mtd/spi/spi_flash.c | 2 +- >>>> include/spi.h | 2 +- >>>> 2 files changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c >>>> index e44c10f..5b8cbc9 100644 >>>> --- a/drivers/mtd/spi/spi_flash.c >>>> +++ b/drivers/mtd/spi/spi_flash.c >>>> @@ -380,7 +380,7 @@ int spi_flash_cmd_write_ops(struct spi_flash *flash, u32 offset, >>>> >>>> if (spi->max_write_size) >>>> chunk_len = min(chunk_len, >>>> - (size_t)spi->max_write_size); >>>> + spi->max_write_size - len); >>> >>> This can be squashed with 01/10 with proper commit message? >> I think it's better if we keep it as two patches, because they are different features... > > Fine, but adding immediate change followed by previous change deletion > doesn't look feature that exist. Nope, there's no previous change deletion. First patch adds support for limited reads and second patch fixes limited writes... > > thanks! > Thanks