Skip to content

Commit d0ab7a2

Browse files
ck-telecomcfriedt
authored andcommitted
dts: bindings: clock_control: fix sf32lb clock error
fix clock id definition and clock ids Signed-off-by: Qingsong Gou <[email protected]>
1 parent 55af282 commit d0ab7a2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/zephyr/dt-bindings/clock/sf32lb-clocks-common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @param bit Configuration bit
2929
*/
3030
#define SF32LB_CLOCK_CONFIG(offset, bit) \
31-
((((offset) & SF32LB_CLOCK_OFFSET_MSK) << SF32LB_CLOCK_OFFSET_POS) | \
32-
(((bit) & SF32LB_CLOCK_BIT_MSK) << SF32LB_CLOCK_BIT_POS))
31+
((((offset) << SF32LB_CLOCK_OFFSET_POS) & SF32LB_CLOCK_OFFSET_MSK) | \
32+
(((bit) << SF32LB_CLOCK_BIT_POS) & SF32LB_CLOCK_BIT_MSK))
3333

3434
#endif /* _INCLUDE_ZEPHYR_DT_BINDINGS_CLOCK_SF32LB_CLOCKS_COMMON_H_ */

include/zephyr/dt-bindings/clock/sf32lb52x-clocks.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
*/
2525

2626
#define SF32LB52X_CLOCK_DMAC1 SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR1, 0U)
27-
#define SF32LB52X_CLOCK_MAILBOX1 SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR2, 1U)
28-
#define SF32LB52X_CLOCK_PINMUX1 SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR2, 2U)
27+
#define SF32LB52X_CLOCK_MAILBOX1 SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR1, 1U)
28+
#define SF32LB52X_CLOCK_PINMUX1 SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR1, 2U)
2929
#define SF32LB52X_CLOCK_USART2 SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR1, 4U)
3030
#define SF32LB52X_CLOCK_EZIP1 SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR1, 5U)
3131
#define SF32LB52X_CLOCK_EPIC SF32LB_CLOCK_CONFIG(SF32LB52X_RCC_ENR1, 6U)

0 commit comments

Comments
 (0)