Commit Graph

276 Commits (6baab6cd33c714bc892a54149837dac5de4a10b5)

Author SHA1 Message Date
Martin Kojtal 5539d65017
Merge pull request #12638 from tymoteuszblochmobica/testall
Enable storage tests to all targets
2020-04-03 09:00:18 +02:00
Tymoteusz Bloch 2ca832c673 Enable storage tests to all targets 2020-04-01 12:04:36 +02:00
Marcin Tomczyk 699a68968c [IOTSTOR-990] SPIFBlockDevice doesn't play nice on shared SPI bus. Back to use select and deselect, use correct spi constructor 2020-03-30 06:40:39 -07:00
Marcin Tomczyk 116a8a75b6 [IOTSTOR-990] SPIFBlockDevice doesn't play nice on shared SPI bus. Fix by use valid constructor SPI 2020-03-24 01:22:59 -07:00
Veijo Pesonen 2605ce629d QSPIFBlockDevice: removes dead code 2020-03-02 11:02:09 +02:00
Veijo Pesonen 7c692f5196 SPIFBlockDevice: Refactor vendor specific workarounds
To follow the same convention as with QSPIFBlockDevice there was need to
create a separate function for handling vendor specific workarounds.
2020-03-02 11:14:01 +02:00
Veijo Pesonen 98dbebb3ed SFDP: Refactor Sector Map Parameter Table parsing
Doxygen documentation was updated.

Code reorganized to make it more readable.

Moves SFDP specific bits out from Q/SPIFBlockDevices.
2020-03-02 11:07:03 +02:00
Veijo Pesonen 4f9fcf8df8 Bugfix: Concurrent SFDP header address init fixed
After switching from local variables to shared info structure JEDEC
Basic Flash Parameter Table and Sector Map Parameter Table addresses
and sizes must be protected by a mutex. Theoretically multiple calls
to Q/SPIFBlockDevice might occur.
2020-03-02 11:05:15 +02:00
Veijo Pesonen c84deff782 SFDP: consolidates check for addressability
Takes implementations found from SPIFBlockDevice and QSPIFBlockDevice
and makes those as part of the SFDP module.
2020-03-02 11:04:05 +02:00
Veijo Pesonen 2ce3bed910 SFDP: consolidates device density detection
Combines implementations found from SPIFBlockDevice and QSPIFBlockDevice
and makes it as part of the SFDP module.
2020-03-02 11:02:09 +02:00
Martin Kojtal 1f36b1cf09
Merge pull request #12450 from VeijoPesonen/sfdp_split_bptbl_2
SFDP: consolidation of SFDP parsing [3/n]
2020-02-27 17:08:14 +00:00
Stephan Brunner f67b8aa0eb
Fix initialization order for I2CEEBlockDevice 2020-02-26 18:18:22 +01:00
Veijo Pesonen ca704a4b3d SFDP: consolidates erase region search
Merges erase region search found from SPIFBlockDevice and
QSPIFBlockDevice. Moves the implementation within the SFDP
component
2020-02-26 12:41:34 +02:00
Martin Kojtal 732692cd77
Merge pull request #12475 from VeijoPesonen/purge_rspif
Proposal to remove SPIFReducedBlockDevice
2020-02-25 15:23:23 +00:00
Veijo Pesonen ca52ca9277 Q/SPIFBlockDevice: removes dead code 2020-02-25 16:12:18 +02:00
Martin Kojtal 1c12083949
Merge pull request #12426 from VeijoPesonen/sfdp_split_bptbl
SFDP: consolidation of SFDP parsing [2/n]
2020-02-25 13:57:23 +00:00
Veijo Pesonen b575df072f Removes RSPIF block device driver
The driver is not needed by the bootloader anymore.
2020-02-24 16:01:14 +02:00
Anna Bridge 8c17270306
Merge pull request #12480 from 0xc0170/fix_spdx
Fix SPDX identifiers and licenses (excluding features and targets)
2020-02-21 16:34:30 +00:00
Martin Kojtal a18259abb9
Merge pull request #12446 from boomer41/i2cee-add-eight-bit-address
Add Eight-Bit-Addressing mode to I2CEEBlockDevice.
2020-02-21 12:12:16 +00:00
Martin Kojtal c0ed178830 component storage: fix SPDX identifiers 2020-02-21 07:01:09 +00:00
Martin Kojtal ab76e0a59e component storage: fix SPDX identifiers 2020-02-21 07:01:04 +00:00
Veijo Pesonen d3b65d5e2b QSPIFBlockDevice: refactoring _sfdp_parse_basic_param_table 2020-02-20 09:46:40 +02:00
Veijo Pesonen 6a60574cf5 SFDP: consolidates sfdp_detect_erase_types_inst_and_size 2020-02-20 09:46:40 +02:00
Veijo Pesonen 2da963b8de Q/SPIFBlockDevice: unifies _sfdp_detect_erase_types_inst_and_size functions 2020-02-20 09:46:40 +02:00
Veijo Pesonen 7d1886ecae SFDP: consolidation of sfdp_detect_page_size 2020-02-20 09:46:40 +02:00
Veijo Pesonen 8a076d4b1f SPIFBlockDevice: refactoring usage of SFDP data 2020-02-20 09:46:40 +02:00
Veijo Pesonen 6d77d0d1f9 SPIFBlockDevice: Consolidates internal SFDP header information 2020-02-20 09:46:40 +02:00
Veijo Pesonen fe49c9ce16 Q/SPIF: Abstracts SFDP table reading functionality from device 2020-02-20 09:46:40 +02:00
Stephan Brunner 440fa4985b
Remove paging and sync from I2CEEBlockDevice::read(), as it is not needed 2020-02-19 18:23:46 +01:00
Martin Kojtal 829a3cded3
Merge pull request #12318 from VeijoPesonen/sfdp_split_smptbl
SFDP: Move Sector Map Parameter Table parsing under SFDP module
2020-02-19 15:49:40 +00:00
Stephan Brunner 4d0c3463a0
Fix Code style and reorder class members to get besser packing 2020-02-19 12:49:28 +01:00
Stephan Brunner 3741440b77
Fix typo and clarify documentation 2020-02-19 11:58:07 +01:00
Stephan Brunner 532f3786a0
Remove overcomplicated code from I2CEEBlockDevice 2020-02-18 19:13:50 +01:00
Stephan Brunner 7c589ae172
Fix astyle 2020-02-17 23:04:23 +01:00
Stephan Brunner 76a177fafa
Use pageSize-constant instead of hardcoded value 2020-02-17 21:25:47 +01:00
Stephan Brunner 267d8cc223
Preserve original size as it is modified inside the handler function.
The value is const reference bound inside do_paged and must not be
modified, it is used inside the paging loop.
2020-02-17 20:57:58 +01:00
Stephan Brunner e850984715
Correctly check return codes from bytewise write function of I2C. 2020-02-17 20:50:49 +01:00
Stephan Brunner 52aed22978 Refactor paged_handler to directly give the paged device address. 2020-02-17 20:49:43 +01:00
Stephan Brunner 8d1978e05c
I2CEEBlockDevice: Add paging to eight bit mode 2020-02-17 20:22:18 +01:00
Stephan Brunner cd34860bd0 Add Eight-Bit-Adressing mode to I2CEEBlockDevice.
When dealing with EEPROMs without a 16 bit adressing, the current
implementation does not work, as it writes a 16 bit address to the chip.
This may cause undefined behaviour.
This change adds a new constructor argument to enable this new eight-bit
mode. It defaults to false to not break existing code.
This constructor argument should actually never be necessary to manually
set, except when dealing with cheap devices.
2020-02-16 12:54:51 +01:00
Stephan Brunner d7f3fcc3d3
Add error check for _sync() in I2CEEBlockDevice::read 2020-02-10 10:31:41 +01:00
Stephan Brunner 97c00f1a22 Fix I2CEEBlockDevice read()
When reading a data block, the returned error codes from the I2C subsystem
are different from normal single byte operations. We have to verify that
the read-function for multiple bytes does return zero, because it
returns "readBytes != expectedLength".

Additionally, sync before trying to read from the eeprom as slow devices
may not yet be ready to return data, especially with low-priced ones
used with fast controllers.
2020-02-07 22:57:04 +01:00
Veijo Pesonen ba71b09902 astyle fixes 2020-02-07 09:52:12 +02:00
Veijo Pesonen 4f4ef6069e SFDP: Sector Map Parameter Table naming improvements 2020-02-07 09:52:12 +02:00
Veijo Pesonen f51600c089 SPIFBlockDevice: drops unnecessary wrapper function 2020-02-07 09:52:12 +02:00
Veijo Pesonen 57722666a1 SPIFBlockDevice: Consolidates SFDP info data
This far all SFDP Sector Map Table related data has been found in small
pieces inside SPIFBlockDevice. Purpose was to consolidate the data
under one SFDP structure where all the information gathered from
SFDP tables is stored.

More generic version of a function used for parsing a Sector Map Table
was taken into use to avoid duplicate code. The implementation taken
into use is the one which got split from QSPIFBlockDevice and resides
now under the SFDP module.
2020-02-07 09:52:11 +02:00
Veijo Pesonen 83c0fdf19f QSPIFBlockDevice: Sector Map Table parsing moved under SFDP 2020-02-07 09:52:11 +02:00
Veijo Pesonen 7518a35da3 SFDP: data structures got refactored 2020-02-07 09:52:11 +02:00
Veijo Pesonen 6108f384fb QSPIFBlockDevice: Consolidates SFDP info data
This far all SFDP Sector Map Table related data has been found in small
pieces inside QSPIFBlockDevice. Purpose was to consolidate the data
under one SFDP structure where all the information gathered from
SFDP tables is stored.

Parsing a Sector Map Table was made more generic so that later it can be
moved under SFDP module. Once that is done it can be shared with
SPIFBlockDevice to avoid code duplication.
2020-02-07 09:52:11 +02:00
Veijo Pesonen cba5bfc790 QSPIFBlockDevice: Reads Sector Map Table by using a SFDP Reader cb 2020-02-07 09:52:11 +02:00