]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: Add support for ATAG_BOARD
authorJuha Yrjola <juha.yrjola@nokia.com>
Mon, 9 May 2005 20:09:27 +0000 (13:09 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 9 May 2005 20:09:27 +0000 (13:09 -0700)
Adds support for board specific tag ATAG_BOARD.

Signed-off-by: Juha Yrjola <juha.yrjola@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/kernel/arch.c
arch/arm/mach-omap/Kconfig
include/asm-arm/setup.h

index 4e02fbeb10a6cd5a6feb399d520565b8e95986e4..6159add64b7ded42f31367182f1948292b523779 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/string.h>
 
 #include <asm/elf.h>
 #include <asm/page.h>
@@ -44,3 +45,26 @@ static int __init parse_tag_acorn(const struct tag *tag)
 __tagtable(ATAG_ACORN, parse_tag_acorn);
 
 #endif
+
+#ifdef CONFIG_OMAP_BOOT_TAG
+
+unsigned char omap_bootloader_tag[512];
+int omap_bootloader_tag_len = 0;
+
+static int __init parse_tag_omap(const struct tag *tag)
+{
+       u32 size = tag->hdr.size - (sizeof(tag->hdr) >> 2);
+
+        size <<= 2;
+       if (size > sizeof(omap_bootloader_tag))
+               return -1;
+
+       memcpy(omap_bootloader_tag, tag->u.omap.data, size);
+       omap_bootloader_tag_len = size;
+
+        return 0;
+}
+
+__tagtable(ATAG_BOARD, parse_tag_omap);
+
+#endif
index 09b36c3fd8cd66dc4f05eec380440cbeaae7f76d..557e6132db49df0a4468312ffce9c10d72b1ea24 100644 (file)
@@ -34,6 +34,14 @@ config OMAP_RESET_CLOCKS
          probably do not want this option enabled until your
          device drivers work properly.
 
+config OMAP_BOOT_TAG
+       bool "OMAP bootloader information passing"
+        depends on ARCH_OMAP
+        default n
+        help
+          Say Y, if you have a bootloader which passes information
+          about your board and its peripheral configuration.
+
 config OMAP_MUX
        bool "OMAP multiplexing support"
         depends on ARCH_OMAP
index adcbd79762bfa2138d6c38400e9ce8db47a05679..d72b0519c428f6793834888b1ebb22e2e0842ee3 100644 (file)
@@ -134,6 +134,13 @@ struct tag_acorn {
        u8 adfsdrives;
 };
 
+/* TI OMAP specific information */
+#define ATAG_BOARD       0x414f4d50
+
+struct tag_omap {
+       u8 data[0];
+};
+
 /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
 #define ATAG_MEMCLK    0x41000402
 
@@ -159,6 +166,11 @@ struct tag {
                 */
                struct tag_acorn        acorn;
 
+               /*
+                * OMAP specific
+                 */
+                struct tag_omap         omap;
+
                /*
                 * DC21285 specific
                 */