[coreboot] Flashrom jedec probe patch + AT29C010A logs
Paul Menzel
paulepanter at users.sourceforge.net
Wed Jun 3 10:40:32 CEST 2009
Dear Maciej,
thank you for your patch.
Just some typos and wording suggestions.
Thanks and bests,
Paul
Am Mittwoch, den 03.06.2009, 01:09 +0200 schrieb Maciej Pijanka:
> Signed-Off-by: Maciej Pijanka <maciej.pijanka at gmail.com>
> Index: flash.h
> ===================================================================
> --- flash.h (revision 567)
> +++ flash.h (working copy)
> @@ -155,6 +155,7 @@
> uint32_t tested;
>
> int (*probe) (struct flashchip *flash);
> + int probe_timing;
> int (*erase) (struct flashchip *flash);
> int (*write) (struct flashchip *flash, uint8_t *buf);
> int (*read) (struct flashchip *flash, uint8_t *buf);
> @@ -182,6 +183,18 @@
> #define TEST_BAD_PREW (TEST_BAD_PROBE | TEST_BAD_READ |
> TEST_BAD_ERASE | TEST_BAD_WRITE)
> #define TEST_BAD_MASK 0xf0
>
> +/* Timing used in probe routines defined in chips definition
Timing used in probe routines is defined in chip definition
> + * to denote which chip uses which timing, additionally
> + * in jedec_probe() chip with 0 in probe_timing field
> + * will emit debug message about not set field.
s/not set/unset/
> + *
> + * SPI devices will always have zero and ignore this field.
> + */
> +#define TIMING_FIXME -1
> +/* this is intentionally same value as fixme */
> +#define TIMING_IGNORED -1
> +#define TIMING_ZERO -2
> +
> extern struct flashchip flashchips[];
>
> struct penable {
> Index: jedec.c
> ===================================================================
> --- jedec.c (revision 567)
> +++ jedec.c (working copy)
> @@ -91,7 +91,21 @@
> uint8_t id1, id2;
> uint32_t largeid1, largeid2;
> uint32_t flashcontent1, flashcontent2;
> + int probe_timing_enter, probe_timing_exit;
>
> + if (flash->probe_timing > 0)
> + probe_timing_enter = probe_timing_exit = flash->probe_timing;
> + else if (flash->probe_timing == TIMING_ZERO) { /* INTENTIONALLY NO DELAY */
> + probe_timing_enter = probe_timing_exit = 0;
> + } else if (flash->probe_timing == TIMING_FIXME) { /* FIXME or IGNORED */
> + printf_debug("Chip lacks correct probe timing information, using default 10mS/40uS\n");
Full stop (.) at the end of sentence.
> + probe_timing_enter = 10000;
> + probe_timing_exit = 40;
> + } else {
> + printf("Chip has negative value of probe_timing, failing without chip access\n");
To be consistent s/probe_timing/probe timing information/. Full stop at
the end.
[…]
> Index: flashchips.c
> ===================================================================
> --- flashchips.c (revision 567)
> +++ flashchips.c (working copy)
[…]
> @@ -77,6 +80,7 @@
> .page_size = 64 * 1024,
> .tested = TEST_UNTESTED,
> .probe = probe_29f040b,
> + .probe_timing = TIMING_IGNORED, /* routine don't use probe_timing (am29f040b.c) */
s/don't/does not/ (same for the other comments)
> .erase = erase_29f040b,
> .write = write_29f040b,
> .read = read_memmapped,
> @@ -92,6 +96,7 @@
> .page_size = 64 * 1024,
> .tested = TEST_OK_PREW,
> .probe = probe_29f040b,
> + .probe_timing = TIMING_IGNORED, /* routine don't use probe_timing (am29f040b.c) */
> .erase = erase_29f040b,
> .write = write_29f040b,
> .read = read_memmapped,
> @@ -107,6 +112,7 @@
> .page_size = 64 * 1024,
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> + .probe_timing = TIMING_FIXME,
> .erase = erase_29f040b,
> .write = write_29f040b,
> .read = read_memmapped,
> @@ -122,6 +128,7 @@
> .page_size = 64 * 1024,
> .tested = TEST_UNTESTED,
> .probe = probe_29f040b,
> + .probe_timing = TIMING_IGNORED, /* routine don't use probe_timing (am29f040b.c) */
> .erase = erase_29f040b,
> .write = write_29f040b,
> .read = read_memmapped,
> @@ -137,6 +144,7 @@
> .page_size = 64 * 1024,
> .tested = TEST_UNTESTED,
> .probe = probe_29f040b,
> + .probe_timing = TIMING_IGNORED, /* routine don't use probe_timing (am29f040b.c) */
> .erase = erase_29f040b,
> .write = write_29f040b,
> .read = read_memmapped,
> @@ -152,6 +160,7 @@
> .page_size = 128,
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> + .probe_timing = TIMING_FIXME,
> .erase = erase_chip_jedec,
> .write = write_jedec,
> .read = read_memmapped,
> @@ -407,7 +416,8 @@
> .total_size = 64,
> .page_size = 128,
> .tested = TEST_OK_PREW,
> - .probe = probe_jedec,
> + .probe = probe_jedec,
> + .probe_timing = 10000, /* 10mS, Enter=Exec */
> .erase = erase_chip_jedec,
> .write = write_jedec,
> .read = read_memmapped,
> @@ -424,6 +434,7 @@
> .page_size = 128,
> .tested = TEST_OK_PRE,
> .probe = probe_jedec,
> + .probe_timing = 10000, /* 10mS, Enter=Exec */
> .erase = erase_chip_jedec,
> .write = write_jedec, /* FIXME */
> .read = read_memmapped,
> @@ -439,6 +450,7 @@
> .page_size = 256,
> .tested = TEST_OK_PREW,
> .probe = probe_jedec,
> + .probe_timing = TIMING_FIXME,
> .erase = erase_chip_jedec,
> .write = write_jedec,
> .read = read_memmapped,
> @@ -454,6 +466,7 @@
> .page_size = 256,
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> + .probe_timing = TIMING_FIXME,
> .erase = erase_chip_jedec,
> .write = write_jedec,
> .read = read_memmapped,
> @@ -604,6 +617,7 @@
> .page_size = 64,
> .tested = TEST_OK_PREW,
> .probe = probe_jedec,
> + .probe_timing = TIMING_FIXME,
> .erase = erase_chip_jedec,
> .write = write_49f002,
> .read = read_memmapped,
> @@ -619,6 +633,7 @@
> .page_size = 256,
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> + .probe_timing = TIMING_FIXME, /* doc1008.pdf dont says anything about probe timing */
s/dont/does not/
[…]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090603/5311f34b/attachment.sig>
More information about the coreboot
mailing list