Commit Graph

77932 Commits

Author SHA1 Message Date
Ben Dooks 06dbbd69f9 [ARM] 4795/1: S3C244X: Add armclk and setparent call
Add armclk to the supported clocks on the S3C2440 and S3C2442 to
better represent the DVS state which controls whether FCLK or HCLK
is fed to the ARM core.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:52 +00:00
Ben Dooks 3a38e4be76 [ARM] 4794/1: S3C24XX: Comonise S3C2440 and S3C2442 clock code
Merge together the bits of the S3C2440 and S3C2442 clock code
that can be.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:52 +00:00
Ben Dooks c27cb681ac [ARM] 4793/1: S3C24XX: Add IRQ->GPIO pin mapping function
Add the reverse of s3c2410_gpio_getirq to convert
a IRQ  number into a GPIO pin number.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:52 +00:00
Ben Dooks 9b8c008840 [ARM] 4792/1: S3C24XX: Remove warnings from debug-macro.S
Remove warnings left in include/asm-arm/arch-s3c2410/debug-macro.S
whilst these where being experimented with.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:52 +00:00
Ben Dooks ddd870bdb7 [ARM] 4791/1: S3C2412: Make fclk a parent of msysclk
In the S3C2412 fclk is derived from msysclk, not straight from
the MPLL output. Set clk_f.parent appropriately.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:52 +00:00
Ben Dooks cca851d7b4 [ARM] 4790/1: S3C2412: Fix parent selection for msysclk.
The msysclk clock was checking for the wrong PLL for the
parent in s3c2412_setparent_msysclk(), trying the UPLL instead
of the MPLL output.

Also ensure the mpll and fclks are at the same rate at init time.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:52 +00:00
Ben Dooks e95f52cd3b [ARM] 4789/1: S3C2412: Add missing CLKDIVN register values
Add S3C2412_CLKDIVN_DVSEN and S3C2412_CLKDIVN_HALFHCLK definitions to
the S3C2412_CLKDIVN set.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:52 +00:00
Ben Dooks 046c9d321f [ARM] 4788/1: S3C24XX: Fix paramet to s3c2410_dma_ctrl if S3C2410_DMAF_AUTOSTART used.
Fix the channel parameter to s3c2410_dma_ctrl() in s3c2410_dma_enqueue()
if the S3C2410_DMAF_AUTOSTART is set on the channel.

Spotted by Steven Ryu at Samsung.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks a07c438faf [ARM] 4787/1: S3C24XX: s3c2410_dma_request() should return the allocated channel number
The s3c2410_dma_request() function should return the channel allocated
instead of zero for success.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks db9b85c527 [ARM] 4786/1: S3C2412: Add SPI FIFO controll constants
Add control constants for the S3C2412 SPI unit FIFO.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks e5812bf668 [ARM] 4785/1: S3C24XX: Add _SHIFT definitions for S3C2410_BANKCON registers
Add definitions to allow easier decomposotion of the contents of
the S3C2410_BANKON registers

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks 62feee648c [ARM] 4784/1: S3C24XX: Fix GPIO restore glitches
The core resume code may have caused glitches in the GPIO when
restoring the GPIO state due to the order in which the GPIO registers
were being written.

Change the restore process take into account the state of the
GPIOs on resume and the state the system wants to restore them to.

See the code comments in the patch for more details of the process.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks bb6d9b56c1 [ARM] 4783/1: S3C24XX: Add s3c2410_gpio_getpull()
Add the call s3c2410_gpio_getpull() to return the
current state of the pin's pull-up.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks 9f613be4a9 [ARM] 4782/1: S3C24XX: Define FIQ_START for any FIQ users
Ensure FIQ_START is defined to allow anyone to use FIQ code on
an S3C24XX based CPU.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks c58f7a1d36 [ARM] 4781/1: S3C24XX: DMA suspend and resume support
If an DMA channel was active at suspend, then ensure that
it is correctly reconfigured when the system resumes.

Note, the previous policy was for each driver to handle their
own reconfiguration on resume. The policy has been changed to
make the individual driver's job easier.

Signed-off-by: Ben Dooks <ben-linux@flfuf.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:51 +00:00
Ben Dooks c6709e8ef5 [ARM] 4780/1: S3C2412: Allow for seperate DMA channels for TX and RX
The current S3C24XX DMA code does not allow for an peripheral
that has one channel for RX and another for TX.

This patch adds a per-cpu dma operation to select the transmit
or receive channel, and adds support to the S3C2412 for the
seperate DMA channels for TX and RX.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:50 +00:00
Ben Dooks 67d729adc0 [ARM] 4779/1: S3C2412: Add s3c2412_gpio_set_sleepcfg() call
Add s3c2412_gpio_set_sleepcfg() to allow the setting of the sleep
configuration of the GPIO blocks.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:50 +00:00
Ben Dooks bdbea34ddd [ARM] 4778/1: S3C2412: Add armclk and init from DVS state
Add armclk to the S3C2412 to indicate the current clock connected to
the ARM core.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:50 +00:00
Ben Dooks 57c1b0f8db [ARM] 4777/1: S3C24XX: Ensure clk_set_rate() checks the set_rate method for the clk
Add checks for clk_set_rate() and ensure that we do not allow set_rate
to be called for a clock that does not have it defined. Add default
methods for fclk, hclk, pclk and mpll.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:50 +00:00
Krzysztof Helt f7275dac55 [ARM] 4775/1: s3c2410: fix compilation error if only s3c2442 cpu is selected
This patch fixes compilation error if only a machine with
s3c2442 cpu is selected but without s3c2440 cpu selected.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:50 +00:00
Ben Dooks 332349518f [ARM] 4731/1: S3C2412: Check for incomplete sleep
Check if the sleep command returns due to a pending interrupt
in the standby unit. If this happens, try and ack the IRQ
before re-trying the resume.

It is currently unclear whether the resume can be backed out
of at this stage as this could cause a problem with level
based interrupts.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:50 +00:00
Ben Dooks 0baada2742 [ARM] 4730/1: S3C2412: Ensure the PWRCFG has the right mode for RTC wake
Ensure that if the RTC IRQ is not selected for wake in the
base configuration, then the PWRCFG has the same value set
in it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:50 +00:00
Ben Dooks 8e3007a0e8 [ARM] 4729/1: VR1000: Do not add IIS device on initialisation
The IIS device is being registered by the Simtec Audio
driver, and thus registering here causes an error due
to device tree naming collision.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks b6a175a562 [ARM] 4728/1: BAST: Do not add IIS device on initialisation
The IIS device is being registered by the Simtec Audio
driver, and thus registering here causes an error due
to device tree naming collision.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks 0953612a47 [ARM] 4727/1: S3C2412: Remove unused GPESLPCON
S3C2412_GPESLPCON does not exist in the register
mappings, so remove it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks b708d7bf18 [ARM] 4726/1: S3C2412: IIS register definitions
The S3C2412 IIS engine differs from the previous
SoC in the range, so add a set of register definitions
in a seperate file for it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks d45c30cb4c [ARM] 4725/1: S3C2412: Fix IIS and SDI definitions in DMA map
The IIS and SDI register hw_addr definitions are
incorrect in the DMA map for the S3C2412.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks 71e5b2f154 [ARM] 4724/1: S3C2412: Select S3C2410 base GPIO implementation
The S3C2412 GPIO is similar enough to the S3C2410 that
it can use it as a base for GPIO functionality.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks 9cbae12cca [ARM] 4723/1: BAST: Fix LCD driver default display setting
We have a default display set to 4, when we only have
three registered displays. Fix this argument (a seperate
patch has been generated to ensure that the LCD driver
takes notice of this bug)

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks ff44b49b55 [ARM] 4722/1: S3C24XX: Improve output if watchdog reset fails
If the watchdog reset fails and we decided to take the jump
to zero approach, allow 50ms for the UARTS to drain the FIFOs
before calling into a bootloader that may flush the output.

Also reduece the waits and the timeout values as 5 seconds is
rather long.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:49 +00:00
Ben Dooks d652074ebc [ARM] 4721/1: S3C24XX: Ensure watchdog clock is enbaled for hard reset
If the hard reset routine is using the watchdog, then
ensure that the clock for the watchdog has been enabled
before we try and issue a reset.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:48 +00:00
Ben Dooks cf08167c82 [ARM] 4720/1: S3C2412: Add power configuration registers for battery flat behaviour.
Add the S3C2412_PWRCFG values for the action taken on detecting that
the battery is flat.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:48 +00:00
Ben Dooks 1fb4e5611a [ARM] 4719/1: S3C2412: Update SPI register definitions for the S3C2412
Add S3C2412 register definitions.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:20:48 +00:00
Daniel Mack 4e4fc05a2b [ARM] 4762/1: Basic support for Toradex Colibri module
This patch adds support for Toradex' PXA27x based Colibri module.
It's kept as simple as possible to only provide basic functionality.
A default config is also included.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:27 +00:00
Russell King 2687bd3857 [ARM] pxa: fix mci_init functions returning -1
Fix all those PXA mci_init functions which return -1 rather than
propagating the error code to the higher levels.  Remove the silly
set_irq_type() calls as well - use the flags for request_irq()
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:26 +00:00
Richard Purdie ca4d6cfcee [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix
This patch refactors the code in corgi_lcd.c moving it to the board
specific corgi and spitz files where appropriate instead of the
existing ifdef mess which hinders readability.

Fix spitz_get_hsync_len() to call get_hsync_invperiod so pxafb can be
compiled as a module.

The confusing variables which represent the inverse horizintal sync
period are renamed to "invperiod" consistently.

An incorrect comment in corgi_ts.c is also corrected.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:25 +00:00
Robert Schwebel 2e927b7626 [ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270
This patch adds baseboard support for the phyCORE-PXA270 development
kit (aka PCM-990).

This example shows how to use some phyCORE-PXA270 CPU module features
on a baseboard in a standard manner. It could be used as a starting
point for custom baseboard development.

V2:
 After comments by Eric Miao:
  - IRQ chained handler fixed
  - video/graphic support moved to separate patch
  - ifdef/endif hell reduced ;-)

V3:
 After comments by Russell King
  - initialise the mmci platform data statically

V4:
 After comments by Russell King
  - wrong return value in pcm990_mci_init() fixed

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:24 +00:00
Robert Schwebel 4f15a98025 [ARM] 4746/1: pcm027: network support for phyCORE-PXA270
This patch adds SMC91x support for the phyCORE-PXA270 CPU module (aka PCM-027).

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:23 +00:00
Robert Schwebel 8b0b9fb531 [ARM] 4745/1: pcm027: default configuration
This patch adds a basic configration for the phyCORE-PXA270 development kit. In this case development kit means PCM-990 (main baseboard).

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:22 +00:00
Robert Schwebel 34e31d871e [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module
This patch adds main support for the generic phyCORE-PXA270 CPU module
(aka PCM-027). Its as generic as possible to support any kind of baseboard.

Note: Neither the CPU module nor the pcm027.c implementation can work without
a baseboard support. Baseboard support can be added by the PCM-990 or any
custom variant.

V2:
 After comments by Eric Miao:
  - Currently unsupported devices moved into separate patch
  - direct call of baseboard initialisation

V3:
 After comments by Russell King
  - sort include files
  - setting RTC bit for power control removed
 - style problems fixed (discovered by checkpatch.pl)

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:20 +00:00
Russell King e7b3dc7ef1 [NET] smc91x: Make smc91x use IRQ resource trigger flags
smc91x is shared between many different platforms.  Each platform needs
to specify the interrupt type, and in some cases the irq type depends
on more than just the build configuration - it depends on runtime
checks.

Rather than throwing this code into the SMC_IRQ_FLAGS definition, provide
a way for these flags to be passed via the IRQ resource itself.

Note that IRQF_TRIGGER_* constants are intentionally defined to correspond
with the IORESOURCE_IRQ_* interrupt type flags, in much the same way that
the low bits of PCI iomem resources correspond with the BAR flag bits.

Also provide a way to configure smc91x to read the IRQ flags from the
resource.  Once all platforms have been converted over (signified
by all definitions of SMC_IRQ_FLAGS being -1) SMC_IRQ_FLAGS should
be removed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 13:13:19 +00:00
eric miao 1709e2af78 [ARM] pxa: add default config for littleton
default to

- PXA300/PXA310 support only (there isn't any littleton board with PXA320
  processor for now)

- smc91x ethernet support with NFS rootfs

- LCD framebuffer support with graphics console

Signed-off-by: eric miao <eric.miao>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:18 +00:00
eric miao e1d9b95325 [ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform)
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:17 +00:00
Philipp Zabel e5c271ec3b [ARM] 4664/1: Add basic support for HTC Magician PDA phones
This includes irda, gpio keys, pxafb, backlight, ohci and flash
(read-only).

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:16 +00:00
Ian Molton 3abcd199db [ARM] 4649/1: Base support for pxa-based Toshiba e-series PDAs.
This patch contains the base code to boot the Toshiba e330, e740,
e750, e400, and e800 PDAs.

Signed-off-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:13 +00:00
Dmitry Baryshkov e01dbdb40e [ARM] 4776/1: Add HWUART clock to fix hwuart support
This adds back the registration of HWUART clock on pxa25x

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 12:39:48 +00:00
Jens Axboe febffd6181 cfq-iosched: kill some big inlines
Use of inlines were a bit over the top, trim them down a bit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28 13:19:43 +01:00
Russell King cd4c1eb510 [ARM] Fix class_device damage caused by 0c55445f20
Lots of compile errors in drivers/mfd/ucb1x00-assabet.c...

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 10:59:09 +00:00
Jens Axboe 0871714e08 cfq-iosched: relax IOPRIO_CLASS_IDLE restrictions
Currently you must be root to set idle io prio class on a process. This
is due to the fact that the idle class is implemented as a true idle
class, meaning that it will not make progress if someone else is
requesting disk access. Unfortunately this means that it opens DOS
opportunities by locking down file system resources, hence it is root
only at the moment.

This patch relaxes the idle class a little, by removing the truly idle
part (which entals a grace period with associated timer). The
modifications make the idle class as close to zero impact as can be done
while still guarenteeing progress. This means we can relax the root only
criteria as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-01-28 11:38:15 +01:00
Russell King 193c3cc125 [ARM] Fix timer damage from d3d74453c3
Move the xtime write mode seqlock into timer_tick(), so it only
surrounds the call to do_timer().

This avoids a deadlock in update_process_times() ...
hrtimer_get_softirq_time() which tries to get a read mode seqlock
on xtime, thereby preventing booting.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 10:17:12 +00:00