From: Wayne Lin <00601wayne@gmail.com>
To: linux-input@vger.kernel.org
Cc: wayne <wayne.lin@quantatw.com>
Subject: [RFC 15/36] [Driver][Qualcomm 1070][VERSION] Adding version definition
Date: Mon, 26 Jul 2010 16:30:24 +0800 [thread overview]
Message-ID: <1280133045-25945-15-git-send-email-wayne.lin@quantatw.com> (raw)
In-Reply-To: <1280133045-25945-1-git-send-email-wayne.lin@quantatw.com>
From: wayne <wayne.lin@quantatw.com>
---
arch/arm/include/asm/img_version.h | 14 +++++++++
arch/arm/mach-msm/Makefile | 1 +
arch/arm/mach-msm/smd_private.h | 2 +
arch/arm/mach-msm/version.c | 56 ++++++++++++++++++++++++++++++++++++
4 files changed, 73 insertions(+), 0 deletions(-)
create mode 100755 arch/arm/include/asm/img_version.h
mode change 100644 => 100755 arch/arm/mach-msm/smd_private.h
create mode 100755 arch/arm/mach-msm/version.c
diff --git a/arch/arm/include/asm/img_version.h b/arch/arm/include/asm/img_version.h
new file mode 100755
index 0000000..52a019f
--- /dev/null
+++ b/arch/arm/include/asm/img_version.h
@@ -0,0 +1,14 @@
+#ifndef __IMG_VERSION_H__
+#define __IMG_VERSION_H__
+
+#define MAX_STRING_LEN 32
+
+struct version_info {
+ char project_name[MAX_STRING_LEN];
+ char hw_mode[MAX_STRING_LEN];
+ char hw_revision[MAX_STRING_LEN];
+ char bsp_version[MAX_STRING_LEN];
+ char bsp_revision[MAX_STRING_LEN];
+};
+
+#endif
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index a395627..a8b0153 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -13,6 +13,7 @@ obj-y += cpufreq.o
obj-y += nohlt.o
obj-y += pmic.o
obj-y += internal_power_rail.o
+obj-y += version.o
obj-$(CONFIG_ARCH_MSM_ARM11) += acpuclock.o
obj-$(CONFIG_MSM_VIC) += irq-vic.o
diff --git a/arch/arm/mach-msm/smd_private.h b/arch/arm/mach-msm/smd_private.h
old mode 100644
new mode 100755
index 9686db9..a53d994
--- a/arch/arm/mach-msm/smd_private.h
+++ b/arch/arm/mach-msm/smd_private.h
@@ -253,6 +253,8 @@ enum {
SMEM_SMD_BRIDGE_ALLOC_TABLE,
SMEM_SMDLITE_TABLE,
SMEM_SD_IMG_UPGRADE_STATUS,
+ SMEM_QCI_RAMTEST_INFO,
+ SMEM_QCI_ST15_VERSION,
SMEM_SEFS_INFO,
SMEM_NUM_ITEMS,
};
diff --git a/arch/arm/mach-msm/version.c b/arch/arm/mach-msm/version.c
new file mode 100755
index 0000000..c683fe1
--- /dev/null
+++ b/arch/arm/mach-msm/version.c
@@ -0,0 +1,56 @@
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+#include <linux/utsname.h>
+#include <linux/utsrelease.h>
+#include <asm/uaccess.h>
+#include <asm/img_version.h>
+
+#include "proc_comm.h"
+#include "smd_private.h"
+
+#define KERNEL_VERSION UTS_RELEASE
+#define IMAGE_VERSION "0.1.0"
+
+static int version_proc_show(struct seq_file *m, void *v)
+{
+ struct version_info *version;
+
+ version = smem_alloc(SMEM_QCI_ST15_VERSION , sizeof(struct version_info));
+ if(version == NULL) {
+ pr_err("failed to get data from smem");
+ return -1;
+ }
+
+ seq_printf(m, "Project Name : %s\n", version->project_name);
+ seq_printf(m, "Hardware Mode : %s\n", version->hw_mode);
+ seq_printf(m, "Hardware Revision : %s\n", version->hw_revision);
+ seq_printf(m, "BSP Version : %s\n", version->bsp_version);
+ seq_printf(m, "BSP Revision : %s\n", version->bsp_revision);
+ seq_printf(m, "Kernel version : %s\n", KERNEL_VERSION);
+ seq_printf(m, "Image version : %s\n", IMAGE_VERSION);
+ return 0;
+}
+
+static int version_proc_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, version_proc_show, NULL);
+}
+
+static const struct file_operations version_proc_fops = {
+ .open = version_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int __init proc_version_init(void)
+{
+ proc_create("img_version", 0, NULL, &version_proc_fops);
+
+ return 0;
+}
+module_init(proc_version_init);
+
--
1.7.0.4
next prev parent reply other threads:[~2010-07-26 8:31 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 8:30 [RFC 01/36] [Driver][Qualcomm 1070][LCD] Resolve the booting to Chromium issue Wayne Lin
2010-07-26 8:30 ` [RFC 02/36] [Driver][Qualcomm 1070][USB] Register GPIO#109 for USB analog switch configuration Wayne Lin
2010-07-26 8:30 ` [RFC 04/36] [Driver][Qualcomm 1070][EC_KB] Adding new qci keyboard driver Wayne Lin
2010-07-26 8:55 ` Dmitry Torokhov
2010-07-26 11:16 ` Trilok Soni
2010-07-26 8:59 ` Datta, Shubhrajyoti
2010-07-26 8:30 ` [RFC 05/36] [Driver][Qualcomm 1070][TPM] Enable TPM module Wayne Lin
2010-07-26 8:30 ` [RFC 06/36] [Driver][Qualcomm 1070][EC_BRG] EC Bridge driver porting Wayne Lin
2010-07-26 8:30 ` [RFC 07/36] [Driver][Qualcomm 1070][EC_BRG] Enable EC Bridge Wayne Lin
2010-07-26 8:30 ` [RFC 08/36] [Driver][Qualcomm 1070][EC_BAT] EC battery driver porting Wayne Lin
2010-07-26 8:30 ` [RFC 09/36] [Driver][Qualcomm 1070][EC_BAT] Enable EC battery Wayne Lin
2010-07-26 8:30 ` [RFC 11/36] [Driver][Qualcomm 1070][EC_G_SENSOR] Enable EC gravitation sensor Wayne Lin
2010-07-26 8:30 ` [RFC 12/36] [Driver][Qualcomm 1070][EC_C_SENSOR] EC compass sensor driver porting Wayne Lin
2010-07-26 8:30 ` [RFC 13/36] [Driver][Qualcomm 1070][EC_C_SENSOR] Enable EC compass sensor driver Wayne Lin
2010-07-26 8:30 ` [RFC 14/36] [Driver][Qualcomm 1070][CLOCK] Modify the AXI bus speed Wayne Lin
2010-07-26 8:30 ` Wayne Lin [this message]
2010-07-26 8:30 ` [RFC 17/36] [Driver][Qualcomm 1070][WIFI/BT] Enable Athros WIFI driver Wayne Lin
2010-07-26 8:30 ` [RFC 18/36] [Driver][Qualcomm 1070][WIFI] Turn on the Athros WIFI power Wayne Lin
2010-07-26 8:30 ` [RFC 19/36] [Driver][Qualcomm 1070][BT] Enable Athros BT driver Wayne Lin
2010-07-26 8:30 ` [RFC 20/36] [Driver][Qualcomm 1070][WIFI/BT] Enable MMC1 dummy send read and configure Athros WIFI build-in driver Wayne Lin
2010-07-26 8:30 ` [RFC 21/36] Revert " [Driver][Qualcomm 1070][CLOCK] Modify the AXI bus speed" Wayne Lin
2010-07-26 8:46 ` Dmitry Torokhov
2010-07-26 8:30 ` [RFC 22/36] [Driver][Qualcomm 1070][CLOCK] Modify the AXI bus maximum speed Wayne Lin
2010-07-26 8:30 ` [RFC 23/36] [Driver][Qualcomm 1065][AT_COMMAND]retrieve message Wayne Lin
2010-07-26 8:30 ` [RFC 24/36] [Driver][Qualcomm 1070][CLOCK] Modify the AXI clock for 1.2Ghz Wayne Lin
2010-07-26 8:30 ` [RFC 25/36] [Driver][Qualcomm 1070][EC_BRG] Adding new EC bridge driver Wayne Lin
2010-07-26 8:30 ` [RFC 26/36] [Driver][Qualcomm 1070][EC_BL] New EC backlight driver porting Wayne Lin
2010-07-26 8:30 ` [RFC 27/36] [Driver][Qualcomm 1070][EC_BRG] Enable NuvoTon WPCE775X driver and disable WinBond WPCE775X driver Wayne Lin
2010-07-26 8:30 ` [RFC 28/36] [Driver][Qualcomm 1070][EC_BL] Enable QCI backlight driver Wayne Lin
2010-07-26 8:30 ` [RFC 29/36] [Driver][Qualcomm 1070][EC_BRG] Correct new EC bridge driver Makefile and Kconfig Wayne Lin
2010-07-26 8:30 ` [RFC 30/36] [Driver][Qualcomm 1070][EC_G_SENSOR] Enable EC gravitation sensor Wayne Lin
2010-07-26 8:30 ` [RFC 31/36] [Driver][Qualcomm 1070][VERSION] 0.1.1 Wayne Lin
2010-07-26 8:30 ` [RFC 32/36] [Driver][Qualcomm 1070][MMC] Enable MMC1 HW detection Wayne Lin
2010-07-26 8:30 ` [RFC 33/36] [Driver][Qualcomm 1070][VERSION] 0.1.2 Wayne Lin
2010-07-26 8:30 ` [RFC 34/36] [Driver][Qualcomm 1070][EC_BAT] Adding newer version battery driver Wayne Lin
2010-07-26 8:30 ` [RFC 35/36] [Driver][Qualcomm 1070][EC_BAT] Enable EC battery Wayne Lin
2010-07-26 8:30 ` [RFC 36/36] [Driver][Qualcomm 1070][VERSION] 0.2.0 Wayne Lin
2010-07-26 8:40 ` Premi, Sanjeev
2010-07-26 8:47 ` Premi, Sanjeev
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=1280133045-25945-15-git-send-email-wayne.lin@quantatw.com \
--to=00601wayne@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=wayne.lin@quantatw.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;
as well as URLs for NNTP newsgroup(s).