drm: fixup PCI DMA support

This patch makes the PCI support use the correct Linux interfaces finally.
Tested in DRM CVS on PCI MGA card.

Signed-off-by: Dave Airlie <airlied@linux.ie>
drm: update r300 register names

Update some of the DRM register names from DRM CVS

Signed-off-by: Dave Airlie <airlied@linux.ie>
drm: rework radeon memory map (radeon 1.23)

This code reworks the radeon memory map so it works better
for newer r300 chips and for a lot of older PCI chips.

It really requires a new X driver in order to take advantage of this code.

From: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drm: Add general-purpose packet for manipulating scratch registers (r300)

From: Aapo Tahkola (via DRM CVS)
Signed-off-by: Dave Airlie <airlied@linux.ie>
drm: rationalise some pci ids

This is the start of some work from Roland Scheidegger to align
the X DDX pci ids and the drm ones, however we don't want to put
r300 ids in the kernel just yet, they destabilise a few machines.

From: Roland Scheidegger (via DRM CVS)
Signed-off-by: Dave Airlie <airlied@linux.ie>
drm: fixup improper cast.

Signed-off-by: Dave Airlie <airlied@linux.ie>
drm:  remove pointless checks in radeon_state

If these were valid checks, we'd have already oopsed several
lines above where we were already dereferencing them.

DA: these used to be valid but other changes made them unnecessary.

Coverity: 776,777,778
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drm: fixup i915 breadcrumb read/write

Some minor issues in the i915 breadcrumb code.

Signed-off-by: Dave Airlie <airlied@linux.ie>
drm: read breadcrumb in IRQ handler

From: Keith Whitwell <keithw@tungstengraphics.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
[PATCH] libata: kill E.D.D.

E.D.D. has no user in-tree and mostly useless.  Kill it.  For possible
out-of-tree users, add a nice warning message and error handling if
LLDD doesn't report any useable reset mechanism (and thus tries to use
E.D.D.).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
[PATCH] libata: cosmetic changes in ata_bus_softreset()

ata_bus_softreset() should return AC_ERR_* on failure not arbitrary
positive number.  While at it, reformat comment above it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
[PATCH] libata: add FIXME above ata_dev_xfermask()

Add FIXME above ata_dev_xfermask noting that the current
implementation limits all transfer modes to the fastest of the slowest
device on a port which isn't necessary.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drm: add new radeon PCI ids..

This adds all the r300 and r400 PCI ids from DRM CVS, it also
makes these cards only initialise when the new xorg driver is
used, as otherwise the DRM can cause lockups.

Signed-off-by: Dave Airlie <airlied@linux.ie>
[PATCH] powerpc: work around sparse warnings in cputable.h

Christoph noticed that sparse warned about all the enum tags in cuptable.h
that had values that required them to be type log. (enum tags are ints
according to the standard.)

This patch attempts to fix them in the least intrusive way possible by
turning them all into #defines except for the 32 bit CPU_FTRS_POSSIBLE and
CPU_FTRS_ALWAYS which are hard to construct that way.  This works because
these last two contain no bits above 2^31.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] powerpc: fix various sparse warnings

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] powerpc: Make BUG_ON & WARN_ON play nice with compile-time optimisations

Change BUG_ON and WARN_ON to give the compiler a chance to perform
compile-time optimsations. Depending on the complexity of the condition,
the compiler may not do this very well, so if it's important check the
object code.

Current GCC's (4.x) produce good code as long as the condition does not
include a function call, including a static inline.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] powerpc: Change firmware_has_feature() to a macro

So that we can use firmware_has_feature() in a BUG_ON() and have the compiler
elide the code entirely if the feature can never be set, change
firmware_has_feature to a macro. Unfortunate, but necessary at least until
GCC bug #26724 is fixed.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] powerpc: fix cell iommu setup

A small bug crept in the iommu driver when we made it more
generic. This patch is needed for boards that have a dma
window that does not start at bus address zero.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] powerpc: update cell defconfig

The default configuration in mainline got a little out of
sync with what we use internally.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[PATCH] powerpc: cell interrupt controller updates

The current interrupt controller setup on Cell is done
in a rather ad-hoc way with device tree properties
that are not standardized at all.

In an attempt to do something that follows the OF standard
(or at least the IBM extensions to it) more closely,
we have now come up with this patch. It still provides
a fallback to the old behaviour when we find older firmware,
that hack can not be removed until the existing customer
installations have upgraded.

Cc: hpenner@de.ibm.com
Cc: stk@de.ibm.com
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Milton Miller <miltonm@bga.com>
Cc: benh@kernel.crashing.org
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>