Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2963792ybv; Mon, 24 Feb 2020 15:23:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzBzb8OesCJOvtJ+pkdNDVPyYJ1ZNiuFx65VmJhWY9BrKiBwH9bZoEcg2z9LN0JhRZc3A5E X-Received: by 2002:a05:6830:154a:: with SMTP id l10mr42696677otp.44.1582586581251; Mon, 24 Feb 2020 15:23:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582586581; cv=none; d=google.com; s=arc-20160816; b=j3G6C4LP9JLehLoYJg58xLoSCSD22ae7WQobLc2vd4Vd3Q1oR1/RM6z32o3KBZkWWV FBP0O6DDa7J+6iK7VbBge5K8rBnlnXcbqseowbwzj6P12ef6etlFdfCHMsKWNUCkenVX AfnrbfYd1rn+XsG3wqDkA7YKdIwa034ttuWJ9RHaK9vEWOkMLIrn/tsY4vvtyeuVPaw9 AqwtlSDi1TlY0JkHirN3sIbmIGZl7VZ4AoRWTi4plGufb3XgzAnci7Wp5Ny1t7ozGOMb uXvFcoc/i/2W6lFE6tU66129Zoqx3svpSoHf8wWQs4g68Dc0051ispLadgBTKHF8oEZ2 g38Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IXpxfmvhilbP5WN8bob/AjAFkA/qj/3CPWSZIMs8z6Y=; b=erMZm9kZ0J8mti5K/0ZSj8vVri/jxDs972Q/b1/VvwG+IvXqIsVguN8FHq3/RTmJIa WUiMW4Vqu3WyvZ2UF1VoP4pPvbc1fglC2sPRGokKqnD1SD5YweNQU0H9V2f1fML90lUo 8Coje4zAlVOujx8uGTLXpELxdnGMRcqHiWNBJwVN4qpxqNfnVLhYcTs5CnGM3DbvQtWz Sx//E4zBxdvBkAYjYguZAZw228erUCJQvsf4VyZ5iDNUbF0cHFUgKuULb14XjWAeXPTW DoL+B0RKNMHuNgaPmV383ryTH+fZz2JVtIU7BHBnUu8vS96bFyEKkgXD484z9vkPSJXw pX+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ym7vmmJ8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k128si5941586oih.274.2020.02.24.15.22.49; Mon, 24 Feb 2020 15:23:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ym7vmmJ8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728635AbgBXXWR (ORCPT + 99 others); Mon, 24 Feb 2020 18:22:17 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:34453 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728575AbgBXXWO (ORCPT ); Mon, 24 Feb 2020 18:22:14 -0500 Received: by mail-lf1-f66.google.com with SMTP id l18so8158391lfc.1; Mon, 24 Feb 2020 15:22:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IXpxfmvhilbP5WN8bob/AjAFkA/qj/3CPWSZIMs8z6Y=; b=Ym7vmmJ8qm8gK+2Wxoy8RGjsVbKgIlH7iMYNXINa2EFe43TOaXnBG18SB9AHqArHOo fFhQH2ZoVcEBKpGEFhX9q/wjwN9YPd6zHoGXpF/oi01ScsWeZrlrX1oi5yCLP17x0esH bNavvx1gQSaFZAzD5fUdhzOJ4kVYtZOu8zek/VAebKS3l3C+GQ0HoW/mxw2xGepJpvSL dizegdTK9KrZb0Ny5dYc+uNxepw5eGi3n/lpgaluCjGMcAxqSyP7fLLYn2qVso5xYdlO Kg4TtDu5K5owsT66DkGz8bj20rhJDGPmIK2AI8E5zdCfQmJJCPJPMeTfhYmnG0jKDXuM lwYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IXpxfmvhilbP5WN8bob/AjAFkA/qj/3CPWSZIMs8z6Y=; b=Rqd/tEUT2E/gEQZ7H9hiQgWEnUBg8pifqluDETCU6xhy8HxVe9cKoUI5LEwe80U24i ShRMf0JDr3rjahYdCojCxpOWvdTHv/Ersm+RKRtKxq5/WA1NOjsnYF3UX6aF8kONwubk cm+3+9MiXVzx4wmlVbP1BXpt9mLcuMwBlukJ9/4zVAyygZHUg1mQLxsgwBrXUaj/7/1Y RSRXlY/2aTsa4s9NZdpa6ySe9F0jstdFNobQ/OUpvDM0mFP4dTwLmhfxIZdmm9EmeNYe F/wP9cM9avhsxq1RWF43KoxPySGdTBU34RTj2AIlWaIW5cX9t0pEaRaX5I59VdRUl1gU BiAw== X-Gm-Message-State: APjAAAVerYPur1fRIRuF3XK7MRU3GpWMPs275uQ+zq2XtEUa+JUvSxRX hQRYH8pf+NBTxSk8AjOAdBo= X-Received: by 2002:a19:8c4d:: with SMTP id i13mr28756053lfj.42.1582586531784; Mon, 24 Feb 2020 15:22:11 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id r10sm8154071ljk.9.2020.02.24.15.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 15:22:11 -0800 (PST) From: Dmitry Osipenko To: Jens Axboe , Thierry Reding , Jonathan Hunter , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , David Heidelberg , Peter Geis , Stephen Warren , Nicolas Chauvet , Ulf Hansson , Adrian Hunter , Billy Laws Cc: linux-tegra@vger.kernel.org, linux-block@vger.kernel.org, Andrey Danin , Gilles Grandou , Ryan Grachek , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/3] mmc: core: Add raw_boot_mult field to mmc_ext_csd Date: Tue, 25 Feb 2020 02:18:39 +0300 Message-Id: <20200224231841.26550-2-digetx@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200224231841.26550-1-digetx@gmail.com> References: <20200224231841.26550-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to support parsing of NVIDIA Tegra Partition Table format, we need to know the BOOT_SIZE_MULT value of the Extended CSD register because NVIDIA's bootloader linearizes the boot0/boot1/main partitions into a single virtual space, and thus, all partition addresses are shifted by the size of boot0 + boot1 partitions. Signed-off-by: Dmitry Osipenko --- drivers/mmc/core/mmc.c | 2 ++ include/linux/mmc/card.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index f6912ded652d..88e5b4224d3c 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -417,6 +417,8 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) ext_csd[EXT_CSD_ERASE_TIMEOUT_MULT]; card->ext_csd.raw_hc_erase_grp_size = ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]; + card->ext_csd.raw_boot_mult = + ext_csd[EXT_CSD_BOOT_MULT]; if (card->ext_csd.rev >= 3) { u8 sa_shift = ext_csd[EXT_CSD_S_A_TIMEOUT]; card->ext_csd.part_config = ext_csd[EXT_CSD_PART_CONFIG]; diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index cf3780a6ccc4..90b1d83ce675 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -108,6 +108,7 @@ struct mmc_ext_csd { u8 raw_hc_erase_gap_size; /* 221 */ u8 raw_erase_timeout_mult; /* 223 */ u8 raw_hc_erase_grp_size; /* 224 */ + u8 raw_boot_mult; /* 226 */ u8 raw_sec_trim_mult; /* 229 */ u8 raw_sec_erase_mult; /* 230 */ u8 raw_sec_feature_support;/* 231 */ -- 2.24.0