Lines Matching +full:cfi +full:- +full:flash
1 // SPDX-License-Identifier: GPL-2.0-only
5 * nettel.c -- mappings for NETtel/SecureEdge/SnapGear (x86) boards.
7 * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
8 * (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
20 #include <linux/mtd/cfi.h>
48 ((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \
140 * Set the Intel flash back to read mode since some old boot
145 struct cfi_private *cfi = nettel_intel_map.fldrv_priv; in nettel_reboot_notifier() local
148 /* Make sure all FLASH chips are put back into read mode */ in nettel_reboot_notifier()
150 cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi, in nettel_reboot_notifier()
151 cfi->device_type, NULL); in nettel_reboot_notifier()
182 return(-EIO); in nettel_init()
209 * boot FLASH device. Typically this is a small (1 to 2MB) in nettel_init()
210 * AMD FLASH part. It seems that device size is about the in nettel_init()
224 return(-EIO); in nettel_init()
229 printk(KERN_NOTICE "SNAPGEAR: AMD flash device size = %dK\n", in nettel_init()
230 (int)(amd_mtd->size>>10)); in nettel_init()
232 amd_mtd->owner = THIS_MODULE; in nettel_init()
236 if (amd_mtd->size < AMD_WINDOW_MAXSIZE) in nettel_init()
237 num_amd_partitions--; in nettel_init()
242 * Map the Intel flash into memory after the AMD in nettel_init()
252 /* INTEL boot FLASH */ in nettel_init()
283 /* Only AMD flash supported */ in nettel_init()
284 rc = -ENXIO; in nettel_init()
291 * We have determined the INTEL FLASH configuration, so lets in nettel_init()
303 /* Probe for the size of the first Intel flash */ in nettel_init()
309 rc = -EIO; in nettel_init()
316 rc = -ENXIO; in nettel_init()
321 intel0size = intel_mtd->size; in nettel_init()
325 * Map second Intel FLASH right after first. Set its size to the in nettel_init()
326 * same maxsize used for the first Intel FLASH. in nettel_init()
343 rc = -EIO; in nettel_init()
349 rc = -ENXIO; in nettel_init()
353 intel1size = intel_mtd->size - intel0size; in nettel_init()
361 printk(KERN_NOTICE "SNAPGEAR: Intel flash device size = %lldKiB\n", in nettel_init()
362 (unsigned long long)(intel_mtd->size >> 10)); in nettel_init()
364 intel_mtd->owner = THIS_MODULE; in nettel_init()
371 * Must allow for BIOS region at end of FLASH. in nettel_init()
373 nettel_intel_partitions[1].size = (intel0size + intel1size) - in nettel_init()
374 (1024*1024 + intel_mtd->erasesize); in nettel_init()
377 (intel0size + intel1size) - intel_mtd->erasesize; in nettel_init()
378 nettel_intel_partitions[4].size = intel_mtd->erasesize; in nettel_init()
385 num_intel_partitions -= 2; in nettel_init()
460 MODULE_DESCRIPTION("SnapGear/SecureEdge FLASH support");