mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
spi: sn-f-ospi: Use FIELD_MODIFY()
Use FIELD_MODIFY() to remove open-coded bit manipulation. No functional change intended. Signed-off-by: Hans Zhang <18255117159@163.com> Link: https://patch.msgid.link/20260430155456.36998-7-18255117159@163.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0f2efc6d49
commit
579fcc0657
|
|
@ -222,9 +222,8 @@ static void f_ospi_config_clk(struct f_ospi *ospi, u32 device_hz)
|
|||
*/
|
||||
val = readl(ospi->base + OSPI_CLK_CTL);
|
||||
|
||||
val &= ~(OSPI_CLK_CTL_PHA | OSPI_CLK_CTL_DIV);
|
||||
val |= FIELD_PREP(OSPI_CLK_CTL_PHA, OSPI_CLK_CTL_PHA_180)
|
||||
| FIELD_PREP(OSPI_CLK_CTL_DIV, div_reg);
|
||||
FIELD_MODIFY(OSPI_CLK_CTL_PHA, &val, OSPI_CLK_CTL_PHA_180);
|
||||
FIELD_MODIFY(OSPI_CLK_CTL_DIV, &val, div_reg);
|
||||
|
||||
writel(val, ospi->base + OSPI_CLK_CTL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user