Message ID | 20200602191403.7542-9-rasmus.villemoes@prevas.dk |
---|---|
State | Superseded |
Delegated to: | Heiko Schocher |
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=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: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=idItl08T; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49c1wS0Gj2z9sTC for <incoming@patchwork.ozlabs.org>; Wed, 3 Jun 2020 05:15:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3E3BB81CAA; Tue, 2 Jun 2020 21:14:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk 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=prevas.dk header.i=@prevas.dk header.b="idItl08T"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7529C81C95; Tue, 2 Jun 2020 21:14:27 +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=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20720.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::720]) (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 28F1981C43 for <u-boot@lists.denx.de>; Tue, 2 Jun 2020 21:14:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WdcezBC4A4rKEk9/60lNfCBZ6CNY/KjaUgWBY4Bh9+NtzP2hq/ltVecA1gOsGgD1RNl3LFTHaqO1WiUxtLvaDSEPljSnpVTWgQpJ8H3QdPoDLoyOywqkHkM9rQZiY5I3nIqLdTKqkfIXQZQvwE7qhJFLQE57kiSHODPMtw3f5fhEbYPcWSwNi/Kg/8urgSKgLCuhswAmBAGCxU0jBSUvcFaedfisomKPbYHoi1GWUDqFGRtJI+d4nDBUpEuJHui2FA8Ejb5one30ItymTSdWmLGEt5/xk/m3uUr8+/Utq9xzOj5okbveNirF/pksASJ7H+VfwZ7YOMdF7M8WrFlK3w== 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-SenderADCheck; bh=JfQKdXW5U1XqhYA2OLli0HhgI7gu+pGoiNcNnXQSqkE=; b=Ye3enz6F2/XdGDkPn8iFCXHfJcIfDQC5pjX2vIBtfRQBx9fGtY+S9PR5205bkkKtjGFJkSTnyRq8xMbieSWhKYv9E219rsWJ96EN9Ua3QhQ6lhRnQufCfKNNUJZ36IYAHHomTMjcrzqvJh+u5hsk5TaGO+UIUFgcpOCAkdTmG5DW4bcnDn39vXMP3mskZ0DyfVxdhaDi90P67xX+VRrM39+DVR4v4e3vTohWwnkMVTsPDAMpZiRRHCqlsASVU7xFoeeMLPM+rshx0NFiYkH5Y4R21It+GDXXg0Z0czTHnko4lf2yd4pWa5HQAdDnkio4qjtBTLG/rF+3Pj5I48Jp2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JfQKdXW5U1XqhYA2OLli0HhgI7gu+pGoiNcNnXQSqkE=; b=idItl08T2lqhzI7Od0kWFl65qSxLfTTXJqxCKnxl8mUUk1+bqWImBM4QWfC9MrXxzwxkRs4/KNYHe8/r9uMKG9br7VweOhk4Yep0SdQzJE6gCO/aS0MQTUFLDbcy6A0mFHD2yZEIbLx9L6Nn7C/OhpetGHyF+JPk5Jiq7cnE3Lo= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=prevas.dk; Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) by VI1PR10MB2512.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:7d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Tue, 2 Jun 2020 19:14:19 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0ac:4e97:2536:faa]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0ac:4e97:2536:faa%7]) with mapi id 15.20.3045.024; Tue, 2 Jun 2020 19:14:19 +0000 From: Rasmus Villemoes <rasmus.villemoes@prevas.dk> To: u-boot@lists.denx.de Cc: Simon Glass <sjg@chromium.org>, Heiko Schocher <hs@denx.de>, Biwen Li <biwen.li@nxp.com>, Rasmus Villemoes <rasmus.villemoes@prevas.dk> Subject: [PATCH v3 08/10] rtc: i2c_rtc_emul: catch any write to the "reset" register Date: Tue, 2 Jun 2020 21:14:01 +0200 Message-Id: <20200602191403.7542-9-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200602191403.7542-1-rasmus.villemoes@prevas.dk> References: <20200602191403.7542-1-rasmus.villemoes@prevas.dk> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM6PR04CA0013.eurprd04.prod.outlook.com (2603:10a6:20b:92::26) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (5.186.116.45) by AM6PR04CA0013.eurprd04.prod.outlook.com (2603:10a6:20b:92::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18 via Frontend Transport; Tue, 2 Jun 2020 19:14:18 +0000 X-Mailer: git-send-email 2.23.0 X-Originating-IP: [5.186.116.45] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c33c32a-d329-47bb-6762-08d80729265a X-MS-TrafficTypeDiagnostic: VI1PR10MB2512: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <VI1PR10MB2512560ED3DA848825DEF355938B0@VI1PR10MB2512.EURPRD10.PROD.OUTLOOK.COM> X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-Forefront-PRVS: 0422860ED4 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oTGoLv2ZB2TPB3RPRde5FxU/Bc8zqeQr3L4TguZd9okKDoUNFIsjh4jwbll1agKEYbX0H8iH4PnXpCMcIyA3nefNqSkHuJyUbjW3QhKkw+kayDVW1xb728Olx8MKcRF9xtCfnKTTANoP0GbJD7fBeRVU/rlVoTEIHaUIgWFtHzhXrlPoyPjwxZm17sRj5hcMooKAUsO374zQwnVCiZ+OwmrkP3P9X3hteLZqHVM+qh9bhKTORBeteuzXhXRDhWFftfihAoWF0H597mowMJv16YbW76HfV/WWVTz11yDpyNmx1IyvgZ7eTQxuKRhmdoj0eXhfs9kknLu9/WcU1NOQRw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(376002)(346002)(366004)(396003)(136003)(39850400004)(52116002)(66946007)(86362001)(66556008)(478600001)(5660300002)(66476007)(4326008)(107886003)(6506007)(2906002)(8676002)(8976002)(6916009)(6666004)(956004)(2616005)(83380400001)(44832011)(8936002)(186003)(16526019)(316002)(26005)(4744005)(36756003)(6512007)(6486002)(1076003)(54906003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: F2XjXh7WLDXgnAOMOXUBQr9dJyAalDYU2FkM9ZxEEscCCkks9EoblHpTfATxxa9EHVRiZ+InPbdx+dd1XJGQXOO5sG+jAbC8NqSqm8DFBxVS064HiDSfbnAAJOmw33FiZr2rZfiD8Hg1lk0WE+JDfUEw8nlNgpuFlXRjIsQWWUjm2OC3+OxoRtqqyfoMCiVqvZuhx6dRL1vtS2wih1PSTMk1MEGlnBTLqoHb/LEfIUKdJbM2fEgBBeVaGgwk06Sb8mmtvgOBfMyrud60EayH3hifUsgU5W1zC3uKBpkXZgFq6t0JwlLtQSeTSNk1OaBeWEFE864Qd4kxy7txtJuGVdq4PW6JwLBoI6qClPITt+YutBRmCRSp8GOtjpH6zxxWjzFEcD7cimMzbKjwNhSJqmt2dvWH4tbKYL3It9QU0cveP72r1cw3DF9GmCmaCRgXbBcvXSeEAF7J8TkzpblziSw0QjdOXg228cl93lftneY= X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 2c33c32a-d329-47bb-6762-08d80729265a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2020 19:14:19.4915 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s6+5Ypy4LtrwUHnyRfl6Y5wis8UNeyXc95hjl/SLEceQUacSwGSz9LF0GzK/yQCB3t5vFpfKlsg1AaUX6cQQZiIHkic4nroAg5W4w5xc2lM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB2512 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
new rtc methods, rtc command, and tests
|
expand
|
Hello Rasmus, Am 02.06.2020 um 21:14 schrieb Rasmus Villemoes: > It's more natural that any write that happens to touch the reset > register should cause a reset, rather than just a write that starts at > that offset. > > Reviewed-by: Simon Glass <sjg@chromium.org> > Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> > --- > drivers/rtc/i2c_rtc_emul.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Heiko Schocher <hs@denx.de> bye, Heiko
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c index a010af411b..7f78ff83cb 100644 --- a/drivers/rtc/i2c_rtc_emul.c +++ b/drivers/rtc/i2c_rtc_emul.c @@ -197,7 +197,8 @@ static int sandbox_i2c_rtc_xfer(struct udevice *emul, struct i2c_msg *msg, /* Write the register */ memcpy(plat->reg + offset, ptr, len); - if (offset == REG_RESET) + /* If the reset register was written to, do reset. */ + if (offset <= REG_RESET && REG_RESET < offset + len) reset_time(emul); } }