[PATCH] sgiioc4: Always share IRQ
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / mtd / jedec.h
blob9006feb218b93f36ac994917d3ae696d12c80318
2 /* JEDEC Flash Interface.
3 * This is an older type of interface for self programming flash. It is
4 * commonly use in older AMD chips and is obsolete compared with CFI.
5 * It is called JEDEC because the JEDEC association distributes the ID codes
6 * for the chips.
8 * See the AMD flash databook for information on how to operate the interface.
10 * $Id: jedec.h,v 1.4 2005/11/07 11:14:54 gleixner Exp $
13 #ifndef __LINUX_MTD_JEDEC_H__
14 #define __LINUX_MTD_JEDEC_H__
16 #include <linux/types.h>
18 #define MAX_JEDEC_CHIPS 16
20 // Listing of all supported chips and their information
21 struct JEDECTable
23 __u16 jedec;
24 char *name;
25 unsigned long size;
26 unsigned long sectorsize;
27 __u32 capabilities;
30 // JEDEC being 0 is the end of the chip array
31 struct jedec_flash_chip
33 __u16 jedec;
34 unsigned long size;
35 unsigned long sectorsize;
37 // *(__u8*)(base + (adder << addrshift)) = data << datashift
38 // Address size = size << addrshift
39 unsigned long base; // Byte 0 of the flash, will be unaligned
40 unsigned int datashift; // Useful for 32bit/16bit accesses
41 unsigned int addrshift;
42 unsigned long offset; // linerized start. base==offset for unbanked, uninterleaved flash
44 __u32 capabilities;
46 // These markers are filled in by the flash_chip_scan function
47 unsigned long start;
48 unsigned long length;
51 struct jedec_private
53 unsigned long size; // Total size of all the devices
55 /* Bank handling. If sum(bank_fill) == size then this is linear flash.
56 Otherwise the mapping has holes in it. bank_fill may be used to
57 find the holes, but in the common symetric case
58 bank_fill[0] == bank_fill[*], thus addresses may be computed
59 mathmatically. bank_fill must be powers of two */
60 unsigned is_banked;
61 unsigned long bank_fill[MAX_JEDEC_CHIPS];
63 struct jedec_flash_chip chips[MAX_JEDEC_CHIPS];
66 #endif