driver: flash: Add Set/ Get write protect function
Add Set_WP function to set SPI flash WP line to low Add Get_WP function to obtain status of the SPI flash WP line Signed-off-by: Benson Huang <benson7633769@gmail.com>
This commit is contained in:
parent
42aef1be54
commit
3e8ec3aaf2
3 changed files with 41 additions and 6 deletions
|
@ -37,7 +37,8 @@ struct reg_spic_reg {
|
|||
uint16_t HALF;
|
||||
uint32_t WORD;
|
||||
} DR;
|
||||
const uint32_t RESERVED2[44];
|
||||
const uint32_t RESERVED2[43];
|
||||
uint32_t CTRLR2;
|
||||
uint32_t FBAUD;
|
||||
uint32_t USERLENGTH;
|
||||
const uint32_t RESERVED3[3];
|
||||
|
@ -107,6 +108,8 @@ struct reg_spic_reg {
|
|||
#define SPIC_RISR_FSEIR BIT(5UL)
|
||||
#define SPIC_RISR_USEIR BIT(9UL)
|
||||
#define SPIC_RISR_TFSIR BIT(10UL)
|
||||
/* CTRLR2 */
|
||||
#define SPIC_CTRLR2_WPN_SET BIT(1UL)
|
||||
/* USERLENGTH */
|
||||
#define SPIC_USERLENGTH_RDDUMMYLEN_Pos (0UL)
|
||||
#define SPIC_USERLENGTH_RDDUMMYLEN_Msk GENMASK(11, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue