From patchwork Fri Jun 12 14:06:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 49833 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D05D211FD for ; Fri, 12 Jun 2015 14:06:42 +0000 (UTC) Received: by labsp1 with SMTP id sp1sf11038284lab.3 for ; Fri, 12 Jun 2015 07:06:41 -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=XJjD9AnsvOwYzMfHDJmYgk+pZSaD9Tg5KUVs8yndGz4=; b=It2ZrKYMjHf/igkyTiZIlpEsaLNJH9ScovL6fmEKFY+FIgTksME1wMV8P1ShO/q9D9 TtMxNfLd0hs8PjyBG+eCw3OdJlzKDevVSEnsp99mzDcttcRwm0V6i0iznESngZe09kF7 nqwtbcc4zoLhhyiGU1kSgC0LA4i1ce6fvexzfmPriGB01xfZAcQ4zPruH3c/s4/SZS4Y Osk5l2zVugnilKn2pbTgL60y70rbufhBdKCJWDj48F+wJ4Ylx0C90LibPRAJ0s00vTuW TvDgoQJw4xrftB8B2uP768kb4j4uYlVb8qVlK0lnvhG9BMPTdBBfqHgtdcli69Y1ZiTk 9Zkg== X-Gm-Message-State: ALoCoQmzznA0vZFnjq2QilOTc9EkhPR+4UiGQobeIjp1TKcH1UBVoWP5lwm3wbVv29iQt8iWSZ3a X-Received: by 10.180.73.137 with SMTP id l9mr4309780wiv.5.1434118001635; Fri, 12 Jun 2015 07:06:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.200 with SMTP id c8ls600100lab.81.gmail; Fri, 12 Jun 2015 07:06:41 -0700 (PDT) X-Received: by 10.152.27.74 with SMTP id r10mr15604062lag.31.1434118001467; Fri, 12 Jun 2015 07:06:41 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id k9si3461940lah.119.2015.06.12.07.06.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 07:06:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lacny3 with SMTP id ny3so2479870lac.3 for ; Fri, 12 Jun 2015 07:06:41 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr15223849lah.76.1434118001379; Fri, 12 Jun 2015 07:06:41 -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 hn6csp591139lbb; Fri, 12 Jun 2015 07:06:40 -0700 (PDT) X-Received: by 10.66.222.72 with SMTP id qk8mr23536735pac.7.1434117996232; Fri, 12 Jun 2015 07:06:36 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id cd8si5486346pdb.166.2015.06.12.07.06.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Jun 2015 07:06:36 -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 1Z3PbJ-0001vT-Rv; Fri, 12 Jun 2015 15:06:29 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Peter Crosthwaite Subject: [PATCH v2 3/5] hw/arm/pxa2xx: Add reset method for pxa2xx_ssp Date: Fri, 12 Jun 2015 15:06:27 +0100 Message-Id: <1434117989-7367-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1434117989-7367-1-git-send-email-peter.maydell@linaro.org> References: <1434117989-7367-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.43 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 Reviewed-by: Peter Crosthwaite --- hw/arm/pxa2xx.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 6f80496..59bc0a6 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 = {