summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/nvram_64.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-29 14:45:24 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-11-30 15:09:19 +1100
commit74d51d029818eca9d1aec22dd2895e269c0044b1 (patch)
treed3b40889e9d046c3af216b49253de0af10a39050 /arch/powerpc/kernel/nvram_64.c
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/nvram_64.c')
-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 9cf197f01e9..a8154f1813d 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;
}