Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Kukjin Kim <kgene.kim@samsung.com>
To: linux-samsung-soc@vger.kernel.org
Cc: ben-linux@fluff.org, Sunyoung Kang <sy0816.kang@samsung.com>,
	Kukjin Kim <kgene.kim@samsung.com>
Subject: [PATCH 3/7] ARM: S5PV310: Add DMC registers and map_desc
Date: Thu, 23 Dec 2010 14:49:53 +0900	[thread overview]
Message-ID: <1293083397-15969-4-git-send-email-kgene.kim@samsung.com> (raw)
In-Reply-To: <1293083397-15969-1-git-send-email-kgene.kim@samsung.com>

From: Sunyoung Kang <sy0816.kang@samsung.com>

This patch adds DMC io mapping for access it and adds registers.
This is used in checking DRAM memory type.

Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s5pv310/cpu.c                   |    5 +++++
 arch/arm/mach-s5pv310/include/mach/map.h      |    2 ++
 arch/arm/mach-s5pv310/include/mach/regs-mem.h |   23 +++++++++++++++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s5pv310/include/mach/regs-mem.h

diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
index 82ce4aa..283dd75 100644
--- a/arch/arm/mach-s5pv310/cpu.c
+++ b/arch/arm/mach-s5pv310/cpu.c
@@ -73,6 +73,11 @@ static struct map_desc s5pv310_iodesc[] __initdata = {
 		.length		= SZ_256,
 		.type		= MT_DEVICE,
 	}, {
+		.virtual	= (unsigned long)S5P_VA_DMC0,
+		.pfn		= __phys_to_pfn(S5PV310_PA_DMC0),
+		.length		= SZ_4K,
+		.type		= MT_DEVICE,
+	}, {
 		.virtual	= (unsigned long)S3C_VA_UART,
 		.pfn		= __phys_to_pfn(S3C_PA_UART),
 		.length		= SZ_512K,
diff --git a/arch/arm/mach-s5pv310/include/mach/map.h b/arch/arm/mach-s5pv310/include/mach/map.h
index 7acf4e7..37294f1 100644
--- a/arch/arm/mach-s5pv310/include/mach/map.h
+++ b/arch/arm/mach-s5pv310/include/mach/map.h
@@ -44,6 +44,8 @@
 #define S5PV310_PA_WATCHDOG		(0x10060000)
 #define S5PV310_PA_RTC			(0x10070000)
 
+#define S5PV310_PA_DMC0			(0x10400000)
+
 #define S5PV310_PA_COMBINER		(0x10448000)
 
 #define S5PV310_PA_COREPERI		(0x10500000)
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-mem.h b/arch/arm/mach-s5pv310/include/mach/regs-mem.h
new file mode 100644
index 0000000..8342271
--- /dev/null
+++ b/arch/arm/mach-s5pv310/include/mach/regs-mem.h
@@ -0,0 +1,23 @@
+/* linux/arch/arm/mach-s5pv310/include/mach/regs-mem.h
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * S5PV310 - SROMC and DMC 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 __ASM_ARCH_REGS_MEM_H
+#define __ASM_ARCH_REGS_MEM_H __FILE__
+
+#include <mach/map.h>
+
+#define S5P_DMC0_MEMCON_OFFSET		0x04
+
+#define S5P_DMC0_MEMTYPE_SHIFT		8
+#define S5P_DMC0_MEMTYPE_MASK		0xF
+
+#endif /* __ASM_ARCH_REGS_MEM_H */
-- 
1.6.2.5

  parent reply	other threads:[~2010-12-23  6:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23  5:49 [PATCH 0/7] ARM: S5PV310: Add support CPUFREQ driver Kukjin Kim
2010-12-23  5:49 ` [PATCH 1/7] ARM: S5PV310: Update CMU registers for CPUFREQ Kukjin Kim
2010-12-23  5:49 ` [PATCH V3 2/7] ARM: S5PV310: Define missing CMU register " Kukjin Kim
2010-12-23  5:49 ` Kukjin Kim [this message]
2010-12-23  5:49 ` [PATCH 4/7] ARM: S5PV310: Add support CPUFREQ Kukjin Kim
2010-12-23  5:49 ` [PATCH V3 5/7] ARM: S5PV310: Update CPUFREQ Kukjin Kim
2010-12-23  5:49 ` [PATCH V3 6/7] ARM: S5PV310: Add FOUT APLL get rate function Kukjin Kim
2010-12-23  5:49 ` [PATCH 7/7] ARM: S5PV310: Update Kconfig and Makefile for supporting CPUFREQ Kukjin Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293083397-15969-4-git-send-email-kgene.kim@samsung.com \
    --to=kgene.kim@samsung.com \
    --cc=ben-linux@fluff.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sy0816.kang@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox