From 3ac3af2972557dabde0067f87c69c8557f2907c6 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Wed, 29 Jun 2005 06:16:03 -0700 Subject: [PATCH] ARM: OMAP: Moved parse_tag_omap to common.c In 2.6.13-rc1 arch.c disappears. --- arch/arm/kernel/arch.c | 23 ----------------------- arch/arm/mach-omap/common.c | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 25 deletions(-) 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; -- 2.41.1