From: Kumar Gala <galak@kernel.crashing.org>
To: Timur Tabi <timur@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc/85xx: use the BRx registers to enable indirect mode on the P1022DS
Date: Fri, 6 Jul 2012 13:09:54 -0500 [thread overview]
Message-ID: <B246E129-76B2-483B-83A7-C6D218C84E2D@kernel.crashing.org> (raw)
In-Reply-To: <1341500908-22384-1-git-send-email-timur@freescale.com>
On Jul 5, 2012, at 10:08 AM, Timur Tabi wrote:
> In order to enable the DIU video controller on the P1022DS, the FPGA =
needs
> to be switched to "indirect mode", where the localbus is disabled and
> the FPGA is accessed via writes to localbus chip select signals CS0 =
and CS1.
>=20
> To obtain the address of CS0 and CS1, the platform driver uses an =
"indirect
> pixis mode" device tree node. This node assumes that the localbus =
'ranges'
> property is sorted in chip-select order. That is, reg value 0 maps to
> CS0, reg value 1 maps to CS1, etc. This is how the 'ranges' property =
is
> supposed to be arranged.
>=20
> Unfortunately, the 'ranges' property is often mis-arranged, and not =
just on
> the P1022DS. Linux normally does not care, since it does not program =
the
> localbus. But the indirect-mode code on the P1022DS does care.
>=20
> The "proper" fix is to have U-Boot fix the 'ranges' property, but this =
would
> be too cumbersome. The names and 'reg' properties of all the localbus
> devices would also need to be updated, and determining which localbus =
device
> maps to which chip select is board-specific.
>=20
> Instead, we determine the CS0/CS1 base addresses the same way that =
U-boot
> does -- by reading the BRx registers directly and mapping them to =
physical
> addresses. This code is simpler and more reliable, and it does not =
require
> a U-boot or device tree change.
>=20
> Since the indirect pixis device tree node is no longer needed, the =
node is
> deleted from the DTS.
>=20
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/boot/dts/p1022ds.dtsi | 16 -----
> arch/powerpc/platforms/85xx/p1022_ds.c | 106 =
++++++++++++++++++++++++++++----
> 2 files changed, 93 insertions(+), 29 deletions(-)
applied to next
- k=
prev parent reply other threads:[~2012-07-06 18:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 15:08 [PATCH] powerpc/85xx: use the BRx registers to enable indirect mode on the P1022DS Timur Tabi
2012-07-06 18:09 ` Kumar Gala [this message]
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=B246E129-76B2-483B-83A7-C6D218C84E2D@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=timur@freescale.com \
/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