patch for 64 bit wide flash

Adam Wozniak adam.wozniak at comdev.cc
Tue Dec 18 18:27:25 EST 2001


I've got a 64 bit wide flash consisting of eight 8bit wide chips.
Here's a patch against the 2.4.16 kernel

I think I've added enough code to support all 64 bit wide
configurations,
but somebody whould probably check me on it.

-- 
Adam Wozniak (KG6GZR)   COM DEV Wireless - Digital and Software Systems
awozniak at comdev.cc      3450 Broad St. 107, San Luis Obispo, CA 93401
                        http://www.comdev.cc
                        Voice: (805) 544-1089       Fax: (805) 544-2055
-------------- next part --------------
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/include/linux/autoconf.h linux/include/linux/autoconf.h
--- linux-original/include/linux/autoconf.h	Wed Dec 31 16:00:00 1969
+++ linux/include/linux/autoconf.h	Tue Dec 18 14:06:08 2001
@@ -0,0 +1,592 @@
+/*
+ * Automatically generated by make menuconfig: don't edit
+ */
+#define AUTOCONF_INCLUDED
+#undef  CONFIG_UID16
+#undef  CONFIG_RWSEM_GENERIC_SPINLOCK
+#define CONFIG_RWSEM_XCHGADD_ALGORITHM 1
+#define CONFIG_HAVE_DEC_LOCK 1
+
+/*
+ * Code maturity level options
+ */
+#define CONFIG_EXPERIMENTAL 1
+
+/*
+ * Loadable module support
+ */
+#undef  CONFIG_MODULES
+
+/*
+ * Platform support
+ */
+#define CONFIG_PPC 1
+#define CONFIG_PPC32 1
+#define CONFIG_6xx 1
+#undef  CONFIG_4xx
+#undef  CONFIG_POWER3
+#undef  CONFIG_POWER4
+#undef  CONFIG_8xx
+#define CONFIG_8260 1
+#define CONFIG_PPC_STD_MMU 1
+#define CONFIG_SERIAL_CONSOLE 1
+#undef  CONFIG_EST8260
+#define CONFIG_SERIAL_CONSOLE 1
+#define CONFIG_COMDEV 1
+#undef  CONFIG_SMP
+
+/*
+ * General setup
+ */
+#undef  CONFIG_HIGHMEM
+#undef  CONFIG_ISA
+#undef  CONFIG_EISA
+#undef  CONFIG_SBUS
+#undef  CONFIG_MCA
+#undef  CONFIG_PCI
+#define CONFIG_NET 1
+#define CONFIG_SYSCTL 1
+#define CONFIG_SYSVIPC 1
+#undef  CONFIG_BSD_PROCESS_ACCT
+#define CONFIG_KCORE_ELF 1
+#define CONFIG_BINFMT_ELF 1
+#define CONFIG_KERNEL_ELF 1
+#undef  CONFIG_BINFMT_MISC
+#undef  CONFIG_HOTPLUG
+#undef  CONFIG_PCMCIA
+
+/*
+ * Parallel port support
+ */
+#undef  CONFIG_PARPORT
+#undef  CONFIG_PPC_RTC
+#define CONFIG_CMDLINE_BOOL 1
+#define CONFIG_CMDLINE "console=ttyS0,9600 console=tty0 root=/dev/sda2"
+
+/*
+ * Memory Technology Devices (MTD)
+ */
+#define CONFIG_MTD 1
+#undef  CONFIG_MTD_DEBUG
+#define CONFIG_MTD_PARTITIONS 1
+#undef  CONFIG_MTD_REDBOOT_PARTS
+#undef  CONFIG_MTD_CHAR
+#define CONFIG_MTD_BLOCK 1
+#undef  CONFIG_FTL
+#undef  CONFIG_NFTL
+
+/*
+ * RAM/ROM/Flash chip drivers
+ */
+#define CONFIG_MTD_CFI 1
+#undef  CONFIG_MTD_JEDECPROBE
+#define CONFIG_MTD_GEN_PROBE 1
+#undef  CONFIG_MTD_CFI_ADV_OPTIONS
+#define CONFIG_MTD_CFI_INTELEXT 1
+#undef  CONFIG_MTD_CFI_AMDSTD
+#undef  CONFIG_MTD_RAM
+#undef  CONFIG_MTD_ROM
+#undef  CONFIG_MTD_ABSENT
+#undef  CONFIG_MTD_OBSOLETE_CHIPS
+#undef  CONFIG_MTD_AMDSTD
+#undef  CONFIG_MTD_SHARP
+#undef  CONFIG_MTD_JEDEC
+
+/*
+ * Mapping drivers for chip access
+ */
+#define CONFIG_MTD_PHYSMAP 1
+#define CONFIG_MTD_PHYSMAP_START 0xF8000000
+#define CONFIG_MTD_PHYSMAP_LEN 0x8000000
+#define CONFIG_MTD_PHYSMAP_BUSWIDTH (8)
+#undef  CONFIG_MTD_TQM8XXL
+#undef  CONFIG_MTD_RPXLITE
+#undef  CONFIG_MTD_DBOX2
+#undef  CONFIG_MTD_CFI_FLAGADM
+
+/*
+ * Self-contained MTD device drivers
+ */
+#undef  CONFIG_MTD_PMC551
+#undef  CONFIG_MTD_SLRAM
+#undef  CONFIG_MTD_MTDRAM
+#undef  CONFIG_MTD_BLKMTD
+#undef  CONFIG_MTD_DOC1000
+#undef  CONFIG_MTD_DOC2000
+#undef  CONFIG_MTD_DOC2001
+#undef  CONFIG_MTD_DOCPROBE
+
+/*
+ * NAND Flash Device Drivers
+ */
+#undef  CONFIG_MTD_NAND
+
+/*
+ * Plug and Play configuration
+ */
+#undef  CONFIG_PNP
+#undef  CONFIG_ISAPNP
+
+/*
+ * Block devices
+ */
+#undef  CONFIG_BLK_DEV_FD
+#undef  CONFIG_BLK_DEV_XD
+#undef  CONFIG_PARIDE
+#undef  CONFIG_BLK_CPQ_DA
+#undef  CONFIG_BLK_CPQ_CISS_DA
+#undef  CONFIG_BLK_DEV_DAC960
+#define CONFIG_BLK_DEV_LOOP 1
+#undef  CONFIG_BLK_DEV_NBD
+#define CONFIG_BLK_DEV_RAM 1
+#define CONFIG_BLK_DEV_RAM_SIZE (10240)
+#define CONFIG_BLK_DEV_INITRD 1
+
+/*
+ * Multi-device support (RAID and LVM)
+ */
+#undef  CONFIG_MD
+#undef  CONFIG_BLK_DEV_MD
+#undef  CONFIG_MD_LINEAR
+#undef  CONFIG_MD_RAID0
+#undef  CONFIG_MD_RAID1
+#undef  CONFIG_MD_RAID5
+#undef  CONFIG_MD_MULTIPATH
+#undef  CONFIG_BLK_DEV_LVM
+
+/*
+ * Networking options
+ */
+#define CONFIG_PACKET 1
+#undef  CONFIG_PACKET_MMAP
+#define CONFIG_NETLINK 1
+#define CONFIG_RTNETLINK 1
+#undef  CONFIG_NETLINK_DEV
+#define CONFIG_NETFILTER 1
+#undef  CONFIG_NETFILTER_DEBUG
+#define CONFIG_FILTER 1
+#define CONFIG_UNIX 1
+#define CONFIG_INET 1
+#define CONFIG_IP_MULTICAST 1
+#undef  CONFIG_IP_ADVANCED_ROUTER
+#define CONFIG_IP_PNP 1
+#undef  CONFIG_IP_PNP_DHCP
+#undef  CONFIG_IP_PNP_BOOTP
+#undef  CONFIG_IP_PNP_RARP
+#undef  CONFIG_NET_IPIP
+#undef  CONFIG_NET_IPGRE
+#define CONFIG_IP_MROUTE 1
+#undef  CONFIG_IP_PIMSM_V1
+#undef  CONFIG_IP_PIMSM_V2
+#undef  CONFIG_ARPD
+#undef  CONFIG_INET_ECN
+#define CONFIG_SYN_COOKIES 1
+
+/*
+ *   IP: Netfilter Configuration
+ */
+#define CONFIG_IP_NF_CONNTRACK 1
+#define CONFIG_IP_NF_FTP 1
+#define CONFIG_IP_NF_IRC 1
+#undef  CONFIG_IP_NF_QUEUE
+#define CONFIG_IP_NF_IPTABLES 1
+#undef  CONFIG_IP_NF_MATCH_LIMIT
+#define CONFIG_IP_NF_MATCH_MAC 1
+#undef  CONFIG_IP_NF_MATCH_MARK
+#define CONFIG_IP_NF_MATCH_MULTIPORT 1
+#undef  CONFIG_IP_NF_MATCH_TOS
+#define CONFIG_IP_NF_MATCH_LENGTH 1
+#define CONFIG_IP_NF_MATCH_TTL 1
+#undef  CONFIG_IP_NF_MATCH_TCPMSS
+#define CONFIG_IP_NF_MATCH_STATE 1
+#undef  CONFIG_IP_NF_MATCH_UNCLEAN
+#undef  CONFIG_IP_NF_MATCH_OWNER
+#define CONFIG_IP_NF_FILTER 1
+#define CONFIG_IP_NF_TARGET_REJECT 1
+#undef  CONFIG_IP_NF_TARGET_MIRROR
+#define CONFIG_IP_NF_NAT 1
+#define CONFIG_IP_NF_NAT_NEEDED 1
+#define CONFIG_IP_NF_TARGET_MASQUERADE 1
+#define CONFIG_IP_NF_TARGET_REDIRECT 1
+#define CONFIG_IP_NF_NAT_SNMP_BASIC 1
+#define CONFIG_IP_NF_NAT_IRC 1
+#define CONFIG_IP_NF_NAT_FTP 1
+#undef  CONFIG_IP_NF_MANGLE
+#undef  CONFIG_IP_NF_TARGET_LOG
+#undef  CONFIG_IP_NF_TARGET_TCPMSS
+#undef  CONFIG_IPV6
+#undef  CONFIG_KHTTPD
+#undef  CONFIG_ATM
+#undef  CONFIG_VLAN_8021Q
+#undef  CONFIG_IPX
+#undef  CONFIG_ATALK
+#undef  CONFIG_DECNET
+#undef  CONFIG_BRIDGE
+#undef  CONFIG_X25
+#undef  CONFIG_LAPB
+#undef  CONFIG_LLC
+#undef  CONFIG_NET_DIVERT
+#undef  CONFIG_ECONET
+#undef  CONFIG_WAN_ROUTER
+#undef  CONFIG_NET_FASTROUTE
+#undef  CONFIG_NET_HW_FLOWCONTROL
+
+/*
+ * QoS and/or fair queueing
+ */
+#undef  CONFIG_NET_SCHED
+
+/*
+ * ATA/IDE/MFM/RLL support
+ */
+#undef  CONFIG_IDE
+#undef  CONFIG_BLK_DEV_IDE_MODES
+#undef  CONFIG_BLK_DEV_HD
+
+/*
+ * SCSI support
+ */
+#undef  CONFIG_SCSI
+
+/*
+ * Network device support
+ */
+#define CONFIG_NETDEVICES 1
+
+/*
+ * ARCnet devices
+ */
+#undef  CONFIG_ARCNET
+#undef  CONFIG_DUMMY
+#undef  CONFIG_BONDING
+#undef  CONFIG_EQUALIZER
+#undef  CONFIG_TUN
+#undef  CONFIG_ETHERTAP
+
+/*
+ * Ethernet (10 or 100Mbit)
+ */
+#define CONFIG_NET_ETHERNET 1
+#undef  CONFIG_MACE
+#undef  CONFIG_BMAC
+#undef  CONFIG_GMAC
+#undef  CONFIG_OAKNET
+#undef  CONFIG_SUNLANCE
+#undef  CONFIG_SUNBMAC
+#undef  CONFIG_SUNQE
+#undef  CONFIG_SUNLANCE
+#undef  CONFIG_SUNGEM
+#undef  CONFIG_NET_VENDOR_3COM
+#undef  CONFIG_LANCE
+#undef  CONFIG_NET_VENDOR_SMC
+#undef  CONFIG_NET_VENDOR_RACAL
+#undef  CONFIG_NET_ISA
+#undef  CONFIG_NET_PCI
+#undef  CONFIG_NET_POCKET
+
+/*
+ * Ethernet (1000 Mbit)
+ */
+#undef  CONFIG_ACENIC
+#undef  CONFIG_DL2K
+#undef  CONFIG_MYRI_SBUS
+#undef  CONFIG_NS83820
+#undef  CONFIG_HAMACHI
+#undef  CONFIG_YELLOWFIN
+#undef  CONFIG_SK98LIN
+#undef  CONFIG_FDDI
+#undef  CONFIG_HIPPI
+#undef  CONFIG_PLIP
+#undef  CONFIG_PPP
+#undef  CONFIG_SLIP
+
+/*
+ * Wireless LAN (non-hamradio)
+ */
+#undef  CONFIG_NET_RADIO
+
+/*
+ * Token Ring devices
+ */
+#undef  CONFIG_TR
+#undef  CONFIG_NET_FC
+#undef  CONFIG_RCPCI
+#undef  CONFIG_SHAPER
+
+/*
+ * Wan interfaces
+ */
+#undef  CONFIG_WAN
+
+/*
+ * Amateur Radio support
+ */
+#undef  CONFIG_HAMRADIO
+
+/*
+ * IrDA (infrared) support
+ */
+#undef  CONFIG_IRDA
+
+/*
+ * ISDN subsystem
+ */
+#undef  CONFIG_ISDN
+
+/*
+ * Old CD-ROM drivers (not SCSI, not IDE)
+ */
+#undef  CONFIG_CD_NO_IDESCSI
+
+/*
+ * Console drivers
+ */
+#undef  CONFIG_VGA_CONSOLE
+
+/*
+ * Frame-buffer support
+ */
+#undef  CONFIG_FB
+
+/*
+ * Input core support
+ */
+#undef  CONFIG_INPUT
+#undef  CONFIG_INPUT_KEYBDEV
+#undef  CONFIG_INPUT_MOUSEDEV
+#undef  CONFIG_INPUT_JOYDEV
+#undef  CONFIG_INPUT_EVDEV
+
+/*
+ * Macintosh device drivers
+ */
+
+/*
+ * Character devices
+ */
+#undef  CONFIG_VT
+#undef  CONFIG_SERIAL
+#undef  CONFIG_SERIAL_EXTENDED
+#undef  CONFIG_SERIAL_NONSTANDARD
+#undef  CONFIG_UNIX98_PTYS
+
+/*
+ * I2C support
+ */
+#undef  CONFIG_I2C
+
+/*
+ * Mice
+ */
+#undef  CONFIG_BUSMOUSE
+#undef  CONFIG_MOUSE
+
+/*
+ * Joysticks
+ */
+#undef  CONFIG_INPUT_GAMEPORT
+#undef  CONFIG_QIC02_TAPE
+
+/*
+ * Watchdog Cards
+ */
+#undef  CONFIG_WATCHDOG
+#undef  CONFIG_INTEL_RNG
+#undef  CONFIG_NVRAM
+#undef  CONFIG_RTC
+#undef  CONFIG_DTLK
+#undef  CONFIG_R3964
+#undef  CONFIG_APPLICOM
+
+/*
+ * Ftape, the floppy tape device driver
+ */
+#undef  CONFIG_FTAPE
+#undef  CONFIG_AGP
+#undef  CONFIG_DRM
+
+/*
+ * Multimedia devices
+ */
+#undef  CONFIG_VIDEO_DEV
+
+/*
+ * File systems
+ */
+#undef  CONFIG_QUOTA
+#undef  CONFIG_AUTOFS_FS
+#undef  CONFIG_AUTOFS4_FS
+#undef  CONFIG_REISERFS_FS
+#undef  CONFIG_REISERFS_CHECK
+#undef  CONFIG_REISERFS_PROC_INFO
+#undef  CONFIG_ADFS_FS
+#undef  CONFIG_ADFS_FS_RW
+#undef  CONFIG_AFFS_FS
+#undef  CONFIG_HFS_FS
+#undef  CONFIG_BFS_FS
+#undef  CONFIG_EXT3_FS
+#undef  CONFIG_JBD
+#undef  CONFIG_JBD_DEBUG
+#undef  CONFIG_FAT_FS
+#undef  CONFIG_MSDOS_FS
+#undef  CONFIG_UMSDOS_FS
+#undef  CONFIG_VFAT_FS
+#undef  CONFIG_EFS_FS
+#define CONFIG_JFFS_FS 1
+#define CONFIG_JFFS_FS_VERBOSE (0)
+#undef  CONFIG_JFFS_PROC_FS
+#define CONFIG_JFFS2_FS 1
+#define CONFIG_JFFS2_FS_DEBUG (0)
+#undef  CONFIG_CRAMFS
+#undef  CONFIG_TMPFS
+#undef  CONFIG_RAMFS
+#undef  CONFIG_ISO9660_FS
+#undef  CONFIG_JOLIET
+#undef  CONFIG_ZISOFS
+#define CONFIG_MINIX_FS 1
+#undef  CONFIG_VXFS_FS
+#undef  CONFIG_NTFS_FS
+#undef  CONFIG_NTFS_RW
+#undef  CONFIG_HPFS_FS
+#define CONFIG_PROC_FS 1
+#undef  CONFIG_DEVFS_FS
+#undef  CONFIG_DEVFS_MOUNT
+#undef  CONFIG_DEVFS_DEBUG
+#undef  CONFIG_DEVPTS_FS
+#undef  CONFIG_QNX4FS_FS
+#undef  CONFIG_QNX4FS_RW
+#undef  CONFIG_ROMFS_FS
+#define CONFIG_EXT2_FS 1
+#undef  CONFIG_SYSV_FS
+#undef  CONFIG_UDF_FS
+#undef  CONFIG_UDF_RW
+#undef  CONFIG_UFS_FS
+#undef  CONFIG_UFS_FS_WRITE
+
+/*
+ * Network File Systems
+ */
+#undef  CONFIG_CODA_FS
+#undef  CONFIG_INTERMEZZO_FS
+#define CONFIG_NFS_FS 1
+#undef  CONFIG_NFS_V3
+#define CONFIG_ROOT_NFS 1
+#undef  CONFIG_NFSD
+#undef  CONFIG_NFSD_V3
+#define CONFIG_SUNRPC 1
+#define CONFIG_LOCKD 1
+#undef  CONFIG_SMB_FS
+#undef  CONFIG_NCP_FS
+#undef  CONFIG_NCPFS_PACKET_SIGNING
+#undef  CONFIG_NCPFS_IOCTL_LOCKING
+#undef  CONFIG_NCPFS_STRONG
+#undef  CONFIG_NCPFS_NFS_NS
+#undef  CONFIG_NCPFS_OS2_NS
+#undef  CONFIG_NCPFS_SMALLDOS
+#undef  CONFIG_NCPFS_NLS
+#undef  CONFIG_NCPFS_EXTRAS
+#undef  CONFIG_ZISOFS_FS
+#undef  CONFIG_ZLIB_FS_INFLATE
+
+/*
+ * Partition Types
+ */
+#undef  CONFIG_PARTITION_ADVANCED
+#define CONFIG_MSDOS_PARTITION 1
+#undef  CONFIG_SMB_NLS
+#undef  CONFIG_NLS
+
+/*
+ * Sound
+ */
+#undef  CONFIG_SOUND
+
+/*
+ * MPC8260 Communication Options
+ */
+#undef  CONFIG_SCC_ENET
+#define CONFIG_FEC_ENET 1
+#undef  CONFIG_FCC1_ENET
+#undef  CONFIG_FCC2_ENET
+#define CONFIG_FCC3_ENET 1
+
+/*
+ * MPC8260 serial options
+ */
+#define CONFIG_SMC2_UART 1
+#undef  CONFIG_ALTSMC2
+#define CONFIG_CONS_SMC2 1
+
+/*
+ * USB support
+ */
+#undef  CONFIG_USB
+#undef  CONFIG_USB_UHCI
+#undef  CONFIG_USB_UHCI_ALT
+#undef  CONFIG_USB_OHCI
+#undef  CONFIG_USB_AUDIO
+#undef  CONFIG_USB_BLUETOOTH
+#undef  CONFIG_USB_STORAGE
+#undef  CONFIG_USB_STORAGE_DEBUG
+#undef  CONFIG_USB_STORAGE_DATAFAB
+#undef  CONFIG_USB_STORAGE_FREECOM
+#undef  CONFIG_USB_STORAGE_ISD200
+#undef  CONFIG_USB_STORAGE_DPCM
+#undef  CONFIG_USB_STORAGE_HP8200e
+#undef  CONFIG_USB_STORAGE_SDDR09
+#undef  CONFIG_USB_STORAGE_JUMPSHOT
+#undef  CONFIG_USB_ACM
+#undef  CONFIG_USB_PRINTER
+#undef  CONFIG_USB_DC2XX
+#undef  CONFIG_USB_MDC800
+#undef  CONFIG_USB_SCANNER
+#undef  CONFIG_USB_MICROTEK
+#undef  CONFIG_USB_HPUSBSCSI
+#undef  CONFIG_USB_PEGASUS
+#undef  CONFIG_USB_KAWETH
+#undef  CONFIG_USB_CATC
+#undef  CONFIG_USB_CDCETHER
+#undef  CONFIG_USB_USBNET
+#undef  CONFIG_USB_USS720
+
+/*
+ * USB Serial Converter support
+ */
+#undef  CONFIG_USB_SERIAL
+#undef  CONFIG_USB_SERIAL_GENERIC
+#undef  CONFIG_USB_SERIAL_BELKIN
+#undef  CONFIG_USB_SERIAL_WHITEHEAT
+#undef  CONFIG_USB_SERIAL_DIGI_ACCELEPORT
+#undef  CONFIG_USB_SERIAL_EMPEG
+#undef  CONFIG_USB_SERIAL_FTDI_SIO
+#undef  CONFIG_USB_SERIAL_VISOR
+#undef  CONFIG_USB_SERIAL_IR
+#undef  CONFIG_USB_SERIAL_EDGEPORT
+#undef  CONFIG_USB_SERIAL_KEYSPAN_PDA
+#undef  CONFIG_USB_SERIAL_KEYSPAN
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA28
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA28X
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA28XA
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA28XB
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA19
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA18X
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA19W
+#undef  CONFIG_USB_SERIAL_KEYSPAN_USA49W
+#undef  CONFIG_USB_SERIAL_MCT_U232
+#undef  CONFIG_USB_SERIAL_PL2303
+#undef  CONFIG_USB_SERIAL_CYBERJACK
+#undef  CONFIG_USB_SERIAL_XIRCOM
+#undef  CONFIG_USB_SERIAL_OMNINET
+#undef  CONFIG_USB_RIO500
+
+/*
+ * Bluetooth support
+ */
+#undef  CONFIG_BLUEZ
+
+/*
+ * Kernel hacking
+ */
+#undef  CONFIG_MAGIC_SYSRQ
+#undef  CONFIG_KGDB
+#undef  CONFIG_XMON
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/include/linux/compile.h linux/include/linux/compile.h
--- linux-original/include/linux/compile.h	Wed Dec 31 16:00:00 1969
+++ linux/include/linux/compile.h	Tue Dec 18 14:25:33 2001
@@ -0,0 +1,6 @@
+#define UTS_VERSION "#92 Tue Dec 18 14:25:33 PST 2001"
+#define LINUX_COMPILE_TIME "14:25:33"
+#define LINUX_COMPILE_BY "awozniak"
+#define LINUX_COMPILE_HOST "rangers.comdev.cc"
+#define LINUX_COMPILE_DOMAIN "comdev.cc"
+#define LINUX_COMPILER "gcc version 2.95.3 20010315 (release)"
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/include/linux/mtd/cfi.h linux/include/linux/mtd/cfi.h
--- linux-original/include/linux/mtd/cfi.h	Thu Oct  4 15:13:18 2001
+++ linux/include/linux/mtd/cfi.h	Tue Dec 18 14:07:50 2001
@@ -28,10 +28,12 @@
 #define CFIDEV_INTERLEAVE_1 (1)
 #define CFIDEV_INTERLEAVE_2 (2)
 #define CFIDEV_INTERLEAVE_4 (4)
+#define CFIDEV_INTERLEAVE_8 (8)
 
 #define CFIDEV_BUSWIDTH_1 (1)
 #define CFIDEV_BUSWIDTH_2 (2)
 #define CFIDEV_BUSWIDTH_4 (4)
+#define CFIDEV_BUSWIDTH_8 (8)
 
 #else
 
@@ -44,6 +46,9 @@
 #ifdef CONFIG_MTD_CFI_I4
 #define CFIDEV_INTERLEAVE_4 (4)
 #endif
+#ifdef CONFIG_MTD_CFI_I8
+#define CFIDEV_INTERLEAVE_8 (8)
+#endif
 
 #ifdef CONFIG_MTD_CFI_B1
 #define CFIDEV_BUSWIDTH_1 (1)
@@ -54,6 +59,9 @@
 #ifdef CONFIG_MTD_CFI_B4
 #define CFIDEV_BUSWIDTH_4 (4)
 #endif
+#ifdef CONFIG_MTD_CFI_B8
+#define CFIDEV_BUSWIDTH_8 (8)
+#endif
 
 #endif
 
@@ -61,7 +69,7 @@
  * The following macros are used to select the code to execute:
  *   cfi_buswidth_is_*()
  *   cfi_interleave_is_*()
- *   [where * is either 1, 2 or 4]
+ *   [where * is either 1, 2, 4, or 8]
  * Those macros should be used with 'if' statements.  If only one of few
  * geometry arrangements are selected, they expand to constants thus allowing
  * the compiler (most of them being 0) to optimize away all the unneeded code,
@@ -105,6 +113,18 @@
 # define cfi_interleave_is_4() (0)
 #endif
 
+#ifdef CFIDEV_INTERLEAVE_8
+# ifdef CFIDEV_INTERLEAVE
+#  undef CFIDEV_INTERLEAVE
+#  define CFIDEV_INTERLEAVE (cfi->interleave)
+# else
+#  define CFIDEV_INTERLEAVE CFIDEV_INTERLEAVE_8
+# endif
+# define cfi_interleave_is_8() (CFIDEV_INTERLEAVE == CFIDEV_INTERLEAVE_8)
+#else
+# define cfi_interleave_is_8() (0)
+#endif
+
 #ifndef CFIDEV_INTERLEAVE
 #error You must define at least one interleave to support!
 #endif
@@ -145,6 +165,18 @@
 # define cfi_buswidth_is_4() (0)
 #endif
 
+#ifdef CFIDEV_BUSWIDTH_8
+# ifdef CFIDEV_BUSWIDTH
+#  undef CFIDEV_BUSWIDTH
+#  define CFIDEV_BUSWIDTH (map->buswidth)
+# else
+#  define CFIDEV_BUSWIDTH CFIDEV_BUSWIDTH_8
+# endif
+# define cfi_buswidth_is_8() (CFIDEV_BUSWIDTH == CFIDEV_BUSWIDTH_8)
+#else
+# define cfi_buswidth_is_8() (0)
+#endif
+
 #ifndef CFIDEV_BUSWIDTH
 #error You must define at least one bus width to support!
 #endif
@@ -156,6 +188,7 @@
 #define CFI_DEVICETYPE_X8  (8 / 8)
 #define CFI_DEVICETYPE_X16 (16 / 8)
 #define CFI_DEVICETYPE_X32 (32 / 8)
+#define CFI_DEVICETYPE_X64 (64 / 8)
 
 /* NB: We keep these structures in memory in HOST byteorder, except
  * where individually noted.
@@ -264,9 +297,9 @@
 /*
  * Transforms the CFI command for the given geometry (bus width & interleave.
  */
-static inline __u32 cfi_build_cmd(u_char cmd, struct map_info *map, struct cfi_private *cfi)
+static inline __u64 cfi_build_cmd(u_char cmd, struct map_info *map, struct cfi_private *cfi)
 {
-	__u32 val = 0;
+	__u64 val = 0;
 
 	if (cfi_buswidth_is_1()) {
 		/* 1 x8 device */
@@ -291,6 +324,25 @@
 			val = (cmd << 16) | cmd;
 			val = cpu_to_cfi32((val << 8) | val);
 		}
+	} else if (cfi_buswidth_is_8()) {
+		if (cfi_interleave_is_1()) {
+			/* 1 x64 device in x64 mode */
+			val = cpu_to_cfi64(cmd);
+		} else if (cfi_interleave_is_2()) {
+			/* 2 x32 device in x32 mode */
+                        val = cmd;
+			val = cpu_to_cfi64((val << 32) | val);
+		} else if (cfi_interleave_is_4()) {
+			/* 4 (x16, x32 or x64) devices in x16 mode */
+			val = (cmd << 16) | cmd;
+			val = cpu_to_cfi64((val << 32) | val);
+		} else if (cfi_interleave_is_8()) {
+			/* 8 (x8, x16 or x32) devices in x8 mode */
+			val = (cmd << 8) | cmd;
+			val = (val << 16) | val;
+			val = (val << 32) | val;
+			val = cpu_to_cfi64(val);
+		}
 	}
 	return val;
 }
@@ -300,7 +352,7 @@
  * Read a value according to the bus width.
  */
 
-static inline __u32 cfi_read(struct map_info *map, __u32 addr)
+static inline __u64 cfi_read(struct map_info *map, __u32 addr)
 {
 	if (cfi_buswidth_is_1()) {
 		return map->read8(map, addr);
@@ -308,6 +360,8 @@
 		return map->read16(map, addr);
 	} else if (cfi_buswidth_is_4()) {
 		return map->read32(map, addr);
+	} else if (cfi_buswidth_is_8()) {
+		return map->read64(map, addr);
 	} else {
 		return 0;
 	}
@@ -317,7 +371,7 @@
  * Write a value according to the bus width.
  */
 
-static inline void cfi_write(struct map_info *map, __u32 val, __u32 addr)
+static inline void cfi_write(struct map_info *map, __u64 val, __u32 addr)
 {
 	if (cfi_buswidth_is_1()) {
 		map->write8(map, val, addr);
@@ -325,6 +379,8 @@
 		map->write16(map, val, addr);
 	} else if (cfi_buswidth_is_4()) {
 		map->write32(map, val, addr);
+	} else if (cfi_buswidth_is_8()) {
+		map->write64(map, val, addr);
 	}
 }
 
@@ -337,9 +393,9 @@
  */
 static inline __u32 cfi_send_gen_cmd(u_char cmd, __u32 cmd_addr, __u32 base,
 				struct map_info *map, struct cfi_private *cfi,
-				int type, __u32 *prev_val)
+				int type, __u64 *prev_val)
 {
-	__u32 val;
+	__u64 val;
 	__u32 addr = base + cfi_build_cmd_addr(cmd_addr, CFIDEV_INTERLEAVE, type);
 
 	val = cfi_build_cmd(cmd, map, cfi);
@@ -360,6 +416,8 @@
 		return cfi16_to_cpu(map->read16(map, addr));
 	} else if (cfi_buswidth_is_4()) {
 		return cfi32_to_cpu(map->read32(map, addr));
+	} else if (cfi_buswidth_is_8()) {
+		return cfi64_to_cpu(map->read64(map, addr));
 	} else {
 		return 0;
 	}
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/include/linux/mtd/cfi_endian.h linux/include/linux/mtd/cfi_endian.h
--- linux-original/include/linux/mtd/cfi_endian.h	Thu Oct  4 15:13:18 2001
+++ linux/include/linux/mtd/cfi_endian.h	Tue Dec 18 14:07:50 2001
@@ -30,22 +30,28 @@
 #define cfi8_to_cpu(x) (x)
 #define cpu_to_cfi16(x) cpu_to_le16(x)
 #define cpu_to_cfi32(x) cpu_to_le32(x)
+#define cpu_to_cfi64(x) cpu_to_le64(x)
 #define cfi16_to_cpu(x) le16_to_cpu(x)
 #define cfi32_to_cpu(x) le32_to_cpu(x)
+#define cfi64_to_cpu(x) le64_to_cpu(x)
 #elif defined (CFI_BIG_ENDIAN)
 #define cpu_to_cfi8(x) (x)
 #define cfi8_to_cpu(x) (x)
 #define cpu_to_cfi16(x) cpu_to_be16(x)
 #define cpu_to_cfi32(x) cpu_to_be32(x)
+#define cpu_to_cfi64(x) cpu_to_be64(x)
 #define cfi16_to_cpu(x) be16_to_cpu(x)
 #define cfi32_to_cpu(x) be32_to_cpu(x)
+#define cfi64_to_cpu(x) be64_to_cpu(x)
 #elif defined (CFI_HOST_ENDIAN)
 #define cpu_to_cfi8(x) (x)
 #define cfi8_to_cpu(x) (x)
 #define cpu_to_cfi16(x) (x)
 #define cpu_to_cfi32(x) (x)
+#define cpu_to_cfi64(x) (x)
 #define cfi16_to_cpu(x) (x)
 #define cfi32_to_cpu(x) (x)
+#define cfi64_to_cpu(x) (x)
 #else
 #error No CFI endianness defined
 #endif
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/include/linux/mtd/map.h linux/include/linux/mtd/map.h
--- linux-original/include/linux/mtd/map.h	Thu Oct  4 15:13:18 2001
+++ linux/include/linux/mtd/map.h	Tue Dec 18 14:07:50 2001
@@ -33,6 +33,7 @@
 	__u8 (*read8)(struct map_info *, unsigned long);
 	__u16 (*read16)(struct map_info *, unsigned long);
 	__u32 (*read32)(struct map_info *, unsigned long);  
+	__u64 (*read64)(struct map_info *, unsigned long);  
 	/* If it returned a 'long' I'd call it readl.
 	 * It doesn't.
 	 * I won't.
@@ -42,6 +43,7 @@
 	void (*write8)(struct map_info *, __u8, unsigned long);
 	void (*write16)(struct map_info *, __u16, unsigned long);
 	void (*write32)(struct map_info *, __u32, unsigned long);
+	void (*write64)(struct map_info *, __u64, unsigned long);
 	void (*copy_to)(struct map_info *, unsigned long, const void *, ssize_t);
 
 	void (*set_vpp)(struct map_info *, int);
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/include/linux/version.h linux/include/linux/version.h
--- linux-original/include/linux/version.h	Wed Dec 31 16:00:00 1969
+++ linux/include/linux/version.h	Tue Dec 18 14:06:08 2001
@@ -0,0 +1,3 @@
+#define UTS_RELEASE "2.4.16"
+#define LINUX_VERSION_CODE 132112
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/drivers/mtd/chips/Config.in linux/drivers/mtd/chips/Config.in
--- linux-original/drivers/mtd/chips/Config.in	Thu Oct  4 15:13:18 2001
+++ linux/drivers/mtd/chips/Config.in	Tue Dec 18 14:06:06 2001
@@ -31,6 +31,7 @@
        bool '    Support  8-bit buswidth' CONFIG_MTD_CFI_B1
        bool '    Support 16-bit buswidth' CONFIG_MTD_CFI_B2
        bool '    Support 32-bit buswidth' CONFIG_MTD_CFI_B4
+       bool '    Support 64-bit buswidth' CONFIG_MTD_CFI_B8
 	 if [ "$CONFIG_MTD_CFI_B1" = "y" ]; then
 	   define_bool CONFIG_MTD_CFI_I1 y
          else
@@ -38,6 +39,7 @@
 	 fi
        bool '    Support 2-chip flash interleave' CONFIG_MTD_CFI_I2
        bool '    Support 4-chip flash interleave' CONFIG_MTD_CFI_I4
+       bool '    Support 8-chip flash interleave' CONFIG_MTD_CFI_I8
      fi
   fi
 fi
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/drivers/mtd/chips/cfi_cmdset_0001.c linux/drivers/mtd/chips/cfi_cmdset_0001.c
--- linux-original/drivers/mtd/chips/cfi_cmdset_0001.c	Thu Oct  4 15:14:59 2001
+++ linux/drivers/mtd/chips/cfi_cmdset_0001.c	Tue Dec 18 14:06:06 2001
@@ -30,6 +30,8 @@
 #include <linux/mtd/cfi.h>
 #include <linux/mtd/compatmac.h>
 
+//#define FORCE_WORD_WRITE
+
 static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
 static int cfi_intelext_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
 static int cfi_intelext_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
@@ -240,11 +242,15 @@
 	/* Also select the correct geometry setup too */ 
 		mtd->erase = cfi_intelext_erase_varsize;
 	mtd->read = cfi_intelext_read;
+#ifndef FORCE_WORD_WRITE
 	if ( cfi->cfiq->BufWriteTimeoutTyp ) {
-		//printk(KERN_INFO "Using buffer write method\n" );
+		printk("Using buffer write method\n" );
 		mtd->write = cfi_intelext_write_buffers;
 	} else {
-		//printk(KERN_INFO "Using word write method\n" );
+#else
+	{
+#endif
+		printk("Using word write method\n" );
 		mtd->write = cfi_intelext_write_words;
 	}
 	mtd->sync = cfi_intelext_sync;
@@ -262,7 +268,7 @@
 
 static inline int do_read_onechip(struct map_info *map, struct flchip *chip, loff_t adr, size_t len, u_char *buf)
 {
-	__u32 status, status_OK;
+	__u64 status, status_OK;
 	unsigned long timeo;
 	DECLARE_WAITQUEUE(wait, current);
 	int suspended = 0;
@@ -312,7 +318,7 @@
 				chip->state = FL_ERASING;
 				spin_unlock_bh(chip->mutex);
 				printk(KERN_ERR "Chip not ready after erase "
-				       "suspended: status = 0x%x\n", status);
+				       "suspended: status = 0x%llx\n", status);
 				return -EIO;
 			}
 			
@@ -350,7 +356,7 @@
 		/* Urgh. Chip not yet ready to talk to us. */
 		if (time_after(jiffies, timeo)) {
 			spin_unlock_bh(chip->mutex);
-			printk(KERN_ERR "waiting for chip to be ready timed out in read. WSM status = %x\n", status);
+			printk(KERN_ERR "waiting for chip to be ready timed out in read. WSM status = %llx\n", status);
 			return -EIO;
 		}
 
@@ -433,10 +439,10 @@
 	return ret;
 }
 
-static int do_write_oneword(struct map_info *map, struct flchip *chip, unsigned long adr, __u32 datum)
+static int do_write_oneword(struct map_info *map, struct flchip *chip, unsigned long adr, __u64 datum)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
-	__u32 status, status_OK;
+	__u64 status, status_OK;
 	unsigned long timeo;
 	DECLARE_WAITQUEUE(wait, current);
 	int z;
@@ -583,8 +589,8 @@
 		unsigned long bus_ofs = ofs & ~(CFIDEV_BUSWIDTH-1);
 		int gap = ofs - bus_ofs;
 		int i = 0, n = 0;
-		u_char tmp_buf[4];
-		__u32 datum;
+		u_char tmp_buf[8];
+		__u64 datum;
 
 		while (gap--)
 			tmp_buf[i++] = 0xff;
@@ -597,6 +603,8 @@
 			datum = *(__u16*)tmp_buf;
 		} else if (cfi_buswidth_is_4()) {
 			datum = *(__u32*)tmp_buf;
+		} else if (cfi_buswidth_is_8()) {
+			datum = *(__u64*)tmp_buf;
 		} else {
 			return -EINVAL;  /* should never happen, but be safe */
 		}
@@ -619,7 +627,7 @@
 	}
 	
 	while(len >= CFIDEV_BUSWIDTH) {
-		__u32 datum;
+		__u64 datum;
 
 		if (cfi_buswidth_is_1()) {
 			datum = *(__u8*)buf;
@@ -627,6 +635,8 @@
 			datum = *(__u16*)buf;
 		} else if (cfi_buswidth_is_4()) {
 			datum = *(__u32*)buf;
+		} else if (cfi_buswidth_is_8()) {
+			datum = *(__u64*)buf;
 		} else {
 			return -EINVAL;
 		}
@@ -651,8 +661,8 @@
 
 	if (len & (CFIDEV_BUSWIDTH-1)) {
 		int i = 0, n = 0;
-		u_char tmp_buf[4];
-		__u32 datum;
+		u_char tmp_buf[8];
+		__u64 datum;
 
 		while (len--)
 			tmp_buf[i++] = buf[n++];
@@ -663,6 +673,8 @@
 			datum = *(__u16*)tmp_buf;
 		} else if (cfi_buswidth_is_4()) {
 			datum = *(__u32*)tmp_buf;
+		} else if (cfi_buswidth_is_8()) {
+			datum = *(__u64*)tmp_buf;
 		} else {
 			return -EINVAL;  /* should never happen, but be safe */
 		}
@@ -683,7 +695,7 @@
 				  unsigned long adr, const u_char *buf, int len)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
-	__u32 status, status_OK;
+	__u64 status, status_OK;
 	unsigned long cmd_adr, timeo;
 	DECLARE_WAITQUEUE(wait, current);
 	int wbufsize, z;
@@ -761,7 +773,7 @@
 			chip->state = FL_STATUS;
 			DISABLE_VPP(map);
 			spin_unlock_bh(chip->mutex);
-			printk(KERN_ERR "Chip not ready for buffer write. Xstatus = %x, status = %x\n", status, cfi_read(map, cmd_adr));
+			printk(KERN_ERR "Chip not ready for buffer write. Xstatus = %llx, status = %llx\n", status, cfi_read(map, cmd_adr));
 			return -EIO;
 		}
 	}
@@ -777,6 +789,8 @@
 			map->write16 (map, *((__u16*)buf)++, adr+z);
 		} else if (cfi_buswidth_is_4()) {
 			map->write32 (map, *((__u32*)buf)++, adr+z);
+		} else if (cfi_buswidth_is_8()) {
+			map->write64 (map, *((__u64*)buf)++, adr+z);
 		} else {
 			DISABLE_VPP(map);
 			return -EINVAL;
@@ -930,7 +944,7 @@
 static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
-	__u32 status, status_OK;
+	__u64 status, status_OK;
 	unsigned long timeo;
 	int retries = 3;
 	DECLARE_WAITQUEUE(wait, current);
@@ -1020,7 +1034,7 @@
 		if (time_after(jiffies, timeo)) {
 			cfi_write(map, CMD(0x70), adr);
 			chip->state = FL_STATUS;
-			printk(KERN_ERR "waiting for erase to complete timed out. Xstatus = %x, status = %x.\n", status, cfi_read(map, adr));
+			printk(KERN_ERR "waiting for erase to complete timed out. Xstatus = %llx, status = %llx.\n", status, cfi_read(map, adr));
 			DISABLE_VPP(map);
 			spin_unlock_bh(chip->mutex);
 			return -EIO;
@@ -1048,31 +1062,31 @@
 			for (i = 1; i<CFIDEV_INTERLEAVE; i++) {
 				      chipstatus |= status >> (cfi->device_type * 8);
 			}
-			printk(KERN_WARNING "Status is not identical for all chips: 0x%x. Merging to give 0x%02x\n", status, chipstatus);
+			printk(KERN_WARNING "Status is not identical for all chips: 0x%llx. Merging to give 0x%02x\n", status, chipstatus);
 		}
 		/* Reset the error bits */
 		cfi_write(map, CMD(0x50), adr);
 		cfi_write(map, CMD(0x70), adr);
 		
 		if ((chipstatus & 0x30) == 0x30) {
-			printk(KERN_NOTICE "Chip reports improper command sequence: status 0x%x\n", status);
+			printk(KERN_NOTICE "Chip reports improper command sequence: status 0x%llx\n", status);
 			ret = -EIO;
 		} else if (chipstatus & 0x02) {
 			/* Protection bit set */
 			ret = -EROFS;
 		} else if (chipstatus & 0x8) {
 			/* Voltage */
-			printk(KERN_WARNING "Chip reports voltage low on erase: status 0x%x\n", status);
+			printk(KERN_WARNING "Chip reports voltage low on erase: status 0x%llx\n", status);
 			ret = -EIO;
 		} else if (chipstatus & 0x20) {
 			if (retries--) {
-				printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x. Retrying...\n", adr, status);
+				printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%llx. Retrying...\n", adr, status);
 				timeo = jiffies + HZ;
 				chip->state = FL_STATUS;
 				spin_unlock_bh(chip->mutex);
 				goto retry;
 			}
-			printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x\n", adr, status);
+			printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%llx\n", adr, status);
 			ret = -EIO;
 		}
 	}
@@ -1233,7 +1247,7 @@
 static inline int do_lock_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
-	__u32 status, status_OK;
+	__u64 status, status_OK;
 	unsigned long timeo = jiffies + HZ;
 	DECLARE_WAITQUEUE(wait, current);
 
@@ -1306,7 +1320,7 @@
 		if (time_after(jiffies, timeo)) {
 			cfi_write(map, CMD(0x70), adr);
 			chip->state = FL_STATUS;
-			printk(KERN_ERR "waiting for lock to complete timed out. Xstatus = %x, status = %x.\n", status, cfi_read(map, adr));
+			printk(KERN_ERR "waiting for lock to complete timed out. Xstatus = %llx, status = %llx.\n", status, cfi_read(map, adr));
 			DISABLE_VPP(map);
 			spin_unlock_bh(chip->mutex);
 			return -EIO;
@@ -1382,7 +1396,7 @@
 static inline int do_unlock_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
-	__u32 status, status_OK;
+	__u64 status, status_OK;
 	unsigned long timeo = jiffies + HZ;
 	DECLARE_WAITQUEUE(wait, current);
 
@@ -1455,7 +1469,7 @@
 		if (time_after(jiffies, timeo)) {
 			cfi_write(map, CMD(0x70), adr);
 			chip->state = FL_STATUS;
-			printk(KERN_ERR "waiting for unlock to complete timed out. Xstatus = %x, status = %x.\n", status, cfi_read(map, adr));
+			printk(KERN_ERR "waiting for unlock to complete timed out. Xstatus = %llx, status = %llx.\n", status, cfi_read(map, adr));
 			DISABLE_VPP(map);
 			spin_unlock_bh(chip->mutex);
 			return -EIO;
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/drivers/mtd/chips/cfi_probe.c linux/drivers/mtd/chips/cfi_probe.c
--- linux-original/drivers/mtd/chips/cfi_probe.c	Thu Oct  4 15:14:59 2001
+++ linux/drivers/mtd/chips/cfi_probe.c	Tue Dec 18 14:06:06 2001
@@ -18,7 +18,7 @@
 #include <linux/mtd/cfi.h>
 #include <linux/mtd/gen_probe.h>
 
-//#define DEBUG_CFI 
+#define DEBUG_CFI 
 
 #ifdef DEBUG_CFI
 static void print_cfi_ident(struct cfi_ident *);
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/drivers/mtd/chips/gen_probe.c linux/drivers/mtd/chips/gen_probe.c
--- linux-original/drivers/mtd/chips/gen_probe.c	Thu Oct  4 15:14:59 2001
+++ linux/drivers/mtd/chips/gen_probe.c	Tue Dec 18 14:06:06 2001
@@ -96,6 +96,11 @@
 		cfi.chipshift+=2;
 		break;
 #endif
+#ifdef CFIDEV_INTERLEAVE_8
+	case 8:
+		cfi.chipshift+=3;
+		break;
+#endif
 	default:
 		BUG();
 	}
@@ -223,6 +228,70 @@
 #endif /* CFIDEV_INTERLEAVE_4 */
 		break;
 #endif /* CFIDEV_BUSWIDTH_4 */
+
+#ifdef CFIDEV_BUSWIDTH_8
+	case CFIDEV_BUSWIDTH_8:
+#if defined(CFIDEV_INTERLEAVE_1) && defined(SOMEONE_ACTUALLY_MAKES_THESE)
+                cfi->interleave = CFIDEV_INTERLEAVE_1;
+
+                cfi->device_type = CFI_DEVICETYPE_X32;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+#endif /* CFIDEV_INTERLEAVE_1 */
+#ifdef CFIDEV_INTERLEAVE_2
+		cfi->interleave = CFIDEV_INTERLEAVE_2;
+
+#ifdef SOMEONE_ACTUALLY_MAKES_THESE
+		cfi->device_type = CFI_DEVICETYPE_X32;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+#endif
+		cfi->device_type = CFI_DEVICETYPE_X16;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+
+		cfi->device_type = CFI_DEVICETYPE_X8;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+#endif /* CFIDEV_INTERLEAVE_2 */
+#ifdef CFIDEV_INTERLEAVE_4
+		cfi->interleave = CFIDEV_INTERLEAVE_4;
+
+#ifdef SOMEONE_ACTUALLY_MAKES_THESE
+		cfi->device_type = CFI_DEVICETYPE_X32;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+#endif
+		cfi->device_type = CFI_DEVICETYPE_X16;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+
+		cfi->device_type = CFI_DEVICETYPE_X8;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+#endif /* CFIDEV_INTERLEAVE_4 */
+#ifdef CFIDEV_INTERLEAVE_8
+		cfi->interleave = CFIDEV_INTERLEAVE_8;
+
+#ifdef SOMEONE_ACTUALLY_MAKES_THESE
+		cfi->device_type = CFI_DEVICETYPE_X64;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+
+		cfi->device_type = CFI_DEVICETYPE_X32;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+#endif
+		cfi->device_type = CFI_DEVICETYPE_X16;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+
+		cfi->device_type = CFI_DEVICETYPE_X8;
+		if (cp->probe_chip(map, 0, NULL, cfi))
+			return 1;
+#endif /* CFIDEV_INTERLEAVE_8 */
+		break;
+#endif /* CFIDEV_BUSWIDTH_8 */
 
 	default:
 		printk(KERN_WARNING "genprobe_new_chip called with unsupported buswidth %d\n", map->buswidth);
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/drivers/mtd/maps/comdev_np.c linux/drivers/mtd/maps/comdev_np.c
--- linux-original/drivers/mtd/maps/comdev_np.c	Wed Dec 31 16:00:00 1969
+++ linux/drivers/mtd/maps/comdev_np.c	Tue Dec 18 14:06:06 2001
@@ -0,0 +1,22 @@
+static struct mtd_partition partition_info[] =
+{
+  {
+     name:"SBC-GXx flash boot partition",
+     offset:0,
+     size:BOOT_PARTITION_SIZE_KiB * 1024
+  },
+  {
+     name:"SBC-GXx flash data partition",
+     offset:BOOT_PARTITION_SIZE_KiB * 1024,
+     size:(DATA_PARTITION_SIZE_KiB) * 1024
+  },
+  {
+     name:"SBC-GXx flash application partition",
+     offset:(BOOT_PARTITION_SIZE_KiB + DATA_PARTITION_SIZE_KiB) * 1024
+  }
+};
+
+#define NUM_PARTITIONS (sizeof(partition_info) / sizeof(partition_info[0]))
+
+	/* Create MTD devices for each partition. */
+add_mtd_partitions (all_mtd, partition_info, NUM_PARTITIONS);
diff -urbBN --exclude=.*depend --exclude=*.flags --exclude=*.o linux-original/drivers/mtd/maps/physmap.c linux/drivers/mtd/maps/physmap.c
--- linux-original/drivers/mtd/maps/physmap.c	Thu Oct  4 15:14:59 2001
+++ linux/drivers/mtd/maps/physmap.c	Tue Dec 18 14:06:06 2001
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
 #include <linux/config.h>
 
 
@@ -34,6 +35,11 @@
 	return __raw_readl(map->map_priv_1 + ofs);
 }
 
+__u64 physmap_read64(struct map_info *map, unsigned long ofs)
+{
+	return __raw_readll(map->map_priv_1 + ofs);
+}
+
 void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
 {
 	memcpy_fromio(to, map->map_priv_1 + from, len);
@@ -57,6 +63,12 @@
 	mb();
 }
 
+void physmap_write64(struct map_info *map, __u64 d, unsigned long adr)
+{
+	__raw_writell(d, map->map_priv_1 + adr);
+	mb();
+}
+
 void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
 {
 	memcpy_toio(map->map_priv_1 + to, from, len);
@@ -69,10 +81,12 @@
 	read8: physmap_read8,
 	read16: physmap_read16,
 	read32: physmap_read32,
+	read64: physmap_read64,
 	copy_from: physmap_copy_from,
 	write8: physmap_write8,
 	write16: physmap_write16,
 	write32: physmap_write32,
+	write64: physmap_write64,
 	copy_to: physmap_copy_to
 };
 
@@ -90,6 +104,61 @@
 		mymtd->module = THIS_MODULE;
 
 		add_mtd_device(mymtd);
+
+#ifdef CONFIG_COMDEV
+
+		{
+		static struct mtd_partition partition_info[] =
+		{
+		        {
+		                name: "jffs part",
+		                size:   96 << 20,
+		                offset:  0 << 20
+		        },
+		        {
+		                name: "hrcw part",
+		                size:    1 << 20,
+		                offset: 96 << 20
+		        },
+		        {
+		                name: "kernel part",
+		                size:    1 << 20,
+		                offset: 97 << 20
+		        },
+		        {
+		                name: "fpga part",
+		                size:    1 << 20,
+		                offset: 98 << 20
+		        },
+		        {
+		                name: "bonus part",
+		                size:    5 << 20,
+		                offset: 99 << 20
+		        },
+		        {
+		                name: "root part",
+		                size:   22 << 20,
+		                offset:104 << 20
+		        },
+		        {
+		                name: "env part",
+		                size:    1 << 20,
+		                offset:126 << 20
+		        },
+		        {
+		                name: "monitor part",
+		                size:    1 << 20,
+		                offset:127 << 20
+		        },
+		};
+		
+		#define NUM_PARTITIONS (sizeof(partition_info) / sizeof(partition_info[0]))
+		
+		/* Create MTD devices for each partition. */
+		add_mtd_partitions (mymtd, partition_info, NUM_PARTITIONS);
+		}
+#endif
+
 		return 0;
 	}
 


More information about the linux-mtd mailing list