From: Juha Yrjola Date: Mon, 9 May 2005 20:09:27 +0000 (-0700) Subject: ARM: Add support for ATAG_BOARD X-Git-Tag: v2.6.13-omap1~185 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0b1954ee5cf05b61db540267efcbe34d38a8116b;p=linux-2.6-omap-h63xx.git ARM: Add support for ATAG_BOARD Adds support for board specific tag ATAG_BOARD. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/kernel/arch.c b/arch/arm/kernel/arch.c index 4e02fbeb10a..6159add64b7 100644 --- a/arch/arm/kernel/arch.c +++ b/arch/arm/kernel/arch.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -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 diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index 09b36c3fd8c..557e6132db4 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -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 diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h index adcbd79762b..d72b0519c42 100644 --- a/include/asm-arm/setup.h +++ b/include/asm-arm/setup.h @@ -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 */