summaryrefslogtreecommitdiff
path: root/at45db.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-06-12 00:04:32 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-06-12 00:04:32 +0000
commite787080fbf5593ea03e9d001e2b0399c83a22b33 (patch)
tree5a7b62f60b10de6a9d9f4f862fdb9f1f8f500f3d /at45db.c
parent707515824ec7cf05088e9382975e43a678933153 (diff)
downloadflashrom-e787080fbf5593ea03e9d001e2b0399c83a22b33.tar.gz
Introduce helpers.c.
Move some suitable functions there, add it to the Makefile, but leave the declarations in flash.h for now. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1819 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'at45db.c')
-rw-r--r--at45db.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/at45db.c b/at45db.c
index 41fc497..5396d7f 100644
--- a/at45db.c
+++ b/at45db.c
@@ -215,17 +215,6 @@ int probe_spi_at45db(struct flashctx *flash)
return 1;
}
-/* Returns the minimum number of bits needed to represent the given address.
- * FIXME: use mind-blowing implementation.
- * FIXME: move to utility module. */
-static uint32_t address_to_bits(uint32_t addr)
-{
- unsigned int lzb = 0;
- while (((1 << (31 - lzb)) & ~addr) != 0)
- lzb++;
- return 32 - lzb;
-}
-
/* In case of non-power-of-two page sizes we need to convert the address flashrom uses to the address the
* DataFlash chips use. The latter uses a segmented address space where the page address is encoded in the
* more significant bits and the offset within the page is encoded in the less significant bits. The exact