platform: generic: mips p8700: use SBI bitfield manipulator macros

Switch to GENMASK, EXTRACT_BITFIELD, INSERT_BITFIELD

Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260223-for-upstream-eyeq7h-v3-16-621d004d1a21@mobileye.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Vladimir Kondratiev
2026-02-23 16:54:55 +02:00
committed by Anup Patel
parent bdec423074
commit 76ecd8f37a
3 changed files with 21 additions and 34 deletions

View File

@@ -47,7 +47,7 @@ void mips_p8700_power_up_other_cluster(u32 hartid)
for (int i = 100; i > 0; i--) {
u32 stat = read_cpc_cm_stat_conf(hartid);
stat = EXT(stat, CPC_Cx_STAT_CONF_SEQ_STATE);
stat = EXTRACT_FIELD(stat, CPC_Cx_STAT_CONF_SEQ_STATE);
if (stat == CPC_Cx_STAT_CONF_SEQ_STATE_U5)
return;
cpu_relax();
@@ -67,7 +67,7 @@ static bool mips_hart_reached_state(void *arg)
struct mips_boot_params *p = arg;
u32 stat = read_cpc_co_stat_conf(p->hartid);
stat = EXT(stat, CPC_Cx_STAT_CONF_SEQ_STATE);
stat = EXTRACT_FIELD(stat, CPC_Cx_STAT_CONF_SEQ_STATE);
return stat == p->target_state;
}