On 07/28/2016 04:37 AM, Andrew Jeffery wrote:
> I did a similar thing in the series introducing the AST2400 SoC, and
> Peter had a comment on the approach[1]:
> 
>     What we do now is not let the user override the cpu model at all;
>     presumably this SoC only ever has an ARM926 and it doesn't make
>     any sense to have some frankenstein "this SoC but with a different
>     CPU in it" config.
> 
> Given this is the ast2400_init() it looks to me like we should be
> hardwiring the CPU rather than leaving it to the machine to define.

ok. so if we consider that the platform did the setting, we can reduce 
the patch to :

-    s->cpu = cpu_arm_init("arm926");
+    s->cpu = cpu_arm_init(current_machine->cpu_model);

Cheers,

C.

Reply via email to