From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56BA4C47082 for ; Tue, 8 Jun 2021 12:33:46 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 672DE6128A for ; Tue, 8 Jun 2021 12:33:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 672DE6128A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D69C82D71; Tue, 8 Jun 2021 14:33:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="fBPBKxdh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C30D882E6D; Tue, 8 Jun 2021 14:33:41 +0200 (CEST) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2AC8382D58 for ; Tue, 8 Jun 2021 14:33:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wm1-x334.google.com with SMTP id f16-20020a05600c1550b02901b00c1be4abso1837279wmg.2 for ; Tue, 08 Jun 2021 05:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VZu8k3GsDJA8TLKF6ZhEKShJacVky8Qp+OxddZTFHUo=; b=fBPBKxdhzcGlKUnlGDgunHlPr0/HfPcazvHt9lB6yb34Mc3hvE+10MmYNmGMQsoT/O ka0LfLWcNxMDLX7CP36O5MUdOpe23oZyQIuHTajmZAqYQFYY/hPgAYBJwExJQrfzEvY3 O0ztZ8fskxWY1sqtoIuzJTnx8lMsK+DqPcIFJuS+vArvY6CqjtEGUb1pfXaPTbjsIhfc rOhqK2BrKFghkZ+CKV4sPiiEZ1is3qWY5ZYuu+vC+7iLywJ205Pgls6gdTBzfwDaYYrP vQ0SQ9sqUmGB5S4N+qiWpKGpCdgjbSA88KixESxuGQFKBz4Acx2mHAloz5cCwCK9l/gS MUrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VZu8k3GsDJA8TLKF6ZhEKShJacVky8Qp+OxddZTFHUo=; b=P4VHe5HFi5I1CO1Uij8L34Pyo9fwIrBtaTxe380RYHAqp+f6+ocEBSQo/zX5giRIdx u9v5BsYYzMOSTIebXLLWQktEKiUpoD7ukczWULrjfqhry97NtYnVe2KHjkJS82J/1DeG zBVSXX8qRzxlQUZfOXlGNxqhOXdu4hbnKghAogtWAbCrlOK/jBIpEstqjspj0PWk1n5P Ebk008MCdbfbe3VsCIInAdVyvufgw2cgDVZGsC6KYQeXNpueFFBDAOw6l5W1WmktAZ14 fx5ZrHx76ww0LkIBy9h6WeycRvGEQ6XmpG9wLaBbPMdEbgyTmXJj2wjywSqIntXEmelu VFsg== X-Gm-Message-State: AOAM530ETJVmhwP5Y0xoirDVUFQgGrXNqxtqZRv5Qd/umr+n07F6uaae s4TkGCleqClDY0SNKKLLVsEhDg== X-Google-Smtp-Source: ABdhPJxx5mCwg3cOvDUsEtqN7MHHWL8gNNBGPpWIVRh8GD7KtJQcVVtEj/8KHUrknRhsnQ+rtX8CfA== X-Received: by 2002:a7b:c006:: with SMTP id c6mr3941959wmb.11.1623155617822; Tue, 08 Jun 2021 05:33:37 -0700 (PDT) Received: from trex (138.red-79-146-80.dynamicip.rima-tde.net. [79.146.80.138]) by smtp.gmail.com with ESMTPSA id p16sm20384394wrs.52.2021.06.08.05.33.36 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Jun 2021 05:33:37 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Tue, 8 Jun 2021 14:33:36 +0200 To: "Jorge Ramirez-Ortiz, Foundries" Cc: Michal Simek , u-boot@lists.denx.de Subject: Re: Zynq UltraScale MPSoC, DMA driver Message-ID: <20210608123336.GA27108@trex> References: <20210607162748.GA13505@trex> <20210607184142.GA568@trex> <20210608123002.GA25130@trex> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210608123002.GA25130@trex> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean On 08/06/21, Jorge Ramirez-Ortiz, Foundries wrote: > On 08/06/21, Michal Simek wrote: > > Hi, > > > > On 6/7/21 8:41 PM, Jorge Ramirez-Ortiz, Foundries wrote: > > > On 07/06/21, Jorge Ramirez-Ortiz, Foundries wrote: > > >> hi Michal > > >> > > >> um, when we exchanged emails about enabling ECC support for MPSoC, I > > >> left with the understanding that there already was a DMA driver > > >> available in u-boot that I could use to initialize the memory. > > >> > > >> do you have something in the works or will I have to write such a > > >> driver? compatible would be 'xlnx,zynqmp-dma-1.0' > > > > > > alternatively, would it be acceptable - upstream - If I just init ECC > > > as done by FSBL (ie, without a proper DMA driver, just accessing the > > > controller)? > > > > There are 2 things here. > > The first thing that would be the best to do it proper framework which > > is likely dma where dma_memset should be likely added. > > The second that this code should land in SPL which can't be big that's > > why this feature should be very small. > > the way I am doing it ATM is just a verbatim of XFsbl_EccInit (grabs a > channel and inits all memory to DEADBEEF). About 100 LOC total. 1:1 when ported to SPL (except the coding standards) https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/zynqmp_fsbl/src/xfsbl_initialization.c#L1574 > > I belive the FSBL copyright notice allows for that (below excerpt). > > [..] Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, [..] > > but yes this just works as expected. > > a bit trickier is where to init from - for the particular product > I am working on I can hardcode the addresses and sizes and init right > after board_init_f in spl.c...havent had the time to think about > something portable yet - if you have a suggestion I could send both > patches (one for the spl_ecc_init(addr, len) function and another one > calling it) > > thanks for your inputs > > > > > Based on above I think that would be good to have long term both of them > > in the tree. It means feel free to send short version and let's look at > > it and dma one should be hopefully pretty much using the same code via > > dma framework. > > > > Thanks, > > Michal > >