Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: platform/stm32f7xx/qspi.c

Issue 1410223011: [spiflash][bio][stm32f7] Fixed (sub)sector erase on spiflash device. (Closed) Base URL: git@github.com:travisg/lk.git@master
Patch Set: Subsector Address Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/bio/debug.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform/stm32f7xx/qspi.c
diff --git a/platform/stm32f7xx/qspi.c b/platform/stm32f7xx/qspi.c
index a67a3da50474a867435513d404e37e7c102d86b0..482be26e7a8cfa177d5243ce60e6249efed6973c 100644
--- a/platform/stm32f7xx/qspi.c
+++ b/platform/stm32f7xx/qspi.c
@@ -562,14 +562,20 @@ static ssize_t qspi_erase(bdev_t *device, uint32_t block_addr, uint32_t instruct
switch (instruction) {
case SUBSECTOR_ERASE_CMD: {
num_erased_bytes = N25QXXA_SUBSECTOR_SIZE;
- erase_cmd.AddressMode = get_address_size(block_addr);
+ erase_cmd.AddressSize = get_address_size(block_addr);
erase_cmd.Instruction = get_specialized_instruction(instruction, block_addr);
+ erase_cmd.AddressMode = QSPI_ADDRESS_1_LINE;
+ erase_cmd.Address = block_addr;
+
break;
}
case SECTOR_ERASE_CMD: {
num_erased_bytes = N25QXXA_SECTOR_SIZE;
- erase_cmd.AddressMode = get_address_size(block_addr);
+ erase_cmd.AddressSize = get_address_size(block_addr);
erase_cmd.Instruction = get_specialized_instruction(instruction, block_addr);
+ erase_cmd.AddressMode = QSPI_ADDRESS_1_LINE;
+ erase_cmd.Address = block_addr;
+
break;
}
case BULK_ERASE_CMD: {
@@ -585,8 +591,6 @@ static ssize_t qspi_erase(bdev_t *device, uint32_t block_addr, uint32_t instruct
}
erase_cmd.InstructionMode = QSPI_INSTRUCTION_1_LINE;
- erase_cmd.AddressSize = QSPI_ADDRESS_24_BITS;
- erase_cmd.Address = block_addr;
erase_cmd.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
erase_cmd.DataMode = QSPI_DATA_NONE;
erase_cmd.DummyCycles = 0;
« no previous file with comments | « lib/bio/debug.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698