[PATCH 2/3] ARM: OMAP: Create an OMAP debugfs root.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 2056 bytes --]

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
arch/arm/plat-omap/common.c | 16 +++++++++++++++-
include/asm-arm/arch-omap/board.h | 4 +++-
2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index fd6f329..f80dab8 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -9,7 +9,6 @@
*/
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/console.h>
@@ -18,6 +17,7 @@
#include <linux/serial_8250.h>
#include <linux/serial_reg.h>
#include <linux/clk.h>
+#include <linux/debugfs.h>

#include <asm/hardware.h>
#include <asm/system.h>
@@ -288,3 +288,17 @@ void __init omap2_set_globals_343x(void)
}
#endif

+#ifdef CONFIG_DEBUG_FS
+struct dentry *omap_debugfs_root;
+static int __init omap_debugfs_init(void)
+{
+ struct dentry *d;
+
+ d = debugfs_create_dir("omap", arm_debugfs_root);
+ if (IS_ERR(d))
+ return PTR_ERR(d);
+ omap_debugfs_root = d;
+ return 0;
+}
+arch_initcall(omap_debugfs_init);
+#endif
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
index 3763f3e..d94065b 100644
--- a/include/asm-arm/arch-omap/board.h
+++ b/include/asm-arm/arch-omap/board.h
@@ -3,7 +3,7 @@
*
* Information structures for board-specific data
*
- * Copyright (C) 2004 Nokia Corporation
+ * Copyright (C) 2004-2008 Nokia Corporation
* Written by Juha Yrjölä <juha.yrjola@nokia.com>
*/

@@ -196,4 +196,6 @@ extern int omap_board_config_size;
/* for TI reference platforms sharing the same debug card */
extern int debug_card_init(u32 addr, unsigned gpio);

+extern struct dentry *omap_debugfs_root;
+
#endif
--
1.5.5.rc2.6.gf58d

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html