[PATCH 3/3] ARM: OMAP: Expose omap tags as debugfs binary blob

Hiroshi DOYU
2008-04-22T07:17:18Z

arch/arm/plat-omap/common.c | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index f80dab8..5a501e1 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -289,7 +289,26 @@ void __init omap2_set_globals_343x(void)
#endif

#ifdef CONFIG_DEBUG_FS
+
struct dentry *omap_debugfs_root;
+
+#ifdef CONFIG_OMAP_BOOT_TAG
+static int __init add_tag_blob(void)
+{
+ struct dentry *d;
+ static struct debugfs_blob_wrapper blob;
+
+ blob.data = omap_bootloader_tag;
+ blob.size = omap_bootloader_tag_len;
+
+ d = debugfs_create_blob("tag", 0444, omap_debugfs_root, &blob);
+ if (IS_ERR(d))
+ return PTR_ERR(d);
+ return 0;
+}
+late_initcall(add_tag_blob);
+#endif
+
static int __init omap_debugfs_init(void)
{
struct dentry *d;
@@ -301,4 +320,4 @@ static int __init omap_debugfs_init(void)
return 0;
}
arch_initcall(omap_debugfs_init);
-#endif
+#endif /* CONFIG_DEBUG_FS */
--
1.5.5.rc2.6.gf58d