Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1251496 > unrolled thread
| Started by | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| First post | 2015-10-20 11:20 +0200 |
| Last post | 2015-10-27 08:20 +0100 |
| Articles | 16 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH v5 0/8] Add support for Exynos SROM Controller driver Pankaj Dubey <pankaj.dubey@samsung.com> - 2015-10-20 11:20 +0200
[PATCH v5 7/8] MAINTAINERS: add maintainers entry for drivers/soc/samsung Pankaj Dubey <pankaj.dubey@samsung.com> - 2015-10-20 11:30 +0200
[PATCH v5 3/8] Documentation: dt-bindings: add exynos-srom binding information Pankaj Dubey <pankaj.dubey@samsung.com> - 2015-10-20 11:30 +0200
[PATCH v5 5/8] ARM: dts: add SROM device node for exynos5 Pankaj Dubey <pankaj.dubey@samsung.com> - 2015-10-20 11:30 +0200
[PATCH v5 8/8] ARM: EXYNOS: Remove SROM related register settings from mach-exynos Pankaj Dubey <pankaj.dubey@samsung.com> - 2015-10-20 11:30 +0200
Re: [PATCH v5 8/8] ARM: EXYNOS: Remove SROM related register settings from mach-exynos Kukjin Kim <kgene@kernel.org> - 2015-10-23 20:40 +0200
[PATCH v5 4/8] ARM: dts: add SROM device node for exynos4 Pankaj Dubey <pankaj.dubey@samsung.com> - 2015-10-20 11:30 +0200
[PATCH v5 6/8] drivers: soc: add support for exynos SROM driver Pankaj Dubey <pankaj.dubey@samsung.com> - 2015-10-20 11:30 +0200
Re: [PATCH v5 6/8] drivers: soc: add support for exynos SROM driver Andi Shyti <andi.shyti@samsung.com> - 2015-10-20 13:20 +0200
Re: [PATCH v5 6/8] drivers: soc: add support for exynos SROM driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-10-20 14:40 +0200
Re: [PATCH v5 0/8] Add support for Exynos SROM Controller driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-10-21 02:40 +0200
RE: [PATCH v5 0/8] Add support for Exynos SROM Controller driver Pavel Fedin <p.fedin@samsung.com> - 2015-10-23 11:50 +0200
Re: [PATCH v5 0/8] Add support for Exynos SROM Controller driver Kukjin Kim <kgene@kernel.org> - 2015-10-23 20:20 +0200
RE: [PATCH v5 0/8] Add support for Exynos SROM Controller driver Pavel Fedin <p.fedin@samsung.com> - 2015-10-26 07:50 +0100
Re: [PATCH v5 0/8] Add support for Exynos SROM Controller driver Kukjin Kim <kgene@kernel.org> - 2015-10-27 03:20 +0100
RE: [PATCH v5 0/8] Add support for Exynos SROM Controller driver Pavel Fedin <p.fedin@samsung.com> - 2015-10-27 08:20 +0100
| From | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| Date | 2015-10-20 11:20 +0200 |
| Subject | [PATCH v5 0/8] Add support for Exynos SROM Controller driver |
| Message-ID | <qlBfl-7L2-33@gated-at.bofh.it> |
This patch set adds support for Exynos SROM controller DT based driver. Currently SROM register sets are used only during S2R, so driver basically added for taking care of S2R. It will help us in removing static mapping from exynos.c and other extra code handline during S2R. This patch set also updated exynos4 and exynos5 dtsi files for with device node for srom, and added binding documentation for the same. First two patches are some minor cleanup in mach-exynos. Patchset v1 was posted here[1] [1]: https://lkml.org/lkml/2015/4/29/98 Patchset v2 was posted here[2] [2]: https://lkml.org/lkml/2015/8/24/125 Patchset v3 was posted here[3] [3]: https://lkml.org/lkml/2015/10/13/392 Patchset v3 was posted here[4] [4]: https://lkml.org/lkml/2015/10/19/278 This patchset, I have tested on Peach-Pi (Exynos5880) based chromebook for boot and S2R functionality. Change since v4: - Removed unnedded NULL assignments from exynos_srom_remove function. - Added PM depency for selecting CONFIG_EXYNOS_SROM. Changes since v3: - Rebased to lastet kgene tree. - Added platform data support, instead of using global variables for srom base - Addressed review comments from LABBE Corentin Changes since v2: - Rebased to latest kgene tree. - Addressed review comments from Krzysztof Kozlowski. - Add new patch for MAINTAINER list update. - Reordered patch sequence for avoiding git bisect issues. Changes since v1: - Rebased to latest kgene tree. - Addressed review comments from Krzysztof Kozlowski. - Add two new patches for minor cleanup in exynos.c and map.h Pankaj Dubey (8): ARM: EXYNOS: remove unused static mapping of CMU for exynos5 ARM: EXYNOS: code cleanup in map.h Documentation: dt-bindings: add exynos-srom binding information ARM: dts: add SROM device node for exynos4 ARM: dts: add SROM device node for exynos5 drivers: soc: add support for exynos SROM driver MAINTAINERS: add maintainers entry for drivers/soc/samsung ARM: EXYNOS: Remove SROM related register settings from mach-exynos .../bindings/arm/samsung/exynos-srom.txt | 12 ++ MAINTAINERS | 1 + arch/arm/boot/dts/exynos4.dtsi | 5 + arch/arm/boot/dts/exynos5.dtsi | 5 + arch/arm/mach-exynos/Kconfig | 2 + arch/arm/mach-exynos/exynos.c | 22 --- arch/arm/mach-exynos/include/mach/map.h | 8 - arch/arm/mach-exynos/regs-srom.h | 53 ------- arch/arm/mach-exynos/suspend.c | 20 +-- arch/arm/plat-samsung/include/plat/map-s5p.h | 1 - drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/samsung/Kconfig | 13 ++ drivers/soc/samsung/Makefile | 1 + drivers/soc/samsung/exynos-srom.c | 175 +++++++++++++++++++++ drivers/soc/samsung/exynos-srom.h | 51 ++++++ 16 files changed, 269 insertions(+), 102 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt delete mode 100644 arch/arm/mach-exynos/regs-srom.h create mode 100644 drivers/soc/samsung/Kconfig create mode 100644 drivers/soc/samsung/Makefile create mode 100644 drivers/soc/samsung/exynos-srom.c create mode 100644 drivers/soc/samsung/exynos-srom.h -- 2.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| Date | 2015-10-20 11:30 +0200 |
| Subject | [PATCH v5 7/8] MAINTAINERS: add maintainers entry for drivers/soc/samsung |
| Message-ID | <qlBp0-7Wo-7@gated-at.bofh.it> |
| In reply to | #1251496 |
This patch adds maintainers entry for new driver folder drivers/soc/samsung Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7ba7ab7..262bba6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1438,6 +1438,7 @@ F: arch/arm/mach-exynos*/ F: drivers/*/*s3c2410* F: drivers/*/*/*s3c2410* F: drivers/spi/spi-s3c* +F: drivers/soc/samsung/* F: sound/soc/samsung/* N: exynos -- 2.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| Date | 2015-10-20 11:30 +0200 |
| Subject | [PATCH v5 3/8] Documentation: dt-bindings: add exynos-srom binding information |
| Message-ID | <qlBp1-7Wo-17@gated-at.bofh.it> |
| In reply to | #1251496 |
This patch adds exynos-srom binding information for SROM Controller
driver on Exynos SoCs.
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
.../devicetree/bindings/arm/samsung/exynos-srom.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt
diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt
new file mode 100644
index 0000000..33886d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt
@@ -0,0 +1,12 @@
+SAMSUNG Exynos SoCs SROM Controller driver.
+
+Required properties:
+- compatible : Should contain "samsung,exynos-srom".
+
+- reg: offset and length of the register set
+
+Example:
+ sromc@12570000 {
+ compatible = "samsung,exynos-srom";
+ reg = <0x12570000 0x10>;
+ };
--
2.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| Date | 2015-10-20 11:30 +0200 |
| Subject | [PATCH v5 5/8] ARM: dts: add SROM device node for exynos5 |
| Message-ID | <qlBp1-7Wo-25@gated-at.bofh.it> |
| In reply to | #1251496 |
Add SROM controller device node for exynos5.
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
arch/arm/boot/dts/exynos5.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
index 110dbd4..b5d3437 100644
--- a/arch/arm/boot/dts/exynos5.dtsi
+++ b/arch/arm/boot/dts/exynos5.dtsi
@@ -30,6 +30,11 @@
reg = <0x10000000 0x100>;
};
+ sromc@12250000 {
+ compatible = "samsung,exynos-srom";
+ reg = <0x12250000 0x10>;
+ };
+
combiner: interrupt-controller@10440000 {
compatible = "samsung,exynos4210-combiner";
#interrupt-cells = <2>;
--
2.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| Date | 2015-10-20 11:30 +0200 |
| Subject | [PATCH v5 8/8] ARM: EXYNOS: Remove SROM related register settings from mach-exynos |
| Message-ID | <qlBp1-7Wo-27@gated-at.bofh.it> |
| In reply to | #1251496 |
As now we have dedicated driver for SROM controller, it will take care
of saving register banks during S2R so we can safely remove these
settings from mach-exynos.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 2 ++
arch/arm/mach-exynos/exynos.c | 17 ---------
arch/arm/mach-exynos/include/mach/map.h | 3 --
arch/arm/mach-exynos/regs-srom.h | 53 ----------------------------
arch/arm/mach-exynos/suspend.c | 20 ++---------
arch/arm/plat-samsung/include/plat/map-s5p.h | 1 -
6 files changed, 4 insertions(+), 92 deletions(-)
delete mode 100644 arch/arm/mach-exynos/regs-srom.h
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 3a10f1a..62c3139 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -27,6 +27,8 @@ menuconfig ARCH_EXYNOS
select SRAM
select THERMAL
select MFD_SYSCON
+ select SOC_SAMSUNG
+ select EXYNOS_SROM if PM
help
Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 524aa6f..4ffb90e 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -37,11 +37,6 @@ void __iomem *pmu_base_addr;
static struct map_desc exynos4_iodesc[] __initdata = {
{
- .virtual = (unsigned long)S5P_VA_SROMC,
- .pfn = __phys_to_pfn(EXYNOS4_PA_SROMC),
- .length = SZ_4K,
- .type = MT_DEVICE,
- }, {
.virtual = (unsigned long)S5P_VA_CMU,
.pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
.length = SZ_128K,
@@ -64,15 +59,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
},
};
-static struct map_desc exynos5_iodesc[] __initdata = {
- {
- .virtual = (unsigned long)S5P_VA_SROMC,
- .pfn = __phys_to_pfn(EXYNOS5_PA_SROMC),
- .length = SZ_4K,
- .type = MT_DEVICE,
- },
-};
-
static struct platform_device exynos_cpuidle = {
.name = "exynos_cpuidle",
#ifdef CONFIG_ARM_EXYNOS_CPUIDLE
@@ -144,9 +130,6 @@ static void __init exynos_map_io(void)
{
if (soc_is_exynos4())
iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
-
- if (soc_is_exynos5())
- iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
}
static void __init exynos_init_io(void)
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 86d8085..351e839 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -32,7 +32,4 @@
#define EXYNOS4_PA_COREPERI 0x10500000
#define EXYNOS4_PA_L2CC 0x10502000
-#define EXYNOS4_PA_SROMC 0x12570000
-#define EXYNOS5_PA_SROMC 0x12250000
-
#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-exynos/regs-srom.h b/arch/arm/mach-exynos/regs-srom.h
deleted file mode 100644
index 5c4d442..0000000
--- a/arch/arm/mach-exynos/regs-srom.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * S5P SROMC register definitions
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __PLAT_SAMSUNG_REGS_SROM_H
-#define __PLAT_SAMSUNG_REGS_SROM_H __FILE__
-
-#include <mach/map.h>
-
-#define S5P_SROMREG(x) (S5P_VA_SROMC + (x))
-
-#define S5P_SROM_BW S5P_SROMREG(0x0)
-#define S5P_SROM_BC0 S5P_SROMREG(0x4)
-#define S5P_SROM_BC1 S5P_SROMREG(0x8)
-#define S5P_SROM_BC2 S5P_SROMREG(0xc)
-#define S5P_SROM_BC3 S5P_SROMREG(0x10)
-#define S5P_SROM_BC4 S5P_SROMREG(0x14)
-#define S5P_SROM_BC5 S5P_SROMREG(0x18)
-
-/* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */
-
-#define S5P_SROM_BW__DATAWIDTH__SHIFT 0
-#define S5P_SROM_BW__ADDRMODE__SHIFT 1
-#define S5P_SROM_BW__WAITENABLE__SHIFT 2
-#define S5P_SROM_BW__BYTEENABLE__SHIFT 3
-
-#define S5P_SROM_BW__CS_MASK 0xf
-
-#define S5P_SROM_BW__NCS0__SHIFT 0
-#define S5P_SROM_BW__NCS1__SHIFT 4
-#define S5P_SROM_BW__NCS2__SHIFT 8
-#define S5P_SROM_BW__NCS3__SHIFT 12
-#define S5P_SROM_BW__NCS4__SHIFT 16
-#define S5P_SROM_BW__NCS5__SHIFT 20
-
-/* applies to same to BCS0 - BCS3 */
-
-#define S5P_SROM_BCX__PMC__SHIFT 0
-#define S5P_SROM_BCX__TACP__SHIFT 4
-#define S5P_SROM_BCX__TCAH__SHIFT 8
-#define S5P_SROM_BCX__TCOH__SHIFT 12
-#define S5P_SROM_BCX__TACC__SHIFT 16
-#define S5P_SROM_BCX__TCOS__SHIFT 24
-#define S5P_SROM_BCX__TACS__SHIFT 28
-
-#endif /* __PLAT_SAMSUNG_REGS_SROM_H */
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index e00eb39..21abd9b 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -31,12 +31,13 @@
#include <asm/smp_scu.h>
#include <asm/suspend.h>
+#include <mach/map.h>
+
#include <plat/pm-common.h>
#include "common.h"
#include "exynos-pmu.h"
#include "regs-pmu.h"
-#include "regs-srom.h"
#define REG_TABLE_END (-1U)
@@ -52,15 +53,6 @@ struct exynos_wkup_irq {
u32 mask;
};
-static struct sleep_save exynos_core_save[] = {
- /* SROM side */
- SAVE_ITEM(S5P_SROM_BW),
- SAVE_ITEM(S5P_SROM_BC0),
- SAVE_ITEM(S5P_SROM_BC1),
- SAVE_ITEM(S5P_SROM_BC2),
- SAVE_ITEM(S5P_SROM_BC3),
-};
-
struct exynos_pm_data {
const struct exynos_wkup_irq *wkup_irq;
unsigned int wake_disable_mask;
@@ -339,8 +331,6 @@ static void exynos_pm_prepare(void)
/* Set wake-up mask registers */
exynos_pm_set_wakeup_mask();
- s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
exynos_pm_enter_sleep_mode();
/* ensure at least INFORM0 has the resume address */
@@ -371,8 +361,6 @@ static void exynos5420_pm_prepare(void)
/* Set wake-up mask registers */
exynos_pm_set_wakeup_mask();
- s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
exynos_pmu_spare3 = pmu_raw_readl(S5P_PMU_SPARE3);
/*
* The cpu state needs to be saved and restored so that the
@@ -463,8 +451,6 @@ static void exynos_pm_resume(void)
/* For release retention */
exynos_pm_release_retention();
- s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
if (cpuid == ARM_CPU_PART_CORTEX_A9)
scu_enable(S5P_VA_SCU);
@@ -531,8 +517,6 @@ static void exynos5420_pm_resume(void)
pmu_raw_writel(exynos_pmu_spare3, S5P_PMU_SPARE3);
- s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
early_wakeup:
tmp = pmu_raw_readl(EXYNOS5420_SFR_AXI_CGDIS1);
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h
index f5cf2bd..e555769 100644
--- a/arch/arm/plat-samsung/include/plat/map-s5p.h
+++ b/arch/arm/plat-samsung/include/plat/map-s5p.h
@@ -18,7 +18,6 @@
#define S5P_VA_DMC0 S3C_ADDR(0x02440000)
#define S5P_VA_DMC1 S3C_ADDR(0x02480000)
-#define S5P_VA_SROMC S3C_ADDR(0x024C0000)
#define S5P_VA_COREPERI_BASE S3C_ADDR(0x02800000)
#define S5P_VA_COREPERI(x) (S5P_VA_COREPERI_BASE + (x))
--
2.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kukjin Kim <kgene@kernel.org> |
|---|---|
| Date | 2015-10-23 20:40 +0200 |
| Subject | Re: [PATCH v5 8/8] ARM: EXYNOS: Remove SROM related register settings from mach-exynos |
| Message-ID | <qmPpT-1c8-3@gated-at.bofh.it> |
| In reply to | #1251509 |
On 10/20/15 18:15, Pankaj Dubey wrote: > As now we have dedicated driver for SROM controller, it will take care > of saving register banks during S2R so we can safely remove these > settings from mach-exynos. > > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> > --- > arch/arm/mach-exynos/Kconfig | 2 ++ > arch/arm/mach-exynos/exynos.c | 17 --------- > arch/arm/mach-exynos/include/mach/map.h | 3 -- > arch/arm/mach-exynos/regs-srom.h | 53 ---------------------------- > arch/arm/mach-exynos/suspend.c | 20 ++--------- > arch/arm/plat-samsung/include/plat/map-s5p.h | 1 - > 6 files changed, 4 insertions(+), 92 deletions(-) > delete mode 100644 arch/arm/mach-exynos/regs-srom.h > > diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig > index 3a10f1a..62c3139 100644 > --- a/arch/arm/mach-exynos/Kconfig > +++ b/arch/arm/mach-exynos/Kconfig > @@ -27,6 +27,8 @@ menuconfig ARCH_EXYNOS > select SRAM > select THERMAL > select MFD_SYSCON > + select SOC_SAMSUNG > + select EXYNOS_SROM if PM Please add them in alphabetical next time...I've changed the order in this time. Thanks, Kukjin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| Date | 2015-10-20 11:30 +0200 |
| Subject | [PATCH v5 4/8] ARM: dts: add SROM device node for exynos4 |
| Message-ID | <qlBp1-7Wo-29@gated-at.bofh.it> |
| In reply to | #1251496 |
Add device node of SROM controller for exynos4.
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
arch/arm/boot/dts/exynos4.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 3184e10..2f31f77 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -76,6 +76,11 @@
reg = <0x10000000 0x100>;
};
+ sromc@12570000 {
+ compatible = "samsung,exynos-srom";
+ reg = <0x12570000 0x10>;
+ };
+
mipi_phy: video-phy@10020710 {
compatible = "samsung,s5pv210-mipi-video-phy";
#phy-cells = <1>;
--
2.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pankaj Dubey <pankaj.dubey@samsung.com> |
|---|---|
| Date | 2015-10-20 11:30 +0200 |
| Subject | [PATCH v5 6/8] drivers: soc: add support for exynos SROM driver |
| Message-ID | <qlBp1-7Wo-33@gated-at.bofh.it> |
| In reply to | #1251496 |
This patch adds Exynos SROM controller driver which will handle
save restore of SROM registers during S2R.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/samsung/Kconfig | 13 +++
drivers/soc/samsung/Makefile | 1 +
drivers/soc/samsung/exynos-srom.c | 175 ++++++++++++++++++++++++++++++++++++++
drivers/soc/samsung/exynos-srom.h | 51 +++++++++++
6 files changed, 242 insertions(+)
create mode 100644 drivers/soc/samsung/Kconfig
create mode 100644 drivers/soc/samsung/Makefile
create mode 100644 drivers/soc/samsung/exynos-srom.c
create mode 100644 drivers/soc/samsung/exynos-srom.h
diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
index 96ddecb..69107c9 100644
--- a/drivers/soc/Kconfig
+++ b/drivers/soc/Kconfig
@@ -2,6 +2,7 @@ menu "SOC (System On Chip) specific Drivers"
source "drivers/soc/mediatek/Kconfig"
source "drivers/soc/qcom/Kconfig"
+source "drivers/soc/samsung/Kconfig"
source "drivers/soc/sunxi/Kconfig"
source "drivers/soc/ti/Kconfig"
source "drivers/soc/versatile/Kconfig"
diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile
index 0b12d77..a623616 100644
--- a/drivers/soc/Makefile
+++ b/drivers/soc/Makefile
@@ -5,6 +5,7 @@
obj-$(CONFIG_MACH_DOVE) += dove/
obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/
obj-$(CONFIG_ARCH_QCOM) += qcom/
+obj-$(CONFIG_SOC_SAMSUNG) += samsung/
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
obj-$(CONFIG_ARCH_TEGRA) += tegra/
obj-$(CONFIG_SOC_TI) += ti/
diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig
new file mode 100644
index 0000000..2833b5b
--- /dev/null
+++ b/drivers/soc/samsung/Kconfig
@@ -0,0 +1,13 @@
+#
+# SAMSUNG SoC drivers
+#
+menu "Samsung SOC driver support"
+
+config SOC_SAMSUNG
+ bool
+
+config EXYNOS_SROM
+ bool
+ depends on ARM && ARCH_EXYNOS && PM
+
+endmenu
diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile
new file mode 100644
index 0000000..9c554d5
--- /dev/null
+++ b/drivers/soc/samsung/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_EXYNOS_SROM) += exynos-srom.o
diff --git a/drivers/soc/samsung/exynos-srom.c b/drivers/soc/samsung/exynos-srom.c
new file mode 100644
index 0000000..57a232d
--- /dev/null
+++ b/drivers/soc/samsung/exynos-srom.c
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * EXYNOS - SROM Controller support
+ * Author: Pankaj Dubey <pankaj.dubey@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+
+#include "exynos-srom.h"
+
+static const unsigned long exynos_srom_offsets[] = {
+ /* SROM side */
+ EXYNOS_SROM_BW,
+ EXYNOS_SROM_BC0,
+ EXYNOS_SROM_BC1,
+ EXYNOS_SROM_BC2,
+ EXYNOS_SROM_BC3,
+};
+
+/**
+ * struct exynos_srom_reg_dump: register dump of SROM Controller registers.
+ * @offset: srom register offset from the controller base address.
+ * @value: the value of register under the offset.
+ */
+struct exynos_srom_reg_dump {
+ u32 offset;
+ u32 value;
+};
+
+/**
+ * struct exynos_srom: platform data for exynos srom controller driver.
+ * @dev: platform device pointer
+ * @reg_base: srom base address
+ * @reg_offset: exynos_srom_reg_dump pointer to hold offset and its value.
+ */
+struct exynos_srom {
+ struct device *dev;
+ void __iomem *reg_base;
+ struct exynos_srom_reg_dump *reg_offset;
+};
+
+static struct exynos_srom_reg_dump *exynos_srom_alloc_reg_dump(
+ const unsigned long *rdump,
+ unsigned long nr_rdump)
+{
+ struct exynos_srom_reg_dump *rd;
+ unsigned int i;
+
+ rd = kcalloc(nr_rdump, sizeof(*rd), GFP_KERNEL);
+ if (!rd)
+ return NULL;
+
+ for (i = 0; i < nr_rdump; ++i)
+ rd[i].offset = rdump[i];
+
+ return rd;
+}
+
+static int exynos_srom_probe(struct platform_device *pdev)
+{
+ struct device_node *np;
+ struct exynos_srom *srom;
+ struct device *dev = &pdev->dev;
+
+ np = dev->of_node;
+ if (!np) {
+ dev_err(&pdev->dev, "could not find device info\n");
+ return -EINVAL;
+ }
+
+ srom = devm_kzalloc(&pdev->dev,
+ sizeof(struct exynos_srom), GFP_KERNEL);
+ if (!srom)
+ return -ENOMEM;
+
+ srom->dev = dev;
+ srom->reg_base = of_iomap(np, 0);
+ if (!srom->reg_base) {
+ dev_err(&pdev->dev, "iomap of exynos srom controller failed\n");
+ return -ENOMEM;
+ }
+
+ platform_set_drvdata(pdev, srom);
+
+ srom->reg_offset = exynos_srom_alloc_reg_dump(exynos_srom_offsets,
+ sizeof(exynos_srom_offsets));
+ if (!srom->reg_offset) {
+ iounmap(srom->reg_base);
+ return -ENOMEM;
+ }
+
+ return 0;
+}
+
+static int exynos_srom_remove(struct platform_device *pdev)
+{
+ struct exynos_srom *srom = platform_get_drvdata(pdev);
+
+ kfree(srom->reg_offset);
+ iounmap(srom->reg_base);
+
+ return 0;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static void exynos_srom_save(void __iomem *base,
+ struct exynos_srom_reg_dump *rd,
+ unsigned int num_regs)
+{
+ for (; num_regs > 0; --num_regs, ++rd)
+ rd->value = readl(base + rd->offset);
+}
+
+static void exynos_srom_restore(void __iomem *base,
+ const struct exynos_srom_reg_dump *rd,
+ unsigned int num_regs)
+{
+ for (; num_regs > 0; --num_regs, ++rd)
+ writel(rd->value, base + rd->offset);
+}
+
+static int exynos_srom_suspend(struct device *dev)
+{
+ struct exynos_srom *srom = dev_get_drvdata(dev);
+
+ exynos_srom_save(srom->reg_base, srom->reg_offset,
+ ARRAY_SIZE(exynos_srom_offsets));
+ return 0;
+}
+
+static int exynos_srom_resume(struct device *dev)
+{
+ struct exynos_srom *srom = dev_get_drvdata(dev);
+
+ exynos_srom_restore(srom->reg_base, srom->reg_offset,
+ ARRAY_SIZE(exynos_srom_offsets));
+ return 0;
+}
+#endif
+
+static const struct of_device_id of_exynos_srom_ids[] = {
+ {
+ .compatible = "samsung,exynos-srom",
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, of_exynos_srom_ids);
+
+static SIMPLE_DEV_PM_OPS(exynos_srom_pm_ops, exynos_srom_suspend, exynos_srom_resume);
+
+static struct platform_driver exynos_srom_driver = {
+ .probe = exynos_srom_probe,
+ .remove = exynos_srom_remove,
+ .driver = {
+ .name = "exynos-srom",
+ .of_match_table = of_exynos_srom_ids,
+ .pm = &exynos_srom_pm_ops,
+ },
+};
+module_platform_driver(exynos_srom_driver);
+
+MODULE_AUTHOR("Pankaj Dubey <pankaj.dubey@samsung.com>");
+MODULE_DESCRIPTION("Exynos SROM Controller Driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/soc/samsung/exynos-srom.h b/drivers/soc/samsung/exynos-srom.h
new file mode 100644
index 0000000..34660c6
--- /dev/null
+++ b/drivers/soc/samsung/exynos-srom.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Exynos SROMC register definitions
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef __EXYNOS_SROM_H
+#define __EXYNOS_SROM_H __FILE__
+
+#define EXYNOS_SROMREG(x) (x)
+
+#define EXYNOS_SROM_BW EXYNOS_SROMREG(0x0)
+#define EXYNOS_SROM_BC0 EXYNOS_SROMREG(0x4)
+#define EXYNOS_SROM_BC1 EXYNOS_SROMREG(0x8)
+#define EXYNOS_SROM_BC2 EXYNOS_SROMREG(0xc)
+#define EXYNOS_SROM_BC3 EXYNOS_SROMREG(0x10)
+#define EXYNOS_SROM_BC4 EXYNOS_SROMREG(0x14)
+#define EXYNOS_SROM_BC5 EXYNOS_SROMREG(0x18)
+
+/* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */
+
+#define EXYNOS_SROM_BW__DATAWIDTH__SHIFT 0
+#define EXYNOS_SROM_BW__ADDRMODE__SHIFT 1
+#define EXYNOS_SROM_BW__WAITENABLE__SHIFT 2
+#define EXYNOS_SROM_BW__BYTEENABLE__SHIFT 3
+
+#define EXYNOS_SROM_BW__CS_MASK 0xf
+
+#define EXYNOS_SROM_BW__NCS0__SHIFT 0
+#define EXYNOS_SROM_BW__NCS1__SHIFT 4
+#define EXYNOS_SROM_BW__NCS2__SHIFT 8
+#define EXYNOS_SROM_BW__NCS3__SHIFT 12
+#define EXYNOS_SROM_BW__NCS4__SHIFT 16
+#define EXYNOS_SROM_BW__NCS5__SHIFT 20
+
+/* applies to same to BCS0 - BCS3 */
+
+#define EXYNOS_SROM_BCX__PMC__SHIFT 0
+#define EXYNOS_SROM_BCX__TACP__SHIFT 4
+#define EXYNOS_SROM_BCX__TCAH__SHIFT 8
+#define EXYNOS_SROM_BCX__TCOH__SHIFT 12
+#define EXYNOS_SROM_BCX__TACC__SHIFT 16
+#define EXYNOS_SROM_BCX__TCOS__SHIFT 24
+#define EXYNOS_SROM_BCX__TACS__SHIFT 28
+
+#endif /* __EXYNOS_SROM_H */
--
2.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andi Shyti <andi.shyti@samsung.com> |
|---|---|
| Date | 2015-10-20 13:20 +0200 |
| Subject | Re: [PATCH v5 6/8] drivers: soc: add support for exynos SROM driver |
| Message-ID | <qlD7r-258-1@gated-at.bofh.it> |
| In reply to | #1251512 |
On Tue, Oct 20, 2015 at 02:45:37PM +0530, Pankaj Dubey wrote: > This patch adds Exynos SROM controller driver which will handle > save restore of SROM registers during S2R. > > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> ... > +config EXYNOS_SROM > + bool > + depends on ARM && ARCH_EXYNOS && PM Cool, thanks! If you want you can add my review. Andi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-10-20 14:40 +0200 |
| Subject | Re: [PATCH v5 6/8] drivers: soc: add support for exynos SROM driver |
| Message-ID | <qlEmS-3NZ-15@gated-at.bofh.it> |
| In reply to | #1251512 |
W dniu 20.10.2015 o 18:15, Pankaj Dubey pisze: > This patch adds Exynos SROM controller driver which will handle > save restore of SROM registers during S2R. > > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> > --- > drivers/soc/Kconfig | 1 + > drivers/soc/Makefile | 1 + > drivers/soc/samsung/Kconfig | 13 +++ > drivers/soc/samsung/Makefile | 1 + > drivers/soc/samsung/exynos-srom.c | 175 ++++++++++++++++++++++++++++++++++++++ > drivers/soc/samsung/exynos-srom.h | 51 +++++++++++ > 6 files changed, 242 insertions(+) > create mode 100644 drivers/soc/samsung/Kconfig > create mode 100644 drivers/soc/samsung/Makefile > create mode 100644 drivers/soc/samsung/exynos-srom.c > create mode 100644 drivers/soc/samsung/exynos-srom.h > Looks good to me, thanks: Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-10-21 02:40 +0200 |
| Message-ID | <qlPBD-3m4-1@gated-at.bofh.it> |
| In reply to | #1251496 |
On 20.10.2015 18:15, Pankaj Dubey wrote: > This patch set adds support for Exynos SROM controller DT based driver. > Currently SROM register sets are used only during S2R, so driver > basically added for taking care of S2R. It will help us in removing > static mapping from exynos.c and other extra code handline during S2R. > > This patch set also updated exynos4 and exynos5 dtsi files for with device > node for srom, and added binding documentation for the same. > > First two patches are some minor cleanup in mach-exynos. > > Patchset v1 was posted here[1] > [1]: https://lkml.org/lkml/2015/4/29/98 > Patchset v2 was posted here[2] > [2]: https://lkml.org/lkml/2015/8/24/125 > Patchset v3 was posted here[3] > [3]: https://lkml.org/lkml/2015/10/13/392 > Patchset v3 was posted here[4] > [4]: https://lkml.org/lkml/2015/10/19/278 > > This patchset, I have tested on Peach-Pi (Exynos5880) based chromebook for boot > and S2R functionality. > Entire patchset tested on Trats2 (Exynos4412) board. Unless Kukjin picks it also, I plan to take it for v4.5. Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pavel Fedin <p.fedin@samsung.com> |
|---|---|
| Date | 2015-10-23 11:50 +0200 |
| Message-ID | <qmH8Z-5X0-1@gated-at.bofh.it> |
| In reply to | #1252393 |
Hello! > > This patchset, I have tested on Peach-Pi (Exynos5880) based chromebook for boot > > and S2R functionality. > > > > Entire patchset tested on Trats2 (Exynos4412) board. Unless Kukjin picks > it also, I plan to take it for v4.5. Tested on SMDK5410. By the way, what is current status? If this is final revision, can i post my Ethernet support patchset on top of it? Tested-by: Pavel Fedin <p.fedin@samsung.com> Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kukjin Kim <kgene@kernel.org> |
|---|---|
| Date | 2015-10-23 20:20 +0200 |
| Message-ID | <qmP6z-Po-31@gated-at.bofh.it> |
| In reply to | #1254436 |
On 10/23/15 18:49, Pavel Fedin wrote: > Hello! > >>> This patchset, I have tested on Peach-Pi (Exynos5880) based chromebook for boot >>> and S2R functionality. >>> >> >> Entire patchset tested on Trats2 (Exynos4412) board. Unless Kukjin picks >> it also, I plan to take it for v4.5. > > Tested on SMDK5410. By the way, what is current status? If this is final revision, can i post my Ethernet support patchset on top > of it? > > Tested-by: Pavel Fedin <p.fedin@samsung.com> > Applied, this whole series. Thanks, Kukjin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pavel Fedin <p.fedin@samsung.com> |
|---|---|
| Date | 2015-10-26 07:50 +0100 |
| Message-ID | <qnJLs-4TL-5@gated-at.bofh.it> |
| In reply to | #1254827 |
Hello! > Applied, this whole series. Where can i find the recent code to base my series on? I looked at linux-samsung.git but was unable to find it there. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kukjin Kim <kgene@kernel.org> |
|---|---|
| Date | 2015-10-27 03:20 +0100 |
| Message-ID | <qo21I-7GO-7@gated-at.bofh.it> |
| In reply to | #1255694 |
On 10/26/15 15:45, Pavel Fedin wrote: > Hello! > Hi, >> Applied, this whole series. > > Where can i find the recent code to base my series on? I looked at linux-samsung.git but was unable to find it there. > You may need to fetch again? Anyway the branch is v4.4-next/driver-samsung or tags/samsung-driver... Or just for-next should be fine I think. See below: https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h=v4.4-next/driver-samsung Thanks, Kukjin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Pavel Fedin <p.fedin@samsung.com> |
|---|---|
| Date | 2015-10-27 08:20 +0100 |
| Message-ID | <qo6I2-2i5-19@gated-at.bofh.it> |
| In reply to | #1256407 |
Hello! > You may need to fetch again? > Anyway the branch is v4.4-next/driver-samsung or tags/samsung-driver... > Or just for-next should be fine I think. Thank you very much, already found it, and even posted my series, you should have already seen it. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web