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

Tony Lindgren
2008-04-22T19:23:36Z

* Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [080422 00:17]:
> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> ---
> 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

The omap specific ATAGs are not going to mainline as discussed on
few occasions already over past few years..

We should convert all omap specific ATAGs to be arm generic ATAGs
and get rid of the rest and use data in board-*.c files. We can
add a generic ATAG_BOARD_REVISION or similar to set GPIO pins
in board-*.c files based on the board revision.

Tony