BUSWIDTH > 4 (64 bit support on PPC) Here's one more fix to add

Jan.Rovins at radisys.com Jan.Rovins at radisys.com
Tue Dec 11 20:37:40 EST 2001


Hi  Stefano,

Here is one more fix to add to that patch,
what you have will work on most of your boards, but fail on a few,
I wasn't checking the 2nd half of the 64 bit bank to see if it was ready.

the following patch should fix:
(put this fix on top of my original patch)

I will re post the whole patch including this fix, against the latest MTD 
as soon as I get a chance
to re-sync  to the latest myself. (Maybe end of this week)
I don't know if the official MTD folk are planing to include this in the 
main code base.

Jan

Index: cfi_cmdset_0002.c
===================================================================
RCS file: 
/cvs/embeded/kernels/src/mot765/linux-2.2.17/drivers/mtd/chips/cfi_cmdset_0002.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cfi_cmdset_0002.c   2001/06/07 13:30:00     1.4
+++ cfi_cmdset_0002.c   2001/09/04 16:48:50     1.5
@@ -8,7 +8,7 @@
  *
  * This code is GPL
  *
- * $Id: cfi_cmdset_0002.c,v 1.4 2001/06/07 13:30:00 jrovins Exp $
+ * $Id: cfi_cmdset_0002.c,v 1.5 2001/09/04 16:48:50 jrovins Exp $
  *
  */
 
@@ -22,10 +22,11 @@
 #include <linux/errno.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/interrupt.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/cfi.h>
 
-#define AMD_BOOTLOC_BUG
+//#define AMD_BOOTLOC_BUG
 
 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, 
u_char *);
 static int cfi_amdstd_write(struct mtd_info *, loff_t, size_t, size_t *, 
const u_char *);
@@ -91,6 +92,7 @@
        {
                cfi_send_gen_cmd(0x98, 0x55, 0, map, cfi, 
cfi->device_type, NULL);
                bootloc = cfi_read_query(map, (adr+15)*ofs_factor);
+                printk("AMD_BOOTLOC_BUG: Default Path bootloc: %d\n", 
bootloc);
        }
        if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) {
                printk(KERN_WARNING "%s: Swapping erase regions for broken 
CFI table.\n", map->name);
@@ -624,7 +626,12 @@
        /* FIXME. Use a timer to check this, and return immediately. */
        /* Once the state machine's known to be working I'll do that */
 
+#if (BITS_PER_LONG < 64) && ( CFIDEV_BUSWIDTH == 8)
+       while ( (( (status = cfi_read(map,adr)) & rdy_mask ) != rdy_mask ) 
|| 
+       ( ( (status = cfi_read(map,adr + 0x04)) & rdy_mask ) != rdy_mask ) 
) {
+#else
        while ( ( (status = cfi_read(map,adr)) & rdy_mask ) != rdy_mask ) 
{
+#endif
                static int z=0;
 
                if (chip->state != FL_ERASING) {






Babic Stefano <Stefano.Babic at icn.siemens.de>
Sent by: linux-mtd-admin at lists.infradead.org
12/11/01 08:35 AM

 
        To:     linux-mtd at lists.infradead.org
        cc: 
        Subject:        BUSWIDTH > 4 (64 bit support on PPC)


Hi,

I have on my target (Motorola MPC 755, 64 bit bus width) the necessity to 
use BUSWIDTH = 8. I have seen in the mailing list that the same case 
occurred and Jan (Jan Rovins <jrovins at ss7-link.com>) provided some patches 
to 
support it, mainly for cfi_cmdset_000x.c. I inserted the modifications in 
a newer mtd-snapshot and, following the suggestion by David, my system 
works.
I checked if these changes are applied in latest MTD´s versions and I have 
seen they are not. I´d like to ask if there are some plans to apply these 
patches. I know, using a 32 bit processor (and 32 bit OS) with a 64 bit 
bus seems quite weird, but it is probably not so unusual in embedded 
systems with PowerPC and 60x bus.

Thanks 

Stefano

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/







More information about the linux-mtd mailing list