All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.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: Tue, 5 Nov 2019 17:42:13 +0100	[thread overview]
Message-ID: <02834d03-dbe5-8b92-8ff4-b1b0b9cd5c4c@gmail.com> (raw)
In-Reply-To: <CAPnjgZ1L86K6V3THWkZ2TwzgGmUzZbCCTkwGOjpT6JKa2hBN6g@mail.gmail.com>

Am 05.11.2019 um 17:33 schrieb Simon Glass:
> Hi Jean-Jacques,
> 
> On Mon, 4 Nov 2019 at 08:41, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
>>
>>
>> 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.

Most != all: on socfpga, the internal SRAM is at the end of the address 
spcae. In SPL, this means the last 4K cannot be used.

However, that shouldn't keep us from porting ERR_PTR returns from Linux 
code.

> 
> Yes that's my comfort.
> 
>> If ever the need to fix
>> this  arises it could done by tweaking the macros to use another unused
>> address space.
> 
> Not easily without doing something platform-specific, as someone else
> is currently pushing.

That "someone else" would be me. Sadly, I did not get any response:

https://patchwork.ozlabs.org/project/uboot/list/?series=137880


Regards,
Simon

  reply	other threads:[~2019-11-05 16:42 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
2019-11-05 16:33       ` Simon Glass
2019-11-05 16:42         ` Simon Goldschmidt [this message]
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=02834d03-dbe5-8b92-8ff4-b1b0b9cd5c4c@gmail.com \
    --to=simon.k.r.goldschmidt@gmail.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.