Commit graph

4998 commits

Author SHA1 Message Date
Dmitry Eremin-Solenikov 96a9fcaf5d [ARM] pxa/csb726: register ac97 controller
Add a call to pxa_set_ac97_info() to enable the audio support.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:41:23 +08:00
Dmitry Eremin-Solenikov b860171500 [ARM] pxa/csb726: switch to use smsc911x driver
csb726 used obsolete and not working out-of-tree driver smc911x.
Switch it to use new smsc911x driver.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:41:17 +08:00
Philipp Zabel dd045445f8 [ARM] pxa: magician_defconfig enable hx4700, asic3 and w100fb
I'm not going to maintain separate defconfigs for magician and hx4700.
This should probably be renamed to htcpxa_defconfig.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:40:43 +08:00
Philipp Zabel d3ca1952e6 [ARM] pxa: add basic support for HP iPAQ hx4700 PDAs
This includes
- IrDA (pxafixp_ir),
- Buttons (gpio-keys),
- ASIC3 IRQ/GPIOs (asic3),
- EGPIOs (htc-egpio),
- ATI Imageon w3220 framebuffer (w100fb),
- Backlight (pwm-backlight),
- StrataFlash (physmap),
- Battery monitor (ds1wm,w1_ds2760,ds2760_battery)
- USB gadget support (pxa27x_udc,gpio_vbus).
- bq24022 battery charger (pda_power,bq24022)
- TSC2046 touchscreen (ads7846)

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:40:31 +08:00
Philipp Zabel 2f1a5bf707 [ARM] pxa/magician: use ARRAY_AND_SIZE for platform_add_devices
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:39:39 +08:00
Philipp Zabel f8f9d5ecff [ARM] pxa/magician: use I2C fast mode
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:39:16 +08:00
Robert Jarzmik 3dbeef231e [ARM] pxa: add vcc_core regulation for cpufreq on pxa2xx
Add voltage regulation capability to pxa2xx cpufreq
driver. The cpufreq will ask for a "vcc_core" regulator to
the regulator framework.

If a regulator is found at probe time, it will be used with
values specified in PXA270 Electrical, Mechanical, and
Thermal Specifications.

If not, it will be assumed for now that frequency change
will work without voltage control. This assumes that the
IPL/SPL installs sane values to an existing voltage
regulator (ie. voltage high enough to support the full
range).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:33:07 +08:00
Jürgen Schindele dd5b94aba7 [ARM] pxa: add additional mfp definitions for pxa320
Signed-off-by: Jürgen Schindele <linux@schindele.name>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-06-05 10:32:55 +08:00
Mike Rapoport d082d36ea8 [ARM] pxa: add ability to set suspend mode
PXA processors have several low-power modes. Currently kernel supports
only one of these modes for PM_SUSPEND_MEM.

This patch adds ability to set desired suspend mode for PXA27x based
machines.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Reviewed-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:48 +08:00
Robert Jarzmik 94c35a6b51 [ARM] pxa: add udc support for pxa3xx
As reported by Aric Blumer, the pxa27x_udc driver does work
with pxa3xx devices. Add support into device files.

Reported-by: Aric Blumer <aric@sdgsystems.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Matt Reimer <mattjreimer@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:34 +08:00
Philipp Zabel a01bd58449 [ARM] pxa: allow IRQ_BOARD_END to be customized and make zylonite to use it
The default value is 16 IRQs. Zylonite needs 32, ASIC3 based boards need 70.

My problem is still that due to the way IRQ_GPIO is hardcoded, ASIC3 based boards
need 70 IRQs starting at IRQ_BOARD_START. If I define ASIC3 IRQs similar to LoCoMo
or SA1111, things break as soon as something selects PXA_HAVE_BOARD_IRQS.
Increasing the default number of board IRQs to 70 instead doesn't seem very nice.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:20 +08:00
Mike Rapoport 46580c0306 [ARM] pxa: update pxa2xx_spi_chip initialization to use .gpio_cs field
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:06 +08:00
Eric Miao a27ba768a1 [ARM] pxa: add PWM devices support for pxa168/910
Signed-off-by: Mingwei Wang <mingwei.wang@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:06 +08:00
Eric Miao 2a55b910e0 [ARM] pxa: add missing IRQ_PXA910_NONE to irqs.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:05 +08:00
Eric Miao 3852ac7113 [ARM] pxa: move pwm.c to common plat-pxa directory
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:04 +08:00
Eric Miao a71ef16327 [ARM] pxa: build pwm.c according to HAVE_PWM instead of PXA_PWM
The PXA_PWM config option is really redundant since the introduction
of HAVE_PWM, replace that with HAVE_PWM to avoid confusion.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:04 +08:00
Eric Miao a757ad8b39 [ARM] pxa: allow PWM ID base number to be specified in pwm_id_table
PWMs on PXA168/910 start at number 1 instead of 0, (i.e. PWM1/2/3/4 instead
of PWM0/1/2/3 on PXA25x/PXA27x/PXA3xx). Allow this number to be specified
in pwm_id_table.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:03 +08:00
Eric Miao 3d2a98cd5e [ARM] pxa: simplify secondary PWM handling and use platform_device_id table
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:02 +08:00
Eric Miao 1a77920e4c [ARM] pxa: add I2C (TWSI) devices to pxa168/pxa910
Signed-off-by: Paul Shen <paul.shen@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:02 +08:00
Eric Miao f0a8370139 [ARM] pxa: move mach/i2c.h to plat/i2c.h
Signed-off-by: Paul Shen <paul.shen@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:32:01 +08:00
Eric Miao f23d491131 [ARM] pxa: add platform device ID table to pxa i2c driver
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:21:42 +08:00
Linus Torvalds 78b170f45b Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] update mach-types
  [ARM] Add cmpxchg support for ARMv6+ systems (v5)
  [ARM] barriers: improve xchg, bitops and atomic SMP barriers
  Gemini: Fix SRAM/ROM location after memory swap
  MAINTAINER: Add F: entries for Gemini and FA526
  [ARM] disable NX support for OABI-supporting kernels
  [ARM] add coherent DMA mask for mv643xx_eth
  [ARM] pxa/palm: fix PalmLD/T5/TX AC97 MFP
  [ARM] pxa: add parameter to clksrc_read() for pxa168/910
  [ARM] pxa: fix the incorrectly defined drive strength macros for pxa{168,910}
  [ARM] Orion: Remove explicit name for platform device resources
  [ARM] Kirkwood: Correct MPP for SATA activity/presence LEDs of QNAP TS-119/TS-219.
  [ARM] pxa/ezx: fix pin configuration for low power mode
  [ARM] pxa/spitz: provide spitz_ohci_exit() that unregisters USB_HOST GPIO
  [ARM] pxa: enable GPIO receivers after configuring pins
  [ARM] pxa: allow gpio_reset drive high during normal work
  [ARM] pxa: save/restore PGSR on suspend/resume.
2009-05-29 16:07:39 -07:00
Oskar Schirmer c3dc5bec05 flat: fix data sections alignment
The flat loader uses an architecture's flat_stack_align() to align the
stack but assumes word-alignment is enough for the data sections.

However, on the Xtensa S6000 we have registers up to 128bit width
which can be used from userspace and therefor need userspace stack and
data-section alignment of at least this size.

This patch drops flat_stack_align() and uses the same alignment that
is required for slab caches, ARCH_SLAB_MINALIGN, or wordsize if it's
not defined by the architecture.

It also fixes m32r which was obviously kaput, aligning an
uninitialized stack entry instead of the stack pointer.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Oskar Schirmer <os@emlix.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Johannes Weiner <jw@emlix.com>
Acked-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-29 08:40:02 -07:00
Russell King a35197a8be Merge branch 'for-rmk' of git://gitorious.org/linux-gemini/mainline 2009-05-29 10:19:22 +01:00
Russell King 6daad5c6c5 [ARM] update mach-types
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-29 10:15:08 +01:00
Mathieu Desnoyers ecd322c9b3 [ARM] Add cmpxchg support for ARMv6+ systems (v5)
Add cmpxchg/cmpxchg64 support for ARMv6K and ARMv7 systems
(original patch from Catalin Marinas <catalin.marinas@arm.com>)

The cmpxchg and cmpxchg64 functions can be implemented using the
LDREX*/STREX* instructions. Since operand lengths other than 32bit are
required, the full implementations are only available if the ARMv6K
extensions are present (for the LDREXB, LDREXH and LDREXD instructions).

For ARMv6, only 32-bits cmpxchg is available.

Mathieu :

Make cmpxchg_local always available with best implementation for all type sizes (1, 2, 4 bytes).
Make cmpxchg64_local always available.

Use "Ir" constraint for "old" operand, like atomic.h atomic_cmpxchg does.

Change since v3 :
- Add "memory" clobbers (thanks to Nicolas Pitre)
- removed __asmeq(), only needed for old compilers, very unlikely on ARMv6+.

Note : ARMv7-M should eventually be ifdefed-out of cmpxchg64. But it's not
supported by the Linux kernel currently.

Put back arm < v6 cmpxchg support.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Catalin Marinas <catalin.marinas@arm.com>
CC: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-28 21:10:31 +01:00
Russell King bac4e960b5 [ARM] barriers: improve xchg, bitops and atomic SMP barriers
Mathieu Desnoyers pointed out that the ARM barriers were lacking:

- cmpxchg, xchg and atomic add return need memory barriers on
  architectures which can reorder the relative order in which memory
  read/writes can be seen between CPUs, which seems to include recent
  ARM architectures. Those barriers are currently missing on ARM.

- test_and_xxx_bit were missing SMP barriers.

So put these barriers in.  Provide separate atomic_add/atomic_sub
operations which do not require barriers.

Reported-Reviewed-and-Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-28 19:39:27 +01:00
Paulius Zaleckas 67a433ce27 Gemini: Fix SRAM/ROM location after memory swap
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
2009-05-28 16:42:25 +03:00
Russell King 290815710b Merge branch 'for-rmk' of git://git.marvell.com/orion 2009-05-23 17:24:51 +01:00
Russell King 14f0aa3593 [ARM] disable NX support for OABI-supporting kernels
Our signal syscall restart handling for these kernels still uses
the userspace stack to build code for restarting the syscall.
Unfortunately, fixing this is non-trivial, and so for the time
being, we resolve the problem by disabling NX support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-23 11:36:20 +01:00
Russell King 355532bdda Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 2009-05-23 11:16:05 +01:00
Nicolas Pitre a49a018a6e [ARM] add coherent DMA mask for mv643xx_eth
Since commit eb0519b5a1, mv643xx_eth is non functional on ARM because
the platform device declaration does not include any coherent DMA mask
and coherent memory allocations fail.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-05-22 17:05:53 -04:00
Marek Vasut 6ec04f434d [ARM] pxa/palm: fix PalmLD/T5/TX AC97 MFP
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-22 18:16:20 +08:00
Coly Li f5c81a3270 [ARM] pxa: add parameter to clksrc_read() for pxa168/910
This patch modifies parameter of clksrc_read() from 'void' to
'struct clocksource *cs', which fixes compile warning for
incompatible parameter type.

Signed-off-by: Coly Li <coly.li@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-22 18:15:49 +08:00
Mingwei Wang 0e1b74df99 [ARM] pxa: fix the incorrectly defined drive strength macros for pxa{168,910}
Signed-off-by: Mingwei Wang <mwwang@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-22 18:15:31 +08:00
Martin Michlmayr 85bc26211c [ARM] Orion: Remove explicit name for platform device resources
Remove explicit names from platform device resources since they will
automatically be named after the platform device they're associated
with.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-05-21 16:45:20 -04:00
Thomas Reitmayr 385aa9e701 [ARM] Kirkwood: Correct MPP for SATA activity/presence LEDs of QNAP TS-119/TS-219.
For the QNAP TS-119 and TS-219 the wrong MPPs were used for the SATA
activity/presence LEDs. The new settings make these LEDs work as
expected.

Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-05-20 22:17:32 -04:00
Daniel Ribeiro ff71338ed3 [ARM] pxa/ezx: fix pin configuration for low power mode
Fix LPM configuration on ezx.c

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-20 09:51:44 +08:00
Rabin Vincent a93ea9b357 [ARM] 5517/1: integrator: don't put clock lookups in __initdata
Remove the __initdata annotation for the clock lookups, since they
will be needed when loading modules which use clk_get().

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-18 17:43:16 +01:00
Rabin Vincent 982db66352 [ARM] 5518/1: versatile: don't put clock lookups in __initdata
Remove the __initdata annotation for the clock lookups, since they
will be needed when loading modules which use clk_get().

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-18 17:43:06 +01:00
Dmitry Eremin-Solenikov a81b38688f [ARM] pxa/spitz: provide spitz_ohci_exit() that unregisters USB_HOST GPIO
Currently spitz_ohci_init() that requests GPIO doesn't have
corresponding spitz_ohci_exit() which will gpio_free(). This causes
minor problems e.g. during resume when the OHCI device can't be resumed.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-18 21:52:09 +08:00
Timothy Clacy 866bd43581 [ARM] pxa: enable GPIO receivers after configuring pins
'mach-pxa' platforms currently rely on a bootloader to setup GPIO pins
and clear RDH (to enable inputs).

A kernel loaded by a 'minimal' bootloader, that doesn't touch any pins,
will not function correctly; inputs will remain disabled, even after the
pins are configured. The following change fixes the issue and has been
verified on Gumstix Verdex XL6P and a custom PXA270 platform.

Signed-off-by: Timothy Clacy <tcl@phaseone.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-18 21:52:09 +08:00
Daniel Ribeiro 216e3b7abb [ARM] pxa: allow gpio_reset drive high during normal work
I want to reuse tosa/spitz gpio_reset code, but my board needs the reset
gpio to be driven high during normal operation.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-18 21:52:09 +08:00
Daniel Ribeiro 818bc81444 [ARM] pxa: save/restore PGSR on suspend/resume.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-18 21:52:08 +08:00
Pavel Roskin 8190b37f64 [ARM] mach-l7200: fix spelling of SYS_CLOCK_OFF
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-18 11:25:08 +01:00
Mel Gorman eb33575cf6 [ARM] Double check memmap is actually valid with a memmap has unexpected holes V2
pfn_valid() is meant to be able to tell if a given PFN has valid memmap
associated with it or not. In FLATMEM, it is expected that holes always
have valid memmap as long as there is valid PFNs either side of the hole.
In SPARSEMEM, it is assumed that a valid section has a memmap for the
entire section.

However, ARM and maybe other embedded architectures in the future free
memmap backing holes to save memory on the assumption the memmap is never
used. The page_zone linkages are then broken even though pfn_valid()
returns true. A walker of the full memmap must then do this additional
check to ensure the memmap they are looking at is sane by making sure the
zone and PFN linkages are still valid. This is expensive, but walkers of
the full memmap are extremely rare.

This was caught before for FLATMEM and hacked around but it hits again for
SPARSEMEM because the page_zone linkages can look ok where the PFN linkages
are totally screwed. This looks like a hatchet job but the reality is that
any clean solution would end up consumning all the memory saved by punching
these unexpected holes in the memmap. For example, we tried marking the
memmap within the section invalid but the section size exceeds the size of
the hole in most cases so pfn_valid() starts returning false where valid
memmap exists. Shrinking the size of the section would increase memory
consumption offsetting the gains.

This patch identifies when an architecture is punching unexpected holes
in the memmap that the memory model cannot automatically detect and sets
ARCH_HAS_HOLES_MEMORYMODEL. At the moment, this is restricted to EP93xx
which is the model sub-architecture this has been reported on but may expand
later. When set, walkers of the full memmap must call memmap_valid_within()
for each PFN and passing in what it expects the page and zone to be for
that PFN. If it finds the linkages to be broken, it assumes the memmap is
invalid for that PFN.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-18 11:22:24 +01:00
Russell King e1342f1da0 Merge branch 'smp-fix' 2009-05-17 17:13:18 +01:00
Russell King ee348d5a1d [ARM] realview: fix broadcast tick support
Having discussed broadcast tick support with Thomas Glexiner, the
broadcast tick devices should be registered with a higher rating
than the global tick device, and it should have the ONESHOT and
PERIODIC feature flags set.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Thomas Glexiner <tglx@linutronix.de>
2009-05-17 17:11:35 +01:00
Russell King 78d236c2b3 [ARM] realview: remove useless smp_cross_call_done()
smp_cross_call_done() is a no-op for MPCore, and since it's only
used by platform code, there's no point in having it unless it's
doing something.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-17 16:23:45 +01:00
Russell King 826681043d [ARM] smp: fix cpumask usage in ARM SMP code
The ARM SMP code wasn't properly updated for the cpumask changes, which
results in smp_timer_broadcast() broadcasting ticks to non-online CPUs.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-17 16:22:46 +01:00