Skip to content

Commit

Permalink
spi_dw minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
e-rk committed Apr 18, 2024
1 parent 5f6cc2e commit 24b2b2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ static int spi_dw_release(const struct device *dev,

void spi_dw_isr(const struct device *dev)
{
const struct spi_dw_config *info = dev->config;
uint32_t int_status;
int error;

Expand Down
6 changes: 6 additions & 0 deletions drivers/spi/spi_dw.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ static int reg_test_bit(uint8_t bit, mm_reg_t addr, uint32_t off)
#define DW_SPI_CTRLR0_SRL BIT(DW_SPI_CTRLR0_SRL_BIT)
#define DW_SPI_CTRLR0_SLV_OE BIT(DW_SPI_CTRLR0_SLV_OE_BIT)

#define DW_SPI_CTRLR0_TMOD_TX_RX (0)
#define DW_SPI_CTRLR0_TMOD_TX (1 << DW_SPI_CTRLR0_TMOD_SHIFT)
#define DW_SPI_CTRLR0_TMOD_RX (2 << DW_SPI_CTRLR0_TMOD_SHIFT)
#define DW_SPI_CTRLR0_TMOD_EEPROM (3 << DW_SPI_CTRLR0_TMOD_SHIFT)
#define DW_SPI_CTRLR0_TMOD_RESET (3 << DW_SPI_CTRLR0_TMOD_SHIFT)

#define DW_SPI_CTRLR0_DFS_16(__bpw) ((__bpw) - 1)
#define DW_SPI_CTRLR0_DFS_32(__bpw) (((__bpw) - 1) << 16)

Expand Down

0 comments on commit 24b2b2b

Please sign in to comment.