From patchwork Tue Nov 7 19:05:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 741931 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1793450wrr; Tue, 7 Nov 2023 11:06:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGW9nCpQc/DExCzySujU/veZuCGK2nx3SjAt6KiHl1zPQg1eNpCu3rNLBEnnc6wDKx071YJ X-Received: by 2002:a17:907:60d2:b0:9c6:8190:359f with SMTP id hv18-20020a17090760d200b009c68190359fmr18976610ejc.33.1699383981294; Tue, 07 Nov 2023 11:06:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699383981; cv=none; d=google.com; s=arc-20160816; b=V2oJY0OZE5JjWXy4l6de+KnrRpYAKzBwP8WIjmDC1+6jvxMIRuV8/uCrl9pysCzp6C 3RcXY9GvZ27NIgO43V9V9GFqnevcrYYi0ERbjzbdOOauveAxSLvRCDiG3JGYrh5BnM7k MT1WBDqhoju0Gb75+nE5vDbAa/TAno9QpMzfWeObLWbYgLWowZOUwuvaZAaCLB+xJL0P kkwZvFgddeKpHfKdZlczLz3nbduTcyO5qIsY3CsNZTuGSgMZ20DM7rDUk7I7EVYTs/OQ bAxBfH7NuADojgIh3E30KxS+8Yj84Zzq/O3SDkAYodge5rWyfUpalzpjdGbhF5W1vrWr PZ0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R/gKGvRzJKAN1ayEoH4r8x99az9Qr4AgjxYYn4lt5lQ=; fh=V8mDuKiLPNtyICTEK9bwK0gdoM7g2D1lZIysD2SFi7U=; b=cR4Ep2TNwfMkY96l7fA2aeeVUtg4LzseXa4e1jKPM929vVDLftLzH0foO/VYuOvSl3 rQNRFoXkdd78uncjn76swax88SnDp/Byq/tAQFQM9JPrFEB/OJ3FCqVbAgS4oE/bZAXS VeFo5RcWmV+syqb06RqLt9z4VRit1BmqbhwOYEhvGs5+D9DUJjYd/aU/eQlX9FZST4fz dBM6vfNcAk9H974gOK5hTlzfqi/wwfm48GxnMMvaUzLr/EtNkOlKxvVoAD5Factck6jc WAPWMidoh5T1ybPtCmApqeeCo0J7wiqPwRKdF4ofF3DCWm8xtFLpz2uikNsogYi3QHhT R0cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hKOEScBT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id qb6-20020a1709077e8600b009b28213ba5esi1202433ejc.268.2023.11.07.11.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:21 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hKOEScBT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CA76875BF; Tue, 7 Nov 2023 20:06:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="hKOEScBT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87F7C875C3; Tue, 7 Nov 2023 20:06: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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 65B8787584 for ; Tue, 7 Nov 2023 20:06:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1eb39505ba4so3670155fac.0 for ; Tue, 07 Nov 2023 11:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699383963; x=1699988763; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R/gKGvRzJKAN1ayEoH4r8x99az9Qr4AgjxYYn4lt5lQ=; b=hKOEScBTYPMyYFutSUcuCwnDm6CoIYtuaUBiycxWDLlIpUW0Jovesf+m/PX2xhlo6z nJsWlI46Ku19T7NFt6Vc3IblyJu/QXwwiRiszkp91IZEaqFxYHQ8VihYgLJziZn0Vk0F 08mHIUBMlzcgs0mwMWm0MT+cJc97df7q8fdBeTVNxwVwx7my50/4IVbqLesTG1oVEZZG k/uiG6adwCFQYZ/LWmEbuay1TX1jQsickwzH2xPXYcYYTTqCUT9RUhNzhIchfqs/U8Ap VZexmcmD+T4Ix62NH1+9MhPwNQQhT0sV8maJ72WL0bMifGsLFJrBsSsTWihP2Vjj3Ll5 Mqbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699383963; x=1699988763; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R/gKGvRzJKAN1ayEoH4r8x99az9Qr4AgjxYYn4lt5lQ=; b=JAzMocXLd8sK1N94qwEOfVAOj/HJFVTW8d+lVWCIaXUnIj0HfKj3snJj8DjPY6S8JY JedJbPJJLLzvcGG6Xaoip2b3iwzWFDSEUiPfV6KhikG7cvQUjQddOzR/cQgpzpeynV6D nlD8je2I52Zke9dbVQmEfJaKK7xFREpSLGHvc3O4niM8LgA5J7fq9iUtLZ46+k9xHSfn tkWyA4UNdo6R7VGMnkpSD/b09kGhaq79LQrlS/BIs8oQYdCWWcOWci8Q3j5nzTxCCRrY 0V0iRSGS1reituwTP2dCFgBXsOsNEIsy0tctCWk6vrqhpOB+rjp3JLarjxQAEzTCtsdk VpJg== X-Gm-Message-State: AOJu0YyF595J7/2NtrCFt8/M5N4ah+4+wkGULabSPAAhrYeZhBxNGpN/ 4vJUMOSEjk5dqG13bvSNzI768g== X-Received: by 2002:a05:6871:7283:b0:1e9:f0fe:6ba4 with SMTP id mm3-20020a056871728300b001e9f0fe6ba4mr517001oac.11.1699383962953; Tue, 07 Nov 2023 11:06:02 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id g3-20020a056870214300b001c02f12abd0sm1827006oae.38.2023.11.07.11.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:02 -0800 (PST) From: Sam Protsenko To: Simon Glass , Tom Rini Cc: Mark Kettenis , u-boot@lists.denx.de Subject: [PATCH 1/4] serial: s5p: Remove common.h inclusion Date: Tue, 7 Nov 2023 13:05:58 -0600 Message-Id: <20231107190601.17151-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107190601.17151-1-semen.protsenko@linaro.org> References: <20231107190601.17151-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean It's not really needed here anymore. Remove it, as common.h is going away at some point. Signed-off-by: Sam Protsenko Reviewed-by: Simon Glass --- drivers/serial/serial_s5p.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index fe52580d64de..177215535676 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -7,7 +7,6 @@ * based on drivers/serial/s3c64xx.c */ -#include #include #include #include From patchwork Tue Nov 7 19:05:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 741932 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1793559wrr; Tue, 7 Nov 2023 11:06:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDPX0JLJjahXG7/7G6NcW+D4SxBIhnhwM2WAuBO+5JfO0xW2F9Hr7f9pxxCumaxjSqXw0D X-Received: by 2002:a17:906:794d:b0:9be:705:d7d0 with SMTP id l13-20020a170906794d00b009be0705d7d0mr16079565ejo.0.1699383992339; Tue, 07 Nov 2023 11:06:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699383992; cv=none; d=google.com; s=arc-20160816; b=U/Wyj8NsvuaK7QcE1LNUVJnNk3HXmBOKEV4pjwTLXvUO+EYsyayPwxl1EaSg0fovle h8iTD/IgHObLcxXi8H6xo6g0otkd19PUaVxj6eIl9GX4bH8MlzJ2pFsOzSbJPt1fZQJC 38cb1XnwVgijjDDlJ4R/PC49hFMgSTuCKKEQI4tfbPLIYV6mXl/KiRIDWBDy5veBjtjp X/gVRd9OER3em31dJt0jU/WVVNT3aXbm5P6S6uY47mW8B9PwlaLo+ZvHBZUSywhjxDkk /hb2OmtRKGCGv8UCAYaRvRBZjI86qUZpVRALzmnynR3AoIiQYN4avakKXDqgqEiOdqJm l5dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LjFvinfoEp/lieblzIudkNY2qHMs8fgFELz/BB33aNQ=; fh=V8mDuKiLPNtyICTEK9bwK0gdoM7g2D1lZIysD2SFi7U=; b=m1xqqfCPiRaIcyu28UUzLAvKlyPWNc2QcPFIKD0Omek6Ba3e2zDmidPiPnrAFO6g3i N2DWYpNQzTbIQ++cxmFDT1KBAFIoNw+k4a6KyiIW9rtP17Ak5ZbHS2qETFQlviKf/CYY ve29IXd2FB012U9W4Q4zPtDigdP1DaRm9q/DCGkADKbSEO7gxbXgiDGKekvClCDg3koy Ap+zBBfF46kSiv6/0oIwHUxWu5GDTeB2FO0yZw29QltTxTQ8izQ+d5ycvZozKfQO4SZb rpt+9mfquAhyhnEGLLUPig7k8AQ+I9wUWmv5x/klieRDMjP3ybm5smPSiBsmeKIrkdeU AMtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CBJj3Vr7; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id dt3-20020a170907728300b0099318060d40si1373475ejc.459.2023.11.07.11.06.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:32 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CBJj3Vr7; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDCFD87584; Tue, 7 Nov 2023 20:06:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="CBJj3Vr7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DAF53875BF; Tue, 7 Nov 2023 20:06:07 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3F7CB875BF for ; Tue, 7 Nov 2023 20:06:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-5869914484fso3332145eaf.0 for ; Tue, 07 Nov 2023 11:06:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699383964; x=1699988764; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LjFvinfoEp/lieblzIudkNY2qHMs8fgFELz/BB33aNQ=; b=CBJj3Vr7foH4nbrfZcin8300dQjm4CFsD/VqfDmAmszs7mGq5b27uJZeUpMHP6olOQ ID7U005oKeTKWTMkQqrPaW5YE6pGRHFU0CxTRQtJ4lvtI6JMwSRv0en04nreC12BRSXu 7HSadGNzSMdUKFnvkyKQks8+4rv8Cy68jOJf2CVpcUm1n6NgEFNDLXjNs/IK+qUCqTu0 cui91paCcEbjstYI6nV3tYcF8rYXv3OZYhxM01rBYOUBrAWZsygKhxRaegkV1fpZLJ9/ G+/H8rA6dz9rjPlxg3ScPAnWnxIFQur4lzo8s7Ohg9S+I4hzsp35Lcoez3MdxTC/gw8Q 8mTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699383964; x=1699988764; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LjFvinfoEp/lieblzIudkNY2qHMs8fgFELz/BB33aNQ=; b=asfNF5apg28KfUq9n56EUWqmjmwQzlcQ9WEY+9psaqvMM6nDdJFOKr82FwisUrGe7a j0swWTcnUlRXbtERKCuFFKpa0dNllqbeZNZTXxKEuOtvbODQetPeG2V1o9pcOcMaW+ji iLU6TtPG+j8gubMfZWvMy9TMKhl75CsuyW/eAZCgMVnC3nKJlEeTkt68ewhCJmzQ6lG4 JK/FE8CTfFe1f3dqw6S8dte3QfY4HsjXWhPEgha1csgi5Z5nUm7lRHS7E7/Go1s7/KJz fkBkd5dCkDWNrpmU09bII93JyrzrhVtNH4lGcOAvCPtDk9K8HOEcVindnJhdGUl1qUNE 3ROQ== X-Gm-Message-State: AOJu0Yx1CIeqP4ysBvLKxMkVnyRt8jRFtQTzvjtniVBWAFyzrwxO3xPW imGVyewsjOQ1rSZxdsXl55mXaFanGZkKOwBQvcOjWA== X-Received: by 2002:a05:6820:211:b0:581:3e7d:12e8 with SMTP id bw17-20020a056820021100b005813e7d12e8mr33524767oob.2.1699383963913; Tue, 07 Nov 2023 11:06:03 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id q23-20020a4a3317000000b00589ce21f6bfsm114454ooq.15.2023.11.07.11.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:03 -0800 (PST) From: Sam Protsenko To: Simon Glass , Tom Rini Cc: Mark Kettenis , u-boot@lists.denx.de Subject: [PATCH 2/4] serial: s5p: Use livetree API to get "id" property Date: Tue, 7 Nov 2023 13:05:59 -0600 Message-Id: <20231107190601.17151-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107190601.17151-1-semen.protsenko@linaro.org> References: <20231107190601.17151-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Use dev_read_u8_default() instead of fdtdec_get_int() to read the "id" property from device tree, as suggested in [1]. dev_* API is already used in this driver, so there is no reason to stick to fdtdec_* API. This also fixes checkpatch warning: WARNING: Use the livetree API (dev_read_...) [1] doc/develop/driver-model/livetree.rst Signed-off-by: Sam Protsenko Reviewed-by: Simon Glass --- drivers/serial/serial_s5p.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index 177215535676..c57bdd059ea6 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -20,8 +20,6 @@ #include #include -DECLARE_GLOBAL_DATA_PTR; - enum { PORT_S5P = 0, PORT_S5L @@ -220,8 +218,7 @@ static int s5p_serial_of_to_plat(struct udevice *dev) plat->reg = (struct s5p_uart *)addr; plat->reg_width = dev_read_u32_default(dev, "reg-io-width", 1); - plat->port_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), - "id", dev_seq(dev)); + plat->port_id = dev_read_u8_default(dev, "id", dev_seq(dev)); if (port_type == PORT_S5L) { plat->rx_fifo_count_shift = S5L_RX_FIFO_COUNT_SHIFT; From patchwork Tue Nov 7 19:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 741933 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1793623wrr; Tue, 7 Nov 2023 11:06:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGozqA1D0wdRay+KbbbtLa+qZVTLeWBswqvMxGsIA+Pe/qM95DkrV2TKWroOirBgyExE3Y4 X-Received: by 2002:a17:907:cb11:b0:9e2:b85e:59e2 with SMTP id um17-20020a170907cb1100b009e2b85e59e2mr1292965ejc.32.1699384000396; Tue, 07 Nov 2023 11:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699384000; cv=none; d=google.com; s=arc-20160816; b=qf4kyNF8DvA2hSPG23fjDbuhW98BF/g6xSriAK3fiV/Ql6Cv+1Y5XOS7GqGd5yLCx9 tp3drTol9oqzrgQ5yOItbrbhVn4ByGv96ZCW10Ub6f/5oTTBBSq75cdFmBRcfVm0y18o QWe6wKo0K8gbFFHJGYBvRMPN0QI2ds0buu5cDHZuj7nPwUpAi2hZGFpplVTB8QBv0lLM +40eT8F7cIgUFr6Hy/1aZ1GOhG4eCdjoF/mBa4u/7ujhyeI/Dz5SztLQxtflQJbxtLr7 3ZFpPE0o9LUU+Gz7PuTTbqf/rVHwb3SwOuT8LQYTgVgkniJ0WJz++m/OBZMnGZ8a1KHP XOcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vfF15bOqd2HKm14u2HtIQKTVmgnM4eGssEsIUHfHn1E=; fh=V8mDuKiLPNtyICTEK9bwK0gdoM7g2D1lZIysD2SFi7U=; b=ORfWnwWfmoCSE8FL6JcrkvTv04ZrYrQ05ZJMahZmP+eNfwdzfCuuggY4j85qGXwPl4 HeyjvEfp2cnjvoBR8Dh4YZaoLFzRQQnSSkdC3rqH1cMh0vFk8NTFOFxYFRYijOla5J9h GLxPIvNkik+8QtHhJZnz9r/EzRByPr9K24UsgKevdrstRhl42rxH6UaeghJzF/RZEBZ/ Y3OsGs0aH/yPTs+qfAAMuzQ3Wluo1oP5vxnK3nyPz7kMMeIFpAvoqbI2m9LZb0aD+4S4 HBx5fGaPL4bMNFz4kTtbs6GLub0KPlITHxnsr3kg9pb96KOAKdheRK2Fkvc/D+iD5XgR /HRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="H5AkzTs/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id h10-20020a056402280a00b0053e2b01bf0csi6194689ede.119.2023.11.07.11.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:40 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="H5AkzTs/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46636875E8; Tue, 7 Nov 2023 20:06:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="H5AkzTs/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D25DF875C6; Tue, 7 Nov 2023 20:06:11 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1E063870BC for ; Tue, 7 Nov 2023 20:06:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3b2e308a751so5470b6e.0 for ; Tue, 07 Nov 2023 11:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699383965; x=1699988765; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vfF15bOqd2HKm14u2HtIQKTVmgnM4eGssEsIUHfHn1E=; b=H5AkzTs/TRSHFvvNamac62IcRHn0+r+kdL3gwSDBABwqcE06xtm3V7Y4gDY4SemKci LQ1qz4abu4cj6h51Kwpaih/pl6yvFsPFxTEJas2i6ykSGhbPw66MoYt3tNznb8EzHnNC xftbO+DnId4OQ4cXwU/fdW85d6TVUF7RBqvoiLe5KTF6eWq/5a+Vqi14BOVVf9E8unH/ ECdmBfV+ft1SoeNv7uWBmNitRXVZQqvdnyl05tmDm/Hlh4a5Jxykz/89XT98dcw/X/Qz F4RP1vL/RMcBGWMDYLsayQl/AVgA0YQfHObZLErvJ7EFJluFaQMkrh4Iakf8LWqxZBgr 4Ekg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699383965; x=1699988765; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vfF15bOqd2HKm14u2HtIQKTVmgnM4eGssEsIUHfHn1E=; b=f9L/ySjlqaxUAboQlhtMhqunT+qsx1jYjXHYSHjj0HVvBd7SVuUCGWGc2GVE70ve3Y xzqpl8i4jEpE4ry5e3sKV6EK7A2yH6M0Wi+eYO/CQmSovwsoO8+tXVcs9cr9WStY5SgD R0T1nXstmpZE0TpSrrT25FSEZGKX7Raz6zJ+6xJIK9w5yRaph/XgldnwHOesoBElpRYt BaIGrJemwpNzjoHoGhUDh0D0RHxVpxRZjlwIKY4GCdKeC/yDn0ep/8GYjbSwBvmNzYGD abyNLPUBy9E8Mfo/8htqHC4YI+h83H02ShviTkOCT2p1WhgQ/bl/9SF6kX6MgPvMxfGv 2ZKw== X-Gm-Message-State: AOJu0Yx7gTl+NYOCESbVK2v6t1qD21jnYEEg6eeqX8aR7+PwfvceQTAt qi6Bs22o9T/UGN81WROg+jXQ0w== X-Received: by 2002:a05:6808:1492:b0:3b0:f8bd:9503 with SMTP id e18-20020a056808149200b003b0f8bd9503mr1847894oiw.10.1699383964749; Tue, 07 Nov 2023 11:06:04 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id c3-20020a056808138300b003b2e7231faasm1632778oiw.28.2023.11.07.11.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:04 -0800 (PST) From: Sam Protsenko To: Simon Glass , Tom Rini Cc: Mark Kettenis , u-boot@lists.denx.de Subject: [PATCH 3/4] serial: s5p: Use named constants for register values Date: Tue, 7 Nov 2023 13:06:00 -0600 Message-Id: <20231107190601.17151-4-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107190601.17151-1-semen.protsenko@linaro.org> References: <20231107190601.17151-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Get rid of magic numbers in s5p_serial_init() when writing to UART registers. While at it, use BIT() macro for existing constants when appropriate. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Simon Glass --- drivers/serial/serial_s5p.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index c57bdd059ea6..6d316ccaf31d 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -25,19 +25,28 @@ enum { PORT_S5L }; +#define UFCON_FIFO_EN BIT(0) +#define UFCON_RX_FIFO_RESET BIT(1) +#define UMCON_RESET_VAL 0x0 +#define ULCON_WORD_8_BIT 0x3 +#define UCON_RX_IRQ_OR_POLLING BIT(0) +#define UCON_TX_IRQ_OR_POLLING BIT(2) +#define UCON_RX_ERR_IRQ_EN BIT(6) +#define UCON_TX_IRQ_LEVEL BIT(9) + #define S5L_RX_FIFO_COUNT_SHIFT 0 #define S5L_RX_FIFO_COUNT_MASK (0xf << S5L_RX_FIFO_COUNT_SHIFT) -#define S5L_RX_FIFO_FULL (1 << 8) +#define S5L_RX_FIFO_FULL BIT(8) #define S5L_TX_FIFO_COUNT_SHIFT 4 #define S5L_TX_FIFO_COUNT_MASK (0xf << S5L_TX_FIFO_COUNT_SHIFT) -#define S5L_TX_FIFO_FULL (1 << 9) +#define S5L_TX_FIFO_FULL BIT(9) #define S5P_RX_FIFO_COUNT_SHIFT 0 #define S5P_RX_FIFO_COUNT_MASK (0xff << S5P_RX_FIFO_COUNT_SHIFT) -#define S5P_RX_FIFO_FULL (1 << 8) +#define S5P_RX_FIFO_FULL BIT(8) #define S5P_TX_FIFO_COUNT_SHIFT 16 #define S5P_TX_FIFO_COUNT_MASK (0xff << S5P_TX_FIFO_COUNT_SHIFT) -#define S5P_TX_FIFO_FULL (1 << 24) +#define S5P_TX_FIFO_FULL BIT(24) /* Information about a serial port */ struct s5p_serial_plat { @@ -80,13 +89,15 @@ static const int udivslot[] = { static void __maybe_unused s5p_serial_init(struct s5p_uart *uart) { - /* enable FIFOs, auto clear Rx FIFO */ - writel(0x3, &uart->ufcon); - writel(0, &uart->umcon); - /* 8N1 */ - writel(0x3, &uart->ulcon); + /* Enable FIFOs, auto clear Rx FIFO */ + writel(UFCON_FIFO_EN | UFCON_RX_FIFO_RESET, &uart->ufcon); + /* No auto flow control, disable nRTS signal */ + writel(UMCON_RESET_VAL, &uart->umcon); + /* 8N1, no parity bit */ + writel(ULCON_WORD_8_BIT, &uart->ulcon); /* No interrupts, no DMA, pure polling */ - writel(0x245, &uart->ucon); + writel(UCON_RX_IRQ_OR_POLLING | UCON_TX_IRQ_OR_POLLING | + UCON_RX_ERR_IRQ_EN | UCON_TX_IRQ_LEVEL, &uart->ucon); } static void __maybe_unused s5p_serial_baud(struct s5p_uart *uart, u8 reg_width, From patchwork Tue Nov 7 19:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 741934 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1793768wrr; Tue, 7 Nov 2023 11:06:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtlBdimYaywP2sXgwP9BfjVhdN0NNB7KS6CYTAqC6KTtibZriePtc5jHtp5Et9N5I+rupO X-Received: by 2002:a17:906:d14c:b0:9be:4bb0:64f with SMTP id br12-20020a170906d14c00b009be4bb0064fmr14087606ejb.54.1699384016670; Tue, 07 Nov 2023 11:06:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699384016; cv=none; d=google.com; s=arc-20160816; b=uVZBbvV1/0U/dKdI5IvOr098zEZMYt5271wOm0HSE5BGyw3nYI47DibVLu62RM28Q0 +6aTzjRr3k85kS7q+MJTrHMFpoBncu2+0CHtZRW+u3w/KfNwrBBIWnW8JezzYZOlA0nV VAsq7uGEfA2sRT2cLYboyR37U/kVUn/HeJMnwBjiYib3jY4JCJebU8cCZjlP5q8ixOLA 9WqXPZJcZfxml/FnHeQ82+hRmbqm2PQ0e1MdY1scHjscjWH09GGALDg6a94q1KpW0VnS 56Bkx+sPMvfxAHOzrEfIrc/VtPb2EPSHlzM6yqfsQ8I9ea+LRpMO2Gd20qfnX9z4/CS7 urkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M/pKtokJ16QvLgTtzXCD1ooraExBNQXaxs+a4bK0Yss=; fh=V8mDuKiLPNtyICTEK9bwK0gdoM7g2D1lZIysD2SFi7U=; b=X7W1E9nUQP0T8yT5Ht2OpPblsCn/lD1s7kVYrxwIYjYdhpdad7qtE0wE3UGQQSOh1C BD+IpA2Nu5W83uGXQ5fDwG6A0fumqjj4Zjr/98X41w1harDg6GUKmqgiSTS8CpDumqvY k5riAwcueDwmCwZqCewk82t5ek4sWxGB6YZGdJt7G+DgxJWwbsd3KPEWWUpF8WqHDDbP lAYY0y6DiWUZC7pvveYZWErMF1Q9O0NF8OhVuNJ+ALe5NYBPYC1FEQxl1Qpek8GZ7a3+ fh3SfYUCHTbCpuMZ/oBYsM3s9yrow5IcIA3Gm17Ntnw6C6A8eCKQuXICwTCFL451h+WG mNPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OPTHyffK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 29-20020a170906001d00b009e2c65a064bsi537370eja.443.2023.11.07.11.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:56 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OPTHyffK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB527875EF; Tue, 7 Nov 2023 20:06:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="OPTHyffK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1C612875C3; Tue, 7 Nov 2023 20:06:13 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 209C387584 for ; Tue, 7 Nov 2023 20:06:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6ce2c5b2154so3855254a34.3 for ; Tue, 07 Nov 2023 11:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699383966; x=1699988766; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M/pKtokJ16QvLgTtzXCD1ooraExBNQXaxs+a4bK0Yss=; b=OPTHyffKKwZwDPP+WzqNF9MAPhxNTN1bNvhzDeiv4J2gi/la/J2RpwPV+G5kYF40T8 k87pQV2hYYwuftIt2OvFGCwN/03s0mAwZwtWmyGnLcpxQC94EpowKwncm76NbjTTmnX6 WIRxPuCfcbS9doFvqU6zC4sn+oDTdiMK3XtasOLqLlSxD9A/XoCwPSfmIVfnH2SzhiWg EAMuGE4Lx+YkrOB0JplYsJ5/rKnk6vzqX+4Um4Fxm80pqOsXB4JZD7MpwzwBTpsoj4sS WmVTFTK/viVo1cHDU2qIwhOoiw8+3q3cD1+PDa+Wu04qZO2ntywcYUNnDsloOb7hmF0X 1nqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699383966; x=1699988766; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M/pKtokJ16QvLgTtzXCD1ooraExBNQXaxs+a4bK0Yss=; b=NYfRj/rxeRS/WZ/AcOYu4XzKdrCzcGLpsXrKgRuxOCkEO0m+imn3kKl4sNMznHHOG0 Pzv5sdPZmTKqw19kiyZ268JR8L5CqTx7Kmg+L+j8G6ulufHAd4usJ9/pFe2qOSIdPWf2 KQU+amVLY40LU71vvLOC/9VkSiwcepTMvkCIELsLNOJ/cOWU4X/5sjCUfqQcWJeov8YH dG+C9BZKAHr9W160Fv/KZu3wsh2q1XXpFjx5o8FKdQNN/owsizuLEAwhZGDQfMAAb+zD Ifj9WHDNLqv8Mmj8VUczptAP9QoszNE3dLVwj+OqeQhNVU5iHZ0QT8E/EnI+F65RgI/C gzQg== X-Gm-Message-State: AOJu0Yy4vc6yavhMfCqa7szze7WGlCAOlsTovtCaRkh33w88bdRlWSqP ZaE/E0OFas0vwau0MT44yh665g== X-Received: by 2002:a05:6830:7181:b0:6b9:a926:4a12 with SMTP id el1-20020a056830718100b006b9a9264a12mr42774453otb.28.1699383965659; Tue, 07 Nov 2023 11:06:05 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id bg19-20020a056830361300b006ce2ec1d000sm1665884otb.59.2023.11.07.11.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:05 -0800 (PST) From: Sam Protsenko To: Simon Glass , Tom Rini Cc: Mark Kettenis , u-boot@lists.denx.de Subject: [PATCH 4/4] serial: s5p: Improve coding style Date: Tue, 7 Nov 2023 13:06:01 -0600 Message-Id: <20231107190601.17151-5-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107190601.17151-1-semen.protsenko@linaro.org> References: <20231107190601.17151-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Just some minor style fixes. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Simon Glass --- drivers/serial/serial_s5p.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index 6d316ccaf31d..c24d9bca84c9 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -50,9 +50,9 @@ enum { /* Information about a serial port */ struct s5p_serial_plat { - struct s5p_uart *reg; /* address of registers in physical memory */ - u8 reg_width; /* register width */ - u8 port_id; /* uart port number */ + struct s5p_uart *reg; /* address of registers in physical memory */ + u8 reg_width; /* register width */ + u8 port_id; /* uart port number */ u8 rx_fifo_count_shift; u8 tx_fifo_count_shift; u32 rx_fifo_count_mask; @@ -65,7 +65,7 @@ struct s5p_serial_plat { * The coefficient, used to calculate the baudrate on S5P UARTs is * calculated as * C = UBRDIV * 16 + number_of_set_bits_in_UDIVSLOT - * however, section 31.6.11 of the datasheet doesn't recomment using 1 for 1, + * however, section 31.6.11 of the datasheet doesn't recommend using 1 for 1, * 3 for 2, ... (2^n - 1) for n, instead, they suggest using these constants: */ static const int udivslot[] = { @@ -251,10 +251,10 @@ static int s5p_serial_of_to_plat(struct udevice *dev) } static const struct dm_serial_ops s5p_serial_ops = { - .putc = s5p_serial_putc, - .pending = s5p_serial_pending, - .getc = s5p_serial_getc, - .setbrg = s5p_serial_setbrg, + .putc = s5p_serial_putc, + .pending = s5p_serial_pending, + .getc = s5p_serial_getc, + .setbrg = s5p_serial_setbrg, }; static const struct udevice_id s5p_serial_ids[] = { @@ -264,13 +264,13 @@ static const struct udevice_id s5p_serial_ids[] = { }; U_BOOT_DRIVER(serial_s5p) = { - .name = "serial_s5p", - .id = UCLASS_SERIAL, - .of_match = s5p_serial_ids, - .of_to_plat = s5p_serial_of_to_plat, + .name = "serial_s5p", + .id = UCLASS_SERIAL, + .of_match = s5p_serial_ids, + .of_to_plat = s5p_serial_of_to_plat, .plat_auto = sizeof(struct s5p_serial_plat), - .probe = s5p_serial_probe, - .ops = &s5p_serial_ops, + .probe = s5p_serial_probe, + .ops = &s5p_serial_ops, }; #endif @@ -298,10 +298,12 @@ static inline void _debug_uart_putc(int ch) struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE); #if IS_ENABLED(CONFIG_ARCH_APPLE) - while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL); + while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL) + ; writel(ch, &uart->utxh); #else - while (readl(&uart->ufstat) & S5P_TX_FIFO_FULL); + while (readl(&uart->ufstat) & S5P_TX_FIFO_FULL) + ; writeb(ch, &uart->utxh); #endif }