Commit graph

21 commits

Author SHA1 Message Date
Yadwinder Singh Brar 7bdc84fb82 ARM: SAMSUNG: Save/restore only selected uart's registers
Basically this code gets executed only during debugging i.e when
DEBUG_LL & SAMSUNG_PM_DEBUG is on, so required only for UART used
for debugging. Since we are removing static iodesc entries for UARTs,
so now only the selected (CONFIG_DEBUG_S3C_UART) UART will be
ioremapped by the debug_ll_io_init() for DEBUG_LL, so save/restore
uart registers only for selected uart.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-07-24 17:05:07 +09:00
Arnd Bergmann ff8fa4e287 cleanup and removing dead code for only support DT for exynos
- remove board file for exynos
 - remove legacy files which are not used anymore
 - decouple ARCH_EXYNOS from PLAT_S5P
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRwK6OAAoJEA0Cl+kVi2xqOtsQAJV2wGPAXHHhAx4+OP1k763E
 n8gT++jUk/VqkNtZciSghB3NkvHG61Y/4zzZIykrwq/ptCmhO/k3jhr4JsJmm6lN
 rbszQ35OEZpCyiJtVJK/xLbfEbQvKyI+SleV+uCZPBg6QzfUsTxlChCm0aWvq6CJ
 WTBvbv/Y3Gs0SW+h4D3Zk4gDWBaDNNvynMOjBTXIyeCiivRmRrZ2aGSB8xav7nAD
 YBcOZRUX6B+KBGyUR3Y2eEh4vn1w2sKU5lGlFsEawbnOibepQjzFqEw19azIt7eI
 oFuANcJrF3ITmffEsHnDO0Sq1DQUjcYWeuv5hrHL3uT6ORxqUu9uR/wfAXpmLoXg
 R/Op73PkUW1hBqJnblO5uJ5Iyrtpx0qkusFX9H+7a9qu3i9GRUQtT4WlsBYnZzEj
 G3TqEJF6hTi7K6t8G/Q+0ttkPOugEV/fFIXEdpjW/eJANKIa43A+NVEf7nLLWeHw
 cMKi+LyDoE2biOmPEVKEJBdkFYwEGxErAyn77dnreBnfUIoQmoTxzNea6e+VVg2N
 cU/eIrDkQWFqxyEcdiT9fwSxEBdH2oQMjIFiUKqcrhXOCHAGj1mFDAC6dRBTvJvt
 6gCPw/IpD/w5w9xi/hWA8WBE/0zFb7Fqxf72JowNr4pvFsyXpVVuKKkCOOmuy+fQ
 /xz6uETSXpOQG+3TQKPF
 =SHg+
 -----END PGP SIGNATURE-----

Merge tag 'remove-nondt-exynos-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc

From Kukjin Kim:

cleanup and removing dead code for only support DT for exynos
- remove board file for exynos
- remove legacy files which are not used anymore
- decouple ARCH_EXYNOS from PLAT_S5P

* tag 'remove-nondt-exynos-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (35 commits)
  ARM: EXYNOS: Remove remaining dead code after non-DT support removal
  ARM: EXYNOS: Remove legacy L2X0 initialization
  ARM: EXYNOS: Use exynos_init_io() as map_io callback
  ARM: EXYNOS: Remove custom init_irq callbacks
  ARM: EXYNOS: Remove mach/regs-usb-phy.h header
  thermal: exynos: Support both EXYNOS4X12 SoCs
  ARM: EXYNOS: Remove unused base addresses from mach/map.h header
  ARM: EXYNOS: Remove mach/irqs.h header
  ARM: EXYNOS: Select SPARSE_IRQ for Exynos
  ARM: SAMSUNG: Make legacy MFC support code depend on SAMSUNG_ATAGS
  ARM: EXYNOS: Remove mach/regs-gpio.h header
  ARM: EXYNOS: Remove mach/gpio.h
  ARM: EXYNOS: Remove setup-i2c0.c
  ARM: EXYNOS: Do not select legacy Kconfig symbols any more
  ARM: SAMSUNG: Include most of mach/ headers conditionally
  ARM: EXYNOS: Decouple ARCH_EXYNOS from PLAT_S5P
  USB: Check for ARCH_EXYNOS separately
  platform: Check for ARCH_EXYNOS separately
  ARM: SAMSUNG: Compile legacy IRQ and GPIO PM code only with ATAGS support
  ARM: EXYNOS: Provide compatibility stubs for PM code in pm-core.h header
  ...

Conflicts:
	arch/arm/mach-exynos/Kconfig

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-20 22:36:11 +02:00
Tomasz Figa d6280ffb44 ARM: SAMSUNG: Include most of mach/ headers conditionally
Since it is illegal to include mach/ headers from source files outside
of respective mach-* directory and DT-only Samsung platforms might not
have all of them anyway, this patches makes inclusion of them
conditional, based on CONFIG_SAMSUNG_ATAGS.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-06-19 01:27:05 +09:00
Tomasz Figa cd3fc1b9a3 ARM: SAMSUNG: pm: Adjust for pinctrl- and DT-enabled platforms
This patch makes legacy code on suspend/resume path being executed
conditionally, on non-DT platforms only, to fix suspend/resume of
DT-enabled systems, for which the code is inappropriate.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[olof: add #include <linux/of.h>]
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 01:10:12 -07:00
Arnd Bergmann 7ba8022fc3 ARM: exynos: prepare for sparse IRQ
When we enable CONFIG_SPARSE_IRQ, we have to set the value of NR_IRQS in
the machine_desc for legacy IRQ domains, and any file referring to the
number of interrupts or a specific number must include the mach/irqs.h
header file explicitly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-19 13:51:20 +02:00
Abhilash Kesavan d3fcacf52d ARM: SAMSUNG: Gracefully exit on suspend failure
As per the Exynos5250 User Manual:
When there are pending interrupt events, WFI/WFE instruction are
ignored. To cancel the power-down sequence follow these steps:
1) Disable system power-down using CENTRAL_SEQ_CONFIGURATION register
2) Clear WAKEUP_STAT register
3) Enable interrupt service routine for CPU

Code for early wakeup for exynos already exists. Remove the panic
on suspend failure, clear the wakeup state register and return 1
from cpu_suspend to indicate a failed suspend (to a user daemon).

Older Samsung SoCs have similar panics and I have removed them all.
Haven't touched the S3C2410 sleep code.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-01-30 22:28:05 -08:00
Chen Gang 8baaa265c5 ARM: SAMSUNG: using vsnprintf instead of vsprintf for the limit buffer length 256
the buff is 256 limited, so need use vsnprintf instead of vsprintf

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Ben Dooks <ben@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-01-30 22:28:05 -08:00
Sachin Kamat c0401241c0 ARM: Samsung: Make uart_save static in pm.c file
Fixes the following sparse warning:
arch/arm/plat-samsung/pm.c:77:21:
warning: symbol 'uart_save' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-08-08 09:04:51 +09:00
Kukjin Kim 782d8a3c0b ARM: SAMSUNG: Update the name of regarding Samsung GPIO
According to gpio-samsung.c, this patch updates the name of
regarding Samsung GPIO. Basically the samsung_xxx prefix is
used in gpio-samsung.c instead of s3c_xxx, because unified
name can reduce its complexity.

Note: some s3c_xxx stil remains because it is used widely.
It will be updated next time.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-09-21 15:07:04 +09:00
Linus Torvalds 69f1d1a6ac Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (128 commits)
  ARM: S5P64X0: External Interrupt Support
  ARM: EXYNOS4: Enable MFC on Samsung NURI
  ARM: EXYNOS4: Enable MFC on universal_c210
  ARM: S5PV210: Enable MFC on Goni
  ARM: S5P: Add support for MFC device
  ARM: EXYNOS4: Add support FIMD on SMDKC210
  ARM: EXYNOS4: Add platform device and helper functions for FIMD
  ARM: EXYNOS4: Add resource definition for FIMD
  ARM: EXYNOS4: Change devname for FIMD clkdev
  ARM: SAMSUNG: Add IRQ_I2S0 definition
  ARM: SAMSUNG: Add platform device for idma
  ARM: EXYNOS4: Add more registers to be saved and restored for PM
  ARM: EXYNOS4: Add more register addresses of CMU
  ARM: EXYNOS4: Add platform device for dwmci driver
  ARM: EXYNOS4: configure rtc-s3c on NURI
  ARM: EXYNOS4: configure MAX8903 secondary charger on NURI
  ARM: EXYNOS4: configure ADC on NURI
  ARM: EXYNOS4: configure MAX17042 fuel gauge on NURI
  ARM: EXYNOS4: configure regulators and PMIC(MAX8997) on NURI
  ARM: EXYNOS4: Increase NR_IRQS for devices with more IRQs
  ...

Fix up tons of silly conflicts:
 - arch/arm/mach-davinci/include/mach/psc.h
 - arch/arm/mach-exynos4/Kconfig
 - arch/arm/mach-exynos4/mach-smdkc210.c
 - arch/arm/mach-exynos4/pm.c
 - arch/arm/mach-imx/mm-imx1.c
 - arch/arm/mach-imx/mm-imx21.c
 - arch/arm/mach-imx/mm-imx25.c
 - arch/arm/mach-imx/mm-imx27.c
 - arch/arm/mach-imx/mm-imx31.c
 - arch/arm/mach-imx/mm-imx35.c
 - arch/arm/mach-mx5/mm.c
 - arch/arm/mach-s5pv210/mach-goni.c
 - arch/arm/mm/Kconfig
2011-07-26 17:41:04 -07:00
Ben Dooks 1bac282af4 ARM: SAMSUNG: Add support for pre-sleep/post-restore gpio control
Add a callback so that per-arch can do pre-sleep and post-resume
gpio configuration so that for the S3C64XX, the GPIO configuration
is restored before the sleep mode is cleared.

For the S3C64XX case, it means that the GPIOs get set back to normal
operation after the restore code puts the original configurations
back in after the

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-07-20 23:13:20 +09:00
Russell King 29cb3cd208 ARM: pm: allow suspend finisher to return error codes
There are SoCs where attempting to enter a low power state is ignored,
and the CPU continues executing instructions with all state preserved.
It is over-complex at that point to disable the MMU just to call the
resume path.

Instead, allow the suspend finisher to return error codes to abort
suspend in this circumstance, where the cpu_suspend internals will then
unwind the saved state on the stack.  Also omit the tlb flush as no
changes to the page tables will have happened.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-07-02 09:54:01 +01:00
Russell King 2c74a0cefa ARM: pm: hide 1st and 2nd arguments to cpu_suspend from platform code
The first and second arguments shouldn't concern platform code, so
hide them from each platforms caller.

Tested-by: Kevin Hilman <khilman@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-06-24 09:54:39 +01:00
Russell King e7089da956 ARM: pm: samsung: move cpu_suspend into C code
Move the call to cpu_suspend into C code, and noticing that all the
s3c_cpu_save implementations are now identical, we can move this
into the common samsung code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-06-24 08:48:44 +01:00
Russell King 14cd8fd574 ARM: pm: move cpu_init() call into core code
As we have core code dealing with CPU suspend/resume, we can
re-initialize the CPUs exception banked registers via that code rather
than having platforms deal with that level of detail.  So, move the
call to cpu_init() out of platform code into core code.

Tested-by: Kevin Hilman <khilman@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-06-24 08:48:43 +01:00
Maurus Cuelenaere baab7307c7 ARM: SAMSUNG: Fix warning 's3c_pm_show_resume_irqs' defined but not used
s3c_pm_show_resume_irqs() is used by some s3c_pm_arch_show_resume_irqs()
implementations, which get included through mach/pm-core.h. Add __maybe_unused
to silence warnings when it isn't used (e.g. on S3C64XX platforms).

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-04-14 13:20:05 +09:00
Russell King 2e2f3d3792 ARM: pm: convert samsung platforms to generic suspend/resume support
Tested-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-02-22 17:11:25 +00:00
Linus Torvalds 16c1020362 Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (161 commits)
  ARM: pxa: fix building issue of missing physmap.h
  ARM: mmp: PXA910 drive strength FAST using wrong value
  ARM: mmp: MMP2 drive strength FAST using wrong value
  ARM: pxa: fix recursive calls in pxa_low_gpio_chip
  AT91: Support for gsia18s board
  AT91: Acme Systems FOX Board G20 board files
  AT91: board-sam9m10g45ek.c: Remove duplicate inclusion of mach/hardware.h
  ARM: pxa: fix suspend/resume array index miscalculation
  ARM: pxa: use cpu_has_ipr() consistently in irq.c
  ARM: pxa: remove unused variable in clock-pxa3xx.c
  ARM: pxa: fix warning in zeus.c
  ARM: sa1111: fix typo in sa1111_retrigger_lowirq()
  ARM mxs: clkdev related compile fixes
  ARM i.MX mx31_3ds: Fix MC13783 regulator names
  ARM: plat-stmp3xxx: irq_data conversion.
  ARM: plat-spear: irq_data conversion.
  ARM: plat-orion: irq_data conversion.
  ARM: plat-omap: irq_data conversion.
  ARM: plat-nomadik: irq_data conversion.
  ARM: plat-mxc: irq_data conversion.
  ...

Fix up trivial conflict in arch/arm/plat-omap/gpio.c (Lennert
Buytenhek's irq_data conversion clashing with some omap irq updates)
2011-01-15 12:33:40 -08:00
Mark Brown f5aeffb784 ARM: SAMSUNG: Convert s3c_irqext_wake() to new irq_ interrupt methods
Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Begin converting Samsung platforms over to
these methods by converting s3c_irqext_wake() with a simple textual
substitution.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2010-12-30 09:36:52 +09:00
Lionel Debroux 2f55ac072f suspend: constify platform_suspend_ops
While at it, fix two checkpatch errors.
Several non-const struct instances constified by this patch were added after
the introduction of platform_suspend_ops in checkpatch.pl's list of "should
be const" structs (79404849e9).

Patch against mainline.
Inspired by hunks of the grsecurity patch, updated for newer kernels.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-16 14:14:02 +01:00
Ben Dooks 806c17b549 ARM: SAMSUNG: Move pm.c to plat-samsung
Move pm.c to plat-samsung, it should be usable by all Samsung systems

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-23 00:03:43 +00:00
Renamed from arch/arm/plat-s3c/pm.c (Browse further)