From patchwork Sun Oct 29 10:13:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francisco Iglesias X-Patchwork-Id: 831710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ELBCU9tv"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yPtww5bbdz9t1t for ; Sun, 29 Oct 2017 21:23:12 +1100 (AEDT) Received: from localhost ([::1]:35494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8kkI-0005B1-QM for incoming@patchwork.ozlabs.org; Sun, 29 Oct 2017 06:23:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8kbU-0006c8-66 for qemu-devel@nongnu.org; Sun, 29 Oct 2017 06:14:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8kbT-0007uK-CN for qemu-devel@nongnu.org; Sun, 29 Oct 2017 06:14:04 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:55790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e8kbT-0007ts-1B for qemu-devel@nongnu.org; Sun, 29 Oct 2017 06:14:03 -0400 Received: by mail-lf0-x241.google.com with SMTP id p184so11627640lfe.12 for ; Sun, 29 Oct 2017 03:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9xWCi1U1MzTiqRRKJPWrpHbnKQEwWZwqcARbHEmA394=; b=ELBCU9tvJIB5ORlqImuXemE8FsgfS8zPzyvpzW+lPGAKLXjYKqkjT23K6iqa/CpSwR aW0iLpsFJ/zpUYbRQrZbmPjU6LHDrfz4BMYgq+GLISKcvOVfThtCTlEk5mDGHQbBSj1t kvsAZt2QlmPaJ/IQ6TEvYEd75Mdi5psuk8CGzP2enuXzP6yMYzyzGIYttPP0YpZsFxTZ fGXA81iIsnTtXMnSB4cXYwD1nqMTm42UPnc21xZsyE/ockfwTUaZpBnWcdvjWNExqMMz If4cX7I1VvqSCSjF7cZFl2BwRz1JlJhjPDu6ygTBlu5hgbNsrKkqSnLU6NwyzHBXsaA3 GZag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9xWCi1U1MzTiqRRKJPWrpHbnKQEwWZwqcARbHEmA394=; b=CvmUYbUybqKC94rFeg6qia+MnwEk1+sALXtFkCkwn3Gn957Mwn8f99IU/tPlASNBaY So1yNf9TjCMTxxyimtOty1OjS48FfTBmPLfoblpp9xHIUdMkrF/KhjiFZjcJyU5l4XNz LiKTqWF6iTh+VI/MVKs+rGRV0RZRHSLo5YHkO1LFOuNkkVOUi1uy5tYjKy+sQ5j3+mBW colGRQGf5GhE/+tcrluKMAZME4XHFV/jbbxxzb0xiUQBNVyw3Rfd8InkuB/XIn8876N6 uluyKBU89Wy7uDypPq5cHFXRY4izawAq83O04l+talEtyul4JVaFLOWjHpOKslCKeu2y 1fOQ== X-Gm-Message-State: AMCzsaVTBpVAJYSFNqg7czSuhHmK36couwCKRYhDulx2qNI9BzMV66OL 9rDLyMPKPuLs3yh0ptrRXm0a6A== X-Google-Smtp-Source: ABhQp+Rjq7GuDuBZf4+9q4N+QyF1psa3VxMVnHjv8lVEVxBF+5frtwVq8FAFmYjUoxstyWI3luZjyw== X-Received: by 10.25.222.80 with SMTP id v77mr1934910lfg.151.1509272041527; Sun, 29 Oct 2017 03:14:01 -0700 (PDT) Received: from localhost.localdomain (c83-254-152-225.bredband.comhem.se. [83.254.152.225]) by smtp.gmail.com with ESMTPSA id v62sm2819800lje.39.2017.10.29.03.14.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Oct 2017 03:14:00 -0700 (PDT) From: Francisco Iglesias To: qemu-devel@nongnu.org Date: Sun, 29 Oct 2017 11:13:40 +0100 Message-Id: <20171029101343.15544-11-frasse.iglesias@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171029101343.15544-1-frasse.iglesias@gmail.com> References: <20171029101343.15544-1-frasse.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::241 Subject: [Qemu-devel] [PATCH v5 10/13] xilinx_spips: Add support for 4 byte addresses in the LQSPI 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: edgari@xilinx.com, alistai@xilinx.com, francisco.iglesias@feimtech.se, mar.krzeminski@gmail.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add support for 4 byte addresses in the LQSPI and correct LQSPI_CFG_SEP_BUS. Signed-off-by: Francisco Iglesias --- hw/ssi/xilinx_spips.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index 3a98799..7f0f317 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -92,8 +92,9 @@ #define R_LQSPI_CFG_RESET 0x03A002EB #define LQSPI_CFG_LQ_MODE (1U << 31) #define LQSPI_CFG_TWO_MEM (1 << 30) -#define LQSPI_CFG_SEP_BUS (1 << 30) +#define LQSPI_CFG_SEP_BUS (1 << 29) #define LQSPI_CFG_U_PAGE (1 << 28) +#define LQSPI_CFG_ADDR4 (1 << 27) #define LQSPI_CFG_MODE_EN (1 << 25) #define LQSPI_CFG_MODE_WIDTH 8 #define LQSPI_CFG_MODE_SHIFT 16 @@ -702,6 +703,9 @@ static void lqspi_load_cache(void *opaque, hwaddr addr) fifo8_push(&s->tx_fifo, s->regs[R_LQSPI_CFG] & LQSPI_CFG_INST_CODE); /* read address */ DB_PRINT_L(0, "pushing read address %06x\n", flash_addr); + if (s->regs[R_LQSPI_CFG] & LQSPI_CFG_ADDR4) { + fifo8_push(&s->tx_fifo, (uint8_t)(flash_addr >> 24)); + } fifo8_push(&s->tx_fifo, (uint8_t)(flash_addr >> 16)); fifo8_push(&s->tx_fifo, (uint8_t)(flash_addr >> 8)); fifo8_push(&s->tx_fifo, (uint8_t)flash_addr);