Mark Brown [Mon, 17 Oct 2011 23:46:50 +0000 (08:46 +0900)]
gpio/samsung: Complain loudly if we don't know the SoC
If we don't know the SoC type then we won't add any chips which is rather
unfortunate as neither GPIO nor pinmux APIs will work, breaking lots of
different subsystems. Logging at least provides a hint to the user as to
what's gone wrong.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Mark Brown [Mon, 17 Oct 2011 23:39:57 +0000 (08:39 +0900)]
ARM: S3C64XX: Fix SoC identification for S3C64xx devices
The IS_SAMSUNG_CPU() macro works by comparing the CPU ID mask exactly with
the CPU ID. This was failing for S3C64xx SoCs as in order to support
identification of the exact device the mask covers both variants of the
chip, meaning that the test would always fail on S3C6410 devices. This in
turn caused the core GPIO subsystem to fail to identify the CPU and not
support any GPIOs, crippling the system.
As a minimally invasive fix change the test for the class to be done by
checking each implementation and oring them together.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Axel Lin [Fri, 14 Oct 2011 06:41:36 +0000 (15:41 +0900)]
ARM: S3C2443: Remove redundant s3c_register_clocks call for init_clocks
Since commit af337f3e633a198034a99450416257ddf2307497
"ARM: S3C2443: Move parts of the clock code to common clock file",
the init_clocks array is moved to arch/arm/plat-s3c24xx/s3c2443-clock.c.
Now we call s3c_register_clocks for init_clocks in s3c2443_common_init_clocks.
Thus we can remove the empty init_clocks array here and remove the
redundant s3c_register_clocks call for init_clocks in s3c2443_init_clocks.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Heiko Stuebner [Fri, 14 Oct 2011 06:35:08 +0000 (15:35 +0900)]
ARM: S3C24XX: Add devname for hsmmc1 pclk
S3C2443 uses hsmmc1 as its only hsmmc device and for S3C2416/S3C2450
it's the second hsmmc channel with the same PCLKCON bit.
The hsmmc-if clocks on both systems already got a devname, as did
the hsmmc pclk for hsmmc0 on the S3C2416. So to make it possible to
identify the hsmmc1 pclk on S3C2416 add the correct devname for it.
The sclk name on S3C2443 also is s3c-sdhci.1.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Heiko Stuebner [Fri, 14 Oct 2011 06:08:57 +0000 (15:08 +0900)]
ARM: S3C24XX: use clk_get_rate to init fclk in common_setup_clocks
Previously the fclk rate was calculated by dividing the pll through
the divider value of the armdiv. With a real armdiv clk in place it's
possible to simply read its value, which does essentially the same.
This change makes the whole fdiv_fn function pointers supplied to
s3c2443_common_init_clocks and s3c2443_common_setup_clocks
obsolete, so remove it too.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Heiko Stuebner [Fri, 14 Oct 2011 06:08:57 +0000 (15:08 +0900)]
ARM: S3C2443: Accommodate cpufreq frequency scheme in armdiv
Cpufreq uses frequencies in kHz and not Hz, so set_rate and round_rate
would be called with a frequency of 266666000 instead of 266666666 but
the clock functions check for rates smaller or equal to the targetrate.
As the armdiv does not support steps this small we can accommodate
this by simply also setting the last 3 digits of the calculated rate
to zero.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
The armdiv array may contain unset divider values.
Check the relevant value to prevent division by zero
errors. Also check for set nr_armdiv and armdivmask
before meddling with clkdiv0.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Heiko St?bner [Fri, 14 Oct 2011 06:08:56 +0000 (15:08 +0900)]
ARM: S3C2443: Move clk_arm and clk_armdiv to common code
The system-layout of the armdiv and armclk is common to
S3C2443/S3C2416/S3C2450 and only differs in the array of
possible dividers. Therefore it is possible to reuse the
clock definitions for all of these SoCs.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: EXYNOS4: Add support for M-5MOLS camera on Nuri board
Add voltage regulator and platform data definition for M-5MOLS sensor
and MIPI-CSI receiver drivers. Add CAM power domain dependencies for
FIMC device and set up camera port A GPIO. Configure I2C0 bus timings.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Heiko Stuebner [Wed, 12 Oct 2011 12:34:12 +0000 (21:34 +0900)]
ARM: SAMSUNG: Add support s3c2416-adc for S3C2416/S3C2450
The ADC of the S3C2416/2450 SoC is 10 or 12 bit wide, has its
source selection in the register base+0x18 and its width
selection in bit 03 of the ADCCON register.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Heiko Stuebner [Wed, 12 Oct 2011 12:34:12 +0000 (21:34 +0900)]
ARM: SAMSUNG: Allow overriding of adc device name for S3C24XX
The adc blocks of S3C2443 and S3C2416 contain quirks not present
in the stock S3C24xx adc. Therefore allow them to alter the
device name via s3c_adc_setname.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Tushar Behera [Tue, 4 Oct 2011 23:55:49 +0000 (08:55 +0900)]
gpio/samsung: Move SoC specific codes within macro
In drivers/gpio/gpio-samsung.c, there are certain structures
and functions which are not getting used if the particular
CPU is not selected. These code segments are moved under CPU
specific macros to remove compilation warnings.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Thomas Abraham [Wed, 12 Oct 2011 11:11:17 +0000 (20:11 +0900)]
gpio/samsung: Fix incorrect gpio pull up/down callback for EXYNOS4
Some of the gpio chips of exynos4 are assigned a default gpio config without
the exynos4 specific pull up/down callbacks which resulted in incorrect
setting of pull up/down configuration.
Fix this by adding two new exynos4 specific entries in the array of default
configs with set_pull and get_pull callbacks set to exynos4 specific callbacks
The new default gpio configs can then be used for exynos4 gpio chips.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Mark Brown [Mon, 10 Oct 2011 23:57:11 +0000 (08:57 +0900)]
ARM: S3C64XX: Enable TCM support
The S3C64xx CPUs have TCMs so enable the kernel support for it
on these systems.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Peter Korsgaard [Mon, 10 Oct 2011 10:55:58 +0000 (19:55 +0900)]
gpio/samsung: only register available gpio banks
Only register gpio banks provided by SoC instead of the maximum possible
to lessen confusion, get rid of a warning from gpiolib and stop it from
eating into the extra gpios for configs with S3C24XX_GPIO_EXTRA != 0.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Sachin Kamat [Mon, 10 Oct 2011 10:54:53 +0000 (19:54 +0900)]
ARM: EXYNOS4: Enable regulator support for HDMI on ORIGEN
Since the DC5V line is connected directly to the HDMI connector,
"hdmi-en" regulator would become a dummy regulator on origen board
(by defining REGULATOR_DUMMY in the kernel config file).
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S5P: Make the sleep code common for S5P series SoCs
The sleep code for S5PV210 and EXYNOS4 are identical; moreover
S5p64X0 and S5PC100 for which support will be added soon can
use the same procedure. Create a common sleep code in the plat-s5p
directory so that it can be re-used.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S5P: Make the common S5P PM code conditionally compile
Pave the way for adding PM support on S5P64X0, which is more similar
to the S3C64XX series than the S5P series. Hence, the common pm code
(containing dummy functions) should not be used for S5P64X0.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Kukjin Kim [Wed, 28 Sep 2011 11:48:52 +0000 (20:48 +0900)]
ARM: SAMSUNG: Move S3C24XX header files to plat-samsung
This patch moves header files from plat-s3c24xx to plat-samsung to
remove plat-s3c24xx directory to make one plat-samsung directory for
Samsung SoCs. And this patch includes fixing coding style, too.
Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
The sdhci platform helper function that sets up the default controller
configuration is removed for all Samsung platforms since such default
controller configuration can be handled by the driver.
Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S5P6450: Add LCD-LTE480 and enable Framebuffer support
This patch:
-- Adds platform device support for LCD-LTE480.
-- Adds platform data for FB with win_mode and default_bpp.
-- Enables FB device support and platform-lcd support.
-- Adds SPCON settings for LCD.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S5P6440: Add LCD-LTE480 and enable Framebuffer support
This patch:
-- Adds platform device support for LCD-LTE480.
-- Adds platform data for FB with win_mode and default_bpp.
-- Enables FB device support and platform-lcd support.
-- Adds SPCON settings for LCD.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Mark Brown [Mon, 26 Sep 2011 22:29:11 +0000 (07:29 +0900)]
ASoC: Flush Samsung DMA on free
Ever since it was written the Samsung DMA driver has had a TODO in the
hw_free() function wondering if we need to flush the DMA buffers. Up until
now the answer has been no but with the recent improvements Boojin has
done to the DMA infrastructure for the Samsung port the answer has changed
to yes for at least S3C6410 systems.
If we don't then when we next prepare() the channel the API will get
confused trying to run callbacks on the transfers hanging around from the
previous time the stream was open and oops.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Boojin Kim <boojin.kim@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S5PV210: Add support for M-5MOLS image sensor on UNIVERSAL_C210
Add voltage regulator definitions for M-5MOLS camera, platform data
definition for the sensor and MIPI-CSI receiver drivers.
Add CAM power domain dependencies for FIMC and CSIS devices.
Define required I2C0 bus timings. Setup camera port A GPIO.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S5PV210: Add support for NOON010PC30 sensor on GONI board
Add platform data for CIF camera sensor and FIMC platform data
entries for it. Add platform device for s5p-fimc media device
driver and the camera port A I/O pins initialization.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
This patch adds platform devices and regulators for TV devices on
Samsung Goni board.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: EXYNOS4: enable TV support on Universal_C210 board
This patch adds platform devices and regulators for TV devices on
Samsung Universal C210 board.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
This patch adds all the resources for TV drivers and devices for Samsung
Exynos4 and S5PV210 platforms.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[m.szyprowski: squashed Exynos4 and S5PV210 patches and rewrote commit message] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
This patch adds hdmiphy dedicated i2c controller definitions.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[m.szyprowski: renamed to i2c-hdmiphy and squashed Exynos4 and S5PV210 patches] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Changhwan Youn [Tue, 4 Oct 2011 08:09:26 +0000 (17:09 +0900)]
ARM: EXYNOS4: Add MCT support for EXYNOS4412
Current MCT implementation only provide 2 event timers,
thus cannot support EXYNOS4412 which has 4 CPU cores.
This patch fixes MCT implementation to support SoCs
with 4 cores.
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Changhwan Youn [Tue, 4 Oct 2011 08:08:57 +0000 (17:08 +0900)]
ARM: EXYNOS4: Add functions for gic interrupt handling
This patch adds two functions for gic interrupt handling.
1. Add interrupt handling of 4 cores.
2. Dynamically set gic bank offset according to the type of soc.
Gic bank offset of EXYNOS4412 is 0x4000 while the offset of
EXYNOS4210 and EXYNOS4212 is 0x8000.
This patch is necessary because EXYNOS4 socs cannot support
GIC register banking as described in commit aab74d3e75364.
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Changhwan Youn [Tue, 4 Oct 2011 08:02:58 +0000 (17:02 +0900)]
ARM: EXYNOS4: Add support PPI in external GIC
To support PPI in external GIC of EXYNOS4 SoCs,
gic_arch_extn.irq_eoi, irq_unmask and irq_mask are
fixed. This patch is necessary because external GIC of EXYNOS4
cannot support register banking.
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Since boot_params variable is deleted from machine_desc, the variable
is modified in the newer board files.
Cc: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
[kgene.kim@samsung.com: added fixing for smdkv310] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Marek Szyprowski [Mon, 26 Sep 2011 04:10:32 +0000 (13:10 +0900)]
gpio/samsung: correct pin configuration for S5PC100/S5PC110/EXYNOS4
Commit 1b39d5f2cc introduced new common gpio driver for all Samsung GPIO
SoCs. The new driver use wrong configuration setup for all gpio pins on
S5PC100 and S5PV210 SoCs and external interrupt lines on Exynos4 SoCs.
This patch fixes this issue.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Marek Szyprowski [Mon, 26 Sep 2011 04:09:08 +0000 (13:09 +0900)]
gpio/samsung: fix GPIO interrupt registration for EXYNOS4 SoCs
Commit 1b39d5f2cc introduced new common gpio driver for all Samsung GPIO
SoCs. The new driver doesn't correctly register GPIO interrupts on
Samsung Exynos4 SoCs. This is caused by a typo in define name. This
patch fixes this issue.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Marek Szyprowski [Mon, 26 Sep 2011 04:06:57 +0000 (13:06 +0900)]
gpio/samsung: fix broken configuration for EXYNOS4 GPIO banks
Commit 1b39d5f2cc introduced new common gpio driver for all Samsung GPIO
SoCs. The new driver doesn't work correctly on Samsung Exynos4 SoC. It
fails to set configuration for all but external interrupt pins. This
patch fixes this issue.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Marek Szyprowski [Thu, 11 Aug 2011 10:57:28 +0000 (19:57 +0900)]
ARM: EXYNOS4: enable frame buffer on Nuri board
This patch adds platform definitions to enable s3c-fb driver.
Framebuffer window with 1280x800x16bpp mode has been defined.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Marek Szyprowski [Thu, 11 Aug 2011 10:55:40 +0000 (19:55 +0900)]
ARM: EXYNOS4: enable frame buffer on Universal C210 board
This patch adds platform definitions to enable s3c-fb driver.
Framebuffer window with 480x800x16bpp mode has been defined.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Tushar Behera [Wed, 31 Aug 2011 07:57:37 +0000 (16:57 +0900)]
ARM: EXYNOS4: Add support for secondary MMC port on ORIGEN
Secondary MMC port on ORIGEN is connected to sdhci instance 0.
Support for secondary MMC port is extended by registering
sdhci instance 0.
Since sdhci instance 2 can contain a bootable media, sdhci
instance 0 is registered after instance 2.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
[kgene.kim@samsung.com: Added comments in registering sdhci] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Merge branch 'for-linus' of git://github.com/tiwai/sound
* 'for-linus' of git://github.com/tiwai/sound:
ASoC: ssm2602: Re-enable oscillator after suspend
ALSA: usb-audio: Check for possible chip NULL pointer before clearing probing flag
ALSA: hda/realtek - Don't detect LO jack when identical with HP
ALSA: hda/realtek - Avoid bogus HP-pin assignment
ALSA: HDA: No power nids on 92HD93
ASoC: omap-mcbsp: Do not attempt to change DAI sysclk if stream is active
That flag no longer makes sense, since we don't look up automount points
as eagerly any more. Additionally, it turns out that the NO_AUTOMOUNT
handling was buggy to begin with: it would avoid automounting even for
cases where we really *needed* to do the automount handling, and could
return ENOENT for autofs entries that hadn't been instantiated yet.
With our new non-eager automount semantics, one discussion has been
about adding a AT_AUTOMOUNT flag to vfs_fstatat (and thus the
newfstatat() and fstatat64() system calls), but it's probably not worth
it: you can always force at least directory automounting by simply
adding the final '/' to the filename, which works for *all* of the stat
family system calls, old and new.
So AT_NO_AUTOMOUNT (and thus LOOKUP_NO_AUTOMOUNT) really were just a
result of our bad default behavior.
Acked-by: Ian Kent <raven@themaw.net> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>