From patchwork Fri Apr 21 17:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675864 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp988952wrs; Fri, 21 Apr 2023 10:51:11 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFRHHWgmvuruukbek2voTCN7VYlfE+wMRe6QsmtKeDt3cT0h59uzQ2ifPCgY2LTIQF8zUj X-Received: by 2002:a05:6a20:8429:b0:ee:b3f4:4ddf with SMTP id c41-20020a056a20842900b000eeb3f44ddfmr7983909pzd.48.1682099471438; Fri, 21 Apr 2023 10:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099471; cv=none; d=google.com; s=arc-20160816; b=hF9hBVRTlbal88q+u0IoWxxV4P+uCZo/IxQ+lFlkPr9mebv1g5TIShE31bNGTXbTnw x1Mda3LsjXPXPX08IPLvowKsoLbCgnqq2Jya5M75ytHM7LGLcQUSBAL1LExcSI05cTz4 kjxObuuXf5EzAdElt5f5fhE1A4s5M85waUD1vVTOhr4N3XlHjshecQRQ+2Esbg8MdO1D uL6L2f6PBkCepmem+WQ/yEbr6U2ZFqdHFjKoULfQLLwEVEo8xVZvwC++St/IxOyEr4G2 FSNnd+A6KiKaVTVSvX2uLU8V7WNK6dpksc0Hj2PBni193ZR8u7BwdyHQ0F8oEjTfkYJj IBSQ== 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=9M4VklkPUP9LQAx7j6705xNhGlImo+VZpdlYtgzaSQU=; b=rdY9gyb4zQDskI/5l/c+oATbXbfe6uiR6M+DrFsJwQ+03HzxGeyRrAviscEE0JXpHb 4cDz448f0r0uodWOv0MR1H2oefSFe3V8w6TKY0eAmXxElzLNYvxiR2+E4mbRaFNwskp1 3GKeUQ93sLGMVkYkfF4GATm0PzzbWFPHQx7FT5REmzJXb2jKVNT2pNqT51tGyeuzusBI llHz5duKhZNQ52VpmXr0jMdyJiGtrdy8AQg98oZzZ5SwcbXbBI2igXGmjs+FMDAwZAmE KilspX08FSPE+7KiwEfHdzUVKXlV27js7rSLoOSYZg7lNY/QdXw/LdEwKMu7j6uEzNe0 x0Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uHf1pypr; 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 n3-20020a6543c3000000b005133f65dc69si4656938pgp.219.2023.04.21.10.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:51:11 -0700 (PDT) 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=uHf1pypr; 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 2A67A86371; Fri, 21 Apr 2023 19:50:53 +0200 (CEST) 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="uHf1pypr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EC83C86356; Fri, 21 Apr 2023 19:50:48 +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, 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-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (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 69BAB86359 for ; Fri, 21 Apr 2023 19:50:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2a7a74fa8e6so796621fa.1 for ; Fri, 21 Apr 2023 10:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099445; x=1684691445; 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=9M4VklkPUP9LQAx7j6705xNhGlImo+VZpdlYtgzaSQU=; b=uHf1pyprNluF5TCEI3urUOhwImpYREAcdW+aomyrfDBrOs+RDsg/58U0x9nFSwzv0W Rr1OHC+LQ41yipnZ9/8eOVf+Q2uHV7G6SPgpJbGIZ8QvSCHqjsmy09PWdI+7867bW08u svuApVRkqvcqRK8OrpXrQUMxDr41Ryl0m8q4DXHuQdXNw/wbvEwMEe13q34aqvkQAmEP aSGLsL1foqLPkyAkRge8QI2gewKRBKvJv82kTgucG+XWgjIgwuMIbZf9w8tOZ2Xj0qrB hHHA2qweybQZ4NLm0a1Y+AmMKiMW/GvqTu7Umx0pJVvDcz63ipuXlP0vsrM5/315YH6o Gibg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099445; x=1684691445; 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=9M4VklkPUP9LQAx7j6705xNhGlImo+VZpdlYtgzaSQU=; b=EpmfPN3np00QK7xWShTneF7JFrzrNq1WthNoieVkmGH8faAApottq70q2f/GVtSXGM Y/b7PH2oq+J+UphQaQ5ePsFQcNi312HtXGlIN6GgVxSPvQ//UUQu6IeS0UmP4ePvliiA og96Wb3acFLJfHgLBjwJQMGsV5rTQ+cc422NkXfBPbaiiA6yr/DGWEk5iSwR5QHMyOre 0jigeGpd2rVroScGDkZma8AYC1fzOfKKJiOkjjEFiWG0MfAuoopbC1DeqitQ9i5GoEdL eI855MZjzIHBdHVkjOtq0V6IIPZU1fQlUVjpgj3zZyKkKniofU+wUZP5n4O0VdqgcjO1 brEA== X-Gm-Message-State: AAQBX9di7e07DQ1mDnFsNZ4Zz7ekfxxuhndGvQHGKCryyQjuTiTyIJIU dJJGIouClPtG+7h03RMccsMzew== X-Received: by 2002:a2e:6d02:0:b0:2a7:970a:1c1b with SMTP id i2-20020a2e6d02000000b002a7970a1c1bmr1425766ljc.3.1682099445635; Fri, 21 Apr 2023 10:50:45 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:45 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 1/9] misc: add Qualcomm GENI SE QUP device driver Date: Fri, 21 Apr 2023 20:50:33 +0300 Message-Id: <20230421175041.275566-2-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 This change adds a Qualcomm GENI SE QUP device driver as a wrapper for actually enabled and used serial devices found on a board. At the moment the driver is pretty simple, its intention is to populate childred devices and provide I/O mem read interface to them as clients, this is needed for GENI UART driver to set up a proper clock divider and provide the actually asked baud rate. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio --- drivers/misc/Kconfig | 7 +++++++ drivers/misc/Makefile | 1 + drivers/misc/qcom-geni-se.c | 41 +++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 drivers/misc/qcom-geni-se.c diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index b5707a15c504..fc4c893334d3 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -511,6 +511,13 @@ config WINBOND_W83627 legacy UART or other devices in the Winbond Super IO chips on X86 platforms. +config QCOM_GENI_SE + bool "Qualcomm GENI Serial Engine Driver" + depends on ARCH_SNAPDRAGON + help + The driver manages Generic Interface (GENI) firmware based + Qualcomm Technologies, Inc. Universal Peripheral (QUP) Wrapper. + config QFW bool help diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 3b792f2a14ce..52aed096021f 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -60,6 +60,7 @@ obj-$(CONFIG_NUVOTON_NCT6102D) += nuvoton_nct6102d.o obj-$(CONFIG_P2SB) += p2sb-uclass.o obj-$(CONFIG_PCA9551_LED) += pca9551_led.o obj-$(CONFIG_$(SPL_)PWRSEQ) += pwrseq-uclass.o +obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o ifdef CONFIG_QFW obj-y += qfw.o obj-$(CONFIG_QFW_PIO) += qfw_pio.o diff --git a/drivers/misc/qcom-geni-se.c b/drivers/misc/qcom-geni-se.c new file mode 100644 index 000000000000..281a5ec819a9 --- /dev/null +++ b/drivers/misc/qcom-geni-se.c @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Qualcomm Generic Interface (GENI) Serial Engine (SE) Wrapper + * + * Copyright (C) 2023 Linaro Ltd. + */ + +#include +#include +#include +#include + +static int geni_se_qup_read(struct udevice *dev, int offset, + void *buf, int size) +{ + fdt_addr_t base = dev_read_addr(dev); + + if (size != sizeof(u32)) + return -EINVAL; + + *(u32 *)buf = readl(base + offset); + + return size; +} + +static struct misc_ops geni_se_qup_ops = { + .read = geni_se_qup_read, +}; + +static const struct udevice_id geni_se_qup_ids[] = { + { .compatible = "qcom,geni-se-qup" }, + {} +}; + +U_BOOT_DRIVER(geni_se_qup) = { + .name = "geni_se_qup", + .id = UCLASS_MISC, + .of_match = geni_se_qup_ids, + .ops = &geni_se_qup_ops, + .flags = DM_FLAG_PRE_RELOC, +}; From patchwork Fri Apr 21 17:50:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675865 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989037wrs; Fri, 21 Apr 2023 10:51:25 -0700 (PDT) X-Google-Smtp-Source: AKy350YsUWYMETE3B65XX4bNqNuttfb8d04LpaL8n82lKW98c6UDP1+vca7GAjZ8AFax/M0Oyquu X-Received: by 2002:a17:902:f541:b0:1a6:523c:8589 with SMTP id h1-20020a170902f54100b001a6523c8589mr7415378plf.5.1682099485312; Fri, 21 Apr 2023 10:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099485; cv=none; d=google.com; s=arc-20160816; b=FnXKvhi0zfWZpmfxQtRDKb3g2XuWiH9uBGa4H0fyllxOhV7FxvnJIys/RXuUXowemg 7V+MMaMlGpYJ3nu8hoYdAU5TEGD+dkriDdviG+R2xVFaQ3bT7Zmme6Dw4e5iBcWB9aAl mkX0j0lNCzCoYYalN6bEcbcX/5Fq7kuBi8UbRTBCKIVTAwaoLzqPhRfKeZgFro4DoPCm 2izpjrz6+7TVJp1gn4g07wGIX2GqhiQmBcbAOpALlU6arJQwQ8IfIdhEi//ID613Kh7F /d61SF6QcAzdmJdeQfR3BHzVbsns9c84PmlNYdRQwnhpfKmnhVHPlJpRRKUuopm8TPk9 Zv0A== 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=LlALwL79O6+cCuRN+rzhCrrYlDj8MP0mBmjzSXa2lhQ=; b=zmMKd487vLAHq7B2rUNqduC6iNdGpzInV9O/DKJSqeSvsFTbc5vmnlt0YdbDhDD4Go C77OKvUma291IHF7ME4+KWrGaHZGKNwRYPXOxXuDaERptByXIgERHSMs9TBhRQuQfKpW C4cZCSpfIDKTjepOt6bzboFrkIJ3HvBbi9BxQsTQFZBJFgWPyzlstZLZgrwkdkBqY62t DNitVhbzH66CAsfTOViydIor6gv2g5BCXmFK0CI+gESlsc0tLFsPHOfX7ZHO4gRaKdl9 8PAnIjS0VlvfYqGGUuj2GmA82BQf6qRvCeBno/Ja2QwWFzbLw4k5RyRnHC2bLuwVavmU hkjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LiQNk/z7"; 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 t5-20020a170902e84500b001a4f005d59dsi3964818plg.389.2023.04.21.10.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:51:25 -0700 (PDT) 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="LiQNk/z7"; 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 336CA863AD; Fri, 21 Apr 2023 19:50:56 +0200 (CEST) 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="LiQNk/z7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D24486390; Fri, 21 Apr 2023 19:50:50 +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, 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-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 84EAB8635F for ; Fri, 21 Apr 2023 19:50:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2a7ffe75ae4so2032081fa.0 for ; Fri, 21 Apr 2023 10:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099447; x=1684691447; 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=LlALwL79O6+cCuRN+rzhCrrYlDj8MP0mBmjzSXa2lhQ=; b=LiQNk/z7py2h6C0WJXUDkBan6+YwBm5GNZqz7kVzZVZbYQLc7vRXAsKVH3Rbi8M3pR j0JWSeaBo61gH9lhDZZb+eXvoRSskiyHpF3I5N2ffpb44XtIoOwp88g5COkbvYEh+6Q7 BwPHgID9jop7DOgaUcVCG0faXCW9u8MknbXxASMpfoQO54iKV5JmTMDxTazYnx/GAq6C c9A9VmvNZoYbNitmSPZXAn9sL2BjbLu8P9kSIOjfnKt6uG2GOK5zQqS6N31msVxz7yq/ RvJU0AcJavAafdquN3h63chPyw5St0lByg2dySPJXgeDrlpYKvSDqH1b1tB+XdfalowL j1+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099447; x=1684691447; 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=LlALwL79O6+cCuRN+rzhCrrYlDj8MP0mBmjzSXa2lhQ=; b=OdRmwIYCpMIinXhD2+LLmaHh01f1cUcnxkPqgbBlt60ZGDQ1DFEA2RWX8TTfSJjpBD VVtHi8n9W8D6pu6iuJSqAz1qlM17CH26VT07ElFNMeS5/Jyaw3+NcqQ3JNR7E2LWQmSE iqBgXg1cg51k40jdkLPswjlcklLAmzfZa+GbDDdHVD1TZ70COmT31q33eFxe6vhPa4jS FvChwl962uQqUH7j1hU0gVbfrnoR+lVM2xdU62cYvmTRm+ZaB5cFmYxrOWNoi0eOnDXP lUtZ7BreUzOj34iDLU36CAYl8MJoQxIl1eGphY0YIaoa8ZDIfo+s2AICk1XYDooDdV7q ewtw== X-Gm-Message-State: AAQBX9dsQqIUW1R+k7yALx1oFktwvYU2HICx1w8zrIhVuLcjg3PuG5Fm LYL20rPzLAkTpasSitRUtCfabA== X-Received: by 2002:a2e:1f09:0:b0:2a8:c274:b411 with SMTP id f9-20020a2e1f09000000b002a8c274b411mr1367089ljf.1.1682099446887; Fri, 21 Apr 2023 10:50:46 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:46 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 2/9] serial: msm-geni: remove redundant includes Date: Fri, 21 Apr 2023 20:50:34 +0300 Message-Id: <20230421175041.275566-3-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 For whatever reason, likely a driver stub was copied from another driver, the driver contains a bunch of unnecessary and confusing includes like watchdog.h etc., the change reduces the list. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio --- drivers/serial/serial_msm_geni.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 3943ca43e49e..df61ae04df0a 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -11,15 +11,9 @@ #include #include #include -#include #include -#include -#include #include -#include #include -#include -#include #define UART_OVERSAMPLING 32 #define STALE_TIMEOUT 160 From patchwork Fri Apr 21 17:50:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675866 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989113wrs; Fri, 21 Apr 2023 10:51:39 -0700 (PDT) X-Google-Smtp-Source: AKy350b/y6wDlLC80FV0A9nYpyjI2tDj2IOU++J4NIETpTFRcbIx8C57XaMQbXUhh+4ZMMeNTEOa X-Received: by 2002:a05:6a00:1749:b0:63b:64f7:45a0 with SMTP id j9-20020a056a00174900b0063b64f745a0mr7615900pfc.12.1682099498695; Fri, 21 Apr 2023 10:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099498; cv=none; d=google.com; s=arc-20160816; b=PwbH5tT0a8pa0cNYniC+glGIINjXsQ8KyO9s+EokFMmnuMiuomSQsoDZ2Y7XcrdqvK GBhgUgmCgCjIYYQAoLo4txVlB9xdBAIETXerfxhJSlEsXUtU9V1a+sBZPzFmzgcgV6MO m5ZH8fr1snGYkINrM7GtCEq7kNY6MF3KB8pM3naqFm7gpuKJBgIlWKl69WUKVo+PBYkL UxO6LiM/CLGyIiupjZw77gPjIqbiqESYpYobqrgVk0KTnGVetM3xPCLFFNA8oTh6Jw3M AYS2T16rlmqETp6IckMGBiERTB+GNPkq2IR22zifDe+FPJ72zMS1E/kKyVMn8Xr3/f6H Q+2Q== 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=oXYQyyuR7oVDY7D5Ghpn4whpNeQyOHW+4Hjesqp5URA=; b=Dr4e8yG1G53HrkkGqvX2Cmg6a1VvipfQC3TkXGmv1IUGqMrpu6sBRykTKoIdB/3NC4 sGR/UpEqPphY+QOgQiZocD0ahLKjdm1i3Z86kXMVcmukDcbHgXnn0FvoWzp+nDWqk9xk 3leGmVddH46h4lpTYo4WePPrNAcFO1zp8CXSrkvtxGt+5BU5OkoQU2EzchP2oQ1wWUqi drW3VQQdSQnF3Tq8/LQQIqiCVvKkQL5/3xz+rgsa6P3rwbicpDHVpHJ9uX8N/YfRAkwq wM49vgxWTmUsdSycmi5nLhC2BDhVrg0rakQKdMyuv70RNOJrwLPYoOsifFuJWgVjkn6q OqkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hStR93lg; 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 o26-20020a635d5a000000b0052023579876si4797350pgm.710.2023.04.21.10.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:51:38 -0700 (PDT) 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=hStR93lg; 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 06EE9863B6; Fri, 21 Apr 2023 19:50:58 +0200 (CEST) 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="hStR93lg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD33386397; Fri, 21 Apr 2023 19:50:51 +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, 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-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 E840586358 for ; Fri, 21 Apr 2023 19:50:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4edcc712d95so182421e87.1 for ; Fri, 21 Apr 2023 10:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099448; x=1684691448; 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=oXYQyyuR7oVDY7D5Ghpn4whpNeQyOHW+4Hjesqp5URA=; b=hStR93lgU0LJLcle4aGWbXo/L2M1c9WoosOfM/eAhOofxSQRNhj++9qmipWV4xjFHm dM1Fk21TVZJG5GnljC7NwVafwai8u9hl2EPQLa9o1xEvSxgZKZEA8IupYFoCNFNoYCTI NktpY4jAJ8h85yc6bbQYOAlSzNH5JlW5orAaG5Q6DHBXRAcj3h07nRRTj2LzZvZZl+Hm kjRKm4lAePIgXUFpVOHZjXq9ZM3X5chLMUjmm9kjNEsR6FaOYE+wZayisZ2xzc2crtDk RsTRNw/hZ5J+TmJyBDoUSvjfcCSMeRY1jG/L//V7WS6REcvFKI0W6VklptUrXMuRCK1T JfdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099448; x=1684691448; 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=oXYQyyuR7oVDY7D5Ghpn4whpNeQyOHW+4Hjesqp5URA=; b=YhsTPbk2DiloGsoP8wAO3ycwwT6CavdZWJrq9Oaif4gJyGyw4DzsJX1PNsY9xGpkxO 7bdHEzJbgiAIJGbhTaYJaSw6/X4xbVqQ5gkXWYhIteeD9+mloGnLb4DWvxQtR/N7ExK8 Qe8qzJjVT4uh+tD7oKgkPx6EONRYZMZKKnMU8zI/WNeVdlOl5VKyjwi93sADpdvBfUfj ogYCEVfrUhj9FdDZycKEulIjxm0r/ChH7Dginm+jbV6IbGmvfXIkiF9byqRtFCT30uSN HJj05qLX+l5JQTBMjH/RPT4JhLB7Vn/WdQuqam6Xw3Xwl5fix4YThe3wK795cEFIgZpF mi7Q== X-Gm-Message-State: AAQBX9dTLPQQ7Avsmyzbe1Fxv233AgyiR7SlOEi+Tf4HzT7vzW9lzrpj HnMzwMHsyFk7YtqlFzIm/Oqvpw== X-Received: by 2002:a19:f617:0:b0:4eb:2b54:5cb5 with SMTP id x23-20020a19f617000000b004eb2b545cb5mr1425586lfe.0.1682099448210; Fri, 21 Apr 2023 10:50:48 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:47 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 3/9] serial: msm-geni: Always bind before relocation Date: Fri, 21 Apr 2023 20:50:35 +0300 Message-Id: <20230421175041.275566-4-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 From: Konrad Dybcio In preparation for supporting upstream Linux device trees on Qualcomm platforms, make this the default behavior. [vzapolskiy: extracted the driver change from a combination with dts changes] Signed-off-by: Konrad Dybcio Signed-off-by: Vladimir Zapolskiy --- drivers/serial/serial_msm_geni.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index df61ae04df0a..146b05748459 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -558,6 +558,7 @@ U_BOOT_DRIVER(serial_msm_geni) = { .priv_auto = sizeof(struct msm_serial_data), .probe = msm_serial_probe, .ops = &msm_serial_ops, + .flags = DM_FLAG_PRE_RELOC, }; #ifdef CONFIG_DEBUG_UART_MSM_GENI From patchwork Fri Apr 21 17:50:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675867 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989235wrs; Fri, 21 Apr 2023 10:51:56 -0700 (PDT) X-Google-Smtp-Source: AKy350aUwEMIoWCoPjA7IKz1mgmojwFV+/vD3j61LesHLeeVv+jcNE8I98aMcLVfA40+8x/REufZ X-Received: by 2002:a05:6a20:2583:b0:f2:c2a3:3a1 with SMTP id k3-20020a056a20258300b000f2c2a303a1mr1720839pzd.43.1682099515735; Fri, 21 Apr 2023 10:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099515; cv=none; d=google.com; s=arc-20160816; b=qCVzSGGpPZ280rx8AUwwuXKDwwHbET5E1jpNNQiuh3N2HLkVz9TthGmvKEUzvsTQ5+ Wxgwk7fu/VPPYqt054sCHqV9bPscPKjcuPNMl9NcnIUapOu0rYFXiGobpfKm8ITFrChp DRx63IiwJzw+gICI34Lgf/YPJrBiflAB3sdq/S2jVMJIgBOcnvrv5qwvpq+dZinymqbM EX4iZLpDKM/gIs1CnlBwCM//rtcHz7+7eAVeXQuiKcnrstoPSEjtubQejb9sFlfgOUUB sQZszLlDvHQn+HR4uyzar2e28xOCWLzTcjWB/CJjSb2eZdFvsHNdumUZybwY0jswUYkn yS6g== 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=RnmrsCVlgjdwBRf3bAeInT0NkMn0qIZ47/eeLwNO+as=; b=mDfQ6nqZhR1qBt8Ps1gsHdZ7lGBM2wH1B+zwmohW0tg47fpEKa7CPQsQJzRhCWj1sP N/Rj7tsFmr7Db6Q1iSnEq/6VzHOqJ4IaAfVUqQ8+BxVE2TaWhMRcZqNrO2odfBSti00m I83RtEmHV6zFldkN8WUC7gmQhUSaFb4+tqs5iHK9aGeAuywjJI6EAolbA1Ca1JzRmBF7 0CfgsKxC8PZZuH1tTx+kI9FGJO2X4Mpm0tcUYNuZ+3JWfGVFV+f6yLdR0Cuo0ck0Dmoy n8x/ZH154THKYpHgpsoxlpfRmI8NFK6lqrXXEXZSyAjuctYy4SsoY7uBJmf0ehLl/+MJ dMAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v50+bU4S; 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 o35-20020a634e63000000b0052038e68f10si4895325pgl.496.2023.04.21.10.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:51:55 -0700 (PDT) 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=v50+bU4S; 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 1AD11863CF; Fri, 21 Apr 2023 19:51:00 +0200 (CEST) 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="v50+bU4S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6979C86397; Fri, 21 Apr 2023 19:50:52 +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, 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-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (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 0130B86371 for ; Fri, 21 Apr 2023 19:50:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4eca9c8dd57so296722e87.1 for ; Fri, 21 Apr 2023 10:50:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099449; x=1684691449; 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=RnmrsCVlgjdwBRf3bAeInT0NkMn0qIZ47/eeLwNO+as=; b=v50+bU4S2VkYMx4j/7noB65Z59soaVY4BgSGca3IJnIswltaRl8jLXJ8zAClHLAGHk 78pIRggXjG7o39SrqHKHMdmYNCWAJrfCPMDWECVooUe0Yt2yAKSyzGl3JFfxDN+P/xGU mv6VTyseVIqcYPIyTG9Ua9eq0p/GFWVVfMN2YiVk82/QT2w/afMW44GAdBWjowCqrS1J LW+W8nZi4Ef0ZZ19+vJlsanjoAvWqRbYMsYQGFAc8HhH4+RHIiul8uUSegMdV5BgmKTp 2BdMPQiA6OTDEQGPkox0qE1ON8xk2+6pZmor3z5cJ/gPMm7Myd6ANm34w5PhAZlHFnBt mlOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099449; x=1684691449; 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=RnmrsCVlgjdwBRf3bAeInT0NkMn0qIZ47/eeLwNO+as=; b=AKnozpEymlTdERd6VP65WLNd9tmHcA9ROcBfBewfDTRlVtPKgjbWOX6/nCkno13psX M1kSxIySY0+IItAQOqxltaWboBv/AaINjaED37YfZP/UfREKR0nTojKqbF5tpOFiOy7L JHPA3ob3c3EBuvyW1ZfPGSpcG0uWKhzx5hGincWOEpiMysgPeiZTyekEaRyutGQ/T/Cd nEdMyKYSCtdGJEYW/UJqRk6yAaZwP6wvi5KeklWH3k52U8LgxT/vEBG8zUaaak8w4bKG ZzJxcaPEP+fXoAhjX9gBqAEcIBnED57SsQ4NuBeRQzRh40sAy28413CoM+Pj8aClwVgY KRzg== X-Gm-Message-State: AAQBX9dK7fo1Add5oLMnCxsCeC3o9RvmRoDBIxQyDFBtQUwf00g9faMD ncXLZpLclvgWYiBC9yMaRgS03g== X-Received: by 2002:a05:651c:1306:b0:2a9:f93c:84cc with SMTP id u6-20020a05651c130600b002a9f93c84ccmr1149816lja.3.1682099449213; Fri, 21 Apr 2023 10:50:49 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:48 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 4/9] serial: msm-geni: remove invalid se-clk clock name Date: Fri, 21 Apr 2023 20:50:36 +0300 Message-Id: <20230421175041.275566-5-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 There is only one clock supplier to the serial IP, thus getting it by name is not needed, also note that "clock-names" property is not listed under doc/device-tree-bindings/serial/msm-geni-serial.txt, and finally "se-clk" clock name is invalid, if added, it shall get "se" value like it's already described in Linux device tree documentation. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio --- drivers/serial/serial_msm_geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 146b05748459..8fd769eb4d0d 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -183,7 +183,7 @@ static int geni_serial_set_clock_rate(struct udevice *dev, u64 rate) struct clk *clk; int ret; - clk = devm_clk_get(dev, "se-clk"); + clk = devm_clk_get(dev, NULL); if (!clk) return -EINVAL; From patchwork Fri Apr 21 17:50:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675868 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989353wrs; Fri, 21 Apr 2023 10:52:09 -0700 (PDT) X-Google-Smtp-Source: AKy350aXegnWZ8iR6hNbfG5MjP51dxrVufYYEJbLy+TGACwYJrYpeGE/K0hOUVisLtolwyzJB7E2 X-Received: by 2002:a17:90a:f318:b0:246:b8a5:b702 with SMTP id ca24-20020a17090af31800b00246b8a5b702mr5967921pjb.29.1682099528810; Fri, 21 Apr 2023 10:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099528; cv=none; d=google.com; s=arc-20160816; b=clevWIMH7DFbMmp9vKG1MCg91DptkB14AoZzpBY8mh5sl4Wn7a1x49NAVMwZA+3MD6 JfyXqJ6uh3gpvwmDuJfICGOZvj7A5zUQv0iL5rY6Oa6zbDBvNQVMKobay+ecmQyEoHs4 xxMs9zq8I1aEjVMVN5K/fsqU5rK2Tr4newiESET6rWvgK3Uuiqj2cZBF0JxcxzumE6ZU 14gwwp0e5/lPILavci3ym0lxtBl3U0pVU5zC0t7jXy72w88UhPrCiP7f04f9r68gO8V/ FCweQsCLcG+25S4MQBGMwxHOyZt7euj7CHs01cMKPLsNpWUhNcaIMu3Ic5NO3PHARrSV c3pA== 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=Pss8X7bgu3LOS8N22uSYRTMb3NQ6H4RT32F84vbK7nY=; b=FAIEw1Bgl4bUCHEY1bpnLNEOcmicZthuMhADlblsAB0+WBUgKkeGV8onVxUQjulL6P cWWcr0tW8fb63I0Nm8Xx0HYLYyFcFLcoTIPbJFryDLD5QmlGSuFxnc96g7bFx8408UJC eI/mwIcLuV2pfMQlYkLCE1i3zbigoyvJntB4YVC/H4FqtIF6huZszzqVEkmWW4YCCw1P dzRy7ReNpy5DOr2891kCmXjjpgmpLAKg6V6SdqR8bQchbpf8GXNqGLUTxIDgjyHbXPEa 1mB+hlTEg+tSNJpKqQdbq+JDV3lySKJ3x7r4aJ0McvoWODY/6x6qzHrKHjcd6hedGtaX CaRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VQ0aJuEz; 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 v6-20020a17090a6b0600b00246b845f3efsi7457958pjj.80.2023.04.21.10.52.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:52:08 -0700 (PDT) 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=VQ0aJuEz; 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 73188863A9; Fri, 21 Apr 2023 19:51:05 +0200 (CEST) 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="VQ0aJuEz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA3F486397; Fri, 21 Apr 2023 19:50:53 +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, 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-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (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 4487486390 for ; Fri, 21 Apr 2023 19:50:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2a8ac993884so3270521fa.0 for ; Fri, 21 Apr 2023 10:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099450; x=1684691450; 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=Pss8X7bgu3LOS8N22uSYRTMb3NQ6H4RT32F84vbK7nY=; b=VQ0aJuEz6HKfB17OcEZINMOb/1/IeT8PfuCDb9cXo5EjLVUf1WvKNLL36rJN6W+3CV AGffpSOysYn/fdstlh+tjrwfYp0fBFBORXWmRv7E0U5yAlAJMHbotrCnKRBPyyxYxrol tiCZkaPd6q4Xqx66Z2ZD63vY7fQ1uB69Pf+w1cthJaZW9tkaI/1IPrbq8v3KYZ84gqjN PHfBElbrL5qaJydLnlTAVR0bnPSR9Vp/qPwRMa6LPuSVotkczxWSd7FBkmqRRnwkIbWQ AwtAtIi/GaEg9PtXsNXq6hSDB6PRntVS1Q8tkSXPzgS5rq6aRtNs/EZu1LKol+N5c0k8 xY9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099450; x=1684691450; 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=Pss8X7bgu3LOS8N22uSYRTMb3NQ6H4RT32F84vbK7nY=; b=PDyvHUqUDpL2nWL9oa9ts6A3WOD0YSuyvLpCJZq7uS+Vk4V37Mgpsd/bDQIQxY7kCg UQeSz8x+jg4cBskUNJNJzI0dDMl1yScj8+4eQn69PiFg8rGj+DgjtI9QOK0ckFFt2EZa QZjanK04UQeKNbsbCgahjTMtdNrs71ydJ8a5KcQgnHL8gHO9ZreRjpQ6HdPVFS0vxtil to9q+GN4aBeU2X4l768xO2Xzkzg/Acli/TtqvIeUcptTMaGqepNJeeqg7RCEDSBrAjv8 5W5DRn3AeipmLh5mtpiHIMzKivJ3V4kWKEmSx+JgtNV+SF/c3P9BkwseC5O8xQ/ELq6U YXww== X-Gm-Message-State: AAQBX9cywKhQmMEDzLp56suq47VHGj79zy+z6sUp8S+G4KyjIALD2BEY VcRr3GhXlxCUkynpOOGhYPWbDg== X-Received: by 2002:a2e:1f02:0:b0:2a6:18f4:6c90 with SMTP id f2-20020a2e1f02000000b002a618f46c90mr1452940ljf.0.1682099450422; Fri, 21 Apr 2023 10:50:50 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:49 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 5/9] serial: msm-geni: fix code indentation Date: Fri, 21 Apr 2023 20:50:37 +0300 Message-Id: <20230421175041.275566-6-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 This a cosmetic change, which corrects code indentation in a few places. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio --- drivers/serial/serial_msm_geni.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 8fd769eb4d0d..55dd9188a56c 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -130,8 +130,8 @@ struct msm_serial_data { }; unsigned long root_freq[] = {7372800, 14745600, 19200000, 29491200, - 32000000, 48000000, 64000000, 80000000, - 96000000, 100000000}; + 32000000, 48000000, 64000000, 80000000, + 96000000, 100000000}; /** * get_clk_cfg() - Get clock rate to apply on clock supplier. @@ -160,8 +160,7 @@ static int get_clk_cfg(unsigned long clk_freq) * * Return: frequency, supported by clock supplier, multiple of clk_freq. */ -static int get_clk_div_rate(u32 baud, - u64 sampling_rate, u32 *clk_div) +static int get_clk_div_rate(u32 baud, u64 sampling_rate, u32 *clk_div) { unsigned long ser_clk; unsigned long desired_clk; @@ -228,7 +227,7 @@ static inline u32 geni_se_get_tx_fifo_width(long base) } static inline void geni_serial_baud(phys_addr_t base_address, u32 clk_div, - int baud) + int baud) { u32 s_clk_cfg = 0; @@ -268,7 +267,7 @@ int msm_serial_setbrg(struct udevice *dev, int baud) * reached. */ static bool qcom_geni_serial_poll_bit(const struct udevice *dev, int offset, - int field, bool set) + int field, bool set) { u32 reg; struct msm_serial_data *priv = dev_get_priv(dev); From patchwork Fri Apr 21 17:50:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675869 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989419wrs; Fri, 21 Apr 2023 10:52:20 -0700 (PDT) X-Google-Smtp-Source: AKy350Z2BjaZ0bCqpwhD6WkrafpxRBt7sxtQIYHsve2zuZf8miSavzBF6FEHAw1VessW6Xa8YZSV X-Received: by 2002:a17:902:ec8c:b0:1a6:9f9b:1327 with SMTP id x12-20020a170902ec8c00b001a69f9b1327mr7171990plg.45.1682099540050; Fri, 21 Apr 2023 10:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099540; cv=none; d=google.com; s=arc-20160816; b=o0KytIxe7yhwYbtTdR7ljIOYAJEVVBwfu2PfLuZZdUmP2PN8I5rCOAr3tvy+wBqABK YciJw/06nw92iMjS85NmBJRMSqoPrdSoLG2gSjPbX5AoxJZSZee+lX0S2e8US2Z/iK2q eRm55JMsfK5zKuImT77+o9xUsNb4KQoslXWG5RvSm1pntDaGd3uIO/ZQBvvaparvePt2 jbhyPzcN9ydw1ijk/DtAY/2khA13pgYLj75Mvk6v0mMNlsH+nItL910pPsKVtp6mrjjp e9HhMmxzHKp1SJNACVPZGQwC57e9EeitP192tJyflvPkXQogMkQmKIBPK0s+P7kniC7U 3eHg== 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=ic9B31eSPuTHLg5dKtybI1SMa/YD3tQdPCS7eX5J8pM=; b=xGPH4W9+pSsEphfPc98jHHRQ54X5VmAEDTRvMy8hXVSsaR058QHi56zClPnIuFUmBe mbWqsmzr7Vle26AWdYl+TXgonHvCZnupBTRcEUz3qO3SCb4EBuNmVrSVmYx258T8EYVK 9TRjM3ZY0rwKEGVqlbdPBHTa/7LwGs9RCufGz1znp8Hpog7p3pJCa8VyXwHlljg85ESu HtK8DobggseR0eawibtmQNNuRaRmxAZcTcU/Ay5GoiVxhwvQM6VPeREQ+zPs8wo6XgGm cJqdJiRLLTp7LaadZrob0L9ES3Xa6m+hkLnHEzZ41KdIge5IC9ApyegjUERHZ5GqLZP8 +u4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TON/uoB6"; 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 q8-20020a170902eb8800b001a6933b3a67si4751837plg.531.2023.04.21.10.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:52:20 -0700 (PDT) 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="TON/uoB6"; 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 6B34C863D8; Fri, 21 Apr 2023 19:51:07 +0200 (CEST) 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="TON/uoB6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9614486356; Fri, 21 Apr 2023 19:50:54 +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, 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-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) (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 0439186358 for ; Fri, 21 Apr 2023 19:50:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2a8a4cbe473so883381fa.1 for ; Fri, 21 Apr 2023 10:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099451; x=1684691451; 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=ic9B31eSPuTHLg5dKtybI1SMa/YD3tQdPCS7eX5J8pM=; b=TON/uoB6+6C9PzR9LlR8FlOWIDwRrYQGxqfn7C16ZGYIi8e/JQRZKUWo5t9YB8kz9r L7BhPNDyTw9CqElvYSiLrcY9aI9MbS5OUd9Q90qS+CkL0MIBBe8hp/vpECP8ODIXoar8 0lvyzQQLn1OWngmW2lYa6lb1+hvu0TSijN2cwm/+rs0G4w3ejwSh3B9N2FvJttzA/+hY wYr5aHJKu8DOXSsj4hNUWWOWnGHrNuJlNgZkaaksYiHeKJlPu9Qs2Kuyz/3VG5xrO6Ze gRrGv82uOhdkthgcG7aOXGHnmffP4kRyB0S+usnTZVLn6pAWV8fcbCXem3+gFuJqAJP/ RLFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099451; x=1684691451; 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=ic9B31eSPuTHLg5dKtybI1SMa/YD3tQdPCS7eX5J8pM=; b=RBESztbe1WRVG2kV9ppK3knnIJyOXVnaj3w1kSZbrKV4L0dNqbs46gC36Oz6/p+Syq 3tG+g9BeHdMUs/WaVrD5YfaVpOUXeUIJa67s09uU/8/MPMDWs1Rx5AuZWtRp0419vJan PBsRwhKVF5AG+nbdzHu2bdH0EVsNhg6wYvHv0TUjYkfKq/DsYbt78iqmlf4w49myRe+B z4avHECvxPwSDL1ENRos2ChytrQBdlHfJMO79qUxbuR55jE7aBd9hmRH/DY2ylspuHBT 5a89/DnI3BaXudMETZQkwxm1sFmJLTyTUQwlgswKs5EsTsisTVP/X0Uumw/I+FYc9gwL Mq8A== X-Gm-Message-State: AAQBX9esLFXtOiY5OC3kXV3St6zMJiQzvwc27D0J066eoEhdu4qe27FI /9UNGh869GzlOtRDcSscHVHROw== X-Received: by 2002:a2e:2a05:0:b0:2a9:efdb:4188 with SMTP id q5-20020a2e2a05000000b002a9efdb4188mr1331427ljq.3.1682099451698; Fri, 21 Apr 2023 10:50:51 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:51 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 6/9] serial: msm-geni: fix a compile time warning from msm_serial_setbrg() Date: Fri, 21 Apr 2023 20:50:38 +0300 Message-Id: <20230421175041.275566-7-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 A compiler warns about a missing function prototype, which is valid and fixed by converting the function into static one, also fix interleaved local variable declarations and assignments. Signed-off-by: Vladimir Zapolskiy Fixes: 324df15a292e ("serial: qcom: add support for GENI serial driver") Reviewed-by: Konrad Dybcio --- drivers/serial/serial_msm_geni.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 55dd9188a56c..3a200f45a6ce 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -238,13 +238,13 @@ static inline void geni_serial_baud(phys_addr_t base_address, u32 clk_div, writel(s_clk_cfg, base_address + GENI_SER_S_CLK_CFG); } -int msm_serial_setbrg(struct udevice *dev, int baud) +static int msm_serial_setbrg(struct udevice *dev, int baud) { struct msm_serial_data *priv = dev_get_priv(dev); + u64 clk_rate; + u32 clk_div; priv->baud = baud; - u32 clk_div; - u64 clk_rate; clk_rate = get_clk_div_rate(baud, UART_OVERSAMPLING, &clk_div); geni_serial_set_clock_rate(dev, clk_rate); From patchwork Fri Apr 21 17:50:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675870 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989480wrs; Fri, 21 Apr 2023 10:52:32 -0700 (PDT) X-Google-Smtp-Source: AKy350bglh+yLyhDrKZutZM8oouGbRyUpPZs4cU9LRLN08iQOPCc8wOd+TYWN/ZUR09EhN3Y/SlH X-Received: by 2002:a05:6a21:6d81:b0:ef:85a6:464d with SMTP id wl1-20020a056a216d8100b000ef85a6464dmr9028547pzb.13.1682099551739; Fri, 21 Apr 2023 10:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099551; cv=none; d=google.com; s=arc-20160816; b=RnziMM+PcS3oJufxvlCK9Cb6SBwYWMpNqwIcQXGn3Ngbl4+oxxBla+Ns1u5qArPVcm ssO0j7KKRVRSRXtegcoQ1UtcVM/dFc/Z7FRP0Gd+EmpK1GP3Y5/I+/EVWAiYNx0CjhMu oQFUMg/Ig2xjKJvZau2dSii3QC9KUx/gng38Gs0Q9ryv2r7shhdr/VsvPrxjBLCkgZ97 iQBaZHW+gKI/wbMeJHemr88BRaJnROq8hnIyH2qzHTf0XjwnOnDZ4LXVcD7gjAIcrAzE F11yY2eGub7jNp7zo7BjCoONklu/2SqG4v2VN6Zcph5IBfHC52nVMc985dgGKaUIbN5e FOsw== 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=clCMELQO5CTC9bl0ZZC/QKbDsRxs5YKUO3QyeP4FEyI=; b=LJnJ8b5vZZenHQiyb3AMeaSqTaxOl0UnRZrMm4ctkCN+pUmFBHtRmj7s9UX1ZCi2ER IRz8sYoyvPb3JWkHRePWb9HZoHIXc2HQLToOz5t7KwN0bBsOHecs5pPEfnDRbJ0OLSOG O07ZriOkhQtaPNcU7OlM4yn+FflZFNGtTkuAvw8d4/WmMAwuaSgU9UgVOdyKza+mI3mw zD4T8T2jgJixpCQxDTo1xFR/V2RplJhMg4jJYXQ56Msf8Mvf2zHIRvFyRf962GmX1Zmo FNpSiLxfca7Jct4vB9REj6oFOKbKQXWhhOKyFvdic5w8fj6y5tr5/1Rfg2iULW3LQd1c NaHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bNf1TSGu; 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 f16-20020a63f110000000b0051b1fe0b7besi4905201pgi.580.2023.04.21.10.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:52:31 -0700 (PDT) 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=bNf1TSGu; 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 DED1F863D2; Fri, 21 Apr 2023 19:51:10 +0200 (CEST) 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="bNf1TSGu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4BE1C863A6; Fri, 21 Apr 2023 19:50: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, 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-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (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 ABE198639D for ; Fri, 21 Apr 2023 19:50:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4eed7932605so184790e87.0 for ; Fri, 21 Apr 2023 10:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099453; x=1684691453; 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=clCMELQO5CTC9bl0ZZC/QKbDsRxs5YKUO3QyeP4FEyI=; b=bNf1TSGuMAHH9hb/ngr8FRWvwrdNNs0E8uVoaTYUYM5R/PVjpVpOpf7VdmVDp9D8oH BW5UFMIlbN+KZTdkAFRGaCew/R3ULIn5JshMhRAHx60DTnw/mbc89y7Tlg53QzwMbE6c EraPhrSs6S8iqeowDwQO3Wo33ec36gIODvzkicjbR0Ofn3aNzUjt2mOry37/2aAFHLzD jECw3840X051U8yrMPrHeqcjGx0R1x3fjOh1uvBTgR3oH4CH5+Rl4Lj7er3cP/U4Cwhm mSRrvwWAj/Cjb+ntVJx+Oe236Acc22m5XmNg+A7lSdOjmGun0Iw9uechPw7kCwj4Rt5G Kzvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099453; x=1684691453; 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=clCMELQO5CTC9bl0ZZC/QKbDsRxs5YKUO3QyeP4FEyI=; b=Gq9+FeJMKaLxF+PzQmPOOCU2Mxwe9rPFpv6FYXJTB1H8GbR8R7I4RHkQybUFHvxtfp ZidOMDm2O9K+U30t9cePQaNepysc9TUZ8FBt3ZgDqzOTaz1rx4ZDT8fsrFM454BOYjb3 pvwDfawxpFpRRkxf9JchjwdsyprJiPknrqUGBTMa92OTr/kM+wbR4+LXdeKOtAy1ekHm lQcsxgRB8048glNrnv7/hq3zrxyQnhRQ9djTnyY6vr4B5Kd2r898Pv/1OOAgeHPXXD5I x98iyZJXGH1OBUPWSP01MtccKHxOLtXnwRmhrSqwbLD6dPfik5Qg+PsMTocdbeaot6By +Ltg== X-Gm-Message-State: AAQBX9cnObEPm4ti5cjBUOx+MgAyhqIG9d9iCJ2PvVTnngzVVf+IowgE zTSwUiBRvgpC4nwLgolE+kYbTA== X-Received: by 2002:a2e:2205:0:b0:2a8:cfa9:a2b7 with SMTP id i5-20020a2e2205000000b002a8cfa9a2b7mr1363420lji.1.1682099452879; Fri, 21 Apr 2023 10:50:52 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:52 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 7/9] serial: msm-geni: Use upstream Linux bindings Date: Fri, 21 Apr 2023 20:50:39 +0300 Message-Id: <20230421175041.275566-8-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 From: Konrad Dybcio The name "se" is used in upstream Linux device trees and has been for ages, long before this U-Boot-ism was introduced. Same goes for the existing compatible. Get rid of that. [vzapolskiy: removed a ready change in the driver] Signed-off-by: Konrad Dybcio Signed-off-by: Vladimir Zapolskiy --- arch/arm/dts/sdm845.dtsi | 4 ++-- doc/device-tree-bindings/serial/msm-geni-serial.txt | 2 +- drivers/serial/serial_msm_geni.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/dts/sdm845.dtsi b/arch/arm/dts/sdm845.dtsi index 607af277f8be..92bdc82177d6 100644 --- a/arch/arm/dts/sdm845.dtsi +++ b/arch/arm/dts/sdm845.dtsi @@ -52,10 +52,10 @@ }; debug_uart: serial@a84000 { - compatible = "qcom,msm-geni-uart"; + compatible = "qcom,geni-debug-uart"; reg = <0xa84000 0x4000>; reg-names = "se_phys"; - clock-names = "se-clk"; + clock-names = "se"; clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; pinctrl-names = "default"; pinctrl-0 = <&qup_uart9>; diff --git a/doc/device-tree-bindings/serial/msm-geni-serial.txt b/doc/device-tree-bindings/serial/msm-geni-serial.txt index 9eadc2561b4b..eaa39c949b10 100644 --- a/doc/device-tree-bindings/serial/msm-geni-serial.txt +++ b/doc/device-tree-bindings/serial/msm-geni-serial.txt @@ -1,6 +1,6 @@ Qualcomm GENI UART Required properties: -- compatible: must be "qcom,msm-geni-uart" +- compatible: must be "qcom,geni-debug-uart" - reg: start address and size of the registers - clock: interface clock (must accept baudrate as a frequency) diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 3a200f45a6ce..29fae810d6fe 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -547,7 +547,9 @@ static int msm_serial_ofdata_to_platdata(struct udevice *dev) } static const struct udevice_id msm_serial_ids[] = { - {.compatible = "qcom,msm-geni-uart"}, {}}; + { .compatible = "qcom,geni-debug-uart" }, + { } +}; U_BOOT_DRIVER(serial_msm_geni) = { .name = "serial_msm_geni", From patchwork Fri Apr 21 17:50:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675871 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989543wrs; Fri, 21 Apr 2023 10:52:44 -0700 (PDT) X-Google-Smtp-Source: AKy350aCbuXsh+hC8mjXqwKljezyG7JdCulDe0v31pzojoI5HeXA9FPb2D6FIuow6V5XqPM2r4HP X-Received: by 2002:a05:6a00:182a:b0:63d:2648:f93e with SMTP id y42-20020a056a00182a00b0063d2648f93emr7664337pfa.20.1682099564391; Fri, 21 Apr 2023 10:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099564; cv=none; d=google.com; s=arc-20160816; b=EnBQL95h4zwkJdG3nTsSs9u/XRLVoXYYGK4J7PzNBs2FZeJeZ0jli0BECmY+wW+dwa EH4NvAmv7RFT6X2JGFaLx4QlREzl4y/k/fwN3APzYF4OPxrwZDtWFv9PmWzSWKiPt6NL JWKTgg86PBOliqEufZzJuVvfI5atIse+wdUueTx5x+WP9HLUfy0dGuSFpgGKH7PIslJE y6kXzjiwV0ptnehBgnoHsLmj5Vr6+vBo0+3g+P/cXj7XC919G7WhARY8rW6Qw//EsAGT +dXSSGQVfBbZKYV9QACvc+4X1vAoNKgb33dzjE1NYhPYzZxjCue+iS5yRz4ZK+o30KCe y46g== 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=c0OdR0wxOR1/QZ9nd1Yf9IBSGbGWHouODsr4StWTM8o=; b=j5AgEF2ETH8GNYbLOZoTIdGQQoIbt6boSIGt5RHkPgw2Wsm9EjeESEGQazELyGMVEx XbY3cjM2srQgsPXleKarkZpZO0VjsBgVy67cDkNdZT+XioM8vLFPVP/p0FtlNCPwg+3S L52+iydmMJKtTEOYgt8hNkLIdftphxWZamKgiCN0btsXX8MbwMJqSt/PZP6hwT0ddZwW lG7dgC02UWOkNpGzQHhXBu1yoPZB3l67TDFy0Yp8yFXiMHlGbAn9WJsQdHOFJE5HdvNI tcQXEdwMlXRLmK2pjE6olPBijPSm+0FPevXb2JA2T9PeVjVEqJIr1HB3Z6CGg5dRj0Et 9hqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p+uhXXen; 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 bk13-20020a056a02028d00b0051b54dccff6si4286648pgb.727.2023.04.21.10.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:52:44 -0700 (PDT) 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=p+uhXXen; 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 B734D863D7; Fri, 21 Apr 2023 19:51:12 +0200 (CEST) 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="p+uhXXen"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0DD87863B3; Fri, 21 Apr 2023 19:50:58 +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, 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-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 0800486358 for ; Fri, 21 Apr 2023 19:50:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2a8dc09e884so3255751fa.1 for ; Fri, 21 Apr 2023 10:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099454; x=1684691454; 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=c0OdR0wxOR1/QZ9nd1Yf9IBSGbGWHouODsr4StWTM8o=; b=p+uhXXen7c1fZhcYABpk/xtBZhoe9dd3b7T1ebnSnj/Znq1SCqTnpbnXe7OQmvsTxO 2mXGoZXWs4ZmkSNhtauKSzCyUx7o5gvMwwoBrodd8GaohdhXiDgcc5+fujGTChxOLBAL UCpl7P1W9o4gxQfI7w1L1/KvNS1PgMa+/ybUrv0Hea7qIQ90J62pQkHerJomIQzpuIoF IgKf4cdqcJwIQQob/UPt+pQbX32cmf3SHrol1fu0Pzc8TktiJc9KCjoB0D3hQ1NabhOb njRTcKlXR1KluVH+H9LQ5GwQoFIzd/Id528ee8G1SskK0U8nShz0bvrL6FQqoLCChdwu SkjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099454; x=1684691454; 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=c0OdR0wxOR1/QZ9nd1Yf9IBSGbGWHouODsr4StWTM8o=; b=F4SaXYzAcjitOrRQFrPfbcMas8sDpCKbXAtIKhb8XrFzJrvo7B1p0GH8hLClYpr7p8 XS8C6ny7ul1Fs8p8RQ30ZKj3TZ+an+rcDqhevPFcu/6pwKeWfX2RWCGhQ9pp2J5q/7ZK 53fv4GOKqj89nZ/XFhGdG/J+Rvnmw9MOrOu9vWd63QCHLYGmloAyraCB9XdLmuVqXw88 plat3RA0P1xjiBd73k6NNx7cv2/QWr51G2DSRyyssQBy3EU/GgLKUD/zRKQNmEc2eXAK Z4I6VuHtOKrHy+eRG+sSZKHxvJHdxG9SNFcvpjUw7mo7fLrjYGfZrHkVAtn8SYQeLSzN ZYWw== X-Gm-Message-State: AAQBX9e3iF0JtQaoxp4fckHeeQm1QdQzvpQ0uU+Zn6n3wkSNy8AhSHog ZDNb1dfbkFUnksaZlpslGgQHig== X-Received: by 2002:a2e:2a01:0:b0:2a9:f4e9:1a3d with SMTP id q1-20020a2e2a01000000b002a9f4e91a3dmr1466539ljq.2.1682099454058; Fri, 21 Apr 2023 10:50:54 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:53 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 8/9] serial: msm-geni: correct oversampling value based on QUP hardware revision Date: Fri, 21 Apr 2023 20:50:40 +0300 Message-Id: <20230421175041.275566-9-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 Starting from QUP v2.5 the value of oversampling is changed from 32 to 16, keeping the old value on newer platforms results on wrong set UART IP clock divider, thus the asked baudrate does not correspond to the actually set with all the consequencies for a user. The change links the driver to a new Qualcomm GENI SE QUP driver to get its hardware version and update the oversampling value. Deliberately the code under CONFIG_DEBUG_UART_MSM_GENI is not touched, since a wanted baudrate can be controlled by setting a modified CONFIG_DEBUG_UART_CLOCK build time variable. Signed-off-by: Vladimir Zapolskiy --- drivers/serial/Kconfig | 2 ++ drivers/serial/serial_msm_geni.c | 35 +++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index bb5083201b38..d50a1fd3f382 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -938,6 +938,8 @@ config MSM_SERIAL config MSM_GENI_SERIAL bool "Qualcomm on-chip GENI UART" + select MISC + imply QCOM_GENI_SE help Support UART based on Generic Interface (GENI) Serial Engine (SE), used on Qualcomm Snapdragon SoCs. Should support all qualcomm SOCs diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 29fae810d6fe..78fd9389c036 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #define UART_OVERSAMPLING 32 @@ -110,6 +111,10 @@ #define TX_FIFO_DEPTH_MSK (GENMASK(21, 16)) #define TX_FIFO_DEPTH_SHFT 16 +/* GENI SE QUP Registers */ +#define QUP_HW_VER_REG 0x4 +#define QUP_SE_VERSION_2_5 0x20050000 + /* * Predefined packing configuration of the serial engine (CFG0, CFG1 regs) * for uart mode. @@ -127,6 +132,7 @@ DECLARE_GLOBAL_DATA_PTR; struct msm_serial_data { phys_addr_t base; u32 baud; + u32 oversampling; }; unsigned long root_freq[] = {7372800, 14745600, 19200000, 29491200, @@ -246,7 +252,7 @@ static int msm_serial_setbrg(struct udevice *dev, int baud) priv->baud = baud; - clk_rate = get_clk_div_rate(baud, UART_OVERSAMPLING, &clk_div); + clk_rate = get_clk_div_rate(baud, priv->oversampling, &clk_div); geni_serial_set_clock_rate(dev, clk_rate); geni_serial_baud(priv->base, clk_div, baud); @@ -480,6 +486,31 @@ static const struct dm_serial_ops msm_serial_ops = { .setbrg = msm_serial_setbrg, }; +static void geni_set_oversampling(struct udevice *dev) +{ + struct msm_serial_data *priv = dev_get_priv(dev); + struct udevice *parent_dev = dev_get_parent(dev); + u32 geni_se_version; + int ret; + + priv->oversampling = UART_OVERSAMPLING; + + /* + * It could happen that GENI SE IP is missing in the board's device + * tree or GENI UART node is a direct child of SoC device tree node. + */ + if (device_get_uclass_id(parent_dev) != UCLASS_MISC) + return; + + ret = misc_read(parent_dev, QUP_HW_VER_REG, + &geni_se_version, sizeof(geni_se_version)); + if (ret != sizeof(geni_se_version)) + return; + + if (geni_se_version >= QUP_SE_VERSION_2_5) + priv->oversampling /= 2; +} + static inline void geni_serial_init(struct udevice *dev) { struct msm_serial_data *priv = dev_get_priv(dev); @@ -523,6 +554,8 @@ static int msm_serial_probe(struct udevice *dev) { struct msm_serial_data *priv = dev_get_priv(dev); + geni_set_oversampling(dev); + /* No need to reinitialize the UART after relocation */ if (gd->flags & GD_FLG_RELOC) return 0; From patchwork Fri Apr 21 17:50:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 675872 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp989636wrs; Fri, 21 Apr 2023 10:52:58 -0700 (PDT) X-Google-Smtp-Source: AKy350aglDMvPkH1O8MNQ+lk8U17RBXFQUP23LScNe1a2F18eu7prieDJgG5IuXdQLl5wVqZ/AUu X-Received: by 2002:a17:903:487:b0:1a6:3630:16e1 with SMTP id jj7-20020a170903048700b001a6363016e1mr9318104plb.13.1682099577830; Fri, 21 Apr 2023 10:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682099577; cv=none; d=google.com; s=arc-20160816; b=J82cVNn5HWe7y53TXJo6++LlE2dI3uLsVqAEaFjBk7MgYUFPJ1G2R71Id9XAFm9VZ2 aZKlkWB+KTQLxalK7Pa0TKKSwGg8XJN956ESbVdvWeD4YnyBpBy1yI3JHMlBclP/9uWk V5HPxxdqcBwhTLKYEt0J5jTTrEWkmC7TXKcQJX3V0uPZQLvFnbJ+5l4KA7pwVngaV8hr 7Dz2Aqvym/jOGLR0WS7ibnJkTemvikQLmth1J7c/Z83jhvtPgKjNZZRsK7aUwboGuh3z lFESY98FASiAPv1qP5kgrDv/cTD+uHVHAGqQhGLNPYI1CFdEybnIvERxA5k3RbsyeRBV YCpw== 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=wup+CBY6u7TSY4TeWQWa9so56VwP6kLw4QvYwq6be98=; b=xsEPIU/3wNIq/xJuO8O5AFjusNCs+FnzvzbAZYBgHYdbr1gVVjOgV+peCQwKnFxBOM EBK+ZfvifveunmF/bxMhtrdzIXyAiFFUNO0Z9Ykb0qlNL5PDXCBL/Lko/HY1ynA5veRX UiGmkxpFS2pSkQ5KrJs2UCzYaeAdYd8D05IYy0Ek2yedqx1xvcW3uJGjPtAW7k0m/ggU S/PW62LiK6SHT+odIfBkQBv5NCACY8XuaAuAtoc/hKScRQqincBoegvJNrYv+iSaeWvL zqG2oNuBNHEIKSqTs0XFcWzGyGvlhMXq0aeX5nN0nb8aC2e28EhfTcvcmrXuCYVDF+Se EB4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LNrUAln/"; 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 b8-20020a17090a12c800b0023e066d4e2dsi4730531pjg.184.2023.04.21.10.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:52:57 -0700 (PDT) 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="LNrUAln/"; 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 B34D6863DF; Fri, 21 Apr 2023 19:51:14 +0200 (CEST) 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="LNrUAln/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5994186358; Fri, 21 Apr 2023 19:50:58 +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, 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-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 B1A4A863A4 for ; Fri, 21 Apr 2023 19:50:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vladimir.zapolskiy@linaro.org Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2a7ffe75ae4so2032271fa.0 for ; Fri, 21 Apr 2023 10:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682099455; x=1684691455; 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=wup+CBY6u7TSY4TeWQWa9so56VwP6kLw4QvYwq6be98=; b=LNrUAln/iv2eiq4SjgLry4+EgTGHJwW1lrkyD+Df9O0Rkik7BuIhQWtnmvoMfv7QzU SgwPTgVADrrEB8lvJonAKXV6Xo8H5fGfaomwjWy9SFa/bSprotYTvPf1TTdOfOuSU5jA bMB37I5/0zisxPIwvDK40KrVJK8fHu7rDqHTWR6WpynfAsjovvVkAOnTP7FVDs4Xbv5H RISo2dDEcSC5r79l+9SFwWolGOAiQOimOaphjYjnUFX/wQ+bcumvQkSUElr8DHMH1mph Rf5NVinHe3I1l+CHoveXmfIQiTbMnx59dDN7g8D4dyfuoY3hTONV2poXzvAfEJupYBG2 OyBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099455; x=1684691455; 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=wup+CBY6u7TSY4TeWQWa9so56VwP6kLw4QvYwq6be98=; b=OLiUeLKGgnHBfsI/jRLsLFA+5bfsWW4JwLM86pd74BZeurGAuuUBbImOCvSOeFACGb Vc/gcCpMDiquNO0jbgGApn1GD146/QCipItbdESNoti0w4D23YYgIs2sq0Pxeqag8jfx Ott+W29s7DDl2mF5eygI15owVBsxKCacr/C1YeVxJ1GdFUmoWPVQrrNH/oNkWvd6yNr6 Dp+y5E9NCqt/llgbNudhz1+9dHEiDRZ6H+HpBAv6uFgtctJbsJY57CscZwaxpZBVaVcl vLJPZkT4sxD7pb7AhYNiauojU+dNcKnKHJeXki+KZJZaAszYc4Nq/D77prgC6WLFTZzW JTWw== X-Gm-Message-State: AAQBX9eDnegef8F+cOF4Sd3fFEVdu7KRpEr04iwXRpS77Vy4F4W/XCTh 476xMXuONizlI6sts96W4dJaRg== X-Received: by 2002:a2e:6d12:0:b0:2a6:142e:ee70 with SMTP id i18-20020a2e6d12000000b002a6142eee70mr1436173ljc.4.1682099455419; Fri, 21 Apr 2023 10:50:55 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id u24-20020a2e8558000000b002a7aa25c3b6sm674256ljj.88.2023.04.21.10.50.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 10:50:54 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass , Ramon Fried , Dzmitry Sankouski Cc: Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v3 9/9] arm: dts: msm: add GENI SE QUP device tree node Date: Fri, 21 Apr 2023 20:50:41 +0300 Message-Id: <20230421175041.275566-10-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230421175041.275566-1-vladimir.zapolskiy@linaro.org> References: <20230421175041.275566-1-vladimir.zapolskiy@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 On modern Qualcomm platforms including SDM845 a GENI SE QUP IP description is supposed to be found in board device tree nodes, the version of the IP is used by the GENI UART driver to properly set an oversampling divider value, which impacts UART baudrate. The change touches dragonboard845c and starqltechn board device tree source files, a device tree node label to "debug" UART is renamed to 'uart9' according to the naming found in Linux. Signed-off-by: Vladimir Zapolskiy --- arch/arm/dts/dragonboard845c.dts | 2 +- arch/arm/dts/sdm845.dtsi | 25 +++++++++++++++---------- arch/arm/dts/starqltechn.dts | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/arch/arm/dts/dragonboard845c.dts b/arch/arm/dts/dragonboard845c.dts index 1722dce33ff2..b4f057ac6537 100644 --- a/arch/arm/dts/dragonboard845c.dts +++ b/arch/arm/dts/dragonboard845c.dts @@ -21,7 +21,7 @@ }; aliases { - serial0 = &debug_uart; + serial0 = &uart9; }; memory { diff --git a/arch/arm/dts/sdm845.dtsi b/arch/arm/dts/sdm845.dtsi index 92bdc82177d6..3b86b9328fc6 100644 --- a/arch/arm/dts/sdm845.dtsi +++ b/arch/arm/dts/sdm845.dtsi @@ -51,16 +51,21 @@ }; }; - debug_uart: serial@a84000 { - compatible = "qcom,geni-debug-uart"; - reg = <0xa84000 0x4000>; - reg-names = "se_phys"; - clock-names = "se"; - clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; - pinctrl-names = "default"; - pinctrl-0 = <&qup_uart9>; - qcom,wrapper-core = <0x8a>; - status = "disabled"; + qupv3_id_1: geniqup@ac0000 { + compatible = "qcom,geni-se-qup"; + reg = <0x00ac0000 0x6000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + uart9: serial@a84000 { + compatible = "qcom,geni-debug-uart"; + reg = <0xa84000 0x4000>; + clock-names = "se"; + clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; + pinctrl-names = "default"; + pinctrl-0 = <&qup_uart9>; + }; }; spmi@c440000 { diff --git a/arch/arm/dts/starqltechn.dts b/arch/arm/dts/starqltechn.dts index 34a4f59cbd17..dcbc3b6d4966 100644 --- a/arch/arm/dts/starqltechn.dts +++ b/arch/arm/dts/starqltechn.dts @@ -21,7 +21,7 @@ }; aliases { - serial0 = &debug_uart; + serial0 = &uart9; }; memory {