linux-stable/arch/powerpc
Timur Tabi 6bd825f029 powerpc/85xx: use the BRx registers to enable indirect mode on the P1022DS
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.

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.

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.

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.

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.

Since the indirect pixis device tree node is no longer needed, the node is
deleted from the DTS.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-07-10 07:07:21 -05:00
..
boot powerpc/85xx: use the BRx registers to enable indirect mode on the P1022DS 2012-07-10 07:07:21 -05:00
configs powerpc: remove Wind River SBC8560 support 2012-07-10 07:07:21 -05:00
include/asm powerpc: IOMMU fault injection 2012-07-10 19:18:59 +10:00
kernel powerpc: IOMMU fault injection 2012-07-10 19:18:59 +10:00
kvm powerpc: Enforce usage of R0-R31 where possible 2012-07-10 19:18:30 +10:00
lib powerpc: Fixes for instructions not using correct register naming 2012-07-10 19:18:16 +10:00
math-emu powerpc/math_emu/efp: Look for errata handler when type mismatches 2011-10-06 23:36:47 -05:00
mm powerpc: Enforce usage of RA 0-R31 where possible 2012-07-10 19:18:35 +10:00
net powerpc: Start using ___PPC_RA/B/S/T where necessary 2012-07-10 19:18:25 +10:00
oprofile Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
perf powerpc/perf: Use perf_instruction_pointer in callchains 2012-07-10 19:18:46 +10:00
platforms powerpc/85xx: use the BRx registers to enable indirect mode on the P1022DS 2012-07-10 07:07:21 -05:00
sysdev powerpc/fsl/pci: Fix when quirk_fsl_pcie_header is freed up 2012-07-10 07:07:19 -05:00
xmon powerpc/xmon: Use cpumask iterator to avoid warning 2012-07-02 14:30:11 +10:00
Kconfig powerpc: Use the new generic strncpy_from_user() and strnlen_user() 2012-05-27 21:00:07 -07:00
Kconfig.debug powerpc: IOMMU fault injection 2012-07-10 19:18:59 +10:00
Makefile powerpc/crypto: Build files for the nx device driver 2012-05-16 15:05:45 +10:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00