diff options
author | Christian Eggers <ceggers@arri.de> | 2020-01-27 08:41:15 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-01-27 14:01:34 +0100 |
commit | 9423e5b3208b372fd77987ed0cd04082c615b14f (patch) | |
tree | 3b98b71b72e0d347212131cefe5f1849891942c3 /drivers/eeprom | |
parent | 960352f2dab113b92e88958722e80477abc49191 (diff) | |
download | barebox-9423e5b3208b372fd77987ed0cd04082c615b14f.tar.gz |
eeprom: at25: Allow page sizes greater than 16 bit
For FRAM devices the page size is usually equal to the device size. Some
available devices are greater than 64kB, so a 32 bit variable must be
used.
The same change has to be done for the Linux driver. I'll try to
upstream this as soon as possible.
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/eeprom')
-rw-r--r-- | drivers/eeprom/at25.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/eeprom/at25.c b/drivers/eeprom/at25.c index 1c9ef12321..56168c216d 100644 --- a/drivers/eeprom/at25.c +++ b/drivers/eeprom/at25.c @@ -259,7 +259,7 @@ static int at25_np_to_chip(struct device_d *dev, if (of_property_read_u32(np, "pagesize", &val) == 0 || of_property_read_u32(np, "at25,page-size", &val) == 0) { - chip->page_size = (u16)val; + chip->page_size = val; } else { dev_err(dev, "Error: missing \"pagesize\" property\n"); return -ENODEV; |