Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228210/?format=api
{ "id": 2228210, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228210/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260424084546.260786-1-francesco@dolcini.it/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.1/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260424084546.260786-1-francesco@dolcini.it>", "date": "2026-04-24T08:45:44", "name": "rtc: ds1307: Remove legacy non-DM code", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c8cd262abe3998f1e778e8caf12847b88c172fcd", "submitter": { "id": 84779, "url": "http://patchwork.ozlabs.org/api/1.1/people/84779/?format=api", "name": "Francesco Dolcini", "email": "francesco@dolcini.it" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260424084546.260786-1-francesco@dolcini.it/mbox/", "series": [ { "id": 501457, "url": "http://patchwork.ozlabs.org/api/1.1/series/501457/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=501457", "date": "2026-04-24T08:45:44", "name": "rtc: ds1307: Remove legacy non-DM code", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501457/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2228210/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228210/checks/", "tags": {}, "headers": { "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;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=dolcini.it header.i=@dolcini.it header.a=rsa-sha256\n header.s=default header.b=kuF58Srf;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=dolcini.it", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=dolcini.it header.i=@dolcini.it header.b=\"kuF58Srf\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=dolcini.it", "phobos.denx.de;\n spf=pass smtp.mailfrom=francesco@dolcini.it" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g2wD049hqz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 02:25:20 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id EA02984348;\n\tSat, 25 Apr 2026 18:25:16 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 2CBAC83FB0; Sat, 25 Apr 2026 18:25:16 +0200 (CEST)", "from mail11.truemail.it (mail11.truemail.it\n [IPv6:2001:4b7e:0:8::81])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 72AE08432A\n for <u-boot@lists.denx.de>; Sat, 25 Apr 2026 18:25:12 +0200 (CEST)", "from francesco-nb.. (93-49-2-63.ip317.fastwebnet.it [93.49.2.63])\n by mail11.truemail.it (Postfix) with ESMTPA id 7A2F81FE9C;\n Fri, 24 Apr 2026 10:45:56 +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,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it;\n s=default; t=1777020356;\n bh=agByQXGGaIrOFB1nL4lo4z3k1us/x+W8lr0GUM7F0HY=; h=From:To:Subject;\n b=kuF58SrfSh1/xCPE7xAFVvWEMBNWIasOfuVJCp7BR8T8C2RusSLWpCnFm3vDVgskx\n SoRcwYlFUaJqg72+GcuJcyJlzvm8R2Tg/lORJ4UFE6L11QoenNLSsOmvvx6Ig2XIuY\n gAnFaqVkO9u+GY7HF7GszeV09EXusoGam/GnutdgWavyko4qgv3+CCU1Br+kBdCYnP\n YU2BnlD0ZBZ99e4xShV+Ny7DGU57o+g2lkcbgkJJLNHC1EBbUWLwVxaYGYtQONn6UE\n FOfg5L5pu3kEDKPl/0c+4n8VSgCA89lJDwWQtSCkhIeZonUVDMNJgYQoCkW7grDQr0\n yWQq0NafHZTLA==", "From": "Francesco Dolcini <francesco@dolcini.it>", "To": "Tom Rini <trini@konsulko.com>", "Cc": "Francesco Dolcini <francesco.dolcini@toradex.com>,\n\tu-boot@lists.denx.de", "Subject": "[PATCH] rtc: ds1307: Remove legacy non-DM code", "Date": "Fri, 24 Apr 2026 10:45:44 +0200", "Message-ID": "<20260424084546.260786-1-francesco@dolcini.it>", "X-Mailer": "git-send-email 2.47.3", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>,\n <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>,\n <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.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "From: Francesco Dolcini <francesco.dolcini@toradex.com>\n\nThe DS1307 driver depends on DM_RTC since commit d425d6056e01 (\"rtc: Add\nDM support to ds1307\"), remove the related obsolete code.\n\nSigned-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>\n---\n drivers/rtc/ds1307.c | 152 -------------------------------------------\n 1 file changed, 152 deletions(-)", "diff": "diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c\nindex 049210991014..34d8f8c5276b 100644\n--- a/drivers/rtc/ds1307.c\n+++ b/drivers/rtc/ds1307.c\n@@ -68,157 +68,6 @@ enum ds_type {\n #define MCP7941X_BIT_ST\t\t0x80\n #define MCP7941X_BIT_VBATEN\t0x08\n \n-#ifndef CONFIG_DM_RTC\n-\n-/*---------------------------------------------------------------------*/\n-#undef DEBUG_RTC\n-\n-#ifdef DEBUG_RTC\n-#define DEBUGR(fmt, args...) printf(fmt, ##args)\n-#else\n-#define DEBUGR(fmt, args...)\n-#endif\n-/*---------------------------------------------------------------------*/\n-\n-#ifndef CFG_SYS_I2C_RTC_ADDR\n-# define CFG_SYS_I2C_RTC_ADDR\t0x68\n-#endif\n-\n-#if defined(CONFIG_RTC_DS1307) && (CONFIG_SYS_I2C_SPEED > 100000)\n-# error The DS1307 is specified only up to 100kHz!\n-#endif\n-\n-static uchar rtc_read (uchar reg);\n-static void rtc_write (uchar reg, uchar val);\n-\n-/*\n- * Get the current time from the RTC\n- */\n-int rtc_get (struct rtc_time *tmp)\n-{\n-\tint rel = 0;\n-\tuchar sec, min, hour, mday, wday, mon, year;\n-\n-#ifdef CONFIG_RTC_MCP79411\n-read_rtc:\n-#endif\n-\tsec = rtc_read (RTC_SEC_REG_ADDR);\n-\tmin = rtc_read (RTC_MIN_REG_ADDR);\n-\thour = rtc_read (RTC_HR_REG_ADDR);\n-\twday = rtc_read (RTC_DAY_REG_ADDR);\n-\tmday = rtc_read (RTC_DATE_REG_ADDR);\n-\tmon = rtc_read (RTC_MON_REG_ADDR);\n-\tyear = rtc_read (RTC_YR_REG_ADDR);\n-\n-\tDEBUGR (\"Get RTC year: %02x mon: %02x mday: %02x wday: %02x \"\n-\t\t\"hr: %02x min: %02x sec: %02x\\n\",\n-\t\tyear, mon, mday, wday, hour, min, sec);\n-\n-#ifdef CONFIG_RTC_DS1307\n-\tif (sec & RTC_SEC_BIT_CH) {\n-\t\tprintf (\"### Warning: RTC oscillator has stopped\\n\");\n-\t\t/* clear the CH flag */\n-\t\trtc_write (RTC_SEC_REG_ADDR,\n-\t\t\t rtc_read (RTC_SEC_REG_ADDR) & ~RTC_SEC_BIT_CH);\n-\t\trel = -1;\n-\t}\n-#endif\n-\n-#ifdef CONFIG_RTC_MCP79411\n-\t/* make sure that the backup battery is enabled */\n-\tif (!(wday & MCP7941X_BIT_VBATEN)) {\n-\t\trtc_write(RTC_DAY_REG_ADDR,\n-\t\t\t wday | MCP7941X_BIT_VBATEN);\n-\t}\n-\n-\t/* clock halted? turn it on, so clock can tick. */\n-\tif (!(sec & MCP7941X_BIT_ST)) {\n-\t\trtc_write(RTC_SEC_REG_ADDR, MCP7941X_BIT_ST);\n-\t\tprintf(\"Started RTC\\n\");\n-\t\tgoto read_rtc;\n-\t}\n-#endif\n-\n-\ttmp->tm_sec = bcd2bin (sec & 0x7F);\n-\ttmp->tm_min = bcd2bin (min & 0x7F);\n-\ttmp->tm_hour = bcd2bin (hour & 0x3F);\n-\ttmp->tm_mday = bcd2bin (mday & 0x3F);\n-\ttmp->tm_mon = bcd2bin (mon & 0x1F);\n-\ttmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000);\n-\ttmp->tm_wday = bcd2bin ((wday - 1) & 0x07);\n-\ttmp->tm_yday = 0;\n-\ttmp->tm_isdst= 0;\n-\n-\tDEBUGR (\"Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\\n\",\n-\t\ttmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,\n-\t\ttmp->tm_hour, tmp->tm_min, tmp->tm_sec);\n-\n-\treturn rel;\n-}\n-\n-/*\n- * Set the RTC\n- */\n-int rtc_set (struct rtc_time *tmp)\n-{\n-\tDEBUGR (\"Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\\n\",\n-\t\ttmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,\n-\t\ttmp->tm_hour, tmp->tm_min, tmp->tm_sec);\n-\n-\tif (tmp->tm_year < 1970 || tmp->tm_year > 2069)\n-\t\tprintf(\"WARNING: year should be between 1970 and 2069!\\n\");\n-\n-\trtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100));\n-\trtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon));\n-#ifdef CONFIG_RTC_MCP79411\n-\trtc_write (RTC_DAY_REG_ADDR,\n-\t\t bin2bcd (tmp->tm_wday + 1) | MCP7941X_BIT_VBATEN);\n-#else\n-\trtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1));\n-#endif\n-\trtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday));\n-\trtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour));\n-\trtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min));\n-#ifdef CONFIG_RTC_MCP79411\n-\trtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec) | MCP7941X_BIT_ST);\n-#else\n-\trtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec));\n-#endif\n-\n-\treturn 0;\n-}\n-\n-/*\n- * Reset the RTC. We setting the date back to 1970-01-01.\n- * We also enable the oscillator output on the SQW/OUT pin and program\n- * it for 32,768 Hz output. Note that according to the datasheet, turning\n- * on the square wave output increases the current drain on the backup\n- * battery to something between 480nA and 800nA.\n- */\n-void rtc_reset (void)\n-{\n-\trtc_write (RTC_SEC_REG_ADDR, 0x00);\t/* clearing Clock Halt\t*/\n-\trtc_write (RTC_CTL_REG_ADDR, RTC_CTL_BIT_SQWE | RTC_CTL_BIT_RS1 | RTC_CTL_BIT_RS0);\n-}\n-\n-/*\n- * Helper functions\n- */\n-\n-static\n-uchar rtc_read (uchar reg)\n-{\n-\treturn (i2c_reg_read (CFG_SYS_I2C_RTC_ADDR, reg));\n-}\n-\n-static void rtc_write (uchar reg, uchar val)\n-{\n-\ti2c_reg_write (CFG_SYS_I2C_RTC_ADDR, reg, val);\n-}\n-\n-#endif /* !CONFIG_DM_RTC */\n-\n-#ifdef CONFIG_DM_RTC\n static int ds1307_rtc_set(struct udevice *dev, const struct rtc_time *tm)\n {\n \tint ret;\n@@ -366,4 +215,3 @@ U_BOOT_DRIVER(rtc_ds1307) = {\n \t.of_match = ds1307_rtc_ids,\n \t.ops\t= &ds1307_rtc_ops,\n };\n-#endif /* CONFIG_DM_RTC */\n", "prefixes": [] }