From patchwork Tue Dec 22 14:09:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 346637 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5358068jai; Tue, 22 Dec 2020 06:10:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhIrYe7F9RwSY0d5DnebkExE1qFQM/Xi8cEWSyY/IeorRJMl1HcLTtZ8KkjV4+DUx9vfHc X-Received: by 2002:a17:906:4705:: with SMTP id y5mr19918819ejq.112.1608646219928; Tue, 22 Dec 2020 06:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608646219; cv=none; d=google.com; s=arc-20160816; b=v5UzyuhAjgMKA0xHoi3XCm2pJ4ENaT1SccbPWRynBQAShqAcTLwzSrebQZDEFErXDV Omi8h37JJEwtlL6iy5l/yht/SO0MWbLdvcRtEa3iCIiHejEMFxbj/YDTlpGW7fb2TKwW 8MT5X649VWOy/pwBQc0UtHjuHipphgcjNqwTeqH979Hits0Oc9S7cikFD1OF1dtb1y8P mMiBZq/gJWpmVioslATP8jGAuiejCD0ns/POuov9HYWlmV/WZF2nsZEr8PGygN+VmnJF i7gRSCl2AY7CRu7dz/egwkJVXgEMx9kZT5FN+7Z1CTPiV14tBhXWbFyeG3Wz19mk34Cf QoiA== 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=GzxozJRt0YtkhSSdLQgEdwCxk2ky7RWvS/uB4hnnNVZ3jmHcaOu8ETtZYw9vl66rzg eJkRtk49wtqWiI509DIkM2eMu5IqvEwbubC+Hz3+fA5DF64SDrgm/qXSgEKzce676ZPJ pfNrdfW+PuCmn3eYw2N8pHFLZ+x0A/mfEYzkzNJSiFPcpSP6wblsZHDUWeBLu6bUbWBQ EdUFoDeobSeLLb6L/N42SmOaNN17aRKjaCWQ0A/rXnsT2w+3hSZXpzR/nREwvqdlGGKe x8PqXoI5VkJ5l4DmhWslTq3PzawdkpIZlfAtvICKnNPH/Tkk0YPdcxjt2gUvVukGoDZV BS4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=myA8skJw; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id s2si11999095edw.5.2020.12.22.06.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 06:10:19 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=myA8skJw; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 9E8F482ACA; Tue, 22 Dec 2020 15:09:59 +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="myA8skJw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A208482ACC; Tue, 22 Dec 2020 15:09:53 +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 9A02F82A8E for ; Tue, 22 Dec 2020 15:09:49 +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 eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201222140948euoutp018d96e2510255c63065dcdc6ac22786a4~TDy_P7suW2281922819euoutp01d for ; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201222140948euoutp018d96e2510255c63065dcdc6ac22786a4~TDy_P7suW2281922819euoutp01d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608646188; bh=1ODBY96fFBqFt8d2xGKeYGO05SitY939t1BYMg+dfjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=myA8skJwFD6CAaIFFOuRoO4Vpr8n69C26LJ11JEIzMBAAF9LF0kPiSXHUeI0xlRZR 4NJNmx06DLSSaZ87177xWRq3dJMGm44wkrCB9R5goPF+4z0Zc9+XLswoYiVWcUf77Q I1X9GombeZK5HiheO7FrcklZGP0pHykTaxJjlZ0Q= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201222140948eucas1p255e8d3d9cb31707cc3019d898d2cc16f~TDy_DiYLZ1827818278eucas1p2D; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 77.51.44805.C2EF1EF5; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201222140948eucas1p2186f51e41132913152cce081bdbdcdf5~TDy9hWDWV1618316183eucas1p29; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201222140948eusmtrp17867295eb02198187733fe6424ceea66~TDy9gxh8Q0854808548eusmtrp1P; Tue, 22 Dec 2020 14:09:48 +0000 (GMT) X-AuditID: cbfec7f4-b4fff7000000af05-89-5fe1fe2c6684 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id FD.5A.21957.B2EF1EF5; Tue, 22 Dec 2020 14:09:47 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201222140947eusmtip11f4891534dde139ae860fce3ef1c55f3~TDy9Ffw6s0861208612eusmtip1C; Tue, 22 Dec 2020 14:09:47 +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 v2 1/6] disk: dos: rename write_mbr_partition to write_mbr_sector Date: Tue, 22 Dec 2020 15:09:09 +0100 Message-Id: <20201222140914.9933-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201222140914.9933-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDIsWRmVeSWpSXmKPExsWy7djP87o6/x7GG9z6KG+xccZ6Vosbv9pY LZ6/u8xksfbIXXaLb1u2MVq83dvJbnF46gdGB3aP2Q0XWTzmzTrB4vHhY5zH2Ts7GD36tqxi DGCN4rJJSc3JLEst0rdL4Mro7bzOVtApUHHpxCW2BsYJvF2MnBwSAiYSe3+3sIDYQgIrGCVW X/PtYuQCsr8wSkzY+oYRwvnMKNHypZO9i5EDrKO3XRgivpxR4tG5eSxwHTfPfmcGGcUmYCjR 9baLDcQWEZCQ+NV/FWwSs8A/RomDvz6ygkwSFgiW+DCFFaSGRUBV4t/3ZUwgYV4BG4nNq9wh rpOXWL3hANhITgFbiWMv7jCDjJEQmMkhcW/BXRaIIheJf486oWxhiVfHt7BD2DISpyf3sEA0 NDNKPDy3lh3C6WGUuNw0gxGiylrizrlfbCCbmQU0Jdbv0ocIO0r8XvGVDeJjPokbbwVBwsxA 5qRt05khwrwSHW1CENVqErOOr4Nbe/DCJWYI20Oi+dYtVkjoTmCU2HuYcwKj/CyEXQsYGVcx iqeWFuempxYb5aWW6xUn5haX5qXrJefnbmIEJojT/45/2cG4/NVHvUOMTByMhxglOJiVRHjN pO7HC/GmJFZWpRblxxeV5qQWH2KU5mBREudN2rImXkggPbEkNTs1tSC1CCbLxMEp1cBU/bVG 87/0OlXdl7cXxXnr3V4nt7KH4cXpvac+MHRe2RwQ+2hLUKlMweYHIZ0F/3deCesrfVzmqLzz 5ts7L01aSk6F7lrZFOSputJNm/OJyWE9/Wd7vFduLrU1CQiMVXty07htRoeIZNbn6YKs+5W+ sFuyzld+K1N+/JXu5KeF4X3sxuaX+k6e/co17Sb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Swm O/FtOp/r9BtL1uuf6F719WwCN4dH4NXMrazCNsqXntr9V01yWbX9N3es//sT9wyiPRzYXK4c UDosYybyQLdc7cUFb4nsbTMSlViKMxINtZiLihMB3JhjAOACAAA= X-CMS-MailID: 20201222140948eucas1p2186f51e41132913152cce081bdbdcdf5 X-Msg-Generator: CA X-RootMTR: 20201222140948eucas1p2186f51e41132913152cce081bdbdcdf5 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201222140948eucas1p2186f51e41132913152cce081bdbdcdf5 References: <20201222140914.9933-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