Commit Graph

93 Commits

Author SHA1 Message Date
Ben Dooks 3ac19bb443 [ARM] S3C: Do not set clk->owner field if unset
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>
2009-05-15 15:21:57 +01:00
Ben Dooks ad14ff3749 [ARM] S3C: Fix sparse warning from missing 's3c_device_hwmon'
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>
2009-04-17 12:42:24 +01:00
Ben Dooks db75639406 [ARM] S3C: Export s3c_gpio_cfgpin and s3c_gpio_setpull for modules
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>
2009-04-16 11:52:02 +01:00
Daniel Silverstone c564e6ae6c i2c-s3c2410: Simplify bus frequency calculation
The platform data for the i2c-s3c2410 driver used to allow a min,
max and desired frequency for the I2C bus. This patch reduces it
to simply a desired frequency ceiling and corrects all the uses
of the platform data appropriately.

This means, for example, that on a system with a 66MHz fclk, a
request for 100KHz will achieve 65KHz which is safe and
acceptable, rather than 378KHz which it would have achieved
without this change.

Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>
[ben-linux@fluff.org: tidy subject and description]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07 10:18:33 +01:00
Ben Dooks a192f7153b i2c-s3c2410: sda_delay should be in ns, not clock ticks
The sda_delay field should be specified in ns, not in clock ticks
as when using cpufreq we could be changing the bus rate.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
2009-04-07 10:18:33 +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
Linus Torvalds 61a091827e Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (97 commits)
  USB: qcserial: add device id for HP devices
  USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c
  USB: allow malformed LANGID descriptors
  USB: pxa27x_udc: typo fixes and code cleanups
  USB: gadget: gadget zero uses new suspend/resume hooks
  USB: gadget: composite device-level suspend/resume hooks
  USB: r8a66597-hcd: suspend/resume support
  USB: more u32 conversion after transfer_buffer_length and actual_length
  USB: Fix cp2101 USB serial device driver termios functions for console use
  USB: CP2101 New Device ID
  USB: ipaq: handle 4 endpoint devices
  USB: S3C: Move usb-control.h to platform include
  USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue
  USB: pedantic: spelling correction in comment for ch9.h
  USB: host: fix sparse warning: Using plain integer as NULL pointer
  USB: ohci-s3c2410: fix name of bus clock
  USB: ohci-s3c2410: remove <mach/hardware.h> include
  USB: serial: rename cp2101 driver to cp210x
  USB: CP2101 Reduce Error Logging
  USB: CP2101 Support AN205 baud rates
  ...
2009-03-26 11:17:39 -07:00
Ben Dooks 49121aa14c USB: S3C: Move usb-control.h to platform include
The usb-control.h is needed by ohci-s3c2410.c for both S3C24XX and S3C64XX
architectures, so move it to <plat/usb-control.h>

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07: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 eac8473972 ASoC: Fix Samsung S3C2412_IISMOD_SDF_{MSB,LSB} definitions
The definitions of S3C2412_IISMOD_SDF_MSB and S3C2412_IISMOD_SDF_LSB
are incorrect, being the same S3C2412_IISMOD_SDF_IIS which is the
only correct one in this series.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-09 18:28:17 +00:00
Ben Dooks aa8aba6944 [ARM] S3C: Do not kmalloc/kfree during inner suspend code.
The PM CRC checking code kmallocs an area to save a set of
CRC values during suspend. This triggers a warning due to the
call of a function that might sleep whilst the system is not
in a valid state to do so.

Move the allocation and free to points in the suspend and resume
process where they can call a function that might-sleep.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 13:19:54 +00:00
Ben Dooks 663a83048c [ARM] S3C: Avoid checking the task stackpage in pm-check
When doing the CRC check of the memory, avoid checking
the page that our stack is residing in as this changes
during the execution of the suspend and resume.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:38:06 +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 840eeeb880 [ARM] S3C: Fix warnings in the PM memory CRC code
Fix warnings from struct resource being bigger than unsigned long by
forcing the type. We are only a 32bit platform so no physical memory
addresses will be too big to fit in this.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-08 12:33:58 +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 f8cf8176c7 ASoC: Add s3c64xx-i2s support
Add the initial code to support the S3C64XX I2S hardware using the
s3c-i2s-v2 core code.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:08 +00:00
Ben Dooks 899e6cf5e6 S3C: Move <mach/audio.h> to <plat/audio.h>
The <mach/audio.h> file needs to be common to both ARCH_S3C2410 and
ARCH_S3C64XX as they share common driver code, so move it to <plat/audio.h>.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-05 12:01:00 +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
Daniel Silverstone 1144d6535f [ARM] 5376/1: S3C24XX: Fix sparse errors in platform uncompress.h
Ensure __iomem attribute is __force 'd off in the minimal
__raw_writel() implementation.

Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-19 11:30:19 +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
Russell King d83a12a409 [ARM] s3c: S3C options should depend on PLAT_S3C
This avoids non-Samsung builds being asked about Samsung specific
configuration options.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-12-21 15:02:07 +00:00
Russell King 6fd7c7fe72 [ARM] s3c: define __io using the typesafe version
as per 0560cf5aa5

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-12-18 23:29:15 +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 bdd4915a9f [ARM] S3C: Update CONFIG_SERIAL_SAMSUNG_UARTS handling
Fix the usage of CONFIG_SERIAL_SAMSUNG_UARTS in several places
in the kernel where it had been missed. This finishes fixing a
long standing issue where S3C2443 and S3C64XX could not use the
4th UART

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-18 16:26:14 +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 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 e7aa6f46f6 [ARM] S3C: Add UART FIFO selection during arch decompression
Add a configuration option to start the UART FIFOs during the
decompressions sequence to improve boot time when the bootloader
fails to enable the UART FIFOs.

For example, the SMDK6410 UBoot 1.1.6 leaves the FIFOs off.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-16 10:32:02 +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 58435f7b2d [ARM] S3C: Add new FB device definition
Add a device definition for the new S3C framebuffer
driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:56:53 +00:00
Ben Dooks 1aba834da1 [ARM] S3C: Add i2c1 device definition
Add device definition and support functions for the
second i2c device (i2c1). If this is selected, the first
i2c bus will become index 0 instead of index -1.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:56:41 +00:00
Ben Dooks 8f995cc3ac [ARM] S3C: Add register defines for new style framebuffer
Provide  the initial register definitions for the newer
style of framebuffer cores found in the Samsung SoCs
such as S3C2450, S3C64XX.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:55:10 +00:00
Ben Dooks 713e9dede6 [ARM] S3C: Fix SDHCI setup compilation
Fix the compilation of the SDHCI configuration/setup
functions to depend on their respective configuration
variables.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:54:21 +00:00
Ben Dooks d6bc5f70e0 [ARM] S3C6410: Fix gpio configuration for channel 1.
Select the correct GPIO configuration function for channel 1

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:53:59 +00:00
Ben Dooks 6a5f4b8535 [ARM] S3C64XX: Fix missing definition of s3c64xx_init_io()
The function s3c64xx_init_io was missing from <plat/cpu.h>
and was masked by the SMDK6410 having an local definition.

Fix by removing the SMDK6410 variant and adding it to the
relevant <plat/cpu.h> file.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:48:20 +00:00
Ben Dooks 4f507d19ca [ARM] S3C: Add header for initial i2c device core setup.
Add a header to define setup functions for the i2c
devices.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:47:03 +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 a2205cd2cb [ARM] S3C: Add SDHCI (HSMMC) channel 1 device definition
Add device definition and support code for the Samsung
HSMMC channel 1 device.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:40:07 +00:00
Ben Dooks 5cc7fd88fc [ARM] S3C6410: Add helper for setting SDHCI device information
Add the necessary helper functions for setting up the SDHCI
device information.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:39:34 +00:00
Ben Dooks ea522c7a54 [ARM] S3C: Add Samsung SDHCI register definitions
Add the specific register definitions for the Samsung SDHCI
(HSMMC) block for the S3C2443 and S3C64XX series.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-12-15 23:39:24 +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