From patchwork Wed Dec 23 12:55:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 351446 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp6172259jai; Wed, 23 Dec 2020 04:55:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlxl7dI9RxQqD6yuznUGS5+KKSAA5kUOK97frh+llj+LI7lV/GtZai+w3FyyyEXnUWaXYm X-Received: by 2002:a17:906:a29a:: with SMTP id i26mr23651288ejz.45.1608728155817; Wed, 23 Dec 2020 04:55:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608728155; cv=none; d=google.com; s=arc-20160816; b=CoU5Npu9Ql9q+wwImHf77WH2mB9lvs1kp1QaEB5Bg8KvC176LzKXb/Zvfc6MXIPeFV 00UzTszhD9o6puDKktHdne/A6cz2Lq5GL1qO/QTmvIRhP3VNFuqKKSR1N0iDFUW5kC8U RfYQFqNhhGGqyEuS2ZW1zADfQmh6n5JZRc0qx3sK71zQJRgjuUoUWqKBEtHav55Oty5p kibwWlmRGYg9URAfBPsVXzSncGPI10qtEWUWtyR8wUVbfGw4TJ9wCWMhjAho1Bk+jl3L fx7aIYBB5rgmUt5KD5TCi+2A+oWqFdfuiLaMIhGFx2tlBMcjDmer4uU/C2G3gBbkgiD6 L8IA== 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=VaK2zP9Kg134+zT5u+Uqtwj6i2pr30ZHOZw99Qgi+y7WtNzIdqTnYf1FQzRUMbRqsC avjVw490HJMm+kHmoGoOtHCb8Nhp+DE2MTcqlYAiNu3F/vpwQJENKxgvoC7D2cCkKqR5 Uyn4wGKQrQByKNGfMqvHqBb7yBNTJtDaA41e5ECJiz5vbPAF4S+A/0YvgBSg/fQ6ltUc kMU+eII8W1eYcJ1hXDnGGy22INV8HhlUUP8Im4kCRSKSzEmSwtvkeApAHxjHYKIzKFW7 Nm0GYdErPNtcMif/5PbcExuMmH4lY2WT05yw+a5JoCi/QEno4Vh+1E3VW/zi7APErnFk y3CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Iut8QEuj; 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 gn38si11696357ejc.438.2020.12.23.04.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 04:55:55 -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=Iut8QEuj; 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 C8B488272E; Wed, 23 Dec 2020 13:55:43 +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="Iut8QEuj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 373FD8273C; Wed, 23 Dec 2020 13:55:39 +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 mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 68ABD82727 for ; Wed, 23 Dec 2020 13:55:35 +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 mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201223125534euoutp02024aa20867b43002fdcfc5ba940e4fea~TWbcEqmxb3096730967euoutp02O for ; Wed, 23 Dec 2020 12:55:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201223125534euoutp02024aa20867b43002fdcfc5ba940e4fea~TWbcEqmxb3096730967euoutp02O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608728134; bh=1ODBY96fFBqFt8d2xGKeYGO05SitY939t1BYMg+dfjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iut8QEujBKnbsaQWukrsHOWerDB2HQHKMb1U8GD1rNUYmYxQWpi7ZqIX/Nrt7Emu7 ZndfF/D9q1b3XaX1zZGuuZ1s0XtuDPvAkQ+icOvYbmWaGwq720vyAGMhpWcsPgDH0j 6GNNoTV6HABFS0GPl8wYkPoD5/Wkh5Gug/cLsCvU= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201223125534eucas1p26265870046d5f2a2938c08c76316522a~TWbbwrmyT3008030080eucas1p2P; Wed, 23 Dec 2020 12:55:34 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 63.79.27958.64E33EF5; Wed, 23 Dec 2020 12:55:34 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201223125533eucas1p24c90762deb359fc4c73ddb717892c932~TWbbbHupD3008030080eucas1p2O; Wed, 23 Dec 2020 12:55:33 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201223125533eusmtrp2400780a2ae5ff425b1ee01c5e0135f05~TWbbahFPL0404504045eusmtrp2o; Wed, 23 Dec 2020 12:55:33 +0000 (GMT) X-AuditID: cbfec7f2-efdff70000006d36-09-5fe33e46fa6d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 88.BC.21957.54E33EF5; Wed, 23 Dec 2020 12:55:33 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201223125533eusmtip25a062b362a2c2a0a8d127fcec6d1bbe6~TWba_7DS02463824638eusmtip2i; Wed, 23 Dec 2020 12:55:33 +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 v3 1/6] disk: dos: rename write_mbr_partition to write_mbr_sector Date: Wed, 23 Dec 2020 13:55:10 +0100 Message-Id: <20201223125515.28865-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201223125515.28865-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsWy7djPc7pudo/jDX59ZLXYOGM9q8WNX22s Fs/fXWayWHvkLrvFty3bGC3e7u1ktzg89QOjA7vH7IaLLB7zZp1g8fjwMc7j7J0djB59W1Yx BrBGcdmkpOZklqUW6dslcGX0dl5nK+gUqLh04hJbA+ME3i5GTg4JAROJd2eWsHcxcnEICaxg lNg4cQELhPOFUeLawnZGkCohgc+MEt83GHYxcoB1LD3oDlGznFHiwYNvCA0LfuxlBmlgEzCU 6HrbxQZiiwhISPzqv8oIUsQs8I9R4iDQZyAJYYFgibVLz4MVsQioSjQ9/c8EYvMK2ErM3TOb BeI+eYnVGw6ADeUUsJP4tqCDFWSQhMBMDonPB9ewQRS5SGy8vYkRwhaWeHV8CzuELSPxf+d8 JoiGZkaJh+fWskM4PYwSl5tmQHVYS9w594sN5DlmAU2J9bv0IcKOElMmnWOH+JlP4sZbQZAw M5A5adt0Zogwr0RHmxBEtZrErOPr4NYevHCJGcL2kHh54SArJIQmMkq8nbKQaQKj/CyEZQsY GVcxiqeWFuempxYb5qWW6xUn5haX5qXrJefnbmIEponT/45/2sE499VHvUOMTByMhxglOJiV RHgv8T+OF+JNSaysSi3Kjy8qzUktPsQozcGiJM67avaaeCGB9MSS1OzU1ILUIpgsEwenVAOT s2dAl6JAonPlysSrTEfZDKdkxB45qObaf0fm4ES1c21SLw2bNT1EF/Lv8Z0c68Pbm2/+fe3W d07WsUGJM6yfvmp51drE2PDqyJoDk/KvpF09y82RLMx7au+7nykXwqfwV7JMeZu8/O4VSd7M 3g2v56zsLtv/5rY1bxWnZoW5/F6dJ6w8HJV6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KxusHlqw53 hbR/vJCezLuRwWLFpOjv36NntZaKP/OL0WnN51nxZafwFcHqfqPHk90X+rlcfiusM9N/6qFd R14cYjdNWjRz6y731xLvsoU2KLEUZyQaajEXFScCACHZJ8fiAgAA X-CMS-MailID: 20201223125533eucas1p24c90762deb359fc4c73ddb717892c932 X-Msg-Generator: CA X-RootMTR: 20201223125533eucas1p24c90762deb359fc4c73ddb717892c932 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201223125533eucas1p24c90762deb359fc4c73ddb717892c932 References: <20201223125515.28865-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