From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 D45C1C47092 for ; Wed, 2 Jun 2021 20:38:35 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC321613DE for ; Wed, 2 Jun 2021 20:38:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC321613DE Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=libero.it Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9149182F36; Wed, 2 Jun 2021 22:38:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=libero.it 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=libero.it header.i=@libero.it header.b="H94ZziCK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1385482F3A; Wed, 2 Jun 2021 22:38:30 +0200 (CEST) Received: from libero.it (smtp-35.italiaonline.it [213.209.10.35]) (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 8BD6C82F42 for ; Wed, 2 Jun 2021 22:38:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=libero.it Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dariobin@libero.it Received: from passgat-Modern-14-A10M.homenet.telecomitalia.it ([79.17.119.101]) by smtp-35.iol.local with ESMTPA id oXctlNwhysptioXdBlNDhU; Wed, 02 Jun 2021 22:38:25 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1622666305; bh=SAPNQpLVPR97qoRj5qUw0h0e66kTfhMzMqKJGCMggGU=; h=From; b=H94ZziCKerBeY6HsS4deWR7GCp0BK1IT1UB8m1SISQ6UCZk1K1PZpThlfkLkx9MKC fVThn1tpHGURdQ6Hs+Qru6wXSeDuJNsNshWr8LVTbxwjOeGgsUo4wZqwQfQVU+i4cA TY2QkC+25uMt0qjp10Os2SsbFoC/5t4W1fnUrORHgcoYvYBUQFU2OXbLybdTd0fw+v l5vtKZeK43qP8AV4Equ2PW/iuF5d1PP5IeBJFCDw3jWxuixxlAPIFG4prtdjDNK/jB oHjiffIgBEdqn9PQK8U8mA9O7zwYxGfGpHQr0SMCs8WoV/9rJlN+KfzJsyWSVfhTyM eSZ9GW7riRvLg== X-CNFS-Analysis: v=2.4 cv=Bo1Yfab5 c=1 sm=1 tr=0 ts=60b7ec41 cx=a_exe a=do1bHx4A/kh2kuTIUQHSxQ==:117 a=do1bHx4A/kh2kuTIUQHSxQ==:17 a=MpC_hCVLlhPZseGFDh4A:9 From: Dario Binacchi To: u-boot@lists.denx.de Cc: Dario Binacchi , Lokesh Vutla Subject: [PATCH v2 2/8] rtc: davinci: fix compiler errors Date: Wed, 2 Jun 2021 22:37:59 +0200 Message-Id: <20210602203805.11494-3-dariobin@libero.it> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210602203805.11494-1-dariobin@libero.it> References: <20210602203805.11494-1-dariobin@libero.it> X-CMAE-Envelope: MS4xfNGGpt5NpzJAL95T0uOH9QCZaZiMtWPcc0RSJl1MwVndXhpU3wDxmCN8eaB7O2jlelQAcAfT5rqGSqZzK3Y2m/vbz4aHRSZlBu7Qf8v7xmXF+qftPVAz UBZPB45ddu6vLt+9qouT27jSd6KByRN+VBLGe8n1kQ5LqhTFmYGe0pq/f2xHjljqzMimYdLLH0RSVjvBf5Shc+BPHBC480UWHp7cKq+7LGWrSd2n0RTMj8yI 8SZNWfEeZ9YkkzjKGd2R7cyY/RZse8r0nRZWwUZLjEDGxOAItoXV9awOKpDHqKba X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.4 at phobos.denx.de X-Virus-Status: Clean Fix errors raised by module compilation. Signed-off-by: Dario Binacchi --- Changes in v2: - Separated from Kconfig patch drivers/rtc/davinci.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c index c446e7a735..8f5f76c9d6 100644 --- a/drivers/rtc/davinci.c +++ b/drivers/rtc/davinci.c @@ -9,11 +9,16 @@ #include #include #include +#include #include +#if !defined(RTC_BASE) && defined(DAVINCI_RTC_BASE) +#define RTC_BASE DAVINCI_RTC_BASE +#endif + int rtc_get(struct rtc_time *tmp) { - struct davinci_rtc *rtc = (struct davinci_rtc *)DAVINCI_RTC_BASE; + struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; unsigned long sec, min, hour, mday, wday, mon_cent, year; unsigned long status; @@ -57,7 +62,7 @@ int rtc_get(struct rtc_time *tmp) int rtc_set(struct rtc_time *tmp) { - struct davinci_rtc *rtc = (struct davinci_rtc *)DAVINCI_RTC_BASE; + struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; debug("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, @@ -75,7 +80,7 @@ int rtc_set(struct rtc_time *tmp) void rtc_reset(void) { - struct davinci_rtc *rtc = (struct davinci_rtc *)DAVINCI_RTC_BASE; + struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; /* run RTC counter */ writel(0x01, &rtc->ctrl); -- 2.17.1