tilegx: replace cpu_tilegx_init() with cpu_generic_init()
authorIgor Mammedov <imammedo@redhat.com>
Thu, 24 Aug 2017 16:31:37 +0000 (18:31 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 1 Sep 2017 14:54:24 +0000 (11:54 -0300)
commit12f4572ec3acde40255328dad60fd8c03281c648
tree466f06592750832cdae5ad756c3fc279ed2881c2
parentda9cbe02bc0a0c4ee8148da6238eb7bbd61f17f3
tilegx: replace cpu_tilegx_init() with cpu_generic_init()

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

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1503592308-93913-15-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target/tilegx/cpu.c
target/tilegx/cpu.h