Commit Graph

201 Commits (76af152fe1851c37bb80c374918e822598350c4a)

Author SHA1 Message Date
Kevin Bracey c67816b5ff Adjust code for MbedCRC changes
* Make mbed_error use bitwise MbedCRC call rather than local
  implementation.
* Remove use of POLY_32BIT_REV_ANSI from LittleFS.
* Move some MbedCRC instances closer to use - construction cost is
  trivial, and visibility aids compiler optimisation.
2019-12-02 14:45:37 +02:00
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Martin Kojtal fd22997b60
Merge pull request #11559 from kjbracey-arm/crc
MbedCRC and CRC HAL revisions
2019-11-13 18:24:04 +01:00
Kevin Bracey 8811972201 Adjust code for MbedCRC changes
* Make mbed_error use bitwise MbedCRC call rather than local
  implementation.
* Remove use of POLY_32BIT_REV_ANSI from LittleFS.
* Move some MbedCRC instances closer to use - construction cost is
  trivial, and visibility aids compiler optimisation.
2019-11-13 14:31:49 +02:00
Kyle Kearney 96cfc7393d Disable attempted 4-byte addressing for some boards
4-byte addressing has been seen to cause failures on NORDIC
boards and with Macronix memories. Suppress the attempt to enable it
on that hardware (via vendor quirks and a target check) until either
the failure cause can be fixed or a more robust suppression mechanism
is implemented.
2019-11-12 12:26:26 -08:00
Kyle Kearney 2526b9fc00 QSPIF: Handle fast mode enable via vendor quirks
Use a vendor id check to only perform this enable on devices which define the
 second configuration register where the fast mode enable bit lives.
Change _enable_fast_mode to use the standard status register reading and writing functions
2019-11-12 12:26:26 -08:00
Kyle Kearney 02dbf68e17 QSPIF: Handle parts with extra config registers
Default to 2 status registers, but update this value if necessary
 during vendor quirk handling for parts (currently only Macronix)
 which have one status register and two control registers. For the
 purposes of QSPIFBlockDevice, these are all considered status
 (or at least "status-like") registers because they are all written
 via the Write Status Register instruction.
Set the custom RDCR instruction for Macronix during quirk handling.
Update reading and writing of status registers to handle a variable
 number of status registers.
2019-11-12 12:26:25 -08:00
Kyle Kearney eb5494e7a9 QSPIF: Centralize handling of vendor quirks
Introduce a separate function for handling alterations to device interaction
which are not covered by the SFDP tables and therefore require checking against
the vendor id.
2019-11-12 12:26:25 -08:00
Kyle Kearney 26314d96c5 Don't clear quad enable when clearing block protection
QSPIFBlockDevice::_clear_block_protection() has logic to retain the
WIP and WEL bits in status register 1, but it failed to account for
the situation where the QE bit is also in status register 1.
In _sfdp_set_quad_enabled, note the status register and bit therein
for the quad enable, so that _clear_block_protection can retain it.
2019-11-12 12:26:25 -08:00
Kyle Kearney d2ef56859c QSPIF: Add back enable_fast_mode
This function writes a "config" register to ensure that the flash part
is in high performance mode, not low-power mode. This is required at
by at least MX25R6435F in order to operate at frequencies > 33MHz
(for reference, DISCO_L475VG_IOT01A runs the QSPI interface at 80 MHz).
The config register that this writes does not appear to be covered by
the SFDP spec (JESD216D.01) so this remains the status quo of
unconditional execution, as has been done on master since #8352.
2019-11-12 12:26:25 -08:00
Kyle Kearney 60e4d14577 Fix Astyle issues 2019-11-12 12:26:25 -08:00
Matthew Macovsky 619c5d9e60 Remove redundant QSPI erase alignment 2019-11-12 12:26:25 -08:00
Matthew Macovsky 2154948791 Update QSPI format after enabling 4-byte addressing 2019-11-12 12:26:25 -08:00
Matthew Macovsky 19330da412 Correct typos and formatting 2019-11-12 12:26:25 -08:00
Matthew Macovsky 91141bb397 Add missing debug prints to command functions 2019-11-12 12:26:25 -08:00
Matthew Macovsky d330deef57 Streamline setting of instruction member variables 2019-11-12 12:26:25 -08:00
Matthew Macovsky 4f01392497 Replace power function with bit shift 2019-11-12 12:26:25 -08:00
Matthew Macovsky 8fd1a502f7 Update SDFP erase detection to properly handle legacy erase instruction 2019-11-12 12:26:25 -08:00
Matthew Macovsky ba412734e1 Move configuration of QSPI format to within commands where it is necessary 2019-11-12 12:26:24 -08:00
Matthew Macovsky 08a0b3daeb Clear block protection on non-SST flash devices 2019-11-12 12:26:24 -08:00
Matthew Macovsky cf9b6d565a Enable 4-byte addressing when supported in accordance with the SFDP standard 2019-11-12 12:26:24 -08:00
Matthew Macovsky 4785e83a31 Update flash device reset to conform to SFDP standard 2019-11-12 12:26:24 -08:00
Matthew Macovsky cd78bf9129 Reorder some functions 2019-11-12 12:26:24 -08:00
Matthew Macovsky e2b1ac0972 Update reading/writing of status registers to conform to SFDP standard 2019-11-12 12:26:24 -08:00
RAJKUMAR KANAGARAJ d8e2dd5b47 Incorporated the review comments 2019-11-08 09:50:09 -08:00
RAJKUMAR KANAGARAJ 8ecce14dad Skip Bare metal green tea test for storage related components or the components test cases which is based on RTOS 2019-11-06 04:49:19 -08:00
Seppo Takalo 21987dbefa Remove commented-out code 2019-11-04 16:13:33 +02:00
Seppo Takalo ccb77384f1 Remove linefeeds from debug prints 2019-11-04 16:13:33 +02:00
Seppo Takalo 168b51c415 Add storage related files to baseline unittest.
* Refactor some headers to use relative path from Mbed OS root.
* Refactor some data types to compile on 64bit machines.
* Refactor some debug traces to use mbed_trace.
2019-11-04 16:12:36 +02:00
Martin Kojtal fe12608226
Merge pull request #11444 from jeromecoutant/PR_QSPI_EXTERNAL
QSPI : Define default pins at drivers level
2019-10-21 15:19:08 +02:00
Martin Kojtal 7ba151af99
Merge pull request #11603 from kyle-cypress/pr/qspi-bd-format-error
Report errors returned by _qspi_configure_format
2019-10-18 16:05:49 +02:00
Martin Kojtal b6266b5c01
Merge pull request #11604 from kyle-cypress/pr/qspi-inst-type
Introduce qspi_inst_t type for QSPI instructions
2019-10-18 15:46:03 +02:00
toyowata 5389536953 Add bootloader support for Seeed Arch-MAX 2019-10-17 10:05:03 +09:00
Kyle Kearney 52332f9437 QSPIFBlockDevice: Fix incomplete propagation of qspi_inst_t 2019-10-16 15:31:12 -07:00
Martin Kojtal fa6e01a69f QSPIFBlockDevice: fix type on the namespace mbed 2019-10-16 15:31:12 -07:00
Matthew Macovsky b1916fc498 Introduce qspi_inst_t type for QSPI instructions
Encourage the usage of consistent types (there are currently
 a mix of `int` and `unsigned int` used for qspi instructions)
QSPI commands are limited to 8 bits, to this is a typdef to char
2019-10-16 15:31:11 -07:00
Martin Kojtal 58fe0ba7b0
Merge pull request #11636 from maciejbocianski/fix_EFM32GG11_STK3701_qspi_block_device_config
EFM32GG11_STK3701: add QSPIF component config
2019-10-16 19:12:59 +08:00
jeromecoutant f117d3518d QSPIF frequency setting depends on QSPI memory not target.
This makes new board with the same QSPI memory addition.
2019-10-15 17:36:50 +02:00
jeromecoutant 03837a75b7 QSPIF component should use defined QSPI pins 2019-10-15 17:36:49 +02:00
Kyle Kearney 52cb2c2cfc Avoid stale mutex in QSPIFBlockDevice::read
Update to follow the same `goto exit_point` pattern that is used
by the rest of the functions to avoid leaving the mutex locked
when errors are detected and require the function to abort.
2019-10-14 13:59:47 -07:00
Kyle Kearney 3f20b80859 Reuse existing error for _qspi_configure_format
Use QSPIF_BD_ERROR_DEVICE_ERROR instead of introducing a new error code.
Add tr_error calls whenever _qspi_configure_format fails to aid in debugging.
2019-10-11 14:28:25 -07:00
Kyle Kearney 726a73c048 Report errors returned by _qspi_configure_format
The function returns a qspi_status_t but most usages in QSPIFBlockDevice
assume that it always succeeds.
2019-10-11 14:28:13 -07:00
Anna Bridge 489c30f569
Merge pull request #11297 from kyle-cypress/pr/qspi-dummy-cycles
Differentiate alt and dummy cycles in QSPIF
2019-10-11 14:34:17 +01:00
Anna Bridge 7fb52d9300
Merge pull request #11567 from kyle-cypress/pr-dev/simplify-qspi-params
Simplicy QSPIF target overrides for PSoC6
2019-10-11 12:22:09 +01:00
Maciej Bocianski f6b9d26f4d EFM32GG11_STK3701: add QSPIF component config 2019-10-04 16:37:12 +02:00
Matthew Macovsky 6bba46e48f Differentiate alt and dummy cycles in QSPIF
Propagate separate alt cycle and dummy cycle counts from QSPIFBlockDevice
down to the qspi driver, so that drivers which handle the two separately have
enough information to do so.
2019-09-30 16:17:49 -07:00
Matthew Macovsky baf375f8cb Allow for arbitrary QSPI alt sizes
The QSPI spec allows alt to be any size that is a multiple of the
number of data lines. For example, Micron's N25Q128A uses only a
single alt cycle for all read modes (1, 2, or 4 bits depending on
how many data lines are in use).
2019-09-30 14:45:08 -07:00
Ben Cooke dd778c4126 Add MTS_DRAGONFLY_F413RH platform to mbed-os 2019-09-30 13:50:40 -05:00
Kyle Kearney ea7f6683e4 Simplicy QSPIF target overrides for PSoC6
All current PSoC 6 targets support the same QSPI frequency and minimum
program size. So specify a single entry rather than duplicating for
each device.
2019-09-25 14:53:54 -07:00
Veijo Pesonen 6e26b74fdb Adds missing include required by fixed-width format specifiers 2019-09-05 13:20:11 +03:00