summaryrefslogtreecommitdiff
path: root/package/boot/uboot-lantiq/patches/0006-sf-add-support-for-4-byte-addressing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/boot/uboot-lantiq/patches/0006-sf-add-support-for-4-byte-addressing.patch')
-rw-r--r--package/boot/uboot-lantiq/patches/0006-sf-add-support-for-4-byte-addressing.patch27
1 files changed, 9 insertions, 18 deletions
diff --git a/package/boot/uboot-lantiq/patches/0006-sf-add-support-for-4-byte-addressing.patch b/package/boot/uboot-lantiq/patches/0006-sf-add-support-for-4-byte-addressing.patch
index f386eee..b903114 100644
--- a/package/boot/uboot-lantiq/patches/0006-sf-add-support-for-4-byte-addressing.patch
+++ b/package/boot/uboot-lantiq/patches/0006-sf-add-support-for-4-byte-addressing.patch
@@ -5,8 +5,6 @@ Subject: sf: add support for 4-byte addressing
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
-index 732ddf8..c5e8eb1 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -38,12 +38,14 @@
@@ -30,11 +28,9 @@ index 732ddf8..c5e8eb1 100644
/* Common status */
#define STATUS_WIP 0x01
-diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
-index 207adf5..1d072f8 100644
--- a/drivers/mtd/spi/sf_ops.c
+++ b/drivers/mtd/spi/sf_ops.c
-@@ -21,6 +21,7 @@ static void spi_flash_addr(const struct spi_flash *flash, u32 addr, u8 *cmd)
+@@ -21,6 +21,7 @@ static void spi_flash_addr(const struct
cmd[1] = addr >> (flash->addr_width * 8 - 8);
cmd[2] = addr >> (flash->addr_width * 8 - 16);
cmd[3] = addr >> (flash->addr_width * 8 - 24);
@@ -42,7 +38,7 @@ index 207adf5..1d072f8 100644
}
static int spi_flash_cmdsz(const struct spi_flash *flash)
-@@ -163,7 +164,7 @@ int spi_flash_write_common(struct spi_flash *flash, const u8 *cmd,
+@@ -163,7 +164,7 @@ int spi_flash_write_common(struct spi_fl
int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len)
{
u32 erase_size;
@@ -51,7 +47,7 @@ index 207adf5..1d072f8 100644
int ret = -1;
erase_size = flash->erase_size;
-@@ -188,8 +189,8 @@ int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len)
+@@ -188,8 +189,8 @@ int spi_flash_cmd_erase_ops(struct spi_f
spi_flash_addr(flash, offset, cmd);
cmd_len = spi_flash_cmdsz(flash);
@@ -62,7 +58,7 @@ index 207adf5..1d072f8 100644
ret = spi_flash_write_common(flash, cmd, cmd_len, NULL, 0);
if (ret < 0) {
-@@ -212,7 +213,7 @@ int spi_flash_cmd_write_ops(struct spi_flash *flash, u32 offset,
+@@ -212,7 +213,7 @@ int spi_flash_cmd_write_ops(struct spi_f
{
unsigned long byte_addr, page_size;
size_t chunk_len, actual;
@@ -71,7 +67,7 @@ index 207adf5..1d072f8 100644
int ret = -1;
ret = spi_claim_bus(flash->spi);
-@@ -239,8 +240,8 @@ int spi_flash_cmd_write_ops(struct spi_flash *flash, u32 offset,
+@@ -239,8 +240,8 @@ int spi_flash_cmd_write_ops(struct spi_f
spi_flash_addr(flash, offset, cmd);
cmd_len = spi_flash_cmdsz(flash);
@@ -82,7 +78,7 @@ index 207adf5..1d072f8 100644
ret = spi_flash_write_common(flash, cmd, cmd_len,
buf + actual, chunk_len);
-@@ -276,9 +277,13 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,
+@@ -276,9 +277,13 @@ int spi_flash_read_common(struct spi_fla
int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset,
size_t len, void *data)
{
@@ -98,7 +94,7 @@ index 207adf5..1d072f8 100644
ret = spi_claim_bus(flash->spi);
if (ret) {
-@@ -305,12 +310,15 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset,
+@@ -305,12 +310,15 @@ int spi_flash_cmd_read_ops(struct spi_fl
debug("SF: fail to set bank%d\n", bank_sel);
goto done;
}
@@ -115,11 +111,9 @@ index 207adf5..1d072f8 100644
spi_flash_addr(flash, offset, cmd);
cmd_len = spi_flash_cmdsz(flash);
-diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
-index 84289db..ac44287 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
-@@ -153,6 +153,25 @@ static const struct spi_flash_params spi_flash_params_table[] = {
+@@ -153,6 +153,25 @@ static const struct spi_flash_params spi
*/
};
@@ -145,7 +139,7 @@ index 84289db..ac44287 100644
static int spi_flash_validate_params(struct spi_flash *flash,
u8 *idcode)
{
-@@ -218,8 +237,18 @@ static int spi_flash_validate_params(struct spi_flash *flash,
+@@ -218,8 +237,18 @@ static int spi_flash_validate_params(str
flash->poll_cmd = CMD_FLAG_STATUS;
#endif
@@ -164,6 +158,3 @@ index 84289db..ac44287 100644
/* Configure the BAR - discover bank cmds and read current bank */
#ifdef CONFIG_SPI_FLASH_BAR
---
-1.8.3.2
-