From patchwork Mon Jun 30 12:47:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 32709 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 40221203F4 for ; Mon, 30 Jun 2014 12:48:50 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f10sf18365182yha.3 for ; Mon, 30 Jun 2014 05:48:50 -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:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=dgPs3KrdAXCqVGobyITouEitVg8UH1WOE069R2Cyhts=; b=CCb02KiLECEEyfQx1XIN8V/bVfSvTsRNwPNoFkotcIRkgD2xeolnvJVSzhEgtDDk6c tFUNq4xqPkYOkz9UOJ7y0zFd1zyukPHfnDdFcdSa5c/7LtQHbD0aLRk1Spj6TwdsVkTI dkOIwfkiY5lYEioU0PPSY2wnBGkWqI110XAYirWKrSv16D7WlTlg0mKvPE3vDX/cVyYx 3t/Jmxs/35S/O+0gfRHb+uklpolvBP7Jl6iXm6bsEbPfzy9/Z46vMn/EdvU4milKDbzf yEj9Ejn4PfEAVtUTYKL0dAmW1mbKmyOjbZlDfXvMaETpDkUPUsqt9Wf+AYNgljVaMQ+S 11Bg== X-Gm-Message-State: ALoCoQnj3z0f6fupAMnoLNVgMmA+jv5VyKHP9myHMRKi+O/PdIgfE/+leqicRXFlF6oKCEqhuUwU X-Received: by 10.236.67.103 with SMTP id i67mr386140yhd.56.1404132530092; Mon, 30 Jun 2014 05:48:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.102 with SMTP id 93ls1427935qgo.10.gmail; Mon, 30 Jun 2014 05:48:49 -0700 (PDT) X-Received: by 10.58.34.68 with SMTP id x4mr422880vei.50.1404132529936; Mon, 30 Jun 2014 05:48:49 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ez10si9939940vdb.103.2014.06.30.05.48.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Jun 2014 05:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id id10so7437725vcb.2 for ; Mon, 30 Jun 2014 05:48:49 -0700 (PDT) X-Received: by 10.58.220.230 with SMTP id pz6mr37832292vec.9.1404132529857; Mon, 30 Jun 2014 05:48:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp135695vcb; Mon, 30 Jun 2014 05:48:49 -0700 (PDT) X-Received: by 10.224.156.132 with SMTP id x4mr60742329qaw.101.1404132529430; Mon, 30 Jun 2014 05:48:49 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k9si716566qay.84.2014.06.30.05.48.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 30 Jun 2014 05:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:34063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1b0r-0005Of-1m for patch@linaro.org; Mon, 30 Jun 2014 08:48:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1azm-0004Ez-Ag for qemu-devel@nongnu.org; Mon, 30 Jun 2014 08:47:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1azj-0005tD-TV for qemu-devel@nongnu.org; Mon, 30 Jun 2014 08:47:42 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1azj-0005rQ-M3 for qemu-devel@nongnu.org; Mon, 30 Jun 2014 08:47:39 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1X1azb-0008T1-Rn for qemu-devel@nongnu.org; Mon, 30 Jun 2014 13:47:31 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 30 Jun 2014 13:47:28 +0100 Message-Id: <1404132451-32498-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404132451-32498-1-git-send-email-peter.maydell@linaro.org> References: <1404132451-32498-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 5/8] hw/arm/pxa2xx_gpio: Correct and register vmstate X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The pxa2xx-gpio device has a VMStateDescription, but it was accidentally never actually registered, and it wasn't quite correct. Remove the 'lines' field (this is a device property, not mutable state), add the missing 'prev_level' field, and set dc->vmsd so it actually gets used. Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- hw/arm/pxa2xx_gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c index cd506df..354ccf1 100644 --- a/hw/arm/pxa2xx_gpio.c +++ b/hw/arm/pxa2xx_gpio.c @@ -312,7 +312,6 @@ static const VMStateDescription vmstate_pxa2xx_gpio_regs = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_INT32(lines, PXA2xxGPIOInfo), VMSTATE_UINT32_ARRAY(ilevel, PXA2xxGPIOInfo, PXA2XX_GPIO_BANKS), VMSTATE_UINT32_ARRAY(olevel, PXA2xxGPIOInfo, PXA2XX_GPIO_BANKS), VMSTATE_UINT32_ARRAY(dir, PXA2xxGPIOInfo, PXA2XX_GPIO_BANKS), @@ -320,6 +319,7 @@ static const VMStateDescription vmstate_pxa2xx_gpio_regs = { VMSTATE_UINT32_ARRAY(falling, PXA2xxGPIOInfo, PXA2XX_GPIO_BANKS), VMSTATE_UINT32_ARRAY(status, PXA2xxGPIOInfo, PXA2XX_GPIO_BANKS), VMSTATE_UINT32_ARRAY(gafr, PXA2xxGPIOInfo, PXA2XX_GPIO_BANKS * 2), + VMSTATE_UINT32_ARRAY(prev_level, PXA2xxGPIOInfo, PXA2XX_GPIO_BANKS), VMSTATE_END_OF_LIST(), }, }; @@ -338,6 +338,7 @@ static void pxa2xx_gpio_class_init(ObjectClass *klass, void *data) k->init = pxa2xx_gpio_initfn; dc->desc = "PXA2xx GPIO controller"; dc->props = pxa2xx_gpio_properties; + dc->vmsd = &vmstate_pxa2xx_gpio_regs; } static const TypeInfo pxa2xx_gpio_info = {