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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 21C1CC32771 for ; Wed, 28 Sep 2022 10:22:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9300A84BF1; Wed, 28 Sep 2022 12:21:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="gdlE6IGI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3CA484BEF; Wed, 28 Sep 2022 12:21:13 +0200 (CEST) Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (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 D60B2849AB for ; Wed, 28 Sep 2022 12:21:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-oo1-xc2a.google.com with SMTP id c13-20020a4ac30d000000b0047663e3e16bso1653928ooq.6 for ; Wed, 28 Sep 2022 03:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=exNngFRtII6rsDl8t09iINj2QCA2ZzkZC2miI7lofgs=; b=gdlE6IGIYvpnJkIFuytekbGoMkbtKlnRD8ULIj+D72GhrhnsiAn2muBBx9BB+Z9Vjf OqE6e/Mh5qxus0I+32XcR8wjboB7iE9yv2+VF5fHU1zoD3PpJHLIeIwXvN3JzwST4fzU 8S4764zS4q1oWnyqjkUifMB7saT+oXwjT1yEY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=exNngFRtII6rsDl8t09iINj2QCA2ZzkZC2miI7lofgs=; b=AR/ugtunkRNduTAu9M5a2Cak4sruM0kxKYL66ji+2A3qQGW83IfBQiuI5gk9f3TGeY 741kRSK9AXmob9bp8odQVv5/3QpwdVPFhSmdR3NBZb9x9UI0IyDp14QzI4uOg7JnYroh h3X9e3hMsoDW3A2UlmrPfTnwUT7cLKiyy2/iE5OGqyUow5uvWHN+WruDby1ZOMgQZvD7 +6Sq9KOcQGUHWjhaoMpOLvCbnp3wZ2ZuPXsBOQYCzF/kANFw5ML6M405yce9LovM8PWz pBPiJLBYEcsUUmpSiKvvGwgV1EEJJ9dzvDuJt2YTIUhONjjxJJB6+EimNV0DSEEskRpw ayaA== X-Gm-Message-State: ACrzQf1tYoyv3q5UjPe0Oz/MW1svKl7IZ61ER4JAvU0S5+1SjLlEKyCG VBhV6WPmBKfJ1szb+udpHZD3amYS5Q45EaiSoyoLyA== X-Google-Smtp-Source: AMsMyM7QUV1pFuVptoeZfNEJ9Hi9SebkbRKGCMG6ikBeyzSeRD3v5FGW6nrBvon2xkxR11jEZETF3bhgcaifF5WPeq8= X-Received: by 2002:a4a:528f:0:b0:475:8c71:2b36 with SMTP id d137-20020a4a528f000000b004758c712b36mr12492237oob.39.1664360468637; Wed, 28 Sep 2022 03:21:08 -0700 (PDT) MIME-Version: 1.0 References: <20220925150248.2524421-1-sjg@chromium.org> <20220925150248.2524421-15-sjg@chromium.org> <20220926001728.GB7925@laputa> In-Reply-To: <20220926001728.GB7925@laputa> From: Simon Glass Date: Wed, 28 Sep 2022 04:20:56 -0600 Message-ID: Subject: Re: [PATCH 14/45] dm: blk: Add udevice functions To: AKASHI Takahiro , Simon Glass , U-Boot Mailing List , Tom Rini , Heinrich Schuchardt , Marek Vasut , Masahisa Kojima , Pavel Herrmann Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Takahiro, On Sun, 25 Sept 2022 at 18:17, AKASHI Takahiro wrote: > > Hi Simon, > > On Sun, Sep 25, 2022 at 09:02:17AM -0600, Simon Glass wrote: > > At present we have functions called blk_dread(), etc., which take a > > struct blk_desc * to refer to the block device. Add some functions which > > use udevice instead, since this is more in keeping with how driver model > > is supposed to work. > > Unfortunately, NAK. > I have already added similar functions in disk/disk-uclass.c > with my commit 59da9d4782cd ("dm: disk: add read/write interfaces with > udevice"). dev_read()/dev_write() works well with UCLASS_BLK (as intended). > > I remember that you also ack'ed that patch. You have a better memory than me! How about we make those functions call my new ones? Also I think we should rename your functions to avoid using the dev_read prefix, since this is for reading from the device tree. Perhaps disk_read()? Also it seems that we could rationalise the code between disk_read() and part_read() ? Also should have comments in the header file about what the functions do (and what type of device they accept). Regards, Simon [..]