diff mbox

[1/2] arm: devtree: Save atags if are in DT atags field

Message ID 1431719407-18230-2-git-send-email-pali.rohar@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pali Rohár May 15, 2015, 7:50 p.m. UTC
This patch creates /proc/atags from DT /atags field.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 arch/arm/kernel/devtree.c |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Arnd Bergmann May 15, 2015, 8:09 p.m. UTC | #1
On Friday 15 May 2015 21:50:06 Pali Rohár wrote:
> @@ -256,5 +257,10 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
>                         system_rev = 0;
>         }
>  
> +       /* Save atags */
> +       prop = of_get_flat_dt_prop(dt_root, "atags", NULL);
> +       if (prop)
> +               save_atags((void *)prop);
> +
>         return mdesc;
> 

How about checking whether this is actually running on the one board
that needs it first?

I'd rather not introduce something that may end up being considered
an ABI on other machines.

	Arnd
--
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
Tony Lindgren June 25, 2015, 5:06 a.m. UTC | #2
* Arnd Bergmann <arnd@arndb.de> [150515 13:11]:
> On Friday 15 May 2015 21:50:06 Pali Rohár wrote:
> > @@ -256,5 +257,10 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
> >                         system_rev = 0;
> >         }
> >  
> > +       /* Save atags */
> > +       prop = of_get_flat_dt_prop(dt_root, "atags", NULL);
> > +       if (prop)
> > +               save_atags((void *)prop);
> > +
> >         return mdesc;
> > 
> 
> How about checking whether this is actually running on the one board
> that needs it first?
> 
> I'd rather not introduce something that may end up being considered
> an ABI on other machines.

It seems having this within CONFIG_ARM_ATAG_DTB_COMPAT should be
enough here.

Regards,

Tony
--
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
diff mbox

Patch

diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 7e13e27..dd98322 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -29,6 +29,7 @@ 
 #include <asm/mach-types.h>
 #include <asm/system_info.h>
 
+#include "atags.h"
 
 #ifdef CONFIG_SMP
 extern struct of_cpu_method __cpu_method_of_table[];
@@ -256,5 +257,10 @@  const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
 			system_rev = 0;
 	}
 
+	/* Save atags */
+	prop = of_get_flat_dt_prop(dt_root, "atags", NULL);
+	if (prop)
+		save_atags((void *)prop);
+
 	return mdesc;
 }