nettel.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | nettel.c (69f34c98c1416eb74c55e38a21dbf3e294966514) |
---|---|
1/****************************************************************************/ 2 3/* 4 * nettel.c -- mappings for NETtel/SecureEdge/SnapGear (x86) boards. 5 * 6 * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) 7 * (C) Copyright 2001-2002, SnapGear (www.snapgear.com) 8 * | 1/****************************************************************************/ 2 3/* 4 * nettel.c -- mappings for NETtel/SecureEdge/SnapGear (x86) boards. 5 * 6 * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) 7 * (C) Copyright 2001-2002, SnapGear (www.snapgear.com) 8 * |
9 * $Id: nettel.c,v 1.10 2005/01/05 17:11:29 dwmw2 Exp $ | 9 * $Id: nettel.c,v 1.11 2005/11/07 11:14:27 gleixner Exp $ |
10 */ 11 12/****************************************************************************/ 13 14#include <linux/module.h> 15#include <linux/init.h> 16#include <linux/types.h> 17#include <linux/kernel.h> --- 120 unchanged lines hidden (view full) --- 138/* 139 * Set the Intel flash back to read mode since some old boot 140 * loaders don't. 141 */ 142static int nettel_reboot_notifier(struct notifier_block *nb, unsigned long val, void *v) 143{ 144 struct cfi_private *cfi = nettel_intel_map.fldrv_priv; 145 unsigned long b; | 10 */ 11 12/****************************************************************************/ 13 14#include <linux/module.h> 15#include <linux/init.h> 16#include <linux/types.h> 17#include <linux/kernel.h> --- 120 unchanged lines hidden (view full) --- 138/* 139 * Set the Intel flash back to read mode since some old boot 140 * loaders don't. 141 */ 142static int nettel_reboot_notifier(struct notifier_block *nb, unsigned long val, void *v) 143{ 144 struct cfi_private *cfi = nettel_intel_map.fldrv_priv; 145 unsigned long b; |
146 | 146 |
147 /* Make sure all FLASH chips are put back into read mode */ 148 for (b = 0; (b < nettel_intel_partitions[3].size); b += 0x100000) { 149 cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi, 150 cfi->device_type, NULL); 151 } 152 return(NOTIFY_OK); 153} 154 --- 39 unchanged lines hidden (view full) --- 194 set_current_state(TASK_RUNNING); 195 remove_wait_queue(&wait_q, &wait); 196 put_mtd_device(mtd); 197 return(ret); 198 } 199 200 schedule(); /* Wait for erase to finish. */ 201 remove_wait_queue(&wait_q, &wait); | 147 /* Make sure all FLASH chips are put back into read mode */ 148 for (b = 0; (b < nettel_intel_partitions[3].size); b += 0x100000) { 149 cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi, 150 cfi->device_type, NULL); 151 } 152 return(NOTIFY_OK); 153} 154 --- 39 unchanged lines hidden (view full) --- 194 set_current_state(TASK_RUNNING); 195 remove_wait_queue(&wait_q, &wait); 196 put_mtd_device(mtd); 197 return(ret); 198 } 199 200 schedule(); /* Wait for erase to finish. */ 201 remove_wait_queue(&wait_q, &wait); |
202 | 202 |
203 put_mtd_device(mtd); 204 } 205 206 return(0); 207} 208 209#else 210 --- 214 unchanged lines hidden (view full) --- 425 if (intelboot) { 426 /* 427 * Adjust offset and size of last boot partition. 428 * Must allow for BIOS region at end of FLASH. 429 */ 430 nettel_intel_partitions[1].size = (intel0size + intel1size) - 431 (1024*1024 + intel_mtd->erasesize); 432 nettel_intel_partitions[3].size = intel0size + intel1size; | 203 put_mtd_device(mtd); 204 } 205 206 return(0); 207} 208 209#else 210 --- 214 unchanged lines hidden (view full) --- 425 if (intelboot) { 426 /* 427 * Adjust offset and size of last boot partition. 428 * Must allow for BIOS region at end of FLASH. 429 */ 430 nettel_intel_partitions[1].size = (intel0size + intel1size) - 431 (1024*1024 + intel_mtd->erasesize); 432 nettel_intel_partitions[3].size = intel0size + intel1size; |
433 nettel_intel_partitions[4].offset = | 433 nettel_intel_partitions[4].offset = |
434 (intel0size + intel1size) - intel_mtd->erasesize; 435 nettel_intel_partitions[4].size = intel_mtd->erasesize; 436 nettel_intel_partitions[5].offset = 437 nettel_intel_partitions[4].offset; 438 nettel_intel_partitions[5].size = 439 nettel_intel_partitions[4].size; 440 } else { 441 /* No BIOS regions when AMD boot */ --- 55 unchanged lines hidden --- | 434 (intel0size + intel1size) - intel_mtd->erasesize; 435 nettel_intel_partitions[4].size = intel_mtd->erasesize; 436 nettel_intel_partitions[5].offset = 437 nettel_intel_partitions[4].offset; 438 nettel_intel_partitions[5].size = 439 nettel_intel_partitions[4].size; 440 } else { 441 /* No BIOS regions when AMD boot */ --- 55 unchanged lines hidden --- |