From patchwork Thu May 9 20:11:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 1097662 X-Patchwork-Delegate: marek.vasut@gmail.com 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="W2CJf/7d"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 450Pg00Tr6z9sB8 for ; Fri, 10 May 2019 06:13:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A4C23C21C2C; Thu, 9 May 2019 20:12:38 +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_H2, 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 61C51C21DFD; Thu, 9 May 2019 20:12:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A0A0BC21E0F; Thu, 9 May 2019 20:12:14 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by lists.denx.de (Postfix) with ESMTPS id 1A12CC21DFB for ; Thu, 9 May 2019 20:12:11 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id h11so4650144wmb.5 for ; Thu, 09 May 2019 13:12:11 -0700 (PDT) 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=DmmZ1Z7rdj5OIH6ETG8GHpmhbwGO5pJYjUWp5rSLS6w=; b=W2CJf/7doV3t9ishZggQwuV1Z3FldQ/aple0Nler740yPtP92rFUJxy/emQDNa6BYn RJr+Bj+/fxkhzsf8oSjj4vjtpkCq4532piwU8a1szXpCGtWdTpjO5+FgKsBISflHbiw6 L7uA7DRj2xLZ+niDdsdpOltPkh96ZBi8VPhSUbPYxicHfHY+qei6HuLkl0CB8PRuAm9+ qvjqEsSFaRR+R9Bc1ecOnazt4t6QdpPxQaHNcsqJaQbVFo6kf7dOxPe2Jl0yzv4dvmSV qkYw3Ht7UtSEWUNTiako+IpTfeIe+S0MNzFuwXN9yDjhM/jx0Zt1B2XINh1ib6TKMUXI zTvQ== 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=DmmZ1Z7rdj5OIH6ETG8GHpmhbwGO5pJYjUWp5rSLS6w=; b=Q76mOUTPdMjo6W4OKoIbgmZM/Pa/ssRotGoUKqEqJMAPXnypSePfYEe/CbOYeXcrMk 4X4069vj6zCondqoJqmRis9rOh45ET3smVagXZnySZBhaEcljSLp+1DB4SDXvgcyH79y hE9PjryjpL3FobDCBQe+xVFh/CDW+dLC4xKeUaG7k075qH+1UpCpbFHe4/DAXrw9Ymzm uZLK0ztywiY4p5aAdbWh8HPd/BPvi+W1CtzLeGVPxex96qe694ZZQlXwpw6czq+3iLn8 eiLXRQ8X5oevfyDCTGBPn79Cj7ulUjmpVkfzYH41rILEmk5MLLC/RAMyV3X+h4uJZUPs Vz2g== X-Gm-Message-State: APjAAAVBwrubo9WhXUpuFZrnu1PjYQ1OoxR1K+pDdA18Q96oQwgGSiA5 PwnKcmrQi1YUCM12+4R6kH4= X-Google-Smtp-Source: APXvYqx0+C0HbEwBXxrPW0ONz4VetavY+D92uiupNaVqAnfbuhryDT/7+V227gGaTvaw8FfiRycggw== X-Received: by 2002:a1c:2388:: with SMTP id j130mr3902362wmj.133.1557432730808; Thu, 09 May 2019 13:12:10 -0700 (PDT) Received: from ubuntu.home ([2a02:8071:6a3:700:2df8:99ba:e50f:756b]) by smtp.gmail.com with ESMTPSA id a20sm8326402wrf.37.2019.05.09.13.12.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 13:12:10 -0700 (PDT) From: Simon Goldschmidt To: Marek Vasut Date: Thu, 9 May 2019 22:11:58 +0200 Message-Id: <20190509201200.10336-5-simon.k.r.goldschmidt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190509201200.10336-1-simon.k.r.goldschmidt@gmail.com> References: <20190509201200.10336-1-simon.k.r.goldschmidt@gmail.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 4/6] serial: altera_uart: convert to livetree 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" Convert 'altera_uart_ofdata_to_platdata' to use 'dev_read_u32_default' instead of 'fdtdec_get_int' and get rid of DECLARE_GLOBAL_DATA_PTR. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/serial/altera_uart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index 67d47199aa..436cf2331d 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -10,8 +10,6 @@ #include #include -DECLARE_GLOBAL_DATA_PTR; - /* status register */ #define ALTERA_UART_TMT BIT(5) /* tx empty */ #define ALTERA_UART_TRDY BIT(6) /* tx ready */ @@ -91,8 +89,7 @@ static int altera_uart_ofdata_to_platdata(struct udevice *dev) plat->regs = map_physmem(devfdt_get_addr(dev), sizeof(struct altera_uart_regs), MAP_NOCACHE); - plat->uartclk = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), - "clock-frequency", 0); + plat->uartclk = dev_read_u32_default(dev, "clock-frequency", 0); return 0; }