Patchwork [3/5] Rename AT25F512B-specific code.

login
register
about
Submitter Stefan Tauner
Date 2012-02-15 01:10:22
Message ID <1329268224-26268-4-git-send-email-stefan.tauner@student.tuwien.ac.at>
Download mbox | patch
Permalink /patch/3531/
State Accepted
Commit r1583
Headers show

Comments

Stefan Tauner - 2012-02-15 01:10:22
The AT25F512B is quite different from the other (older and yet
unsupported) chips in the AT25F* familiy, hence rename 512B-specific
stuff to make room for the generic AT25F* code

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
---
 at25.c        |    4 ++--
 chipdrivers.h |    4 ++--
 flashchips.c  |    5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)
Stefan Tauner - 2012-08-03 00:26:04
On Wed, 15 Feb 2012 02:10:22 +0100
Stefan Tauner <stefan.tauner@student.tuwien.ac.at> wrote:

> The AT25F512B is quite different from the other (older and yet
> unsupported) chips in the AT25F* familiy, hence rename 512B-specific
> stuff to make room for the generic AT25F* code

i'd like to get in the remaining patches of this set rather sooner than
later. imho they are pretty ready (i have at least added the voltage
fields while rebasing and incorporated your earlier comments iirc), but
maybe there are some small bits missing/wrong.
but what i really would like to know is if you agree on the naming and
code placement (especially spi_block_erase_62). if there is a general
agreement on that i can self-review the details. i cant remember what i
have done back then anyway :P
Stefan Tauner - 2012-08-26 21:06:14
Committed in r1583.

Patch

diff --git a/at25.c b/at25.c
index 817e769..803e7e4 100644
--- a/at25.c
+++ b/at25.c
@@ -86,7 +86,7 @@  int spi_prettyprint_status_register_at25df_sec(struct flashctx *flash)
 	return spi_prettyprint_status_register_at25df(flash);
 }
 
-int spi_prettyprint_status_register_at25f(struct flashctx *flash)
+int spi_prettyprint_status_register_at25f512b(struct flashctx *flash)
 {
 	uint8_t status;
 
@@ -202,7 +202,7 @@  int spi_disable_blockprotect_at25df_sec(struct flashctx *flash)
 	return spi_disable_blockprotect_at25df(flash);
 }
 
-int spi_disable_blockprotect_at25f(struct flashctx *flash)
+int spi_disable_blockprotect_at25f512b(struct flashctx *flash)
 {
 	/* spi_disable_blockprotect_at25df is not really the right way to do
 	 * this, but the side effects of said function work here as well.
diff --git a/chipdrivers.h b/chipdrivers.h
index b20030b..420564d 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -73,13 +73,13 @@  int spi_prettyprint_status_register_amic_a25lq032(struct flashctx *flash);
 /* at25.c */
 int spi_prettyprint_status_register_at25df(struct flashctx *flash);
 int spi_prettyprint_status_register_at25df_sec(struct flashctx *flash);
-int spi_prettyprint_status_register_at25f(struct flashctx *flash);
+int spi_prettyprint_status_register_at25f512b(struct flashctx *flash);
 int spi_prettyprint_status_register_at25fs010(struct flashctx *flash);
 int spi_prettyprint_status_register_at25fs040(struct flashctx *flash);
 int spi_prettyprint_status_register_atmel_at26df081a(struct flashctx *flash);
 int spi_disable_blockprotect_at25df(struct flashctx *flash);
 int spi_disable_blockprotect_at25df_sec(struct flashctx *flash);
-int spi_disable_blockprotect_at25f(struct flashctx *flash);
+int spi_disable_blockprotect_at25f512b(struct flashctx *flash);
 int spi_disable_blockprotect_at25fs010(struct flashctx *flash);
 int spi_disable_blockprotect_at25fs040(struct flashctx *flash);
 
diff --git a/flashchips.c b/flashchips.c
index ca1c57f..3656794 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -1657,6 +1657,7 @@  const struct flashchip flashchips[] = {
 		.model_id	= ATMEL_AT25F512B,
 		.total_size	= 64,
 		.page_size	= 256,
+		/* TODO: chip features 128-byte one-time programmable region */
 		.feature_bits	= FEATURE_WRSR_WREN,
 		.tested		= TEST_UNTESTED,
 		.probe		= probe_spi_rdid,
@@ -1680,8 +1681,8 @@  const struct flashchip flashchips[] = {
 				.block_erase = spi_block_erase_c7,
 			}
 		},
-		.printlock	= spi_prettyprint_status_register_at25f,
-		.unlock		= spi_disable_blockprotect_at25f,
+		.printlock	= spi_prettyprint_status_register_at25f512b,
+		.unlock		= spi_disable_blockprotect_at25f512b,
 		.write		= spi_chip_write_256,
 		.read		= spi_chip_read,
 		.voltage	= {2700, 3600},