aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-29 00:45:24 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-11-29 23:09:19 -0500
commit74d51d029818eca9d1aec22dd2895e269c0044b1 (patch)
treed3b40889e9d046c3af216b49253de0af10a39050 /arch/powerpc/kernel
parentf2e785ed5fb8e5fe5063ee2ba1c8f150396c53c6 (diff)
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')
-rw-r--r--arch/powerpc/kernel/nvram_64.c21
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 @@
34 34
35#undef DEBUG_NVRAM 35#undef DEBUG_NVRAM
36 36
37#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
38#define NVRAM_BLOCK_LEN 16
39#define NVRAM_MAX_REQ (2080/NVRAM_BLOCK_LEN)
40#define NVRAM_MIN_REQ (1056/NVRAM_BLOCK_LEN)
41
42/* If change this size, then change the size of NVNAME_LEN */
43struct nvram_header {
44 unsigned char signature;
45 unsigned char checksum;
46 unsigned short length;
47 char name[12];
48};
49
50struct nvram_partition {
51 struct list_head partition;
52 struct nvram_header header;
53 unsigned int index;
54};
55
37static struct nvram_partition * nvram_part; 56static struct nvram_partition * nvram_part;
38static long nvram_error_log_index = -1; 57static long nvram_error_log_index = -1;
39static long nvram_error_log_size = 0; 58static long nvram_error_log_size = 0;
@@ -432,7 +451,7 @@ static int __init nvram_setup_partition(void)
432 } 451 }
433 452
434 /* try creating a partition with the free space we have */ 453 /* try creating a partition with the free space we have */
435 rc = nvram_create_os_partition(); 454 rc = nvram_create_partition("ppc64,linux", );
436 if (!rc) { 455 if (!rc) {
437 return 0; 456 return 0;
438 } 457 }