diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-29 08:45:24 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-11-30 07:09:19 +0300 |
commit | 74d51d029818eca9d1aec22dd2895e269c0044b1 (patch) | |
tree | d3b40889e9d046c3af216b49253de0af10a39050 /arch/powerpc/kernel/nvram_64.c | |
parent | f2e785ed5fb8e5fe5063ee2ba1c8f150396c53c6 (diff) | |
download | linux-74d51d029818eca9d1aec22dd2895e269c0044b1.tar.xz |
powerpc/nvram: Move things out of asm/nvram.h
This moves a bunch of definitions out of asm/nvram.h to the files
that use them or just outright remove completely unused stuff.
We leave the partition signatures definitions, they will be useful
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/nvram_64.c')
-rw-r--r-- | arch/powerpc/kernel/nvram_64.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index 9cf197f01e94..a8154f1813df 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -34,6 +34,25 @@ #undef DEBUG_NVRAM +#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */ +#define NVRAM_BLOCK_LEN 16 +#define NVRAM_MAX_REQ (2080/NVRAM_BLOCK_LEN) +#define NVRAM_MIN_REQ (1056/NVRAM_BLOCK_LEN) + +/* If change this size, then change the size of NVNAME_LEN */ +struct nvram_header { + unsigned char signature; + unsigned char checksum; + unsigned short length; + char name[12]; +}; + +struct nvram_partition { + struct list_head partition; + struct nvram_header header; + unsigned int index; +}; + static struct nvram_partition * nvram_part; static long nvram_error_log_index = -1; static long nvram_error_log_size = 0; @@ -432,7 +451,7 @@ static int __init nvram_setup_partition(void) } /* try creating a partition with the free space we have */ - rc = nvram_create_os_partition(); + rc = nvram_create_partition("ppc64,linux", ); if (!rc) { return 0; } |