Commit graph

907 commits

Author SHA1 Message Date
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
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
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
Tony Lindgren
c068303920 [ARM] 5536/1: Move clk_add_alias() to arch/arm/common/clkdev.c
This can be used for other arm platforms too as discussed
on the linux-arm-kernel list.

Also check the return value with IS_ERR and return PTR_ERR
as suggested by Russell King.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-04 17:45:43 +01:00
Philipp Zabel
1257629b07 [ARM] pxa: fix pxa27x_udc default pullup GPIO
Currently, pxa27x_udc tries to use GPIO 0 as D+ pullup if not
explicitly configured. Default to an invalid GPIO (-1) instead.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-04 11:06:25 +08:00
Jonathan Cameron
d81e77f041 [ARM] pxa/imote2: fix UCAM sensor board ADC model number
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-04 11:06:25 +08:00
Johannes Berg
19d337dff9 rfkill: rewrite
This patch completely rewrites the rfkill core to address
the following deficiencies:

 * all rfkill drivers need to implement polling where necessary
   rather than having one central implementation

 * updating the rfkill state cannot be done from arbitrary
   contexts, forcing drivers to use schedule_work and requiring
   lots of code

 * rfkill drivers need to keep track of soft/hard blocked
   internally -- the core should do this

 * the rfkill API has many unexpected quirks, for example being
   asymmetric wrt. alloc/free and register/unregister

 * rfkill can call back into a driver from within a function the
   driver called -- this is prone to deadlocks and generally
   should be avoided

 * rfkill-input pointlessly is a separate module

 * drivers need to #ifdef rfkill functions (unless they want to
   depend on or select RFKILL) -- rfkill should provide inlines
   that do nothing if it isn't compiled in

 * the rfkill structure is not opaque -- drivers need to initialise
   it correctly (lots of sanity checking code required) -- instead
   force drivers to pass the right variables to rfkill_alloc()

 * the documentation is hard to read because it always assumes the
   reader is completely clueless and contains way TOO MANY CAPS

 * the rfkill code needlessly uses a lot of locks and atomic
   operations in locked sections

 * fix LED trigger to actually change the LED when the radio state
   changes -- this wasn't done before

Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03 14:06:13 -04:00
Marek Vašut
5a9d25150c [ARM] 5522/1: PalmLD: IDE support
Support for Palm LifeDrive's internal harddrive.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-31 14:50:40 +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
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
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
David S. Miller
bb803cfbec Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/scsi/fcoe/fcoe.c
2009-05-18 21:08:20 -07: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
Ricardo Martins
776abac817 [ARM] 5513/1: Eurotech VIPER SBC: fix compilation error
Compilation for this board yields the following errors:

arch/arm/mach-pxa/viper.c:511: error: 'FFUART' undeclared here (not in a function)
arch/arm/mach-pxa/viper.c:520: error: 'BTUART' undeclared here (not in a function)
arch/arm/mach-pxa/viper.c:529: error: 'STUART' undeclared here (not in a function)

Fix them by including the necessary header.

Signed-off-by: Ricardo Martins <rasm@fe.up.pt>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-16 19:55:56 +01:00
Robert P. J. Day
283a5d250e [ARM] Kconfig typo fix: "PXA930" -> "CPU_PXA930".
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-03 10:58:31 +01:00
Eric Miao
fc76132b1e [ARM] pxa/littleton: add missing da9034 touchscreen support
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-27 11:46:56 +08:00
Eric Miao
b49e385fc7 [ARM] pxa/zylonite: configure GPIO18/19 correctly, used by 2 GPIO expanders
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-27 11:46:38 +08:00
Eric Miao
15fbc93857 [ARM] pxa/zylonite: fix the issue of unused SDATA_IN_1 pin get AC97 not working
GPIO17_SDATA_IN_1 and GPIO36_SDATA_IN_1 are originally designed for the 2nd
codec but unused on the board, yet they are initialized incorrectly by the
bootloader as the SDATA_IN_1 alternate function, thus causing AC97 fail to
work. Fix this issue by configuring these pins as normal GPIO to avoid the
noise from these pins being treated as signals from the 2nd codec.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-27 11:46:30 +08:00
Eric Miao
3e36c0deea [ARM] pxa: make ads7846 on corgi and spitz to sync on HSYNC
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-27 11:45:53 +08:00
Linus Torvalds
6ae85d6db4 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5460/1: Orion: reduce namespace pollution
  [ARM] 5458/1: pcmcia: pxa2xx-sharpsl: check if we do have Scoop config
  [ARM] 5457/1: mach-imx gpio buildfix
  [ARM] 5456/1: add sys_preadv and sys_pwritev
  [ARM] pxa/pcm990: start external GPIOs immediately after built-in ones
  [ARM] pxa/palm27x: General fix for Palm27x aSoC driver
  [ARM] pxa/mioa701: use GPIO95 as AC97 reset line
  [ARM] pxa: merge AC97 platform data structures
  [ARM] pxa/magician: remove un-necessary #include of pxa-regs.h and hardware.h
2009-04-24 08:36:41 -07:00
Johannes Berg
c1c6b14b22 rfkill: remove deprecated state constants
I only did superficial review, but these constants are stupid
to have and without proper warnings nobody will review the
code anyway, no amount of shouting will help.

Also fix wimax to use correct states.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:27 -04:00
Magnus Damm
8e19608e8b clocksource: pass clocksource to read() callback
Pass clocksource pointer to the read() callback for clocksources.  This
allows us to share the callback between multiple instances.

[hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods]
[akpm@linux-foundation.org: cleanup]
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-21 13:41:47 -07:00
Guennadi Liakhovetski
a48dc30da4 [ARM] pxa/pcm990: start external GPIOs immediately after built-in ones
As a result of an off-by-1 error pcm990 leaves one unused GPIO number between
built-in GPIOs and the pca9536 extender. Fix it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-19 21:57:10 +08:00
Marek Vasut
e91fb9137d [ARM] pxa/palm27x: General fix for Palm27x aSoC driver
Firstly, this patch makes the palm27x asoc driver a little more sane. Also,
since all affected devices use GPIO95 as AC97_nRESET, this patch sets that
properly. Affected are PalmT5, TX and LifeDrive.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-19 21:56:54 +08:00
Robert Jarzmik
cc8d2730ad [ARM] pxa/mioa701: use GPIO95 as AC97 reset line
MioA701 board's GPIO95 is the AC97 line. The other GPIO113
is not connected to the sound chip, but to the GSM chip as a
wakeup line.

It happens that when the pxa2xx_ac97 driver reconfigures the
gpio as an "out gpio" for AC97 reset (bug workaround), it
hangs the GSM chip.

As AC97 platform data now enables to specify the AC97 reset
line, use it.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-15 10:54:06 +08:00
Mark Brown
eae17754ab [ARM] pxa: merge AC97 platform data structures
Currently there are two possible platform datas for the PXA AC97 driver:
one supported by the generic AC97 driver only which provides callbacks
to allow board-specific configuration at stream startup and teardown,
and another for pxa2xx-ac97-lib which allows configuration of the reset
GPIO for PXA2xx CPUs.

Obviously this won't actually work when using the generic AC97 driver
since the drivers will attempt to parse the platform data in both
formats. Fix this by merging the two structures.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-15 10:54:06 +08:00
Huang Weiyi
6845a658e0 [ARM] pxa/em-x270: remove duplicated #include
Remove duplicated #include in arch/arm/mach-pxa/em-x270.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-14 22:55:36 +08:00
Mike Rapoport
bd9d074098 [ARM] pxa/em-x270: explicitly set .gpio_cs in TDO35S SPI chip data
After commit a7bb3909b3 ("spi: pxa2xx_spi:
introduce chipselect GPIO to simplify the common cases") the .gpio_cs
field in pxa2xx_spi_chip has to be set explicitly.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-14 22:55:36 +08:00
Marek Vasut
efb12cd20a [ARM] pxa: PalmTX and PalmT5 USB fixes
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-13 12:10:58 +08:00
Marek Vasut
918c71c0ff [ARM] pxa: add missing declaration of pxa26x_init_irq()
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-13 12:10:36 +08:00
Eric Miao
0e983d3c38 [ARM] pxa/colibri: fix missing variable name in inline functions
Even they are empty inline functions, the compiler still complains
about the missing variable names.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: Daniel Mack <daniel@caiaq.de>
2009-04-09 14:15:00 +08:00
Linus Torvalds
139ef17a46 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5446/1: ohci-at91: Limit vbus_pin assignment to the size of the array
  [ARM] 5445/1: AT91: Remove flexible array from USBH platform data
  [ARM] 5447/1: Add SZ_32K
  [ARM] omap: fix omap1 clock usecount decrement bug
  [ARM] pxa: register AC97 controller devices
  [ARM] pxa/csb701: do not register devices on non-csb726 boads
  [ARM] pxa/colibri: get rid of set_irq_type()
  [ARM] pxa/colibri: provide MAC address from ATAG_SERIAL
  [ARM] pxa/cm-x2xx: fix ucb1400 not being registered
  [ARM] pxa: Add support for suspend on PalmTX, T5 and LD
  [ARM] pxa: PalmTE2 support for battery, UDC, IrDA and backlight
  [ARM] pxa: Palm Tungsten E2 basic support
  [ARM] pxa/em-x270: add libertas device registration
  [ARM] pxa/magician: Enable bq24022 regulator for gpio_vbus and pda_power
2009-04-08 15:24:09 -07:00
Eric Miao
a7bb3909b3 spi: pxa2xx_spi: introduce chipselect GPIO to simplify the common cases
Most SPI peripherals use GPIOs as their chip selects, introduce .gpio_cs
for this.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:07 -07:00
Linus Torvalds
22ae77bc7a Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (53 commits)
  [MTD] struct device - replace bus_id with dev_name(), dev_set_name()
  [MTD] [NOR] Fixup for Numonyx M29W128 chips
  [MTD] mtdpart: Make ecc_stats more realistic.
  powerpc/85xx: TQM8548: Update DTS file for multi-chip support
  powerpc: NAND: FSL UPM: document new bindings
  [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays
  [MTD] [NAND] FSL-UPM: add multi chip support
  [MTD] [NOR] Add device parent info to physmap_of
  [MTD] [NAND] Add support for NAND on the Socrates board
  [MTD] [NAND] Add support for 4KiB pages.
  [MTD] sysfs support should not depend on CONFIG_PROC_FS
  [MTD] [NAND] Add parent info for CAFÉ controller
  [MTD] support driver model updates
  [MTD] driver model updates (part 2)
  [MTD] driver model updates
  [MTD] [NAND] move gen_nand's probe function to .devinit.text
  [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text
  [MTD] fix use after free in register_mtd_blktrans
  [MTD] [MAPS] Drop now unused sharpsl-flash map
  [MTD] ofpart: Check name property to determine partition nodes.
  ...

Manually fix trivial conflict in drivers/mtd/maps/Makefile
2009-04-06 14:56:26 -07:00
Russell King
89de3820c7 Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 2009-04-06 09:57:38 +01:00
Philipp Zabel
0ef2067d0f pxa/magician: remove deprecated .bus_shift from PASIC3 platform_data
The PASIC3 driver now calculates its register spacing from the resource
size.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05 00:32:21 +02:00
Mark Brown
80748fb8ff [ARM] pxa: register AC97 controller devices
The tosa, e740, e750, e800 and mioa701 all use AC97 audio codecs
but does not register the platform device for the AC97 controller.
Doing so is now required by ASoC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 21:54:40 +08:00
Dmitry Eremin-Solenikov
675b5d869f [ARM] pxa/csb701: do not register devices on non-csb726 boads
csb701 driver can currently only be used on csb726 boards,
limit the csb701 devices registration to csb726 board.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 10:26:35 +08:00
Daniel Mack
8a28b10e91 [ARM] pxa/colibri: get rid of set_irq_type()
In commit 47cb035560, the ax88796 driver
learned to take IRQ flags from platform_device definition. Use that here
to get rid of the set_irq_type() hack.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 10:26:34 +08:00
Daniel Mack
22a0200b18 [ARM] pxa/colibri: provide MAC address from ATAG_SERIAL
In 67fca028f1, the ax88796 ethernet driver
learned a way to let the platform data hand in the MAC address. Use it
here as the original Colibri bootloader passes in a MAC address via
ATAG_SERIAL.

Reported-by: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 10:26:34 +08:00
Marek Vasut
50f6bb0ab7 [ARM] pxa/cm-x2xx: fix ucb1400 not being registered
This patch fixes cm-x2xx not registering the ucb1400. This is
because of the splitting of ucb1400 driver half year ago.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 10:26:34 +08:00
Marek Vasut
81854f82c5 [ARM] pxa: Add support for suspend on PalmTX, T5 and LD
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 10:26:34 +08:00
Marek Vasut
8c8aa5fa30 [ARM] pxa: PalmTE2 support for battery, UDC, IrDA and backlight
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 10:26:33 +08:00
Marek Vasut
54088bf50f [ARM] pxa: Palm Tungsten E2 basic support
This contains support for keypad, MMC, AC97, LCD and backlight.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 10:26:33 +08:00
Mike Rapoport
c9be0e3961 [ARM] pxa/em-x270: add libertas device registration
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 08:24:39 +08:00
Philipp Zabel
eb650b9ed0 [ARM] pxa/magician: Enable bq24022 regulator for gpio_vbus and pda_power
With this patch, the bq24022 battery charger is controlled by the USB
gadget framework (via gpio_vbus) when connected to USB.

To compile, this patch depends on the "regulator: Allow init data to be
supplied for bq24022" patch (queued for next in the regulator tree) to
add the init_data field to struct bq24022_mach_info.
It also depends on the "add optional OTG transceiver and voltage
regulator support to pda_power" patch (queued for next in the power
supply tree) to enable charging when connected to the AC charger.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-04 08:24:38 +08:00
Sascha Hauer
d42574d1d2 V4L/DVB (11034): soc-camera: remove now unused gpio member of struct soc_camera_link
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Sascha Hauer
d75b1dcc84 V4L/DVB (11031): pcm990 baseboard: add camera bus width switch setting
Some Phytec cameras have a I2C GPIO expander which allows it to
switch between different sensor bus widths. This was previously
handled in the camera driver. Since handling of this switch
varies on several boards the cameras are used on, the board
support seems a better place to handle the switch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Russell King
ed40d0c472 Merge branch 'origin' into devel
Conflicts:
	sound/soc/pxa/pxa2xx-i2s.c
2009-03-28 20:29:51 +00:00
Russell King
dc52b5bf2c Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-03-28 14:15:43 +00:00
Daniel Mack
c9b78189f5 [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
Reported-by: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-28 19:23:05 +08:00
root
9a38e989b8 Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-03-24 22:04:25 +00:00
Takashi Iwai
b5c784894c Merge branch 'topic/asoc' into for-linus 2009-03-24 00:35:53 +01:00
Eric Miao
f8dec04d33 [ARM] pxa: move common MFP handling code into plat-pxa
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 10:11:34 +08:00
Eric Miao
38f539a608 [ARM] pxa: move common GPIO handling code into plat-pxa
1. add common GPIO handling code into [arch/arm/plat-pxa]

2. common code in <mach/gpio.h> moved into <plat/gpio.h>, new processors
   should implement its own <mach/gpio.h>, provide the following required
   definitions and '#include <plat/gpio.h>' in the end:

   - GPIO_REGS_VIRT for mapped virtual address of the GPIO registers'
     physical I/O memory

   - macros of GPLR(), GPSR(), GPDR() for constant optimization for
     functions gpio_{set,get}_value() (so that bit-bang code can still
     have tolerable performance)

   - NR_BUILTIN_GPIO for the number of onchip GPIO

   - definitions of __gpio_is_inverted() and __gpio_is_occupied(), they
     can be either macros or inlined functions

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 10:11:33 +08:00
Eric Miao
bd5ce43323 [ARM] pxa: introduce plat-pxa for PXA common code and add DMA support
1. introduce folder of 'arch/arm/plat-pxa' for common code across different
   PXA processor families

2. initially moved DMA code into plat-pxa

3. common code in <mach/dma.h> moved into <plat/dma.h>, new processors
   should implement its own <mach/dma.h>, provide the following required
   definitions and '#include <plat/dma.h>' in the end:

   - DMAC_REGS_VIRT for mapped virtual address of the DMA registers'
     physical I/O memory

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 10:11:31 +08:00
Daniel Mack
e2bb5befd7 [ARM] pxa: AC97 pin functions for Colibri PXA310/320
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 10:00:12 +08:00
Daniel Mack
91fcfb908d [ARM] pxa: Add Colibri LCD functions
This adds LCD functions for Colibri PXA300 and Colibri PXA320 and
configures a LQ043T3DX02 panel.

Original-code-by: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:59:55 +08:00
Daniel Mack
bac07ecd6c [ARM] pxa: Colibri PXA320 module basics
This adds basic support for Colibri PXA320 modules.
The file colibri-320.c only contains settings specific to this module,
such as the Ethernet interface.

Cc: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:59:30 +08:00
Daniel Mack
acb3655973 [ARM] pxa: Refactor Colibri board support code
- Move common function for all Colibri PXA3xx boards to the newly
  added colibri-pxa3xx.c
- Drop some unnecessary defines from colibri.h
- Make Kconfig reflect the fact that code for colibri 300 module does
  also work for the 310 model
- Give up on the huge pin config table which was messed up with lots of
  #ifdefs and switch over to locally defined tables for configured
  functions

Cc: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:59:04 +08:00
Daniel Mack
626806d96f [ARM] pxa: Fix Colibri AX88796 configuration
Broaden the AX88796 register mask to allow access to the reset register.
Remove unnecessary value definitions and the second resource block.

Diagnosed-by: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:58:48 +08:00
Daniel Mack
42e07ad7fc [ARM] pxa: add USB support for Colibri PXA300
This adds support for USB OHCI for Toradex' Colibri PXA300 modules as
connected on the evaluation board.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:57:54 +08:00
Daniel Mack
ebc046c2a3 [ARM] pxa: add MMC support for Colibri PXA300
Added MMC support for Toradex' Colibri PXA300 module.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:57:54 +08:00
Daniel Mack
5fc9f9a1de [ARM] pxa: add basic support for Colibri PXA300 module
This patch add basic support for Toradex' Colibri PXA300 module.
Ethernet is enabled conditionally, depdending on CONFIG_AX88796.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:57:54 +08:00
Daniel Mack
5c0dbb8fc2 [ARM] pxa: rename colibri.c to colibri-pxa270.c
Namespace cleanup: rename colibri.c to colibri-pxa270.c and change
some names in colibri.h.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:57:54 +08:00
Eric Miao
fa12868e59 Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git into devel 2009-03-23 09:55:14 +08:00
Daniel Mack
1efb71809f [ARM] pxa: add pxa320 missing pin function for CS2 on GPIO3
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-23 09:53:33 +08:00
Mike Rapoport
f271049e20 [MTD] [NAND] pxa3xx_nand: add ability to keep controller settings defined by OBM/bootloader
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-03-20 18:37:44 +00:00
Russell King
be093beb60 [ARM] pass reboot command line to arch_reset()
OMAP wishes to pass state to the boot loader upon reboot in order to
instruct it whether to wait for USB-based reflashing or not.  There is
already a facility to do this via the reboot() syscall, except we ignore
the string passed to machine_restart().

This patch fixes things to pass this string to arch_reset().  This means
that we keep the reboot mode limited to telling the kernel _how_ to
perform the reboot which should be independent of what we request the
boot loader to do.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-19 16:20:24 +00:00
Dmitry Eremin-Solenikov
c68ffddabc [ARM] pxa: make second argument of clk_add_alias a name instead of the device
clk_add_alias is commonly called for platform devices that are not yet
registered in the device tree. Thus the clock alias is associated with
NULL device name. Fix this by passing the device name instead of just
device pointer.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-19 16:20:39 +08:00
Daniel Mack
d1b95607e1 [ARM] pxa: add missing pin function for CS2 on GPIO1
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-19 16:20:39 +08:00
Robert Jarzmik
cefdb2a443 [ARM] pxa/MioA701: Migrate after pxa27x_udc gpio_pullup functionality.
Signed-off-by: Robert Jarzmik <rjarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-13 17:10:45 +08:00
Robert Jarzmik
689b4febec [ARM] pxa/MioA701: add gpio_vbus driver
Add gpio vbus detection to udc driver, by taking advantage
of the new gpio_vbus driver.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-13 17:10:44 +08:00
Dmitry Eremin-Solenikov
3b31fabfe2 [ARM] pxa: add support for CSB701 baseboard
CSB701 is one of baseboards that can be used with CSB726 SOM.
This currently adds support for button and LED on the board.
More to come later.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-13 17:10:44 +08:00
Dmitry Eremin-Solenikov
aac429707d [ARM] pxa: add initial support for Cogent CSB726 board
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-13 17:10:44 +08:00
Eric Miao
53f5649b21 [ARM] pxa: fix typo in BANK_OFF() macro in gpio.h
The typo was originally fixed by Mike Rapoport and missed. And is
later reported by Matthias Meier.

Signed-off-by: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-13 10:50:17 +08:00
Mike Rapoport
bff22c9b85 [ARM] pxa: add DM9000_PLATF_NO_EEPROM flag to CM-X... platforms
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:40 +08:00
Eric Miao
5bf3df3f00 [ARM] pxa: separate definitions from pxa-regs.h and remove it finally
The remaining registers are separated into:

   - <mach/regs-ost.h>
   - <mach/regs-rtc.h>
   - <mach/regs-intc.h>

and then we can remove pxa-regs.h completely. Instead of #include this
file, let's:

1. include the specific <mach/regs-*.h> with care (if that's absolutely
   necessary)

2. define the registers in the driver, make cleanly defined API to expose
   the register access to external with sufficient reason

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:40 +08:00
Eric Miao
b74d196908 [ARM] pxa: move pxa2xx chip selects definitions out of pxa-regs.h
The definitions of PXA_CS<x>_PHYS are really PXA2xx specific and should
be moved out of pxa-regs.h. As an illustration, the PXA3xx static chip
selects definitions are added into pxa3xx-regs.h.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:40 +08:00
Eric Miao
5438614509 [ARM] pxa: make lubbock specific debugging stuffs back into lubbock.c
This isn't perfect but at least solves the problem of pm.c's dependency
on register definitions in <mach/lubbock.h>, which doesn't make much
sense.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:40 +08:00
Eric Miao
b393c69652 [ARM] pxa: move PCMCIA definitions out of pxa-regs.h into pxa2xx_base.c
Move the processor specific initialization (largely resources initialization)
out of soc_common_drv_pcmcia_probe() into dedicated sa11xx_drv_pcmcia_probe()
and __pxa2xx_drv_pcmcia_probe().

By doing this, we are now able to move the PCMCIA related definitions out of
pxa-regs.h and back into pxa2xx_base.c.

As a result, remove that reference of _PCMCIA1IO in arch/arm/mach-pxa/viper.c.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:39 +08:00
Eric Miao
5742964e91 [ARM] pxa: remove unnecessary #include of pxa-regs.h and hardware.h
pxa-regs.h and hardware.h are not intended for use directly in driver
code, remove those unnecessary references.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:38 +08:00
Eric Miao
0807da5938 [ARM] pxa: access GPIO registers by chip so to make it further generic
Let's handle GPIOs by banks, each bank covers up to 32 GPIOs with one set
of registers, and each set of registers start from different offsets.

           GPLR    GPDR    GPSR    GPCR    GRER    GFER    GEDR
 BANK 0 - 0x0000  0x000C  0x0018  0x0024  0x0030  0x003C  0x0048
 BANK 1 - 0x0004  0x0010  0x001C  0x0028  0x0034  0x0040  0x004C
 BANK 2 - 0x0008  0x0014  0x0020  0x002C  0x0038  0x0044  0x0050

 BANK 3 - 0x0100  0x010C  0x0118  0x0124  0x0130  0x013C  0x0148
 BANK 4 - 0x0104  0x0110  0x011C  0x0128  0x0134  0x0140  0x014C
 BANK 5 - 0x0108  0x0114  0x0120  0x012C  0x0138  0x0144  0x0150

 NOTE:
   BANK 3 is only available on PXA27x and later processors.
   BANK 4 and 5 are only available on PXA935

1. introduce GPIO_BANK(n) for the offset base of each bank

2. 'struct pxa_gpio_chip' is expanded to include IRQ edge and mask
   setings, and saved register values as well, and is dynamically
   allocated due to possible bank number ranging from 3 to 6

3. all accesses to GPIO registers are made through 'regbase' within
   'pxa_gpio_chip', and register offset

4. introduce several inline functions to simplify the code a bit

5. change IRQ demux handler to base on gpio chips

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:38 +08:00
Eric Miao
3b8e285c21 [ARM] pxa: move declaration of 'pxa_last_gpio' into <mach/gpio.h>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:37 +08:00
Eric Miao
da065a0b36 [ARM] pxa: move GPIO register definitions into <mach/gpio.h>
This makes gpio.c fully independent of pxa-regs.h (except for the
virtual address of the registers).

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:37 +08:00
Eric Miao
0d9f768fce [ARM] pxa: move pxa_gpio_mode() outside of generic gpio.c
Looks like we have to live with pxa_gpio_mode() for a while, giving
its presence is actually making gpio.c not generic enough, let's
move it temporarily outside before it can be fully purged.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:37 +08:00