[U-Boot] [PATCH v2 3/5] spi: Use mode instead of op_mode_tx

Jagan Teki jteki at openedev.com
Mon Dec 14 08:35:13 CET 2015


On Monday 14 December 2015 01:01 PM, Bin Meng wrote:
> Hi Jagan,
>
> On Mon, Dec 14, 2015 at 2:57 PM, Jagan Teki <jteki at openedev.com> wrote:
>> Used mode member from spi_slave{} instead of op_mode_tx.
>>
>> Cc: Bin Meng <bmeng.cn at gmail.com>
>> Cc: Simon Glass <sjg at chromium.org>
>> Signed-off-by: Jagan Teki <jteki at openedev.com>
>> ---
>> Changes for v2:
>>          - none
>>
>>   drivers/mtd/spi/sf_probe.c  | 2 +-
>>   drivers/mtd/spi/spi_flash.c | 4 ++--
>>   drivers/spi/ich.c           | 2 +-
>>   include/spi.h               | 8 ++------
>>   4 files changed, 6 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
>> index 0cafc29..3519ffd 100644
>> --- a/drivers/mtd/spi/sf_probe.c
>> +++ b/drivers/mtd/spi/sf_probe.c
>> @@ -128,7 +128,7 @@ static int spi_flash_std_write(struct udevice *dev, u32 offset, size_t len,
>>
>>   #if defined(CONFIG_SPI_FLASH_SST)
>>          if (flash->flags & SNOR_F_SST_WR) {
>> -               if (flash->spi->op_mode_tx & SPI_OPM_TX_BP)
>> +               if (flash->spi->mode & SPI_TX_BP)
>
> Did you ever build this? spi->mode is declared as a u8, but SPI_TX_BP is 0x100.

Look like I sent the wrong patch, I made mode as uint will send that.

thanks!
-- 
Jagan


More information about the U-Boot mailing list