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>
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>
Allowing us to make the Kconfig a little bit saner.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
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>
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>
Currently map-base.h defines the main virtual address mappings made
for all the support S3C SoC series, but does not then define any base
for per-cpu mappings to be made from.
Add S3C_ADDR_CPU() macro to define an virtual address as an offset
from the last of the core mappings.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
Update arch/arm/plat-s3c/include/plat/cpu-freq.h to include kerneldoc
style documentation.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add support for the ADC controller on the S3C series of processors to
drivers/hwmon for use with hardware monitoring systems.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
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>
Commit 52da219e96 added IIS
platform devices, but these do not build on s3c24xx systems
and the file depends on SND_S3C24XX_SOC, which is selected
for all S3C64XX/S3C24XX systems.
As a quick fix, make the dev-audio.o file depends on
SND_S3C64XX_SOC_I2S instead.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Commit 52da219e96 removed
the s3c_device_iis, but didn't replace it with anything
so a number of s3c24xx machines are currently failing
to build.
As a temporary fix, re-instate s3c_device_iis until a
proper replacement can be done for it.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* git://git.infradead.org/mtd-2.6: (63 commits)
mtd: OneNAND: Allow setting of boundary information when built as module
jffs2: leaking jffs2_summary in function jffs2_scan_medium
mtd: nand: Fix memory leak on txx9ndfmc probe failure.
mtd: orion_nand: use burst reads with double word accesses
mtd/nand: s3c6400 support for s3c2410 driver
[MTD] [NAND] S3C2410: Use DIV_ROUND_UP
[MTD] [NAND] S3C2410: Deal with unaligned lengths in S3C2440 buffer read/write
[MTD] [NAND] S3C2410: Allow the machine code to get the BBT table from NAND
[MTD] [NAND] S3C2410: Added a kerneldoc for s3c2410_nand_set
mtd: physmap_of: Add multiple regions and concatenation support
mtd: nand: max_retries off by one in mxc_nand
mtd: nand: s3c2410_nand_setrate(): use correct macros for 2412/2440
mtd: onenand: add bbt_wait & unlock_all as replaceable for some platform
mtd: Flex-OneNAND support
mtd: nand: add OMAP2/OMAP3 NAND driver
mtd: maps: Blackfin async: fix memory leaks in probe/remove funcs
mtd: uclinux: mark local stuff static
mtd: uclinux: do not allow to be built as a module
mtd: uclinux: allow systems to override map addr/size
mtd: blackfin NFC: fix hang when using NAND on BF527-EZKITs
...
Fix gpio-config off-by-one bug. Without this patch, touching GPA0 pin on
S3C64XX platform causes kernel oops.
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This allows the S3C64XX IIS drivers to be converted to the standard
driver model and allows fixes there for problems with attempting to
acquire the clocks for the IIS blocks via the clock API.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Driver support for the new high-speed/OtG block that is
in the newer line of Samsung SoC devices such as the
S3C64XX series.
This driver does not currntly have DMA support enabled due
to issues with buffer alignment which need to be sorted out.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added a flag to allow the machine code to tell the NAND
subsystem that it should try to pickup a BBT from the flash,
and also skip the NAND full scan at startup.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Converted the old comnent to kerneldoc.
Signed-off-by: Michel Pollet <buserror@gmail.com>
[ben-linux@fluff.org: updated subject, spello fix]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
checkpatch would complain with "disable_ecc : 1".
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
[ben-linux@fluff.org: subject cleanup]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Use the newly moved <plat/watchdog-reset.h> to perform the
arch_reset() call which has been unimplemented for a while.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the watchdog reset code from <mach/system-reset.h> to
a new file <plat/watchdog-reset.h> as this code is needed
by both s3c2410, s3c64xx and soon-to-be added s3c24a0.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
Small cleanup.
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
[ben-linux@fluff.org: rewrote subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add platform device definitions for the high-speed and OtG
capable device block on the newer Samsung parts.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The s3c24xx_register_clock() function has been doing a test
on clk->owner to see if it is NULL, and then setting itself
as the owner if clk->owner == NULL.
This is not needed, arch/arm/plat-s3c/clock.c cannot be
compiled as a module, and even if it was, it should not be
playing with this field if it being registered from somewhere
else.
The best course of action is to remove this bit of
code completely.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add support for S3C6400 SDHCI channels 0 and 1, making
the GPIO code common to both S3C6400 and S3C6410.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
Add support for saving the state of the IRQ registers over suspend.
This requires moving the S3C64XX UART registers into <plat/regs-serial.h>
and adding irq-pm.c which saves the state of all the IRQ registers.
The irq-pm.c saves all the IRQ registers, including the IRQ_EINT and
IRQ_EINT_GROUP registers as it was easier than adding three different
files. Also ensuring that all the registers are restored to the same
state as before suspend is considered to be the best thing to do.
Note, we do not suspend the VIC here, this is done by the VIC driver
itself.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add an s3c64xx_sysclass and device for items that currently
want to bind to any s3c64xx processor. The first user of this
will be parts of the s3c64xx suspend support which need to
save device state over suspend/resume.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add the initial support for the S3C64XX based systems to use
suspend-to-RAM to sleep.
Includes basic debugging for use with the SMDK6410 usign the
LEDs on the baseboard.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
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>
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>
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>
Move the common information from the <mach/dma.h> header into a new
shareable <plat/dma.h> header for re-use on the s3c64xx.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Fix the following sparse warning due to s3c_device_hwmon being
missing from <plat/devs.h>
devs.c:380:24: warning: symbol 's3c_device_hwmon' 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>
Add an export of the two GPIO configuration calls
s3c_gpio_cfgpin and s3c_gpio_setpull to allow modules
to use them (such as ASoC drivers)
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>