From: Tony Lindgren Date: Wed, 29 Jun 2005 13:16:03 +0000 (-0700) Subject: ARM: OMAP: Moved parse_tag_omap to common.c X-Git-Tag: v2.6.13-omap1~108 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3ac3af2972557dabde0067f87c69c8557f2907c6;p=linux-2.6-omap-h63xx.git ARM: OMAP: Moved parse_tag_omap to common.c In 2.6.13-rc1 arch.c disappears. --- diff --git a/arch/arm/kernel/arch.c b/arch/arm/kernel/arch.c index 6159add64b7..c35c8d81b67 100644 --- a/arch/arm/kernel/arch.c +++ b/arch/arm/kernel/arch.c @@ -45,26 +45,3 @@ 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/common.c b/arch/arm/mach-omap/common.c index b6a5b39e7e8..51139a6f040 100644 --- a/arch/arm/mach-omap/common.c +++ b/arch/arm/mach-omap/common.c @@ -35,12 +35,32 @@ #define NO_LENGTH_CHECK 0xffffffff -extern int omap_bootloader_tag_len; -extern u8 omap_bootloader_tag[]; +unsigned char omap_bootloader_tag[512]; +int omap_bootloader_tag_len = 0; struct omap_board_config_kernel *omap_board_config; int omap_board_config_size = 0; +#ifdef CONFIG_OMAP_BOOT_TAG + +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 + static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out) { struct omap_board_config_kernel *kinfo = NULL;