Skip to content

Commit

Permalink
Revert "[nrf noup] drivers: spi_dw: add custom EXMIF peripheral handl…
Browse files Browse the repository at this point in the history
…ing"

This reverts commit f68b2ed.

Signed-off-by: Andrzej Głąbek <[email protected]>
  • Loading branch information
anangl authored and jukkar committed Dec 16, 2024
1 parent 0f83f86 commit 9a11615
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
21 changes: 1 addition & 20 deletions drivers/spi/spi_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ LOG_MODULE_REGISTER(spi_dw);
#include <zephyr/drivers/pinctrl.h>
#endif

#ifdef CONFIG_HAS_NRFX
#include <nrfx.h>
#endif

static inline bool spi_dw_is_slave(struct spi_dw_data *spi)
{
return (IS_ENABLED(CONFIG_SPI_SLAVE) &&
Expand Down Expand Up @@ -262,7 +258,6 @@ static int spi_dw_configure(const struct device *dev,
/* Baud rate and Slave select, for master only */
write_baudr(dev, SPI_DW_CLK_DIVIDER(info->clock_frequency,
config->frequency));
write_ser(dev, BIT(config->slave));
}

if (spi_dw_is_slave(spi)) {
Expand Down Expand Up @@ -505,10 +500,6 @@ void spi_dw_isr(const struct device *dev)
uint32_t int_status;
int error;

#ifdef CONFIG_HAS_NRFX
NRF_EXMIF->EVENTS_CORE = 0;
#endif

int_status = read_isr(dev);

LOG_DBG("SPI %p int_status 0x%x - (tx: %d, rx: %d)", dev, int_status,
Expand Down Expand Up @@ -557,11 +548,6 @@ int spi_dw_init(const struct device *dev)

DEVICE_MMIO_MAP(dev, K_MEM_CACHE_NONE);

#ifdef CONFIG_HAS_NRFX
NRF_EXMIF->INTENSET = BIT(0);
NRF_EXMIF->TASKS_START = 1;
#endif

info->config_func();

/* Masking interrupt and making sure controller is disabled */
Expand All @@ -580,11 +566,6 @@ int spi_dw_init(const struct device *dev)
return 0;
}

#define REG_ADDR(inst) \
COND_CODE_1(DT_NODE_HAS_COMPAT(DT_DRV_INST(inst), nordic_nrf_exmif), \
(Z_DEVICE_MMIO_NAMED_ROM_INITIALIZER(core, DT_DRV_INST(inst))), \
(DEVICE_MMIO_ROM_INIT(DT_DRV_INST(inst))))

#define SPI_CFG_IRQS_SINGLE_ERR_LINE(inst) \
IRQ_CONNECT(DT_INST_IRQ_BY_NAME(inst, rx_avail, irq), \
DT_INST_IRQ_BY_NAME(inst, rx_avail, priority), \
Expand Down Expand Up @@ -657,7 +638,7 @@ COND_CODE_1(IS_EQ(DT_NUM_IRQS(DT_DRV_INST(inst)), 1), \
SPI_CONTEXT_CS_GPIOS_INITIALIZE(DT_DRV_INST(inst), ctx) \
}; \
static const struct spi_dw_config spi_dw_config_##inst = { \
REG_ADDR(inst), \
DEVICE_MMIO_ROM_INIT(DT_DRV_INST(inst)), \
.clock_frequency = COND_CODE_1( \
DT_NODE_HAS_PROP(DT_INST_PHANDLE(inst, clocks), clock_frequency), \
(DT_INST_PROP_BY_PHANDLE(inst, clocks, clock_frequency)), \
Expand Down
2 changes: 1 addition & 1 deletion dts/common/nordic/nrf54h20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
};

exmif: spi@95000 {
compatible = "nordic,nrf-exmif", "snps,designware-spi";
compatible = "nordic,nrf-exmif";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x95000 0x500 0x95500 0xb00>;
Expand Down

0 comments on commit 9a11615

Please sign in to comment.