Devicetree
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
Cc: Srinivas Kandagatla
	<srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Subject: Re: [PATCH 1/2] nvmem: sunxi-sid: add support for H3 and A64's SID controller
Date: Fri, 27 Jan 2017 10:41:33 +0100	[thread overview]
Message-ID: <20170127094133.ewuf5uo6lb3vhf6k@lukather> (raw)
In-Reply-To: <20170127122705.R0b4EAKp-/icbEWb855g0PDqKvflMoHmW9unr2Ajn@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

On Fri, Jan 27, 2017 at 05:26:59PM +0800, Icenowy Zheng wrote:
> > > +Example for sun8i-h3: 
> > > + sid@01c14000 { 
> > > + compatible = "allwinner,sun8i-h3-sid"; 
> > > + /* 
> > > + * The length of SID on H3 is 0x100 bytes, add the value offset 
> > > + * 0x200, so the total length should be 0x300. 
> > > + */ 
> > > + reg = <0x01c14000 0x300>; 
> >
> > No, it should be the size of the memory region used and documented for 
> > that device, ie 1kB (0x400) in the H3 case, just like any other reg 
> > property. 
> 
> So bind the SID size with compatible?

If needed, yes.

> > > - randomness = kzalloc(sizeof(u8) * (size), GFP_KERNEL); 
> > > + randomness_size = max(size, SUNXI_SID_MAX_RANDOMNESS_SIZE); 
> > > + randomness = kzalloc(sizeof(u8) * (randomness_size), GFP_KERNEL); 
> >
> > Why is that change needed? 
> 
> On my H3/H2+ only 2 words after the first 4 words is not zero.
> 
> I don't feel like add so many 0s to randomness.

As far as I know, filling the entropy pool with zeros does no harm, it
just doesn't do anything either.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  parent reply	other threads:[~2017-01-27  9:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27  9:26 [PATCH 1/2] nvmem: sunxi-sid: add support for H3 and A64's SID controller Icenowy Zheng
     [not found] ` <20170127122705.R0b4EAKp-/icbEWb855g0PDqKvflMoHmW9unr2Ajn@public.gmane.org>
2017-01-27  9:41   ` Maxime Ripard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-26 11:33 Icenowy Zheng
     [not found] ` <20170126113345.33686-1-icenowy-ymACFijhrKM@public.gmane.org>
2017-01-27  8:17   ` Maxime Ripard

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=20170127094133.ewuf5uo6lb3vhf6k@lukather \
    --to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=icenowy-ymACFijhrKM@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox