nios2: replace cpu_nios2_init() with cpu_generic_init()
commitda9cbe02bc0a0c4ee8148da6238eb7bbd61f17f3
authorIgor Mammedov <imammedo@redhat.com>
Thu, 24 Aug 2017 16:31:36 +0000 (24 18:31 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 1 Sep 2017 14:54:24 +0000 (1 11:54 -0300)
tree4d4e3d6b0d8209a689809660ec343cbceb4d7af1
parent98aca243633014c86ab8de3a5b29ae7d024e7ef5
nios2: replace cpu_nios2_init() with cpu_generic_init()

cpu_nios2_init() always falls back to TYPE_NIOS2_CPU object
regardless of cpu_model. Put fallback logic into
nios2_cpu_class_by_name() which would translate any cpu_model
into TYPE_NIOS2_CPU class and replace cpu_nios2_init()
with cpu_generic_init()

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1503592308-93913-14-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/nios2/10m50_devboard.c
target/nios2/cpu.c
target/nios2/cpu.h