Am Mittwoch 29 August 2007 schrieb Stefan Reinauer: > * Markus Boas <[EMAIL PROTECTED]> [070829 15:11]: > > I don't know how to make a valid patch. > > http://www.linuxbios.org/Development_Guidelines#How_to_contribute > > -- > coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br. > Tel.: +49 761 7668825 • Fax: +49 761 7664613 > Email: [EMAIL PROTECTED] • http://www.coresystems.de/ > Registergericht: Amtsgericht Freiburg • HRB 7656 > Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
I don't know what is going wrong, but now i have the patch. I not realy worked befor with svn. Greedings Markus Signed-off-by: Markus Boas <[EMAIL PROTECTED]>
Index: flash.h =================================================================== --- flash.h (Revision 2750) +++ flash.h (Arbeitskopie) @@ -101,7 +101,9 @@ #define WINBOND_ID 0xDA /* Winbond */ #define W_29C011 0xC1 +#define W_29EE011 0xC1 #define W_29C020C 0x45 +#define W_29C040P 0x46 #define W_39V040FA 0x34 #define W_39V040A 0x3D #define W_39V040B 0x54 @@ -229,6 +231,9 @@ extern int erase_49fl004(struct flashchip *flash); extern int write_49fl004(struct flashchip *flash, uint8_t *buf); +/* w29ee011.c */ +extern int probe_w29ee011(struct flashchip *flash); + /* sharplhf00l04.c */ extern int probe_lhf00l04(struct flashchip *flash); extern int erase_lhf00l04(struct flashchip *flash); Index: w29ee011.c =================================================================== --- w29ee011.c (Revision 0) +++ w29ee011.c (Revision 0) @@ -0,0 +1,51 @@ +/* +* C Implementation: w29ee011 +* +* Description: +* +* +* Author: Markus Boas <[EMAIL PROTECTED]>, (C) 2007 +* +* Copyright: See COPYING file that comes with this distribution +* +*/ + +#include "flash.h" + +int probe_w29ee011(struct flashchip *flash) +{ + volatile uint8_t *bios = flash->virtual_memory; + uint8_t id1, id2; + + /* Issue JEDEC Product ID Entry command */ + *(volatile uint8_t *)(bios + 0x5555) = 0xAA; + myusec_delay(10); + *(volatile uint8_t *)(bios + 0x2AAA) = 0x55; + myusec_delay(10); + *(volatile uint8_t *)(bios + 0x5555) = 0x80; + myusec_delay(10); + *(volatile uint8_t *)(bios + 0x5555) = 0xAA; + myusec_delay(10); + *(volatile uint8_t *)(bios + 0x2AAA) = 0x55; + myusec_delay(10); + *(volatile uint8_t *)(bios + 0x5555) = 0x60; + myusec_delay(10); + + /* Read product ID */ + id1 = *(volatile uint8_t *)bios; + id2 = *(volatile uint8_t *)(bios + 0x01); + + /* Issue JEDEC Product ID Exit command */ + *(volatile uint8_t *)(bios + 0x5555) = 0xAA; + myusec_delay(10); + *(volatile uint8_t *)(bios + 0x2AAA) = 0x55; + myusec_delay(10); + *(volatile uint8_t *)(bios + 0x5555) = 0xF0; + myusec_delay(10); + + printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2); + if (id1 == flash->manufacture_id && id2 == flash->model_id) + return 1; + + return 0; +} Index: w29ee011.h =================================================================== --- w29ee011.h (Revision 0) +++ w29ee011.h (Revision 0) @@ -0,0 +1,18 @@ +// +// C++ Interface: w29ee011 +// +// Description: Support for the Winbond W29EE011 +// Source: Datasheet +// +// +// Author: Markus Boas <[EMAIL PROTECTED]>, (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef _W29EE011_H_ +#define _W29EE011_H_ + +extern int probe_w29ee011(struct flashchip *flash); + +#endif Index: flashchips.c =================================================================== --- flashchips.c (Revision 2750) +++ flashchips.c (Arbeitskopie) @@ -83,6 +83,8 @@ probe_jedec, erase_chip_jedec, write_49fl004}, {"W29C011", WINBOND_ID, W_29C011, 128, 128, probe_jedec, erase_chip_jedec, write_jedec}, + {"W29EE011", WINBOND_ID, W_29C011, 128, 128, + probe_w29ee011, erase_chip_jedec, write_jedec}, {"W29C020C", WINBOND_ID, W_29C020C, 256, 128, probe_jedec, erase_chip_jedec, write_jedec}, {"W49F002U", WINBOND_ID, W_49F002U, 256, 128, Index: Makefile =================================================================== --- Makefile (Revision 2750) +++ Makefile (Arbeitskopie) @@ -24,7 +24,7 @@ am29f040b.o mx29f002.o sst39sf020.o m29f400bt.o w49f002u.o \ 82802ab.o msys_doc.o pm49fl004.o sst49lf040.o sst49lfxxxc.o \ sst_fwhub.o layout.o lbtable.o flashchips.o flashrom.o \ - sharplhf00l04.o + sharplhf00l04.o w29ee011.o all: pciutils dep $(PROGRAM)
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios