Commit Graph

760 Commits (ca80cd22f739b877385806e76878ba4a211b3b1e)

Author SHA1 Message Date
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Jarkko Paso 41b25d5007 S2-LP: Preamble configuration to follow Wi-SUN FAN specification 2019-11-19 12:10:51 +02: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
Martin Kojtal d556bf698f
Merge pull request #11821 from rajkan01/feature-baremetal-greentea-psa
Skip Bare Metal green tea test for PSA component
2019-11-12 11:07:16 +01:00
Martin Kojtal dd753abcb8
Merge pull request #11825 from rajkan01/feature-baremetal-greentea-storage
Bare metal green tea test for storage component
2019-11-12 11:01:29 +01:00
RAJKUMAR KANAGARAJ d8e2dd5b47 Incorporated the review comments 2019-11-08 09:50:09 -08:00
RAJKUMAR KANAGARAJ 829e90afc8 Incorporated review comments 2019-11-08 07:07:12 -08:00
Vikas Katariya f4a1945911 Add PSA auto-generated files to components
To support online compiler build for PSA targets, some files are
auto-generated (LPC55S69_NS and ARM_MUSCA_A1_NS) by the script
from offline build system. Since these files are identical for these
V8-M targets it would be good to check them in to support online
compiler as they are COMPONENT_SPE and services related.

In folder: components/TARGET_PSA/
  --TARGET_MBED_SPM
    --COMPONENT_SPE
      psa_setup.c
  --TARGET_TFM
    --COMPONENT_SPE
      --inc
	tfm_partition_defs.inc
        tfm_partition_list.inc
        tfm_service_list.inc
        tfm_spm_signal_defs.h
  --services
    --inc
      autogen_sid.h
      mbed_spm_partitions.h

Signed-off-by: Vikas Katariya <Vikas.Katariya@arm.com>
2019-11-08 14:57:06 +00: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
RAJKUMAR KANAGARAJ f30dd1cef2 Enable the Bare Metal green tea test
-PSA test framework uses the RTOS threads to run test cases so added MBED_CONF_RTOS_PRESENT to all the test cases.
2019-11-06 03:15:49 -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 02c722af42
Merge pull request #11620 from jainvikas8/ISSUE-11256
Fix enum type to align with psa-arch-tests
2019-10-22 09:42:13 +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
Martin Kojtal a0dfcfb18f
Merge pull request #11642 from jeromecoutant/PR_CELLULAR_FC
STMOD_CELLULAR: remove flow control support for DISCO_L4R9I
2019-10-16 14:24:55 +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
Martin Kojtal b54315ece2
Merge pull request #11623 from jeromecoutant/PR_CELLULAR_CTS
STMOD_CELLULAR: set CTS with PullDown
2019-10-15 13:07:46 +08: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
Jarkko Paso f8564cfadd S2-LP: sync with development repository 2019-10-14 09:07:10 +01: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