Message ID | 20180819135715.15799-29-jagan@amarulasolutions.com |
---|---|
State | Superseded |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="bTr1MhSo"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41tfhz5f94z9s3Z for <incoming@patchwork.ozlabs.org>; Mon, 20 Aug 2018 00:39:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7C4CEC21ED6; Sun, 19 Aug 2018 14:17:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id ECEBBC21E7E; Sun, 19 Aug 2018 14:13:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E6ED7C21C8B; Sun, 19 Aug 2018 13:59:36 +0000 (UTC) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by lists.denx.de (Postfix) with ESMTPS id ED2AAC21E2B for <u-boot@lists.denx.de>; Sun, 19 Aug 2018 13:59:30 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id k19-v6so5497994pfi.1 for <u-boot@lists.denx.de>; Sun, 19 Aug 2018 06:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D1Vj6zhWHMk6x6ByKk7j+zEwfWHS6oBExdUzbejmX4c=; b=bTr1MhSouVuY5sK7vQq2hIM/rLaBO9p+c2AZNDQo/ZyVD6KQJH0HgsU72j6yk6kXly bH/xH8tbNC4L0oEUzLciQnwlfp+VgOurM7GGlo6lr1OAhkZyo1pXT2yYoWDyHZQ27GaD u7Mru75vmNvi+jeXI04PeRXNeJVBnDEc0hiv0= 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=D1Vj6zhWHMk6x6ByKk7j+zEwfWHS6oBExdUzbejmX4c=; b=H6/Uu/XcrgaMAXpsEw430RcPx1yYenGX3MvUZkv9F33h1Cq/Y+MeoCtClM/NmaBfID z43oivPKfqp0JQxvEzMsURAxmmYOBpWQAqbFfNbyFszzXHLcuiCJIC+jmDmpxREtKSR0 7IctvmIbcDoAVD5Oa5Bv09fI9XXGXDbKktDTu1dXn8hrKlB/eQK/QTd3fmndBwfSgFbm qsrDFND1ZwcloU5BBzgVift/5mDjIHqp+V1I4Bu5fxR5n45KbI2FYO+QwzV8Q0Ff/Wtn 7V1cP2hUPCOCkF6GLJaune764FJlOFQvey/3iBzcJE8gGWTfes5O+DuVzYyab8pG7D3K Kj/Q== X-Gm-Message-State: AOUpUlGY0AJKzIGZKS4eDDp3kJMRSjDHGxARcvXLHbCt6DzgtrSTLnIk 59VK8a9X6Cyic0hXSS017Yf5DQ== X-Google-Smtp-Source: AA+uWPyPEfKMeQZsVHFubR3ps1Zi0UfTcMVqlZ7CAYiwvI3M+N7OcHdxDTFuPJLVpVB32hZx9BWnvg== X-Received: by 2002:aa7:86d7:: with SMTP id h23-v6mr44127302pfo.132.1534687169592; Sun, 19 Aug 2018 06:59:29 -0700 (PDT) Received: from localhost.localdomain ([106.208.36.229]) by smtp.gmail.com with ESMTPSA id l185-v6sm8902816pga.65.2018.08.19.06.59.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Aug 2018 06:59:29 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Maxime Ripard <maxime.ripard@bootlin.com>, Andre Przywara <andre.przywara@arm.com>, Chen-Yu Tsai <wens@csie.org>, Icenowy Zheng <icenowy@aosc.io> Date: Sun, 19 Aug 2018 19:26:45 +0530 Message-Id: <20180819135715.15799-29-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180819135715.15799-1-jagan@amarulasolutions.com> References: <20180819135715.15799-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: Tom Rini <trini@konsulko.com>, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 28/58] env: fat: Add func to get fat device, partition X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
clk: Add Allwinner CLK, RESET support
|
expand
|
diff --git a/env/fat.c b/env/fat.c index 7f74c64dfe..2147cc0326 100644 --- a/env/fat.c +++ b/env/fat.c @@ -30,6 +30,11 @@ # endif #endif +__weak char *get_env_fat_dev_part(void) +{ + return CONFIG_ENV_FAT_DEVICE_AND_PART; +} + #ifdef CMD_SAVEENV static int env_fat_save(void) { @@ -45,7 +50,7 @@ static int env_fat_save(void) return err; part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE, - CONFIG_ENV_FAT_DEVICE_AND_PART, + get_env_fat_dev_part(), &dev_desc, &info, 1); if (part < 0) return 1; @@ -92,7 +97,7 @@ static int env_fat_load(void) #endif part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE, - CONFIG_ENV_FAT_DEVICE_AND_PART, + get_env_fat_dev_part(), &dev_desc, &info, 1); if (part < 0) goto err_env_relocate; diff --git a/include/fat.h b/include/fat.h index 09e1423685..0552fa54b5 100644 --- a/include/fat.h +++ b/include/fat.h @@ -185,6 +185,7 @@ static inline u32 sect_to_clust(fsdata *fsdata, int sect) return (sect - fsdata->data_begin) / fsdata->clust_size; } +char *get_env_fat_dev_part(void); int file_fat_detectfs(void); int fat_exists(const char *filename); int fat_size(const char *filename, loff_t *size);
Get a fat device and partition for multiple families of same SoC type can be difficult to handle with static CONFIG_ENV_FAT_DEVICE_AND_PART via Kconfig. So, add a generic weak function to get the device, partition and give relevant users to define their own logic to setup fat device and partition. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- env/fat.c | 9 +++++++-- include/fat.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-)