From patchwork Sat Jul 31 18:36:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 12412607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 840FFC432BE for ; Sat, 31 Jul 2021 18:38:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 66C9C6052B for ; Sat, 31 Jul 2021 18:38:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229606AbhGaSiF (ORCPT ); Sat, 31 Jul 2021 14:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbhGaSiF (ORCPT ); Sat, 31 Jul 2021 14:38:05 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBAABC0613CF; Sat, 31 Jul 2021 11:37:57 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id l17so17841626ljn.2; Sat, 31 Jul 2021 11:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KxFpJWQtK9xa0w5gLWUipHSVysNghEYt1w+9Q+Sruzk=; b=U0XbTqkiexQT8dIpEgS5EPcVLq4FcRc4Pe3geUoKP77s03RswnDuv7Ug0KTudzcBrj Z9XnmrejpP2GwC1m13qZD16Ko5n8yVqhk+vqMUJ6FBKtbFvx96qOOWfz5bhNk89Ozx1c aDCJzwP9HeK6ORID97iIawwu3zfw10GKo6p+E4XKEMhya4Cyg2mmnUIXGFjRTbR0y3lj e4QlTNhOnxuk1uQTku76KVSCj09hNpf4plVP9kiNrPq5Xl0Hqr64gB8aAyQ2raCbw97i fK9VEnSxSvnrmzWqEqn/uFfi9+LKSLs316cv8T4pTiZ2bM/mEYWyUQUxmrcGdC38UPOR 8eRw== 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:mime-version :content-transfer-encoding; bh=KxFpJWQtK9xa0w5gLWUipHSVysNghEYt1w+9Q+Sruzk=; b=docUTVUFI9JVNxOoqcWbVEZYaPHMtoEbyX08IQ0FMmdfO6yVvyWtLjV27cUFA+3HaF jrM2nPxlrA6Tipcr8sS5RE0rA9txbk4lhlaVObsH0NpXK3laBb/jh8UmyflfHjmJ6Gqz 6b5SJm+lVnxqc0DryvGy4sgFptxl9CWftiwXfzI4dxkdVdYyCMGypFlGNXvdzSuSE9K8 jQJChcZ2EI9ll6y2CXJldsjaXlhBhbU0xPIZRd8aW8zshO5eTgDlTf9LUspIjXiD7dR5 s/1fDsCyIddqm54Ot2SDdPtrx+5WkvL4SA50+wlN0A/RJT3nB1EjE+V6ztz2e0KVlFvx UkiQ== X-Gm-Message-State: AOAM531qSY3mvxyaNGD9loqoxuUzgMW5rcvjf/Sxsfe5mzNHRVOYl4we R0RHGKMtELgrBexHei64gvo= X-Google-Smtp-Source: ABdhPJzbs1TlgquigMiOkPiIVqMR8Kjdsh66zmbC/Zx6ZBeNqvgGg6+gKf9gk751vNjN1/EvzI3rZQ== X-Received: by 2002:a2e:9ecd:: with SMTP id h13mr6060906ljk.162.1627756676219; Sat, 31 Jul 2021 11:37:56 -0700 (PDT) Received: from localhost.localdomain (94-29-22-96.dynamic.spd-mgts.ru. [94.29.22.96]) by smtp.gmail.com with ESMTPSA id s7sm456396lfg.297.2021.07.31.11.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 11:37:55 -0700 (PDT) From: Dmitry Osipenko To: Jens Axboe , Thierry Reding , Jonathan Hunter , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , David Heidelberg , Peter Geis , Ulf Hansson , Adrian Hunter , Christoph Hellwig , Ard Biesheuvel , Davidlohr Bueso , Ion Agorria , Svyatoslav Ryhel Cc: linux-tegra@vger.kernel.org, linux-block@vger.kernel.org, linux-efi Subject: [PATCH v2 0/3] Support EFI partition on NVIDIA Tegra devices Date: Sat, 31 Jul 2021 21:36:23 +0300 Message-Id: <20210731183626.18568-1-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org This series adds the most minimal EFI partition support for NVIDIA Tegra consumer devices, like Android tablets and game consoles, making theirs EMMC accessible out-of-the-box using downstream bootloader and mainline Linux kernel. EMMC now works on Acer A500 tablet and Ouya game console that are already well supported in mainline and internal storage is the only biggest thing left to support. Changelog: v2: - This is continuation of [1] where Davidlohr Bueso suggested that it should be better to avoid supporting in mainline the custom gpt_sector kernel cmdline parameter that downstream Android kernels use. We can do this for the devices that are already mainlined, so I dropped the cmdline from the v2 and left only the variant with a fixed GPT address. [1] https://lore.kernel.org/linux-efi/20210327212100.3834-3-digetx@gmail.com/T/ Dmitry Osipenko (3): mmc: core: Add raw_boot_mult field to mmc_ext_csd mmc: block: Add mmc_bdev_to_card() helper partitions/efi: Support NVIDIA Tegra devices block/partitions/Kconfig | 8 ++++ block/partitions/Makefile | 1 + block/partitions/check.h | 2 + block/partitions/core.c | 3 ++ block/partitions/efi.c | 18 ++++++++ block/partitions/tegra.c | 86 ++++++++++++++++++++++++++++++++++++++ drivers/mmc/core/block.c | 15 +++++++ drivers/mmc/core/mmc.c | 2 + include/linux/mmc/blkdev.h | 13 ++++++ include/linux/mmc/card.h | 1 + 10 files changed, 149 insertions(+) create mode 100644 block/partitions/tegra.c create mode 100644 include/linux/mmc/blkdev.h