zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of: DT_NODE_HAS_STATUS(<node_id>, okay) to DT_NODE_HAS_STATUS_OKAY(<node_id>) Signed-off-by: Yong Cong Sin <ycsin@meta.com> Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
parent
5aebd1276d
commit
52a202309b
180 changed files with 743 additions and 738 deletions
|
@ -743,7 +743,7 @@ static inline bool z_arm_is_pc_valid(uintptr_t pc)
|
|||
return true;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_itcm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm))
|
||||
/* Is it in the ITCM */
|
||||
if ((((uintptr_t)&__itcm_start) <= pc) && (pc < ((uintptr_t)&__itcm_end))) {
|
||||
return true;
|
||||
|
|
|
@ -40,7 +40,7 @@ static void arm_musca_b1_pinmux_defaults(void)
|
|||
scc[IOMUX_ALTF1_OUTSEL] = 0xffff;
|
||||
scc[IOMUX_ALTF1_OENSEL] = 0xffff;
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0))
|
||||
/* clear bit 0/1 for GPIO0/1 to steer from ALTF1 */
|
||||
scc[IOMUX_MAIN_INSEL] &= ~(BIT(0) | BIT(1));
|
||||
scc[IOMUX_MAIN_OUTSEL] &= ~(BIT(0) | BIT(1));
|
||||
|
|
|
@ -40,7 +40,7 @@ static void arm_musca_s1_pinmux_defaults(void)
|
|||
scc[IOMUX_ALTF1_OUTSEL] = 0xffff;
|
||||
scc[IOMUX_ALTF1_OENSEL] = 0xffff;
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0))
|
||||
/* clear bit 0/1 for GPIO0/1 to steer from ALTF1 */
|
||||
scc[IOMUX_MAIN_INSEL] &= ~(BIT(0) | BIT(1));
|
||||
scc[IOMUX_MAIN_OUTSEL] &= ~(BIT(0) | BIT(1));
|
||||
|
|
|
@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(board, CONFIG_LOG_DEFAULT_LEVEL);
|
|||
|
||||
#define DAPLINK_QSPI_MUX_NODE DT_NODELABEL(daplink_qspi_mux)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DAPLINK_QSPI_MUX_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DAPLINK_QSPI_MUX_NODE)
|
||||
int board_daplink_qspi_mux_select(enum board_daplink_qspi_mux_mode mode)
|
||||
{
|
||||
struct gpio_dt_spec mux = GPIO_DT_SPEC_GET(DAPLINK_QSPI_MUX_NODE, mux_gpios);
|
||||
|
@ -77,4 +77,4 @@ static int board_init(void)
|
|||
}
|
||||
|
||||
SYS_INIT(board_init, POST_KERNEL, CONFIG_BOARD_INIT_PRIORITY);
|
||||
#endif /* DT_NODE_HAS_STATUS(DAPLINK_QSPI_MUX_NODE, okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DAPLINK_QSPI_MUX_NODE) */
|
||||
|
|
|
@ -32,7 +32,7 @@ LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_NRF9160DK_LOG_LEVEL);
|
|||
GET_PORT(reset_input, gpios, 0) == 0 && \
|
||||
GET_PIN(reset_input, gpios, 0) == 18)
|
||||
#define USE_RESET_GPIO \
|
||||
(DT_NODE_HAS_STATUS(DT_NODELABEL(reset_input), okay) && \
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(reset_input)) && \
|
||||
!RESET_INPUT_IS_PINRESET)
|
||||
|
||||
struct switch_cfg {
|
||||
|
@ -47,7 +47,7 @@ struct switch_cfg {
|
|||
#endif
|
||||
};
|
||||
|
||||
#define ROUTING_ENABLED(_name) DT_NODE_HAS_STATUS(DT_NODELABEL(_name), okay)
|
||||
#define ROUTING_ENABLED(_name) DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(_name))
|
||||
#define SWITCH_CFG(_name, _idx) \
|
||||
{ \
|
||||
.gpio = GET_DEV(_name, control_gpios, _idx), \
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define RESET_NODE DT_NODELABEL(nrf52840_reset)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(RESET_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(RESET_NODE)
|
||||
|
||||
#define RESET_GPIO_CTRL DT_GPIO_CTLR(RESET_NODE, gpios)
|
||||
#define RESET_GPIO_PIN DT_GPIO_PIN(RESET_NODE, gpios)
|
||||
|
@ -65,4 +65,4 @@ int bt_hci_transport_setup(const struct device *h4)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(RESET_NODE, okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(RESET_NODE) */
|
||||
|
|
|
@ -66,52 +66,52 @@ static int frdm_mcxa156_init(void)
|
|||
CLOCK_SetClockDiv(kCLOCK_DivAHBCLK, 1U); /* !< Set AHBCLKDIV divider to value 1 */
|
||||
CLOCK_SetClockDiv(kCLOCK_DivFRO_HF_DIV, 1U); /* !< Set FROHFDIV divider to value 1 */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(porta), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(porta))
|
||||
RESET_ReleasePeripheralReset(kPORT0_RST_SHIFT_RSTn);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(portb), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portb))
|
||||
RESET_ReleasePeripheralReset(kPORT1_RST_SHIFT_RSTn);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(portc), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portc))
|
||||
RESET_ReleasePeripheralReset(kPORT2_RST_SHIFT_RSTn);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(portd), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portd))
|
||||
RESET_ReleasePeripheralReset(kPORT3_RST_SHIFT_RSTn);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(porte), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(porte))
|
||||
RESET_ReleasePeripheralReset(kPORT4_RST_SHIFT_RSTn);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0))
|
||||
RESET_ReleasePeripheralReset(kGPIO0_RST_SHIFT_RSTn);
|
||||
CLOCK_EnableClock(kCLOCK_GateGPIO0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
RESET_ReleasePeripheralReset(kGPIO1_RST_SHIFT_RSTn);
|
||||
CLOCK_EnableClock(kCLOCK_GateGPIO1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2))
|
||||
RESET_ReleasePeripheralReset(kGPIO2_RST_SHIFT_RSTn);
|
||||
CLOCK_EnableClock(kCLOCK_GateGPIO2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3))
|
||||
RESET_ReleasePeripheralReset(kGPIO3_RST_SHIFT_RSTn);
|
||||
CLOCK_EnableClock(kCLOCK_GateGPIO3);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4))
|
||||
RESET_ReleasePeripheralReset(kGPIO4_RST_SHIFT_RSTn);
|
||||
CLOCK_EnableClock(kCLOCK_GateGPIO4);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0))
|
||||
CLOCK_SetClockDiv(kCLOCK_DivLPUART0, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_LPUART0);
|
||||
#endif
|
||||
|
|
|
@ -88,84 +88,84 @@ static int frdm_mcxn236_init(void)
|
|||
/* Set AHBCLKDIV divider to value 1 */
|
||||
CLOCK_SetClkDiv(kCLOCK_DivAhbClk, 1U);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm1))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom1Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm2))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom2Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm3))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom3Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM3);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm4))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm5), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm5))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom5Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM5);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(os_timer), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(os_timer))
|
||||
CLOCK_AttachClk(kCLK_1M_to_OSTIMER);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio3);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio4);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio5))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio5);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(wwdt0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivWdt0Clk, 1u);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer1))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer1Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer2))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer2Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer3))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer3Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER3);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer4))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer4Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER4);
|
||||
#endif
|
||||
|
|
|
@ -127,7 +127,7 @@ static int frdm_mcxn947_init(void)
|
|||
|
||||
CLOCK_SetupExtClocking(BOARD_XTAL0_CLK_HZ);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcan0))
|
||||
/* Set up PLL1 for 80 MHz FlexCAN clock */
|
||||
const pll_setup_t pll1Setup = {
|
||||
.pllctrl = SCG_SPLLCTRL_SOURCE(1U) | SCG_SPLLCTRL_SELI(27U) |
|
||||
|
@ -146,50 +146,50 @@ static int frdm_mcxn947_init(void)
|
|||
CLOCK_SetClkDiv(kCLOCK_DivPLL1Clk0, 1U);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm1))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom1Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm2))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom2Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm4))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(os_timer), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(os_timer))
|
||||
CLOCK_AttachClk(kCLK_1M_to_OSTIMER);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio3);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio4);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio5))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio5);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dac0))
|
||||
SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlDac0);
|
||||
CLOCK_SetClkDiv(kCLOCK_DivDac0Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO_HF_to_DAC0);
|
||||
|
@ -197,7 +197,7 @@ static int frdm_mcxn947_init(void)
|
|||
CLOCK_EnableClock(kCLOCK_Dac0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dac1))
|
||||
SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlDac1);
|
||||
CLOCK_SetClkDiv(kCLOCK_DivDac1Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO_HF_to_DAC1);
|
||||
|
@ -205,7 +205,7 @@ static int frdm_mcxn947_init(void)
|
|||
CLOCK_EnableClock(kCLOCK_Dac1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet))
|
||||
CLOCK_AttachClk(kNONE_to_ENETRMII);
|
||||
CLOCK_EnableClock(kCLOCK_Enet);
|
||||
SYSCON0->PRESETCTRL2 = SYSCON_PRESETCTRL2_ENET_RST_MASK;
|
||||
|
@ -214,41 +214,41 @@ static int frdm_mcxn947_init(void)
|
|||
SYSCON->ENET_PHY_INTF_SEL = SYSCON_ENET_PHY_INTF_SEL_PHY_SEL(1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(wwdt0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivWdt0Clk, 1u);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer1))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer1Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer2))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer2Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer3))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer3Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER3);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer4))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCtimer4Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL0_to_CTIMER4);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcan0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexcan0Clk, 1U);
|
||||
CLOCK_AttachClk(kPLL1_CLK0_to_FLEXCAN0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivUSdhcClk, 1u);
|
||||
CLOCK_AttachClk(kFRO_HF_to_USDHC);
|
||||
#endif
|
||||
|
@ -260,17 +260,17 @@ static int frdm_mcxn947_init(void)
|
|||
enable_cache64();
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(vref), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(vref))
|
||||
CLOCK_EnableClock(kCLOCK_Vref);
|
||||
SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlVref);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpadc0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpadc0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivAdc0Clk, 1U);
|
||||
CLOCK_AttachClk(kFRO_HF_to_ADC0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && CONFIG_USB_DC_NXP_EHCI
|
||||
usb_phy_config_struct_t usbPhyConfig = {
|
||||
BOARD_USB_PHY_D_CAL, BOARD_USB_PHY_TXCAL45DP, BOARD_USB_PHY_TXCAL45DM,
|
||||
};
|
||||
|
@ -312,13 +312,13 @@ static int frdm_mcxn947_init(void)
|
|||
USB_EhciPhyInit(kUSB_ControllerEhci0, BOARD_XTAL0_CLK_HZ, &usbPhyConfig);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpcmp0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpcmp0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCmp0FClk, 1U);
|
||||
CLOCK_AttachClk(kFRO12M_to_CMP0F);
|
||||
SPC_EnableActiveModeAnalogModules(SPC0, (kSPC_controlCmp0 | kSPC_controlCmp0Dac));
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lptmr0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lptmr0))
|
||||
|
||||
/*
|
||||
* Clock Select Decides what input source the lptmr will clock from
|
||||
|
@ -340,9 +340,9 @@ static int frdm_mcxn947_init(void)
|
|||
CLOCK_SetupClockCtrl(kCLOCK_CLKIN_ENA_FM_USBH_LPT);
|
||||
#endif /* DT_PROP(DT_NODELABEL(lptmr0), clk_source) */
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(lptmr0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lptmr0)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexio0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivFlexioClk, 1u);
|
||||
CLOCK_AttachClk(kPLL0_to_FLEXIO);
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,7 @@ static int efr32mg_sltb004a_init(void)
|
|||
|
||||
#define CCS811 DT_NODELABEL(ccs811)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(CCS811, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(CCS811)
|
||||
cfg = (struct supply_cfg){
|
||||
.gpio = DEVICE_DT_GET(DT_GPIO_CTLR(CCS811, supply_gpios)),
|
||||
.pin = DT_GPIO_PIN(CCS811, supply_gpios),
|
||||
|
|
|
@ -41,9 +41,9 @@ LOG_MODULE_REGISTER(adc_gd32, CONFIG_ADC_LOG_LEVEL);
|
|||
#define ADC1_NODE DT_NODELABEL(adc1)
|
||||
#define ADC2_NODE DT_NODELABEL(adc2)
|
||||
|
||||
#define ADC0_ENABLE DT_NODE_HAS_STATUS(ADC0_NODE, okay)
|
||||
#define ADC1_ENABLE DT_NODE_HAS_STATUS(ADC1_NODE, okay)
|
||||
#define ADC2_ENABLE DT_NODE_HAS_STATUS(ADC2_NODE, okay)
|
||||
#define ADC0_ENABLE DT_NODE_HAS_STATUS_OKAY(ADC0_NODE)
|
||||
#define ADC1_ENABLE DT_NODE_HAS_STATUS_OKAY(ADC1_NODE)
|
||||
#define ADC2_ENABLE DT_NODE_HAS_STATUS_OKAY(ADC2_NODE)
|
||||
|
||||
#ifndef ADC0
|
||||
/**
|
||||
|
|
|
@ -686,7 +686,7 @@ static const struct _dmic_ops dmic_ops = {
|
|||
|
||||
/* Gets pointer for a given PDM channel node */
|
||||
#define PDM_DMIC_CHAN_GET(pdm_node) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(pdm_node, okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(pdm_node), \
|
||||
(&pdm_channel_##pdm_node), (NULL)),
|
||||
|
||||
/* Gets array of pointers to PDM channels */
|
||||
|
|
|
@ -43,7 +43,7 @@ struct clock_control_gd32_config {
|
|||
#if DT_HAS_COMPAT_STATUS_OKAY(gd_gd32_timer)
|
||||
/* timer identifiers */
|
||||
#define TIMER_ID_OR_NONE(nodelabel) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(nodelabel), okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(nodelabel)), \
|
||||
(DT_CLOCKS_CELL(DT_NODELABEL(nodelabel), id),), ())
|
||||
|
||||
static const uint16_t timer_ids[] = {
|
||||
|
|
|
@ -18,111 +18,111 @@
|
|||
|
||||
/* Enumeration of enabled in device tree Clock, uses for indexing clock info table */
|
||||
enum {
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo))
|
||||
INFINEON_CAT1_CLOCK_IMO,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho))
|
||||
INFINEON_CAT1_CLOCK_IHO,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux0))
|
||||
INFINEON_CAT1_CLOCK_PATHMUX0,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux1))
|
||||
INFINEON_CAT1_CLOCK_PATHMUX1,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux2))
|
||||
INFINEON_CAT1_CLOCK_PATHMUX2,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux3))
|
||||
INFINEON_CAT1_CLOCK_PATHMUX3,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux4))
|
||||
INFINEON_CAT1_CLOCK_PATHMUX4,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf0))
|
||||
INFINEON_CAT1_CLOCK_HF0,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf1))
|
||||
INFINEON_CAT1_CLOCK_HF1,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf2))
|
||||
INFINEON_CAT1_CLOCK_HF2,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf3))
|
||||
INFINEON_CAT1_CLOCK_HF3,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf4))
|
||||
INFINEON_CAT1_CLOCK_HF4,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf5), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf5))
|
||||
INFINEON_CAT1_CLOCK_HF5,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf6), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf6))
|
||||
INFINEON_CAT1_CLOCK_HF6,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf7), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf7))
|
||||
INFINEON_CAT1_CLOCK_HF7,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf8), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf8))
|
||||
INFINEON_CAT1_CLOCK_HF8,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf9), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf9))
|
||||
INFINEON_CAT1_CLOCK_HF9,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf10), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf10))
|
||||
INFINEON_CAT1_CLOCK_HF10,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf11), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf11))
|
||||
INFINEON_CAT1_CLOCK_HF11,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf12), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf12))
|
||||
INFINEON_CAT1_CLOCK_HF12,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf13), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf13))
|
||||
INFINEON_CAT1_CLOCK_HF13,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_fast), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_fast))
|
||||
INFINEON_CAT1_CLOCK_FAST,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_slow), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_slow))
|
||||
INFINEON_CAT1_CLOCK_SLOW,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_peri), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_peri))
|
||||
INFINEON_CAT1_CLOCK_PERI,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll0))
|
||||
INFINEON_CAT1_CLOCK_PLL0,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll1))
|
||||
INFINEON_CAT1_CLOCK_PLL1,
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(fll0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll0))
|
||||
INFINEON_CAT1_CLOCK_FLL0,
|
||||
#endif
|
||||
|
||||
|
@ -142,111 +142,111 @@ struct infineon_cat1_clock_info_t {
|
|||
static struct infineon_cat1_clock_info_t
|
||||
clock_info_table[INFINEON_CAT1_ENABLED_CLOCK_COUNT] = {
|
||||
/* We always have IMO */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo))
|
||||
[INFINEON_CAT1_CLOCK_IMO] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_imo)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho))
|
||||
[INFINEON_CAT1_CLOCK_IHO] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_iho)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux0))
|
||||
[INFINEON_CAT1_CLOCK_PATHMUX0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux0)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux1))
|
||||
[INFINEON_CAT1_CLOCK_PATHMUX1] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux1)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux2))
|
||||
[INFINEON_CAT1_CLOCK_PATHMUX2] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux2)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux3))
|
||||
[INFINEON_CAT1_CLOCK_PATHMUX3] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux3)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux4))
|
||||
[INFINEON_CAT1_CLOCK_PATHMUX4] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux4)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf0))
|
||||
[INFINEON_CAT1_CLOCK_HF0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf0)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf1))
|
||||
[INFINEON_CAT1_CLOCK_HF1] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf1)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf2))
|
||||
[INFINEON_CAT1_CLOCK_HF2] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf2)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf3))
|
||||
[INFINEON_CAT1_CLOCK_HF3] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf3)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf4))
|
||||
[INFINEON_CAT1_CLOCK_HF4] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf4)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf5), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf5))
|
||||
[INFINEON_CAT1_CLOCK_HF5] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf5)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf6), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf6))
|
||||
[INFINEON_CAT1_CLOCK_HF6] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf6)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf7), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf7))
|
||||
[INFINEON_CAT1_CLOCK_HF7] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf7)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf8), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf8))
|
||||
[INFINEON_CAT1_CLOCK_HF8] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf8)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf9), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf9))
|
||||
[INFINEON_CAT1_CLOCK_HF9] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf9)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf10), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf10))
|
||||
[INFINEON_CAT1_CLOCK_HF10] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf10)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf11), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf11))
|
||||
[INFINEON_CAT1_CLOCK_HF11] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf11)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf12), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf12))
|
||||
[INFINEON_CAT1_CLOCK_HF12] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf12)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf13), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf13))
|
||||
[INFINEON_CAT1_CLOCK_HF13] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf13)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_fast), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_fast))
|
||||
[INFINEON_CAT1_CLOCK_FAST] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_fast)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_slow), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_slow))
|
||||
[INFINEON_CAT1_CLOCK_SLOW] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_slow)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_peri), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_peri))
|
||||
[INFINEON_CAT1_CLOCK_PERI] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_peri)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll0))
|
||||
[INFINEON_CAT1_CLOCK_PLL0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(pll0)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll1))
|
||||
[INFINEON_CAT1_CLOCK_PLL1] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(pll1)) },
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(fll0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll0))
|
||||
[INFINEON_CAT1_CLOCK_FLL0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(fll0)) },
|
||||
#endif
|
||||
};
|
||||
|
@ -326,7 +326,7 @@ static cyhal_clock_t *_get_hal_obj_from_ord(uint32_t dt_ord)
|
|||
return ret_obj;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dpll_hp), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dpll_hp))
|
||||
__WEAK void cycfg_ClockStartupError(uint32_t error)
|
||||
{
|
||||
(void)error; /* Suppress the compiler warning */
|
||||
|
@ -390,25 +390,25 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
uint32 clock_div;
|
||||
|
||||
/* Configure IMO */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_IMO].obj;
|
||||
if (cyhal_clock_get(clock_obj, &CYHAL_CLOCK_RSC_IMO)) {
|
||||
return -EIO;
|
||||
}
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_IHO].obj;
|
||||
if (cyhal_clock_get(clock_obj, &CYHAL_CLOCK_RSC_IHO)) {
|
||||
return -EIO;
|
||||
}
|
||||
#endif
|
||||
#if !DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay) && \
|
||||
!DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo)) && \
|
||||
!DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho))
|
||||
#error "IMO clock or IHO clock must be enabled"
|
||||
#endif
|
||||
|
||||
/* Configure the PathMux[0] to source defined in tree device 'path_mux0' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux0))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX0].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux0));
|
||||
|
||||
|
@ -418,7 +418,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the PathMux[1] to source defined in tree device 'path_mux1' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux1))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX1].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux1));
|
||||
|
||||
|
@ -428,7 +428,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the PathMux[2] to source defined in tree device 'path_mux2' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux2))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX2].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux2));
|
||||
|
||||
|
@ -438,7 +438,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the PathMux[3] to source defined in tree device 'path_mux3' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux3))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX3].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux3));
|
||||
|
||||
|
@ -448,7 +448,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the PathMux[4] to source defined in tree device 'path_mux4' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux4))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX4].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux4));
|
||||
|
||||
|
@ -458,7 +458,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure FLL0 */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(fll0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll0))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_FLL0].obj;
|
||||
frequency = DT_PROP(DT_NODELABEL(fll0), clock_frequency);
|
||||
|
||||
|
@ -470,7 +470,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure PLL0 */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll0))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PLL0].obj;
|
||||
frequency = DT_PROP(DT_NODELABEL(pll0), clock_frequency);
|
||||
|
||||
|
@ -483,7 +483,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure PLL1 */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll1))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PLL1].obj;
|
||||
frequency = DT_PROP(DT_NODELABEL(pll1), clock_frequency);
|
||||
|
||||
|
@ -495,7 +495,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[0] to source defined in tree device 'clk_hf0' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf0))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF0].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf0));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf0), clock_div);
|
||||
|
@ -506,7 +506,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[1] to source defined in tree device 'clk_hf1' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf1))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF1].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf1));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf1), clock_div);
|
||||
|
@ -517,7 +517,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[2] to source defined in tree device 'clk_hf2' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf2))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF2].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf2));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf2), clock_div);
|
||||
|
@ -528,7 +528,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[3] to source defined in tree device 'clk_hf3' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf3))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF3].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf3));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf3), clock_div);
|
||||
|
@ -539,7 +539,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[4] to source defined in tree device 'clk_hf4' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf4))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF4].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf4));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf4), clock_div);
|
||||
|
@ -550,7 +550,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[5] to source defined in tree device 'clk_hf5' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf5), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf5))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF5].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf5));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf5), clock_div);
|
||||
|
@ -561,7 +561,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[6] to source defined in tree device 'clk_hf6' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf6), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf6))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF6].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf6));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf6), clock_div);
|
||||
|
@ -572,7 +572,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[7] to source defined in tree device 'clk_hf7' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf7), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf7))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF7].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf7));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf7), clock_div);
|
||||
|
@ -583,7 +583,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[8] to source defined in tree device 'clk_hf8' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf8), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf8))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF8].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf8));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf8), clock_div);
|
||||
|
@ -594,7 +594,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[9] to source defined in tree device 'clk_hf9' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf9), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf9))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF9].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf9));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf9), clock_div);
|
||||
|
@ -605,7 +605,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[10] to source defined in tree device 'clk_hf10' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf10), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf10))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF10].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf10));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf10), clock_div);
|
||||
|
@ -616,7 +616,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[11] to source defined in tree device 'clk_hf11' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf11), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf11))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF11].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf11));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf11), clock_div);
|
||||
|
@ -627,7 +627,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[12] to source defined in tree device 'clk_hf12' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf12), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf12))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF12].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf12));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf12), clock_div);
|
||||
|
@ -638,7 +638,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the HF[13] to source defined in tree device 'clk_hf13' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf13), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf13))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF13].obj;
|
||||
clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf13));
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_hf13), clock_div);
|
||||
|
@ -649,7 +649,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the clock fast to source defined in tree device 'clk_fast' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_fast), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_fast))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_FAST].obj;
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_fast), clock_div);
|
||||
|
||||
|
@ -663,7 +663,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the clock peri to source defined in tree device 'clk_peri' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_peri), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_peri))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PERI].obj;
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_peri), clock_div);
|
||||
|
||||
|
@ -677,7 +677,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
#endif
|
||||
|
||||
/* Configure the clock slow to source defined in tree device 'clk_slow' node */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_slow), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_slow))
|
||||
clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_SLOW].obj;
|
||||
clock_div = DT_PROP(DT_NODELABEL(clk_slow), clock_div);
|
||||
|
||||
|
@ -690,7 +690,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dpll_hp), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dpll_hp))
|
||||
Cy_SysClk_Dpll_Hp0_Init();
|
||||
SystemCoreClockUpdate();
|
||||
#endif
|
||||
|
@ -713,7 +713,7 @@ static const struct clock_control_driver_api clock_control_infineon_cat1_api = {
|
|||
.off = clock_control_infineon_cat_on_off
|
||||
};
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo))
|
||||
DEVICE_DT_DEFINE(DT_NODELABEL(clk_imo),
|
||||
clock_control_infineon_cat1_init,
|
||||
NULL,
|
||||
|
@ -723,7 +723,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(clk_imo),
|
|||
CONFIG_CLOCK_CONTROL_INIT_PRIORITY,
|
||||
&clock_control_infineon_cat1_api);
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho))
|
||||
DEVICE_DT_DEFINE(DT_NODELABEL(clk_iho),
|
||||
clock_control_infineon_cat1_init,
|
||||
NULL,
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
lcko->margin.exp = CLKOUT_MARGIN_EXP(N);
|
||||
|
||||
/* Devicetree clkout defines */
|
||||
#define CLKOUT_EXIST(N) DT_NODE_HAS_STATUS(DT_NODELABEL(clk##N), okay)
|
||||
#define CLKOUT_EXIST(N) DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk##N))
|
||||
#define CLKOUT_ID(N) DT_REG_ADDR(DT_NODELABEL(clk##N))
|
||||
#define CLKOUT_FREQ(N) DT_PROP(DT_NODELABEL(clk##N), \
|
||||
litex_clock_frequency)
|
||||
|
|
|
@ -106,27 +106,27 @@ static void setup_fixed_clocks(void)
|
|||
MXC_SYS_ClockSourceDisable(ADI_MAX32_CLK_EXTCLK);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_ipo), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_ipo))
|
||||
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_IPO);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_erfo), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_erfo))
|
||||
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_ERFO);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_ibro), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_ibro))
|
||||
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_IBRO);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iso), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iso))
|
||||
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_ISO);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_inro), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_inro))
|
||||
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_INRO);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_ertco), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_ertco))
|
||||
MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_ERTCO);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -216,14 +216,14 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_IMX_USDHC
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_IMX_USDHC
|
||||
case IMX_CCM_USDHC1_CLK:
|
||||
*rate = CLOCK_GetSysPfdFreq(kCLOCK_Pfd0) /
|
||||
(CLOCK_GetDiv(kCLOCK_Usdhc1Div) + 1U);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc2), okay) && CONFIG_IMX_USDHC
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc2)) && CONFIG_IMX_USDHC
|
||||
case IMX_CCM_USDHC2_CLK:
|
||||
*rate = CLOCK_GetSysPfdFreq(kCLOCK_Pfd0) /
|
||||
(CLOCK_GetDiv(kCLOCK_Usdhc2Div) + 1U);
|
||||
|
@ -339,12 +339,12 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
|
|||
/ (CLOCK_GetDiv(kCLOCK_Sai3Div) + 1);
|
||||
break;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexspi), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexspi))
|
||||
case IMX_CCM_FLEXSPI_CLK:
|
||||
*rate = CLOCK_GetClockRootFreq(kCLOCK_FlexspiClkRoot);
|
||||
break;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexspi2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexspi2))
|
||||
case IMX_CCM_FLEXSPI2_CLK:
|
||||
*rate = CLOCK_GetClockRootFreq(kCLOCK_Flexspi2ClkRoot);
|
||||
break;
|
||||
|
@ -354,7 +354,7 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
|
|||
*rate = CLOCK_GetFreq(kCLOCK_PerClk);
|
||||
break;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexio1), okay) && CONFIG_MCUX_FLEXIO
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio1)) && CONFIG_MCUX_FLEXIO
|
||||
case IMX_CCM_FLEXIO1_CLK:
|
||||
{
|
||||
uint32_t flexio_mux = CLOCK_GetMux(kCLOCK_Flexio1Mux);
|
||||
|
@ -376,8 +376,8 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
|
|||
/ (CLOCK_GetDiv(kCLOCK_Flexio1Div) + 1);
|
||||
} break;
|
||||
#endif
|
||||
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(flexio2), okay) \
|
||||
|| DT_NODE_HAS_STATUS(DT_NODELABEL(flexio3), okay)) && CONFIG_MCUX_FLEXIO
|
||||
#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio2)) \
|
||||
|| DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio3))) && CONFIG_MCUX_FLEXIO
|
||||
case IMX_CCM_FLEXIO2_3_CLK:
|
||||
{
|
||||
uint32_t flexio_mux = CLOCK_GetMux(kCLOCK_Flexio2Mux);
|
||||
|
|
|
@ -125,7 +125,7 @@ static int mcux_scg_get_rate(const struct device *dev,
|
|||
|
||||
static int mcux_scg_init(const struct device *dev)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(MCUX_SCG_CLOCK_NODE(clkout_clk), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(MCUX_SCG_CLOCK_NODE(clkout_clk))
|
||||
#if DT_SAME_NODE(DT_CLOCKS_CTLR(MCUX_SCG_CLOCK_NODE(clkout_clk)), MCUX_SCG_CLOCK_NODE(slow_clk))
|
||||
CLOCK_SetClkOutSel(kClockClkoutSelScgSlow);
|
||||
#elif DT_SAME_NODE(DT_CLOCKS_CTLR(MCUX_SCG_CLOCK_NODE(clkout_clk)), MCUX_SCG_CLOCK_NODE(sosc_clk))
|
||||
|
@ -139,7 +139,7 @@ static int mcux_scg_init(const struct device *dev)
|
|||
#else
|
||||
#error Unsupported SCG clkout clock source
|
||||
#endif
|
||||
#endif /* DT_NODE_HAS_STATUS(MCUX_SCG_CLOCK_NODE(clkout_clk), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(MCUX_SCG_CLOCK_NODE(clkout_clk)) */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ static int mcux_sim_get_subsys_rate(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ke1xf_sim), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ke1xf_sim))
|
||||
#define NXP_KINETIS_SIM_NODE DT_INST(0, nxp_kinetis_ke1xf_sim)
|
||||
#if DT_NODE_HAS_PROP(DT_INST(0, nxp_kinetis_ke1xf_sim), clkout_source)
|
||||
#define NXP_KINETIS_SIM_CLKOUT_SOURCE \
|
||||
|
|
|
@ -26,7 +26,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1,
|
|||
#define FLL16M_LFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, lfxo)
|
||||
#define FLL16M_HFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, hfxo)
|
||||
|
||||
#define FLL16M_HAS_LFXO DT_NODE_HAS_STATUS(FLL16M_LFXO_NODE, okay)
|
||||
#define FLL16M_HAS_LFXO DT_NODE_HAS_STATUS_OKAY(FLL16M_LFXO_NODE)
|
||||
|
||||
#define FLL16M_LFXO_ACCURACY DT_PROP(FLL16M_LFXO_NODE, accuracy_ppm)
|
||||
#define FLL16M_HFXO_ACCURACY DT_PROP(FLL16M_HFXO_NODE, accuracy_ppm)
|
||||
|
|
|
@ -19,7 +19,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1,
|
|||
#define LFCLK_LFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, lfxo)
|
||||
#define LFCLK_HFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, hfxo)
|
||||
|
||||
#define LFCLK_HAS_LFXO DT_NODE_HAS_STATUS(LFCLK_LFXO_NODE, okay)
|
||||
#define LFCLK_HAS_LFXO DT_NODE_HAS_STATUS_OKAY(LFCLK_LFXO_NODE)
|
||||
|
||||
#define LFCLK_LFLPRC_ACCURACY DT_INST_PROP(0, lflprc_accuracy_ppm)
|
||||
#define LFCLK_LFRC_ACCURACY DT_INST_PROP(0, lfrc_accuracy_ppm)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#define CLKSRC_FREQ(clk) DT_PROP(DT_PATH(clocks, clk), clock_frequency)
|
||||
|
||||
#define IS_CLKSRC_ENABLED(clk) DT_NODE_HAS_STATUS(DT_PATH(clocks, clk), okay)
|
||||
#define IS_CLKSRC_ENABLED(clk) DT_NODE_HAS_STATUS_OKAY(DT_PATH(clocks, clk))
|
||||
|
||||
#define SCKSCR_INIT_VALUE _CONCAT(CLKSRC_, SYSCLK_SRC)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <zephyr/dt-bindings/clock/ra_clock.h>
|
||||
#include <zephyr/drivers/clock_control/renesas_ra_cgc.h>
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pclkblock), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pclkblock))
|
||||
#define MSTP_REGS_ELEM(node_id, prop, idx) \
|
||||
[DT_STRING_TOKEN_BY_IDX(node_id, prop, idx)] = \
|
||||
(volatile uint32_t *)DT_REG_ADDR_BY_IDX(node_id, idx),
|
||||
|
|
|
@ -265,7 +265,7 @@ static inline int smartbond_clock_control_off(const struct device *dev,
|
|||
switch (clk) {
|
||||
case SMARTBOND_CLK_RC32K:
|
||||
/* RC32K is used by POWERUP and WAKEUP HW FSM */
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(rc32k), okay),
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(rc32k)),
|
||||
"RC32K is not allowed to be turned off");
|
||||
ret = -EPERM;
|
||||
break;
|
||||
|
@ -472,12 +472,12 @@ static void smartbond_clock_control_update_memory_settings(uint32_t sys_clock_fr
|
|||
{
|
||||
if (sys_clock_freq > 32000000) {
|
||||
da1469x_qspi_set_read_pipe_delay(QSPIC_ID, 7);
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc))
|
||||
da1469x_qspi_set_read_pipe_delay(QSPIC2_ID, 7);
|
||||
#endif
|
||||
} else {
|
||||
da1469x_qspi_set_read_pipe_delay(QSPIC_ID, 2);
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc))
|
||||
da1469x_qspi_set_read_pipe_delay(QSPIC2_ID, 2);
|
||||
#endif
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ static void smartbond_clock_control_update_memory_settings(uint32_t sys_clock_fr
|
|||
da1469x_qspi_set_cs_delay(QSPIC_ID, SystemCoreClock,
|
||||
DT_PROP(DT_NODELABEL(flash_controller), read_cs_idle_delay),
|
||||
DT_PROP(DT_NODELABEL(flash_controller), erase_cs_idle_delay));
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc))
|
||||
da1469x_qspi_set_cs_delay(QSPIC2_ID, SystemCoreClock,
|
||||
DT_PROP(DT_NODELABEL(memc), read_cs_idle_min_ns),
|
||||
DT_PROP_OR(DT_NODELABEL(memc), erase_cs_idle_min_ns, 0));
|
||||
|
@ -565,7 +565,7 @@ int smartbond_clocks_init(const struct device *dev)
|
|||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc))
|
||||
/* Make sure QSPIC2 is enabled */
|
||||
da1469x_clock_amba_enable(CRG_TOP_CLK_AMBA_REG_QSPI2_ENABLE_Msk);
|
||||
#endif
|
||||
|
@ -579,12 +579,12 @@ int smartbond_clocks_init(const struct device *dev)
|
|||
DT_FOREACH_CHILD_STATUS_OKAY_SEP(DT_PATH(crg, osc), ENABLE_OSC, (;));
|
||||
|
||||
/* Make sure that selected sysclock is enabled */
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_PROP(DT_NODELABEL(sys_clk), clock_src), okay),
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_PROP(DT_NODELABEL(sys_clk), clock_src)),
|
||||
"Clock selected as system clock no enabled in DT");
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_PROP(DT_NODELABEL(lp_clk), clock_src), okay),
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_PROP(DT_NODELABEL(lp_clk), clock_src)),
|
||||
"Clock selected as LP clock no enabled in DT");
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(pll), disabled) ||
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay),
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)),
|
||||
"PLL enabled in DT but XTAL32M is disabled");
|
||||
|
||||
clk_id = DT_DEP_ORD(DT_PROP(DT_NODELABEL(lp_clk), clock_src));
|
||||
|
@ -616,7 +616,7 @@ static int smartbond_clocks_pm_action(const struct device *dev, enum pm_device_a
|
|||
case PM_DEVICE_ACTION_SUSPEND:
|
||||
break;
|
||||
case PM_DEVICE_ACTION_RESUME:
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc))
|
||||
/* Make sure QSPIC2 is enabled */
|
||||
da1469x_clock_amba_enable(CRG_TOP_CLK_AMBA_REG_QSPI2_ENABLE_Msk);
|
||||
#endif
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#if DT_NODE_HAS_PROP(STM32_CLOCK_CONTROL_NODE, slow_clock)
|
||||
|
||||
# if !DT_NODE_HAS_STATUS(DT_RCC_SLOWCLK_NODE, okay)
|
||||
# if !DT_NODE_HAS_STATUS_OKAY(DT_RCC_SLOWCLK_NODE)
|
||||
# error slow-clock source is not enabled
|
||||
# endif
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ static const struct counter_driver_api mcux_snvs_driver_api = {
|
|||
BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) <= 1,
|
||||
"unsupported snvs instance");
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
static struct mcux_snvs_data mcux_snvs_data_0;
|
||||
|
||||
static void mcux_snvs_irq_config_0(const struct device *dev);
|
||||
|
@ -339,4 +339,4 @@ static void mcux_snvs_irq_config_0(const struct device *dev)
|
|||
mcux_snvs_isr, DEVICE_DT_INST_GET(0), 0);
|
||||
irq_enable(DT_INST_IRQN(0));
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */
|
||||
|
|
|
@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(counter_timer, CONFIG_COUNTER_LOG_LEVEL);
|
|||
|
||||
#define COUNTER_DT_DEVICE(_idx) DEVICE_DT_GET_OR_NULL(DT_NODELABEL(timer##_idx))
|
||||
|
||||
#define PDC_XTAL_EN (DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay) ? \
|
||||
#define PDC_XTAL_EN (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)) ? \
|
||||
MCU_PDC_EN_XTAL : MCU_PDC_EN_NONE)
|
||||
|
||||
struct counter_smartbond_data {
|
||||
|
|
|
@ -743,7 +743,7 @@ err_card_detect:
|
|||
return err;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
|
||||
#if STM32_SDMMC_USE_DMA
|
||||
|
||||
|
|
|
@ -55,11 +55,11 @@ struct dma_mcux_edma_config {
|
|||
|
||||
#ifdef CONFIG_DMA_MCUX_USE_DTCM_FOR_DMA_DESCRIPTORS
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm))
|
||||
#define EDMA_TCDPOOL_CACHE_ATTR __dtcm_noinit_section
|
||||
#else /* DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) */
|
||||
#else /* DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) */
|
||||
#error Selected DTCM for MCUX DMA descriptors but no DTCM section.
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) */
|
||||
|
||||
#elif defined(CONFIG_NOCACHE_MEMORY)
|
||||
#define EDMA_TCDPOOL_CACHE_ATTR __nocache
|
||||
|
|
|
@ -29,7 +29,7 @@ LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL);
|
|||
#define DT_DRV_COMPAT st_stm32_dma_v2bis
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
#if DT_INST_IRQ_HAS_IDX(0, 7)
|
||||
#define DMA_STM32_0_STREAM_COUNT 8
|
||||
#elif DT_INST_IRQ_HAS_IDX(0, 6)
|
||||
|
@ -41,9 +41,9 @@ LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL);
|
|||
#else
|
||||
#define DMA_STM32_0_STREAM_COUNT 3
|
||||
#endif
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1))
|
||||
#if DT_INST_IRQ_HAS_IDX(1, 7)
|
||||
#define DMA_STM32_1_STREAM_COUNT 8
|
||||
#elif DT_INST_IRQ_HAS_IDX(1, 6)
|
||||
|
@ -53,7 +53,7 @@ LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL);
|
|||
#else
|
||||
#define DMA_STM32_1_STREAM_COUNT 5
|
||||
#endif
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */
|
||||
|
||||
static const uint32_t table_m_size[] = {
|
||||
LL_DMA_MDATAALIGN_BYTE,
|
||||
|
@ -756,7 +756,7 @@ static void dma_stm32_irq_##dma##_##chan(const struct device *dev) \
|
|||
#endif /* CONFIG_DMA_STM32_SHARED_IRQS */
|
||||
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
|
||||
DMA_STM32_DEFINE_IRQ_HANDLER(0, 0);
|
||||
DMA_STM32_DEFINE_IRQ_HANDLER(0, 1);
|
||||
|
@ -804,10 +804,10 @@ static void dma_stm32_config_irq_0(const struct device *dev)
|
|||
|
||||
DMA_STM32_INIT_DEV(0);
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */
|
||||
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1))
|
||||
|
||||
DMA_STM32_DEFINE_IRQ_HANDLER(1, 0);
|
||||
DMA_STM32_DEFINE_IRQ_HANDLER(1, 1);
|
||||
|
@ -856,4 +856,4 @@ static void dma_stm32_config_irq_1(const struct device *dev)
|
|||
|
||||
DMA_STM32_INIT_DEV(1);
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */
|
||||
|
|
|
@ -906,7 +906,7 @@ static void bdma_stm32_irq_##bdma##_##chan(const struct device *dev) \
|
|||
} while (false)
|
||||
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
|
||||
#define BDMA_STM32_DEFINE_IRQ_HANDLER_GEN(i, _) \
|
||||
BDMA_STM32_DEFINE_IRQ_HANDLER(0, i)
|
||||
|
@ -923,4 +923,4 @@ static void bdma_stm32_config_irq_0(const struct device *dev)
|
|||
|
||||
BDMA_STM32_INIT_DEV(0);
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */
|
||||
|
|
|
@ -108,7 +108,7 @@ struct dmamux_stm32_dma_fops {
|
|||
};
|
||||
|
||||
#if (defined(CONFIG_DMA_STM32_V1) || defined(CONFIG_DMA_STM32_V2)) && \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay)
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1))
|
||||
static const struct dmamux_stm32_dma_fops dmamux1 = {
|
||||
dma_stm32_configure,
|
||||
dma_stm32_start,
|
||||
|
@ -118,7 +118,7 @@ static const struct dmamux_stm32_dma_fops dmamux1 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DMA_STM32_BDMA) && DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay)
|
||||
#if defined(CONFIG_DMA_STM32_BDMA) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2))
|
||||
static const struct dmamux_stm32_dma_fops dmamux2 = {
|
||||
bdma_stm32_configure,
|
||||
bdma_stm32_start,
|
||||
|
@ -130,17 +130,17 @@ static const struct dmamux_stm32_dma_fops dmamux2 = {
|
|||
|
||||
const struct dmamux_stm32_dma_fops *get_dma_fops(const struct dmamux_stm32_config *dev_config)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1))
|
||||
if (dev_config->base == DT_REG_ADDR(DT_NODELABEL(dmamux1))) {
|
||||
return &dmamux1;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2))
|
||||
if (dev_config->base == DT_REG_ADDR(DT_NODELABEL(dmamux2))) {
|
||||
return &dmamux2;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2)) */
|
||||
|
||||
__ASSERT(false, "Unknown dma base address %x", dev_config->base);
|
||||
return (void *)0;
|
||||
|
@ -298,24 +298,24 @@ static int dmamux_stm32_init(const struct device *dev)
|
|||
}
|
||||
#endif /* DT_INST_NODE_HAS_PROP(0, clocks) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1))
|
||||
/* DMA 1 and DMA2 for DMAMUX1, BDMA for DMAMUX2 */
|
||||
if (config->base == DT_REG_ADDR(DT_NODELABEL(dmamux1))) {
|
||||
/* DMAs assigned to DMAMUX channels at build time might not be ready. */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dma1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma1))
|
||||
if (device_is_ready(DEVICE_DT_GET(DT_NODELABEL(dma1))) == false) {
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dma2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma2))
|
||||
if (device_is_ready(DEVICE_DT_GET(DT_NODELABEL(dma2))) == false) {
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay) && DT_NODE_HAS_STATUS(DT_NODELABEL(bdma1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2)) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(bdma1))
|
||||
if (config->base == DT_REG_ADDR(DT_NODELABEL(dmamux2))) {
|
||||
if (device_is_ready(DEVICE_DT_GET(DT_NODELABEL(bdma1))) == false) {
|
||||
return -ENODEV;
|
||||
|
@ -346,19 +346,19 @@ static const struct dma_driver_api dma_funcs = {
|
|||
#define DMA_1_BEGIN_DMAMUX_CHANNEL DT_PROP_OR(DT_NODELABEL(dma1), dma_offset, 0)
|
||||
#define DMA_1_END_DMAMUX_CHANNEL (DMA_1_BEGIN_DMAMUX_CHANNEL + \
|
||||
DT_PROP_OR(DT_NODELABEL(dma1), dma_requests, 0))
|
||||
#define DEV_DMA1 COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(dma1), okay), \
|
||||
#define DEV_DMA1 COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma1)), \
|
||||
DEVICE_DT_GET(DT_NODELABEL(dma1)), NULL)
|
||||
|
||||
#define DMA_2_BEGIN_DMAMUX_CHANNEL DT_PROP_OR(DT_NODELABEL(dma2), dma_offset, 0)
|
||||
#define DMA_2_END_DMAMUX_CHANNEL (DMA_2_BEGIN_DMAMUX_CHANNEL + \
|
||||
DT_PROP_OR(DT_NODELABEL(dma2), dma_requests, 0))
|
||||
#define DEV_DMA2 COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(dma2), okay), \
|
||||
#define DEV_DMA2 COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma2)), \
|
||||
DEVICE_DT_GET(DT_NODELABEL(dma2)), NULL)
|
||||
|
||||
#define BDMA_1_BEGIN_DMAMUX_CHANNEL DT_PROP_OR(DT_NODELABEL(bdma1), dma_offset, 0)
|
||||
#define BDMA_1_END_DMAMUX_CHANNEL (BDMA_1_BEGIN_DMAMUX_CHANNEL + \
|
||||
DT_PROP_OR(DT_NODELABEL(bdma1), dma_requests, 0))
|
||||
#define DEV_BDMA COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(bdma1), okay), \
|
||||
#define DEV_BDMA COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(bdma1)), \
|
||||
DEVICE_DT_GET(DT_NODELABEL(bdma1)), NULL)
|
||||
|
||||
#define DEV_DMA_BINDING(mux_channel) \
|
||||
|
|
|
@ -108,7 +108,7 @@ static uint8_t ec_host_cmd_sram[CONFIG_ESPI_XEC_PERIPHERAL_HOST_CMD_PARAM_SIZE]
|
|||
|
||||
#ifdef CONFIG_ESPI_PERIPHERAL_XEC_MAILBOX
|
||||
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(mbox0), okay),
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(mbox0)),
|
||||
"XEC mbox0 DT node is disabled!");
|
||||
|
||||
static struct xec_mbox_config {
|
||||
|
@ -171,7 +171,7 @@ static int init_mbox0(const struct device *dev)
|
|||
|
||||
#ifdef CONFIG_ESPI_PERIPHERAL_8042_KBC
|
||||
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(kbc0), okay),
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(kbc0)),
|
||||
"XEC kbc0 DT node is disabled!");
|
||||
|
||||
struct xec_kbc0_config {
|
||||
|
@ -665,7 +665,7 @@ static int init_acpi_ec1(const struct device *dev)
|
|||
|
||||
#ifdef CONFIG_ESPI_PERIPHERAL_EC_HOST_CMD
|
||||
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(emi0), okay),
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(emi0)),
|
||||
"XEC EMI0 DT node is disabled!");
|
||||
|
||||
struct xec_emi_config {
|
||||
|
|
|
@ -50,7 +50,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_ETH_STM32_HAL_USE_DTCM_FOR_DMA_BUFFER) && \
|
||||
!DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay)
|
||||
!DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm))
|
||||
#error DTCM for DMA buffer is activated but zephyr,dtcm is not present in dts
|
||||
#endif
|
||||
|
||||
|
@ -91,7 +91,7 @@ static const struct device *eth_stm32_phy_dev = DEVICE_PHY_BY_NAME(0);
|
|||
#define ETH_DMA_TX_TIMEOUT_MS 20U /* transmit timeout in milliseconds */
|
||||
|
||||
#if defined(CONFIG_ETH_STM32_HAL_USE_DTCM_FOR_DMA_BUFFER) && \
|
||||
DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay)
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm))
|
||||
#define __eth_stm32_desc __dtcm_noinit_section
|
||||
#define __eth_stm32_buf __dtcm_noinit_section
|
||||
#elif defined(CONFIG_SOC_SERIES_STM32H7X)
|
||||
|
|
|
@ -149,7 +149,7 @@ static const char *eth_name(ENET_Type *base)
|
|||
switch ((int)base) {
|
||||
case DT_INST_REG_ADDR(0):
|
||||
return "ETH_0";
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1))
|
||||
case DT_INST_REG_ADDR(1):
|
||||
return "ETH_1";
|
||||
#endif
|
||||
|
@ -964,10 +964,10 @@ static void eth_mcux_init(const struct device *dev)
|
|||
context->phy_handle->ops = &phyksz8081_ops;
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_IMXRT10XX)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet))
|
||||
sys_clock = CLOCK_GetFreq(kCLOCK_IpgClk);
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet2))
|
||||
sys_clock = CLOCK_GetFreq(kCLOCK_EnetPll1Clk);
|
||||
#endif
|
||||
#elif defined(CONFIG_SOC_SERIES_IMXRT11XX)
|
||||
|
@ -1350,7 +1350,7 @@ static void eth_mcux_err_isr(const struct device *dev)
|
|||
} while (false)
|
||||
|
||||
#define ETH_MCUX_IRQ_PTP(n) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(PTP_INST_NODEID(n), okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(PTP_INST_NODEID(n)), \
|
||||
(ETH_MCUX_IRQ_PTP_INIT(n)), \
|
||||
(ETH_MCUX_NONE))
|
||||
|
||||
|
@ -1454,7 +1454,7 @@ static void eth_mcux_err_isr(const struct device *dev)
|
|||
#define ETH_MCUX_PINCTRL_INIT(n)
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) && \
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) && \
|
||||
CONFIG_ETH_MCUX_USE_DTCM_FOR_DMA_BUFFER
|
||||
/* Use DTCM for hardware DMA buffers */
|
||||
#define _mcux_dma_desc __dtcm_bss_section
|
||||
|
|
|
@ -855,7 +855,7 @@ static const struct ethernet_api api_funcs = {
|
|||
#define NXP_ENET_DT_PHY_DEV(node_id, phy_phandle, idx) \
|
||||
DEVICE_DT_GET(DT_PHANDLE_BY_IDX(node_id, phy_phandle, idx))
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) && \
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) && \
|
||||
CONFIG_ETH_NXP_ENET_USE_DTCM_FOR_DMA_BUFFER
|
||||
#define _nxp_enet_dma_desc_section __dtcm_bss_section
|
||||
#define _nxp_enet_dma_buffer_section __dtcm_noinit_section
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <zephyr/logging/log.h>
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, adi_adin2111_phy), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, adi_adin2111_phy))
|
||||
#define DT_DRV_COMPAT adi_adin2111_phy
|
||||
#else
|
||||
#define DT_DRV_COMPAT adi_adin1100_phy
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
#include "fsl_flashiap.h"
|
||||
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc11), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc11))
|
||||
#define DT_DRV_COMPAT nxp_iap_fmc11
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc54), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc54))
|
||||
#define DT_DRV_COMPAT nxp_iap_fmc54
|
||||
#else
|
||||
#error No matching compatible for soc_flash_lpc.c
|
||||
|
|
|
@ -22,19 +22,19 @@
|
|||
LOG_MODULE_REGISTER(flash_mcux);
|
||||
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfa), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfa))
|
||||
#define DT_DRV_COMPAT nxp_kinetis_ftfa
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfe), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfe))
|
||||
#define DT_DRV_COMPAT nxp_kinetis_ftfe
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfl), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfl))
|
||||
#define DT_DRV_COMPAT nxp_kinetis_ftfl
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc55), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc55))
|
||||
#define DT_DRV_COMPAT nxp_iap_fmc55
|
||||
#define SOC_HAS_IAP 1
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc553), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc553))
|
||||
#define DT_DRV_COMPAT nxp_iap_fmc553
|
||||
#define SOC_HAS_IAP 1
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_msf1), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_msf1))
|
||||
#define DT_DRV_COMPAT nxp_iap_msf1
|
||||
#define SOC_HAS_IAP_MSF1 1
|
||||
#else
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_REGISTER(flash_nrf);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf51_flash_controller), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf51_flash_controller))
|
||||
#define DT_DRV_COMPAT nordic_nrf51_flash_controller
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52_flash_controller), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf52_flash_controller))
|
||||
#define DT_DRV_COMPAT nordic_nrf52_flash_controller
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf53_flash_controller), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf53_flash_controller))
|
||||
#define DT_DRV_COMPAT nordic_nrf53_flash_controller
|
||||
#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf91_flash_controller), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf91_flash_controller))
|
||||
#define DT_DRV_COMPAT nordic_nrf91_flash_controller
|
||||
#else
|
||||
#error No matching compatible for soc_flash_nrf.c
|
||||
|
|
|
@ -284,7 +284,7 @@ static int gpio_esp32_port_get_raw(const struct device *port, uint32_t *value)
|
|||
|
||||
if (cfg->gpio_port == 0) {
|
||||
*value = cfg->gpio_dev->in;
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
} else {
|
||||
*value = cfg->gpio_dev->in1.data;
|
||||
#endif
|
||||
|
@ -302,7 +302,7 @@ static int gpio_esp32_port_set_masked_raw(const struct device *port,
|
|||
|
||||
if (cfg->gpio_port == 0) {
|
||||
cfg->gpio_dev->out = (cfg->gpio_dev->out & ~mask) | (mask & value);
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
} else {
|
||||
cfg->gpio_dev->out1.data = (cfg->gpio_dev->out1.data & ~mask) | (mask & value);
|
||||
#endif
|
||||
|
@ -320,7 +320,7 @@ static int gpio_esp32_port_set_bits_raw(const struct device *port,
|
|||
|
||||
if (cfg->gpio_port == 0) {
|
||||
cfg->gpio_dev->out_w1ts = pins;
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
} else {
|
||||
cfg->gpio_dev->out1_w1ts.data = pins;
|
||||
#endif
|
||||
|
@ -336,7 +336,7 @@ static int gpio_esp32_port_clear_bits_raw(const struct device *port,
|
|||
|
||||
if (cfg->gpio_port == 0) {
|
||||
cfg->gpio_dev->out_w1tc = pins;
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
} else {
|
||||
cfg->gpio_dev->out1_w1tc.data = pins;
|
||||
#endif
|
||||
|
@ -353,7 +353,7 @@ static int gpio_esp32_port_toggle_bits(const struct device *port,
|
|||
|
||||
if (cfg->gpio_port == 0) {
|
||||
cfg->gpio_dev->out ^= pins;
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
} else {
|
||||
cfg->gpio_dev->out1.data ^= pins;
|
||||
#endif
|
||||
|
@ -531,11 +531,11 @@ static void IRAM_ATTR gpio_esp32_isr(void *param)
|
|||
{
|
||||
ARG_UNUSED(param);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0))
|
||||
gpio_esp32_fire_callbacks(DEVICE_DT_INST_GET(0));
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
gpio_esp32_fire_callbacks(DEVICE_DT_INST_GET(1));
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ static int gpio_gd32_init(const struct device *port)
|
|||
}, \
|
||||
.reg = DT_INST_REG_ADDR(n), \
|
||||
.clkid = DT_INST_CLOCKS_CELL(n, id), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(SYSCFG_NODE, okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(SYSCFG_NODE), \
|
||||
(.clkid_exti = DT_CLOCKS_CELL(SYSCFG_NODE, id),), \
|
||||
(.clkid_exti = DT_CLOCKS_CELL(AFIO_NODE, id),)) \
|
||||
.reset = RESET_DT_SPEC_INST_GET(n), \
|
||||
|
|
|
@ -459,21 +459,21 @@ static void gpio_lpc11u6x_isr(const void *arg)
|
|||
}
|
||||
}
|
||||
/* For each port with active pins, fire the GPIO interrupt callbacks. */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0))
|
||||
if (pins[0]) {
|
||||
port = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||
data = port->data;
|
||||
gpio_fire_callbacks(&data->cb_list, port, pins[0]);
|
||||
}
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
if (pins[1]) {
|
||||
port = DEVICE_DT_GET(DT_NODELABEL(gpio1));
|
||||
data = port->data;
|
||||
gpio_fire_callbacks(&data->cb_list, port, pins[1]);
|
||||
}
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2))
|
||||
if (pins[2]) {
|
||||
port = DEVICE_DT_GET(DT_NODELABEL(gpio2));
|
||||
data = port->data;
|
||||
|
@ -589,14 +589,14 @@ DEVICE_DT_DEFINE(DT_NODELABEL(gpio##id), \
|
|||
PRE_KERNEL_2, CONFIG_GPIO_INIT_PRIORITY, \
|
||||
&gpio_lpc11u6x_driver_api)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0))
|
||||
GPIO_LPC11U6X_INIT(0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
GPIO_LPC11U6X_INIT(1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2))
|
||||
GPIO_LPC11U6X_INIT(2);
|
||||
#endif
|
||||
|
|
|
@ -341,7 +341,7 @@ static const struct gpio_driver_api gpio_xec_driver_api = {
|
|||
.manage_callback = gpio_xec_manage_callback,
|
||||
};
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_000_036), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_000_036))
|
||||
static int gpio_xec_port000_036_init(const struct device *dev);
|
||||
|
||||
static const struct gpio_xec_config gpio_xec_port000_036_config = {
|
||||
|
@ -385,9 +385,9 @@ static int gpio_xec_port000_036_init(const struct device *dev)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_000_036), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_000_036)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_040_076), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_040_076))
|
||||
static int gpio_xec_port040_076_init(const struct device *dev);
|
||||
|
||||
static const struct gpio_xec_config gpio_xec_port040_076_config = {
|
||||
|
@ -431,9 +431,9 @@ static int gpio_xec_port040_076_init(const struct device *dev)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_040_076), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_040_076)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_100_136), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_100_136))
|
||||
static int gpio_xec_port100_136_init(const struct device *dev);
|
||||
|
||||
static const struct gpio_xec_config gpio_xec_port100_136_config = {
|
||||
|
@ -477,9 +477,9 @@ static int gpio_xec_port100_136_init(const struct device *dev)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_100_136), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_100_136)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_140_176), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_140_176))
|
||||
static int gpio_xec_port140_176_init(const struct device *dev);
|
||||
|
||||
static const struct gpio_xec_config gpio_xec_port140_176_config = {
|
||||
|
@ -523,9 +523,9 @@ static int gpio_xec_port140_176_init(const struct device *dev)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_140_176), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_140_176)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_200_236), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_200_236))
|
||||
static int gpio_xec_port200_236_init(const struct device *dev);
|
||||
|
||||
static const struct gpio_xec_config gpio_xec_port200_236_config = {
|
||||
|
@ -569,9 +569,9 @@ static int gpio_xec_port200_236_init(const struct device *dev)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_200_236), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_200_236)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_240_276), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_240_276))
|
||||
static int gpio_xec_port240_276_init(const struct device *dev);
|
||||
|
||||
static const struct gpio_xec_config gpio_xec_port240_276_config = {
|
||||
|
@ -615,4 +615,4 @@ static int gpio_xec_port240_276_init(const struct device *dev)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_240_276), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_240_276)) */
|
||||
|
|
|
@ -446,7 +446,7 @@ static const struct gpio_driver_api gpio_nrfx_drv_api_funcs = {
|
|||
|
||||
#define GPIOTE_CHECK(id) \
|
||||
COND_CODE_1(DT_INST_NODE_HAS_PROP(id, gpiote_instance), \
|
||||
(BUILD_ASSERT(DT_NODE_HAS_STATUS(GPIOTE_PHANDLE(id), okay), \
|
||||
(BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(GPIOTE_PHANDLE(id)), \
|
||||
"Please enable GPIOTE instance for used GPIO port!")), \
|
||||
())
|
||||
|
||||
|
|
|
@ -519,7 +519,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = {
|
|||
DT_NODE_HAS_PROP(DT_DRV_INST(n), interrupts)), \
|
||||
"interrupts and interrupt-parent must be set when " \
|
||||
"using external interrupts"); \
|
||||
IF_ENABLED(DT_NODE_HAS_STATUS(GPIO_NXP_S32_EIRQ_NODE(n), okay), ( \
|
||||
IF_ENABLED(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_EIRQ_NODE(n)), ( \
|
||||
static uint8_t gpio_nxp_s32_eirq_data_##n[] = { \
|
||||
LISTIFY(DT_NUM_IRQS(DT_DRV_INST(n)), \
|
||||
GPIO_NXP_S32_EIRQ_PIN_LINE, (,), n) \
|
||||
|
@ -533,7 +533,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = {
|
|||
))
|
||||
|
||||
#define GPIO_NXP_S32_GET_EIRQ_INFO(n) \
|
||||
.eirq_info = UTIL_AND(DT_NODE_HAS_STATUS(GPIO_NXP_S32_EIRQ_NODE(n), okay),\
|
||||
.eirq_info = UTIL_AND(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_EIRQ_NODE(n)),\
|
||||
&gpio_nxp_s32_eirq_##n),
|
||||
#else
|
||||
#define GPIO_NXP_S32_SET_EIRQ_INFO(n)
|
||||
|
@ -547,7 +547,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = {
|
|||
BUILD_ASSERT((DT_INST_NODE_HAS_PROP(n, nxp_wkpu) == \
|
||||
DT_INST_NODE_HAS_PROP(n, nxp_wkpu_interrupts)), \
|
||||
"nxp,wkpu and nxp,wkpu-interrupts must be provided"); \
|
||||
IF_ENABLED(DT_NODE_HAS_STATUS(GPIO_NXP_S32_WKPU_NODE(n), okay), ( \
|
||||
IF_ENABLED(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_WKPU_NODE(n)), ( \
|
||||
static uint8_t gpio_nxp_s32_wkpu_data_##n[] = \
|
||||
DT_INST_PROP(n, nxp_wkpu_interrupts); \
|
||||
static struct gpio_nxp_s32_irq_config gpio_nxp_s32_wkpu_##n = { \
|
||||
|
@ -560,7 +560,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = {
|
|||
))
|
||||
|
||||
#define GPIO_NXP_S32_GET_WKPU_INFO(n) \
|
||||
.wkpu_info = UTIL_AND(DT_NODE_HAS_STATUS(GPIO_NXP_S32_WKPU_NODE(n), okay),\
|
||||
.wkpu_info = UTIL_AND(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_WKPU_NODE(n)),\
|
||||
&gpio_nxp_s32_wkpu_##n)
|
||||
#else
|
||||
#define GPIO_NXP_S32_SET_WKPU_INFO(n)
|
||||
|
|
|
@ -176,7 +176,7 @@ static const struct gpio_driver_api gpio_ra_drv_api_funcs = {
|
|||
DT_REG_ADDR(DT_NODELABEL(ioport##suffix)))
|
||||
|
||||
#define GPIO_DEVICE_INIT_RA_IF_OKAY(suffix) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(ioport##suffix), okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ioport##suffix)), \
|
||||
(GPIO_DEVICE_INIT_RA(suffix)), \
|
||||
())
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ static const struct gpio_driver_api gpio_sam0_api = {
|
|||
static int gpio_sam0_init(const struct device *dev) { return 0; }
|
||||
|
||||
/* Port A */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(porta), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(porta))
|
||||
|
||||
static const struct gpio_sam0_config gpio_sam0_config_0 = {
|
||||
.common = {
|
||||
|
@ -308,7 +308,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(porta),
|
|||
#endif
|
||||
|
||||
/* Port B */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(portb), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portb))
|
||||
|
||||
static const struct gpio_sam0_config gpio_sam0_config_1 = {
|
||||
.common = {
|
||||
|
@ -330,7 +330,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(portb),
|
|||
#endif
|
||||
|
||||
/* Port C */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(portc), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portc))
|
||||
|
||||
static const struct gpio_sam0_config gpio_sam0_config_2 = {
|
||||
.common = {
|
||||
|
@ -352,7 +352,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(portc),
|
|||
#endif
|
||||
|
||||
/* Port D */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(portd), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portd))
|
||||
|
||||
static const struct gpio_sam0_config gpio_sam0_config_3 = {
|
||||
.common = {
|
||||
|
|
|
@ -702,7 +702,7 @@ static int gpio_stm32_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#if (defined(PWR_CR2_IOSV) || defined(PWR_SVMCR_IO2SV)) && \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(gpiog), okay)
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpiog))
|
||||
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
|
||||
/* Port G[15:2] requires external power supply */
|
||||
/* Cf: L4/L5 RM, Chapter "Independent I/O supply rail" */
|
||||
|
@ -752,7 +752,7 @@ static int gpio_stm32_init(const struct device *dev)
|
|||
DT_CLOCKS_CELL(DT_NODELABEL(gpio##__suffix), bus))
|
||||
|
||||
#define GPIO_DEVICE_INIT_STM32_IF_OKAY(__suffix, __SUFFIX) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(gpio##__suffix), okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio##__suffix)), \
|
||||
(GPIO_DEVICE_INIT_STM32(__suffix, __SUFFIX)), \
|
||||
())
|
||||
|
||||
|
|
|
@ -382,7 +382,7 @@ static const struct gpio_driver_api gpio_xlnx_axi_driver_api = {
|
|||
|
||||
#define GPIO_XLNX_AXI_GPIO2_HAS_COMPAT_STATUS_OKAY(n) \
|
||||
UTIL_AND(DT_NODE_HAS_COMPAT(DT_INST_CHILD(n, gpio2), xlnx_xps_gpio_1_00_a_gpio2), \
|
||||
DT_NODE_HAS_STATUS(DT_INST_CHILD(n, gpio2), okay))
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_INST_CHILD(n, gpio2)))
|
||||
|
||||
#define GPIO_XLNX_AXI_GPIO2_COND_INIT(n) \
|
||||
IF_ENABLED(UTIL_AND(DT_INST_PROP_OR(n, xlnx_is_dual, 1), \
|
||||
|
|
|
@ -843,7 +843,7 @@ static int IRAM_ATTR i2c_esp32_init(const struct device *dev)
|
|||
&i2c_esp32_config_##idx, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \
|
||||
&i2c_esp32_driver_api);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(I2C(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(I2C(0))
|
||||
#ifndef SOC_I2C_SUPPORT_HW_CLR_BUS
|
||||
#if !DT_NODE_HAS_PROP(I2C(0), sda_gpios) || !DT_NODE_HAS_PROP(I2C(0), scl_gpios)
|
||||
#error "Missing <sda-gpios> and <scl-gpios> properties to build for this target."
|
||||
|
@ -854,9 +854,9 @@ static int IRAM_ATTR i2c_esp32_init(const struct device *dev)
|
|||
#endif
|
||||
#endif /* !SOC_I2C_SUPPORT_HW_CLR_BUS */
|
||||
ESP32_I2C_INIT(0);
|
||||
#endif /* DT_NODE_HAS_STATUS(I2C(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(I2C(0)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(I2C(1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(I2C(1))
|
||||
#ifndef SOC_I2C_SUPPORT_HW_CLR_BUS
|
||||
#if !DT_NODE_HAS_PROP(I2C(1), sda_gpios) || !DT_NODE_HAS_PROP(I2C(1), scl_gpios)
|
||||
#error "Missing <sda-gpios> and <scl-gpios> properties to build for this target."
|
||||
|
@ -867,4 +867,4 @@ ESP32_I2C_INIT(0);
|
|||
#endif
|
||||
#endif /* !SOC_I2C_SUPPORT_HW_CLR_BUS */
|
||||
ESP32_I2C_INIT(1);
|
||||
#endif /* DT_NODE_HAS_STATUS(I2C(1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(I2C(1)) */
|
||||
|
|
|
@ -634,9 +634,9 @@ static const struct i2s_driver_api i2s_litex_driver_api = {
|
|||
irq_enable(DT_IRQN(DT_NODELABEL(i2s_##dir))); \
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s_rx), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2s_rx))
|
||||
I2S_INIT(rx);
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s_tx), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2s_tx))
|
||||
I2S_INIT(tx);
|
||||
#endif
|
||||
|
|
|
@ -445,7 +445,7 @@ int mchp_ecia_info_unset_callback(int ecia_info)
|
|||
* Leaving a node disabled also allows another driver/application to take over
|
||||
* aggregation by managing the GIRQ itself.
|
||||
*/
|
||||
#define XEC_CHK_REQ_AGGR(n) DT_NODE_HAS_STATUS(n, okay) |
|
||||
#define XEC_CHK_REQ_AGGR(n) DT_NODE_HAS_STATUS_OKAY(n) |
|
||||
|
||||
#define XEC_ECIA_REQUIRE_AGGR_ISR \
|
||||
( \
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, greeled_lpd8806), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, greeled_lpd8806))
|
||||
#define DT_DRV_COMPAT greeled_lpd8806
|
||||
#else
|
||||
#define DT_DRV_COMPAT greeled_lpd8803
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
LOG_MODULE_REGISTER(lora_shell, CONFIG_LORA_LOG_LEVEL);
|
||||
|
||||
#define DEFAULT_RADIO_NODE DT_ALIAS(lora0)
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay),
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DEFAULT_RADIO_NODE),
|
||||
"No default LoRa radio specified in DT");
|
||||
|
||||
static struct lora_modem_config modem_config = {
|
||||
|
|
|
@ -139,7 +139,7 @@ uint8_t memc_nxp_s32_qspi_get_instance(const struct device *dev)
|
|||
|
||||
#define QSPI_PORT_SIZE_FN(node_id, side_upper, port) \
|
||||
COND_CODE_1(IS_EQ(DT_REG_ADDR(node_id), QSPI_PCSF##side_upper##port), \
|
||||
(COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), \
|
||||
(COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(node_id), \
|
||||
(.memSize##side_upper##port = DT_PROP(node_id, size) / 8,), \
|
||||
(.memSize##side_upper##port = 0,))), \
|
||||
(EMPTY))
|
||||
|
|
|
@ -254,7 +254,7 @@ static int esp32_pin_configure(const uint32_t pin_mux, const uint32_t pin_cfg)
|
|||
gpio_dev_t *const gpio_dev =
|
||||
(gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio0));
|
||||
gpio_dev->out_w1ts = BIT(pin_num);
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
} else {
|
||||
gpio_dev_t *const gpio_dev =
|
||||
(gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio1));
|
||||
|
@ -268,7 +268,7 @@ static int esp32_pin_configure(const uint32_t pin_mux, const uint32_t pin_cfg)
|
|||
gpio_dev_t *const gpio_dev =
|
||||
(gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio0));
|
||||
gpio_dev->out_w1tc = BIT(pin_num);
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
} else {
|
||||
gpio_dev_t *const gpio_dev =
|
||||
(gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio1));
|
||||
|
|
|
@ -366,7 +366,7 @@ static int pinctrl_it8xxx2_init(const struct device *dev)
|
|||
gpio_base->GPIO_GCR &= ~IT8XXX2_GPIO_LPCRSTEN;
|
||||
|
||||
#ifdef CONFIG_SOC_IT8XXX2_REG_SET_V2
|
||||
#if defined(CONFIG_I2C_ITE_ENHANCE) && DT_NODE_HAS_STATUS(DT_NODELABEL(i2c5), okay)
|
||||
#if defined(CONFIG_I2C_ITE_ENHANCE) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c5))
|
||||
const struct gpio_dt_spec scl_gpios = GPIO_DT_SPEC_GET(DT_NODELABEL(i2c5), scl_gpios);
|
||||
const struct gpio_dt_spec sda_gpios = GPIO_DT_SPEC_GET(DT_NODELABEL(i2c5), sda_gpios);
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ static int pinctrl_mcux_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_sim), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_sim))
|
||||
#define PINCTRL_MCUX_DT_INST_CLOCK_SUBSYS(n) \
|
||||
CLK_GATE_DEFINE(DT_INST_CLOCKS_CELL(n, offset), DT_INST_CLOCKS_CELL(n, bits))
|
||||
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_scg_k4)
|
||||
|
|
|
@ -626,7 +626,7 @@ static int rtc_smartbond_init(const struct device *dev)
|
|||
|
||||
/* Wakeup device from RTC events (alarm/roll over) */
|
||||
#if CONFIG_PM
|
||||
bool is_xtal32m_enabled = DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay);
|
||||
bool is_xtal32m_enabled = DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m));
|
||||
int pdc_idx = da1469x_pdc_add(MCU_PDC_TRIGGER_RTC_ALARM, MCU_PDC_MASTER_M33,
|
||||
is_xtal32m_enabled ? MCU_PDC_EN_XTAL : 0);
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ enum bmi08x_odr {
|
|||
#define BMI08X_GYR_SCALE(range_dps) ((2 * range_dps * SENSOR_PI) / 180LL / 65536LL)
|
||||
|
||||
/* report of data sync is selected */
|
||||
#define BMI08X_ACCEL_DATA_SYNC_EN(inst) DT_NODE_HAS_STATUS(DT_INST_PHANDLE(inst, data_sync), okay)
|
||||
#define BMI08X_ACCEL_DATA_SYNC_EN(inst) DT_NODE_HAS_STATUS_OKAY(DT_INST_PHANDLE(inst, data_sync))
|
||||
/* Macro used for compile time optimization to compile in/out code used for data-sync
|
||||
* if at least 1 bmi08x has data-sync enabled
|
||||
*/
|
||||
|
|
|
@ -287,7 +287,7 @@ static int stm32_temp_init(const struct device *dev)
|
|||
* this driver even if the ADC used for measurement is disabled. In such cases,
|
||||
* fail build with an explicit error message.
|
||||
*/
|
||||
#if !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0))
|
||||
|
||||
/* Use BUILD_ASSERT to get preprocessing on the message */
|
||||
BUILD_ASSERT(0, "ADC '" DT_NODE_FULL_NAME(DT_INST_IO_CHANNELS_CTLR(0)) "' needed by "
|
||||
|
@ -334,4 +334,4 @@ SENSOR_DEVICE_DT_INST_DEFINE(0, stm32_temp_init, NULL,
|
|||
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY,
|
||||
&stm32_temp_driver_api);
|
||||
|
||||
#endif /* !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay) */
|
||||
#endif /* !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0)) */
|
||||
|
|
|
@ -125,7 +125,7 @@ static int stm32_vbat_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#define ASSERT_VBAT_ADC_ENABLED(inst) \
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(inst), okay), \
|
||||
BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(inst)), \
|
||||
"ADC instance '" DT_NODE_FULL_NAME(DT_INST_IO_CHANNELS_CTLR(inst)) "' needed " \
|
||||
"by Vbat sensor '" DT_NODE_FULL_NAME(DT_DRV_INST(inst)) "' is not enabled")
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ static int stm32_vref_init(const struct device *dev)
|
|||
* possible to compile this driver even if the ADC used for measurement is
|
||||
* disabled. In such cases, fail build with an explicit error message.
|
||||
*/
|
||||
#if !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0))
|
||||
|
||||
/* Use BUILD_ASSERT to get preprocessing on the message */
|
||||
BUILD_ASSERT(0, "ADC '" DT_NODE_FULL_NAME(DT_INST_IO_CHANNELS_CTLR(0)) "' needed by "
|
||||
|
@ -183,4 +183,4 @@ static const struct stm32_vref_config stm32_vref_dev_config = {
|
|||
SENSOR_DEVICE_DT_INST_DEFINE(0, stm32_vref_init, NULL, &stm32_vref_dev_data, &stm32_vref_dev_config,
|
||||
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &stm32_vref_driver_api);
|
||||
|
||||
#endif /* !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay) */
|
||||
#endif /* !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0)) */
|
||||
|
|
|
@ -317,7 +317,7 @@ static const struct uart_driver_api leuart_gecko_driver_api = {
|
|||
#endif
|
||||
};
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
|
||||
#define PIN_LEUART_0_RXD {DT_INST_PROP_BY_IDX(0, location_rx, 1), \
|
||||
DT_INST_PROP_BY_IDX(0, location_rx, 2), gpioModeInput, 1}
|
||||
|
@ -368,9 +368,9 @@ static void leuart_gecko_config_func_0(const struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1))
|
||||
|
||||
#define PIN_LEUART_1_RXD {DT_INST_PROP_BY_IDX(1, location_rx, 1), \
|
||||
DT_INST_PROP_BY_IDX(1, location_rx, 2), gpioModeInput, 1}
|
||||
|
@ -421,4 +421,4 @@ static void leuart_gecko_config_func_1(const struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */
|
||||
|
|
|
@ -475,7 +475,7 @@ static const struct uart_driver_api uart_cmsdk_apb_driver_api = {
|
|||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
|
||||
};
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void uart_cmsdk_apb_irq_config_func_0(const struct device *dev);
|
||||
|
@ -538,9 +538,9 @@ static void uart_cmsdk_apb_irq_config_func_0(const struct device *dev)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1))
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void uart_cmsdk_apb_irq_config_func_1(const struct device *dev);
|
||||
|
@ -603,9 +603,9 @@ static void uart_cmsdk_apb_irq_config_func_1(const struct device *dev)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(2))
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void uart_cmsdk_apb_irq_config_func_2(const struct device *dev);
|
||||
|
@ -668,9 +668,9 @@ static void uart_cmsdk_apb_irq_config_func_2(const struct device *dev)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(2)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(3))
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void uart_cmsdk_apb_irq_config_func_3(const struct device *dev);
|
||||
|
@ -733,9 +733,9 @@ static void uart_cmsdk_apb_irq_config_func_3(const struct device *dev)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(3)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(4))
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void uart_cmsdk_apb_irq_config_func_4(const struct device *dev);
|
||||
|
@ -798,4 +798,4 @@ static void uart_cmsdk_apb_irq_config_func_4(const struct device *dev)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(4)) */
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include "uart_lpc11u6x.h"
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0))
|
||||
static int lpc11u6x_uart0_poll_in(const struct device *dev, unsigned char *c)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = dev->config;
|
||||
|
@ -443,12 +443,12 @@ static void lpc11u6x_uart0_isr_config(const struct device *dev)
|
|||
}
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))
|
||||
|
||||
static int lpc11u6x_uartx_poll_in(const struct device *dev, unsigned char *c)
|
||||
{
|
||||
|
@ -810,18 +810,18 @@ static int lpc11u6x_uartx_init(const struct device *dev)
|
|||
LPC11U6X_UARTX_CFG_ENABLE;
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))
|
||||
lpc11u6x_uartx_isr_config_1(dev);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) ||
|
||||
* DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) ||
|
||||
* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))
|
||||
*/
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))
|
||||
lpc11u6x_uartx_isr_config_2(dev);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) ||
|
||||
* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) ||
|
||||
* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))
|
||||
*/
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
|
||||
return 0;
|
||||
|
@ -876,44 +876,44 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \
|
|||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uartx_api)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1))
|
||||
LPC11U6X_UARTX_INIT(1);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2))
|
||||
LPC11U6X_UARTX_INIT(2);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))
|
||||
LPC11U6X_UARTX_INIT(3);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))
|
||||
LPC11U6X_UARTX_INIT(4);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) */
|
||||
|
||||
#if CONFIG_UART_INTERRUPT_DRIVEN && \
|
||||
(DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay))
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)))
|
||||
|
||||
struct lpc11u6x_uartx_shared_irq lpc11u6x_uartx_shared_irq_info_1 = {
|
||||
.devices = {
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1))
|
||||
DEVICE_DT_GET(DT_NODELABEL(uart1)),
|
||||
#else
|
||||
NULL,
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) */
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))
|
||||
DEVICE_DT_GET(DT_NODELABEL(uart4)),
|
||||
#else
|
||||
NULL,
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) */
|
||||
},
|
||||
};
|
||||
|
||||
static void lpc11u6x_uartx_isr_config_1(const struct device *dev)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1))
|
||||
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(uart1)),
|
||||
DT_IRQ(DT_NODELABEL(uart1), priority),
|
||||
lpc11u6x_uartx_shared_isr,
|
||||
|
@ -927,34 +927,34 @@ static void lpc11u6x_uartx_isr_config_1(const struct device *dev)
|
|||
&lpc11u6x_uartx_shared_irq_info_1,
|
||||
0);
|
||||
irq_enable(DT_IRQN(DT_NODELABEL(uart4)));
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) */
|
||||
}
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN &&
|
||||
* (DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) ||
|
||||
* DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay))
|
||||
* (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) ||
|
||||
* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)))
|
||||
*/
|
||||
|
||||
#if CONFIG_UART_INTERRUPT_DRIVEN && \
|
||||
(DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay))
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)))
|
||||
struct lpc11u6x_uartx_shared_irq lpc11u6x_uartx_shared_irq_info_2 = {
|
||||
.devices = {
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2))
|
||||
DEVICE_DT_GET(DT_NODELABEL(uart2)),
|
||||
#else
|
||||
NULL,
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))
|
||||
DEVICE_DT_GET(DT_NODELABEL(uart3)),
|
||||
#else
|
||||
NULL,
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) */
|
||||
},
|
||||
};
|
||||
|
||||
static void lpc11u6x_uartx_isr_config_2(const struct device *dev)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2))
|
||||
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(uart2)),
|
||||
DT_IRQ(DT_NODELABEL(uart2), priority),
|
||||
lpc11u6x_uartx_shared_isr,
|
||||
|
@ -968,11 +968,11 @@ static void lpc11u6x_uartx_isr_config_2(const struct device *dev)
|
|||
&lpc11u6x_uartx_shared_irq_info_2,
|
||||
0);
|
||||
irq_enable(DT_IRQN(DT_NODELABEL(uart3)));
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */
|
||||
}
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN &&
|
||||
* (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) ||
|
||||
* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay))
|
||||
* (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) ||
|
||||
* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)))
|
||||
*/
|
||||
#endif /* DT_NODE_EXISTS(DT_NODELABEL(uart1) ||
|
||||
* DT_NODE_EXISTS(DT_NODELABEL(uart2) ||
|
||||
|
|
|
@ -199,20 +199,20 @@ struct lpc11u6x_uartx_shared_irq {
|
|||
};
|
||||
|
||||
#if CONFIG_UART_INTERRUPT_DRIVEN && \
|
||||
(DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay))
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)))
|
||||
static void lpc11u6x_uartx_isr_config_1(const struct device *dev);
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN &&
|
||||
* (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) ||
|
||||
* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay))
|
||||
* (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) ||
|
||||
* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)))
|
||||
*/
|
||||
|
||||
#if CONFIG_UART_INTERRUPT_DRIVEN && \
|
||||
(DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay))
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)))
|
||||
static void lpc11u6x_uartx_isr_config_2(const struct device *dev);
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN &&
|
||||
* (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) ||
|
||||
* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay))
|
||||
* (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) ||
|
||||
* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)))
|
||||
*/
|
||||
#endif /* ZEPHYR_DRIVERS_SERIAL_UART_LPC11U6X_H_ */
|
||||
|
|
|
@ -387,7 +387,7 @@ static const struct uart_driver_api uart_miv_driver_api = {
|
|||
BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) <= 1,
|
||||
"unsupported uart_miv instance");
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0))
|
||||
|
||||
static struct uart_miv_data uart_miv_data_0;
|
||||
|
||||
|
@ -424,4 +424,4 @@ static void uart_miv_irq_cfg_func_0(const struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */
|
||||
|
|
|
@ -1227,11 +1227,11 @@ static int spi_smartbond_isr_connect(const struct device *dev)
|
|||
|
||||
switch ((uint32_t)cfg->regs) {
|
||||
case (uint32_t)SPI:
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(spi), okay),
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(spi)),
|
||||
(SPI_SMARTBOND_ISR_CONNECT), (NULL));
|
||||
break;
|
||||
case (uint32_t)SPI2:
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay),
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(spi2)),
|
||||
(SPI2_SMARTBOND_ISR_CONNECT), (NULL));
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -681,7 +681,7 @@ static const struct spi_driver_api spi_qmspi_driver_api = {
|
|||
DT_INST_PROP(0, dldh), \
|
||||
DT_INST_PROP(0, dcsda))
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi))
|
||||
|
||||
PINCTRL_DT_INST_DEFINE(0);
|
||||
|
||||
|
@ -708,4 +708,4 @@ DEVICE_DT_INST_DEFINE(0,
|
|||
&spi_qmspi_0_config, POST_KERNEL,
|
||||
CONFIG_SPI_INIT_PRIORITY, &spi_qmspi_driver_api);
|
||||
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) */
|
||||
#endif /* DT_NODE_HAS_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) */
|
||||
|
|
|
@ -36,7 +36,7 @@ static OSTIMER_Type *base;
|
|||
* certain deep sleep modes and the time elapsed when it is powered off.
|
||||
*/
|
||||
static uint64_t cyc_sys_compensated;
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM
|
||||
static const struct device *counter_dev;
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +71,7 @@ void mcux_lpc_ostick_isr(const void *arg)
|
|||
sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : 1);
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM
|
||||
|
||||
/* The OS Timer is disabled in certain low power modes and cannot wakeup the system
|
||||
* on timeout. This function will be called by the low power code to allow the
|
||||
|
@ -178,7 +178,7 @@ void sys_clock_set_timeout(int32_t ticks, bool idle)
|
|||
return;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM
|
||||
if (idle) {
|
||||
/* OS Timer may not be able to wakeup in certain low power modes.
|
||||
* For these cases, we start a counter that can wakeup
|
||||
|
@ -247,7 +247,7 @@ uint64_t sys_clock_cycle_get_64(void)
|
|||
|
||||
void sys_clock_idle_exit(void)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM
|
||||
/* The tick should be compensated for states where the
|
||||
* OS Timer is disabled
|
||||
*/
|
||||
|
@ -280,7 +280,7 @@ static int sys_clock_driver_init(void)
|
|||
irq_enable(DT_INST_IRQN(0));
|
||||
|
||||
/* On some SoC's, OS Timer cannot wakeup from low power mode in standby modes */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM
|
||||
counter_dev = DEVICE_DT_GET_OR_NULL(DT_INST_PHANDLE(0, deep_sleep_counter));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -426,7 +426,7 @@ int z_nrf_grtc_wakeup_prepare(uint64_t wake_time_us)
|
|||
nrfy_grtc_timeout_get(NRF_GRTC) * CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / 32768 +
|
||||
MAX_CC_LATCH_WAIT_TIME_US;
|
||||
k_busy_wait(wait_time);
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lfxo), okay) && NRF_GRTC_HAS_CLKSEL
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lfxo)) && NRF_GRTC_HAS_CLKSEL
|
||||
nrfx_grtc_clock_source_set(NRF_GRTC_CLKSEL_LFXO);
|
||||
#endif
|
||||
k_spin_unlock(&lock, key);
|
||||
|
@ -508,7 +508,7 @@ static int sys_clock_driver_init(void)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_NRF_GRTC_TIMER_CLOCK_MANAGEMENT) && \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(lfxo), okay) && NRF_GRTC_HAS_CLKSEL
|
||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lfxo)) && NRF_GRTC_HAS_CLKSEL
|
||||
/* Switch to LFXO as the low-frequency clock source. */
|
||||
nrfx_grtc_clock_source_set(NRF_GRTC_CLKSEL_LFXO);
|
||||
#endif
|
||||
|
|
|
@ -199,7 +199,7 @@ static int sys_clock_driver_init(void)
|
|||
uint8_t pdc_idx;
|
||||
uint8_t en_xtal;
|
||||
|
||||
en_xtal = DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay) ? MCU_PDC_EN_XTAL : 0;
|
||||
en_xtal = DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)) ? MCU_PDC_EN_XTAL : 0;
|
||||
|
||||
/* Enable wakeup by TIMER2 */
|
||||
pdc_idx = da1469x_pdc_add(MCU_PDC_TRIGGER_TIMER2, MCU_PDC_MASTER_M33, en_xtal);
|
||||
|
|
|
@ -84,17 +84,17 @@ BUILD_ASSERT(NUM_INSTS <= 1, "Only one USB device supported");
|
|||
#elif defined(CONFIG_SOC_LPC55S36)
|
||||
#define CONTROLLER_ID kUSB_ControllerLpcIp3511Fs0
|
||||
#elif defined(CONFIG_SOC_LPC55S69_CPU0) || defined(CONFIG_SOC_LPC55S69_CPU1)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usbhs), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usbhs))
|
||||
#define CONTROLLER_ID kUSB_ControllerLpcIp3511Hs0
|
||||
#elif DT_NODE_HAS_STATUS(DT_NODELABEL(usbfs), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usbfs))
|
||||
#define CONTROLLER_ID kUSB_ControllerLpcIp3511Fs0
|
||||
#endif /* LPC55s69 */
|
||||
#elif defined(CONFIG_SOC_SERIES_IMXRT11XX) || \
|
||||
defined(CONFIG_SOC_SERIES_IMXRT10XX) || \
|
||||
defined(CONFIG_SOC_SERIES_MCXN)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1))
|
||||
#define CONTROLLER_ID kUSB_ControllerEhci0
|
||||
#elif DT_NODE_HAS_STATUS(DT_NODELABEL(usb2), okay)
|
||||
#elif DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb2))
|
||||
#define CONTROLLER_ID kUSB_ControllerEhci1
|
||||
#endif /* IMX RT */
|
||||
#elif defined(CONFIG_SOC_SERIES_RW6XX)
|
||||
|
|
|
@ -1900,8 +1900,8 @@ static int usb_init(void)
|
|||
== NRF5X_REG_MODE_DCDC),
|
||||
#if NRFX_POWER_SUPPORTS_DCDCEN_VDDH
|
||||
.dcdcenhv = COND_CODE_1(CONFIG_SOC_SERIES_NRF52X,
|
||||
(DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52x_regulator_hv), okay)),
|
||||
(DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf53x_regulator_hv), okay))),
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf52x_regulator_hv))),
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf53x_regulator_hv)))),
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -824,8 +824,8 @@ static const struct udc_nrf_config udc_nrf_cfg = {
|
|||
== NRF5X_REG_MODE_DCDC),
|
||||
#if NRFX_POWER_SUPPORTS_DCDCEN_VDDH
|
||||
.dcdcenhv = COND_CODE_1(CONFIG_SOC_SERIES_NRF52X,
|
||||
(DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52x_regulator_hv), okay)),
|
||||
(DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf53x_regulator_hv), okay))),
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf52x_regulator_hv))),
|
||||
(DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf53x_regulator_hv)))),
|
||||
#endif
|
||||
},
|
||||
|
||||
|
|
|
@ -226,10 +226,10 @@ static void wdt_esp32_isr(void *arg)
|
|||
}
|
||||
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt0), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wdt0))
|
||||
ESP32_WDT_INIT(0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt1), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wdt1))
|
||||
ESP32_WDT_INIT(1);
|
||||
#endif
|
||||
|
|
|
@ -318,7 +318,7 @@ typedef int16_t device_handle_t;
|
|||
* @return a @ref device reference for the node identifier, which may be `NULL`.
|
||||
*/
|
||||
#define DEVICE_DT_GET_OR_NULL(node_id) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(node_id), \
|
||||
(DEVICE_DT_GET(node_id)), (NULL))
|
||||
|
||||
/**
|
||||
|
|
|
@ -250,7 +250,7 @@
|
|||
#endif
|
||||
|
||||
/** PLL/PLL1 clock source */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll), okay) && \
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll)) && \
|
||||
DT_NODE_HAS_PROP(DT_NODELABEL(pll), clocks)
|
||||
#define DT_PLL_CLOCKS_CTRL DT_CLOCKS_CTLR(DT_NODELABEL(pll))
|
||||
#if DT_SAME_NODE(DT_PLL_CLOCKS_CTRL, DT_NODELABEL(clk_msi))
|
||||
|
@ -275,7 +275,7 @@
|
|||
#endif
|
||||
|
||||
/** PLL2 clock source */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll2), okay) && \
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll2)) && \
|
||||
DT_NODE_HAS_PROP(DT_NODELABEL(pll2), clocks)
|
||||
#define DT_PLL2_CLOCKS_CTRL DT_CLOCKS_CTLR(DT_NODELABEL(pll2))
|
||||
#if DT_SAME_NODE(DT_PLL2_CLOCKS_CTRL, DT_NODELABEL(clk_msis))
|
||||
|
@ -291,7 +291,7 @@
|
|||
#endif
|
||||
|
||||
/** PLL3 clock source */
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll3), okay) && \
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll3)) && \
|
||||
DT_NODE_HAS_PROP(DT_NODELABEL(pll3), clocks)
|
||||
#define DT_PLL3_CLOCKS_CTRL DT_CLOCKS_CTLR(DT_NODELABEL(pll3))
|
||||
#if DT_SAME_NODE(DT_PLL3_CLOCKS_CTRL, DT_NODELABEL(clk_msis))
|
||||
|
|
|
@ -195,7 +195,7 @@ struct emul {
|
|||
* @return a @ref emul reference for the node identifier, which may be `NULL`.
|
||||
*/
|
||||
#define EMUL_DT_GET_OR_NULL(node_id) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), (EMUL_DT_GET(node_id)), (NULL))
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(node_id), (EMUL_DT_GET(node_id)), (NULL))
|
||||
|
||||
/**
|
||||
* @brief Set up a list of emulators
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
*/
|
||||
#ifdef ZTEST_UNITTEST
|
||||
#define DT_NODE_HAS_STATUS(node, status) 0
|
||||
#define DT_NODE_HAS_STATUS_OKAY(node) 0
|
||||
#else
|
||||
#include <zephyr/devicetree.h>
|
||||
#endif
|
||||
|
@ -159,7 +160,7 @@ extern char __gcov_bss_size[];
|
|||
/* end address of image, used by newlib for the heap */
|
||||
extern char _end[];
|
||||
|
||||
#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay))
|
||||
#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)))
|
||||
extern char __ccm_data_rom_start[];
|
||||
extern char __ccm_start[];
|
||||
extern char __ccm_data_start[];
|
||||
|
@ -171,14 +172,14 @@ extern char __ccm_noinit_end[];
|
|||
extern char __ccm_end[];
|
||||
#endif
|
||||
|
||||
#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_itcm), okay))
|
||||
#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm)))
|
||||
extern char __itcm_start[];
|
||||
extern char __itcm_end[];
|
||||
extern char __itcm_size[];
|
||||
extern char __itcm_load_start[];
|
||||
#endif
|
||||
|
||||
#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay))
|
||||
#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)))
|
||||
extern char __dtcm_data_start[];
|
||||
extern char __dtcm_data_end[];
|
||||
extern char __dtcm_bss_start[];
|
||||
|
@ -190,7 +191,7 @@ extern char __dtcm_start[];
|
|||
extern char __dtcm_end[];
|
||||
#endif
|
||||
|
||||
#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ocm), okay))
|
||||
#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ocm)))
|
||||
extern char __ocm_data_start[];
|
||||
extern char __ocm_data_end[];
|
||||
extern char __ocm_bss_start[];
|
||||
|
|
|
@ -194,7 +194,7 @@ struct pm_state_constraint {
|
|||
* @param idx Index within the array.
|
||||
*/
|
||||
#define Z_DT_PHANDLE_01(node_id, prop, idx) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_PHANDLE_BY_IDX(node_id, prop, idx), okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_PHANDLE_BY_IDX(node_id, prop, idx)), \
|
||||
(1), (0))
|
||||
|
||||
/**
|
||||
|
@ -207,7 +207,7 @@ struct pm_state_constraint {
|
|||
* @param node_id A node identifier with compatible zephyr,power-state
|
||||
*/
|
||||
#define Z_PM_STATE_INFO_FROM_DT_CPU(i, node_id) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i), okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)), \
|
||||
(PM_STATE_INFO_DT_INIT(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)),), ())
|
||||
|
||||
/**
|
||||
|
@ -220,7 +220,7 @@ struct pm_state_constraint {
|
|||
* @param node_id A node identifier with compatible zephyr,power-state
|
||||
*/
|
||||
#define Z_PM_STATE_FROM_DT_CPU(i, node_id) \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i), okay), \
|
||||
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)), \
|
||||
(PM_STATE_DT_INIT(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)),), ())
|
||||
|
||||
/** @endcond */
|
||||
|
|
|
@ -223,17 +223,17 @@ void z_bss_zero(void)
|
|||
}
|
||||
|
||||
z_early_memset(__bss_start, 0, __bss_end - __bss_start);
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ccm))
|
||||
z_early_memset(&__ccm_bss_start, 0,
|
||||
(uintptr_t) &__ccm_bss_end
|
||||
- (uintptr_t) &__ccm_bss_start);
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm))
|
||||
z_early_memset(&__dtcm_bss_start, 0,
|
||||
(uintptr_t) &__dtcm_bss_end
|
||||
- (uintptr_t) &__dtcm_bss_start);
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ocm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ocm))
|
||||
z_early_memset(&__ocm_bss_start, 0,
|
||||
(uintptr_t) &__ocm_bss_end
|
||||
- (uintptr_t) &__ocm_bss_start);
|
||||
|
|
|
@ -31,15 +31,15 @@ void z_data_copy(void)
|
|||
z_early_memcpy(&__ramfunc_start, &__ramfunc_load_start,
|
||||
(uintptr_t) &__ramfunc_size);
|
||||
#endif /* CONFIG_ARCH_HAS_RAMFUNC_SUPPORT */
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ccm))
|
||||
z_early_memcpy(&__ccm_data_start, &__ccm_data_rom_start,
|
||||
__ccm_data_end - __ccm_data_start);
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_itcm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm))
|
||||
z_early_memcpy(&__itcm_start, &__itcm_load_start,
|
||||
(uintptr_t) &__itcm_size);
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm))
|
||||
z_early_memcpy(&__dtcm_data_start, &__dtcm_data_load_start,
|
||||
__dtcm_data_end - __dtcm_data_start);
|
||||
#endif
|
||||
|
|
|
@ -1000,7 +1000,7 @@
|
|||
|
||||
#define NRFX_IPCT_PUB_OR_SUB_MASK(inst_num) \
|
||||
COND_CODE_1(IS_EMPTY(inst_num), \
|
||||
(DT_NODE_HAS_STATUS(NRFX_CONFIG_IPCT_LOCAL_NODE, okay)), \
|
||||
(DT_NODE_HAS_STATUS_OKAY(NRFX_CONFIG_IPCT_LOCAL_NODE)), \
|
||||
(DT_NODE_HAS_PROP(DT_NODELABEL(_CONCAT(ipct, inst_num)), owned_channels)))
|
||||
|
||||
/* Variables names generation. */
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* Get button configuration from the devicetree sw0 alias. This is mandatory.
|
||||
*/
|
||||
#define SW0_NODE DT_ALIAS(sw0)
|
||||
#if !DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
#error "Unsupported board: sw0 devicetree alias is not defined"
|
||||
#endif
|
||||
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios,
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#define LED0_NODE DT_ALIAS(led0)
|
||||
#define LED1_NODE DT_ALIAS(led1)
|
||||
|
||||
#if !DT_NODE_HAS_STATUS(LED0_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(LED0_NODE)
|
||||
#error "Unsupported board: led0 devicetree alias is not defined"
|
||||
#endif
|
||||
|
||||
#if !DT_NODE_HAS_STATUS(LED1_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(LED1_NODE)
|
||||
#error "Unsupported board: led1 devicetree alias is not defined"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ static void print_hex_number(const uint8_t *num, size_t len)
|
|||
#define SW1_NODE DT_ALIAS(sw1)
|
||||
#define SW2_NODE DT_ALIAS(sw2)
|
||||
#define SW3_NODE DT_ALIAS(sw3)
|
||||
#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) || !DT_NODE_HAS_STATUS(SW1_NODE, okay) || \
|
||||
!DT_NODE_HAS_STATUS(SW2_NODE, okay) || !DT_NODE_HAS_STATUS(SW3_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) || !DT_NODE_HAS_STATUS_OKAY(SW1_NODE) || \
|
||||
!DT_NODE_HAS_STATUS_OKAY(SW2_NODE) || !DT_NODE_HAS_STATUS_OKAY(SW3_NODE)
|
||||
#error "Unsupported board: This sample need 4 buttons to run"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ LOG_MODULE_DECLARE(ead_central_sample, CONFIG_BT_EAD_LOG_LEVEL);
|
|||
* Get button configuration from the devicetree sw0 alias. This is mandatory.
|
||||
*/
|
||||
#define SW0_NODE DT_ALIAS(sw0)
|
||||
#if !DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
#error "Unsupported board: sw0 devicetree alias is not defined"
|
||||
#endif
|
||||
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0});
|
||||
|
|
|
@ -26,7 +26,7 @@ LOG_MODULE_DECLARE(ead_peripheral_sample, CONFIG_BT_EAD_LOG_LEVEL);
|
|||
* Get button configuration from the devicetree sw0 alias. This is mandatory.
|
||||
*/
|
||||
#define SW0_NODE DT_ALIAS(sw0)
|
||||
#if !DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
#error "Unsupported board: sw0 devicetree alias is not defined"
|
||||
#endif
|
||||
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0});
|
||||
|
|
|
@ -42,7 +42,7 @@ static K_SEM_DEFINE(sem_big_sync_lost, 0, BIS_ISO_CHAN_COUNT);
|
|||
/* The devicetree node identifier for the "led0" alias. */
|
||||
#define LED0_NODE DT_ALIAS(led0)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(LED0_NODE)
|
||||
static const struct gpio_dt_spec led_gpio = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
|
||||
#define HAS_LED 1
|
||||
#define BLINK_ONOFF K_MSEC(500)
|
||||
|
|
|
@ -20,7 +20,7 @@ static uint8_t node_uuid[16];
|
|||
|
||||
K_SEM_DEFINE(sem_unprov_beacon, 0, 1);
|
||||
K_SEM_DEFINE(sem_node_added, 0, 1);
|
||||
#if DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
K_SEM_DEFINE(sem_button_pressed, 0, 1);
|
||||
#endif
|
||||
|
||||
|
@ -315,7 +315,7 @@ static uint8_t check_unconfigured(struct bt_mesh_cdb_node *node, void *data)
|
|||
return BT_MESH_CDB_ITER_CONTINUE;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0});
|
||||
static struct gpio_callback button_cb_data;
|
||||
|
||||
|
@ -366,7 +366,7 @@ int main(void)
|
|||
printk("Bluetooth initialized\n");
|
||||
bt_ready();
|
||||
|
||||
#if DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
button_init();
|
||||
#endif
|
||||
|
||||
|
@ -383,7 +383,7 @@ int main(void)
|
|||
|
||||
bin2hex(node_uuid, 16, uuid_hex_str, sizeof(uuid_hex_str));
|
||||
|
||||
#if DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
k_sem_reset(&sem_button_pressed);
|
||||
printk("Device %s detected, press button 1 to provision.\n", uuid_hex_str);
|
||||
err = k_sem_take(&sem_button_pressed, K_SECONDS(30));
|
||||
|
|
|
@ -24,7 +24,7 @@ static K_SEM_DEFINE(sem_per_sync_lost, 0, 1);
|
|||
/* The devicetree node identifier for the "led0" alias. */
|
||||
#define LED0_NODE DT_ALIAS(led0)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(LED0_NODE)
|
||||
#define HAS_LED 1
|
||||
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
|
||||
#define BLINK_ONOFF K_MSEC(500)
|
||||
|
|
|
@ -180,7 +180,7 @@ void hog_init(void)
|
|||
|
||||
void hog_button_loop(void)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
const struct gpio_dt_spec sw0 = GPIO_DT_SPEC_GET(SW0_NODE, gpios);
|
||||
|
||||
gpio_pin_configure_dt(&sw0, GPIO_INPUT);
|
||||
|
|
|
@ -123,7 +123,7 @@ static void hrs_notify(void)
|
|||
/* The devicetree node identifier for the "led0" alias. */
|
||||
#define LED0_NODE DT_ALIAS(led0)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(LED0_NODE)
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#define HAS_LED 1
|
||||
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_EXAMPLE_GPIO_WAKEUP
|
||||
#if !DT_NODE_HAS_STATUS(DT_ALIAS(wakeup_button), okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(wakeup_button))
|
||||
#error "Unsupported: wakeup-button alias is not defined"
|
||||
#else
|
||||
static const struct gpio_dt_spec wakeup_button = GPIO_DT_SPEC_GET(DT_ALIAS(wakeup_button), gpios);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
#define SW0_NODE DT_ALIAS(sw0)
|
||||
|
||||
#if !DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
#error "unsupported board: sw0 devicetree alias is not defined"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ struct divider_config {
|
|||
};
|
||||
|
||||
static const struct divider_config divider_config = {
|
||||
#if DT_NODE_HAS_STATUS(VBATT, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(VBATT)
|
||||
.io_channel = {
|
||||
DT_IO_CHANNELS_INPUT(VBATT),
|
||||
},
|
||||
|
@ -72,7 +72,7 @@ struct divider_data {
|
|||
int16_t raw;
|
||||
};
|
||||
static struct divider_data divider_data = {
|
||||
#if DT_NODE_HAS_STATUS(VBATT, okay)
|
||||
#if DT_NODE_HAS_STATUS_OKAY(VBATT)
|
||||
.adc = DEVICE_DT_GET(DT_IO_CHANNELS_CTLR(VBATT)),
|
||||
#else
|
||||
.adc = DEVICE_DT_GET(DT_IO_CHANNELS_CTLR(ZEPHYR_USER)),
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
#define SOFT_OFF_S 10U
|
||||
|
||||
#define SW0_NODE DT_ALIAS(sw0)
|
||||
#if !DT_NODE_HAS_STATUS(SW0_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
|
||||
#error "Unsupported board: sw0 devicetree alias is not defined"
|
||||
#endif
|
||||
|
||||
#define SNVS_RTC_NODE DT_NODELABEL(snvs_rtc)
|
||||
#if !DT_NODE_HAS_STATUS(SNVS_RTC_NODE, okay)
|
||||
#if !DT_NODE_HAS_STATUS_OKAY(SNVS_RTC_NODE)
|
||||
#error "Unsupported board: snvs_rtc node is not enabled"
|
||||
#endif
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue