All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Valentin <eduardo.valentin@nokia.com>
To: LKML <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Linux-OMAP <linux-omap@vger.kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	ext Tony Lindgren <tony@atomide.com>,
	ext Kevin Hilman <khilman@deeprootsystems.com>,
	Peter De-Schrijver <Peter.De-Schrijver@nokia.com>,
	santosh.shilimkar@ti.com, Ambresh <a0393775@ti.com>,
	felipe.balbi@nokia.com,
	Eduardo Valentin <eduardo.valentin@nokia.com>
Subject: [PATCHv4 1/4] procfs: Introduce socinfo under /proc
Date: Mon, 10 May 2010 13:37:34 +0300	[thread overview]
Message-ID: <1273487857-32281-2-git-send-email-eduardo.valentin@nokia.com> (raw)
In-Reply-To: <1273487857-32281-1-git-send-email-eduardo.valentin@nokia.com>

From: Eduardo Valentin <eduardo.valentin@nokia.com>

This patch introduce the /proc/socinfo node. Its purpose is to
export System on Chip information and specific bits.

The way it is done is basically same structure which is used to build
/proc/cpuinfo. Thus, it relies on the existence of socinfo_op seq_operation
structure. This structure must be provided by soc core code.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
---
 Documentation/filesystems/proc.txt |    1 +
 fs/proc/Kconfig                    |    7 +++++++
 fs/proc/Makefile                   |    1 +
 fs/proc/socinfo.c                  |   33 +++++++++++++++++++++++++++++++++
 4 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 fs/proc/socinfo.c

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index a4f30fa..039bcb7 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -415,6 +415,7 @@ Table 1-5: Kernel info in /proc
  bus         Directory containing bus specific information     
  cmdline     Kernel command line                               
  cpuinfo     Info about the CPU                                
+ socinfo     Info about the System on Chip                     
  devices     Available devices (block and character)           
  dma         Used DMS channels                                 
  filesystems Supported filesystems                             
diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig
index 50f8f06..e683d62 100644
--- a/fs/proc/Kconfig
+++ b/fs/proc/Kconfig
@@ -67,3 +67,10 @@ config PROC_PAGE_MONITOR
 	  /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
 	  /proc/kpagecount, and /proc/kpageflags. Disabling these
           interfaces will reduce the size of the kernel by approximately 4kb.
+
+config PROC_SOCINFO
+ 	default y
+	depends on PROC_FS
+	bool "Enable /proc/socinfo" if EMBEDDED
+ 	help
+	  Say Y here if you need to see information about the your System on Chip.
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index 11a7b5c..7757d44 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -26,3 +26,4 @@ proc-$(CONFIG_PROC_VMCORE)	+= vmcore.o
 proc-$(CONFIG_PROC_DEVICETREE)	+= proc_devtree.o
 proc-$(CONFIG_PRINTK)	+= kmsg.o
 proc-$(CONFIG_PROC_PAGE_MONITOR)	+= page.o
+proc-$(CONFIG_PROC_SOCINFO)	+= socinfo.o
diff --git a/fs/proc/socinfo.c b/fs/proc/socinfo.c
new file mode 100644
index 0000000..05bfc4f
--- /dev/null
+++ b/fs/proc/socinfo.c
@@ -0,0 +1,33 @@
+/*
+ *  fs/proc/socinfo.c
+ *
+ *  Copyright (C) 2010 Nokia Corporation
+ *
+ *  Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
+ *
+ *  proc socinfo file
+ */
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+extern const struct seq_operations socinfo_op;
+static int socinfo_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &socinfo_op);
+}
+
+static const struct file_operations proc_socinfo_operations = {
+	.open		= socinfo_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
+};
+
+static int __init proc_socinfo_init(void)
+{
+	proc_create("socinfo", 0, NULL, &proc_socinfo_operations);
+	return 0;
+}
+module_init(proc_socinfo_init);
-- 
1.7.0.4.361.g8b5fe.dirty


WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Valentin <eduardo.valentin@nokia.com>
To: LKML <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Linux-OMAP <linux-omap@vger.kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>,
	ext Tony Lindgren <tony@atomide.com>,
	Peter De-Schrijver <Peter.De-Schrijver@nokia.com>,
	Eduardo Valentin <eduardo.valentin@nokia.com>,
	Ambresh <a0393775@ti.com>,
	ext Kevin Hilman <khilman@deeprootsystems.com>,
	santosh.shilimkar@ti.com,
	Andrew Morton <akpm@linux-foundation.org>,
	felipe.balbi@nokia.com
Subject: [PATCHv4 1/4] procfs: Introduce socinfo under /proc
Date: Mon, 10 May 2010 13:37:34 +0300	[thread overview]
Message-ID: <1273487857-32281-2-git-send-email-eduardo.valentin@nokia.com> (raw)
In-Reply-To: <1273487857-32281-1-git-send-email-eduardo.valentin@nokia.com>

From: Eduardo Valentin <eduardo.valentin@nokia.com>

This patch introduce the /proc/socinfo node. Its purpose is to
export System on Chip information and specific bits.

The way it is done is basically same structure which is used to build
/proc/cpuinfo. Thus, it relies on the existence of socinfo_op seq_operation
structure. This structure must be provided by soc core code.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
---
 Documentation/filesystems/proc.txt |    1 +
 fs/proc/Kconfig                    |    7 +++++++
 fs/proc/Makefile                   |    1 +
 fs/proc/socinfo.c                  |   33 +++++++++++++++++++++++++++++++++
 4 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 fs/proc/socinfo.c

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index a4f30fa..039bcb7 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -415,6 +415,7 @@ Table 1-5: Kernel info in /proc
  bus         Directory containing bus specific information     
  cmdline     Kernel command line                               
  cpuinfo     Info about the CPU                                
+ socinfo     Info about the System on Chip                     
  devices     Available devices (block and character)           
  dma         Used DMS channels                                 
  filesystems Supported filesystems                             
diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig
index 50f8f06..e683d62 100644
--- a/fs/proc/Kconfig
+++ b/fs/proc/Kconfig
@@ -67,3 +67,10 @@ config PROC_PAGE_MONITOR
 	  /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
 	  /proc/kpagecount, and /proc/kpageflags. Disabling these
           interfaces will reduce the size of the kernel by approximately 4kb.
+
+config PROC_SOCINFO
+ 	default y
+	depends on PROC_FS
+	bool "Enable /proc/socinfo" if EMBEDDED
+ 	help
+	  Say Y here if you need to see information about the your System on Chip.
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index 11a7b5c..7757d44 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -26,3 +26,4 @@ proc-$(CONFIG_PROC_VMCORE)	+= vmcore.o
 proc-$(CONFIG_PROC_DEVICETREE)	+= proc_devtree.o
 proc-$(CONFIG_PRINTK)	+= kmsg.o
 proc-$(CONFIG_PROC_PAGE_MONITOR)	+= page.o
+proc-$(CONFIG_PROC_SOCINFO)	+= socinfo.o
diff --git a/fs/proc/socinfo.c b/fs/proc/socinfo.c
new file mode 100644
index 0000000..05bfc4f
--- /dev/null
+++ b/fs/proc/socinfo.c
@@ -0,0 +1,33 @@
+/*
+ *  fs/proc/socinfo.c
+ *
+ *  Copyright (C) 2010 Nokia Corporation
+ *
+ *  Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
+ *
+ *  proc socinfo file
+ */
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+extern const struct seq_operations socinfo_op;
+static int socinfo_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &socinfo_op);
+}
+
+static const struct file_operations proc_socinfo_operations = {
+	.open		= socinfo_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
+};
+
+static int __init proc_socinfo_init(void)
+{
+	proc_create("socinfo", 0, NULL, &proc_socinfo_operations);
+	return 0;
+}
+module_init(proc_socinfo_init);
-- 
1.7.0.4.361.g8b5fe.dirty

WARNING: multiple messages have this Message-ID (diff)
From: eduardo.valentin@nokia.com (Eduardo Valentin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 1/4] procfs: Introduce socinfo under /proc
Date: Mon, 10 May 2010 13:37:34 +0300	[thread overview]
Message-ID: <1273487857-32281-2-git-send-email-eduardo.valentin@nokia.com> (raw)
In-Reply-To: <1273487857-32281-1-git-send-email-eduardo.valentin@nokia.com>

From: Eduardo Valentin <eduardo.valentin@nokia.com>

This patch introduce the /proc/socinfo node. Its purpose is to
export System on Chip information and specific bits.

The way it is done is basically same structure which is used to build
/proc/cpuinfo. Thus, it relies on the existence of socinfo_op seq_operation
structure. This structure must be provided by soc core code.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
---
 Documentation/filesystems/proc.txt |    1 +
 fs/proc/Kconfig                    |    7 +++++++
 fs/proc/Makefile                   |    1 +
 fs/proc/socinfo.c                  |   33 +++++++++++++++++++++++++++++++++
 4 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 fs/proc/socinfo.c

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index a4f30fa..039bcb7 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -415,6 +415,7 @@ Table 1-5: Kernel info in /proc
  bus         Directory containing bus specific information     
  cmdline     Kernel command line                               
  cpuinfo     Info about the CPU                                
+ socinfo     Info about the System on Chip                     
  devices     Available devices (block and character)           
  dma         Used DMS channels                                 
  filesystems Supported filesystems                             
diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig
index 50f8f06..e683d62 100644
--- a/fs/proc/Kconfig
+++ b/fs/proc/Kconfig
@@ -67,3 +67,10 @@ config PROC_PAGE_MONITOR
 	  /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
 	  /proc/kpagecount, and /proc/kpageflags. Disabling these
           interfaces will reduce the size of the kernel by approximately 4kb.
+
+config PROC_SOCINFO
+ 	default y
+	depends on PROC_FS
+	bool "Enable /proc/socinfo" if EMBEDDED
+ 	help
+	  Say Y here if you need to see information about the your System on Chip.
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index 11a7b5c..7757d44 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -26,3 +26,4 @@ proc-$(CONFIG_PROC_VMCORE)	+= vmcore.o
 proc-$(CONFIG_PROC_DEVICETREE)	+= proc_devtree.o
 proc-$(CONFIG_PRINTK)	+= kmsg.o
 proc-$(CONFIG_PROC_PAGE_MONITOR)	+= page.o
+proc-$(CONFIG_PROC_SOCINFO)	+= socinfo.o
diff --git a/fs/proc/socinfo.c b/fs/proc/socinfo.c
new file mode 100644
index 0000000..05bfc4f
--- /dev/null
+++ b/fs/proc/socinfo.c
@@ -0,0 +1,33 @@
+/*
+ *  fs/proc/socinfo.c
+ *
+ *  Copyright (C) 2010 Nokia Corporation
+ *
+ *  Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
+ *
+ *  proc socinfo file
+ */
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+extern const struct seq_operations socinfo_op;
+static int socinfo_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &socinfo_op);
+}
+
+static const struct file_operations proc_socinfo_operations = {
+	.open		= socinfo_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
+};
+
+static int __init proc_socinfo_init(void)
+{
+	proc_create("socinfo", 0, NULL, &proc_socinfo_operations);
+	return 0;
+}
+module_init(proc_socinfo_init);
-- 
1.7.0.4.361.g8b5fe.dirty

  reply	other threads:[~2010-05-10 10:37 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10 10:37 [PATCHv4 0/4] Introduce the /proc/socinfo and use it to export OMAP data Eduardo Valentin
2010-05-10 10:37 ` Eduardo Valentin
2010-05-10 10:37 ` Eduardo Valentin [this message]
2010-05-10 10:37   ` [PATCHv4 1/4] procfs: Introduce socinfo under /proc Eduardo Valentin
2010-05-10 10:37   ` Eduardo Valentin
2010-05-10 11:13   ` Paul Mundt
2010-05-10 11:13     ` Paul Mundt
2010-05-10 12:35     ` Eduardo Valentin
2010-05-10 12:35       ` Eduardo Valentin
2010-05-10 12:35       ` Eduardo Valentin
2010-05-10 12:39       ` Paul Mundt
2010-05-10 12:39         ` Paul Mundt
2010-05-10 12:39         ` Paul Mundt
2010-05-10 12:55         ` Eduardo Valentin
2010-05-10 12:55           ` Eduardo Valentin
2010-05-10 12:55           ` Eduardo Valentin
2010-05-11  3:14           ` Paul Mundt
2010-05-11  3:14             ` Paul Mundt
2010-05-11  3:14             ` Paul Mundt
2010-05-11  6:21             ` Russell King - ARM Linux
2010-05-11  6:21               ` Russell King - ARM Linux
2010-05-11  6:21               ` Russell King - ARM Linux
2010-05-10 12:54     ` Felipe Balbi
2010-05-10 12:54       ` Felipe Balbi
2010-05-10 12:54       ` Felipe Balbi
2010-05-10 13:08       ` Eduardo Valentin
2010-05-10 13:08         ` Eduardo Valentin
2010-05-10 13:08         ` Eduardo Valentin
2010-05-10 18:15         ` Felipe Balbi
2010-05-10 18:15           ` Felipe Balbi
2010-05-10 18:15           ` Felipe Balbi
2010-05-10 14:22     ` Eduardo Valentin
2010-05-10 14:22       ` Eduardo Valentin
2010-05-10 14:22       ` Eduardo Valentin
2010-05-11  3:11       ` Paul Mundt
2010-05-11  3:11         ` Paul Mundt
2010-05-11  3:11         ` Paul Mundt
2010-05-10 10:37 ` [PATCHv4 2/4] mach-omap2: export omap2 info under /proc/socinfo Eduardo Valentin
2010-05-10 10:37   ` Eduardo Valentin
2010-05-10 10:37 ` [PATCHv4 3/4] mach-omap1: export omap1 " Eduardo Valentin
2010-05-10 10:37   ` Eduardo Valentin
2010-05-10 10:37   ` Eduardo Valentin
2010-05-10 10:52   ` Russell King - ARM Linux
2010-05-10 10:52     ` Russell King - ARM Linux
2010-05-10 12:13     ` Eduardo Valentin
2010-05-10 12:13       ` Eduardo Valentin
2010-05-10 12:13       ` Eduardo Valentin
2010-05-10 10:37 ` [PATCHv4 4/4] OMAP3: export chip IDCODE, Production ID and Die ID Eduardo Valentin
2010-05-10 10:37   ` Eduardo Valentin
2010-05-10 10:37   ` Eduardo Valentin

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=1273487857-32281-2-git-send-email-eduardo.valentin@nokia.com \
    --to=eduardo.valentin@nokia.com \
    --cc=Peter.De-Schrijver@nokia.com \
    --cc=a0393775@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=felipe.balbi@nokia.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.