From: Timur Tabi <timur@tabi.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] dm: gpio: Add driver for MPC85XX GPIO controller
Date: Tue, 10 May 2016 07:29:26 -0500 [thread overview]
Message-ID: <5731D426.1070806@tabi.org> (raw)
In-Reply-To: <CAN1kZoqmmGY1iceZr9u04Z1doJgkjU-cmt5zRHzK8+9cZZHz6Q@mail.gmail.com>
Mario Six wrote:
>
> The problem is that in 36-bit mode the physical addresses are 64-bit, which
> means that you get 64-bit integers when you read something from the
> device tree
> with fdtdec_get_addr. But the device tree addresses themselves seem to be
> 32-bit, because if I read a property like 'reg = <0xf000 0x100>', I get a
> 64-bit value that contains two 32-bit values, so I have to do 'addr = reg >>
> 32; size = reg & 0xFFFFFFFF;' to extract them (see the patch). Doing
> that poses
> a problem if you use the 32-bit mode, though, since then the physical
> addresses
> are 32-bit.
>
> After reading your comment (and a bit of digging), I found the
> fdtdec_get_addr_size_auto_noparent function, which seems to fix that problem
> (by taking the parent's address-size values into account). I'll respin the
> patches with that function and Simon's concerns addressed.
Addresses from the reg properties should be read with functions like
platform_get_resource(). You're not supposed to be reading the device
tree properties directly.
next prev parent reply other threads:[~2016-05-10 12:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 14:08 [U-Boot] [PATCH 0/3] dm: gpio: Add driver for MPC85xx GPIO controller Mario Six
2016-04-26 14:08 ` [U-Boot] [PATCH 1/3] dm: gpio: Add driver for MPC85XX " Mario Six
2016-05-01 17:46 ` Simon Glass
2016-05-02 11:43 ` Mario Six
2016-05-08 13:28 ` Timur Tabi
2016-05-10 7:15 ` Mario Six
2016-05-10 12:29 ` Timur Tabi [this message]
2016-05-10 7:50 ` [U-Boot] [PATCH v2 0/3] dm: gpio: Add driver for MPC85xx " Mario Six
2016-05-10 7:51 ` [U-Boot] [PATCH v2 1/3] dm: gpio: Add driver for MPC85XX " Mario Six
2016-05-10 12:30 ` Timur Tabi
2016-05-10 13:07 ` Mario Six
2016-05-10 13:26 ` Timur Tabi
2016-05-10 13:43 ` Mario Six
2016-05-10 7:51 ` [U-Boot] [PATCH v2 2/3] dm: gpio: Add methods for open drain setting Mario Six
2016-05-19 3:59 ` Simon Glass
2016-05-10 7:51 ` [U-Boot] [PATCH v2 3/3] dm: gpio: Implement open drain for MPC85XX GPIO Mario Six
2016-05-19 3:59 ` Simon Glass
2016-05-19 6:16 ` Mario Six
2016-04-26 14:08 ` [U-Boot] [PATCH 2/3] dm: gpio: Add methods for open drain setting Mario Six
2016-05-01 18:54 ` Simon Glass
2016-04-26 14:08 ` [U-Boot] [PATCH 3/3] dm: gpio: Implement open drain for MPC85XX GPIO Mario Six
2016-05-01 18:54 ` Simon Glass
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=5731D426.1070806@tabi.org \
--to=timur@tabi.org \
--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.