ITE: cleanup: soc: chip_chipregs: Rename the structure name of register
Rename the structure of flash_it8xxx2_regs to smfi_it8xxx2_regs. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This commit is contained in:
parent
2937beb085
commit
b3f46ccaec
4 changed files with 32 additions and 31 deletions
|
@ -26,7 +26,7 @@
|
|||
LOG_MODULE_REGISTER(flash_ite_it8xxx2);
|
||||
|
||||
#define FLASH_IT8XXX2_REG_BASE \
|
||||
((struct flash_it8xxx2_regs *)DT_INST_REG_ADDR(0))
|
||||
((struct smfi_it8xxx2_regs *)DT_INST_REG_ADDR(0))
|
||||
|
||||
struct flash_it8xxx2_dev_data {
|
||||
struct k_sem sem;
|
||||
|
@ -104,7 +104,7 @@ void __soc_ram_code ramcode_reset_i_cache(void)
|
|||
|
||||
void __soc_ram_code ramcode_flash_follow_mode(void)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
/*
|
||||
* ECINDAR3-0 are EC-indirect memory address registers.
|
||||
*
|
||||
|
@ -125,7 +125,7 @@ void __soc_ram_code ramcode_flash_follow_mode(void)
|
|||
|
||||
void __soc_ram_code ramcode_flash_follow_mode_exit(void)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
|
||||
/* Exit follow mode, and keep the setting of selecting internal flash */
|
||||
flash_regs->SMFI_ECINDAR3 = EC_INDIRECT_READ_INTERNAL_FLASH;
|
||||
|
@ -134,7 +134,7 @@ void __soc_ram_code ramcode_flash_follow_mode_exit(void)
|
|||
|
||||
void __soc_ram_code ramcode_flash_fsce_high(void)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
|
||||
/* FSCE# high level */
|
||||
flash_regs->SMFI_ECINDAR1 = (FLASH_FSCE_HIGH_ADDRESS >> 8) & GENMASK(7, 0);
|
||||
|
@ -157,7 +157,7 @@ void __soc_ram_code ramcode_flash_fsce_high(void)
|
|||
|
||||
void __soc_ram_code ramcode_flash_write_dat(uint8_t wdata)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
|
||||
/* Write data to FMOSI */
|
||||
flash_regs->SMFI_ECINDDR = wdata;
|
||||
|
@ -166,7 +166,7 @@ void __soc_ram_code ramcode_flash_write_dat(uint8_t wdata)
|
|||
void __soc_ram_code ramcode_flash_transaction(int wlen, uint8_t *wbuf, int rlen, uint8_t *rbuf,
|
||||
enum flash_transaction_cmd cmd_end)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
int i;
|
||||
|
||||
/* FSCE# with low level */
|
||||
|
@ -188,7 +188,7 @@ void __soc_ram_code ramcode_flash_transaction(int wlen, uint8_t *wbuf, int rlen,
|
|||
void __soc_ram_code ramcode_flash_cmd_read_status(enum flash_status_mask mask,
|
||||
enum flash_status_mask target)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
uint8_t cmd_rs[] = {FLASH_CMD_RS};
|
||||
|
||||
/* Send read status command */
|
||||
|
@ -340,7 +340,7 @@ void __soc_ram_code ramcode_flash_erase(int addr, int cmd)
|
|||
static int __soc_ram_code flash_it8xxx2_read(const struct device *dev, off_t offset, void *data,
|
||||
size_t len)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
uint8_t *data_t = data;
|
||||
int i;
|
||||
|
||||
|
@ -461,7 +461,7 @@ flash_it8xxx2_get_parameters(const struct device *dev)
|
|||
|
||||
static int flash_it8xxx2_init(const struct device *dev)
|
||||
{
|
||||
struct flash_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct smfi_it8xxx2_regs *const flash_regs = FLASH_IT8XXX2_REG_BASE;
|
||||
struct flash_it8xxx2_dev_data *data = dev->data;
|
||||
|
||||
/* By default, select internal flash for indirect fast read. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue