From patchwork Tue Oct 25 02:07:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9393855 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E95BC607F0 for ; Tue, 25 Oct 2016 02:08:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC66829241 for ; Tue, 25 Oct 2016 02:08:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D11F829243; Tue, 25 Oct 2016 02:08:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8AE5829241 for ; Tue, 25 Oct 2016 02:08:33 +0000 (UTC) Received: from localhost ([::1]:51156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byrAG-0005Mj-P7 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Oct 2016 22:08:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byr9o-0005L9-8i for qemu-devel@nongnu.org; Mon, 24 Oct 2016 22:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byr9l-0008UZ-4A for qemu-devel@nongnu.org; Mon, 24 Oct 2016 22:08:04 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:34780) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1byr9k-0008UI-VR for qemu-devel@nongnu.org; Mon, 24 Oct 2016 22:08:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Message-Id:Date:Subject:Cc:To:From; bh=pwnoPxqsIc/2AYvJA0is2E1mjxos8a6afz+OyyehVNU=; b=5hVKFvoyXMQn9J2Sf4G+PHUo6S NNS0KazOBMIlqL2/O0v7h4EklvwjBG7uHv/r9t3SKOtss7xXotuG3zyCJWtPsZbt1TZF6jZQf4WJ8 3zeccz8/vKpZVJeSEzdrBjZCpttO8LiS1cYECrigZwmLF2ezCPNvSgOBtUSBU9k+ypUFw86pm8N8d ufFJzGGZjt+qs1a9glboHxF2PSy9xMTIXGDmC0wm6zGNFdbHdbDXa11sB64zN7ewOxVVqJ162qnGs XwOnzK2sWulx4AyCXEvd9zBK/cRP4dHZVcZn12hYJSsCX2+5yL5mdi/AEkvvSFKLukLG/IGDuh77S yRHub/UQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:34860 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1byr9g-00246B-8A; Tue, 25 Oct 2016 02:07:56 +0000 From: Guenter Roeck To: qemu-devel@nongnu.org Date: Mon, 24 Oct 2016 19:07:53 -0700 Message-Id: <1477361273-18888-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.5.0 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - nongnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.91.199.152 Subject: [Qemu-devel] [PATCH] hw/arm/pxa2xx: Set value default values for CCCR and CKEN on PXA255 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guenter Roeck Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The code used default values for PXA270 to configure CCCR. For PXA255, the resulting register value is invalid (unsupported) and resulted in a division by zero in the Linux kernel. Use default values from datasheet instead. Signed-off-by: Guenter Roeck --- hw/arm/pxa2xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 2a2a821..4d9aed4 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -2274,7 +2274,9 @@ PXA2xxState *pxa255_init(MemoryRegion *address_space, unsigned int sdram_size) qdev_get_gpio_in(s->pic, PXA2XX_PIC_LCD)); s->cm_base = 0x41300000; - s->cm_regs[CCCR >> 2] = 0x02000210; /* 416.0 MHz */ + s->cm_regs[CCCR >> 2] = 0x00000121; /* from datasheet */ + s->cm_regs[CKEN >> 2] = 0x00017def; /* from datasheet */ + s->clkcfg = 0x00000009; /* Turbo mode active */ memory_region_init_io(&s->cm_iomem, NULL, &pxa2xx_cm_ops, s, "pxa2xx-cm", 0x1000); memory_region_add_subregion(address_space, s->cm_base, &s->cm_iomem);