From patchwork Fri Mar 20 10:52:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1258835 X-Patchwork-Delegate: mario.six@gdsys.cc Return-Path: 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=aU5sIHb5; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kLGq6cdZz9sRN for ; Fri, 20 Mar 2020 21:53:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA916801D2; Fri, 20 Mar 2020 11:53:07 +0100 (CET) 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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="aU5sIHb5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A8A6A81591; Fri, 20 Mar 2020 11:53:06 +0100 (CET) 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 EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on072c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::72c]) (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 EE1D8801D2 for ; Fri, 20 Mar 2020 11:53:03 +0100 (CET) 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=dOGPek/eCg3z8zKNOwqBcJZoxKuJ8t07E0S3PS0412PnnCS2WXEiM8unZ7zq/gegIS7NS6FO5oG4nidYyX0407pktuM21xfaFKXDdXDEezCYG+R/RNm129KD4KnX2/OxWCLtpRMf0i+0goxSjqKzvLlMFmZ4P0e+VoTTvOtbBXw77Q52A7W+e2a2kv2kvGvcSHHc4lGSz5v8jVEM9T20S9+EQ2d9GEpMEtISksYKkkWP0+2HtfpnAIcA6VhKWNX0/+GNon6UMuX9P+3twQbyNoQBHeygsgh/x0aS+ZVF1qrcUj+0RmsLEz8QzluF6gcKg27OeL99MMka4pOFuGr7cQ== 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=Gas5QPKrdGS8NEitMw9rzzc9dfYSVPqNCR4qGFMyN0c=; b=Gc3sNlTVkCjwAAT5L8BxS7aAeAaxeIkxkLqfL+R75oSipUZcX9J8+zEQKjrVo1RmfYvZDArh7ZPmcrrZt7SF0EavgGxbQflwKmDGpweOa3v9Ym3CA/0uCqGEfSFazpEh9cshyaXxNWYu+wJrcQLqKg22vnVzNO6mMAvmMHsXwxiolX5gGZBMUrJNJM/YQTEflOmUCRGKWFG3FHASUn0nnlzy0J/erfUlT5C4hKUUFG/wLQdeI3CAyYwYlMZjCbzGqZ4V//0Qalvb/l/ZArPRGnDNDwkd123d4SKhb0iuXxrGSQzZpbk1Hhp3EhYes19LWW0PTljoXmnoD3spIYnz0w== 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=Gas5QPKrdGS8NEitMw9rzzc9dfYSVPqNCR4qGFMyN0c=; b=aU5sIHb5Q6EoKxgIXlGP8blB3Cr0VyoGgO0nVdHlKLmvfBzT6e+CJi+kCsS9d1e61qN5yD23PkaJ84d5UWUBsIIoly7ClhzXIDvtBtR+6T1mSkLme+/k3vTM8h5XLljn0uzicDWGhtQpSQj+JqUlQbcBEYhUL9CMyF/BoLBv/mo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasmus.villemoes@prevas.dk; Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (20.178.126.85) by VI1PR10MB2493.EURPRD10.PROD.OUTLOOK.COM (20.177.62.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Fri, 20 Mar 2020 10:52:56 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7%5]) with mapi id 15.20.2835.017; Fri, 20 Mar 2020 10:52:56 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Wolfgang Denk , Christophe Leroy , Mario Six , Huan Wang , Rasmus Villemoes Subject: [PATCH v3 1/2] timer: mpc83xx_timer: fix build with CONFIG_{HW_, }WATCHDOG Date: Fri, 20 Mar 2020 11:52:47 +0100 Message-Id: <20200320105248.24518-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 X-ClientProxiedBy: BEXP281CA0013.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10::23) 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 BEXP281CA0013.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Fri, 20 Mar 2020 10:52:55 +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: 85b52f83-d66b-4d3c-090d-08d7ccbcd8ea X-MS-TrafficTypeDiagnostic: VI1PR10MB2493: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-Forefront-PRVS: 03484C0ABF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(396003)(376002)(136003)(39850400004)(346002)(199004)(186003)(478600001)(26005)(86362001)(16526019)(4326008)(6916009)(54906003)(6486002)(6666004)(316002)(66946007)(6512007)(66476007)(6506007)(66556008)(81166006)(2616005)(8936002)(8676002)(81156014)(8976002)(2906002)(956004)(36756003)(44832011)(1076003)(5660300002)(52116002)(107886003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR10MB2493; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; Received-SPF: None (protection.outlook.com: prevas.dk does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yx0mokrHk/1TuskUbR/rv7ggho1eKHFyByZDI1w0S7hoNKArJhd5Le9TXmExIC7cMnZUhZAeXOzTRmo7v7FXPMa0mAGfw3OGmsfIFn+0M0M+HaJtzJipnEtrKRsc7evSP1dtqg5hhGY5ub3S6ZXOazZzncz8Ga3a1XXs9sBoGL3fq1DqJJynvZVCFxO4eTZg5B/zpqXpgrbMBNSCGb9HsJJcSzAiwKSJqP2VQV5oTEwrFO1zQGQ96ZcKW6hAGfAnyZQdLCcJ+RmZt5X4Titgn+gVTudZvOvhVXzQ3i6WWJGfgLn1FswMkC/MMp359Lwi8KGglMONzX2BUiI6RDGK57peJDdvdS+WWb0uzOftOdkclCRlNRhbiCVK6PtMlJPiVo0snRM5fY76R6R+uTVIsv1+A9oJ4PeYW37gvZ7q9I71M8T3u9RFrmyqWoC1PsE3 X-MS-Exchange-AntiSpam-MessageData: R1svsbP4ncM9YwcerZ9ORPGfatRSk9RMeZkITRCYtk4e2dKcT6tGKdmwwBK1J0kWS+cL2EUHw4v6RGXv3WkxClZCJw3mL8r+vi4upzs2tma3FsaQuDidnK5A8TbztJ2y9WCxbJ8aRWP8YwVnsOotxw== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 85b52f83-d66b-4d3c-090d-08d7ccbcd8ea X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2020 10:52:56.3097 (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: CcmyQw0BFFRrwP3jYPLa+HdmirXUPGrO4EUIvQUJ2VYnB5zHKOGhsZmDtaKfkyxEo2ebq4q8Sd7G/zUEaTRCTTpknf5WYO4hTt4pHG9z3ys= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB2493 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean The code, which is likely copied from arch/powerpc/lib/interrupts.c, lacks a fallback definition of CONFIG_SYS_WATCHDOG_FREQ and refers to a non-existing timestamp variable - obviously priv->timestamp is meant. Signed-off-by: Rasmus Villemoes --- drivers/timer/mpc83xx_timer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index 72cb58b693..da516c9d74 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -16,6 +16,10 @@ DECLARE_GLOBAL_DATA_PTR; +#ifndef CONFIG_SYS_WATCHDOG_FREQ +#define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2) +#endif + /** * struct mpc83xx_timer_priv - Private data structure for MPC83xx timer driver * @decrementer_count: Value to which the decrementer register should be re-set @@ -167,7 +171,7 @@ void timer_interrupt(struct pt_regs *regs) priv->timestamp++; #if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) - if ((timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0) + if ((priv->timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0) WATCHDOG_RESET(); #endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */