diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2014-06-12 00:04:32 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2014-06-12 00:04:32 +0000 |
commit | 6ad6e01e9b961fd5b25cc4d69319a7d29f110684 (patch) | |
tree | 5a7b62f60b10de6a9d9f4f862fdb9f1f8f500f3d /at45db.c | |
parent | a60d408a78be0e0d34dda616977489a307cb98b6 (diff) | |
download | flashrom-6ad6e01e9b961fd5b25cc4d69319a7d29f110684.tar.gz flashrom-6ad6e01e9b961fd5b25cc4d69319a7d29f110684.tar.bz2 flashrom-6ad6e01e9b961fd5b25cc4d69319a7d29f110684.zip |
Introduce helpers.c
Move some suitable functions there, add it to the Makefile, but leave the
declarations in flash.h for now.
Corresponding to flashrom svn r1819.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'at45db.c')
-rw-r--r-- | at45db.c | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -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 |