lkml.org 
[lkml]   [2019]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 2/3] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver
From
Date
On 04/03/2019 12:20 PM, masonccyang@mxic.com.tw wrote:

[...]
>> >> > + ret = rpc_spi_set_freq(rpc, desc->mem->spi->max_speed_hz);
>> >> > + if (ret)
>> >> > + return ret;
>> >> > +
>> >> > + rpc_spi_mem_set_prep_op_cfg(desc->mem->spi,
>> >> > + &desc->info.op_tmpl, &offs, &len);
>> >> > +
>> >> > + regmap_update_bits(rpc->regmap, RPC_CMNCR, RPC_CMNCR_MD, 0);
>> >> > + regmap_write(rpc->regmap, RPC_DRCR, RPC_DRCR_RBURST(32) |
>> >> > + RPC_DRCR_RBE);
>> >> > +
>> >> > + regmap_write(rpc->regmap, RPC_DRCMR, rpc->cmd);
>> >> > + regmap_write(rpc->regmap, RPC_DREAR, RPC_DREAR_EAC(1));
>> >>
>> >> So you're not even trying to support flashes larger than the
>> read dirmap?
>> >> Now I don't think it's acceptable (and I have rewritten this code
>> internally).
>> >
>> > what about the size comes form mtd->size ?
>>
>> I'm not talking about size here; we should use the full address.
>> I'm attaching
>> my patch...
>
> okay,got it!
> what about just
> - regmap_write(rpc->mfd->regmap, RPC_DREAR, RPC_DREAR_EAC(1));
> + regmap_write(rpc->mfd->regmap, RPC_DREAR,
> + RPC_DREAR_EAV(offs >> 25) | RPC_DREAR_EAC(1));
>
> because only > 64MByte size make RPC_DREAR_EAV() work.

Seems OK now, after Boris' reply.

> thanks & best regards,
> Mason

[...]

MBR, Sergei

\
 
 \ /
  Last update: 2019-04-09 13:21    [W:0.078 / U:22.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site