Message ID | 20221024154204.2133777-3-sean.anderson@seco.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.a=rsa-sha256 header.s=selector1 header.b=FS1ywL63; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MwzqT1RHvz23l5 for <incoming@patchwork.ozlabs.org>; Tue, 25 Oct 2022 02:43:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0EC3183F26; Mon, 24 Oct 2022 17:42:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.b="FS1ywL63"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 24B2A80F70; Mon, 24 Oct 2022 17:42:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80042.outbound.protection.outlook.com [40.107.8.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E861B83F4E for <u-boot@lists.denx.de>; Mon, 24 Oct 2022 17:42:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sean.anderson@seco.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ffHYo/rs8PGPZdWhBGeD9Qh/RQ/WLCBiglX+nqPUxVUTVZ9RChezG4lSCaZS+YIa59EbUB1KpQsdReD7E8guYXPTbRj+vLQ49bKBpIpZFaVcStMNtNVKsZfs8l/tVQY0kA/16etKbuOhx7Q/4e9XUNfR5qxwWt365p2goeFIej77V5FVHX7tMSJkNST3W+30q8z7NsmQDaA23amMs/hvURuAKOLIhQP2xTvxKHtVOJXGUOUS7jmtTMSNLGOIazjJhf2jdRAvWTYNINsndV4VDg8bqOzMn0u7iA5fVhLlX7aTKdyV/XwL3KMQ4/1hDSji/6mtk6OnFNP/zS34K0h5xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DOMTyw3/nBtIQFecI5V9o6OmVqmETzzRMDX7nxsG1Is=; b=ng1uGwfqDOVPfMGfJkrpWuhH0S4jOV0NugoCr2i59rZjhQDXECyoDClKjW6qSy7OGOyiPrkhEhLZp1LDBimE4UoAulh68veq+SfbEFUoxpzOtx0kHzC2BEZ/MA2CP+YGz6KPbAlUJDFoDQRciVyGLnCh1CXcraRnpksP8WU7u75gxTeU3+wnk12drcHKdqrHIfJ8Mwa6fCfVY4YEmdsEGL9CjLCDAZq20McJ6AXECSmG5agnxlkJVATv09Fi/K08z67obf41gqJtysR7Qy0CyLYdYnVOO6LzqhfabayL8FRnoVnxOYVyaTAQZ0uLAxfsT7+G94ZbLxG2uPI3z9+7UQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DOMTyw3/nBtIQFecI5V9o6OmVqmETzzRMDX7nxsG1Is=; b=FS1ywL63Npw28yo5+mlGPfT+GlrEiHHFRh8Bp0rl/2Vuyv2KNfuYGTqBgadbtKxsSERAIdaPzk4z8GLDUSW/ex8IEunJ7hnmuv8O4qBnDVgzRE+BcWiFqnIWjdFWDNl77l9aKLm2LbIQTwla21b8W+Z/GHmAYeWH2ul5f0NfDcJqZfPTq+Mj1E+QBdL9JtS6WU7GWF9pxEGTwApdL57+7Pic+Kdvz9P/PBXwHROVAdNc1ekzDB/WSKqJ45jMRLkwbFdwjt5y1s2h8Ziu3quToMN2LP8W8VuUHRLX8NR8tCXILT/+s3SmI7BmJMqubLI0ylFP7WZY3FGB66x3RZlXDQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by AS8PR03MB7190.eurprd03.prod.outlook.com (2603:10a6:20b:2ed::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Mon, 24 Oct 2022 15:42:34 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::204a:de22:b651:f86d]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::204a:de22:b651:f86d%6]) with mapi id 15.20.5723.034; Mon, 24 Oct 2022 15:42:34 +0000 From: Sean Anderson <sean.anderson@seco.com> To: u-boot@lists.denx.de, Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org>, Rasmus Villemoes <rasmus.villemoes@prevas.dk>, Sean Anderson <sean.anderson@seco.com> Subject: [PATCH v3 2/2] rtc: Add fallbacks for dm functions Date: Mon, 24 Oct 2022 11:42:04 -0400 Message-Id: <20221024154204.2133777-3-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20221024154204.2133777-1-sean.anderson@seco.com> References: <20221024154204.2133777-1-sean.anderson@seco.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR03MB4972:EE_|AS8PR03MB7190:EE_ X-MS-Office365-Filtering-Correlation-Id: b037d487-fae3-4b66-0561-08dab5d65e73 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3m4ssYZn8sw1a75yWcq2fY9UmMLzzEGpN3x5/GyqEc4z/VRj8WlZ1uBX/ukeQtWDqfA7E466NwwgSIUa2FUKtgFqCnAwrRnRTzs5nwNcwITpiYeV8FnYBN+CRQMU3jG9MTngnLeYeqDeuwaN1FugbTzNpDtS1CG3stGtUdlE1akRLuLp5IYCQ8JU4TDCbDXp/AsPvPwOAaoBNe0n48FbG0L+lU8TbOyXoZg2vOo7pSkC3yzU0uqQjiZb/tfvumYEcwcm3JCi7CiG+48NXh1eUdURYFer5Y44E5kmJPv+dYmNf/l1nADnBkzxcaBpnVfMO2LvYxhy9DCWxiWA/K0EVZIPERnAdye2cfpnmWT0rkiurDUuKoMlG7UIn7facLYWcRwMJHAb31nEgrJBHSvzL7eXkcCDoUHESddXlX8KDovDatdGELDWHIxlOKHaS3mrK64U7LJjN5AhSevsDPTFJnPeSiMsYRwxXH+6ETHVmZru8X/erd1nQKX6JwPbNY+087aKiAJVgtFF426/3xMbbxscxD1Z46lmsF95/EF27z5qTQTIahP4rEl9EG8Ylw5qVIzKfeQ+0OO9QIHiOCd5qZ6aVn05/yX8JWT8W8h1tQfiiDn7wnuht22HlYR8ZYvoIWsYB42/j7ACWPM2kCSB/uNQTqd5FIMI++6tO2Xrux8d/aOkhea7fQ9uY/y6laCNKwF3FwCcw/vMcrbw1LaGhNUgDtxmahuoFAb64ABwbndepBg1AB/eF77BSgARMZJZyBMDyS7EkixnQpqJngwSEg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4972.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(39850400004)(346002)(136003)(396003)(376002)(451199015)(86362001)(316002)(54906003)(6916009)(6512007)(41300700001)(8936002)(36756003)(26005)(186003)(5660300002)(2616005)(44832011)(2906002)(8676002)(4326008)(66946007)(66556008)(6666004)(83380400001)(52116002)(6506007)(1076003)(6486002)(38350700002)(478600001)(107886003)(38100700002)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rAE0uZANSovk/DAJVHz1XI8S3GP3MPW0EjlyRVQ8BaemWWKzrlqaXEbokwic+0DgTnl7lxtcApGr89kxv0Hu32WkyWnl84Pvwm2ikw05pRyIz4cteHPSSN9xMwyC1boj4PU555B8I+6W2JD8/bi/OCDcrq+gPl9iT+NKb9Ehlwbjd6AUZfySVvXteT1wSDdAPfLZRs/S2TBMZpupWXQoqzCJzZb78mpumX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UsA1yJv8QmH7Pp7miYccOFSRwIfYizXy9UWIaCQBkiTdI8bB9Y6hqTZLscK4Vs1WXkpU39pLWJZshR0wfpkGKp/KcKoaWfG5dAp2mJWUaqyfG9k82gY1egr9ULBWf5Af5fdwura4k5AIVLxQ2Eqb/1p5I9/VnTbNSHmdF0D98EiFhB+CusnH0+SKd4m4ROEZpqcuC/x510hj6sxcPRyUjvFp2DOmdp1mfLTRgjKo+ZTl+ut2amSxehuCZjIhrxvef67tEhuTSkGbK8rdNUN3K7MNYUI2LoH5XIUXzlv1Ks9cTLVc1CjRBeOCbA== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: b037d487-fae3-4b66-0561-08dab5d65e73 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 15:42:34.0134 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lsypGqJzaEIsv4Irw48Sr4ek8sTT146S+XYA6hogc1xWE3THov3mZC4Y5zwbY7WPf1kNe+nkbEm6Ia4CIWWMug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7190 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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: <https://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> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
rtc: Add fallbacks for dm functions
|
expand
|
diff --git a/include/rtc.h b/include/rtc.h index 10104e3bf5a..b6fdbb60dc2 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -15,13 +15,12 @@ #include <bcd.h> #include <rtc_def.h> +#include <linux/errno.h> typedef int64_t time64_t; - -#ifdef CONFIG_DM_RTC - struct udevice; +#if CONFIG_IS_ENABLED(DM_RTC) struct rtc_ops { /** * get() - get the current time @@ -222,6 +221,33 @@ int rtc_enable_32khz_output(int busnum, int chip_addr); #endif #else +static inline int dm_rtc_get(struct udevice *dev, struct rtc_time *time) +{ + return -ENOSYS; +} + +static inline int dm_rtc_set(struct udevice *dev, struct rtc_time *time) +{ + return -ENOSYS; +} + +static inline int dm_rtc_reset(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int dm_rtc_read(struct udevice *dev, unsigned int reg, u8 *buf, + unsigned int len) +{ + return -ENOSYS; +} + +static inline int dm_rtc_write(struct udevice *dev, unsigned int reg, + const u8 *buf, unsigned int len) +{ + return -ENOSYS; +} + int rtc_get (struct rtc_time *); int rtc_set (struct rtc_time *); void rtc_reset (void);