Author: snelson
Date: Sat Feb 27 19:01:15 2010
New Revision: 917
URL: http://flashrom.org/trac/coreboot/changeset/917

Log:
Since we have a unlock interface for chips, I think we can convert the 
remaining references to *_49fl00x. Now the only remaining and used function in 
pm49fl00x.c is unlock_49fl00x.

Added missing unlock to AMIC A49LF040A.
Added lock_49fl00x function; Trivial change.

Signed-off-by: Sean Nelson <[email protected]>
Acked-by: Carl-Daniel Hailfinger <[email protected]>

Modified:
   trunk/chipdrivers.h
   trunk/flashchips.c
   trunk/pm49fl00x.c

Modified: trunk/chipdrivers.h
==============================================================================
--- trunk/chipdrivers.h Fri Feb 26 10:51:20 2010        (r916)
+++ trunk/chipdrivers.h Sat Feb 27 19:01:15 2010        (r917)
@@ -87,10 +87,8 @@
                          chipaddr dst, int page_size);
 
 /* pm49fl00x.c */
-int probe_49fl00x(struct flashchip *flash);
-int erase_49fl00x(struct flashchip *flash);
-int write_49fl00x(struct flashchip *flash, uint8_t *buf);
 int unlock_49fl00x(struct flashchip *flash);
+int lock_49fl00x(struct flashchip *flash);
 
 /* sharplhf00l04.c */
 int probe_lhf00l04(struct flashchip *flash);

Modified: trunk/flashchips.c
==============================================================================
--- trunk/flashchips.c  Fri Feb 26 10:51:20 2010        (r916)
+++ trunk/flashchips.c  Sat Feb 27 19:01:15 2010        (r917)
@@ -1306,7 +1306,8 @@
                                .block_erase = erase_chip_block_jedec,
                        }
                },
-               .write          = write_49fl00x,
+               .unlock         = unlock_49fl00x,
+               .write          = write_jedec_1,
                .read           = read_memmapped,
        },
 
@@ -3347,7 +3348,7 @@
                        }
                },
                .unlock         = unlock_49fl00x,
-               .write          = write_49fl00x,
+               .write          = write_jedec_1,
                .read           = read_memmapped,
        },
 
@@ -3377,7 +3378,7 @@
                        }
                },
                .unlock         = unlock_49fl00x,
-               .write          = write_49fl00x,
+               .write          = write_jedec_1,
                .read           = read_memmapped,
        },
 

Modified: trunk/pm49fl00x.c
==============================================================================
--- trunk/pm49fl00x.c   Fri Feb 26 10:51:20 2010        (r916)
+++ trunk/pm49fl00x.c   Sat Feb 27 19:01:15 2010        (r917)
@@ -43,6 +43,12 @@
        return 0;
 }
 
+int lock_49fl00x(struct flashchip *flash)
+{
+       write_lockbits_49fl00x(flash->virtual_registers, flash->total_size * 
1024, 1, flash->page_size);
+       return 0;
+}
+
 int erase_49fl00x(struct flashchip *flash)
 {
        int i;

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to