From patchwork Mon Jan 22 14:27:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 765045 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17F3E28E05 for ; Mon, 22 Jan 2024 14:27:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705933648; cv=none; b=OJQUa5ATc0SIPSlwcPj47jaMSwWvKPHNlME38gURZ00RSG4CctIRiy/AppLWd8UKTlSI9kmQCGq4FkNE6lDcW0XjSGMnB7avprFstrVLtMbKIkMlZr3DjogdCnutfx06H44bzZ9ZpWHrmoz3KTrrb8v7bSVzVX9zTXwnM8rBq74= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705933648; c=relaxed/simple; bh=JgGry89LGbjrWfZv6NYZoTSuvUCDfdD76rvu/I/jSPQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=E8DHd8gWmB4N+L2zCt63rwejheCVUipCm87jONiWOYsCF6eL9W7zu7zSQIKJngCLzmvsftEVLzIawNdXXfKhZ73k0cVcw9phx4gRF4bBTVkOAOBGbAfLCUulnUtWxM4mTvgOyd54ji1LW+nmqMPL9tHitPRnGVEAtrvp/FSVGD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=G6z03htM; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="G6z03htM" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-55a90b2b554so1839965a12.1 for ; Mon, 22 Jan 2024 06:27:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705933645; x=1706538445; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=cnMxD6w0kcsPjPfbJXwp4OAaCHPnU63xAnd/2Fgqnm8=; b=G6z03htMODZRlwOUEvoa8GZ1mI50fdBdMH6VvTZnJWadaWd+8Am5tA5qK/r++4Ceba kP7GtQCLtuRjaVSxwNEumZt1lwyW46DzcyBwETlFc4Bi8iNVgi/TlmpNV/oZmol0m1vt r45qy+woSg6XzAqIqr0kBAaAk7YdvWAjjUkOKrxov2a7l4s6MQ7PD6+wRL9JKUg9Zl0n 0vA/5ti1yeyeG/FXGjEgP9oABRuqy32jb6FLdmwcgLsgStiJ/NZ07V/ziJVV4wnrPoZw 5/WlUj2XWrB4UgV9D2Jd5ZY9Sx6PRnhzIOozqbpM0JSCXUdO6eZdzuqflGrOOaUaru+C CGQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705933645; x=1706538445; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cnMxD6w0kcsPjPfbJXwp4OAaCHPnU63xAnd/2Fgqnm8=; b=IP9N72v2XGazvF4h11AQqke/DIaP/ncWVbBxj7Xk8fDGRizODDZIKQhmsGpTBOh1qn xycl6T0GxiqpD2YPYlTtE1iT7hKr9Xfv2ZIOEgjfMiOZ5fk2QPTxMa4oQ6hz/ZaGizSf pGUu2DL340GeW3Oj+pnl23NU4exm8OQj8X9lv6B5wlr7B3z0SwwzVCHrbDDDqhQtaIZ3 nO5DHlAs1CTGaNUsbZGcYHhbVbqlRpZcGvU3SHqa+l6JZW/SBvJtyirdiLY4pNsRc6m8 +XIXH2ky5ufLnT7k+JpWL43VQsWZDngXKFhgi5bfBaPO0B35kRXLaX+R0BQoGO5o74j4 ENiQ== X-Gm-Message-State: AOJu0Yyp89E6NrYFNkImei0fiMEM8+o9adlhg1iB1GE3IIBlYNrVJ4UZ EqlEDR/3KDRTKA9kwtfWp1jZJkjx8BnNFEkVcpJVAMZuX5A66VZugDQ/UpVFwe0= X-Google-Smtp-Source: AGHT+IFmhZhkzwt8wVlbmPxfqRQrvONViFH1Y/jI6UTld79Uh7G8VeQYQzNb4b3yOIHVHNNlSaiQbg== X-Received: by 2002:a17:906:1996:b0:a29:3c2b:c911 with SMTP id g22-20020a170906199600b00a293c2bc911mr2115411ejd.63.1705933645247; Mon, 22 Jan 2024 06:27:25 -0800 (PST) Received: from [10.167.154.1] (178235179218.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.218]) by smtp.gmail.com with ESMTPSA id tx27-20020a1709078e9b00b00a2d1b0c7b80sm11341325ejc.57.2024.01.22.06.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 06:27:24 -0800 (PST) From: Konrad Dybcio Date: Mon, 22 Jan 2024 15:27:20 +0100 Subject: [PATCH] tty: serial: amba-pl011: Remove QDF2xxx workarounds Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240122-topic-qdf_cleanup_tty-v1-1-0415503184be@linaro.org> X-B4-Tracking: v=1; b=H4sIAEd7rmUC/x2N0QqDMAwAf0XyvEIsZYz9yhgS26iBUru2yob47 ws+3sFxB1QuwhWe3QGFd6myJoX+1oFfKM1sJCiDReuwt9a0NYs3nzANPjKlLQ+t/YxzD2Jn74g YQNuRKpuxUPKL1mmLUWUuPMn3mr3e5/kHGPAjPHwAAAA= To: Russell King , Greg Kroah-Hartman , Jiri Slaby Cc: Marijn Suijten , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705933644; l=4836; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=JgGry89LGbjrWfZv6NYZoTSuvUCDfdD76rvu/I/jSPQ=; b=Pp6+OGdQ/yqUdPaaTjapztIu+C7lt9ei3fQIL9DkuDgx6kk/49/yVCCz2HDSe66Tby7L76/JU D3sMQSBzxjbDLROGH5S9jILtG7JSO2HE3/i0IKhC1ECakbQ+ClVSlvz X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= This SoC family was destined for server use, featuring Qualcomm's very interesting Kryo cores (before "Kryo" became a marketing term for Arm cores with small modifications). It did however not leave the labs of Qualcomm and presumably some partners, nor was it ever productized. Remove the workarounds, as they are long obsolete. Signed-off-by: Konrad Dybcio --- Compile-tested only --- drivers/tty/serial/amba-pl011.c | 82 ----------------------------------------- 1 file changed, 82 deletions(-) --- base-commit: 319fbd8fc6d339e0a1c7b067eed870c518a13a02 change-id: 20240122-topic-qdf_cleanup_tty-448ae426000d Best regards, diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index fccec1698a54..c4df9cbc264b 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -152,23 +152,6 @@ static const struct vendor_data vendor_sbsa = { .fixed_options = true, }; -#ifdef CONFIG_ACPI_SPCR_TABLE -static const struct vendor_data vendor_qdt_qdf2400_e44 = { - .reg_offset = pl011_std_offsets, - .fr_busy = UART011_FR_TXFE, - .fr_dsr = UART01x_FR_DSR, - .fr_cts = UART01x_FR_CTS, - .fr_ri = UART011_FR_RI, - .inv_fr = UART011_FR_TXFE, - .access_32b = true, - .oversampling = false, - .dma_threshold = false, - .cts_event_workaround = false, - .always_enabled = true, - .fixed_options = true, -}; -#endif - static u16 pl011_st_offsets[REG_ARRAY_SIZE] = { [REG_DR] = UART01x_DR, [REG_ST_DMAWM] = ST_UART011_DMAWM, @@ -2468,15 +2451,6 @@ static int pl011_console_match(struct console *co, char *name, int idx, resource_size_t addr; int i; - /* - * Systems affected by the Qualcomm Technologies QDF2400 E44 erratum - * have a distinct console name, so make sure we check for that. - * The actual implementation of the erratum occurs in the probe - * function. - */ - if ((strcmp(name, "qdf2400_e44") != 0) && (strcmp(name, "pl011") != 0)) - return -ENODEV; - if (uart_parse_earlycon(options, &iotype, &addr, &options)) return -ENODEV; @@ -2517,22 +2491,6 @@ static struct console amba_console = { #define AMBA_CONSOLE (&amba_console) -static void qdf2400_e44_putc(struct uart_port *port, unsigned char c) -{ - while (readl(port->membase + UART01x_FR) & UART01x_FR_TXFF) - cpu_relax(); - writel(c, port->membase + UART01x_DR); - while (!(readl(port->membase + UART01x_FR) & UART011_FR_TXFE)) - cpu_relax(); -} - -static void qdf2400_e44_early_write(struct console *con, const char *s, unsigned int n) -{ - struct earlycon_device *dev = con->data; - - uart_console_write(&dev->port, s, n, qdf2400_e44_putc); -} - static void pl011_putc(struct uart_port *port, unsigned char c) { while (readl(port->membase + UART01x_FR) & UART01x_FR_TXFF) @@ -2611,29 +2569,6 @@ OF_EARLYCON_DECLARE(pl011, "arm,pl011", pl011_early_console_setup); OF_EARLYCON_DECLARE(pl011, "arm,sbsa-uart", pl011_early_console_setup); -/* - * On Qualcomm Datacenter Technologies QDF2400 SOCs affected by - * Erratum 44, traditional earlycon can be enabled by specifying - * "earlycon=qdf2400_e44,
". Any options are ignored. - * - * Alternatively, you can just specify "earlycon", and the early console - * will be enabled with the information from the SPCR table. In this - * case, the SPCR code will detect the need for the E44 work-around, - * and set the console name to "qdf2400_e44". - */ -static int __init -qdf2400_e44_early_console_setup(struct earlycon_device *device, - const char *opt) -{ - if (!device->port.membase) - return -ENODEV; - - device->con->write = qdf2400_e44_early_write; - return 0; -} - -EARLYCON_DECLARE(qdf2400_e44, qdf2400_e44_early_console_setup); - #else #define AMBA_CONSOLE NULL #endif @@ -2869,22 +2804,6 @@ static int pl011_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(pl011_dev_pm_ops, pl011_suspend, pl011_resume); -#ifdef CONFIG_ACPI_SPCR_TABLE -static void qpdf2400_erratum44_workaround(struct device *dev, - struct uart_amba_port *uap) -{ - if (!qdf2400_e44_present) - return; - - dev_info(dev, "working around QDF2400 SoC erratum 44\n"); - uap->vendor = &vendor_qdt_qdf2400_e44; -} -#else -static void qpdf2400_erratum44_workaround(struct device *dev, - struct uart_amba_port *uap) -{ /* empty */ } -#endif - static int sbsa_uart_probe(struct platform_device *pdev) { struct uart_amba_port *uap; @@ -2921,7 +2840,6 @@ static int sbsa_uart_probe(struct platform_device *pdev) uap->port.irq = ret; uap->vendor = &vendor_sbsa; - qpdf2400_erratum44_workaround(&pdev->dev, uap); uap->reg_offset = uap->vendor->reg_offset; uap->fifosize = 32;