summaryrefslogtreecommitdiffstats
path: root/hw/arm/tosa.c
diff options
context:
space:
mode:
authorCédric Le Goater2016-07-04 14:06:37 +0200
committerPeter Maydell2016-07-04 14:15:22 +0200
commit7673bb4cd305637b37bd0c0b79dd3bf6deb55172 (patch)
treecdbde26ac2323bac0cf260941d585baad2056897 /hw/arm/tosa.c
parentxilinx_zynq: Connect devcfg to the Zynq machine model (diff)
downloadqemu-7673bb4cd305637b37bd0c0b79dd3bf6deb55172.tar.gz
qemu-7673bb4cd305637b37bd0c0b79dd3bf6deb55172.tar.xz
qemu-7673bb4cd305637b37bd0c0b79dd3bf6deb55172.zip
ssi: change ssi_slave_init to be a realize ops
This enables qemu to handle late inits and report errors. All the SSI slave routine names were changed accordingly. Code was modified to handle errors when possible (m25p80 and ssi-sd) Tested with the m25p80 slave object. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-id: 1467138270-32481-2-git-send-email-clg@kaod.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/tosa.c')
-rw-r--r--hw/arm/tosa.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c
index 4e9494f94c..2db66508b5 100644
--- a/hw/arm/tosa.c
+++ b/hw/arm/tosa.c
@@ -127,10 +127,9 @@ static uint32_t tosa_ssp_tansfer(SSISlave *dev, uint32_t value)
return 0;
}
-static int tosa_ssp_init(SSISlave *dev)
+static void tosa_ssp_realize(SSISlave *dev, Error **errp)
{
/* Nothing to do. */
- return 0;
}
#define TYPE_TOSA_DAC "tosa_dac"
@@ -283,7 +282,7 @@ static void tosa_ssp_class_init(ObjectClass *klass, void *data)
{
SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
- k->init = tosa_ssp_init;
+ k->realize = tosa_ssp_realize;
k->transfer = tosa_ssp_tansfer;
}