Reset period_ns and duty_ns values in suspend handler to avoid skip of
configuration if same values passed to pwm_config;
Restore invertion bit in resume handler.
Without this patch PWM works incorrectly after resume from suspend.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
doc: fix typo in comment explaining rb_tree usage
Remove fs/ntfs/ChangeLog
doc: fix console doc typo
doc: cpuset: Update the cpuset flag file
Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
Remove drivers/parport/ChangeLog
Remove drivers/char/ChangeLog
doc: typo - Table 1-2 should refer to "status", not "statm"
tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
devres/irq: Fix devm_irq_match comment
Remove reference to kthread_create_on_cpu
tree-wide: Assorted spelling fixes
tree-wide: fix 'lenght' typo in comments and code
drm/kms: fix spelling in error message
doc: capitalization and other minor fixes in pnp doc
devres: typo fix s/dev/devm/
Remove redundant trailing semicolons from macros
fix typo "definetly" -> "definitely" in comment
tree-wide: s/widht/width/g typo in comments
...
Fix trivial conflict in Documentation/laptops/00-INDEX
This patch defines the platform device and the resources: IRQ, DMA and MEM,
needed by the AC97 controller driver.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This patch adds support for Samsung S5P6442 CPU. This patch also adds
an entry for S5P6442 cpu in plat-s5p cpu table.
Signed-off-by: Adityapratap Sharma <aditya.ps@samsung.com>
Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
IRQ should be disabled on suspend and re-enabled on resume.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the Kconfig entries from plat-s3c to plat-samsung and plat-s3c24xx
as necessary. The S3C_BOOT entries and the DMA configuration can go to
plat-samsung. The low-level UART configurations are currently S3C2XX
specific and can go to plat-s3c24xx.
Eliminating plat-s3c from the build process will be submitted seperately.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the init.c and time.c files to plat-samsung from plat-s3c, thus
clearing the last files that are being built in here.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the map-base file to plat-samsung. To make the move easier, we do not
change the S3C_ prefix on many of the items as this would involve going
through altering all the dependencies.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move common headers from plat-s3c's include/plat directory into plat-samsung.
No need to fix any files, these are still included via <plat/>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
dma-plat.h is the last file left in plat-s3c64xx, but to remove it we
must also change the use of dma-plat.h by the core code and the s3c24xx
implementation.
Rename the s3c24xx dma-plat.h in the common plat-samsung directory as it
may be used for other ports. Move the specific dma bits into the
mach-s3c64xx directory and update the build as needed.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Turn the init sequence of
s3c24xx_register_baseclocks(xtal);
s3c64xx_register_clocks();
s3c6400_register_clocks(S3C6410_CLKDIV0_ARM_MASK);
into a single call as this is now contained within one file.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The S3C64XX SoC series support 12bit ADC data, enable this and
mask the data accordingly.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The SPI controller platform devices should be compiled in
independent of the driver support, otherwise we might end
up with dev-spi built as kernel module.
Change this to make every machine select if it has some SPI
device and wants to build device definitions.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add an error print to s3c24xx_register_clocks to provide more useful
information when failing to register the clock.
I belive this was originally left out due to the possibility of a
problem with low-level debugging code. However, if the low-level
debug code is not functional by now there will be a whole other set of
problems being presented to the system.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Squash the SDHCI setup for both the S3C6400 and S3C6410 into one file and
make the S3C6410 case use the S3C6400 code.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
ARM: SAMSUNG: Fix null pointer dereference in ADC driver
Use struct adc_device instead of relying on client (which could be
NULL) when checking for SoC type.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
They are not exported, they are referenced via vtables.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the pm-check.c file to plat-samsung for all Samsung SoC users, and
update Kconfig names to make them SAMSUNG_ instead of S3C2410_
Sed expresions used to make the change:
s/S3C2410_PM_DEBUG/SAMSUNG_PM_DEBUG/g
s/S3C2410_PM_CHECK/SAMSUNG_PM_CHECK/g
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the PWM driver support to plat-samsung, as these PWM blocks are
close enough across the current range to be supported by this driver.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move header files which are not likely to be touched in
any further support addition out of plat-s3c's include
directory into plat-samsung.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
Move the GPIO and GPIO configuration headers into arch/arm/plat-samsung
as they are common to all the Samsung SoCs.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the gpio.c code containing the core gpiolib and GPIO support to
plat-samsung from plat-s3c as it is used by all current Samsung SoCs.
Note, we didn't move this to gpiolib.c as it contains code that is not
strictly for gpiolib support and the 4bit code is already called gpiolib.c
so make the change easier by not renaming both files in one go.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the pm-gpio code into plat-samsung.
Note, this should be changed later to properly compile the 4bit code if
the 4bit settings are enabled.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This patch moves GPIO common functions (from plat-s3c64xx) into plat-samsung.
and adds the config option to build the plat-samsung/gpiolib for Samsung SoCs.
Signed-off-by: Adityapratap Sharma <aditya.ps@samsung.com>
Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
We need a way to pass controller specific information to the SPI driver.
For that purpose new headers are made.
SPI Controller is assumed 'type-s3c64xx' and can be defined for newer SoCs.
Hence, that part is placed under plat-samsung to be shared across newer SoCs.
SoC specific part - spi source clocks, will be placed
under plat-<soc>/include/plat/
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The call has been assuming all clksrc-clks' divider size is 4 bits, but
this may not be the case anymore. Use the reg_div.size parameter to
calculate the maximum value it can take and check against that.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The WARN_ON() was only checking the first clock in the array, instead of
being executed for each clksrc clock being registered.
Since this is an array of clocks, WARN_ON() does not provide a lot of
useful information about the problem, so change to using printk(KERN_ERR)
to report the problem to the console.
As a note, we still try and register the clock even if these problems are
present just in case and to avoid changing the behaviour of the registration
process.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Adds a additional check in s3c_set_clksrc function to ensure that the clksrc_clk
does have a choice of multiple clock sources. In addition to this, a check is
added to ensure that a parent is assigned to the clksrc_clk in case it does not
have a choice of parent clocks.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add S3C64XX support to the generic Samsung ADC driver
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Prepare for the forthcoming device changes by renaming s3c_device_usb to
s3c_device_ohci as this is what the device represents.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This patch adds clock and pll support for S5P6440. This patch are based on
Harald Welte's patches and Ben's plat-samsung.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This patch adds a configuration option for specifing the number
of additional GPIO pins to be used in addition to the GPIO pins
supported onchip.
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the handling for the UART interrupts out of the s3c64xx specific
code and into plat-samsung so that it can be used by all implementations
that need it.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the VIC based timer interrupt handling out of plat-s3c64xx and
into plat-samsung to be re-used for other systems. This also reduces
the code size as we now have a common init routine and use the irq_desc
to store the interrupt number of the timer.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The arch/arm/plat-s3c/gpio-config.c file is common to pretty much all the Samsung
SoCs, so move it to arch/arm/plat-samsung
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This patch makes clk_default_setrate and clk_ops_def_setrate available
to code outside plat-samsung clock code.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
If there is no source register defined, do not register a clksrc
clock with a valid .set_parent in the ops.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add s3c_register_clocks() to register an array of clocks, printing
an error message if there is a problem. Replace all points in the code
where this could be used.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
If the reg_div field is not set, then do not register clk_ops with the
get/set/round rate calls as these will fail to work.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This is the core implementation of the clock code for all Samsung based
SoCs, so move it to arch/arm/plat-samsung (the clock.h file has already
been moved).
Since the file is built for every Samsung SoC, no changes are needed to the
Kconfig system.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The new code calls the clock setup code on registration which
can be before the clock system has been fully initialised. The
following code re-does this setup at the end of the clock
registration and thus we get two printings.
Update the calls to only print on the last pass or when doing
the necessary resume work.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
Add a core for the clksrc clock implementation, which is found in many of
the newer Samsung SoCs into plat-samsung.
Signed-off-by: Harald Welte <laforge@gnumonks.org>
[ben-linux@fluff.org: split from original patch to make change smaller]
[ben-linux@fluff.org: split clk and clksrc changes]
[ben-linux@fluff.org: moved to plat-samsung from plat-s3c]
[ben-linux@fluff.org: re-wrote headers after splits]
[ben-linux@fluff.org: added better documentation to headers]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the <plat/clock.h> header to plat-samsung where it can be used by all
the platforms, and readies it for the next round of clock updates where
the clock code will be amalgamated.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
We inted to re-organise the plat-s3c/plat-s3c24xx/plat-s3c64xx into a
more generic plat-samsung with less code in the other plat- directories
to make it easier to port new devices and try and clear up some of the
naming issues with newer devices.
Start by creating a small arch/arm/plat-samsung with no actuall code in
so we can move items in as we process them.
Add this to arch/arm to allow it to build things once support is added.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>