From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: "Behme Dirk (CM/ESO2)" <dirk.behme@de.bosch.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Philipp Zabel <p.zabel@pengutronix.de>,
Mason Yang <masonccyang@mxic.com.tw>,
linux-spi@vger.kernel.org,
Chris Brandt <chris.brandt@renesas.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH RFC 2/2] memory: add Renesas RPC-IF driver
Date: Sat, 22 Feb 2020 23:42:26 +0300 [thread overview]
Message-ID: <5603f393-554d-e2a8-c2d8-6bafc20f4169@cogentembedded.com> (raw)
In-Reply-To: <5760bcdb-e44b-6f18-7262-9526684e5780@de.bosch.com>
On 02/10/2020 01:21 PM, Behme Dirk (CM/ESO2) wrote:
>> Add the memory driver for Renesas RPC-IF which registers either SPI or
>> HyperFLash device depending on the contents of the device tree subnode.
>> It also provides the absract "back end" device APIs that can be used by
>> the "front end" SPI/MTD drivers to talk to the real hardware.
>>
>> Based on the original patch by Mason Yang <masonccyang@mxic.com.tw>.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
>
> FYI, please find below [1] the changes I did locally on this driver. It seems to read & write successfully on my custom M3 (R8A7796) device, now.
Not for me...
BTW, your patch had whitespace ruined, I had to apply it by hand, you'd better
attach the patches, not paste. :-/
> Best regards
>
> Dirk
>
> [1]
>
> From d72b805cc461ab1e9747c973e9be84e7abb8f828 Mon Sep 17 00:00:00 2001
> From: Dirk Behme <dirk.behme@de.bosch.com>
> Date: Tue, 4 Feb 2020 08:39:31 +0100
> Subject: [PATCH] memory: renesas-rpc-if: Correct the STRTIM and some other
> clean up
>
> This is required to make the driver work correctly in my M3 environment.
>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
> ---
> drivers/memory/renesas-rpc-if.c | 42 ++++++++++++++++++++-------------
> 1 file changed, 25 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
> index 04be92b64bfa..f4356b066384 100644
> --- a/drivers/memory/renesas-rpc-if.c
> +++ b/drivers/memory/renesas-rpc-if.c
[...]
> @@ -513,19 +525,15 @@ ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf)
> pm_runtime_get_sync(rpc->dev);
>
> regmap_update_bits(rpc->regmap, RPCIF_CMNCR, RPCIF_CMNCR_MD, 0);
> - regmap_write(rpc->regmap, RPCIF_DRCR,
> - RPCIF_DRCR_RBURST(32) | RPCIF_DRCR_RBE);
> - regmap_write(rpc->regmap, RPCIF_DRCMR, rpc->command);
> - regmap_write(rpc->regmap, RPCIF_DREAR,
> - RPCIF_DREAR_EAV(offs >> 25) | RPCIF_DREAR_EAC(1));
> - regmap_write(rpc->regmap, RPCIF_DROPR, rpc->option);
> - regmap_write(rpc->regmap, RPCIF_DRENR,
> - rpc->enable & ~RPCIF_SMENR_SPIDE(0xF));
> - regmap_write(rpc->regmap, RPCIF_DRDMCR, rpc->dummy);
> - regmap_write(rpc->regmap, RPCIF_DRDRENR, rpc->ddr);
The driver somehow works only with this left in place (with 2 bytes eaten
as before), otherwise all the flash reads all 0xff (via dirmap).
> + ret = wait_msg_xfer_end(rpc);
> + if (ret) {
> + len = 0;
> + goto err_out;
> + }
>
> memcpy_fromio(buf, rpc->dirmap + from, len);
>
> +err_out:
> pm_runtime_put(rpc->dev);
>
> return len;
MBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: "Behme Dirk (CM/ESO2)"
<dirk.behme-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Mason Yang <masonccyang-I/i+R0kf0WFNUHwG+Fw1Kw@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Chris Brandt
<chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH RFC 2/2] memory: add Renesas RPC-IF driver
Date: Sat, 22 Feb 2020 23:42:26 +0300 [thread overview]
Message-ID: <5603f393-554d-e2a8-c2d8-6bafc20f4169@cogentembedded.com> (raw)
In-Reply-To: <5760bcdb-e44b-6f18-7262-9526684e5780-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
On 02/10/2020 01:21 PM, Behme Dirk (CM/ESO2) wrote:
>> Add the memory driver for Renesas RPC-IF which registers either SPI or
>> HyperFLash device depending on the contents of the device tree subnode.
>> It also provides the absract "back end" device APIs that can be used by
>> the "front end" SPI/MTD drivers to talk to the real hardware.
>>
>> Based on the original patch by Mason Yang <masonccyang-I/i+R0kf0WFNUHwG+Fw1Kw@public.gmane.org>.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
>
>
> FYI, please find below [1] the changes I did locally on this driver. It seems to read & write successfully on my custom M3 (R8A7796) device, now.
Not for me...
BTW, your patch had whitespace ruined, I had to apply it by hand, you'd better
attach the patches, not paste. :-/
> Best regards
>
> Dirk
>
> [1]
>
> From d72b805cc461ab1e9747c973e9be84e7abb8f828 Mon Sep 17 00:00:00 2001
> From: Dirk Behme <dirk.behme-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
> Date: Tue, 4 Feb 2020 08:39:31 +0100
> Subject: [PATCH] memory: renesas-rpc-if: Correct the STRTIM and some other
> clean up
>
> This is required to make the driver work correctly in my M3 environment.
>
> Signed-off-by: Dirk Behme <dirk.behme-V5te9oGctAVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/memory/renesas-rpc-if.c | 42 ++++++++++++++++++++-------------
> 1 file changed, 25 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
> index 04be92b64bfa..f4356b066384 100644
> --- a/drivers/memory/renesas-rpc-if.c
> +++ b/drivers/memory/renesas-rpc-if.c
[...]
> @@ -513,19 +525,15 @@ ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf)
> pm_runtime_get_sync(rpc->dev);
>
> regmap_update_bits(rpc->regmap, RPCIF_CMNCR, RPCIF_CMNCR_MD, 0);
> - regmap_write(rpc->regmap, RPCIF_DRCR,
> - RPCIF_DRCR_RBURST(32) | RPCIF_DRCR_RBE);
> - regmap_write(rpc->regmap, RPCIF_DRCMR, rpc->command);
> - regmap_write(rpc->regmap, RPCIF_DREAR,
> - RPCIF_DREAR_EAV(offs >> 25) | RPCIF_DREAR_EAC(1));
> - regmap_write(rpc->regmap, RPCIF_DROPR, rpc->option);
> - regmap_write(rpc->regmap, RPCIF_DRENR,
> - rpc->enable & ~RPCIF_SMENR_SPIDE(0xF));
> - regmap_write(rpc->regmap, RPCIF_DRDMCR, rpc->dummy);
> - regmap_write(rpc->regmap, RPCIF_DRDRENR, rpc->ddr);
The driver somehow works only with this left in place (with 2 bytes eaten
as before), otherwise all the flash reads all 0xff (via dirmap).
> + ret = wait_msg_xfer_end(rpc);
> + if (ret) {
> + len = 0;
> + goto err_out;
> + }
>
> memcpy_fromio(buf, rpc->dirmap + from, len);
>
> +err_out:
> pm_runtime_put(rpc->dev);
>
> return len;
MBR, Sergei
next prev parent reply other threads:[~2020-02-22 20:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 19:34 [PATCH RFC 0/2] Add Renesas RPC-IF support Sergei Shtylyov
2019-12-10 19:37 ` [PATCH RFC 1/2] dt-bindings: memory: document Renesas RPC-IF bindings Sergei Shtylyov
2019-12-19 20:38 ` Rob Herring
2019-12-10 19:39 ` [PATCH RFC 2/2] memory: add Renesas RPC-IF driver Sergei Shtylyov
2019-12-11 9:58 ` Philipp Zabel
2020-02-10 10:21 ` Behme Dirk (CM/ESO2)
2020-02-22 20:42 ` Sergei Shtylyov [this message]
2020-02-22 20:42 ` Sergei Shtylyov
2020-02-24 5:46 ` Behme Dirk (CM/ESO2)
2020-02-24 5:46 ` Behme Dirk (CM/ESO2)
2020-02-24 17:28 ` Chris Brandt
2020-02-24 17:28 ` Chris Brandt
2020-02-24 18:59 ` Sergei Shtylyov
2020-02-25 9:33 ` Behme Dirk (CM/ESO2)
2020-02-25 20:41 ` Sergei Shtylyov
2020-02-25 20:41 ` Sergei Shtylyov
2020-02-26 9:54 ` Behme Dirk (CM/ESO2)
2020-02-26 9:54 ` Behme Dirk (CM/ESO2)
2020-02-27 20:32 ` Sergei Shtylyov
2019-12-11 14:33 ` [PATCH RFC 0/2] Add Renesas RPC-IF support Chris Brandt
2019-12-11 16:08 ` Sergei Shtylyov
2019-12-11 16:20 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5603f393-554d-e2a8-c2d8-6bafc20f4169@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=chris.brandt@renesas.com \
--cc=devicetree@vger.kernel.org \
--cc=dirk.behme@de.bosch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=masonccyang@mxic.com.tw \
--cc=p.zabel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.