From patchwork Thu Dec 17 11:27:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344924 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp1077153jai; Thu, 17 Dec 2020 03:28:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFhcjQ6r9WMsDpe4saBVgdGTFEfAfi9Df53CgrGJ6O1GRM6ZSQ2di6bmC8tFMDK9HAgsYk X-Received: by 2002:a05:6402:3074:: with SMTP id bs20mr38065839edb.365.1608204530294; Thu, 17 Dec 2020 03:28:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608204530; cv=none; d=google.com; s=arc-20160816; b=MPpmidw5GSSRpMlbGpEpVGnjXlnimcN7LIrArCu5nayNom88aLAERvsslb2n9KsQjr xbo8X8Z7YR8HVXIUSUcy95be6MNu5UE14oUPRIVB2ZGYXlICwOooo+ROOfOTvy5/gWWP QwNJkuZs5nBKQB5N6Ixu57zR5B6Q7p6D1HITaIkw7g3s0JGopKolw/a9mOSAtNs38J92 fJ2AxhzMbAKxA5l8BgBrGdnfJgRJ1rIz37BUwKaSLIDCM6yQ9KVw5xgsm8w3vmX9ecOJ sXDqlz0IfSc6hvL3cF5o415Zs4QAhshK1ZXO/xBMDq3kRA11kVZnSgIJ9eWYMH5i+u3r VAvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=1ODBY96fFBqFt8d2xGKeYGO05SitY939t1BYMg+dfjI=; b=HfLjz8IrqkfHewR45/+i7WNGYm45TUpIqYHevKinrEz656hK6jxh/ODpHHipO6fpMn TTRaxD0E/AcOpbE2sTy85cJh6QnsHFzCaUNkGqrT3R10X/7+nvRQmEFM8DsWkxPnj0V5 U6e8Tr6kpib0EmTgWEKbpp58b31ltQn5xNQpXQ8s2Sj8WQWQBWU24Ezd0S5AF3AU4Y2C LkglDqPatPCW5jbBSnBqM7IUnsN1/GKrlB8/9J9fH2RQojjP+0A9MFccW/eFDV0hNJ6D MkiWVRMHmIZ9hHbmdOHIIRmYGQ93ZKScGGpOZRJrKHioNXqftkjGBJGHUx4d0gglXwji ScXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OWpVEPmu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id fi11si2466705ejb.378.2020.12.17.03.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 03:28:50 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OWpVEPmu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 147F482BAD; Thu, 17 Dec 2020 12:28:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com 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=samsung.com header.i=@samsung.com header.b="OWpVEPmu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EA9EC82BAB; Thu, 17 Dec 2020 12:28:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5921D82BAA for ; Thu, 17 Dec 2020 12:28:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201217112755euoutp016d93fb2f3062c4ac416cdb135bf8cce4~RfXNANkCx1618916189euoutp010 for ; Thu, 17 Dec 2020 11:27:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201217112755euoutp016d93fb2f3062c4ac416cdb135bf8cce4~RfXNANkCx1618916189euoutp010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608204475; bh=1ODBY96fFBqFt8d2xGKeYGO05SitY939t1BYMg+dfjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OWpVEPmua5Ldurr4k/+OcpqRbjcINHDLp9NbMG1qXqri+Uvjty10kEntNj5/Clxi1 PciNER8+728E+0ZMkZqTGD2IZklBJbmzEYBU1uWNL1th3kuMxJKeXj+D/a3vZw/7Rn SCc4/PnkhyHlFr7kmseO+tYpiLlPuwjgFBGA5QlU= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201217112746eucas1p10bf155710cef87351a262d038091866b~RfXD7uY1J1172811728eucas1p1u; Thu, 17 Dec 2020 11:27:46 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C0.41.27958.2B04BDF5; Thu, 17 Dec 2020 11:27:46 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201217112745eucas1p1119fe18d3b05e3f9555f9587c83d4a97~RfXDe6UbT1172811728eucas1p1t; Thu, 17 Dec 2020 11:27:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201217112745eusmtrp29a269ec7d2ab90c06f4a336671b1eba1~RfXDeSgFU2731127311eusmtrp2f; Thu, 17 Dec 2020 11:27:45 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-e0-5fdb40b284fb Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C7.F0.16282.1B04BDF5; Thu, 17 Dec 2020 11:27:45 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201217112745eusmtip2355bdee15ebbb1e1b553cf0556b5c563~RfXDFfI4A2844828448eusmtip2e; Thu, 17 Dec 2020 11:27:45 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Cc: Marek Szyprowski , Lukasz Majewski , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH 1/6] disk: dos: rename write_mbr_partition to write_mbr_sector Date: Thu, 17 Dec 2020 12:27:34 +0100 Message-Id: <20201217112739.5045-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201217112739.5045-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsWy7djPc7qbHG7HG3xfwGaxccZ6Vosbv9pY LZ6/u8xksfbIXXaLb1u2MVq83dvJbnF46gdGB3aP2Q0XWTzmzTrB4vHhY5zH2Ts7GD36tqxi DGCN4rJJSc3JLEst0rdL4Mro7bzOVtApUHHpxCW2BsYJvF2MnBwSAiYSO1fcY+li5OIQEljB KPHgyWRmCOcLo8T5mVOhnM+MEuu/bWCDaXndP4UZxBYSWM4ocb+rHK7jRNNtsASbgKFE19su sAYRAQmJX/1XGUGKmAX+MUoc/PWRFSQhLBAgsXz9MRYQm0VAVeJ2+zGwOK+AjcTbaTOYIbbJ S6zecADI5uDgFLCVWN5eBjJHQmAmh0TLg/eMEDUuErtm7oS6Tlji1fEt7BC2jMT/nfOZIBqa GSUenlvLDuH0MEpcbpoB1W0tcefcLzaQDcwCmhLrd+lDhB0lHj85zQ4SlhDgk7jxVhAkzAxk Tto2nRkizCvR0SYEUa0mMev4Ori1By9cgjrfQ2LXljWMkACawCixbu1D5gmM8rMQli1gZFzF KJ5aWpybnlpsmJdarlecmFtcmpeul5yfu4kRmCZO/zv+aQfj3Fcf9Q4xMnEwHmKU4GBWEuFN OHAzXog3JbGyKrUoP76oNCe1+BCjNAeLkjjvqtlr4oUE0hNLUrNTUwtSi2CyTBycUg1MGbNm tfFN2X9znvgiyXqp3paKNneGnb6a8/kmf1vNlvmgctraG6vZvm/f80v7hFDCvEJ3uaXebAc2 5cXO7pj9+Qejkam83M9MkctPj2u9l/kt1NJ3qPThrAMBnfHLwoqvZr7d1SmiFftwfnxOtz23 7T3Lh50lpw6s8nwqw2/+Xef6PX6dpAe903u0v/+J6eNPWV56atkOhfhWW6mm9TsXX+fvdpDZ meSmLqC3dJ3k6Wund7pGlLzdfv7hwXSp5CsL6hh1dL3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1+DdcJT1mPfmO8v5 265t377nTvEl8fy7W75mtSuxFGckGmoxFxUnAgDrafW14gIAAA== X-CMS-MailID: 20201217112745eucas1p1119fe18d3b05e3f9555f9587c83d4a97 X-Msg-Generator: CA X-RootMTR: 20201217112745eucas1p1119fe18d3b05e3f9555f9587c83d4a97 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201217112745eucas1p1119fe18d3b05e3f9555f9587c83d4a97 References: <20201217112739.5045-1-m.szyprowski@samsung.com> 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.3 at phobos.denx.de X-Virus-Status: Clean write_mbr_partition() function name is a bit misleading, so rename it to write_mbr_sector(). This is a preparation for adding code for writing a complete MBR partition layout. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 2 +- drivers/fastboot/fb_mmc.c | 2 +- include/part.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/disk/part_dos.c b/disk/part_dos.c index 04f53106f7..ef706fb59c 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -329,7 +329,7 @@ int is_valid_dos_buf(void *buf) return test_block_type(buf) == DOS_MBR ? 0 : -1; } -int write_mbr_partition(struct blk_desc *dev_desc, void *buf) +int write_mbr_sector(struct blk_desc *dev_desc, void *buf) { if (is_valid_dos_buf(buf)) return -1; diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index ae8e8e512f..4e26cef941 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -508,7 +508,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer, fastboot_fail("invalid MBR partition", response); return; } - if (write_mbr_partition(dev_desc, download_buffer)) { + if (write_mbr_sector(dev_desc, download_buffer)) { printf("%s: writing MBR partition failed\n", __func__); fastboot_fail("writing MBR partition failed", response); diff --git a/include/part.h b/include/part.h index 55be724d20..67b8b2a5cc 100644 --- a/include/part.h +++ b/include/part.h @@ -465,14 +465,14 @@ int get_disk_guid(struct blk_desc *dev_desc, char *guid); int is_valid_dos_buf(void *buf); /** - * write_mbr_partition() - write DOS MBR + * write_mbr_sector() - write DOS MBR * * @param dev_desc - block device descriptor * @param buf - buffer which contains the MBR * * @return - '0' on success, otherwise error */ -int write_mbr_partition(struct blk_desc *dev_desc, void *buf); +int write_mbr_sector(struct blk_desc *dev_desc, void *buf); #endif