aboutsummaryrefslogtreecommitdiff
path: root/libflash/test
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2016-07-28 17:15:32 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-02 18:12:49 +1000
commitc043065cf92358104e617b5c6aabbe619de76b0b (patch)
tree8f523164baeb14c937ae71f549ae5daa438a1b6c /libflash/test
parent17c22dbd6b011211a040dc2839d2e3e560fa0806 (diff)
downloadskiboot-c043065cf92358104e617b5c6aabbe619de76b0b.zip
skiboot-c043065cf92358104e617b5c6aabbe619de76b0b.tar.gz
skiboot-c043065cf92358104e617b5c6aabbe619de76b0b.tar.bz2
flash: Make size 64 bit safe
This makes the size of flash 64 bit safe so that we can have flash devices greater than 4GB. This is especially useful for mambo disks passed through to Linux. Fortunately the device tree interface and the linux device driver are 64bit safe so no changes are required there. Userspace gard and flash tools are also updated to ensure "make check" still passes. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash/test')
-rw-r--r--libflash/test/test-blocklevel.c4
-rw-r--r--libflash/test/test-flash.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/libflash/test/test-blocklevel.c b/libflash/test/test-blocklevel.c
index ef5d9b5..95669dc 100644
--- a/libflash/test/test-blocklevel.c
+++ b/libflash/test/test-blocklevel.c
@@ -171,8 +171,8 @@ int main(void)
for (i = 0; i < bl->ecc_prot.n_prot - 1; i++) {
if (bl->ecc_prot.prot[i].start + bl->ecc_prot.prot[i].len == bl->ecc_prot.prot[i + 1].start ||
bl->ecc_prot.prot[i + 1].start + bl->ecc_prot.prot[i + 1].len == bl->ecc_prot.prot[i].start) {
- ERR("Problem with protection range merge code, region starting at 0x%08x for 0x%08x appears "
- "to touch region 0x%08x for 0x%08x\n", bl->ecc_prot.prot[i].start, bl->ecc_prot.prot[i].len,
+ ERR("Problem with protection range merge code, region starting at 0x%08lx for 0x%08lx appears "
+ "to touch region 0x%lx for 0x%lx\n", bl->ecc_prot.prot[i].start, bl->ecc_prot.prot[i].len,
bl->ecc_prot.prot[i + 1].start, bl->ecc_prot.prot[i + 1].len);
return 1;
}
diff --git a/libflash/test/test-flash.c b/libflash/test/test-flash.c
index c93aef5..3f77d6f 100644
--- a/libflash/test/test-flash.c
+++ b/libflash/test/test-flash.c
@@ -367,7 +367,8 @@ struct spi_flash_ctrl sim_ctrl = {
int main(void)
{
struct blocklevel_device *bl;
- uint32_t total_size, erase_granule;
+ uint64_t total_size;
+ uint32_t erase_granule;
const char *name;
uint16_t *test;
struct ecc64 *ecc_test;