dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

315 Commits

Author SHA1 Message Date
Ben Dooks 84c9b7271a ARM: S3C244X: Merge plat-s3c24xx s3c2440.h and s3c2442.h into s3c244x.h
Merge these two headers into one, these two SoCs are so similar.

Note, correct fault in mach-smdk2443.h including the wrong header.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-01 17:56:46 +00:00
Ben Dooks 58bac7b8de ARM: S3C24XX: Move S3C2440/S3C2442 plat-s3c24xx support to mach-s3c2440
Remove the old common S3C2440 and S3C2442 SoC support from plat-s3c24xx
into mach-s3c2440 now this directory is serving both SoCs.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-01 17:56:04 +00:00
Ben Dooks e856bb1f8d ARM: SAMSUNG: Remove empty gpio-core.h and use central plat/gpio-core.h
Rename mach-s3c2410/include/mach/gpio-core.h to mach/gpio-track.h so that
it can be included by <plat/gpio-core.h> when needed.

Eliminate all other empty gpio-core.h files and just include the
<plat/gpio-core.h> as necessary.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:46:02 +09:00
Ben Dooks 668dfc7527 ARM: Merge next-samsung-devupdates1
Merge branch 'next-samsung-devupdates1' into next-samsung-try7
2010-01-19 18:36:09 +09:00
Ben Dooks 22c810ab3e ARM: S3C24XX: Add mci platform data set call s3c24xx_mci_set_platdata().
Add a s3c24xx_mci_set_platdata() call for all the machine files that have
platform data for the MCI driver. This brings the MCI device into line with
the other devices with __initdata and a specific call to ensure the right
structure type is being passed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 17:21:38 +09:00
Ben Dooks 0a6361316d ARM: SAMSUNG: Make UART device code common
Move s3c24xx_uart_devs, s3c24xx_uart_src and the platform devices to a
common entry in plat-samsung since they are the same in all the current
implementations.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 09:23:50 +09:00
Maurus Cuelenaere 3929e1e76d ARM: SAMSUNG: Move S3C24XX ADC driver to plat-samsung
Move S3C24XX ADC driver to plat-samsung

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 09:30:49 +09:00
Ben Dooks b3bf41be06 ARM: SAMSUNG: Reduce size of struct clk.
Reduce the size of struct clk by 12 bytes and make defining clocks with
common implementation functions easier by moving the set_rate, get_rate,
round_rate and set_parent calls into a new structure called 'struct clk_ops'
and using that instead.

This change does make a few clocks larger as they need their own clk_ops,
but this is outweighed by the number of clocks with either no ops or having
a common set of ops.

Update all the users of this.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:10 +09:00
Arnaud Patard ce8877b542 ARM: S3C24XX: touchscreen device definition
Add definition for the touchscreen driver platform data and initial
support for the H1940 machine.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-23 19:28:12 +00:00
Linus Torvalds 6bb951a0a6 Merge branch 's3c24xx-updates' of git://git.fluff.org/bjdooks/linux
* 's3c24xx-updates' of git://git.fluff.org/bjdooks/linux:
  ARM: S3C24XX: DMA: Use valid index when accessing array
  ARM: S3C: move s3c_pwm_remove to .devexit.text
  ARM: S3C24XX: Export s3c24xx_set_fiq for modules.
  ARM: S3C: move s3c_adc_remove to .devexit.text
2009-12-09 19:45:58 -08:00
Linus Torvalds 4ef58d4e2a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
  tree-wide: fix misspelling of "definition" in comments
  reiserfs: fix misspelling of "journaled"
  doc: Fix a typo in slub.txt.
  inotify: remove superfluous return code check
  hdlc: spelling fix in find_pvc() comment
  doc: fix regulator docs cut-and-pasteism
  mtd: Fix comment in Kconfig
  doc: Fix IRQ chip docs
  tree-wide: fix assorted typos all over the place
  drivers/ata/libata-sff.c: comment spelling fixes
  fix typos/grammos in Documentation/edac.txt
  sysctl: add missing comments
  fs/debugfs/inode.c: fix comment typos
  sgivwfb: Make use of ARRAY_SIZE.
  sky2: fix sky2_link_down copy/paste comment error
  tree-wide: fix typos "couter" -> "counter"
  tree-wide: fix typos "offest" -> "offset"
  fix kerneldoc for set_irq_msi()
  spidev: fix double "of of" in comment
  comment typo fix: sybsystem -> subsystem
  ...
2009-12-09 19:43:33 -08:00
Ramax Lo 947a246279 ARM: S3C24XX: DMA: Use valid index when accessing array
The DMA_CH_VALID bit used in the channel index should be masked out before
using it to access the channel array.

Signed-off-by: Ramax Lo <ramaxlo@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-08 23:09:05 +00:00
Ben Dooks 0f13c82480 ARM: S3C24XX: Export s3c24xx_set_fiq for modules.
Allow s3c24xx_set_fiq() to be exported so that it can be used by modules
wanting FIQ support.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-08 00:45:55 +00:00
Uwe Kleine-König ad4e22fa47 ARM: S3C: move s3c_adc_remove to .devexit.text
The function s3c_adc_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-By: Ben Dooks <ben@simtec.co.uk>
Cc: Ramax Lo <ramaxlo@gmail.com>
Cc: Nelson Castillo <arhuaco@freaks-unidos.net>
Cc: linux-kernel@vger.kernel.org
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-08 00:45:55 +00:00
André Goddard Rosa af901ca181 tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:55 +01:00
Ben Dooks f18ea8276b ARM: Merge next-s3c24xx-dev-rtp
Merge branch 'next-s3c24xx-dev-rtp' into for-rmk

Conflicts:

	arch/arm/mach-s3c2440/mach-anubis.c
2009-12-03 21:33:01 +00:00
Ben Dooks 2a3a18045b ARM: S3C: Add NAND device platform data set call 2009-12-01 01:34:16 +00:00
Ben Dooks ccae941ee2 ARM: S3C: Update Simtec copyright statements from , to - [2]
There are a number of statements of the form A, B or A, B, C where
the numbers A,B,C are not consecutive. However, referencing [1] it
is the correct thing to replace these with A-B or A-C as apropriate.

[1] http://www.copyrightservice.co.uk/copyright/p03_copyright_notices
    section 4iii 'Year of publication'

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-01 01:33:51 +00:00
Ben Dooks e02f866456 ARM: S3C: Update Simtec copyright statements from , to -
There are a number of statements of the form A, B or A, B, C where
the numbers A,B,C are consecutive. Tidy these up to be A-B or A-C
as appropriate and to comply better with copyright standards [1]

[1] http://www.copyrightservice.co.uk/copyright/p03_copyright_notices
    section 4iii 'Year of publication'

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-01 01:33:51 +00:00
Ben Dooks 50f430e3ad ARM: S3C: Fix Simtec copyright statements in Documentation/S3C24XX
The (c) alone is not a sufficient copyright statement, nor is it a
good replacement for the proper encircled &copy; symbol [1]. Add the
word copyright to the apropriate places and remove the (c) symbol.

[1] http://www.copyrightservice.co.uk/copyright/p03_copyright_notices
    section 4 'What does a notice consist of?'

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-01 01:33:50 +00:00
Ben Dooks 95eb56965c ARM: S3C24XX: Add documentation for arch/arm/plat-s3c24xx/include/plat/mci.h
Add documentation for the platform data structure in the SD/MMC driver
header file arch/arm/plat-s3c24xx/include/plat/mci.h.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-01 01:33:49 +00:00
Ben Dooks 4d3a3469db ARM: S3C24XX: machine support for Simtec Audio
Add the platform/machine support for the audio devices fitted to
the Simtec range of boards since the move to ASoC.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-01 01:33:48 +00:00
Michael Roth fa3012318b Kconfig: Remove useless and sometimes wrong comments
Additionally, some excessive newlines removed.

Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:56 +01:00
Ben Dooks 365854af7e ARM: S3C24XX: Fix warnings in arch/arm/plat-s3c24xx/gpio.c
Fix the following warnings from sparse in arch/arm/plat-s3c24xx/gpio.
due to the missing include of <mach/gpio-fns.h>

gpio.c:36:6: warning: symbol 's3c2410_gpio_cfgpin' was not declared. Should it be static?
gpio.c:84:14: warning: symbol 's3c2410_gpio_getcfg' was not declared. Should it be static?
gpio.c:103:6: warning: symbol 's3c2410_gpio_pullup' was not declared. Should it be static?
gpio.c:125:5: warning: symbol 's3c2410_gpio_getpull' was not declared. Should it be static?
gpio.c:138:6: warning: symbol 's3c2410_gpio_setpin' was not declared. Should it be static?
gpio.c:157:14: warning: symbol 's3c2410_gpio_getpin' was not declared. Should it be static?
gpio.c:184:5: warning: symbol 's3c2410_gpio_getirq' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-10-28 18:34:45 +00:00
Julia Lawall 60e5c1b5ec ARM: S3C24XX: arch/arm/plat-s3c24xx: Move dereference after NULL test
If the NULL test on buf is needed, then the dereference should be after the
NULL test.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-10-28 18:25:57 +00:00
Ryan Mallon d3bf3956c7 ARM: S3C: Fix adc function exports
Fix the export of s3c_adc_read.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
[ben-linux@fluff.org: remove unexport of s3c_adc_start, needed for ts]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-10-28 18:25:57 +00:00
Ben Dooks 2e31de6511 ARM: S3C2410: Fix link if CONFIG_S3C2410_IOTIMING is not set
Fix the link errors if cpu-frequency support is enabled on s3c2410 systems
but there is no CONFIG_S3C2410_IOTIMING set. Fix this by ensuring the
relevant symbols are defined NULL if the code is not being built in.

Fixes the following error:
arch/arm/mach-s3c2410/built-in.o: undefined reference to `s3c2410_iotiming_get'
arch/arm/mach-s3c2410/built-in.o: undefined reference to `s3c2410_iotiming_set'
arch/arm/mach-s3c2410/built-in.o: undefined reference to `s3c2410_iotiming_calc'

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-10-28 18:25:57 +00:00
Harald Welte f5fb9b1a15 ARM: S3C24XX: Introduce S3C2442B CPU
Add the S3C2442B CPU ID to aid support the Openmoko GTA02 / Freerunner.

Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
[ben-linux@fluff.org: edit description for clarity and S3C2442B as uppercase]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-10-28 18:25:56 +00:00
Ramax Lo b4719cd627 ARM: S3C24XX: Define a macro to avoid compilation error
Define a macro to avoid the following error during kernel build process
for platforms other than s3c2410:

arch/arm/plat-s3c24xx/cpu.c:84: error: ‘s3c2410a_init’ undeclared here (not in a function)

Signed-off-by: Ramax Lo <ramaxlo@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-10-28 18:25:56 +00:00
Alexey Dobriyan d43c36dc6b headers: remove sched.h from interrupt.h
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-10-11 11:20:58 -07:00
Ben Dooks 00acfaeead s3cmci: add better support for no card detect or write protect available
Add better support for omitting either the card detect or the write
protect GPIOs if the board does not support it.  Add the fields
no_wprotect and no_detect to the platform data which when set indicate the
absence of the respective GPIOs.

Note, this also fixes a minor bug where it tries to free IRQ0 if there is
no detect gpio available.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01 16:11:15 -07:00
Ben Dooks 26f14947db s3cmci: Kconfig selection for PIO/DMA/Both
Add a selection for the data transfer mode of the s3cmci driver, allowing
for either a configuration or rumtime selection of the use of the DMA or
PIO transfer code.

The PIO only mode is 476 bytes smaller than the driver with both methods
compiled in.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01 16:11:15 -07:00
Russell King 87d721ad7a Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
Ben Dooks db616eb676 ARM: S3C: Add S3C_DEV_NAND Kconfig entry
Currently the S5PC100 does not define S3C_PA_NAND, leaving the NAND device
definitions in arch/arm/plat-s3c/dev-nand.c unbuildable. Add a KConfig
entry to select whether this is built.

As backwards compatibility, both the S3C24XX and S3C64XX define the new
configuration in their main Kconfig files until better support for basing
this selection on a per-machine basis can be sorted out.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-08-16 23:54:58 +01:00
Ben Dooks b282e29b54 Merge branch 'next-s3c64xx-moves' into next-s3c 2009-08-14 15:24:06 +01:00
Ben Dooks 215ed3236a Merge branch 'next-s3c24xx-cpufreq' into next-s3c 2009-08-14 15:23:45 +01:00
Ben Dooks 0fbdd27007 Merge branch 'next-s3c24xx' into next-s3c 2009-08-14 15:23:34 +01:00
Ben Dooks a2c195fdde ARM: S3C24XX: Add SPI bus 1 on GPD8 through GPD10
Add configuration callback for SPI bus 1 on GPD[8..10] and ensure the
correct GPIO configuration register definitions in regs-gpio.h

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-08-14 01:26:09 +01:00
Mark Brown d91e9a7ab9 ARM: S3C24XX: Add platform device for AC97 controller
Move the definition of the "generic" IRQ in the process.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-08-14 01:13:29 +01:00
Ben Dooks 229fd8ffba ARM: S3C24XX: Add FIQ IRQ routing support
Add support for routing an IRQ from the normal ARM IRQ mechanism to the
FIQ input of the processor.

Note, also fix a bug where the init_FIQ() function has not been called
when CONFIG_FIQ is enabled.

Signed-off-by; Ben Dooks <ben@simtec.co.uk>

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-08-14 01:13:28 +01:00
Davide Rizzo 48ec45e725 ARM: S3C24XX: Fix clkout mpx error
Bug correction: CLK Outputs cannot have XTAL as parent

Signed-off-by: Davide Rizzo <elpa.rizzo@gmail.com>
[ben-linux@fluff.org: updated patch subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-08-14 00:45:49 +01:00
Peter Korsgaard b5ead1cda6 ARM: S3C: move timer/pwm handling from plat-s3c24xx to plat-s3c
The s3c64xx devices use the same hardware core as s3c24xx, so move
the timer/pwm handling to plat-s3c so it can be used by both.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-31 00:10:24 +01:00
Peter Korsgaard 14077ea63b ARM: S3C: move s3c_device_nand from plat-s3c24xx to plat-s3c
Move the s3c_device_nand platform device from plat-s3c24xx to plat-s3c,
now that the nand driver also support the s3c64xx devices.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-31 00:10:24 +01:00
Peter Korsgaard 165f5f6419 ARM: S3C: PWM fix for low duty cycle
The pwm hardware only checks the compare register after a decrement,
so the pin never toggles if tcmp = tcnt.

This happens when a very low duty cycle is requested. Fix it by always
ensuring that tcmp < tcnt.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:54:50 +01:00
Ben Dooks e6d197a695 ARM: S3C: CPUFREQ: Add debugfs support for cpufreq
Add debugfs support for the cpufreq driver to allow
information about the system state to be exported to
the user.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:56 +01:00
Ben Dooks f0176794b6 ARM: S3C2410: Add S3C2410A sysdev.
Add a sysdev S3C2410A sysdev to allow the differentiation
of the S3C2410A from the S3C2410. This is needed for the
CPUFREQ code to enable the extra features and update cpu
specific information.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:55 +01:00
Ben Dooks 140780ab5a ARM: S3C24XX: CPUFREQ: S3C2412/S3C2443 IO timing support
Add IO bank timing support for S3C2412/S3C2443.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:55 +01:00
Ben Dooks 0345b51c6a ARM: S3C2440: CPUFREQ: Add crystal frequency Kconfig entries.
Add entries to select the crystal to select for each different
supported board. This information is then available for anything
else requiring this, such as the CPUFreq PLL tables.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:53 +01:00
Ben Dooks 78278d6a96 ARM: S3C2440: CPUFREQ: Add PLL tables
Add PLL tables for the S3C2440.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:53 +01:00
Ben Dooks 342e20f102 ARM: S3C2440: CPUFREQ: Add core support.
Add core support for frequency scaling on the S3C2440 SoC.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:53 +01:00
Ben Dooks a24c091db9 ARM: S3C2410: CPUFREQ: Add core support.
Add core support for frequency scaling on the S3C2410 SoC.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:52 +01:00
Ben Dooks 831a6fcb93 ARM: S3C2410: CPUFREQ: Add io-timing support.
Add io-timing support for frequency scaling on the S3C2410 SoC.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:52 +01:00
Ben Dooks d6fc87d3f7 ARM: S3C: CPUFREQ: Move struct s3c_cpufreq_config to cpu-freq-core.h
Move the structure s3c_cpufreq_config from cpu-freq.h to the
less advertised cpu-freq-core.h as it is not needed by anything
outside the core drivers.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:51 +01:00
Ben Dooks 2e4ea6e820 ARM: S3C24XX: CPUFREQ: Add core support.
Add the core of the support for enabling the CPUFreq driver on
all S3C24XX based systems.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-30 23:22:51 +01:00
Ben Dooks e170adcb40 ARM: S3C: Add ADC synchronous read call.
To add HWMON support, we need a synchronous read() call that blocks
until completion. Add the client that is being service to the select
and convert callbacks to make the code easier.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-18 10:15:53 +01:00
Ben Dooks c197cec5fa ARM: S3C: Update hwmon device definition and name
Change the hwmon device name to something more generic as this
should be functional for both the s3c24xx and s3c64xx archs.

Since it has yet to have a driver, it is pretty safe to change
as there are no extant users.

Also add the necessary entry in devs.h which seems to have been
missed  out at somepoint.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-07-18 10:15:53 +01:00
Ben Dooks 927dbcd668 [ARM] S3C24XX: Fix spi-bus configuration build errors
The commit ec976d6eb0
removed a number of gpio definitions from <mach/hardware.h>
but misssed updating these two files:

Fix the following build errors by including <linux/gpio.h>:
arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c: In function 's3c24xx_spi_gpiocfg_bus1_gpg5_6_7':
arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c:25: error: implicit declaration of function 's3c2410_gpio_cfgpin'
arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c:28: error: implicit declaration of function 's3c2410_gpio_pullup'
arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c: In function 's3c24xx_spi_gpiocfg_bus0_gpe11_12_13':
arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c:25: error: implicit declaration of function 's3c2410_gpio_cfgpin'
arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c:28: error: implicit declaration of function 's3c2410_gpio_pullup'

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-06-23 16:16:01 +01:00
Ben Dooks 291e99a112 [ARM] S3C24XX: Fix use of CONFIG_S3C24XX_PWM
CONFIG_S3C24XX_PWM was defined in arch/arm/plat-s3c24xx/Kconfig but
not used anywhere else as the corresponding makefile used
CONFIG_HAVE_PWM (selected by CONFIG_S3C24XX_PWM) to compile the PWM
driver.

Change the makefile to use CONFIG_S3C24XX_PWM to compile this driver
to ensure it is only build when needed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-06-23 12:24:06 +01:00
Russell King 547c32aeb5 Merge branch for-rmk-devel of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2009-06-10 22:41:06 +01:00
Ben Dooks 99ae99533a [ARM] S3C24XX: Merge devel-gpio
Merge branch 'devel-gpio' into for-rmk-devel
2009-05-21 22:10:21 +01:00
Ben Dooks 5233c178d4 [ARM] S3C24XX: GPIO: Fix missing GPIOs in gpiolib
The GPG bank has 16 IOs, not 10. Add the missing GPH bank.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 20:20:12 +01:00
Ben Dooks 9c0ec95797 [ARM] S3C24XX: GPIO: Move gpiolib initialisation earlier
The arch_initcall() is too late for board initialisation to use
gpiolib when doing their machine specific initilisation via the
.init_machine callback.

Bring the file into line with the s3c64xx implementation and use
the core_initcall() to register the GPIO chips.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 20:03:23 +01:00
Ben Dooks 373e9644c5 [ARM] S3C24XX: GPIO: Fix error returns from gpio functions
Several GPIO functions have been returning -1 to indicate
an error instead of returning a proper error code. Change
to return -EINVAL for invalid argument(s).

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 19:40:18 +01:00
Ben Dooks bcb8a0d6f5 [ARM] S3C: Merge next-s3c64xx-dma2 into for-rmk-devel
Merge branch 'next-s3c64xx-dma2' into for-rmk-devel

Conflicts:

	arch/arm/plat-s3c64xx/Makefile
2009-05-18 16:32:29 +01:00
Ben Dooks 070276d5d0 [ARM] S3C24XX: GPIO: Change to macros for GPIO numbering
Prepare to remove the large number of S3C2410_GPxn defines
by moving to S3C2410_GPx(n) in arch/arm.

The following perl was used to change the files:

    perl -pi~ -e 's/S3C2410_GP([A-Z])([0-9]+)([^_^0-9])/S3C2410_GP\1\(\2\)\3/g'

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 16:26:03 +01:00
Ben Dooks fda7b2b097 [ARM] S3C24XX: GPIO: Start removal of S3C24XX_GPIO_BASE
The S3C24XX_GPIO_BASE makes it difficult to compress the
GPIO number space, and is only used in a few places of
which everything outside arch/arm/plat-s3c24xx/gpiolib.c
will be removed as soon as possible.

Change gpiolib.c to use the S3C2410_GPxCON register addresses
as the base for each bank, thus eliminating S3C24XX_GPIO_BASE.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 16:26:02 +01:00
Ben Dooks 86c03c526e [ARM] S3C24XX: Fix missing <linux/sysdev.h>
In our recent changes, arch/arm/plat-s3c24xx/gpiolib.c needs
to have <linux/sysdev.h> included for it to build.

This fixes the following error/warnings:

arch/arm/plat-s3c/include/plat/pm.h:104: error: expected declaration specifiers or '...' before 'pm_message_t'
arch/arm/plat-s3c/include/plat/pm.h:104: warning: 'struct sys_device' declared inside parameter list
arch/arm/plat-s3c/include/plat/pm.h:104: warning: its scope is only this definition or declaration, which is probably not what you want
arch/arm/plat-s3c/include/plat/pm.h:105: warning: 'struct sys_device' declared inside parameter list

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 16:26:01 +01:00
Ben Dooks ec976d6eb0 [ARM] S3C24XX: GPIO: Move gpio functions out of <mach/hardware.h>
Move all the gpio functions out of <mach/hardware.h> as
this file is for defining the generic IO base addresses
for the kernel IO calls.

Make a new header <mach/gpio-fns.h> to take this and
include it via the chain from <linux/gpio.h> which is
what most of these files should be using (and will be
changed as soon as possible).

Note, this does make minor changes to some drivers but
should not mess up any pending merges.

CC: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 16:25:40 +01:00
Ben Dooks 9f05f6a921 [ARM] S3C24XX: GPIO: Remove pin specific input and output defines
The use of S3C2410_GP[A-Z]x_INP and S3C2410_GP[A-Z]x_OUTP are
very rare and are taking up large amounts of space in the
regs-gpio.h header.

The GPIO layer has had generic input and out defines called
S3C2410_GPIO_INPUT and S3C2410_GPIO_OUTPUT for a while which work
for all S3C24XX GPIOs.

Do the following replacements:

   S3C2410_GP[A-Z][0-9]*_\OUTP => S3C2410_GPIO_OUTPUT
   S3C2410_GP[A-Z][0-9]*_\INP  => /S3C2410_GPIO_INPUT
   S3C2410_GPA[0-9]*_OUT       => S3C2410_GPIO_OUTPUT

to remove any usages of these and prepare the header for
the removal of these.

The following command was used to acheive this:

find . -type f -writable ! -name regs-gpio.h ! -name "*~" | xargs sed -i~ -e 's/S3C2410_GP[A-Z][0-9]*_\OUTP/S3C2410_GPIO_OUTPUT/g' -e 's/S3C2410_GP[A-Z][0-9]*_\INP/S3C2410_GPIO_INPUT/g' -e 's/S3C2410_GPA[0-9]*_OUT/S3C2410_GPIO_OUTPUT/g'

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-17 22:21:26 +01:00
Ben Dooks ec7f4d5d67 [ARM] S3C24XX: GPIO: Remove s3c2410_gpio_irq2pin() call
Remove the s3c2410_gpio_irq2pin() function as it is not being
used in any in kernel driver and the function is probably not
being used anywhere else.

This is also part of the effort to remove any of the s3c24xx gpio
specific code that cannot be recreated by using the gpiolib
framework now in the kernel.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-17 22:21:11 +01:00
Nelson Castillo 3f7ea467be [ARM] S3C: ADC: Expose number of remaining conversions to
convert callback

This patch allow us to efficiently modify the number of
remaining conversions from the client side. This us useful
when we do not know in advance how many conversions we will
need or when we need to cancel pending conversions.

This change is simple enough to be compatible with existing
code that can just define the new pointer in the callback
and ignore it.

Sample usage:

http://tinyurl.com/s3c2410-ts-c (function stylus_adc_action).

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-16 22:22:01 +01:00
Ben Dooks 871fcd7cf7 [ARM] S3C24XX: Fix unused code warning in arch/arm/plat-s3c24xx/dma.c
Fix unused code warning in arch/arm/plat-s3c24xx/dma.c if there
is no PM support enabled. The function to_dma_chan() should
be marked inline so that the compiler will eliminate it without
warning if it isn't used.

arch/arm/plat-s3c24xx/dma.c:1239: warning: 'to_dma_chan' defined but not used

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-15 15:13:24 +01:00
Ben Dooks d87964c460 [ARM] S3C: GPIO PM core GPIOlib integration
Move the GPIO suspend/resume support inline with the gpiolib support
so that it will work with both the S3C24XX and S3C64XX series.

The s3c_gpio_chip is extended to have a pm callback and a save block
to keep the state of the GPIO over suspend, and the code from the
s3c24xx implementation is added to a new common file.

The suspend process now uses the list of registered chips to go through
saving and restoring each one as appropriate, using the pm callback to
select the appropriate routine depending on the type of control register
present.

This change also means that any additional GPIO added should not require
changes to the PM.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-07 11:04:56 +01:00
Ben Dooks 57699e9adf [ARM] S3C: Add debug to UART save and a per-arch callback pre-restore
Add a simple debug message on saving the UART state and add a per-arch
pre-restore function to be used by the s3c64xx restore code to ensure
the UARTs control registers do not go through any illegal state changes.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-07 11:04:55 +01:00
Ben Dooks e6a2a9ce69 [ARM] S3C: Rename S3C24XX_PA_USBHOST to S3C_PA_USBHOST
The USB host base address is available on both the S3C24XX and S3C64XX
ranges.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-07 11:04:54 +01:00
Ben Dooks eca8655ffa [ARM] S3C: Add common USB OHCI device definition
Add common definition for USB OHCI platform device, add a Kconfig
to selectively compile it and add update all the users.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-07 11:04:54 +01:00
Ben Dooks 97c1b14523 [ARM] S3C: Move DMA channel management code to plat-s3c
Change the name of S3C2410_DMA_CHANNELS to S3C_DMA_CHANNELS in the process.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 11:39:07 +01:00
Ben Dooks 023b40cd10 [ARM] S3C24XX: Fix indentation in <plat/dma-regs.h>
The <plat/dma-regs.h> pre-date the invention of the TAB character,
so fix the indentation of the register defines.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 11:39:06 +01:00
Ben Dooks 44dc94045f [ARM] S3C24XX: DMA: Split hardware regs out of <mach/dma.h>
The <mach/dma.h> is for the driver API for the DMA system and should
not have anything relying on the CPU specific registers.

Remove the registers to <plat/dma-regs.h> for the code that really
needs to know about them.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 11:39:06 +01:00
Ben Dooks 8970ef47d5 [ARM] S3C24XX: Remove hardware specific registers from DMA
calls

The S3C24XX DMA API channel configuration registers are being passed
values comprised of register values which makes it hard to move the
API to cover both the S3C24XX and S3C64XX.

These values can be calculated from knowing which device the channel
is connected to, so remove them from the two calls s3c2410_dma_config
and s3c2410_dma_devconfig.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 11:39:06 +01:00
Ben Dooks 5a9eb8da8b [ARM] S3C24XX: Move plat/dma.h
Move the platform dma.h to dma-plat.h to ensure it doen't get
confused with plat/dma.h

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 11:39:06 +01:00
Ramax Lo 0c3ee07825 [ARM] S3C24XX: ADC: Check pending queue before freeing adc client
Check pending queue and remove the adc client being released.

Signed-off-by: Ramax Lo <ramaxlo@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-17 12:46:36 +01:00
Ben Dooks f8c8ac8109 [ARM] S3C: Fix ADC driver sparse warning
The symbol 's3c_adc_try' in arch/arm/plat-s3c24xx/adc.c
does not need to be exported and thus should be static.

This fixes the following sparse warning:

adc.c:103:6: warning: symbol 's3c_adc_try' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-17 12:42:25 +01:00
Ben Dooks ec5cfbfc05 [ARM] S3C24XX: Fix sparse error in gpiolib.c
Fix the following sparse error generated by including
<plat/gpio-core.h> instead of <mach/gpio-core.h>

gpiolib.c:78:22: warning: symbol 's3c24xx_gpios' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-17 12:42:24 +01: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 f5f0e17a84 Merge branch 'next-s3c-pm' of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2009-03-26 22:44:43 +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
Mark Brown 603b6fd5b8 [ARM] Revert futher extraneous changes from the S3C header move
Can't see any immediate need for these; build tested.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-11 18:28:24 +00:00
Ben Dooks fff94cd9f5 [ARM] S3C: Tidy sleep code path to fix call flow
As noted by Russell King, the sleep code path is not
elegant and makes use of leaving items on the stack
between calls.

Change the code that does the following:

        if (s3c_cpu_save(regs_save) == 0) {
                flush_cache_all();
                S3C_PMDBG("preparing to sleep\n");
                pm_cpu_sleep();
        }

to simply call s3c_cpu_save, and let that do the
necessary calls to quiesce and sleep the system.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-10 11:48:07 +00:00
Ben Dooks d2b07fe2a3 [ARM] S3C: Update UART save over PM suspend/resume
Change the way the UART state is saved over suspend to allow the s3c64xx
code to modify the settings on resume to avoid any illegal state changes
to the UART clocks. This will also allow us to save the UDIVSLOT register
on newer SoCs.

Move to using a structure for the UART use the extant Kconfig configuration
specifying the number of UARTs.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:37:10 +00:00
Ben Dooks ef30e14420 [ARM] S3C: Rename sleep.S functions to be non-cpu specific
Rename s3c2410_cpu_resume to s3c_cpu_resume and s3c2410_cpu_save to
s3c_cpu_save to remove the CPU specific naming of these functions
which are now in the generic PM code.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:37:05 +00:00
Ben Dooks 4e59c25dcb [ARM] S3C: Rename s3c2410_pm_init to s3c_pm_init.
Since we have moved a large proportion of the PM code to the common
support area, remove the cpu specific name from the initialisation
function.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:35:47 +00:00
Ben Dooks 56b3442688 [ARM] S3C: Make IRQ_EINT sleep control common
Move the IRQ_EINT sleep control to be available to all
s3c impelmentations. Since s3c_irqext_wake is not large,
place it in arch/arm/plat-s3c/pm.c as adding it to a new
file would be a waste of compile time.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:35:36 +00:00
Ben Dooks 7299a40918 [ARM] S3C24XX: Remove changelog from arch/arm/plat-s3c24xx/irq.c
Remove the changelog, this file is in version control.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:35:30 +00:00
Ben Dooks 65fa22b73f [ARM] S3C24XX: Split PM code from arch/arm/plat-s3c24xx/irq.c
Split the PM code out of arch/arm/plat-s3c24xx/irq.c to
remove some of the #ifdefs being used. Also fix a couple
of places where the absecnce of a function was redefined
to the same thing.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:35:25 +00:00
Ben Dooks 2261e0e6e3 [ARM] S3C: Move plat-s3c24xx pm.c support into plat-s3c
Move parts of the core and debug suspend code into the
plat-s3c for use with the new s3c64xx code.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:33:51 +00:00
Ben Dooks 549c7e33ae [ARM] S3C: Split the resume memory check code from pm.c
Split the optional memory check code out of the pm.c file
as it is quite a big #ifdef block and as-such can be moved
out and simply compiled when the configuration is set.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:33:39 +00:00
Ben Dooks 6419711a16 [ARM] S3C: Move PM support functions to common location
Start moving the PM code by moving all the common support functions
to a common location in arch/arm/plat-s3c. With the move we rename
the functions from s3cxxx_ to s3c_ to fit the new location.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:23:51 +00:00
Ben Dooks a3f66351b3 [ARM] S3C: Nove <plat/pm.h> from plat-s3c24xx to plat-s3fc
Move the <plat/pm.h> header to plat-s3c as preparation
for moving parts of the s3c24xx pm support which are
common into the plat-s3c support.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:23:41 +00:00
Ben Dooks 8150bc886b S3C24XX: Move and update IIS headers
Move the IIS headers to their correct place.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-05 12:00:59 +00:00
Russell King 80b02c172b [ARM] fix AT91, davinci, h720x, ks8695, msm, mx2, mx3, netx, omap1, omap2, pxa, s3c
arch/arm/mach-at91/at91cap9.c:337: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91rm9200.c:301: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9260.c:351: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9261.c:287: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9263.c:312: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9rl.c:304: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-h720x/h7202-eval.c:38: error: implicit declaration of function 'IRQ_CHAINED_GPIOB'
arch/arm/mach-ks8695/devices.c:46: error: 'KS8695_IRQ_WAN_RX_STATUS' undeclared here (not in a function)
arch/arm/mach-msm/devices.c:28: error: 'INT_UART1' undeclared here (not in a function)
arch/arm/mach-mx2/devices.c:233: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function)
arch/arm/mach-mx3/devices.c:128: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:140: error: 'INT_730_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:165: error: 'INT_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:200: error: 'INT_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap2/board-apollon.c:286: error: implicit declaration of function 'omap_set_gpio_direction'
arch/arm/mach-omap2/mcbsp.c:154: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function)
arch/arm/mach-omap2/mcbsp.c:181: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function)
arch/arm/mach-pxa/e350.c:36: error: 'IRQ_BOARD_START' undeclared here (not in a function)
arch/arm/plat-s3c/dev-i2c0.c:32: error: 'IRQ_IIC' undeclared here (not in a function)
...

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-08 16:29:42 +00:00
Ben Dooks 43ae6599fe [ARM] S3C24XX: Add gpio_to_irq implementation
Add to_irq field handlers for the GPIO banks that are configurable
as interripts.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-01-08 16:24:08 +00:00
Ben Dooks 6a148eaa20 [ARM] S3C: Remove unnecessary <linux/delay.h> includes
As per Russell King's last review comment, find and remove
all unnecessary includes of <linux/delay.h> in the files
that do not need them.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-18 16:36:02 +00:00
Ben Dooks dbf35992e1 [ARM] S3C24XX: Add fourth UART definition for S3C2443
Add the fourth UART definition for the S3C2443, and at the
same time fixup the problems caused by the enlarging of the
UART array in the previous commits.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-18 16:26:16 +00:00
Ben Dooks 56c035c9ce Merge branch 'next-s3c64xx-device' into next-merged
Conflicts:

	arch/arm/mach-s3c2440/mach-at2440evb.c
2008-12-18 16:17:37 +00:00
Ben Dooks 7f2754378f Merge branch 'next-s3c64xx' into next-merged 2008-12-18 14:52:04 +00:00
Ben Dooks c6ad115876 Merge branch 'next-s3c24xx' into next-merged 2008-12-18 14:52:00 +00:00
Ben Dooks e2178d4374 [ARM] S3C24XX: Add extra GPIOs via Kconfig
Add Kconfig entries to allow more GPIO space to
be specified depending on the machine(s) selected.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-18 14:43:07 +00:00
Ben Dooks 28ab44c5be [ARM] S3C24XX: ADC driver core
A common core driver for the S3C24XX ADC block so that
the touchscreen, hwmon and any other drivers can share
the resource.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-18 14:20:04 +00:00
Ben Dooks 9d325f2341 [ARM] S3C: Update time initialisation to fix S3C64XX time problems
The S3C64XX timer is running at the wrong rate due to the
assumptions made in the timer initialisation about the way
the pwm dividers work. This means that time on the S3C64XX
runs twice as fast as it should.

Fix the problem by moving to using the clk framework to setup
the pwm timer clock muxes, as the pwm-clock code has all the
necessary knowledge of how the timer clock inputs are routed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-16 10:13:02 +00:00
Ben Dooks b09bcdd4c2 [ARM] S3C64XX: Update TCFG for new timer divider settings.
The S3C64XX series has a new TCFG divider setting to allow the clock
directly through, which means that we need to update the pwm-clock
code to cope with this.

Add <mach/pwm-clock.h> containing the specific code to deal with the
TCFG divider settings and provide any other per-arch data that the
pwm-clock driver needs to function.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-16 10:01:23 +00:00
Ben Dooks 3e1b776c2b [ARM] S3C: Make i2c device definition common to plat-s3c
Make the device i2c0 common to plat-s3c and move the
definitions from arch/arm/plat-s3c24xx/devs.c

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:40:26 +00:00
Ben Dooks 21b23664b9 [ARM] S3C: Add new GPIO configuration calls
Add new GPIO configuration calls that mesh with the
new gpiolib support.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:34:15 +00:00
Ben Dooks 7db6c82a37 [ARM] S3C: Move common GPIO code from plat-s3c24xx
Move the common parts of the GPIO code into plat-s3c
for use with both the s3c24xx and s3c64xx systems.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:33:20 +00:00
Ben Dooks 5b323c7beb [ARM] S3C: Move HSMMC device definition to plat-s3ec
Move the definition for the hsmmc device to plat-s3c
to be shared between the s3c24xx and s3c64xx platforms.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:32:34 +00:00
Ben Dooks e1a2bd1d2f [ARM] S3C64XX: Add system boot-time support
Add the necessary defines for <mach/uncompress.h>
to function and build an working header code block.

Signed-off-by: Ben Doioks <ben-linux@fluff.org>
2008-12-15 21:49:32 +00:00
Ben Dooks bcae8aeb32 [ARM] S3C24A0: Initial architecture support files
Initial architecture support for the S3C24A0 ARCH_S3C24A0.

We don't yet add an kconfig entry in the main arch/arm/Kconfig
file as the series is not complete, so that is left until enough
support is in to be useful.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:39 +00:00
Ben Dooks ce46a9c497 [ARM] S3C24XX: Split map.h into plat-s3c24xx and mach-s3c2410
Split the map.h definitions into common S3C24XX code by
adding arch/arm/plat-s3c24xx/include/plat/map.h and
altering the machine specific header for the S3C24A0.

As we add a new <plat/map.h> we move the original one
in arch/arm/plat-s3c include directory to be called
map-base.h to distinguish the two files.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:38 +00:00
Ben Dooks f2edc7565a [ARM] S3C24XX: Reduce code lineage of gpiolib.c
All the s3c24xx gpiolib chips share the same get/set
calls and all but one bank shares the same calls for
.direction_input and .direction_output methods.

Change the initialisation process to use an new call
to register the chips that fills in any blank calls
with the default values to avoid having to fill them
in the structure initialisers.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:24 +00:00
Ben Dooks 93b458858f [ARM] S3C: Move pwm-clock.c to arch/arm/plat-s3c
Move pwm-clock.c to arch/arm/plat-s3c
to be shared with the S3C64XX implementations.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:20 +00:00
Ben Dooks adbefaa5fd [ARM] S3C: Move core clock support to plat-s3c
Move the core clock registration and definitions
in arch/arm/plat-s3c24xx/clock.c to arch/arm/plat-s3c
to be shared with the S3C64XX implementations.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:18 +00:00
Ben Dooks b915a12511 [ARM] S3C: Move time.c to arch/arm/plat-s3c
Move time.c to arch/arm/plat-s3c
to be shared with the S3C64XX implementations.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:15 +00:00
Ben Dooks 6af0e929e9 [ARM] S3C: Move S3C2410_EXTINT to common regs-irqtype.h header
Add a common include file (regs-irqtype.h) for the IRQ
trigger control register values S3C2410_EXTINT*.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:13 +00:00
Ben Dooks a503059c14 [ARM] S3C24XX: Move headers from plat-s3c24xx to plat-s3c
Move clock.h, cpu.h and devs.h to plat-s3c for use
with the s3c64xx support.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:10 +00:00
Ben Dooks e425382ed9 [ARM] S3C24XX: Update clock data on resume
Update the clock settings on resume for suspend/resume
support so that if the boot loader changes anything or
the system's PLL is reset then we return with the correct
settings.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:08 +00:00
Ben Dooks c3391e36d6 [ARM] S3C24XX: Change clock locking to use spinlocks.
We cannot sleep if we have cpufreq pm enabled during some
of the clock operations, so change to use a spinlock to
protect the clock system.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:07 +00:00
Ben Dooks e24b864ab3 [ARM] S3C24XX: Split pll code out of regs-clock.h
Move the PLL calculation code into it's own header
file for re-use with the other plat-s3c24xx based
systems such as the S3C24A0.

Note, we change the name of s3c2410_get_pll to the
more generically named s3c24xx_get_pll as well as
the related defintions.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:02 +00:00
Ben Dooks 93bc6b6371 [ARM] S3C24XX: Split DCLK/CLKOUT definitions out of clock.c
Only certain boards need these clocks, and they are not
available on some CPUs (such as the S3C24A0) so remove
them from arch/arm/plat-s3c24xx/clock.c and into their
own file with appropriate Kconfig entries.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:46:00 +00:00
Ben Dooks 74b265d4e0 [ARM] S3C24XX: Move initialisation code to arch/arm/plat-s3c
We need to add plat-s3c to the build to get the headers
that will go in here once moved from include/asm-arm so
we may as well put some useful common s3c code in here
to stop the errors generated form having nothing built.

The cpu setup is now passed the cpu idcode and the table
of supported cpus to s3c_init_cpu() to abstract the
cpu identification out of the initial io setup.

As well as moving the cpu initialisation code, we move the
map of the board specific items up to the calling code as
none of the map_io() functions actually do anything other
than pass this to iotable_init().

This patch does not rename any of the init functions that
will be common to s3c24xx and any other s3c architectures
as this can be done at a later date as it will touch all
the board support files which use functions such as
s3c24xx_init_clocks() and s3c24xx_init_uarts().

Note, the header arch/arm/plat-s3c24xx/include/plat/cpu.h
still has functions that are used by both the cpu and
board initialisation functions. This means that each board
has definitions specific to the cpu support included and
the vice-versa.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:45:57 +00:00
Ben Dooks 1b3ba68884 [ARM] S3C2410: Move base clock code to plat-s3c24xx
Move the S3C2410 base clock list to arch/arm/plat-s3c24xx
as this code is common to the S3C2410, S3C2440 and S3C2442
cpus.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:45:47 +00:00
Ben Dooks b2a6cf3b1e [ARM] S3C24XX: Default SPI pin configuration for SPI
Add a set of default pin configuration routines for
setting up the SPI gpio configuration when using the
hardware SPI driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 21:45:42 +00:00
Russell King fba670013d Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2008-11-29 19:35:07 +00:00
Russell King dcea83adc6 [ARM] Hide ISA DMA API when ISA_DMA_API is unset
When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.

This allows us to remove a lot of mach/dma.h files which don't contain
any useful code.  Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-29 18:42:40 +00:00
Ben Dooks e3bd9ec5d8 [ARM] S3C24XX: Move mci.h to arch/arm/plat-s3c24xx/include/plat
Move mci.h to new position in arch/arm/plat-s3c24xx/include/plat
ready to clean out old include directories.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-30 10:17:16 +00:00
Ben Dooks 1362270872 [ARM] S3C: Move plat/regs-spi.h to arch/arm/plat-s3c/include/plat.
Move plat/regs-spi.h to arch/arm/plat-s3c/include/plat ready
ready to clean out old include directories.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-30 10:17:15 +00:00
Ben Dooks 57bd4b91a6 [ARM] S3C24XX: Movev udc headers to arch/arm/plat-s3c24xx/include/plat
Move the udc headers to the proper home in
arch/arm/plat-s3c24xx/include/plat ready to clean out
the old include directories.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-30 10:17:15 +00:00
Ben Dooks 7926b5a325 [ARM] S3C: Move nand headers to arch/arm/plat-s3c/include/plat
Move nand headers to arch/arm/plat-s3c/include/plat
ready to clean out the old include directories.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-30 10:17:13 +00:00
Russell King 11cd4cb5f5 Merge branch 'for-rmk-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux 2008-10-17 14:29:03 +01:00
Nelson Castillo 55b404fd78 [ARM] S3C24XX: Fix redefine of DEFINE_TIMER() in s3c24xx pwm-clock.c
Do not redefine the DEFINE_TIMER macro. Renamed the local macro
to DEFINE_S3C_TIMER.

Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
[ben-linux@fluff.org: spelling and subject fix]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-16 16:48:29 +01:00
Dallas Foley 7e90d760ee [ARM] S3C24XX: pwm-clock set_parent mask fix
Fix s3c24xx pwm-clock supports use of the wrong clock when calculating
the bitmask when configuring the parent clock from the set_parent call.

Signed-off-by: Dallas Foley <dfoley@techsol.ca>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-16 16:48:28 +01:00
Russell King 7e69a8c4d0 Merge branch 's3c-move' into devel
Conflicts:

	arch/arm/mach-versatile/core.c
2008-10-14 22:24:51 +01:00
Russell King 3f30a09a61 Merge branch 'pxa-all' into devel
Conflicts:

	arch/arm/mach-pxa/Kconfig
	arch/arm/mach-pxa/corgi.c
	arch/arm/mach-pxa/include/mach/hardware.h
	arch/arm/mach-pxa/spitz.c
2008-10-09 21:33:02 +01:00
Russell King 6a4690c22f Merge branch 'ptebits' into devel
Conflicts:

	arch/arm/Kconfig
2008-10-09 21:31:56 +01:00
Dmitry Baryshkov d8aa0251f1 [ARM] 5298/1: Drop desc_handle_irq()
desc_handle_irq() was declared as obsolete since long ago.
Replace it with generic_handle_irq()

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-09 15:00:36 +01:00
Ben Dooks d5120ae72a [ARM] S3C24XX: Additional include moves
Continue moving the include files into arch/arm

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-07 23:09:51 +01:00
Ben Dooks a2b7ba9ca4 [ARM] S3C24XX: Move files out of include/asm-arm/plat-s3c*
First move of items out of include/asm-arm/plat-s3c* to their
new homes under arch/arm/plat-s3c/include/plat and
arch/arm/plat-s3c24xx/include/plat directories.

Note, we have to create a dummy arch/arm/plat-s3c/Makefile to
allow us to add arch/arm/plat-s3c/include/plat to the path.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-07 22:26:09 +01:00
Russell King 8029db12ae [ARM] Convert asm/delay.h to linux/delay.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-06 12:11:37 +01:00
Russell King fced80c735 [ARM] Convert asm/io.h to linux/io.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-06 12:10:45 +01:00
Ben Dooks 66592eee16 [ARM] S3C24XX: pwm.c: stop debugging output
Move debugging output to dev_dbg() instead of dev_info().

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:21 +01:00
Ben Dooks 103895925f [ARM] S3C24XX: Fix sparse warnings in pwm.c
Fix the following sparse warnings in arch/arm/plat-s3c24xx/pwm.c:

warning: symbol 's3c_device_timer' was not declared. Should it be static?
warning: symbol 'pwm_calc_tin' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:21 +01:00