Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/flash/nrf_qspi_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@
return qspi_get_zephyr_ret_code(res);
}

#if !IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)
/* RDSR. Negative value is error. */
static int qspi_rdsr(const struct device *dev, uint8_t sr_num)
{
Expand Down Expand Up @@ -525,6 +524,7 @@
return (rc < 0) ? rc : 0;
}

#if !IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)
static int qspi_wrsr(const struct device *dev, uint8_t sr_val, uint8_t sr_num)
{
int rc = 0;
Expand Down Expand Up @@ -657,7 +657,6 @@

static int configure_chip(const struct device *dev)
{
const struct qspi_nor_config *dev_config = dev->config;
int rc = 0;

/* Set QE to match transfer mode. If not using quad
Expand All @@ -668,6 +667,7 @@
* S2B1v1/4/5/6. Other options require more logic.
*/
#if !IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)
const struct qspi_nor_config *dev_config = dev->config;
nrf_qspi_prot_conf_t const *prot_if =
&dev_config->nrfx_cfg.prot_if;
bool qe_value = (prot_if->writeoc == NRF_QSPI_WRITEOC_PP4IO) ||
Expand All @@ -677,7 +677,7 @@
(prot_if->readoc == NRF_QSPI_READOC_READ2IO);
uint8_t sr_num = 0;
uint8_t qe_mask = 0;

Check notice on line 680 in drivers/flash/nrf_qspi_nor.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/flash/nrf_qspi_nor.c:680 - const struct qspi_nor_config *dev_config = dev->config; - nrf_qspi_prot_conf_t const *prot_if = - &dev_config->nrfx_cfg.prot_if; - bool qe_value = (prot_if->writeoc == NRF_QSPI_WRITEOC_PP4IO) || - (prot_if->writeoc == NRF_QSPI_WRITEOC_PP4O) || - (prot_if->readoc == NRF_QSPI_READOC_READ4IO) || - (prot_if->readoc == NRF_QSPI_READOC_READ4O) || - (prot_if->readoc == NRF_QSPI_READOC_READ2IO); - uint8_t sr_num = 0; - uint8_t qe_mask = 0; + const struct qspi_nor_config *dev_config = dev->config; + nrf_qspi_prot_conf_t const *prot_if = &dev_config->nrfx_cfg.prot_if; + bool qe_value = (prot_if->writeoc == NRF_QSPI_WRITEOC_PP4IO) || + (prot_if->writeoc == NRF_QSPI_WRITEOC_PP4O) || + (prot_if->readoc == NRF_QSPI_READOC_READ4IO) || + (prot_if->readoc == NRF_QSPI_READOC_READ4O) || + (prot_if->readoc == NRF_QSPI_READOC_READ2IO); + uint8_t sr_num = 0; + uint8_t qe_mask = 0;
#if IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_S1B6)
sr_num = 1;
qe_mask = BIT(6);
Expand Down
9 changes: 9 additions & 0 deletions tests/drivers/flash/common/boards/nrf52840dk_qer_none.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2025, Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

&mx25r64 {
quad-enable-requirements = "NONE";
};
7 changes: 7 additions & 0 deletions tests/drivers/flash/common/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ tests:
- CONFIG_TEST_DRIVER_FLASH_SIZE=8388608
integration_platforms:
- nrf52840dk/nrf52840
drivers.flash.common.nrf_qspi_nor.qer_none:
build_only: true
platform_allow: nrf52840dk/nrf52840
extra_args:
- DTC_OVERLAY_FILE=boards/nrf52840dk_qer_none.overlay
integration_platforms:
- nrf52840dk/nrf52840
drivers.flash.common.nrf_qspi_nor_4B_addr:
platform_allow: nrf52840dk/nrf52840
extra_configs:
Expand Down
Loading