[{"id":1774600,"web_url":"http://patchwork.ozlabs.org/comment/1774600/","msgid":"<3ca58ce6-7383-0f7a-009a-4e02b8e1b4ba@denx.de>","list_archive_url":null,"date":"2017-09-25T09:08:02","subject":"Re: [U-Boot] [PATCH v2 05/19] arm: socfpga: Enhance FPGA program\n\twrite rbf data with size >= 4 bytes","submitter":{"id":12009,"url":"http://patchwork.ozlabs.org/api/people/12009/","name":"Marek Vasut","email":"marex@denx.de"},"content":"On 09/25/2017 10:40 AM, tien.fong.chee@intel.com wrote:\n> From: Tien Fong Chee <tien.fong.chee@intel.com>\n> \n> Existing FPGA program write is always assume RBF data >= 32 bytes, so\n> any rbf data less than 32 bytes writing to FPGA would be failed.\n> This patch enhances the FPGA program write to support rbf data with\n> size >= 4 bytes.\n> \n> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>\n\nApplied, thanks\n\n> ---\n>  drivers/fpga/socfpga.c | 14 ++++++++------\n>  1 file changed, 8 insertions(+), 6 deletions(-)\n> \n> diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c\n> index 28fa16b..6e14ebd 100644\n> --- a/drivers/fpga/socfpga.c\n> +++ b/drivers/fpga/socfpga.c\n> @@ -1,5 +1,5 @@\n>  /*\n> - * Copyright (C) 2012 Altera Corporation <www.altera.com>\n> + * Copyright (C) 2012-2017 Altera Corporation <www.altera.com>\n>   * All rights reserved.\n>   *\n>   * SPDX-License-Identifier:\tBSD-3-Clause\n> @@ -55,18 +55,20 @@ void fpgamgr_program_write(const void *rbf_data, size_t rbf_size)\n>  \tuint32_t loops4 = DIV_ROUND_UP(rbf_size % 32, 4);\n>  \n>  \tasm volatile(\n> +\t\t\"\tcmp\t%2,\t#0\\n\"\n> +\t\t\"\tbeq\t2f\\n\"\n>  \t\t\"1:\tldmia\t%0!,\t{r0-r7}\\n\"\n>  \t\t\"\tstmia\t%1!,\t{r0-r7}\\n\"\n>  \t\t\"\tsub\t%1,\t#32\\n\"\n>  \t\t\"\tsubs\t%2,\t#1\\n\"\n>  \t\t\"\tbne\t1b\\n\"\n> -\t\t\"\tcmp\t%3,\t#0\\n\"\n> -\t\t\"\tbeq\t3f\\n\"\n> -\t\t\"2:\tldr\t%2,\t[%0],\t#4\\n\"\n> +\t\t\"2:\tcmp\t%3,\t#0\\n\"\n> +\t\t\"\tbeq\t4f\\n\"\n> +\t\t\"3:\tldr\t%2,\t[%0],\t#4\\n\"\n>  \t\t\"\tstr\t%2,\t[%1]\\n\"\n>  \t\t\"\tsubs\t%3,\t#1\\n\"\n> -\t\t\"\tbne\t2b\\n\"\n> -\t\t\"3:\tnop\\n\"\n> +\t\t\"\tbne\t3b\\n\"\n> +\t\t\"4:\tnop\\n\"\n>  \t\t: \"+r\"(src), \"+r\"(dst), \"+r\"(loops32), \"+r\"(loops4) :\n>  \t\t: \"r0\", \"r1\", \"r2\", \"r3\", \"r4\", \"r5\", \"r6\", \"r7\", \"cc\");\n>  }\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y106D3KbSz9tX3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 20:03:48 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 17ECAC22040; Mon, 25 Sep 2017 10:03:20 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id B18A0C22164;\n\tMon, 25 Sep 2017 09:58:47 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid D1E91C2211A; Mon, 25 Sep 2017 09:58:32 +0000 (UTC)","from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9])\n\tby lists.denx.de (Postfix) with ESMTPS id EC45FC220C7\n\tfor <u-boot@lists.denx.de>; Mon, 25 Sep 2017 09:58:27 +0000 (UTC)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3y10025rBfz1qsDr;\n\tMon, 25 Sep 2017 11:58:26 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3y100259Fpz1qqkh;\n\tMon, 25 Sep 2017 11:58:26 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id 59F2jZTnBOEZ; Mon, 25 Sep 2017 11:58:24 +0200 (CEST)","from [IPv6:::1] (unknown [195.140.253.167])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPSA;\n\tMon, 25 Sep 2017 11:58:24 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","X-Virus-Scanned":"amavisd-new at mnet-online.de","X-Auth-Info":"HT6rLUMe+B8oAqDgXo/UAaivvvlwYlFPPxQZaJkn2aE=","To":"tien.fong.chee@intel.com, u-boot@lists.denx.de","References":"<1506328815-23733-1-git-send-email-tien.fong.chee@intel.com>\n\t<1506328815-23733-6-git-send-email-tien.fong.chee@intel.com>","From":"Marek Vasut <marex@denx.de>","Message-ID":"<3ca58ce6-7383-0f7a-009a-4e02b8e1b4ba@denx.de>","Date":"Mon, 25 Sep 2017 11:08:02 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<1506328815-23733-6-git-send-email-tien.fong.chee@intel.com>","Content-Language":"en-US","Cc":"Ching Liang See <chin.liang.see@intel.com>,\n\tWestergteen Dalon <dalon.westergreen@intel.com>,\n\tTien Fong <skywindctf@gmail.com>","Subject":"Re: [U-Boot] [PATCH v2 05/19] arm: socfpga: Enhance FPGA program\n\twrite rbf data with size >= 4 bytes","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]