nvram.c (57c8a661d95dff48dd9c2f2496139082bbaf241a) nvram.c (7e1c4e27928e5f87b9b1eaf06dc31773b2f1e7f1)
1/*
2 * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 499 unchanged lines hidden (view full) ---

508{
509 int i;
510 u32 gen_bank0, gen_bank1;
511
512 if (nvram_naddrs < 1) {
513 printk(KERN_ERR "nvram: no address\n");
514 return -EINVAL;
515 }
1/*
2 * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 499 unchanged lines hidden (view full) ---

508{
509 int i;
510 u32 gen_bank0, gen_bank1;
511
512 if (nvram_naddrs < 1) {
513 printk(KERN_ERR "nvram: no address\n");
514 return -EINVAL;
515 }
516 nvram_image = memblock_alloc(NVRAM_SIZE, 0);
516 nvram_image = memblock_alloc(NVRAM_SIZE, SMP_CACHE_BYTES);
517 nvram_data = ioremap(addr, NVRAM_SIZE*2);
518 nvram_naddrs = 1; /* Make sure we get the correct case */
519
520 DBG("nvram: Checking bank 0...\n");
521
522 gen_bank0 = core99_check((u8 *)nvram_data);
523 gen_bank1 = core99_check((u8 *)nvram_data + NVRAM_SIZE);
524 core99_bank = (gen_bank0 < gen_bank1) ? 1 : 0;

--- 124 unchanged lines hidden ---
517 nvram_data = ioremap(addr, NVRAM_SIZE*2);
518 nvram_naddrs = 1; /* Make sure we get the correct case */
519
520 DBG("nvram: Checking bank 0...\n");
521
522 gen_bank0 = core99_check((u8 *)nvram_data);
523 gen_bank1 = core99_check((u8 *)nvram_data + NVRAM_SIZE);
524 core99_bank = (gen_bank0 < gen_bank1) ? 1 : 0;

--- 124 unchanged lines hidden ---