All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 2/3] drivers: reset: Add a managed API to get reset controllers from the DT
Date: Mon, 4 Nov 2019 16:17:36 +0100	[thread overview]
Message-ID: <95004f08-a9df-a85b-c500-0d0660a0b7f7@ti.com> (raw)
In-Reply-To: <CAPnjgZ2pwRH9djd63rNs9uAt3vNFq8D-FPuiMUoNBbagDOq1bw@mail.gmail.com>


On 30/10/2019 02:48, Simon Glass wrote:
> On Mon, 30 Sep 2019 at 10:15, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
>> Add managed functions to get a reset_ctl from the device-tree, based on a
>> name or an index.
>> Also add a managed functions to get a reset_ctl_bulk (array of reset_ctl)
>> from the device-tree.
>>
>> When the device is unbound, the reset controllers are automatically
>> released and the data structure is freed.
>>
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
>> ---
>>
>>   drivers/reset/reset-uclass.c | 116 +++++++++++++++++++++++++++++-
>>   include/reset.h              | 135 ++++++++++++++++++++++++++++++++++-
>>   2 files changed, 247 insertions(+), 4 deletions(-)
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> I really don't like these ERR_PTR returns. I suppose they make the
> code easier to port, and we can be sure that pointers will not be in
> the last 4KB of address space?

It seems rather unlikely because the returned pointer points to actual 
RAM allocated from the heap. On most platforms I've worked with, the top 
of the address space is not dedicated to memory. If ever the need to fix 
this  arises it could done by tweaking the macros to use another unused 
address space.

JJ

>
> Regards,
> Simon
>

  reply	other threads:[~2019-11-04 15:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 14:24 [U-Boot] [PATCH v1 0/3] reset: Add a managed API Jean-Jacques Hiblot
2019-09-30 14:24 ` [U-Boot] [PATCH v1 1/3] drivers: reset: Handle gracefully NULL pointers Jean-Jacques Hiblot
2019-10-30  1:48   ` Simon Glass
2020-05-27 17:12     ` Pratyush Yadav
2020-05-31 14:08       ` Simon Glass
2019-09-30 14:24 ` [U-Boot] [PATCH v1 2/3] drivers: reset: Add a managed API to get reset controllers from the DT Jean-Jacques Hiblot
2019-10-30  1:48   ` Simon Glass
2019-11-04 15:17     ` Jean-Jacques Hiblot [this message]
2019-11-05 16:33       ` Simon Glass
2019-11-05 16:42         ` Simon Goldschmidt
2019-11-05 17:27           ` Jean-Jacques Hiblot
2019-09-30 14:24 ` [U-Boot] [PATCH v1 3/3] test: reset: Add tests for the managed API Jean-Jacques Hiblot

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=95004f08-a9df-a85b-c500-0d0660a0b7f7@ti.com \
    --to=jjhiblot@ti.com \
    --cc=u-boot@lists.denx.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.