David Woodhouse wrote: > > adam.wozniak@comdev.cc said: > > 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'm a little concerned about the following bit - gcc is fairly crap at > dealing with 64-bit datatypes. I'd prefer to do that only if it's > necessary. Can we define a cfi_busword type which is only as big as we need > - so it's only a __u64 if CONFIG_MTD_CFI_B8 is set? Here's a new patch. cfi.h has the following in it (paraphrased and indented for readablity): #ifndef CONFIG_MTD_CFI_GEOMETRY /* we don't know what we'll get, so we pick the largest possible here */ typedef __u64 cfi_word; #else /* pick the largest necessary */ #ifdef CONFIG_MTD_CFI_B8 typedef __u64 cfi_word; #else /* CONFIG_MTD_CFI_B8 */ #ifdef CONFIG_MTD_CFI_B4 typedef __u32 cfi_word; #else /* CONFIG_MTD_CFI_B4 */ #ifdef CONFIG_MTD_CFI_B2 typedef __u16 cfi_word; #else /* CONFIG_MTD_CFI_B2 */ #ifdef CONFIG_MTD_CFI_B1 typedef __u8 cfi_word; #else /* CONFIG_MTD_CFI_B1 */ #error You must specify a bus width #endif /* CONFIG_MTD_CFI_B1 */ #endif /* CONFIG_MTD_CFI_B2 */ #endif /* CONFIG_MTD_CFI_B4 */ #endif /* CONFIG_MTD_CFI_B8 */ #endif -- Adam Wozniak (KG6GZR) COM DEV Wireless - Digital and Software Systems awozniak@comdev.cc 3450 Broad St. 107, San Luis Obispo, CA 93401 http://www.comdev.cc Voice: (805) 544-1089 Fax: (805) 544-2055