* [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller
@ 2013-02-18 7:54 Thomas Abraham
2013-02-18 7:54 ` [PATCH 1/2] ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using device tree Thomas Abraham
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Thomas Abraham @ 2013-02-18 7:54 UTC (permalink / raw)
To: linux-arm-kernel
This patch series allows device tree enabled platforms to setup a runtime
I/O mapping for the chip-id controller. This helps to remove statically
defined I/O mapping for the Chip-ID controller.
Thomas Abraham (2):
ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using device tree
ARM: dts: Add chip-id controller node on Exynos4/5 SoC
.../arm/samsung/samsung,exynos4210-chipid.txt | 15 ++++++
arch/arm/boot/dts/exynos4.dtsi | 5 ++
arch/arm/boot/dts/exynos5250.dtsi | 5 ++
arch/arm/mach-exynos/common.c | 53 +++++++++++---------
arch/arm/mach-exynos/include/mach/map.h | 1 -
5 files changed, 55 insertions(+), 24 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-chipid.txt
--
1.7.5.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using device tree
2013-02-18 7:54 [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Thomas Abraham
@ 2013-02-18 7:54 ` Thomas Abraham
2013-02-18 7:54 ` [PATCH 2/2] ARM: dts: Add chip-id controller node on Exynos4/5 SoC Thomas Abraham
2013-04-04 6:57 ` [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Kukjin Kim
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Abraham @ 2013-02-18 7:54 UTC (permalink / raw)
To: linux-arm-kernel
On device tree enabled exynos platforms, retrieve the physical base address
of the chip-id controller from device tree and create a virtual I/O mapping
for the chip-id controller. This helps to remove the chip-id controller entry
from the statically defined I/O mapping tables.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
.../arm/samsung/samsung,exynos4210-chipid.txt | 15 ++++++
arch/arm/mach-exynos/common.c | 53 +++++++++++---------
arch/arm/mach-exynos/include/mach/map.h | 1 -
3 files changed, 45 insertions(+), 24 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-chipid.txt
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-chipid.txt b/Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-chipid.txt
new file mode 100644
index 0000000..becb2ba
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-chipid.txt
@@ -0,0 +1,15 @@
+* Samsung Exynos4/5 Chip-ID controller
+
+Samsung's Exynos4/5 architectures include a chipid controller which can be used
+to determine the product id and revision.
+
+Required properties:
+- compatible: should be "samsung,exynos4210-chipid".
+- reg: Base address and size of the chip-id controller registers.
+
+Example:
+
+ chipid at 10000000 {
+ compatible = "samsung,exynos4210-chipid";
+ reg = <0x10000000 0x100>;
+ };
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 4ce342e..208dcf0 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -121,17 +121,6 @@ static struct map_desc exynos_iodesc[] __initdata = {
},
};
-#ifdef CONFIG_ARCH_EXYNOS5
-static struct map_desc exynos5440_iodesc[] __initdata = {
- {
- .virtual = (unsigned long)S5P_VA_CHIPID,
- .pfn = __phys_to_pfn(EXYNOS5440_PA_CHIPID),
- .length = SZ_4K,
- .type = MT_DEVICE,
- },
-};
-#endif
-
static struct map_desc exynos4_iodesc[] __initdata = {
{
.virtual = (unsigned long)S3C_VA_SYS,
@@ -354,6 +343,31 @@ void __init exynos_init_late(void)
exynos_pm_late_initcall();
}
+#ifdef CONFIG_OF
+int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
+ int depth, void *data)
+{
+ struct map_desc iodesc;
+ __be32 *reg;
+ unsigned long len;
+
+ if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") &&
+ !of_flat_dt_is_compatible(node, "samsung,exynos5440-clock"))
+ return 0;
+
+ reg = of_get_flat_dt_prop(node, "reg", &len);
+ if (reg == NULL || len != (sizeof(unsigned long) * 2))
+ return 0;
+
+ iodesc.pfn = __phys_to_pfn(be32_to_cpu(reg[0]));
+ iodesc.length = be32_to_cpu(reg[1]) - 1;
+ iodesc.virtual = (unsigned long)S5P_VA_CHIPID;
+ iodesc.type = MT_DEVICE;
+ iotable_init(&iodesc, 1);
+ return 1;
+}
+#endif
+
/*
* exynos_map_io
*
@@ -362,19 +376,12 @@ void __init exynos_init_late(void)
void __init exynos_init_io(struct map_desc *mach_desc, int size)
{
- struct map_desc *iodesc = exynos_iodesc;
- int iodesc_sz = ARRAY_SIZE(exynos_iodesc);
-#if defined(CONFIG_OF) && defined(CONFIG_ARCH_EXYNOS5)
- unsigned long root = of_get_flat_dt_root();
-
- /* initialize the io descriptors we need for initialization */
- if (of_flat_dt_is_compatible(root, "samsung,exynos5440")) {
- iodesc = exynos5440_iodesc;
- iodesc_sz = ARRAY_SIZE(exynos5440_iodesc);
- }
+#ifdef CONFIG_OF
+ if (initial_boot_params)
+ of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
+ else
#endif
-
- iotable_init(iodesc, iodesc_sz);
+ iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
if (mach_desc)
iotable_init(mach_desc, size);
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index b8ea67e..ac73b27 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -56,7 +56,6 @@
#define EXYNOS4_PA_ONENAND_DMA 0x0C600000
#define EXYNOS_PA_CHIPID 0x10000000
-#define EXYNOS5440_PA_CHIPID 0x00160000
#define EXYNOS4_PA_SYSCON 0x10010000
#define EXYNOS5_PA_SYSCON 0x10050100
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ARM: dts: Add chip-id controller node on Exynos4/5 SoC
2013-02-18 7:54 [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Thomas Abraham
2013-02-18 7:54 ` [PATCH 1/2] ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using device tree Thomas Abraham
@ 2013-02-18 7:54 ` Thomas Abraham
2013-04-04 6:57 ` [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Kukjin Kim
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Abraham @ 2013-02-18 7:54 UTC (permalink / raw)
To: linux-arm-kernel
Add chip-id controller nodes for Exynos4 and Exynos5 SoCs.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
arch/arm/boot/dts/exynos4.dtsi | 5 +++++
arch/arm/boot/dts/exynos5250.dtsi | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 6581bb2..1a02189 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -38,6 +38,11 @@
i2c7 = &i2c_7;
};
+ chipid at 10000000 {
+ compatible = "samsung,exynos4210-chipid";
+ reg = <0x10000000 0x100>;
+ };
+
pd_mfc: mfc-power-domain at 10023C40 {
compatible = "samsung,exynos4210-pd";
reg = <0x10023C40 0x20>;
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 7c3d07a..fce773e 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -46,6 +46,11 @@
i2c8 = &i2c_8;
};
+ chipid at 10000000 {
+ compatible = "samsung,exynos4210-chipid";
+ reg = <0x10000000 0x100>;
+ };
+
pd_gsc: gsc-power-domain at 0x10044000 {
compatible = "samsung,exynos4210-pd";
reg = <0x10044000 0x20>;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller
2013-02-18 7:54 [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Thomas Abraham
2013-02-18 7:54 ` [PATCH 1/2] ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using device tree Thomas Abraham
2013-02-18 7:54 ` [PATCH 2/2] ARM: dts: Add chip-id controller node on Exynos4/5 SoC Thomas Abraham
@ 2013-04-04 6:57 ` Kukjin Kim
2013-04-22 11:20 ` Thomas Abraham
2 siblings, 1 reply; 6+ messages in thread
From: Kukjin Kim @ 2013-04-04 6:57 UTC (permalink / raw)
To: linux-arm-kernel
Thomas Abraham wrote:
>
> This patch series allows device tree enabled platforms to setup a runtime
> I/O mapping for the chip-id controller. This helps to remove statically
> defined I/O mapping for the Chip-ID controller.
>
> Thomas Abraham (2):
> ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using
> device tree
> ARM: dts: Add chip-id controller node on Exynos4/5 SoC
>
> .../arm/samsung/samsung,exynos4210-chipid.txt | 15 ++++++
> arch/arm/boot/dts/exynos4.dtsi | 5 ++
> arch/arm/boot/dts/exynos5250.dtsi | 5 ++
> arch/arm/mach-exynos/common.c | 53
+++++++++++---------
> arch/arm/mach-exynos/include/mach/map.h | 1 -
> 5 files changed, 55 insertions(+), 24 deletions(-)
> create mode 100644
> Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-
> chipid.txt
>
> --
> 1.7.5.4
Thomas,
Can you update this series can support exynos5440 as well? It should be done
together.
- Kukjin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller
2013-04-04 6:57 ` [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Kukjin Kim
@ 2013-04-22 11:20 ` Thomas Abraham
2013-04-22 16:47 ` Kukjin Kim
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Abraham @ 2013-04-22 11:20 UTC (permalink / raw)
To: linux-arm-kernel
On 4 April 2013 12:27, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Thomas Abraham wrote:
>>
>> This patch series allows device tree enabled platforms to setup a runtime
>> I/O mapping for the chip-id controller. This helps to remove statically
>> defined I/O mapping for the Chip-ID controller.
>>
>> Thomas Abraham (2):
>> ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using
>> device tree
>> ARM: dts: Add chip-id controller node on Exynos4/5 SoC
>>
>> .../arm/samsung/samsung,exynos4210-chipid.txt | 15 ++++++
>> arch/arm/boot/dts/exynos4.dtsi | 5 ++
>> arch/arm/boot/dts/exynos5250.dtsi | 5 ++
>> arch/arm/mach-exynos/common.c | 53
> +++++++++++---------
>> arch/arm/mach-exynos/include/mach/map.h | 1 -
>> 5 files changed, 55 insertions(+), 24 deletions(-)
>> create mode 100644
>> Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-
>> chipid.txt
>>
>> --
>> 1.7.5.4
>
> Thomas,
>
> Can you update this series can support exynos5440 as well? It should be done
> together.
Hi Mr. Kim,
Sorry for the delayed reply. This patch series is supported for
Exynos5440 as well. The v2 version of this patch series has been
submitted.
Thanks,
Thomas.
>
> - Kukjin
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller
2013-04-22 11:20 ` Thomas Abraham
@ 2013-04-22 16:47 ` Kukjin Kim
0 siblings, 0 replies; 6+ messages in thread
From: Kukjin Kim @ 2013-04-22 16:47 UTC (permalink / raw)
To: linux-arm-kernel
On 04/22/13 20:20, Thomas Abraham wrote:
> On 4 April 2013 12:27, Kukjin Kim<kgene.kim@samsung.com> wrote:
>> Thomas Abraham wrote:
>>>
>>> This patch series allows device tree enabled platforms to setup a runtime
>>> I/O mapping for the chip-id controller. This helps to remove statically
>>> defined I/O mapping for the Chip-ID controller.
>>>
>>> Thomas Abraham (2):
>>> ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using
>>> device tree
>>> ARM: dts: Add chip-id controller node on Exynos4/5 SoC
>>>
>>> .../arm/samsung/samsung,exynos4210-chipid.txt | 15 ++++++
>>> arch/arm/boot/dts/exynos4.dtsi | 5 ++
>>> arch/arm/boot/dts/exynos5250.dtsi | 5 ++
>>> arch/arm/mach-exynos/common.c | 53
>> +++++++++++---------
>>> arch/arm/mach-exynos/include/mach/map.h | 1 -
>>> 5 files changed, 55 insertions(+), 24 deletions(-)
>>> create mode 100644
>>> Documentation/devicetree/bindings/arm/samsung/samsung,exynos4210-
>>> chipid.txt
>>>
>>> --
>>> 1.7.5.4
>>
>> Thomas,
>>
>> Can you update this series can support exynos5440 as well? It should be done
>> together.
>
> Hi Mr. Kim,
>
> Sorry for the delayed reply. This patch series is supported for
> Exynos5440 as well. The v2 version of this patch series has been
> submitted.
>
OK, thanks.
- Kukjin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-22 16:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 7:54 [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Thomas Abraham
2013-02-18 7:54 ` [PATCH 1/2] ARM: Exynos: Create virtual I/O mapping for Chip-ID controller using device tree Thomas Abraham
2013-02-18 7:54 ` [PATCH 2/2] ARM: dts: Add chip-id controller node on Exynos4/5 SoC Thomas Abraham
2013-04-04 6:57 ` [PATCH 0/2] ARM: Exynos: Add DT based I/O mapping for Chip-ID controller Kukjin Kim
2013-04-22 11:20 ` Thomas Abraham
2013-04-22 16:47 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).