aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/pxa2xx.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-06-15 18:06:09 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-06-15 18:06:09 +0100
commitce3203464bee89d2ae958717222981326a37775e (patch)
treeffaf81f55e71761789faa2d7a94e6a6aa8837760 /hw/arm/pxa2xx.c
parent1fd9f2df241554b68b3a19ad1c94c475c7bb85ea (diff)
downloadqemu-ce3203464bee89d2ae958717222981326a37775e.zip
qemu-ce3203464bee89d2ae958717222981326a37775e.tar.gz
qemu-ce3203464bee89d2ae958717222981326a37775e.tar.bz2
hw/arm/pxa2xx: Add reset method for pxa2xx_ssp
The pxa2xx_ssp device was missing a reset method; add one. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter..crosthwaite@xilinx.com> Message-id: 1434117989-7367-4-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/pxa2xx.c')
-rw-r--r--hw/arm/pxa2xx.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index a015c99..4ab24ca 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -756,6 +756,22 @@ static int pxa2xx_ssp_load(QEMUFile *f, void *opaque, int version_id)
return 0;
}
+static void pxa2xx_ssp_reset(DeviceState *d)
+{
+ PXA2xxSSPState *s = PXA2XX_SSP(d);
+
+ s->enable = 0;
+ s->sscr[0] = s->sscr[1] = 0;
+ s->sspsp = 0;
+ s->ssto = 0;
+ s->ssitr = 0;
+ s->sssr = 0;
+ s->sstsa = 0;
+ s->ssrsa = 0;
+ s->ssacd = 0;
+ s->rx_start = s->rx_level = 0;
+}
+
static int pxa2xx_ssp_init(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
@@ -2336,8 +2352,10 @@ PXA2xxState *pxa255_init(MemoryRegion *address_space, unsigned int sdram_size)
static void pxa2xx_ssp_class_init(ObjectClass *klass, void *data)
{
SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
+ DeviceClass *dc = DEVICE_CLASS(klass);
sdc->init = pxa2xx_ssp_init;
+ dc->reset = pxa2xx_ssp_reset;
}
static const TypeInfo pxa2xx_ssp_info = {