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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 B4ABBC4743D for ; Tue, 8 Jun 2021 12:30:13 +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 B098760FDA for ; Tue, 8 Jun 2021 12:30:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B098760FDA 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 15FBA82D58; Tue, 8 Jun 2021 14:30:10 +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="Tp3wKMjz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A6CAA82D71; Tue, 8 Jun 2021 14:30:07 +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 17F7C82D1C for ; Tue, 8 Jun 2021 14:30:04 +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-20020a05600c1550b02901b00c1be4abso1828829wmg.2 for ; Tue, 08 Jun 2021 05:30:04 -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=SpGHxJF5i5S/BEsMaABj87vsG3DGtX+jjuQQ1E4NaPY=; b=Tp3wKMjz2ZBVlGtcO3tNte2gfpq8BUyKLpNVPuibWm1ZKftU3gkWsFenTRAURIOwaX 3m1V2+9TZcbXsrmsz2hgniumrKhkizhyqzWQBY5E2obebzWpFHNlvO1Tmv8cbD+f4pYO Kz5CQmNyHO57zHpM+1lM7U5EMwPC4mSgbtUUpt+fvuwTcOhPHBJoscQ1lMpxL8fwkSn0 CC7YMp+i9XBqh2jx7JszF445M9WBkxGODclV989wtViVQsk4NG85VwIzJlkq3hRBra1/ VWbIdfm807T13Ots5L5sBVVQpwS35Q55gjhbR9K87PgxEw/prVAa7BuEThDFhobmnGdL mu+g== 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=SpGHxJF5i5S/BEsMaABj87vsG3DGtX+jjuQQ1E4NaPY=; b=gg82JqGyW2XYQwj0gz0y/Wg+ub+kIYsAOZNF0jeVjby31Is9SiNHhcEawrgruudkgy KRvX/A7Upsf7GAB5p/O3oPzU+Sm5lPF60fSu4w/e/DrTc+X+8xfFSQZ4aZW5s4mTHAHi jV57BC80SnxWSpz6ALNOYUzG0aNtu5jk9vrEjYDRxrprfcpBMqrH17cpo4NjrqTcpJMV HM5ojAUCDU1yI0hVC4s03qXwVdTsxeg9m4rGORJM+pm7hXFwHjuaeIjG19AS/1B+88C2 BER/2V+7AtprGySN6hkXrELNfBP4PpJz4CJtsG1p5EFzdTkvEP8B7AWUFatbrqg60oNP 3cIQ== X-Gm-Message-State: AOAM53381q7aGFOFD3uL9VROMNyYjxXL+thqVc3kgAIbpU6NwfaETW+O ZL1hS5MYhAWChq/lVkwtpvzv5w== X-Google-Smtp-Source: ABdhPJzSU6WFP3k1iy5UTNX+/cNUXVFesdd6bPVCghkffvqxYnhQYR7w8diXJ5c3HeiGmd2EWkCbug== X-Received: by 2002:a1c:e91a:: with SMTP id q26mr4032800wmc.170.1623155403666; Tue, 08 Jun 2021 05:30:03 -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 g205sm2848309wme.6.2021.06.08.05.30.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Jun 2021 05:30:03 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Tue, 8 Jun 2021 14:30:02 +0200 To: Michal Simek Cc: "Jorge Ramirez-Ortiz, Foundries" , u-boot@lists.denx.de Subject: Re: Zynq UltraScale MPSoC, DMA driver Message-ID: <20210608123002.GA25130@trex> References: <20210607162748.GA13505@trex> <20210607184142.GA568@trex> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 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. 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 >