From patchwork Sun Feb 17 09:25:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 1043622 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GhrFWEyA"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 442M8K5TWtz9sDX for ; Sun, 17 Feb 2019 20:26:57 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6D97BC21E4E; Sun, 17 Feb 2019 09:26:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4DC31C21EA1; Sun, 17 Feb 2019 09:26:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7D8E6C21E68; Sun, 17 Feb 2019 09:26:15 +0000 (UTC) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by lists.denx.de (Postfix) with ESMTPS id A1B0BC21E1D for ; Sun, 17 Feb 2019 09:26:11 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id j5so2549245pfa.2 for ; Sun, 17 Feb 2019 01:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3I7YhsXPdS4+KiL54wmmr4t0UDjiSSf9fNvfLpse11I=; b=GhrFWEyAVPdT8Wms4Pnay4cvGwQspafgCQg6BS0ZBFIiRYYgZs6IQ2ziSrnCmBudtV FDOfpdDZYkrHEc+AGNXXiEx6pDLkDsLuxTYSUxGVlQdF3ffHtHpNid+1iKr1j/lEsySb 0rmCxqkPZCPkQZPK6EpF+YGvpvQhLtrjwmK7dpCc2NHbj2t+08hjleEm9iflIKJ24YQ9 g24jMTzezYUkxlzHgpfaaUdhqkMKWp+mdagHndUUh79ZwXsefVSLZs8j+/UtURx26Ozt tI2GvF66bdx+4zcAxd36eu0U6V6OD/Vp7s4uSum8GXYJ+bXHujwJlYpn7TJA9PY+CI1m /I0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3I7YhsXPdS4+KiL54wmmr4t0UDjiSSf9fNvfLpse11I=; b=irYICYa+07DB72vXw57rup7fYoRFsG1vXr1xXOyvAW4kKhyEpe7B4jMmvBU2xQ3JQ/ MJmMIx6YW+sUgJ1YXg248G5+PkDIxeN/nRK8z2Ju1YR/Sg6Z68HqeC8jwLLoGFU0Iq/B QYcELtZRucY6F/x9iC0a/xbD6nwdmi2gVNtJRhWfMU9g8hmpNhBA2Lk8z5nz4a1x9Jxx F6UBHqA8/i0JIt9+IvaNK7LLabJpxxCFA35TFnbCXRPBwGvqZ7CHmrMLAd27AqrGJRDb 0yhJA3CxieF/pJlJOfpIUllTcZzOR3xzK4+eGpWVMa9qD6bbXMhpwSPpyLASPMo0tOps x5QQ== X-Gm-Message-State: AHQUAuYriPqjgSZzt6oB8Ok3YP8dpVG+2DFdB2c7DhQkCX6CFttb7Bz7 XhFtu6Sz7yLwzZbtZrp+3Fv6sQhN5h8= X-Google-Smtp-Source: AHgI3IZsKQW1+oD3Zno7jFBb8Bkumm7MaNAULDTzn7/ajK+2oI7QYZaI2cicXVPbAsDLQO+S6mcdRQ== X-Received: by 2002:a62:5c1:: with SMTP id 184mr18275766pff.165.1550395569938; Sun, 17 Feb 2019 01:26:09 -0800 (PST) Received: from chrisp-dl.ws.atlnz.lc ([2001:df5:b000:22:3a2c:4aff:fe70:2b02]) by smtp.gmail.com with ESMTPSA id s190sm17003532pfb.103.2019.02.17.01.26.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Feb 2019 01:26:09 -0800 (PST) From: Chris Packham To: u-boot@lists.denx.de, Albert Aribaud , Tom Rini , Stefan Roese Date: Sun, 17 Feb 2019 22:25:53 +1300 Message-Id: <20190217092555.20212-2-judge.packham@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190217092555.20212-1-judge.packham@gmail.com> References: <20190217092555.20212-1-judge.packham@gmail.com> MIME-Version: 1.0 Cc: Chris Packham Subject: [U-Boot] [PATCH v3 1/3] watchdog: orion_wdt: support SPL usage X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" When run from the SPL the mvebu targets are using the hardware default offset for the SoC peripherals. devfdt_get_addr_size_index() understands how to deal with this via dm_get_translation_offset() so use this instead of fdtdec_get_addr_size_auto_noparent(). Signed-off-by: Chris Packham Reviewed-by: Stefan Roese --- Changes in v3: None Changes in v2: None drivers/watchdog/orion_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index a0df02d10382..c1add3e7c121 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c @@ -114,9 +114,7 @@ static inline bool save_reg_from_ofdata(struct udevice *dev, int index, fdt_addr_t addr; fdt_size_t off; - addr = fdtdec_get_addr_size_auto_noparent( - gd->fdt_blob, dev_of_offset(dev), "reg", index, &off, true); - + addr = devfdt_get_addr_size_index(dev, index, &off); if (addr == FDT_ADDR_T_NONE) return false;