diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2017-02-08 23:53:44 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-02-08 15:07:59 -0800 |
commit | ccc38234fdc70120be79e7fb2df5c27ca5cd4c8a (patch) | |
tree | 475e969045afe56f802d0fb1205edb662fa536c8 /drivers/mtd/devices/bcm47xxsflash.h | |
parent | 9c8d7ff32a0aa001ac8506180e1662ecdf927f32 (diff) |
mtd: bcm47xxsflash: support reading flash out of mapping window
For reading flash content we use MMIO but it's possible to read only
first 16 MiB this way. It's simply an arch design/limitation.
To support flash sizes bigger than 16 MiB implement indirect access
using ChipCommon registers.
This has been tested using MX25L25635F.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices/bcm47xxsflash.h')
-rw-r--r-- | drivers/mtd/devices/bcm47xxsflash.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/devices/bcm47xxsflash.h b/drivers/mtd/devices/bcm47xxsflash.h index 1564b62b412e..b2d7b38f75fd 100644 --- a/drivers/mtd/devices/bcm47xxsflash.h +++ b/drivers/mtd/devices/bcm47xxsflash.h @@ -3,6 +3,8 @@ #include <linux/mtd/mtd.h> +#define BCM47XXSFLASH_WINDOW_SZ SZ_16M + /* Used for ST flashes only. */ #define OPCODE_ST_WREN 0x0006 /* Write Enable */ #define OPCODE_ST_WRDIS 0x0004 /* Write Disable */ @@ -16,6 +18,7 @@ #define OPCODE_ST_RES 0x03ab /* Read Electronic Signature */ #define OPCODE_ST_CSA 0x1000 /* Keep chip select asserted */ #define OPCODE_ST_SSE 0x0220 /* Sub-sector Erase */ +#define OPCODE_ST_READ4B 0x6313 /* Read Data Bytes in 4Byte addressing mode */ /* Used for Atmel flashes only. */ #define OPCODE_AT_READ 0x07e8 |