From patchwork Thu May 28 12:09:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 49061 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EAA02218EC for ; Thu, 28 May 2015 12:09:58 +0000 (UTC) Received: by wgla2 with SMTP id a2sf9704480wgl.1 for ; Thu, 28 May 2015 05:09:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=d4SFAY9d/kx99RKlroi6jxk0p6G+WW+Gi2EIljWBzzk=; b=Gt0+7JAQdm+pMrx0dfiZZvi2M1nF5kpgHD3dNURJkQtfXlsg5QKoxl0sUgoH+6D8th 7BDO7qizZie8R+weqT9IoA/fuh6BTt40K5kkMU/dQZhdUdCMa+GAURSJ/iMpW9DfM9jB VuSc5m2Euk0XXwCF4l7SPCyq/6UhK8NbEJiMh0U41RrvrktOwyXfmrOM7IE+lr7r/D3I XsQFubsB/RS+lj78Q1RTWpnPTkMJGvwX0PZliTZPZ5kW6rRT0ZLEaUMqHXUb1gQlGM2H 82CPcLiP424cHdcgPpbMogJjZ7sp8EwIIXZo6+rW3w/ghZ1SqUxOzHht+Sjzm0i+NDml 7ieg== X-Gm-Message-State: ALoCoQnl2HSU5iK00x2S4Yk9ibu+SJXiSJS50WcqMKNCEXPbUAHXVtQAYEUM+j5afpRQZ8w73e7Q X-Received: by 10.194.142.205 with SMTP id ry13mr2436304wjb.2.1432814998025; Thu, 28 May 2015 05:09:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.74 with SMTP id ju10ls182373lab.23.gmail; Thu, 28 May 2015 05:09:57 -0700 (PDT) X-Received: by 10.152.87.235 with SMTP id bb11mr2391402lab.69.1432814997867; Thu, 28 May 2015 05:09:57 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id a15si1798704lbq.57.2015.05.28.05.09.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 05:09:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lagv1 with SMTP id v1so29939008lag.3 for ; Thu, 28 May 2015 05:09:57 -0700 (PDT) X-Received: by 10.112.29.36 with SMTP id g4mr2515156lbh.56.1432814997775; Thu, 28 May 2015 05:09:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1104622lbb; Thu, 28 May 2015 05:09:57 -0700 (PDT) X-Received: by 10.194.192.166 with SMTP id hh6mr4595962wjc.127.1432814996896; Thu, 28 May 2015 05:09:56 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id g13si29237798wiw.53.2015.05.28.05.09.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 28 May 2015 05:09:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YxwdI-0003Vu-5I; Thu, 28 May 2015 13:09:56 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp Date: Thu, 28 May 2015 13:09:53 +0100 Message-Id: <1432814996-13464-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432814996-13464-1-git-send-email-peter.maydell@linaro.org> References: <1432814996-13464-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The pxa2xx_ssp device was missing a reset method; add one. Signed-off-by: Peter Maydell --- hw/arm/pxa2xx.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index fc77b44..770902f 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); @@ -2333,8 +2349,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 = {