s32k14x:Make use of boot_app_shared shared_[un]lock

This commit is contained in:
David Sidrane 2023-10-20 03:31:17 -07:00 committed by David Sidrane
parent 285e0ca519
commit 85aeedd986
1 changed files with 9 additions and 5 deletions

View File

@ -116,10 +116,14 @@ int s32k1xx_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, boo
#define TIMER_HRT_CYCLES_PER_US (STM32_HCLK_FREQUENCY/1000000) #define TIMER_HRT_CYCLES_PER_US (STM32_HCLK_FREQUENCY/1000000)
#define TIMER_HRT_CYCLES_PER_MS (STM32_HCLK_FREQUENCY/1000) #define TIMER_HRT_CYCLES_PER_MS (STM32_HCLK_FREQUENCY/1000)
#define crc_HiLOC S32K1XX_CAN0_RXIMR27 #define crc_HiLOC S32K1XX_CAN0_RXIMR(27)
#define crc_LoLOC S32K1XX_CAN0_RXIMR28 #define crc_LoLOC S32K1XX_CAN0_RXIMR(28)
#define signature_LOC S32K1XX_CAN0_RXIMR29 #define signature_LOC S32K1XX_CAN0_RXIMR(29)
#define bus_speed_LOC S32K1XX_CAN0_RXIMR30 #define bus_speed_LOC S32K1XX_CAN0_RXIMR(30)
#define node_id_LOC S32K1XX_CAN0_RXIMR31 #define node_id_LOC S32K1XX_CAN0_RXIMR(31)
#define shared_unlock() do { modreg32(CAN_MCR_FRZ|CAN_MCR_HALT, CAN_MCR_FRZ|CAN_MCR_HALT, S32K1XX_CAN0_MCR); up_udelay(1000);} while (0);
#define shared_lock() do { modreg32(0, CAN_MCR_FRZ|CAN_MCR_HALT,S32K1XX_CAN0_MCR ); } while (0);
__END_DECLS __END_DECLS