Lines Matching refs:base
11 static void flash_deinit(FLEXSPI_Type *base) in flash_deinit() argument
17 base->MCR0 &= ~FLEXSPI_MCR0_MDIS_MASK; in flash_deinit()
20 while (!((base->STS0 & FLEXSPI_STS0_ARBIDLE_MASK) && in flash_deinit()
21 (base->STS0 & FLEXSPI_STS0_SEQIDLE_MASK))) { in flash_deinit()
24 base->MCR0 |= FLEXSPI_MCR0_MDIS_MASK; in flash_deinit()
27 static void flash_init(FLEXSPI_Type *base) in flash_init() argument
36 base->DLLCR[0] = 0x1U; in flash_init()
39 base->MCR0 &= ~FLEXSPI_MCR0_MDIS_MASK; in flash_init()
41 base->MCR0 |= FLEXSPI_MCR0_SWRESET_MASK; in flash_init()
42 while (base->MCR0 & FLEXSPI_MCR0_SWRESET_MASK) { in flash_init()
46 if (0U != (base->DLLCR[0] & FLEXSPI_DLLCR_DLLEN_MASK)) { in flash_init()
47 lastStatus = base->STS2; in flash_init()
51 status = base->STS2; in flash_init()
78 void flexspi_setup_clock(FLEXSPI_Type *base, uint32_t src, uint32_t divider) in flexspi_setup_clock() argument
80 if (base == FLEXSPI0) { in flexspi_setup_clock()
89 flash_deinit(base); in flexspi_setup_clock()
103 flash_init(base); in flexspi_setup_clock()
105 } else if (base == FLEXSPI1) { in flexspi_setup_clock()
114 flash_deinit(base); in flexspi_setup_clock()
128 flash_init(base); in flexspi_setup_clock()