From patchwork Wed Apr 12 14:29:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672636 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp369641wrx; Wed, 12 Apr 2023 07:30:34 -0700 (PDT) X-Google-Smtp-Source: AKy350Yp70FCacWiVlPc2DeL0Qxu+LI8yppA/hfSFedthLigHAiho4HrITElbm1K6wXtE1fxlagR X-Received: by 2002:ac8:5782:0:b0:3e4:e035:b5ae with SMTP id v2-20020ac85782000000b003e4e035b5aemr3492244qta.25.1681309834086; Wed, 12 Apr 2023 07:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309834; cv=none; d=google.com; s=arc-20160816; b=yzWLrb2Nikdp/wKO5I3He92xojBIFv++keUnWSk37bJSSh2RDb1/z0mwR2ljdc9SvD OaANzCarSYu/vYmzWwwfJxCCA3csVE8W9RPi6mO8vtd2zBVsEFpOGH7VPB/6UmGgVP8P ii1fTVOZCSI5yBaB9h9IBVyzCIM4hi/YzRPKkPQYA/OWwBUXNHwekI/e9mEluWgwuR8u CCLO9qK74dVdWHH6hFRX1th9y8jfRHwYgnq7tYOGmOYz6x0obU4Avt9GTHW33MmQSLyy poKnhqaJITV62hJUt96A4fA/auslGsqxaTArcRsSVidJl851DJ8+7eapiUO+k2gpnsWk fW4A== 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=f5albaxkC9QwjUU9wkRAz8fu89F0BGgw9MKtk/ySzXY=; b=SeeTWGfTiLCE9iYaWyprf9FQQMJ95YFxErK1fgEcs4gHPKYkn00B6whMNERakngRF+ 0a+Ww0VjmLAXyaG64STiKV69faI/myV9/DN+j+sIkp5gmlxf3kuRADleAG4i5W07EshE pAI/z9KmfY9k+ckZYY/hR0VaxIHln3zJUQD2rztNofgVA46sdJV2IC5CgE8btHd/eKpL prQb6IcCdlDU4uIMC2mQU3Iw+gv4A3p8+UBiMkGkZEn8QxOwPE7GyZG1LzYZEXqKFLmT c3/HaUa1KmyoSkRewYAdu74l9opJmLgRy5xelRfaZvUDRBSOxjaJ5rj2mHPK9lth52Gd JrHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vp12xO64; 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 bk28-20020a05620a1a1c00b0074586e65b0esi10860515qkb.491.2023.04.12.07.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:34 -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=vp12xO64; 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 694F885F94; Wed, 12 Apr 2023 16:30:22 +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="vp12xO64"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C4DCD85F85; Wed, 12 Apr 2023 16:30:14 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 CD18285F70 for ; Wed, 12 Apr 2023 16:30:11 +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-x133.google.com with SMTP id 2adb3069b0e04-4ec81439f04so197544e87.0 for ; Wed, 12 Apr 2023 07:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309811; x=1683901811; 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=f5albaxkC9QwjUU9wkRAz8fu89F0BGgw9MKtk/ySzXY=; b=vp12xO64fQswKMuEZIucTNbKlQgkvzPAOI+m8fO2dSKH8/t+SWqTgyqDnZVlo2dfOO dsiOxVHNMFj1eKOvsnDLDXwgzd1PrfcTAkXpi2S8GcU9OEvJwSmLJPASkdi0ZSBJGXgB JLvdYdEdgk+OuthLvPwq2ZOap1TfdzYZLaYwQjRQI6S5b97AhAIguvi6Bwq6vs32dUMS l+RjLkK3WkbndgKht+x0W7dSV0IRB6dzbumBTGl6gaq3K+JWJCvTLFUcKfuzQ9nFQSUQ CacNMyvpiR11woigMHmMzwqhxdze8WOi2WHqW4IBkZc6rsXQS94HSZKhKn39vcq9yxWl dWMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681309811; x=1683901811; 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=f5albaxkC9QwjUU9wkRAz8fu89F0BGgw9MKtk/ySzXY=; b=KrCd+Bjk6WdJ4DvqvuyRzI9IUxQ82hw6JZRsZy0P6A9zfjytcj1z3IQrSgXTCo8tck XwSpIupTilFHgt9x5uMFhCAwhfE4Aep697NtrUyfj4iuMDc0EqT1JjYy9Y3XtPuN/0l/ H2DOheb0h6iHk5/qjzJzT60l+u+JrgYjijxD+gRXW5NQOadzzVHh1edfK3H9u4yWlFEm vZDpvrEGnPYn3qZstTkGyJ4cAw+Q/bwBJGTAq/5b5n4JSHkMlW4GeKK3d5kAxjK1ukyZ FzSPa/WkCvti7mt73x1qCfiLKJX8yS2Lhs9XaTPxwzoalkfrcZ1NZSqkZlGRrGQruRaR TnfQ== X-Gm-Message-State: AAQBX9dRyIEX9qruPQwSM9cQzVfnG7YXdZ631kpmLxIA6URfDe6fG+/4 NNZrBNuJwBPg0u2WyYA8lC/B/w== X-Received: by 2002:a2e:a815:0:b0:2a7:9987:571d with SMTP id l21-20020a2ea815000000b002a79987571dmr710762ljq.0.1681309811212; Wed, 12 Apr 2023 07:30:11 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:10 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 1/9] misc: add Qualcomm GENI SE QUP device driver Date: Wed, 12 Apr 2023 17:29:58 +0300 Message-Id: <20230412143006.80946-2-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 4e1ae03e9fd4..04460f1acb25 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..b1443ad66d26 --- /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 0; +} + +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 Wed Apr 12 14:29:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672638 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp369895wrx; Wed, 12 Apr 2023 07:30:57 -0700 (PDT) X-Google-Smtp-Source: AKy350bjBOsnDOv1yhELo1AxiUrJ1TfJqQs0wOlD4q/7sabIlu9TWc2+ojRynXWiNPMh+6kU4Q1y X-Received: by 2002:ad4:5dc7:0:b0:5ef:27df:8938 with SMTP id m7-20020ad45dc7000000b005ef27df8938mr5914065qvh.33.1681309857388; Wed, 12 Apr 2023 07:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309857; cv=none; d=google.com; s=arc-20160816; b=vUeWRPZ3zwuGtBusTe296NfV0/syZp4KpM1L9uNQphqrR6nPJ6vbFSdOHIbJWdHo0v k4AFvn61G/23WNi5umbB7uWpKDjp04LnBVrohaKL+Jl4OZf7ZLB6pGR+sC09+tLG6hgD QAJWcoG5zHS/O4MLXUk4L4hv+G5P/Lezqyi5jgL6lrIJpihpWYkC/u+UcL52EzClErsA ZHqUqN8mHxkig3r1/JT2hI9uhZqvf1n+KF9yg6b4z1eg3wGMcTvthNVgP2ddk6dXFE/x PSOpjTHF9+fk2O3Qu3pcFcN+6PAfwLTztr5W4HUzSixS4SbE+5aoZxINgKbiLK2q3u28 RE7w== 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=Ws9eiMCwXQLrmfz6W/9eLeqoDTqZr9UdkAmRFQFC5MNpUrMTg5YHfyAI94rnQWNi8D BU1hsPGce696NetxZQ/Mdp/xM9IaWLx1Wq4zJ1U4+eF1mBoe2cJccS4HxoKVyucZ7eVj GB0vcZ8erfj6fHpFSYGvjlvx3f2KfIqbaXrXBublf/6RGlMd8MeJFK+PfZKUNAW3ucbb o+nC/EDOsypvZg5V32Q+PrE2mG0H+IVlVGPjFngzmwr0yfsxIAvgSslwpk3jjQ632tWt Rjl5i7mclOaO7yNy0m6plPwuvcqhFRdPOMpODXRJWEjgFPej5BMWs5T7Z1hMs4DWvZkL dCBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vs5k3KhP; 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 i16-20020ac85c10000000b003e685a9a30bsi10431968qti.264.2023.04.12.07.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:57 -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=vs5k3KhP; 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 8E1D885FC2; Wed, 12 Apr 2023 16:30:30 +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="vs5k3KhP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F2D5285F88; Wed, 12 Apr 2023 16:30:16 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 5BD3285F77 for ; Wed, 12 Apr 2023 16:30:13 +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-x130.google.com with SMTP id 2adb3069b0e04-4ec83ae6138so166642e87.0 for ; Wed, 12 Apr 2023 07:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309812; x=1683901812; 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=vs5k3KhPbRn/YQA30dUAJYVfOufyeZ5IlmwmYwjMEjKXNR1knlEtrpj9oy21AaQ3Qa bvL0IIcSbCBvflpuKaagNJKw3YOrBqmC0SehvOhZ6R8s8yBhsN+e6X/kspOZis3oCfQR zoTkic+zy8wVL5RvWHQXHLv7oMBilRYXsH6zXQxGxN+hrd9v3Bvn5cnxzHuyuMw1xX1+ J0T789P2gCOd6+Nuc3bHTySkQWvRDMX+M+BndN5BMFcZOnl6J6F9aZYn+ds7ewFgLc+U L0UKyjRY2V3s3E8r5n9+jxrteUyAgurSAnZ1BheqgxiWyXbPrOPRECe3sjkLIJriGps9 I4EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681309812; x=1683901812; 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=JXSKODNyyCa671Lh8cB6US7X9XdbDn9z0BBKqdRCj3hSH+vS/uVgx7OulWsQnvB0oR crGcjoZQZeM+DhOmHGfDQkS7EY3WhN93dh15kA0KxA+jtXWOwobwTQQZ70WaAmLrZmNL cfeDbuBJpoAy2ul9PdLq1esCzEI01liYGLQZ65WPsCvctTiZ7Kitgela6zxvcH91fbOR 2B8EiyFbp5bRI6QJsFbFdWz8lxHmsxrC06wOcwep+I3p+73vY0iLiHq+UExBvP9p9pLh JGN0tt0nZ1SbFWJN+YG+8emusAuW461nZwzwZUurfca/flaBf5RGSEzF6MGVWPx/M0Qi gRiQ== X-Gm-Message-State: AAQBX9dd0aXtevqt2VZTpS13wUDVbqhyKj0k7g151BTOyitNHnZ8T034 p7FTN0bwgTEgjBa3BNNZYwbA176nffTWDLpLQjWDTA== X-Received: by 2002:a05:651c:514:b0:295:a08c:12a1 with SMTP id o20-20020a05651c051400b00295a08c12a1mr773687ljp.0.1681309812640; Wed, 12 Apr 2023 07:30:12 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:11 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 2/9] serial: msm-geni: remove redundant includes Date: Wed, 12 Apr 2023 17:29:59 +0300 Message-Id: <20230412143006.80946-3-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 Wed Apr 12 14:30:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672637 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp369780wrx; Wed, 12 Apr 2023 07:30:45 -0700 (PDT) X-Google-Smtp-Source: AKy350YaQQB0YNv6MoNcdKjdIKsTXujyOoKaZmMe4SLVsrJRZYk+F+zQPe/4RgqQ8AprjSuu2rBl X-Received: by 2002:a05:6214:b67:b0:5ef:4254:d6f0 with SMTP id ey7-20020a0562140b6700b005ef4254d6f0mr3827638qvb.36.1681309845496; Wed, 12 Apr 2023 07:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309845; cv=none; d=google.com; s=arc-20160816; b=DizEAue3z/7d5Cx9QuJhzyiaDF8J2BZbx/F2oRV/pF2GRjiJ0lDyUmVIVHhDE4ppYL 4PzCxA93YRBq2vDNMhcbi9sBgPy7liXfdL9UN8+vdL63fo3wHLzxnIN7TzliWaG+B1ga 6A4XUjYXmvxuN67tWZBeQ2CNa/+KCqtL/FhNGHhqtPBK0TWESGqzDs79CtcGJgDeVpsY JDCcH0jgyH/N8DBFrE56LetirRg4XijPKlhqY9e425KJ1DVxAUc64KCClNHhRpL1MMu5 GpIDiA5dxDHoFgt9wM0wYTvsk4kVfSU0JAfM0ePSBKKEjMNxOZvRPR1TP6HF0CZUiQI2 dBmg== 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=LLjk8y4cbZ3obK7/IgWRgOai60WpfPwl8prmm63sdQgDiypBv5gxGJoI7nAICFBsIj AhnUVPTQQa52OP/MWy9kHeO0s5+ulX+InUqn2/S9hzYWoDq/JJHWDXHJ01u6qDtCxBWX KYGNtci4a7Lh+16bR0nNrQ+o+pAWjW2UyjQ0AsMVTkbEPrGJQJlq0g+hgyQtkQr0Yolv 8OMN4wzivbT9oIxGY6Pl5gyq/qJejK31/oncHRBtLPWZTRDbWCjx3YGFfeKSrI/ZXkUu Pc6uIehRM+81nIR4b+1Lxfgt+ESmelxo2zmVP84kBr/oo4Nkd64DKPUfRnmbCLc0Pmrf hMIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NyuoNZ6i; 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 a8-20020a056214062800b005a3500833b3si10547754qvx.270.2023.04.12.07.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:45 -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=NyuoNZ6i; 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 CC97C85F7A; Wed, 12 Apr 2023 16:30:27 +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="NyuoNZ6i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4A1085F92; Wed, 12 Apr 2023 16:30:17 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 0328885F46 for ; Wed, 12 Apr 2023 16:30: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=vladimir.zapolskiy@linaro.org Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4ec81439f04so197546e87.0 for ; Wed, 12 Apr 2023 07:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309813; x=1683901813; 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=NyuoNZ6i2wUZnHHXbclUR8nND9iX8RIk8yv+v93DuZZq1YBAItxIliuIm+8iNB6v7Q zTKNBBzTLXXz9fkkaCQShGjLUZluAK5n64xMPS8ZmYUz0zBOv1Bb6KfdsK0c1umX7Unv 528k4B2KzrEFSTvu6RkIGL6P86gK/rHEV2ClMqDTeciGNJ+D2XNqu1G50VkyqoD2rIim ZFTm6/rvFFJY6AzLp+zDCuwWnpqUJTJEHSKAB/chD+SQz7lHd7/FAB6Y/TZzQn4NVU2c 1/uIddP1KPitsTg9OAAnrgn52JxPzVW8p6FOWbB+OvnhevHgBPMMxRJJhVMCSAj0awLS P8Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681309813; x=1683901813; 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=6PD7NI8NRxgpvgdC9vP4RvZtbeETUtj4jt7g/y6+74GvKdxhjFUzXIph5+zac+J56j k2I9nlfRLayrZhyPy1KeWgvFGHtKcWA2VXNuKPV8ynwzgnOTbF2/TzEbUmGqqWzaj5u4 owE2vm9JzQEdwYcLCDvpWjpz0RpScxukY+pyO8GHFk7O9lPTMznLCtemOiS+YBkM9Nm8 9utG1odTfBKDh9kxw4Xz7XFBKtrKUL7wsHkgtRPUFZJ5LsgXqTjkvV2YJQaZpYYwa9tG qD0cUKsol5ofqacLlsTQQ/lXMgfwNSRt9rnVESeeHMv02T4HsVRhm8X+E7Mxtro3SD8z 1qrw== X-Gm-Message-State: AAQBX9cp/A++YaZzNnI1agnHFvsTAiBI7A49REPA4JX5sBQR8sfLyQJ2 YV18cQkNMjtsi/kdwWfz4fSXEwrnLohjjdBgFLSpqw== X-Received: by 2002:a2e:b890:0:b0:2a6:1681:d82f with SMTP id r16-20020a2eb890000000b002a61681d82fmr863544ljp.1.1681309813765; Wed, 12 Apr 2023 07:30:13 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:13 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 3/9] serial: msm-geni: Always bind before relocation Date: Wed, 12 Apr 2023 17:30:00 +0300 Message-Id: <20230412143006.80946-4-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 Wed Apr 12 14:30:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672639 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp370019wrx; Wed, 12 Apr 2023 07:31:09 -0700 (PDT) X-Google-Smtp-Source: AKy350a/dr9qk1ypFNFiWxtqHl2HLBvND9OEcurTqk1QEIw/WTkr6rw4K+rBzEgEJ0MvR8naGyeh X-Received: by 2002:a05:622a:205:b0:3e9:1b80:6c21 with SMTP id b5-20020a05622a020500b003e91b806c21mr1035674qtx.57.1681309868937; Wed, 12 Apr 2023 07:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309868; cv=none; d=google.com; s=arc-20160816; b=ZKRlZ2xit6NYUHFTCgh1rFoYgoDXk2bkkSsOMIBBtS19YLuWHgJNlrgQvEoGFSkKFm D0ld5tP8Tvcj4fA5fQY0Dx/83jWnHsNqt0NdjvZhTbm0tOMAxm6YdfDX0AyhP783RZmo FXaAHCTJwzMRMbRrzVcDIarP/b3XIkxeitmw569YWpiugms1pGAQEoMfIRvAOHq+fYf1 sQOafZN1mt05Ofez28q9ZWPXlAlhhKvx4K6az3nA30QUSEtRH21QXb+6N3zSI5eFFHCa R7IsWE9sODTFSrvI0GfZaXWpOrEV5I/G6G3VMY4pPyIhdA0T6pYrfyTgYqQXVW37zMth x0Sg== 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=cy7fsP9//HWctLzrEf7geJbeNrnjPsbnQMQuq/dNlCHYfBsDwxCbE0bki6nLhRERJf dQNr4vHW37MowVk6g0tpP11Nv4kJyh+BiMEcMXYDZ6dibARJsu5U4ZowMasy5mdYfcK7 uh7HdLWeLK0kqk+fbMJNdK/Xitp61j6TGCPZ+ltpp8LzXQoFWLvp4bQRyySi7Tdwq+a3 RY7dr/sprLhODoSaBkmvGypQsmZRsO6OTK6u1Xj8XJN1ovq9HwfoqngnTyNNCKx+4U5d 7j5v4L23qGIBlXKQ7ZohcfXPA4e4CdyaAetjXb4Bf4l/OvazljjOMAY81o/A4VO0V5v6 l7zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I9vVRxxM; 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 i189-20020a37b8c6000000b0072fd5e31f18si10300447qkf.390.2023.04.12.07.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:31:08 -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=I9vVRxxM; 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 4587785F77; Wed, 12 Apr 2023 16:30:33 +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="I9vVRxxM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 75EE885F46; Wed, 12 Apr 2023 16:30:18 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 C34C185F70 for ; Wed, 12 Apr 2023 16:30:15 +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-x12b.google.com with SMTP id 2adb3069b0e04-4eb36162b32so279454e87.1 for ; Wed, 12 Apr 2023 07:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309815; x=1683901815; 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=I9vVRxxMnW8U+gM2TTogYkJXrCzvLqucACKNiaNdb8efUbjRcLnZfHm2u0FFyE+znQ VVtpEXrYkjafT2ZrUEzOxJxzxiIVPGiuWsRIABa+r7e79DmY8KFWrMEnq05jWtX4kucV bSIUbWLQ98N1mQfizIpQZoSoXxFY1kS/EMTGMtWg8SUlJ1PWlZ/8HKORMhxaSOUNqcDd +79z1i9PcsjGkxMsaT0u2fdCbcJ5jwWxadZ0K1oexjXJF//rJOyb3gjrLV5RP4+RruSm eTdlJeQwnQsgevZ747HjMBSru/yMY21+E36CmQpzjSDvIejdvMKwB9DjkxgPiKfpRizs oFPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681309815; x=1683901815; 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=M4wYbYPZCTqmduDsitnr7VEd2AACBP83B7rCxmSMLsMCO2C1BNwogvWkWkxouBgFML sC782m7mxDT8j1gB37oZjyzEi0UZELlXtFsTmz66vkLjzpvX7ybWc6iDdXjlxg27Kb7l wIaAx35Xz9MGObvNydYFDd9LIgT093V8wBv6be6gkkLucxmOp2d2GOgr05uhggOxvRMW BiWYAfu+QVzTewoNhwL8Bg8IK5hBuDI1/W8OHE5fKbfjqoh3fT0/tZwJqD8d9oJ7Gshh aPBnoEkPYZ5ZVY6/ry3qfB3OKHh7xAiznxPZthTlyuN+W1KsTNN4yGcYb9/RkuMsm47X gCBA== X-Gm-Message-State: AAQBX9cHl5GrqV8n2uOGNiajDVkof45L3ZDpNnAGeK4pf+UnbLDGdCip wo8d/cHvnrLBlMxmWqNuLxadew== X-Received: by 2002:a05:651c:542:b0:2a7:63d2:976 with SMTP id q2-20020a05651c054200b002a763d20976mr774609ljp.4.1681309815155; Wed, 12 Apr 2023 07:30:15 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:14 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 4/9] serial: msm-geni: remove invalid se-clk clock name Date: Wed, 12 Apr 2023 17:30:01 +0300 Message-Id: <20230412143006.80946-5-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 Wed Apr 12 14:30:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672640 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp370119wrx; Wed, 12 Apr 2023 07:31:20 -0700 (PDT) X-Google-Smtp-Source: AKy350bP5UnNct03w5WwPMjT2oLOTYISK79llzWBHOUKcQmnjQUIysGIfSy6GjA4B8xiwZqsGb5Y X-Received: by 2002:ad4:5de6:0:b0:56e:9986:4fa9 with SMTP id jn6-20020ad45de6000000b0056e99864fa9mr21984830qvb.7.1681309880004; Wed, 12 Apr 2023 07:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309879; cv=none; d=google.com; s=arc-20160816; b=DMggzNM1L7yMgJ8jq/S0RfMJ1GWzIqmjb2nFxIBWSnvTxEmKNghnEsWW6Gh4v7sWL/ y9BcUMSOaktrnWdhqgVMrNipXDzvuXEk9sUpoY+Xr/Av0jVt1UO7uuffzoLkKKgTY1js N7af6wK4FRirznlV1QWVzl3hPMHD7L9aGshg1H1c1vqKc1U7GO9nT6Zer7qZqs47eP3T dTiOPEwxzUwezc6EH8JFN7b9TNwRKgD0VsxjDbO3Xmc1+EUDRBYUvkkqcbrt1y0X6n0e h3a1Vih1oFs++Dz3+Q8wy6MWrhKc0PAhP+r3aiDh6aA76cxo8nmlUxCrvKcwGK3Gk9WN w97w== 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=xZCuJJfSaKffVu47Cv7KiugTeQ0wBxMLPbIYe2hTkL3HGSS/+ZxmZfzxReqWJPmys7 BLVVaXQgL+VcC+fIPngT3IwHItp+xyzImvGauXrNtmwENyxHPFOcLkFvA7RVPE5ZldGC KaYCuyxPoYbZvCu9ir7pncUhf1ozCTXe6I67E6+3/sA9Rf3TEDZPRytlmCTi55JLaKLI dd7BM129RoALFVoaxBcOl6smjEU2fqYaMxjXya33kKuF0gSG2CqHeUrXk5b9b2VGjghn ypya4wo+mOnnZ94C2/rFnsOYA4oMBkgUFCM9o97eh36jQTT+mcMDBmlinRIQM6p9VkQ8 APMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B8TJJX21; 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 2-20020a05621420a200b005a43f5dbec5si10607939qvd.356.2023.04.12.07.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:31:19 -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=B8TJJX21; 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 8564D85F9F; Wed, 12 Apr 2023 16:30:36 +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="B8TJJX21"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2D27485F95; Wed, 12 Apr 2023 16:30:20 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 82AF885F7A for ; Wed, 12 Apr 2023 16:30:16 +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-x12b.google.com with SMTP id 2adb3069b0e04-4eb36162b32so279456e87.1 for ; Wed, 12 Apr 2023 07:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309816; x=1683901816; 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=B8TJJX211mbvfHkfUvErgBcBsIzIV1ITt1KtOiIPfhSB+GJluwS5eM1IxQsSHfOf14 dAJtRMj7+Rxr6lr6nG3k5lqvVduJtSr+r4ayFS1RBkKddCobP9lMiKcrsCFMHZEIzStD HEvAwQqlXqtBpJRpgtHONwx0qN9R0w1d9Ya6inNbYuMCDV4DuaGsWjiQRO0amOJgEE/J 2om4vDHX/A+uMpQDOjb3cyAgrPhURGooS5R7K/NKSNp1QMdl6CwrmenH+UXxmUvXmSvq sliFgWriyyfFssLZrsPF3SMwK/+1JDYfxB1uc33C/ghlSRy8CufdeI4QynywOXid7FfD +3eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681309816; x=1683901816; 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=uqiB/HWE2dFbtxkR8y6u9aqisQZNvolS7iBPhplMDEP7M2+RIcFfIB6HH42zo78dcf dLxTMJQNWKWBhL3dWvmurC8YLtdCWfFhcs1wFDkdWjF216k1T5HIezZR4XCAlkj0j7QH Ul46ed8VcanMysAZ22up/hnnHKrpiAldOta6f8tPG6S3TOxKCM23nV3XosfY7hOllDy/ YtcbDNTfYlfpdKgixGwzA1S/ELk/+Vwwow9y6JEiAk3YMy0BcTTMQW/VIborPT/i+lnB skROwfJiEvZyv6DnHlGRAhHS39OOlxzlR4ow2zGsVwu3LDmcTaSqcO5hOdLD52kKlgij tVZQ== X-Gm-Message-State: AAQBX9eQFIDOW+XekIhV+u5hjtYoCoHXiwdA5wL/OJWb/VPWEICIMuMP 3atOlrMhPKY3qqZ7BLfO6tQprA== X-Received: by 2002:a2e:b890:0:b0:295:9c3f:e30c with SMTP id r16-20020a2eb890000000b002959c3fe30cmr751512ljp.1.1681309816152; Wed, 12 Apr 2023 07:30:16 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:15 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 5/9] serial: msm-geni: fix code indentation Date: Wed, 12 Apr 2023 17:30:02 +0300 Message-Id: <20230412143006.80946-6-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 Wed Apr 12 14:30:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672641 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp370227wrx; Wed, 12 Apr 2023 07:31:31 -0700 (PDT) X-Google-Smtp-Source: AKy350a2ZLwm1VyXC/E3m5WSdjO9pW6ZMk9izqbZ9nh6Mnra6tVPMvVGO/+05EBf7XMeyWxoLBPR X-Received: by 2002:a05:622a:1452:b0:3e6:9879:afeb with SMTP id v18-20020a05622a145200b003e69879afebmr22705906qtx.48.1681309891419; Wed, 12 Apr 2023 07:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309891; cv=none; d=google.com; s=arc-20160816; b=hsU9/5Ozmi2DPECnUFubUxNKwbQVggIY1aaQ5DtEUHrLW3br+1vDrpSrJQTG3C48j/ pqXjPgfpsEfTaQFZhDIOsNMFdLQs48h1EvmYB6qkPTQ/9MCyiUN8cdxHyK6ldDG5PAGQ X02TbJehKAFxAO3vTskGDRBIZ6uANHUXMyVkH9BKFanDVTG+ulULkt0xYfy0zVHLb+1D BYH9XEVIKI3NzTxQAPbdDwJn5WdzzopTpQg2TH3kIcdFgTsr49eElhEBkYMgQADp8OfQ QlHnsxHfigJIp9oLaNDAI/hEGCAxj/dd117umw3RguVQe4Sr+0oiCQF7ardlDGz26+Bq r2nA== 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=eEPdym7V/XaxCx2kzufBOXYmPHIyNg2uCsWW0tOU9Gq0RXJn23zKrDfKFBONP05VPC MXj2UkGnAIOzplnZ1hMo0nMpCA7AVfi0dJ3NgCv+HveabkVCa7PjhpEsh98ES1FcBIWm DbYosKPmE4ctMpkQ+mMyBRFUOjk9niafpseWRJSa8I4dZT9XKSBE1WBkQ8V0Nux8cqxL dT5VXZ6JcRJRgUlhab6aVCCt1LjR58w4/F6v52ofzJe1TXo6UUBYaFZBquR/QKZjFfdx wMGc6ShjfmKiHBWYCvSzNFboaTO1jUefNu0M0+yw6GOWv8Xr+TCwjrGL6KaoLeuaT2Ox nWEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M8keWTBb; 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 v4-20020a05622a188400b003a97c56d020si10571421qtc.364.2023.04.12.07.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:31: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=M8keWTBb; 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 7751585FFE; Wed, 12 Apr 2023 16:30:45 +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="M8keWTBb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A7DFB85F95; Wed, 12 Apr 2023 16:30:21 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 78F1885F89 for ; Wed, 12 Apr 2023 16:30:17 +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-x133.google.com with SMTP id 2adb3069b0e04-4ec81439f04so197551e87.0 for ; Wed, 12 Apr 2023 07:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309817; x=1683901817; 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=M8keWTBb0cO1cckeAOZBGmRc/X96Ot1hpwpQytv9pALwa6mrwx/4hmaFJC/bBdjxVE QsTcj81m9YXFz95iffVgsKE95N7xlBjHn8GyJwe2zYGiWB14IjsrYNj1Pn1hq8wQUqGc GN/oEhLmYetXst1c1oPakQ8PIxeUczWN3Ec3T04k++128Imh6oLtuEPtIgrpLbfoORp4 e0faP9mWfLN0KpXH6M7zbqrARUJYzXNhefKoonToYR5Efr+PsD/2Glsu+j+E/fY5Tih/ yQjQ7cELQF2iPy+gnnzVscrYaV+dK8c0XwkLSEjwNGNMCpJD3E0TJodrMgdiytzcLUfr iKgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681309817; x=1683901817; 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=IL5jJMQ/TC5hefFy2sB3E8pNHj69pT0z2NTuL7U3B76Jn7ju3di08opVQrOvywTTn3 G+icqIYTR/0WrBZw+9fw9Gf50L5Lo9MxbrGsVsKVjABEI67MYz73y2kmx+4pIt6dq8Xt EzG/ZWH6eilVlRVXO9K+UxiDU3YiOWCsgRpEkfn3YFgS71LJaXo13MoLFo9Xqj/FTczC H+Bz80hr/Dx0snw7RCOuGwrzDuPG/TxIYdwbwxeM+c6Xvfiu+X9V3QIezwob/9ItbCSM H33HoSDXhm3cXtg3hwLz7QRlEnCyz3PaTEw7S+KfwTbOBTbsXXs98Sd2f+xhw7pb9ns7 xEuw== X-Gm-Message-State: AAQBX9fj5Lyt2zrfxYbOovq/RW7SBfR91Qtv5iRpPNvOcqe+zmZTITej dlMPy8MvVhFaMSUAMVT1reZ6mw== X-Received: by 2002:a2e:a815:0:b0:2a7:9987:571d with SMTP id l21-20020a2ea815000000b002a79987571dmr710902ljq.0.1681309817199; Wed, 12 Apr 2023 07:30:17 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:16 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 6/9] serial: msm-geni: fix a compile time warning from msm_serial_setbrg() Date: Wed, 12 Apr 2023 17:30:03 +0300 Message-Id: <20230412143006.80946-7-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 Wed Apr 12 14:30:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672643 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp370452wrx; Wed, 12 Apr 2023 07:31:55 -0700 (PDT) X-Google-Smtp-Source: AKy350Z0a6jQ2IE9U3CfxAD05XtK5TgRGLnjiakBfB6df+cRQzgua4YKxf6I53H2FFk69BuK92oI X-Received: by 2002:a05:6214:2623:b0:5ef:467a:5969 with SMTP id gv3-20020a056214262300b005ef467a5969mr1947924qvb.12.1681309915171; Wed, 12 Apr 2023 07:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309915; cv=none; d=google.com; s=arc-20160816; b=q4so+ZiPjcSd0Bj9vjyTGeHsAmp9I8pD3NzpYI1CTYkEzb4VZZDxBaw81OdT3yVxvm wzo+bVTn9xfkTOz+HKKRsOqpWyKJQfb0IfI974UFZ8XtJgrYgYRLLrM0ecF0jG9Lezxh qDkNpnHBjn+vcXalQ700PoGm7Mv+OcQJkeVhSk8HoVaBeujXtPUmipImWoXtrueFRvqL 98We4o+8UZO68w2i3n8DbOp6G+UHiXSsNb6SUCQgf13bKr+8kz7bfdcrUDKmdTVvzJHi D/FDKENYYqIM2vZoxSCqAFeVUUYhYNPlOPnRI0RPezNf9OmyPRb8J0VlBMZCVz5lNpqO KQCw== 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=qXmdswsVkdwr7w+awo4GSmlm9eMr/9hapWBAi2owSG+ONeTmMQCm2HwdIW5PidQLwi epxLWTTRTse1C/bgdt+E8l0fBRH9byEK/RpI9Xi8UyTdf/Mm8GjpyHj9ujh/Mjgz2nYX r06NkiQrec9DmKptCIho4wLFiz8YDhB8gd1OV7zmAUPb2vAOuvLS2zkR30lvn8pQYAvr DCieyN1Yt0/+rimIcxgtR7sB0tLGL00ihmxkFt2NULNxLqHoERU9D2Pi+Ti/QpgRmiC6 ZsowkFq+CVq57gPRYqlsPmGvZGfQyE0rZQx8jv2HyvgEDwn1CRKkWpjVkhIqW26Jqixr zN8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jFRGIFG2; 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 ay41-20020a05620a17a900b0074a892eebbasi8460969qkb.548.2023.04.12.07.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:31: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=jFRGIFG2; 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 6305986018; Wed, 12 Apr 2023 16:30: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=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="jFRGIFG2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1ED0C85F7A; Wed, 12 Apr 2023 16:30:23 +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 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 16BA885F72 for ; Wed, 12 Apr 2023 16:30:19 +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-4ec816ccb80so196441e87.1 for ; Wed, 12 Apr 2023 07:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309818; x=1683901818; 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=jFRGIFG2PLJ+XpvJXOSkDSW3gmZV0oVlKgsrKyhK1wz9z6CrR6R9FtZBo1NEqHwmk9 mLQ925Jk5zQN33uGMVbeShfSt0gg2+vZ7/zoC0X0uQipLen8Em3XFFDbBPg83eAOvmE6 Cc1LvMQIKnoOeBJ2wrB12Sbdll2qBHxK5O8uMVw71p+FTnUQV5acfmYDHWjYSlkKVXhc J8Xk4MDU9vFcZ97VbtvUpcBh48B+oJBGeH48W8VuzqIESlehurKF7+ma5bEpI1uh+hmZ L32BHLwyRlVNBxlut5RTBjCFiUTY3HNVGAqpt2R4D9A2nuVvrukFvj9rj3vCCgaaK3gZ PK2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681309818; x=1683901818; 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=zPJxqlBZo4jtH0qPbGgMfD3Kzr4HOrWrQy60eejmh9FqKlKbGnxEp0kxVATIpvAZqR 43i1U62xmIYOk1EKBh7Wg6CUlLfX179Ed/42XUM0wFCKabk1WM9DPmbEinNG6E0ZJ1Xe btzeY9FHrJxbrZNRT1N3WHbnmCD5QsiyFNEt40t/M41crC73iUa4K8LQ17vNqcbVaKqL WAwaH7rxa3amldoucC5a9qMfIFTQVEm/OBIvtqhdebfuFxHp3ahqTpbrVtNEMs3+9JZP iu9W13Qt+Lw1Z9o1vLgZqo/6Qjr8nrncOvnNurLkt925NmHaYmYM1mnfi7P3/zcrltEk iK/A== X-Gm-Message-State: AAQBX9cq90Aw/7G8zbWyFGzWJphJ1P8tGx8I6i3g2JO/e1QuQuxt65Vp HrDlTxKSA5u1a9XnJQvX0zyPeatzYOioxzhDb1SXog== X-Received: by 2002:a05:651c:1607:b0:2a7:970a:1c1b with SMTP id f7-20020a05651c160700b002a7970a1c1bmr719715ljq.3.1681309818344; Wed, 12 Apr 2023 07:30:18 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:17 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 7/9] serial: msm-geni: Use upstream Linux bindings Date: Wed, 12 Apr 2023 17:30:04 +0300 Message-Id: <20230412143006.80946-8-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 Wed Apr 12 14:30:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672642 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp370333wrx; Wed, 12 Apr 2023 07:31:43 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNZyDgTpM9X5I3hoxjjZFNy40S7ubbz9DAwRAcJ8E9uteaUfijvirm3AFGconePYGDnZsB X-Received: by 2002:ac8:7f01:0:b0:3d5:3a1b:61c8 with SMTP id f1-20020ac87f01000000b003d53a1b61c8mr18888316qtk.44.1681309903013; Wed, 12 Apr 2023 07:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309903; cv=none; d=google.com; s=arc-20160816; b=pN9tEKYwmTMB4ol9ju6iQAr9bWjoI0cC0h9g29ABSOoEGwldE6sLto/7cE87tsl+Kq wdjB+0gwU6PCXqvthnQDu4gDxUVhck947arQurBBx84BUNulO7lzNmGxva06tICdbQze gYsqGOwf3dKbN8mDAzUaXPS4W4IPOzqFU+/34CMPor6ioZii4mORjubbb0N8zBUYfns2 RRbdVVl+DDUFycQAZ0kN+9ZqxY2dk6FtBB/Ua9U+5zslTABj+zXmLaDjgGkMPU83wAme 6C0yIwJSRUg8xB69m9rCiCL6TWFv2RsTcMDRMxvr0bFTGYjX6r34Skdl0BGaSKt2y6+j vJbA== 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=q+IN99fyNd9MTSH6CRsJmtiRUV3HScQXLXTSdG52Y3Q=; b=HtNRHw68BTVJh61WE9SM0jQj/Gt72TEzHR+p+OZQ95e+OQhgFmAbnZApDXkpicc+8D 0TfnAw3IiZ5RdnzN4y2YtnqMFp0hTQzBdvUdyBXnHxdj6vFANYp3JLjcqgrqjnltG7wK ZsPxK3EEYQU6JRamYILjGoGs31UFn2B8Pz0YSI8x+13apCI6IopBOIyXqyfeqnsfbZwD q+m2gJfp16pIFuF95wiBe1YjatfQMO+FO+zDfPvhXkXThBByCDNwNC8H3dZ4/Ao1Ifpi yxcaPIHnC4OHY/cdlYMap3Va2xxXk4opBCL4/hl6e75HWgVgrPcNvGRBi/A5+1Y3fwns b0lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aNDqeV0K; 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 f20-20020a05622a1a1400b003e4e4300960si10882945qtb.331.2023.04.12.07.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:31:42 -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=aNDqeV0K; 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 9274885F9D; Wed, 12 Apr 2023 16:30: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=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="aNDqeV0K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E712985F9D; Wed, 12 Apr 2023 16:30:22 +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 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 010E685F88 for ; Wed, 12 Apr 2023 16:30:19 +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-4ec816ccb80so196443e87.1 for ; Wed, 12 Apr 2023 07:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309819; x=1683901819; 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=q+IN99fyNd9MTSH6CRsJmtiRUV3HScQXLXTSdG52Y3Q=; b=aNDqeV0Kh7zGqm+iXDxV3Y9Qv9HgNPEuKNB327X+k6WoDlbqfID0FuV+F6pFxzb+vP QtcfkVEXQ4IFgRL0gZOXJHmjsU2zHLtVt7oL+jBKBnQEv1hObIC7U/3fOf339JVCqJUg N5uwX9alc8lJEJbUtwqSkQ7A42RQNhwIUp07djQ8afpI/rME6J4Wg5JUsMplFrFO5Te5 bfjcux/17uziTf5seCPYp2AgtqjuxiwM8ZS8OMVszySu2pbMB5iYAQ4delmztgL1QTMw zeIsrYaj/pBnQeiUm6/7cmSf0INerlBouC8EM/hCrHnI4xwFRamRvC9cahPbAisVyJsr miFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681309819; x=1683901819; 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=q+IN99fyNd9MTSH6CRsJmtiRUV3HScQXLXTSdG52Y3Q=; b=KKkDc+VVnSQ2zhqg3AU23q4RBiKzHPdNAv93/GARASu8o5ddUW32ot/k85FM3wA+bx kj2A6Y6z14KecU/bjXgGSackbAvG1uKlck2kV5mffXvorXM/GAiwfhDVvd+dMB+bLSnx tLlDXJKBwADDs0ulg9t6jB6m3EwL0BNfgpnVy/uzTOEVgRmQpFoYXxYwXPBxuLi6btHa Xzatgk2LSHiIfgHGKayxe+U4xu3PK/HfBgW0z6/a7RLs84Ei0mkj9I/ye0XdbUuokw56 yazQwrnMVRO3Qu1isdbENyozgvTPx+fGd5bqV+mURxl2a4gkplUB3jGKLfVQLeQuu0bA FiUA== X-Gm-Message-State: AAQBX9cDizQtheV0/af9fSMNURgHB3a7KyoZ8VXhiBkzQir9/Fznb886 f4RtN81nL1RugXp+rMv+qzOm8w== X-Received: by 2002:a05:651c:1607:b0:2a7:970a:1c1b with SMTP id f7-20020a05651c160700b002a7970a1c1bmr719754ljq.3.1681309819689; Wed, 12 Apr 2023 07:30:19 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:18 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 8/9] serial: msm-geni: correct oversampling value based on QUP hardware revision Date: Wed, 12 Apr 2023 17:30:05 +0300 Message-Id: <20230412143006.80946-9-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 | 32 +++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 10d07daf2777..7faf67844424 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -946,6 +946,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..b76ed3a30017 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,28 @@ 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 && 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 +551,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 Wed Apr 12 14:30:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 672644 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp370564wrx; Wed, 12 Apr 2023 07:32:06 -0700 (PDT) X-Google-Smtp-Source: AKy350Y3ZWgUlqgZXB8cCx83/TmPLHUJ72iwJ+QFeBoeT/zM6McPTA5ukiMB5oULYRVkk86QrFYD X-Received: by 2002:ad4:5dcb:0:b0:5ee:e4f8:c7e5 with SMTP id m11-20020ad45dcb000000b005eee4f8c7e5mr9218147qvh.41.1681309925995; Wed, 12 Apr 2023 07:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681309925; cv=none; d=google.com; s=arc-20160816; b=CtVkbJsz1lQ5QJFVYeSCkZJL8Yp0gTEpzGzt4+SBbbbXrE9cw83L8gXPPQmEubwi0e 9FGDAciPY/9GzId+MwJ/ZQxxQG6zNHf6DX+PI7N/2KnPaHCqueFy+pDX+HZDHucfwT0T EWhML19SfTg1Mka+V0EI5mdK2L4u3rt6uHqjaJYX5z/u4JW71PjCJgiUPiDgTks2WX4Q jNr3VjdOa1SXxqAYNWLLKwFAb8dPUj1hqd6CxDvyRY48/3Ow9cllt+5/0ys8KLcICLY7 zCu3cxdEsaBMrFjYlpqzW9QWXQhFOefHlNBwhmbHST8C3bwfx7tWDii03pLyhUKzj70f 3sWA== 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=kckXkFoIRbGqT+Sh/qK9fgO66m6J4lKBWsn6cUULcYWLnMnKPcU/XGvYadftvevggq TiUwpa8StHB/espVDs7MYcqusrz8a75MNjJTufkTBpSLBRRuRMhxWY7kJmfXe6pvYwgd 6KTAo2hmm0qlXdCCMFqtfAXUd4HrFGmFdBYOSgl8t+Ta+CES1ZRPfuWRyibPrEgZ5A/z zGtL2wV8IUFWTuSK7a6rol0cRnvE5rMlF/hBtIGBUwxUyG8EjdbdsywTwXhajV2pdlpE 9YcIbowuWQ2uZX2cE1lAriG9U0GytoM+QwuFzvH/DcbQv/eUoGKwpOPS66CrogHaNcxM fKIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Sa0csSfx; 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 q26-20020a37f71a000000b007484c2fe683si10269972qkj.187.2023.04.12.07.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:32:05 -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=Sa0csSfx; 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 1F2CC86023; Wed, 12 Apr 2023 16:30: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=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="Sa0csSfx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D6D185F89; Wed, 12 Apr 2023 16:30:26 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 8B18285F77 for ; Wed, 12 Apr 2023 16:30:21 +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-x133.google.com with SMTP id 2adb3069b0e04-4ec81439f04so197554e87.0 for ; Wed, 12 Apr 2023 07:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681309821; x=1683901821; 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=Sa0csSfxy6CQOm3Wjc/iVAoqPMTPTqGw4QkkN33T0ubA+yZL/8PRVuxK4R0Jdb+4Zu 5yDgQxuhewklwC3k491ZPQ6SOiTgnvH7HQP+Ul/uz9LfNv1TVsAr0Tiopcd2z1ggKHIu hvppteVkxNIGVEdXbs6UoYyLinE8uaVy3zFfWbJ1joB6n++WiC6Lm9EUBKiqUfdZwXzA DdYt1loSpHLefHh39Owd0gzlf0CBDxXMDr1LMoG3YpB4t8K2wgeRK2M2Ukad6AAci/iI KxWl8HT/zjlneJ96tYTzTkY1rPYTeczx7EgbyqPaibyQILfnhjMfiOrbqPIiHOh4igjp 6j+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681309821; x=1683901821; 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=a+mHAlFFNO63/PJeoOfim0v/YTvRiMvYxh7Y614EA2P30ddJR/XkHYbUS3lirLtD0/ wVUKXey3u4IJ7pYDC03i2MPtwPwCkyWBCmSGUghh6q9WYwQhjPBXpOzsqDaKvndnch0p 11Ca8SG8Y5Ge1Fos29Azqmk0jNxPVGqO2avCjaIostxwelMsyC24m1UU4uNDpBE/fQBe 8sQHklW6LbDQhSSS+sSjzdeaupH7bHMil5E1XDhrEMeRkyKViCyFI3isPrPuUg8+u87H 8adOO1ruQ8o06R6c7m9vfcqDWGOmGd+taI92Xz7VFFeXwoqteoLsQr7RfZttNrytXzKD INsg== X-Gm-Message-State: AAQBX9flXWAi6dV4wJ4fonxPykHs68v4yO7kQCjJ0iLcqjMDNIQ4lz8P Ux6UDG/rG7sT5nhJegBeh7J5lg== X-Received: by 2002:a2e:b890:0:b0:2a6:1681:d82f with SMTP id r16-20020a2eb890000000b002a61681d82fmr863708ljp.1.1681309821313; Wed, 12 Apr 2023 07:30:21 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id z2-20020a2e8e82000000b002a7729eea3dsm1861054ljk.88.2023.04.12.07.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 07:30:20 -0700 (PDT) From: Vladimir Zapolskiy To: Tom Rini , Simon Glass Cc: Ramon Fried , Konrad Dybcio , Bhupesh Sharma , u-boot@lists.denx.de Subject: [PATCH v2 9/9] arm: dts: sdm845: add GENI SE QUP device tree node Date: Wed, 12 Apr 2023 17:30:06 +0300 Message-Id: <20230412143006.80946-10-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230412143006.80946-1-vladimir.zapolskiy@linaro.org> References: <20230412143006.80946-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 {