diff mbox series

[1/1] nvmem: sunxi_sid: fix A64 SID controller support

Message ID 20190731071447.9019-2-stefan@olimex.com (mailing list archive)
State Mainlined
Commit 2ac00e34acfc93af19376f83bb31db1aea1f006a
Headers show
Series nvmem: sunxi_sid: fix A64 SID controller support | expand

Commit Message

Stefan Mavrodiev July 31, 2019, 7:14 a.m. UTC
Like in H3, A64 SID controller doesn't return correct data
when using direct access. It appears that on A64, SID needs
8 bytes of word_size.

Workaround is to enable read by registers.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
---
 drivers/nvmem/sunxi_sid.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Chen-Yu Tsai July 31, 2019, 8:43 a.m. UTC | #1
On Wed, Jul 31, 2019 at 3:15 PM Stefan Mavrodiev <stefan@olimex.com> wrote:
>
> Like in H3, A64 SID controller doesn't return correct data
> when using direct access. It appears that on A64, SID needs
> 8 bytes of word_size.
>
> Workaround is to enable read by registers.
>
> Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

And for single patches, you don't need to write a separate cover letter.
Just put whatever you need to add after the "---" separator.

> ---
>  drivers/nvmem/sunxi_sid.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
> index a079a80ddf2c..e26ef1bbf198 100644
> --- a/drivers/nvmem/sunxi_sid.c
> +++ b/drivers/nvmem/sunxi_sid.c
> @@ -186,6 +186,7 @@ static const struct sunxi_sid_cfg sun8i_h3_cfg = {
>  static const struct sunxi_sid_cfg sun50i_a64_cfg = {
>         .value_offset = 0x200,
>         .size = 0x100,
> +       .need_register_readout = true,
>  };
>
>  static const struct sunxi_sid_cfg sun50i_h6_cfg = {
> --
> 2.17.1
>
Vasily Khoruzhick Aug. 1, 2019, 1:42 a.m. UTC | #2
On Wed, Jul 31, 2019 at 1:43 AM Chen-Yu Tsai <wens@csie.org> wrote:
>
> On Wed, Jul 31, 2019 at 3:15 PM Stefan Mavrodiev <stefan@olimex.com> wrote:
> >
> > Like in H3, A64 SID controller doesn't return correct data
> > when using direct access. It appears that on A64, SID needs
> > 8 bytes of word_size.
> >
> > Workaround is to enable read by registers.

I came up with identical patch while adding A64 support into
sun8i-thermal driver, so:

> >
> > Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
>
> Acked-by: Chen-Yu Tsai <wens@csie.org>

Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>

>
> And for single patches, you don't need to write a separate cover letter.
> Just put whatever you need to add after the "---" separator.
>
> > ---
> >  drivers/nvmem/sunxi_sid.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
> > index a079a80ddf2c..e26ef1bbf198 100644
> > --- a/drivers/nvmem/sunxi_sid.c
> > +++ b/drivers/nvmem/sunxi_sid.c
> > @@ -186,6 +186,7 @@ static const struct sunxi_sid_cfg sun8i_h3_cfg = {
> >  static const struct sunxi_sid_cfg sun50i_a64_cfg = {
> >         .value_offset = 0x200,
> >         .size = 0x100,
> > +       .need_register_readout = true,
> >  };
> >
> >  static const struct sunxi_sid_cfg sun50i_h6_cfg = {
> > --
> > 2.17.1
> >
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/CAGb2v64tzMypnB5Ho2A-gWPk2yYsmH9tNn%2BOKfb51c%2Bd6pK%3Dkw%40mail.gmail.com.
Srinivas Kandagatla Aug. 6, 2019, 10:03 a.m. UTC | #3
On 31/07/2019 08:14, Stefan Mavrodiev wrote:
> Like in H3, A64 SID controller doesn't return correct data
> when using direct access. It appears that on A64, SID needs
> 8 bytes of word_size.
> 
> Workaround is to enable read by registers.
> 
> Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>

Applied Thanks,
srini
diff mbox series

Patch

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index a079a80ddf2c..e26ef1bbf198 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -186,6 +186,7 @@  static const struct sunxi_sid_cfg sun8i_h3_cfg = {
 static const struct sunxi_sid_cfg sun50i_a64_cfg = {
 	.value_offset = 0x200,
 	.size = 0x100,
+	.need_register_readout = true,
 };
 
 static const struct sunxi_sid_cfg sun50i_h6_cfg = {