From patchwork Wed Jan 10 10:20:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761707 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 B6E2F3FE27 for ; Wed, 10 Jan 2024 10:21:09 +0000 (UTC) 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="EHa+QY2i" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-40e5770d34fso3220335e9.3 for ; Wed, 10 Jan 2024 02:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882068; x=1705486868; darn=vger.kernel.org; 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=a/c7oDT8RKSeNrIFhGqJZw8sJoinUsXp+DaHWK6w1PA=; b=EHa+QY2iDGVWuOoQ/ys4OLVXFb/zbFRuQLlei825OF66EBStNyLjLXASYbhFPByzKw /5+o+cWIr5j9NULiMVgvlmdoIZxOOkBc1M+PXAQ4tOxOsRV/eTeBzLBa1bFI3bxUlp0s cR4aoavbQ6F/ol6DVoRc8ZtLW+gFGA1ArXl4tm90CmDU9q1WZuzOWbH9JD+Q4KXgk6pU pCgns/lCMXAji7MoRo45BAYTD4K8DDQdhnvb0fdeIpkwyx9xUz9HCT3g0BnoE+26hLMt Nw337rppyUK02tUyE5imJgAt/uFUj4+MV3XDQQxZqqpirBXogBbQQCRuyN8iOGYktrZY lj2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882068; x=1705486868; 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=a/c7oDT8RKSeNrIFhGqJZw8sJoinUsXp+DaHWK6w1PA=; b=TivxMTgB0o+kO03T9pL/Ux7h3loPOpMYd26IFZXYfMOp9NRr/VBS0sR2NLaqowQ8WC o+2DsAb+PVyMkecN2n5pvHR9GDzWubdy2KRofveYwzgAAf21tgAQPeW8lb3fUpP31LFu /pqjGvZIVJ8ylupH4/z+kmUowxU5r4v6xvEY5iQ8h5ZUkLyWJpRuQCQ2W2kMHtsFbcON /jCAYOwuG9Y3if9k3efBEDqlMR3/jaPdYvfW0VIL7o0touSkyColectcKwxU3MFl4lbs Yyf5glmGDMrBZZJjiltaLZ9ljNi9HkT2SZ/TxA4ycMza1vEwThou9ViKVulwWU8dNIYw Z3hw== X-Gm-Message-State: AOJu0YzEAJSdEu9nMoqaR7Q3zpzVpRSARiZ0596da/fEGy9DAMkNPyz8 9oCqPF5XRIceTym8exnPWx5ipmmhmi+7lQ== X-Google-Smtp-Source: AGHT+IEQmAz/yRZ4JQb4KH0cdGwc6wBVKJX8n66A4HzKVJGrDTgM6umRzceJA14m6Bo9F2DGOz85Jw== X-Received: by 2002:a05:600c:b88:b0:40e:4cc6:9ff5 with SMTP id fl8-20020a05600c0b8800b0040e4cc69ff5mr406137wmb.100.1704882068122; Wed, 10 Jan 2024 02:21:08 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:07 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 01/18] tty: serial: samsung: prepare for different IO types Date: Wed, 10 Jan 2024 10:20:45 +0000 Message-ID: <20240110102102.61587-2-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 GS101's Connectivity Peripheral blocks (peric0/1 blocks) which include the I3C and USI (I2C, SPI, UART) only allow 32-bit register accesses. If using 8-bit register accesses, a SError Interrupt is raised causing the system unusable. Instead of specifying the reg-io-width = 4 everywhere, for each node, the requirement should be deduced from the compatible. Prepare the samsung tty driver to allow IO types different than UPIO_MEM. ``struct uart_port::iotype`` is an unsigned char where all its 8 bits are exposed to uapi. We can't make NULL checks on it to verify if it's set, thus always set it from the driver's data. Use u8 for the ``iotype`` member of ``struct s3c24xx_uart_info`` to emphasize that the iotype is an 8 bit mask. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 71d17d804fda..b8fe9df20202 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -84,6 +84,7 @@ struct s3c24xx_uart_info { unsigned long clksel_mask; unsigned long clksel_shift; unsigned long ucon_mask; + u8 iotype; /* uart port features */ @@ -1742,7 +1743,6 @@ static void s3c24xx_serial_init_port_default(int index) { spin_lock_init(&port->lock); - port->iotype = UPIO_MEM; port->uartclk = 0; port->fifosize = 16; port->flags = UPF_BOOT_AUTOCONF; @@ -1989,6 +1989,8 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) break; } + ourport->port.iotype = ourport->info->iotype; + if (np) { of_property_read_u32(np, "samsung,uart-fifosize", &ourport->port.fifosize); @@ -2399,6 +2401,7 @@ static const struct s3c24xx_serial_drv_data s3c6400_serial_drv_data = { .name = "Samsung S3C6400 UART", .type = TYPE_S3C6400, .port_type = PORT_S3C6400, + .iotype = UPIO_MEM, .fifosize = 64, .has_divslot = 1, .rx_fifomask = S3C2440_UFSTAT_RXMASK, @@ -2428,6 +2431,7 @@ static const struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { .name = "Samsung S5PV210 UART", .type = TYPE_S3C6400, .port_type = PORT_S3C6400, + .iotype = UPIO_MEM, .has_divslot = 1, .rx_fifomask = S5PV210_UFSTAT_RXMASK, .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, @@ -2457,6 +2461,7 @@ static const struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { .name = "Samsung Exynos UART", \ .type = TYPE_S3C6400, \ .port_type = PORT_S3C6400, \ + .iotype = UPIO_MEM, \ .has_divslot = 1, \ .rx_fifomask = S5PV210_UFSTAT_RXMASK, \ .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, \ @@ -2517,6 +2522,7 @@ static const struct s3c24xx_serial_drv_data s5l_serial_drv_data = { .name = "Apple S5L UART", .type = TYPE_APPLE_S5L, .port_type = PORT_8250, + .iotype = UPIO_MEM, .fifosize = 16, .rx_fifomask = S3C2410_UFSTAT_RXMASK, .rx_fifoshift = S3C2410_UFSTAT_RXSHIFT, @@ -2546,6 +2552,7 @@ static const struct s3c24xx_serial_drv_data artpec8_serial_drv_data = { .name = "Axis ARTPEC-8 UART", .type = TYPE_S3C6400, .port_type = PORT_S3C6400, + .iotype = UPIO_MEM, .fifosize = 64, .has_divslot = 1, .rx_fifomask = S5PV210_UFSTAT_RXMASK, From patchwork Wed Jan 10 10:20:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762160 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 004DD3FB38 for ; Wed, 10 Jan 2024 10:21:10 +0000 (UTC) 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="xK8vMPH0" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-50e67e37661so4962695e87.0 for ; Wed, 10 Jan 2024 02:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882069; x=1705486869; darn=vger.kernel.org; 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=WA1wqdkIBgQshp7OOT7q6kHMVXJcjDA2G18H91tm8Z8=; b=xK8vMPH0tTdvjzREA+kXmSbeaSuoL9xKI3Vxcpz/UhDqZ0No8PCJPktXZo6YPmg7Qb EvboM8yFnzZ7QZziP1tMkoshVE6zxj4eAtO7nsMiOeVaGt6jkj2WrQeMdY8eD6/ukLtA Y6KC2T/X8HWOICt9fAMLVyf4l5j0x13/XKK4adfs+CP21gfEFAUj0ZGgSFWMOOw053N1 JfMBEZ3OLaLQYtjHZPOoSJp8d24nwuS+fj2xab+znJKC3k5ZekmH3xaCz1sbhzxg0tbz EgDMMjWvpbxFEKApKU9+W1tm3j6nXngCb4hixslpdGiuiTuCVmfXOItdIlHprHbetLVp PHOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882069; x=1705486869; 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=WA1wqdkIBgQshp7OOT7q6kHMVXJcjDA2G18H91tm8Z8=; b=oVUHWb+cOjKPX/Z8qwZ1yRntbu0n0n8D5hAIYT+O3WFWUKX/YaOQODykwnabflQpXB 4VzTmYG3ERyjVYkTrhKMiIXqwsX4UCUwXrtzi6iNX1l/gTE0DkSQNA2fisrSkoCGpQmv /8Gs1DJ138HMbxBvsR6RFvotAH/EA10jnToqc3L7MuvBpfbX4cFEelsSU/DUw3BhJhZJ Xj38w372aYwPNPLlg5K5gqzh1sWci6wRqn5eM8ztm7C/5ZeED2nwmfTebbywIEDSAoOl LyRPkGdl0wh1sfEZrGb+g4nyxrmtPcRFL4cxnaH5tP/grpf8ZGqFwiNyQHFDtKptEXB2 awlw== X-Gm-Message-State: AOJu0YzKMVRs59tiyyP9jcRFERBQGyQOuFhILbxVxgTLs5WVXieb7poq yR94S17Vg76eVtxpl9Td1cdKbEYKXMUFsA== X-Google-Smtp-Source: AGHT+IELjvrXw11hASDuqeoOjnXHBb/wHFRSBI3T8k5uASK1m5nJmKIYBXNYKwon+CNtfclv5aKAuA== X-Received: by 2002:a05:6512:131f:b0:50e:d347:b83 with SMTP id x31-20020a056512131f00b0050ed3470b83mr344642lfu.115.1704882068958; Wed, 10 Jan 2024 02:21:08 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:08 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 02/18] tty: serial: samsung: set UPIO_MEM32 iotype for gs101 Date: Wed, 10 Jan 2024 10:20:46 +0000 Message-ID: <20240110102102.61587-3-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 GS101's Connectivity Peripheral blocks (peric0/1 blocks) which include the I3C and USI (I2C, SPI, UART) only allow 32-bit register accesses. Instead of specifying the reg-io-width = 4 everywhere, for each node, the requirement should be deduced from the compatible. Infer UPIO_MEM32 iotype from the "google,gs101-uart" compatible. Update the uart info name to be GS101 specific in order to differentiate from the other exynos platforms. All the other settings are not changed. exynos_fifoszdt_serial_drv_data was replaced by gs101_serial_drv_data because the iotype restriction is gs101 specific and there was no other user of exynos_fifoszdt_serial_drv_data. Reviewed-by: Peter Griffin Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 38 +++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index b8fe9df20202..20ec6ef1a52f 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2495,25 +2495,43 @@ static const struct s3c24xx_serial_drv_data exynos850_serial_drv_data = { .fifosize = { 256, 64, 64, 64 }, }; -/* - * Common drv_data struct for platforms that specify samsung,uart-fifosize in - * device tree. - */ -static const struct s3c24xx_serial_drv_data exynos_fifoszdt_serial_drv_data = { - EXYNOS_COMMON_SERIAL_DRV_DATA(), +static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = { + .info = { + .name = "Google GS101 UART", + .type = TYPE_S3C6400, + .port_type = PORT_S3C6400, + .iotype = UPIO_MEM32, + .has_divslot = 1, + .rx_fifomask = S5PV210_UFSTAT_RXMASK, + .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, + .rx_fifofull = S5PV210_UFSTAT_RXFULL, + .tx_fifofull = S5PV210_UFSTAT_TXFULL, + .tx_fifomask = S5PV210_UFSTAT_TXMASK, + .tx_fifoshift = S5PV210_UFSTAT_TXSHIFT, + .def_clk_sel = S3C2410_UCON_CLKSEL0, + .num_clks = 1, + .clksel_mask = 0, + .clksel_shift = 0, + }, + .def_cfg = { + .ucon = S5PV210_UCON_DEFAULT, + .ufcon = S5PV210_UFCON_DEFAULT, + .has_fracval = 1, + }, + /* samsung,uart-fifosize must be specified in the device tree. */ .fifosize = { 0 }, }; #define EXYNOS4210_SERIAL_DRV_DATA (&exynos4210_serial_drv_data) #define EXYNOS5433_SERIAL_DRV_DATA (&exynos5433_serial_drv_data) #define EXYNOS850_SERIAL_DRV_DATA (&exynos850_serial_drv_data) -#define EXYNOS_FIFOSZDT_DRV_DATA (&exynos_fifoszdt_serial_drv_data) +#define GS101_SERIAL_DRV_DATA (&gs101_serial_drv_data) #else #define EXYNOS4210_SERIAL_DRV_DATA NULL #define EXYNOS5433_SERIAL_DRV_DATA NULL #define EXYNOS850_SERIAL_DRV_DATA NULL -#define EXYNOS_FIFOSZDT_DRV_DATA NULL +#define GS101_SERIAL_DRV_DATA NULL #endif #ifdef CONFIG_ARCH_APPLE @@ -2601,7 +2619,7 @@ static const struct platform_device_id s3c24xx_serial_driver_ids[] = { .driver_data = (kernel_ulong_t)ARTPEC8_SERIAL_DRV_DATA, }, { .name = "gs101-uart", - .driver_data = (kernel_ulong_t)EXYNOS_FIFOSZDT_DRV_DATA, + .driver_data = (kernel_ulong_t)GS101_SERIAL_DRV_DATA, }, { }, }; @@ -2624,7 +2642,7 @@ static const struct of_device_id s3c24xx_uart_dt_match[] = { { .compatible = "axis,artpec8-uart", .data = ARTPEC8_SERIAL_DRV_DATA }, { .compatible = "google,gs101-uart", - .data = EXYNOS_FIFOSZDT_DRV_DATA }, + .data = GS101_SERIAL_DRV_DATA }, {}, }; MODULE_DEVICE_TABLE(of, s3c24xx_uart_dt_match); From patchwork Wed Jan 10 10:20:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761706 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 6CFD43FE2F for ; Wed, 10 Jan 2024 10:21:11 +0000 (UTC) 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="HtIJ7gBc" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40e461c1f5cso35229895e9.3 for ; Wed, 10 Jan 2024 02:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882069; x=1705486869; darn=vger.kernel.org; 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=fsnoBIJqRKL8fx5Abgy7bxSlqGNMKE0Lqg/re65WEDg=; b=HtIJ7gBc23zKjcHLhsbCZg17sUrDa44EqsX0I/awb6sLxYcg6lndV0wMehxwk3oZNB iXTb8fT3lWmwOE0ZyU7bq8gy6xd2UicGnwRKgaKdAOmpkyniPY+9fmjScptcBF4lsZK4 TSbtS7IYNAVfQNpP9g0TWGzsDmLhp2JUYNFiZ6iMVYcJkwr0Ji89sxZwXQqwd2ijmOuX lOwPWo6o5KmWsiA7lZXd/h5MNBKRSXpgxBBWxj4+oFWIonhRV/k0mf9XVf7/vr5gG+Ay pFO4DPWJCtvw1YZiLFW0AS4Uge14PUNcfYuDyYaX2S30+gK2FrqRbHspQkUqjOSFGPuD 1cKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882069; x=1705486869; 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=fsnoBIJqRKL8fx5Abgy7bxSlqGNMKE0Lqg/re65WEDg=; b=sRqSzCBOBmulJEHvfSAzEhv1U20r5yf55D8pGNVBnHadyq0O5TD6rw0hb1VmokpBG6 zCS9gB99eEg+6YtHyuY+4//mXNJOh8M7bKDjF/kJfyHqMWLPTUzmGQPrRnuNlH39wMmX dsWR+e4jk+QXziaBwIXdZquvsaWuvaRIxKCm4EVWOcyvJdxKWI3RsrSYgod3CHpG/oE/ hGkWE6ABV09xjUNjdnaTuNopZfOcEBoeJBaOa87zgAKppAPehjRF9dH4X08q+j5VXCJN uHzunyPfCQ2YhP5zN3bE5fZbYeq/u/E6FKEj03r5vYn36DCvLEjmqbw/vrTKFUrGEY+v Bl+w== X-Gm-Message-State: AOJu0YzQIesqFPyLR//OsVh0xGrSvu8ZajgXMzpbRuQN3FM+dJzVML3R e7Sdbpm2Gcdxxe5c7fVMIvYKanqW6oD2ig== X-Google-Smtp-Source: AGHT+IFyetyaA6/1wjXTRap8gF7AQlclivTZB7k1d1dyppWTKQU0nJEVHPWzIx2rYQXgLUJlRHX0RA== X-Received: by 2002:a05:600c:32a7:b0:40e:44eb:c40 with SMTP id t39-20020a05600c32a700b0040e44eb0c40mr312383wmp.30.1704882069641; Wed, 10 Jan 2024 02:21:09 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:09 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 03/18] tty: serial: samsung: add gs101 earlycon support Date: Wed, 10 Jan 2024 10:20:47 +0000 Message-ID: <20240110102102.61587-4-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The entire bus (PERIC) on which the GS101 serial resides only allows 32-bit register accesses. The reg-io-width dt property is disallowed for the "google,gs101-uart" compatible and instead the iotype is inferred from the compatible. Always set UPIO_MEM32 iotype for the gs101 earlycon. Reviewed-by: Peter Griffin Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 20ec6ef1a52f..74bc5151dad4 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2810,6 +2810,17 @@ OF_EARLYCON_DECLARE(exynos4210, "samsung,exynos4210-uart", OF_EARLYCON_DECLARE(artpec8, "axis,artpec8-uart", s5pv210_early_console_setup); +static int __init gs101_early_console_setup(struct earlycon_device *device, + const char *opt) +{ + /* gs101 always expects MMIO32 register accesses. */ + device->port.iotype = UPIO_MEM32; + + return s5pv210_early_console_setup(device, opt); +} + +OF_EARLYCON_DECLARE(gs101, "google,gs101-uart", gs101_early_console_setup); + /* Apple S5L */ static int __init apple_s5l_early_console_setup(struct earlycon_device *device, const char *opt) From patchwork Wed Jan 10 10:20:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762159 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.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 0DBD43FE2A for ; Wed, 10 Jan 2024 10:21:11 +0000 (UTC) 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="pSSjqrVB" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-40e585ec8ebso2401405e9.3 for ; Wed, 10 Jan 2024 02:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882070; x=1705486870; darn=vger.kernel.org; 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=rCIwgQ4YttU9lzxXqEJuv2Mwb9Cj5TAyRM4oPuL0tc0=; b=pSSjqrVBqeKGCgJvkWJH9XuOMGfkW68S2D7bZohMhksRmmiNkSlE2HOud44/b958JL Htt3Ej7Kq1yBERhGXlLeWpyXFMuVliZVQMs9K+RyiB1jSyj4iF3dCKifwFu3rav+BYIJ reYHyhySUq39WJcCOSXV7+wrhtmB8wVAyO7nqYPkO2V4IvHBPALPe/CJ1jIM1VffjvQf QlJqvY9OYF/hROFY7AAc8Rwo1siz29HAY+KQ2erGH/yf1qjqvzwLjHqW7MQ8r4VZpy5t OFnopphX8ZaRAmxwnh44xL/6ZE2FALZ4ReLQpmU+t0nyVbYjSH9eKJtlU99nDnu2cjyT MKFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882070; x=1705486870; 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=rCIwgQ4YttU9lzxXqEJuv2Mwb9Cj5TAyRM4oPuL0tc0=; b=Cj1eCeRo2q3Mz16X8KCzk8m7IHLUFEnpkcYx4RKl8kCDZKTIJFW5vAg1yGLAwiAiuZ 33ITIUVVA4jyevLKJcwMQF9y64qpanGCZd8YcY790jDvZIKDc1/DnsdsdRm+oiMZmroR 9hhyU0syvbrmibRIGuZ1Slcbb4aMhmEXCZ7Kyjbuqb19ToFmGGYmTBUmWDfEnvwCR6xl am8MkSd9+D0gz6K0HHN9PmRkNEZoZdhmDR/4V+MthE33RT1nO7+MaHiuB2hZci1Lgzns Gp4+lbxH3jxma1R26NGArvNsypITuXC4WmptNvLsGvzwbR9gSC0J5ajOWPGnDEUYDCKS 0CkA== X-Gm-Message-State: AOJu0YwwBOIgKflH5BTOODs69MXLcWfMOcsDXZJ+cN64Utr15IVWpMw/ opbj2KlWyc9RRVaBfsGszHcWh5I+B7hmKw== X-Google-Smtp-Source: AGHT+IHt/P5/L5xH5AAfveckh63ganb8NEGmYwtf9RT0JC1yoNO6aAavNRUXC/fTYmqSHMRcJOKt7w== X-Received: by 2002:a05:600c:2143:b0:40e:4156:9059 with SMTP id v3-20020a05600c214300b0040e41569059mr371775wml.177.1704882070457; Wed, 10 Jan 2024 02:21:10 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:09 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 04/18] tty: serial: samsung: sort headers alphabetically Date: Wed, 10 Jan 2024 10:20:48 +0000 Message-ID: <20240110102102.61587-5-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sorting headers alphabetically helps locating duplicates, and makes it easier to figure out where to insert new headers. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 74bc5151dad4..f37d6724bfe5 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -21,26 +21,27 @@ * BJD, 04-Nov-2004 */ -#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include #include #include -#include -#include +#include #include -#include +#include +#include +#include +#include #include -#include #include #include -#include -#include -#include -#include -#include -#include -#include + #include /* UART name and device definitions */ From patchwork Wed Jan 10 10:20:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761705 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 077D03FE3C for ; Wed, 10 Jan 2024 10:21:12 +0000 (UTC) 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="YvFtRv/A" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40e43e489e4so44414675e9.1 for ; Wed, 10 Jan 2024 02:21:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882071; x=1705486871; darn=vger.kernel.org; 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=O4iYdXj/TSCgsEZp2b2vJFAs1qXmGMx2hLD5PPyxfe4=; b=YvFtRv/Aj0WzE6T6JVyC9vI3o48kV5b3VhioXCfQUA2NNmQ0eRbh7NY9m952Rji0LP K8TyYyQJO29Vp9TCsipUwvA6CY0Yjsss/ItgOLMkKUCn5CG0Xn/4sjres+RpUTBirHJe EaKm+dkNp4bTLheTStRSsaE7i71c14F3zs5swX4N8lCbGsyvwNH11/KgS6eBTaIS0Cfb q16+ahe/532c1crhJldrJYAJZLpikeYUDxypnyI7NCL5QeVVlwLrnMPBz46WMAqSwBTn +yvJLsElFf3BZCldefewu3XRWszfTwB8tE7xJwwZjTgHQzG3E1cF/2Wb2JA467hbKpsi lWAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882071; x=1705486871; 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=O4iYdXj/TSCgsEZp2b2vJFAs1qXmGMx2hLD5PPyxfe4=; b=ivAxSI8lk8ZZ/QCQbX0py4k8/ncFTUGypF/Vo14/2nqhfUcJqBR4y0K6HsA99nTF27 lNbAAHVXNoB19EAYKTtfHCrz43ai47a4p6aIpa3jewsQSKcgvfFA6eyIrxVY5qVKuszL zSU24XF2owCHDbe4ir2Y1+u/ZZrkZ8a3bcBwylB/15DgHt1ZwitG1o88wntFUbpa+EaD N0iBOKibla+YCg5b4n27zY/cETLrelup4dmuXq12h3MsoCa1xP6GA112Uk+NiQuz6ylF 85GFaDATpzUMX5ALsCQDQEgh9ofsIUgBXp6orRFcKtHBaMj+RXibagtABDhvwRG5ddCX r1Uw== X-Gm-Message-State: AOJu0Yyqk5cWbUWUbXWIZc8jLnvZnzeOGjVlYRYKsroJVHWIh0Hla3Kj 8d7fVSTAS+wt3ocYbE9mkHk/L8Z8wGeXyA== X-Google-Smtp-Source: AGHT+IEJaLJEuywZyJ4sRLPFSPZQHxuethScWjz9nRPWcCw2dTCMG2kd8LT+vUP10sFOjNedK0JasQ== X-Received: by 2002:a05:600c:3d1a:b0:40e:461e:26a6 with SMTP id bh26-20020a05600c3d1a00b0040e461e26a6mr471328wmb.36.1704882071439; Wed, 10 Jan 2024 02:21:11 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:10 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 05/18] tty: serial: samsung: explicitly include Date: Wed, 10 Jan 2024 10:20:49 +0000 Message-ID: <20240110102102.61587-6-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 samsung_tty.c uses u32 and relies on to include . Explicitly include . We shall aim to have the driver self contained. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index f37d6724bfe5..b8b71a0109ea 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -41,6 +41,7 @@ #include #include #include +#include #include From patchwork Wed Jan 10 10:20:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762158 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 EB0D3405DF for ; Wed, 10 Jan 2024 10:21:13 +0000 (UTC) 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="bKhdoES9" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-336897b6bd6so3899427f8f.2 for ; Wed, 10 Jan 2024 02:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882072; x=1705486872; darn=vger.kernel.org; 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=LfuH3wSlm6aDB+5MQe7gxyw0I5hRCPtFyKG+AY6rcK0=; b=bKhdoES9+F2y3TxMRg2fmdjlR7vKrmFmAItlg/a5/LR9I/kNGMpXkkV2YL/qiNW2V1 XfgWab3hof4XzpG+ujafoNtB7pOnxcwl4Z+xqjkFerEH891zhOugxKfLjdpovol4As6F 7w2TrTNkTnE4ls35kdgm1XRekzRQpdds08nIPXH3aX9TMkLh4pC2FIK2PTqKbzHjnWFt CrDGykSrRl/Pqgf1lXcBdZh+3QxOu7iOSDLSFqAsVtIbiHbIdfuk4pOLoQ7r2G4nC6Q9 t+Resins4erU5SW3ewqG9/o6NEPi0mkjANZKlc4xfhXnMEQsr2Yb9RrzHYVEWk1ZO/+e E+gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882072; x=1705486872; 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=LfuH3wSlm6aDB+5MQe7gxyw0I5hRCPtFyKG+AY6rcK0=; b=YpPrWkoZDw39z2/xqnadXhrKHRVtZabANUFr9zuEiIy7csLwaIOZpn8qg02mY4cp/Y eEretjUDDOr/kec8/yI8eExkhgAJ1bAoZC4RcW153RCIbBLXqJ7XcwfmJKvKwnUPTI4F cPJIK4Dcm9UufJw1gH3568bocn4637tmZT8oiIfVjq91mj2Adg82rfiG19H418xYVLxM GicyTBrDBf0MBKDtkIq04LW8FTscGD3PSvLQem/i9sEaqJkVfZRg98xPcBic49IdFiz6 wcKmOHzs16AKO1E3i+hyZvRRQJM5CwP++mN4xQ7Xx/Ii7lVOY1u+1w5lO80uxejsVBNw nLvg== X-Gm-Message-State: AOJu0Yxv9Fc+9smLCtNB/KM5ikg7tUKKf1NrzIvFSfA5de5r2QF+kdz5 cn0UA+l2x7gJM85xsvkXVCOMmEB4ZEkYsQ== X-Google-Smtp-Source: AGHT+IHxCH+x8Bd49h96aENkSSiu3NcMtRR69yY6qu1FUYAozJ3aiG1NexaAB58eotSyJt97Xv++1Q== X-Received: by 2002:a05:600c:5390:b0:40e:3f37:d893 with SMTP id hg16-20020a05600c539000b0040e3f37d893mr457342wmb.17.1704882072241; Wed, 10 Jan 2024 02:21:12 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:11 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 06/18] tty: serial: samsung: use u32 for register interactions Date: Wed, 10 Jan 2024 10:20:50 +0000 Message-ID: <20240110102102.61587-7-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 All registers of the IP have 32 bits. Use u32 variables when reading or writing from/to the registers. The purpose of those variables becomes clearer. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 79 ++++++++++++++++---------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index b8b71a0109ea..d5f9bec24b8e 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -199,7 +199,7 @@ static void wr_reg(const struct uart_port *port, u32 reg, u32 val) /* Byte-order aware bit setting/clearing functions. */ static inline void s3c24xx_set_bit(const struct uart_port *port, int idx, - unsigned int reg) + u32 reg) { unsigned long flags; u32 val; @@ -212,7 +212,7 @@ static inline void s3c24xx_set_bit(const struct uart_port *port, int idx, } static inline void s3c24xx_clear_bit(const struct uart_port *port, int idx, - unsigned int reg) + u32 reg) { unsigned long flags; u32 val; @@ -245,8 +245,8 @@ static void s3c24xx_serial_rx_enable(struct uart_port *port) { struct s3c24xx_uart_port *ourport = to_ourport(port); unsigned long flags; - unsigned int ucon, ufcon; int count = 10000; + u32 ucon, ufcon; uart_port_lock_irqsave(port, &flags); @@ -269,7 +269,7 @@ static void s3c24xx_serial_rx_disable(struct uart_port *port) { struct s3c24xx_uart_port *ourport = to_ourport(port); unsigned long flags; - unsigned int ucon; + u32 ucon; uart_port_lock_irqsave(port, &flags); @@ -591,7 +591,7 @@ static inline const struct s3c2410_uartcfg } static int s3c24xx_serial_rx_fifocnt(const struct s3c24xx_uart_port *ourport, - unsigned long ufstat) + u32 ufstat) { const struct s3c24xx_uart_info *info = ourport->info; @@ -663,7 +663,7 @@ static void s3c64xx_start_rx_dma(struct s3c24xx_uart_port *ourport) static void enable_rx_dma(struct s3c24xx_uart_port *ourport) { struct uart_port *port = &ourport->port; - unsigned int ucon; + u32 ucon; /* set Rx mode to DMA mode */ ucon = rd_regl(port, S3C2410_UCON); @@ -686,7 +686,7 @@ static void enable_rx_dma(struct s3c24xx_uart_port *ourport) static void enable_rx_pio(struct s3c24xx_uart_port *ourport) { struct uart_port *port = &ourport->port; - unsigned int ucon; + u32 ucon; /* set Rx mode to DMA mode */ ucon = rd_regl(port, S3C2410_UCON); @@ -711,13 +711,14 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport); static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id) { - unsigned int utrstat, received; struct s3c24xx_uart_port *ourport = dev_id; struct uart_port *port = &ourport->port; struct s3c24xx_uart_dma *dma = ourport->dma; struct tty_struct *tty = tty_port_tty_get(&ourport->port.state->port); struct tty_port *t = &port->state->port; struct dma_tx_state state; + unsigned int received; + u32 utrstat; utrstat = rd_regl(port, S3C2410_UTRSTAT); rd_regl(port, S3C2410_UFSTAT); @@ -759,9 +760,9 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id) static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport) { struct uart_port *port = &ourport->port; - unsigned int ufcon, ufstat, uerstat; unsigned int fifocnt = 0; int max_count = port->fifosize; + u32 ufcon, ufstat, uerstat; u8 ch, flag; while (max_count-- > 0) { @@ -945,7 +946,7 @@ static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id) { const struct s3c24xx_uart_port *ourport = id; const struct uart_port *port = &ourport->port; - unsigned int pend = rd_regl(port, S3C64XX_UINTP); + u32 pend = rd_regl(port, S3C64XX_UINTP); irqreturn_t ret = IRQ_HANDLED; if (pend & S3C64XX_UINTM_RXD_MSK) { @@ -964,7 +965,7 @@ static irqreturn_t apple_serial_handle_irq(int irq, void *id) { const struct s3c24xx_uart_port *ourport = id; const struct uart_port *port = &ourport->port; - unsigned int pend = rd_regl(port, S3C2410_UTRSTAT); + u32 pend = rd_regl(port, S3C2410_UTRSTAT); irqreturn_t ret = IRQ_NONE; if (pend & (APPLE_S5L_UTRSTAT_RXTHRESH | APPLE_S5L_UTRSTAT_RXTO)) { @@ -983,8 +984,8 @@ static irqreturn_t apple_serial_handle_irq(int irq, void *id) static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - unsigned long ufstat = rd_regl(port, S3C2410_UFSTAT); - unsigned long ufcon = rd_regl(port, S3C2410_UFCON); + u32 ufstat = rd_regl(port, S3C2410_UFSTAT); + u32 ufcon = rd_regl(port, S3C2410_UFCON); if (ufcon & S3C2410_UFCON_FIFOMODE) { if ((ufstat & info->tx_fifomask) != 0 || @@ -1000,7 +1001,7 @@ static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port) /* no modem control lines */ static unsigned int s3c24xx_serial_get_mctrl(struct uart_port *port) { - unsigned int umstat = rd_reg(port, S3C2410_UMSTAT); + u32 umstat = rd_reg(port, S3C2410_UMSTAT); if (umstat & S3C2410_UMSTAT_CTS) return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS; @@ -1010,8 +1011,8 @@ static unsigned int s3c24xx_serial_get_mctrl(struct uart_port *port) static void s3c24xx_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) { - unsigned int umcon = rd_regl(port, S3C2410_UMCON); - unsigned int ucon = rd_regl(port, S3C2410_UCON); + u32 umcon = rd_regl(port, S3C2410_UMCON); + u32 ucon = rd_regl(port, S3C2410_UCON); if (mctrl & TIOCM_RTS) umcon |= S3C2410_UMCOM_RTS_LOW; @@ -1031,7 +1032,7 @@ static void s3c24xx_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) static void s3c24xx_serial_break_ctl(struct uart_port *port, int break_state) { unsigned long flags; - unsigned int ucon; + u32 ucon; uart_port_lock_irqsave(port, &flags); @@ -1189,7 +1190,7 @@ static void apple_s5l_serial_shutdown(struct uart_port *port) { struct s3c24xx_uart_port *ourport = to_ourport(port); - unsigned int ucon; + u32 ucon; ucon = rd_regl(port, S3C2410_UCON); ucon &= ~(APPLE_S5L_UCON_TXTHRESH_ENA_MSK | @@ -1215,7 +1216,7 @@ static int s3c64xx_serial_startup(struct uart_port *port) { struct s3c24xx_uart_port *ourport = to_ourport(port); unsigned long flags; - unsigned int ufcon; + u32 ufcon; int ret; wr_regl(port, S3C64XX_UINTM, 0xf); @@ -1260,7 +1261,7 @@ static int apple_s5l_serial_startup(struct uart_port *port) { struct s3c24xx_uart_port *ourport = to_ourport(port); unsigned long flags; - unsigned int ufcon; + u32 ufcon; int ret; wr_regl(port, S3C2410_UTRSTAT, APPLE_S5L_UTRSTAT_ALL_FLAGS); @@ -1345,7 +1346,7 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, static inline int s3c24xx_serial_getsource(struct uart_port *port) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - unsigned int ucon; + u32 ucon; if (info->num_clks == 1) return 0; @@ -1359,7 +1360,7 @@ static void s3c24xx_serial_setsource(struct uart_port *port, unsigned int clk_sel) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - unsigned int ucon; + u32 ucon; if (info->num_clks == 1) return; @@ -1476,9 +1477,8 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, struct clk *clk = ERR_PTR(-EINVAL); unsigned long flags; unsigned int baud, quot, clk_sel = 0; - unsigned int ulcon; - unsigned int umcon; unsigned int udivslot = 0; + u32 ulcon, umcon; /* * We don't support modem control lines. @@ -1760,7 +1760,7 @@ static void s3c24xx_serial_resetport(struct uart_port *port, const struct s3c2410_uartcfg *cfg) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - unsigned long ucon = rd_regl(port, S3C2410_UCON); + u32 ucon = rd_regl(port, S3C2410_UCON); ucon &= (info->clksel_mask | info->ucon_mask); wr_regl(port, S3C2410_UCON, ucon | cfg->ucon); @@ -1906,7 +1906,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, wr_regl(port, S3C64XX_UINTSP, 0xf); break; case TYPE_APPLE_S5L: { - unsigned int ucon; + u32 ucon; ucon = rd_regl(port, S3C2410_UCON); ucon &= ~(APPLE_S5L_UCON_TXTHRESH_ENA_MSK | @@ -2110,7 +2110,7 @@ static int s3c24xx_serial_resume_noirq(struct device *dev) /* restore IRQ mask */ switch (ourport->info->type) { case TYPE_S3C6400: { - unsigned int uintm = 0xf; + u32 uintm = 0xf; if (ourport->tx_enabled) uintm &= ~S3C64XX_UINTM_TXD_MSK; @@ -2126,7 +2126,7 @@ static int s3c24xx_serial_resume_noirq(struct device *dev) break; } case TYPE_APPLE_S5L: { - unsigned int ucon; + u32 ucon; int ret; ret = clk_prepare_enable(ourport->clk); @@ -2188,10 +2188,10 @@ static const struct dev_pm_ops s3c24xx_serial_pm_ops = { static struct uart_port *cons_uart; static int -s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon) +s3c24xx_serial_console_txrdy(struct uart_port *port, u32 ufcon) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - unsigned long ufstat, utrstat; + u32 ufstat, utrstat; if (ufcon & S3C2410_UFCON_FIFOMODE) { /* fifo mode - check amount of data in fifo registers... */ @@ -2207,7 +2207,7 @@ s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon) } static bool -s3c24xx_port_configured(unsigned int ucon) +s3c24xx_port_configured(u32 ucon) { /* consider the serial port configured if the tx/rx mode set */ return (ucon & 0xf) != 0; @@ -2222,7 +2222,7 @@ s3c24xx_port_configured(unsigned int ucon) static int s3c24xx_serial_get_poll_char(struct uart_port *port) { const struct s3c24xx_uart_port *ourport = to_ourport(port); - unsigned int ufstat; + u32 ufstat; ufstat = rd_regl(port, S3C2410_UFSTAT); if (s3c24xx_serial_rx_fifocnt(ourport, ufstat) == 0) @@ -2234,8 +2234,8 @@ static int s3c24xx_serial_get_poll_char(struct uart_port *port) static void s3c24xx_serial_put_poll_char(struct uart_port *port, unsigned char c) { - unsigned int ufcon = rd_regl(port, S3C2410_UFCON); - unsigned int ucon = rd_regl(port, S3C2410_UCON); + u32 ufcon = rd_regl(port, S3C2410_UFCON); + u32 ucon = rd_regl(port, S3C2410_UCON); /* not possible to xmit on unconfigured port */ if (!s3c24xx_port_configured(ucon)) @@ -2251,7 +2251,7 @@ static void s3c24xx_serial_put_poll_char(struct uart_port *port, static void s3c24xx_serial_console_putchar(struct uart_port *port, unsigned char ch) { - unsigned int ufcon = rd_regl(port, S3C2410_UFCON); + u32 ufcon = rd_regl(port, S3C2410_UFCON); while (!s3c24xx_serial_console_txrdy(port, ufcon)) cpu_relax(); @@ -2262,7 +2262,7 @@ static void s3c24xx_serial_console_write(struct console *co, const char *s, unsigned int count) { - unsigned int ucon = rd_regl(cons_uart, S3C2410_UCON); + u32 ucon = rd_regl(cons_uart, S3C2410_UCON); unsigned long flags; bool locked = true; @@ -2289,11 +2289,9 @@ s3c24xx_serial_get_options(struct uart_port *port, int *baud, int *parity, int *bits) { struct clk *clk; - unsigned int ulcon; - unsigned int ucon; - unsigned int ubrdiv; unsigned long rate; unsigned int clk_sel; + u32 ulcon, ucon, ubrdiv; char clk_name[MAX_CLK_NAME_LENGTH]; ulcon = rd_regl(port, S3C2410_ULCON); @@ -2743,7 +2741,8 @@ static int samsung_early_read(struct console *con, char *s, unsigned int n) { struct earlycon_device *dev = con->data; const struct samsung_early_console_data *data = dev->port.private_data; - int ch, ufstat, num_read = 0; + int num_read = 0; + u32 ch, ufstat; while (num_read < n) { ufstat = rd_regl(&dev->port, S3C2410_UFSTAT); From patchwork Wed Jan 10 10:20:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761704 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 CA55240BEF for ; Wed, 10 Jan 2024 10:21:14 +0000 (UTC) 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="FYBshhb/" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-40e43e48a16so36607835e9.2 for ; Wed, 10 Jan 2024 02:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882073; x=1705486873; darn=vger.kernel.org; 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=mwqnqS/wycxZAhr2uerf+qQVYpnKiVk2U9Lnh+3LXKA=; b=FYBshhb/YFgpGgyC0oFjH3SM7b/iaSx6vx50RqqOq6x0orsdHw54YLi1vwuMLWub6U oO3oP3A1hC7RPucRt7tTtFJxBPldQr8gAnUhy1RQYE/uouf/UpIK6w5o9VjzvOSecqSI gGA8cbBTZ/Il8dAE//cZSq7CDB/ws5/YZ7iQu5YQX9KVkd88Bo6Ul2puSJ7ZAWAKdpOx kbEnCGZp+7f0Y5uyQBOo1UoAjvW9XD/NvrATBim4X6zxd2EK/kcx1T0HNkYfco/FOtDX F1a9M8UX8a3/acHKtLgE/Dc2oxCKZ17OU3bSPyj8maRJHMZNT/TkzVTn28vDgiTKR0PO Rc4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882073; x=1705486873; 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=mwqnqS/wycxZAhr2uerf+qQVYpnKiVk2U9Lnh+3LXKA=; b=TXF/GrGor2YWeGS7sVZjTUQS8US0hamfxe5eOfmQ1UPOaq6H7npHM9Q5GKs4XRsW3P LSzHbml0MF+MxKNBXPO6MpFj4SKaX4xQWWMeTuuy9hTznKzDWXojg44N9ATGu76Fv8O9 WKnHQDvESvTJ0oIRPhcNsXy9hQP4E0jbQBNA5FH6iTowM3IBK7TP89o/OAETBlQlJjCP 2O0a0MXgbWjUehsbzaQqY8IuO3FmTez8k1d3X7zURmP4dDo91B0DqGXqs2s37g5cHCc2 auuldgfQpHjlO+5VMOmQSIFivFmfdP9eCtq+HUneEkdSh32JnDDOKjfodSgNZwrQ2c9q XC3Q== X-Gm-Message-State: AOJu0YyO51kZUTXJuHlLUpmVVETi6lXsnSK0rfmZbvwAVN0ADprjUbXr RArpWv/GyWAN56r4ZzlFuduJNrTVM+VHVw== X-Google-Smtp-Source: AGHT+IGcQBbhMHK+EKOMon1hp4+KGJv3InwLXWLO1SrdmS31XEWMZkMTbvJjozVPLu3hLFnAqJN0FA== X-Received: by 2002:a05:600c:519b:b0:40e:49b2:2c9e with SMTP id fa27-20020a05600c519b00b0040e49b22c9emr439607wmb.34.1704882073274; Wed, 10 Jan 2024 02:21:13 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:12 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 07/18] tty: serial: samsung: remove braces on single statement block Date: Wed, 10 Jan 2024 10:20:51 +0000 Message-ID: <20240110102102.61587-8-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Braces {} are not necessary for single statement blocks. Remove braces on single statement block. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index d5f9bec24b8e..11ae3a1dcdc3 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2062,9 +2062,8 @@ static void s3c24xx_serial_remove(struct platform_device *dev) { struct uart_port *port = s3c24xx_dev_to_port(&dev->dev); - if (port) { + if (port) uart_remove_one_port(&s3c24xx_uart_drv, port); - } uart_unregister_driver(&s3c24xx_uart_drv); } From patchwork Wed Jan 10 10:20:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762157 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 C11C641233 for ; Wed, 10 Jan 2024 10:21:15 +0000 (UTC) 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="L6VpBB9c" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40e4f692d06so9990385e9.1 for ; Wed, 10 Jan 2024 02:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882074; x=1705486874; darn=vger.kernel.org; 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=uJiSbOx+y9kAD9nYaP7HZ6jgQVEvK0yZ8eFJjkZeaz4=; b=L6VpBB9cF0a6G4w3wFJSHiZmBJMqa/hdSG0umDIbKLKyjOIRDkvUG8qQDCDgXSURCj 6kUE1gvDRIxWsKtzmunBVrhJuTKrhEnTlyfLZRupIPYTKDcab0ZIgDSLf5+96y2ljsDs 5ylv14ztav+JB7Q0JEyQgfxRL/isV7rIJxp8Zen7UukbRAdmpXHoyKD0BDN+VaLR0N2K S8mJT8fx2JF6VC8Gn+Sq6dSPsafef2Fi7J89FTpZednqtlEkQGB60Ke0g6aSrk9EvObE 8r6ARQtx3ukckfVFhdw7vza83eiNWDtmiIfzmudak0SHkii9TfLTBsm0dsFjPekqhjk6 6fiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882074; x=1705486874; 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=uJiSbOx+y9kAD9nYaP7HZ6jgQVEvK0yZ8eFJjkZeaz4=; b=u4ARLJ2aGc3L/CVp1JLqUQguSUPOJsK1GxeFbqKIMOmOZHNNKA2oaATNB4nydbDa49 Me1jNNhEBf5Mwz6QA/RBBxBgt46fK3SEUzvEajuniKULhzze9gbksD69tHS+Zyzlafhg ajy4v4dad73nNGDi7sWyJC67O5IXwh8SyeLMidaJ8TmIfZSgjcNCe/e763Ma+JBoynLB 1VQvc6mCJoGf4voyBsgwktPwqDd7A9p9nqZhCaGO/T6igFMpiAQs8d1EcZJ4Uu+Wz50z MFPcozkxjJCxIoP4ssX1Ztu+PyFhUAVbvEeIrSMo/CyEwcLp1iupjSvpNrLQg37DYkjt go4Q== X-Gm-Message-State: AOJu0Yymh6+0RUEX8Q7r4SIW8jgL3OLnKRqU/Cl4s+RjGkg8BHw3JR3+ MySbI38egGXXIk4CGkGN3sd01eR78sANzg== X-Google-Smtp-Source: AGHT+IF1VVx7NZ4+jYpZe5nZJn+QtrY9rCxcI5pj277eW+yQK3URG35FfJHed1DogBS4MlQyh203yw== X-Received: by 2002:a05:600c:3b97:b0:40d:94ba:cb8c with SMTP id n23-20020a05600c3b9700b0040d94bacb8cmr489208wms.109.1704882074171; Wed, 10 Jan 2024 02:21:14 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:13 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 08/18] tty: serial: samsung: move open brace '{' on the next line Date: Wed, 10 Jan 2024 10:20:52 +0000 Message-ID: <20240110102102.61587-9-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Move open brace '{' following function definition on the next line. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 11ae3a1dcdc3..b9d1ef67468c 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1740,7 +1740,8 @@ static struct uart_driver s3c24xx_uart_drv = { static struct s3c24xx_uart_port s3c24xx_serial_ports[UART_NR]; -static void s3c24xx_serial_init_port_default(int index) { +static void s3c24xx_serial_init_port_default(int index) +{ struct uart_port *port = &s3c24xx_serial_ports[index].port; spin_lock_init(&port->lock); From patchwork Wed Jan 10 10:20:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761703 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 781A544398 for ; Wed, 10 Jan 2024 10:21:16 +0000 (UTC) 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="jQxehS3R" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-40e57018e92so3501715e9.2 for ; Wed, 10 Jan 2024 02:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882074; x=1705486874; darn=vger.kernel.org; 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=XpLNRFI7Q+nWhYT1sc52rnbfGdxVUedlk9wvDQAxZZo=; b=jQxehS3RRNio84dia/qvQRDy5JrvR4eRjQKt6wOkk4cTI6ggjkRMh4X6cz8rZMxYeO muTCD/V+/qb5DmRYW76XLhZVPsezKMzziD4OP8tCoWlXtROL2YVi90JY2AnxrIDsrde+ AGOWBYRfeo5jWmfDZ5nVespzCP08avUTgkixBXx8aS/vx4z1qvhpk/jVS/NTcSOkDffX aQJgRriBeMLo693a7UC9PzVrjKaw/bE4Cu9zh8V0xBSrssfeSKzmjXU2ZQrgJ2p/BF4H k+erZ9rBDwxXpWymcs2ug4E5nS3WQG/eOSl4fEdwTHEg7vKHxylpSSzY8o2m8GPPyAan nwOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882074; x=1705486874; 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=XpLNRFI7Q+nWhYT1sc52rnbfGdxVUedlk9wvDQAxZZo=; b=ghF5015e6Rl9reUJsIHzYbNWkydPBw1R7XLfmxVmIZvYXXoB40g/BIODyPK+WMo/KW LRgCZnplusLH6jUQG82KDecvtL3pBpxVZBVYpGWwJm6OHArqdysFpnEfdBrvfOIetICv 1dbdd7ynAw42g1kt4wSxVUcmdpwPsPC7XPOP8Ks3Snz350RmF4S2shBWFx6QEEKccw9J O4rV3TqV4oivL9C+USv1m67Hz3JvXo4DHF3mA8VBsiHpsuxq4fUxZkXudhfwHx2q5b1/ 8U2hDBukpZ+LHyNqGVNCd4CuMhhk/SpG1Tn8TVUvr8nWzcoonmxmsN+oyLLJN/Wp9IX7 KDWA== X-Gm-Message-State: AOJu0Yys2B0vuR/y0aUFaVJLPqZZ6jl/1rIMB1aYbCRLVnirCVfjADdx Jbt7Z6cmHG99CBjXDdmTlwcJ06F7H1gjQw2ZWyPD2xTPK/RsyA== X-Google-Smtp-Source: AGHT+IGUYbHFbchWngawNO9+st/Bnrd1dMjCfFRd06ZBdJ7tUXEyUMFqYOKHkId3ObbsvmgEoSrIWQ== X-Received: by 2002:a05:600c:2195:b0:40e:42ce:1b67 with SMTP id e21-20020a05600c219500b0040e42ce1b67mr192335wme.246.1704882074792; Wed, 10 Jan 2024 02:21:14 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:14 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 09/18] tty: serial: samsung: drop superfluous comment Date: Wed, 10 Jan 2024 10:20:53 +0000 Message-ID: <20240110102102.61587-10-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The comment brings no benefit as we can already see from the method's name, ``s3c24xx_serial_pm``, that it deals with power management. Drop the superfluous comment. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index b9d1ef67468c..90c49197efc7 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1296,8 +1296,6 @@ static int apple_s5l_serial_startup(struct uart_port *port) return ret; } -/* power power management control */ - static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, unsigned int old) { From patchwork Wed Jan 10 10:20:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762156 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 2A9D246422 for ; Wed, 10 Jan 2024 10:21:16 +0000 (UTC) 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="DsGBHJmk" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40e5770d34fso3221425e9.3 for ; Wed, 10 Jan 2024 02:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882075; x=1705486875; darn=vger.kernel.org; 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=2v2KRYXA+keXRfq45rf7VwhlRc8wCU8IH+wWuas1Yt0=; b=DsGBHJmkSTXlmYapX+3mNu5VB00VVSMxNr1PV05C6V1gK1AwSCNbqdpd5Tb9Hbouup +UkgeU+eGgoFgmjL2piF81SbxHtJ3gzQ0Klbbq5V1EVQcykukmnqAAN+XxI1zQ1FebUg LXxXY9n+WeCNccYuXcBSwZ81stm2RareyoppqGLi7EX0BMN4rxQCBYOQffe5AqGH5iOh lUZ64P6zM9lDrFXNROnZEog/zDlArIgBjUvFmhTILv2wKeTKMsqP4VnK+b+tpXG4MFIV wNZG2uW394vYclC232qMoEYfJzLn5+N1f4Cx1Tz6zTZJhqOMW4Zo1K36+RDdForSaz5f K2Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882075; x=1705486875; 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=2v2KRYXA+keXRfq45rf7VwhlRc8wCU8IH+wWuas1Yt0=; b=Q98GZQfWIVS63QT+BBIcsaxqko4AxjGqlNvlLeBGdURH63d/GId4MHzfrOfOpa71kh 3aUXz2fyplz0brEHdxznb4SWa402UnjpNew1SVOHXuqElzezsCZiIeS2LeY8w5x288v9 BA1rHOl+dVYeWYvzVsFOWBgjMFljuBe8Kh+1gq3DU3E7Msh1QAMMQpnKW9jxc9slxeTj Byjt5p6tDk/yYj7aP6DaMaqzJDA5dd8PXbPpC6fFfjuGt2iWDoihp0ilfNO+db/Gmp/D wHBrpy9zvJqO4iCYbjTk7eZMZk0bHNH1cV15dnPnQGR1kLUsZiTPNXPY2eUYS3w6ut2s JV3g== X-Gm-Message-State: AOJu0YxXE9AKldEMh5t4+osDg12l7CEeaXAJHWZhZsrmtvcr9fQLD8Ju idsrzYFw273guegwXqmJdvAnmPv5aedIow== X-Google-Smtp-Source: AGHT+IGLeDeKQhsCLP5+R4lOabowbyfiHLzCDX82nYtvoNIupA5AR/1fHezyqisxDb7TJ9bwCXPMhA== X-Received: by 2002:a05:600c:1d95:b0:40e:4084:b948 with SMTP id p21-20020a05600c1d9500b0040e4084b948mr414155wms.94.1704882075513; Wed, 10 Jan 2024 02:21:15 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:15 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 10/18] tty: serial: samsung: make max_count unsigned int Date: Wed, 10 Jan 2024 10:20:54 +0000 Message-ID: <20240110102102.61587-11-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 ``max_count`` negative values are not used. Since ``port->fifosize`` is an unsigned int, make ``max_count`` the same. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 90c49197efc7..dbbe6b8e3ceb 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -760,8 +760,8 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id) static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport) { struct uart_port *port = &ourport->port; + unsigned int max_count = port->fifosize; unsigned int fifocnt = 0; - int max_count = port->fifosize; u32 ufcon, ufstat, uerstat; u8 ch, flag; From patchwork Wed Jan 10 10:20:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761702 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 51EC54776E for ; Wed, 10 Jan 2024 10:21:18 +0000 (UTC) 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="k7Vb1n5F" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2cc7d2c1ff0so45031461fa.3 for ; Wed, 10 Jan 2024 02:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882076; x=1705486876; darn=vger.kernel.org; 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=nZqqbWPwYwhLrpcSvI/iFs7tmVPH9J4dNpzf8ql04hU=; b=k7Vb1n5F2SEPXIQXisAakST2klRHzgVl6s9Cikn8ta66M4l/aiA/96Hc0Ae+BeCAlq DwvsfkTHeb4HbgQf8UWBTlxG/JikGHbDYYzBZzvFRKlTKYehzCrFKVPcyGpxWAMsWrVq 6zBbTyNY9jiXUwhWOOfua40wCqTuot1ba8q6OAnpZrG3cAxt8/Z1GJ8sizCXIBYcZD4w qopt13AtQQMbHjv438CRroXDbp/0uiJ4S/iB6VBVWygoAMk/DtngrasklYAcqkK5TMj4 xozVhdLF4jfXIQkp4TX3mXCxHFLEcQ3Wtg5VHMX+tdm6IOR7yPa1GV9n86n4IK+9z/4U 6f3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882076; x=1705486876; 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=nZqqbWPwYwhLrpcSvI/iFs7tmVPH9J4dNpzf8ql04hU=; b=Ow2Uhlz+Ru9q/sSwAapf6V68mgNjgyfuO426LUOzGFjZweIlAVjyeGgjS4sAsk41+R IuveOduyAfL2s+fSKvpoKf3NlC3xdXbvLujHAJgZZzzmIGmseX4fR7qOCjHcbvsDVukG 9DZyGtdG6dFWvxfnN7y0k+jvjDX3C58DS9WjI9Wxq/YgGoY8VWK+VT4aFY5emlNvnIN4 2DQFR+Jwpa7L1OfTu5NOPAl2m7bPAJ820E3PHZ06s1uDxi8SF7n6wHkgeSxgG8nnpeJ5 ME3P9jIdt5WSyidTSAFGG54w7u0nu7fafr9BjqeXpIiIU0CUDco1KOefXEEfQ46thqt9 6B3w== X-Gm-Message-State: AOJu0Yy1fMoR399yO9hj5xbXsBxmGWsY9oyMlgaS++NyZtQqVXnLL0jR 0JorTQfCzUmQpNQlhoLlz8doQ3ZiXjFmPg== X-Google-Smtp-Source: AGHT+IHUDinlorp0iKAoAamRhoFsnXh8pnrCQea2LbnsIeK75SvmBljlO0KL8/orqVUjuZxufpV6mQ== X-Received: by 2002:ac2:4554:0:b0:50e:8137:9a10 with SMTP id j20-20020ac24554000000b0050e81379a10mr307722lfm.129.1704882076456; Wed, 10 Jan 2024 02:21:16 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:15 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 11/18] tty: serial: samsung: don't compare with zero an if (bitwise expression) Date: Wed, 10 Jan 2024 10:20:55 +0000 Message-ID: <20240110102102.61587-12-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since an if tests the numeric value of an expression, certain coding shortcuts can be used. The most obvious one is writing if (expression) instead of if (expression != 0) Since our case is a bitwise expression, it's more natural and clear to use the ``if (expression)`` shortcut. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index dbbe6b8e3ceb..f2413da14b1d 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -988,8 +988,7 @@ static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port) u32 ufcon = rd_regl(port, S3C2410_UFCON); if (ufcon & S3C2410_UFCON_FIFOMODE) { - if ((ufstat & info->tx_fifomask) != 0 || - (ufstat & info->tx_fifofull)) + if ((ufstat & info->tx_fifomask) || (ufstat & info->tx_fifofull)) return 0; return 1; From patchwork Wed Jan 10 10:20:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762155 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 D4A3847796 for ; Wed, 10 Jan 2024 10:21:18 +0000 (UTC) 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="XiaxeP1F" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-40e5521dab6so6894635e9.1 for ; Wed, 10 Jan 2024 02:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882077; x=1705486877; darn=vger.kernel.org; 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=X4OrxluJS1Dxt0QsygYV4JA7ss0pHdXLycYpqP8S/nY=; b=XiaxeP1F/NrMhXsnnLE7Hr2pHbh298NywDAybFLZmrWm632DevmscaQ+QMWERiOvby XGtbUetrkmiFlSiM9wLA+UqdgnLXsroAnsJ21jjBuU2Ko7CuZVb5Fgb2MK5+nVpy9ujQ e1tZzL41uyarHCe9d3kcphhPjfUS9jVf4xVwB8tkaLka2kquTlbixIzFt5IGfXJIFJ// 8Poofs3EJCBg5Adu4UQOJdqaO/rpp3YNlgqLIDQucmev/hWnrO8McsoB9jepyfvruQwh A9xacRXOOsDENxKLPzwwjBxhLLveuh4ALxrANCMAYSw1pbSmgyqsESohQmRWjJ3G7alR DfFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882077; x=1705486877; 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=X4OrxluJS1Dxt0QsygYV4JA7ss0pHdXLycYpqP8S/nY=; b=hhfYf5dG+jY1K23A5eRPO2K49lzA2HMDlPUzV6Ciszb5L2zbJ/mI9W41tq9rgM0hjj 4GHpzbhg/eeDD/J6gBkR+GqVpGfrXRLkmla0s3hG0IguIrbxe2Cf3/aW1cg7HRal+dRW WVKerkCL2obbNPhEOnHZ2R86WZjabzeFACumkx4DWG8QeOYMmIzbTXktcHX8h/tqgdtN BGwKHnjmevrrRqzriKxVklCX/Xkqd/K2MBrisSCNwLdWAmJwB6gv9SEsk4Ezd0V2MFoE L7crh0jfJZ1ScV+30SwosfPWoNv8NgjHXblUCf3wL0gG2UgHfFWqzpumlTYR310fuiCQ grrQ== X-Gm-Message-State: AOJu0YxQZf1Tl63l2/Vk4DYWACd65KjJLmh3CyiLskAV65SSCPFc4Vfl y0XxV1Fuy3Ip76qapV1CBIkoNloVf7EEng== X-Google-Smtp-Source: AGHT+IH2pHpqQ2IvcL8mLqW4mDIBGBWO/XFWarVigmK91FlJxQn+wyWXYGgkF4J4hdXMLY2WPdpvQQ== X-Received: by 2002:a05:600c:511e:b0:40e:42b4:23b6 with SMTP id o30-20020a05600c511e00b0040e42b423b6mr498393wms.55.1704882077261; Wed, 10 Jan 2024 02:21:17 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:16 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 12/18] tty: serial: samsung: use TIOCSER_TEMT for tx_empty() Date: Wed, 10 Jan 2024 10:20:56 +0000 Message-ID: <20240110102102.61587-13-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core expects for tx_empty() either TIOCSER_TEMT when the tx is empty or 0 otherwise. Respect the core and use TIOCSER_TEMT. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index f2413da14b1d..46fba70f3d77 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -990,11 +990,10 @@ static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port) if (ufcon & S3C2410_UFCON_FIFOMODE) { if ((ufstat & info->tx_fifomask) || (ufstat & info->tx_fifofull)) return 0; - - return 1; + return TIOCSER_TEMT; } - return s3c24xx_serial_txempty_nofifo(port); + return s3c24xx_serial_txempty_nofifo(port) ? TIOCSER_TEMT : 0; } /* no modem control lines */ From patchwork Wed Jan 10 10:20:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761701 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 AD84547A6A for ; Wed, 10 Jan 2024 10:21:19 +0000 (UTC) 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="yYSveuyM" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40d87df95ddso41204205e9.0 for ; Wed, 10 Jan 2024 02:21:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882078; x=1705486878; darn=vger.kernel.org; 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=zUZkD3RxZyomRUtnLq1bNhUO9I/uygo4/DAHV/FeOS0=; b=yYSveuyMs5dIyP/53U1mj1nZF+w3Z5vq/5XOV2by6TdQiU6pvh/hhKxfWqAylgUOMm KF/NC+SVesNplooqw5r8RnYkIwQOwpvzmU+cI4vl83fGKi4YqgZ8GYaLUm382PqJT05Z G+FWWGFcl4Wg2qcNVYqFaF5UCAwQnbl579KGCTQpuuBVBGq52zqIHiudcZ71xW5atKqO 1xiZelrkBcF2JjUrjgRYHXcm/hOqWyzVT1afhB92FgZYuyL4IKuWI9w8+enrNqyfLG3C uziI49QNg7DgrKIsi7zNem1j6k8iEvYoMJTzFTvrjjSfMNJGum73aytwRGZtWE7ATzS6 S3Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882078; x=1705486878; 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=zUZkD3RxZyomRUtnLq1bNhUO9I/uygo4/DAHV/FeOS0=; b=u3JhuLXqrjDztd3ZdA0mIni1mgLL8GvolAHyDR3cwXMvjbFSXXm17M20NtSbjODzgp sDA5ffTdNnU6CHDDLpl/rthIKWcdVU85aDbTfCWJVVpgDUsfkADA0JMn6beRJELwnc18 HtaMqpaKVdbBYtDq2ZfYswKECXPN0ssyB73s86CFZnww/87vwZXMIyJemWX5e/WF8bEz HZwgqtwYl5w8ed45ptinrQ8l9HpICL4W3cftB71JimwMKZ3PDABr9iiw2hDaAD7mAZqz of1telWDJlwC520AB2IHiu8Sy8XTKnefgj8EPIGNJEcDH4FHVtx7shDuGlPn4KRbqzQY uaGQ== X-Gm-Message-State: AOJu0YwLPw5IX1jTglVApzdXCz6I28u0Xy43lfc06QnhhU1U+vWvFS4y ATHBJlq5sQOc8zc/Q2bEe1OW5oXKN4nS2w== X-Google-Smtp-Source: AGHT+IGYLsOFrNdKSYUGQJjzwSLK/RYL6+X1/WFxwE+OfMrXS+TWExfIax6TS45wnteKjsb5eI8ulg== X-Received: by 2002:a05:600c:45d2:b0:40d:7c1a:cce4 with SMTP id s18-20020a05600c45d200b0040d7c1acce4mr208326wmo.213.1704882078025; Wed, 10 Jan 2024 02:21:18 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:17 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 13/18] tty: serial: samsung: return bool for s3c24xx_serial_txempty_nofifo() Date: Wed, 10 Jan 2024 10:20:57 +0000 Message-ID: <20240110102102.61587-14-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 s3c24xx_serial_txempty_nofifo() returned either 0 or BIT(2), which is counterintuitive. Make the method return bool, and return true when TX is empty and false otherwise. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 46fba70f3d77..63e993bed296 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -236,9 +236,9 @@ static inline const char *s3c24xx_serial_portname(const struct uart_port *port) return to_platform_device(port->dev)->name; } -static int s3c24xx_serial_txempty_nofifo(const struct uart_port *port) +static bool s3c24xx_serial_txempty_nofifo(const struct uart_port *port) { - return rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE; + return !!(rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE); } static void s3c24xx_serial_rx_enable(struct uart_port *port) @@ -782,7 +782,7 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport) ch = rd_reg(port, S3C2410_URXH); if (port->flags & UPF_CONS_FLOW) { - int txe = s3c24xx_serial_txempty_nofifo(port); + bool txe = s3c24xx_serial_txempty_nofifo(port); if (ourport->rx_enabled) { if (!txe) { From patchwork Wed Jan 10 10:20:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762154 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 9806A47F66 for ; Wed, 10 Jan 2024 10:21:20 +0000 (UTC) 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="VTr87Hmy" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40e461c1f44so34903635e9.3 for ; Wed, 10 Jan 2024 02:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882079; x=1705486879; darn=vger.kernel.org; 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=UmHRPW27RDnkA+g75aUBVezswJMsnzKsK+kYqojzJWA=; b=VTr87Hmyz3A7qj6wrmDWmYrJff/uJeZ/J5YX81UDGRjI5zT6a4gyMnmU3a8P9mQU9X pnnUEivqFzDZSII1qYkDhlY8h21kppcuPtnS3uoiJpcrz7Tn0c8SwujaOPb+a9ka4sIT miH5ivZEf2bdRhEpiq1tTn6wQMD+5s4Ypa9D2j2iF0q3Ki42Vd27cDgXIMnkpzZfYguG T15kK3h0VBXnzT9r4eGNYmeoBwwOvkYUi4GFyAmBWLGZ3WqTh002h2lt+wQTM7zHF1fP D0395XYBapx3k0/oK5nvdmUWzbOQmXsSvnR2d+mNUfb4Uy7FhKmOuOBn7fPy/dntIH4S ZitQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882079; x=1705486879; 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=UmHRPW27RDnkA+g75aUBVezswJMsnzKsK+kYqojzJWA=; b=wJ+Ko5jiUTld6r1HtI0OG52zu0vE4gn1TgekY4whygj2BHJfgKIudRD6cRHi+Ec+KW bopbDYqTanT3nbTAVn64OL2lUby9uVKyqX/fI43Un25jSVwUY7DyLGOqgXMwMlpNUdUg rtRwkb7/aYw3vlTLf8aGIV7+l+fWRtCNTi0qBABYLP6G/LBykc8ypjXlmAEo45GDOAii PPVYUYVs4PCXce+YXry6+SIKtExkxX5ls4GyA6+HgvBzNrZVwKfpxxDq9ji/3wZsy8tm 8coI2FWYefxx2qRLCoRiDjFuZre/024JNedVsjoopbeaF44wb+xmr+HpGwju3B3+FEKY flDw== X-Gm-Message-State: AOJu0Yy4aGZhOcWpbXeUugNclh7AJI9rvlumJv7DQFZoAkOZDaqY/cpq dMBwvjODnYmLgpQFb4VoftnB4q2SnboEGg== X-Google-Smtp-Source: AGHT+IF+Oagp4pVfoPn3Qez+PCLQ0H1IzVpFxNqvHn3qcWSqeS9VWnZ6GpgOzUfsQ+2xzQchsRL06w== X-Received: by 2002:a05:600c:45c6:b0:40d:932b:c4eb with SMTP id s6-20020a05600c45c600b0040d932bc4ebmr405924wmo.176.1704882078926; Wed, 10 Jan 2024 02:21:18 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:18 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 14/18] tty: serial: samsung: return bool for s3c24xx_serial_console_txrdy() Date: Wed, 10 Jan 2024 10:20:58 +0000 Message-ID: <20240110102102.61587-15-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 s3c24xx_serial_console_txrdy() returned just 0 or 1 to indicate whether the TX is empty or not. Change its return type to bool. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 63e993bed296..37c0ba2a122c 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2183,7 +2183,7 @@ static const struct dev_pm_ops s3c24xx_serial_pm_ops = { static struct uart_port *cons_uart; -static int +static bool s3c24xx_serial_console_txrdy(struct uart_port *port, u32 ufcon) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); @@ -2193,13 +2193,13 @@ s3c24xx_serial_console_txrdy(struct uart_port *port, u32 ufcon) /* fifo mode - check amount of data in fifo registers... */ ufstat = rd_regl(port, S3C2410_UFSTAT); - return (ufstat & info->tx_fifofull) ? 0 : 1; + return !(ufstat & info->tx_fifofull); } /* in non-fifo mode, we go and use the tx buffer empty */ utrstat = rd_regl(port, S3C2410_UTRSTAT); - return (utrstat & S3C2410_UTRSTAT_TXE) ? 1 : 0; + return !!(utrstat & S3C2410_UTRSTAT_TXE); } static bool From patchwork Wed Jan 10 10:20:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761700 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 1CE2847F7E for ; Wed, 10 Jan 2024 10:21:20 +0000 (UTC) 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="BXhg3hM0" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40e4f692d06so9990955e9.1 for ; Wed, 10 Jan 2024 02:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882079; x=1705486879; darn=vger.kernel.org; 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=usOFTN8z9J8oP1ehPXietRPaPrvt1NPPISnLCzCNgPc=; b=BXhg3hM0pS7t3Tv35DtttZ38+AIVNojHF8gn+VBxCoAHG3KlCJo0TL0+m66GlsHTOW DdudZj8h9axgGgMVaZUD6RJUOeOrTucFDScxH4cKEB3qP7pIlIgaDzzgcmrLfT0suqgT pcl4lmGNDHx+K9t64mWzjLS2iWd405a5ggUY6fQ10oKstEMW+1dC8WiRs1HFjL+O24Rs r45KVsfyWX9FHmmHVzrDvQlxEuJ7tRk9C9BwnZcEelTLbXF82HUEJEHhuVZRee2ZB6OH yL2N0UNvwwQZjd657IuWULX2SrFHyVO/8LA1z2k8NqhjQlYYNFPTvZ3/Yq7CgE6fHjEt N0EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882079; x=1705486879; 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=usOFTN8z9J8oP1ehPXietRPaPrvt1NPPISnLCzCNgPc=; b=VoqjNjQ5mibC1/8FUXfhvE8hq5Qjm609k3tR7yfI0+TT27TqC7N8pPbfijQDQQF53j Y99NFdvIL26lVVTWLyafKSBq2Z8PUZMEp/SotN2Rw0YAR3m9O1qR+HOv2Fz4Lz6f3Aa2 lndO1Vd9r4tcspd/+6DhH/4IEO/SD33Xo1Hh+ZWnzyA4ha/BvqPbcpLd4A3/K5kwgWPq 8PPPa9K8sRBntzFQxoxy+yTvoHvzn8+Ak43szRv31joUeawOzAFLLzibCk1nyEFO8uXy MEZW9srnBRtqaRsmLqPcY28WppXcytJCapLuFXQsyT+pZVFV2fBf6Eo5eOgCpmB0Ik7Z kw1g== X-Gm-Message-State: AOJu0YwmGlZY7YWi0dNBgV6RV7zf2WIq8pYoOn5g9VRGUaJHepA2ahRA Iy7p861+GeoQixPaV9FHTvSEQs5WuwLgJw== X-Google-Smtp-Source: AGHT+IGDIg8QSdxKZ/9GjLkRR0mxgPFDnsnalInD3L7mu7gsQjaMvnyMWk8ZG1bGrUhDYCOjPQyiAg== X-Received: by 2002:a7b:c855:0:b0:40d:b191:10e with SMTP id c21-20020a7bc855000000b0040db191010emr577084wml.175.1704882079484; Wed, 10 Jan 2024 02:21:19 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:19 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 15/18] tty: serial: samsung: change return type for s3c24xx_serial_rx_fifocnt() Date: Wed, 10 Jan 2024 10:20:59 +0000 Message-ID: <20240110102102.61587-16-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Change the return type of the s3c24xx_serial_rx_fifocnt() method to ``unsigned int`` as the method only returns the fifo size and does not handle error codes. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 37c0ba2a122c..436739cf9225 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -590,8 +590,8 @@ static inline const struct s3c2410_uartcfg return ourport->cfg; } -static int s3c24xx_serial_rx_fifocnt(const struct s3c24xx_uart_port *ourport, - u32 ufstat) +static unsigned int +s3c24xx_serial_rx_fifocnt(const struct s3c24xx_uart_port *ourport, u32 ufstat) { const struct s3c24xx_uart_info *info = ourport->info; From patchwork Wed Jan 10 10:21:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 761699 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 15EC7481C7 for ; Wed, 10 Jan 2024 10:21:21 +0000 (UTC) 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="RX++FVM3" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40d604b4b30so29383775e9.1 for ; Wed, 10 Jan 2024 02:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882080; x=1705486880; darn=vger.kernel.org; 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=L7ZrSjFHYr2/iB6uZVD8VtG9hhedczp9x5lal7G3QGg=; b=RX++FVM3TPvSqfAFPcnH9anQ4ZygBa2SwrSA3Jc20pJwnCqGb5tyxCbCAScDaeBCMx ZgSfBsbLT7QUiXoB1O1tyRUfeEYypTLmbFjAGq7T+YP0WN+ihrKNBZ2gvi412AufnmAM 7mMC67yFTdwhm/Lea6YDsDDDwSI1+8gEOAyjFbpYUtMplS0ogLN7UAbuh+3dMObF3JRw 5ru34ufkeC/Yd2LrpfJ2h+quO6zP2PoBSy/9FJ8Dc0bSB/OM69rbBwtF1baZlee99Hof RTYv0IMMm+MM6X9Xci+IYxDdBF6subxKq89AFtpdo8GNorfPng2K+zI74kC9/KczqRMi z2+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882080; x=1705486880; 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=L7ZrSjFHYr2/iB6uZVD8VtG9hhedczp9x5lal7G3QGg=; b=fNVNfWZVQ549T8TXDBn/rsPx2TGnSG80o/13d1+TDeGI1MWx0x+abWUTPKB2IZEDHB y2mqaREi6PE35P30MMWHrByVuc+k1vZn8OW1B7R/zmr3rwWyPz8HLx0MqfelXCulkIIm ++j1wKeNdY/Q6nh2zXhtM29S3KSFhyfwXD39IharwB9GWKpq87uTK7OJl6DwZ3xHjDRN KiCHQMnpn/pwuPUBxVKiNoU2/gOaA/6AOVMdyb/Y0+t7Ys0QO9X9P+AhrjVFUHaGYl4Z /W9ZdR61e0Dn82DCKzoK8pKkEtjVUSPHZfu2RE42F/gxI1Hrl0y6Rs5CC1eJF6Lhn4PK 3hAA== X-Gm-Message-State: AOJu0YwJuf8IW5o4kY47PR1rMcgo0Ohxb2t+M/cnzR+lhJnrR7DbJsMM TdvQh24xTFuvfz+u9eNWsuvRpVM3plmUPg== X-Google-Smtp-Source: AGHT+IHoYzn6WU3WEl02h7AGFS46UkkaeF7/tdZLhTAKWS8rP6lbLfNioU95JNHcQz4U24VBuNGvkg== X-Received: by 2002:a05:600c:4e91:b0:40e:49af:264c with SMTP id f17-20020a05600c4e9100b0040e49af264cmr482213wmq.62.1704882080468; Wed, 10 Jan 2024 02:21:20 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:19 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 16/18] tty: serial: samsung: shrink the clock selection to 8 clocks Date: Wed, 10 Jan 2024 10:21:00 +0000 Message-ID: <20240110102102.61587-17-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 provides a clock selection pool of maximum 4 clocks. Update the driver to consider a pool selection of maximum 8 clocks. The final scope is to reduce the memory footprint of ``struct s3c24xx_uart_info``. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 436739cf9225..5df2bcebf9fb 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -81,11 +81,11 @@ struct s3c24xx_uart_info { unsigned long tx_fifomask; unsigned long tx_fifoshift; unsigned long tx_fifofull; - unsigned int def_clk_sel; - unsigned long num_clks; unsigned long clksel_mask; unsigned long clksel_shift; unsigned long ucon_mask; + u8 def_clk_sel; + u8 num_clks; u8 iotype; /* uart port features */ @@ -1339,7 +1339,7 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, #define MAX_CLK_NAME_LENGTH 15 -static inline int s3c24xx_serial_getsource(struct uart_port *port) +static inline u8 s3c24xx_serial_getsource(struct uart_port *port) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); u32 ucon; @@ -1352,8 +1352,7 @@ static inline int s3c24xx_serial_getsource(struct uart_port *port) return ucon >> info->clksel_shift; } -static void s3c24xx_serial_setsource(struct uart_port *port, - unsigned int clk_sel) +static void s3c24xx_serial_setsource(struct uart_port *port, u8 clk_sel) { const struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); u32 ucon; @@ -1372,14 +1371,15 @@ static void s3c24xx_serial_setsource(struct uart_port *port, static unsigned int s3c24xx_serial_getclk(struct s3c24xx_uart_port *ourport, unsigned int req_baud, struct clk **best_clk, - unsigned int *clk_num) + u8 *clk_num) { const struct s3c24xx_uart_info *info = ourport->info; struct clk *clk; unsigned long rate; - unsigned int cnt, baud, quot, best_quot = 0; + unsigned int baud, quot, best_quot = 0; char clkname[MAX_CLK_NAME_LENGTH]; int calc_deviation, deviation = (1 << 30) - 1; + u8 cnt; for (cnt = 0; cnt < info->num_clks; cnt++) { /* Keep selected clock if provided */ @@ -1472,9 +1472,10 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, struct s3c24xx_uart_port *ourport = to_ourport(port); struct clk *clk = ERR_PTR(-EINVAL); unsigned long flags; - unsigned int baud, quot, clk_sel = 0; + unsigned int baud, quot; unsigned int udivslot = 0; u32 ulcon, umcon; + u8 clk_sel = 0; /* * We don't support modem control lines. @@ -1775,10 +1776,9 @@ static int s3c24xx_serial_enable_baudclk(struct s3c24xx_uart_port *ourport) struct device *dev = ourport->port.dev; const struct s3c24xx_uart_info *info = ourport->info; char clk_name[MAX_CLK_NAME_LENGTH]; - unsigned int clk_sel; struct clk *clk; - int clk_num; int ret; + u8 clk_sel, clk_num; clk_sel = ourport->cfg->clk_sel ? : info->def_clk_sel; for (clk_num = 0; clk_num < info->num_clks; clk_num++) { @@ -2286,9 +2286,9 @@ s3c24xx_serial_get_options(struct uart_port *port, int *baud, { struct clk *clk; unsigned long rate; - unsigned int clk_sel; u32 ulcon, ucon, ubrdiv; char clk_name[MAX_CLK_NAME_LENGTH]; + u8 clk_sel; ulcon = rd_regl(port, S3C2410_ULCON); ucon = rd_regl(port, S3C2410_UCON); From patchwork Wed Jan 10 10:21:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762153 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 D5737482CD for ; Wed, 10 Jan 2024 10:21:22 +0000 (UTC) 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="Z3Sqwgxc" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40d88fff7faso41079585e9.3 for ; Wed, 10 Jan 2024 02:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882081; x=1705486881; darn=vger.kernel.org; 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=aIejJEXeNUqkKRlWpyybjPC4hGJCbHArkKwU6CRLU6k=; b=Z3SqwgxcnFKlWFa8xWVshMiT/It8Qky4i5hZWPM0juCESNRhqlR5uOvGMW/QR33GOn 5wVqTieLjrw9MHPdnAcPDSBVHY2qL4riUB8nnnZePRhGEEUNQ/EOISRNOMRfzcv5OpPe PXTjAj3ALhZITWOTD/mbIZ89XKw340RDc5/ofwMC6mQXv8f0EPRzH24GvaS9XQCofD52 jXtGdI5hE64frL1E8NLh3DWihwcwmUZNP65CmXw7QNKr8KOmIrRs2nrMyQg9hwmgEHwA r/8WK6eIxJw0qlske6k7MTB2hb4wxsx0s7QUj+ufqgbAshBoOExBOckVT1RIywaX01NT /psQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882081; x=1705486881; 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=aIejJEXeNUqkKRlWpyybjPC4hGJCbHArkKwU6CRLU6k=; b=Mqf5hjmho0yLCinFgGauHUVEKgXYhrk9q8GfgDiXRrGKn1kwOpyrIPaTkZVYrwd/TN 6ls34x2+eI9lCcSVoh5KEgoKEdYBWucfkbI0DtZlkMfbYF5i+0CzPLuWKe35s4daFjfJ HtUYRBg8T2dj+KTjMuXtjdKk+3ZFtS7XXPUli6ChU4u6B3fUQ+DG+/sYvacSM54KBJ/Q JB83pnMYDG0xu+8q9vDm2FUNhv6bOlmWTEjqztAd7rSg2v4QCPvwrdbzf2HsBjgVRoEJ 2wg39UoKIvGLXczltd+se8WxYdzio+VWppbMSI8W7zPDZkSBigUgHDI4abe40n8KMh9o UmSQ== X-Gm-Message-State: AOJu0YxVDvVCBg5gt0xQcmlTTVklfOWVLY48gca/vhptBKi+ufuxVCFe vUmHdiy86pAgezQb3IG5af6Q1EjGCdpUDg== X-Google-Smtp-Source: AGHT+IFtDvi8wjZKg9pm0ERSI9OUVSk7oMwH+ipIk06V0XhYNU2+w7zsSgC+1btLE2dAAQHJq3B/vw== X-Received: by 2002:a05:600c:1d97:b0:40e:567f:38d7 with SMTP id p23-20020a05600c1d9700b0040e567f38d7mr188898wms.225.1704882081232; Wed, 10 Jan 2024 02:21:21 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:20 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 17/18] tty: serial: samsung: shrink port feature flags to u8 Date: Wed, 10 Jan 2024 10:21:01 +0000 Message-ID: <20240110102102.61587-18-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There's a single flag defined as of now. Shrink the feature flags to u8 and aim for a better memory footprint for ``struct s3c24xx_uart_info``. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 5df2bcebf9fb..598d9fe7a492 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -90,7 +90,7 @@ struct s3c24xx_uart_info { /* uart port features */ - unsigned int has_divslot:1; + u8 has_divslot:1; }; struct s3c24xx_serial_drv_data { From patchwork Wed Jan 10 10:21:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 762152 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 BACED482F6 for ; Wed, 10 Jan 2024 10:21:23 +0000 (UTC) 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="CQE4ccSf" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40e5701cbbaso2091225e9.0 for ; Wed, 10 Jan 2024 02:21:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882082; x=1705486882; darn=vger.kernel.org; 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=ummHx1igHBI+mPkPK31ezfxthw+Jgvbj/YdjUw2HyQ4=; b=CQE4ccSfqXSc+BhOt4XrXWba/QxpMhZcLYvTEBkWHsowNrLyZafLJZiZjDESoDRhCg lJWf127dheRmWez0fjaKfQ5AthFF9NyuDbrWkn3x+c6oz2i3WiJvTrUkVLNjxx5tHE84 2KQaxpgKa64pgc/et4xsC19sx9A7TalzxcJ7cSx9wjIXyvTf9ANde+uq3dBuoa0fpFJB HAHIIt/dGldVMlYQl9qsGnJjG2NZXX2sOKN8leHy8HKyWgD53Q79emymHzQKWpn7IRTv gbw54kXDNSnjapn1r8t55M3e6dlSqI9aysM85ZxNaGlzpJijWevQhrC5RUSC46KoI9SK nmrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882082; x=1705486882; 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=ummHx1igHBI+mPkPK31ezfxthw+Jgvbj/YdjUw2HyQ4=; b=xS7c+5KhKpuTN96oP9Q2MQ1LMSz9KCuHseZua9eZnFRogZkrYlZwWTWxqBdkzqTLxT jZ7Ug/LNR9O9vVd8L3gEXx/E0j3T+iTlKxy1ZUpKec9DNeutLQuxpxnA3z2UVt9Vy3Hv n2LIsX1hOzTewbH80hyW1P17hvLl1mONpelVaUd5qT0llvjV1X/GeSD7/vyNnngYLpsE pMHGdKKRQeG5+t9MiFlyTrTjqHJBynO+4dxNDrOYQA2+yacGckOMKohrhMlkqAwHppR0 4vwhfJBRcvKw2c58PPY/zeQaF3/+oP9eB4sp2Mc4HQGH6AgCgp1lSkLV184FTFKGzt8r lDRg== X-Gm-Message-State: AOJu0YzpJ/FVjzotij50DTOvUlRzvu/7XZoU1i/FuRRv4ZpwmGGC9j1L faFKO+iX6iHhKCq67tglnTz5iqHW8Qb1Gg== X-Google-Smtp-Source: AGHT+IG0xYD6noOiAF06pJmAKPKFGS5k9kf0z5T6NNAMgrhXlZB3r2GVRIKB+IrSXxoBiSdSWW9UzA== X-Received: by 2002:a7b:ce99:0:b0:40d:88b8:1bd1 with SMTP id q25-20020a7bce99000000b0040d88b81bd1mr525747wmj.185.1704882082174; Wed, 10 Jan 2024 02:21:22 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:21 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 18/18] tty: serial: samsung: shrink memory footprint of ``struct s3c24xx_uart_info`` Date: Wed, 10 Jan 2024 10:21:02 +0000 Message-ID: <20240110102102.61587-19-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use u32 for the members of ``struct s3c24xx_uart_info`` that are used for register interactions. The purpose of these members becomes clearer. The greater benefit of this change is that it also reduces the memory footprint of the struct, allowing 64-bit architectures to use a single cacheline for the entire struct. struct s3c24xx_uart_info { const char * name; /* 0 8 */ enum s3c24xx_port_type type; /* 8 4 */ unsigned int port_type; /* 12 4 */ unsigned int fifosize; /* 16 4 */ u32 rx_fifomask; /* 20 4 */ u32 rx_fifoshift; /* 24 4 */ u32 rx_fifofull; /* 28 4 */ u32 tx_fifomask; /* 32 4 */ u32 tx_fifoshift; /* 36 4 */ u32 tx_fifofull; /* 40 4 */ u32 clksel_mask; /* 44 4 */ u32 clksel_shift; /* 48 4 */ u32 ucon_mask; /* 52 4 */ u8 def_clk_sel; /* 56 1 */ u8 num_clks; /* 57 1 */ u8 iotype; /* 58 1 */ u8 has_divslot:1; /* 59: 0 1 */ /* size: 64, cachelines: 1, members: 17 */ /* padding: 4 */ /* bit_padding: 7 bits */ }; Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 598d9fe7a492..40dceb41acb7 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -75,15 +75,15 @@ struct s3c24xx_uart_info { enum s3c24xx_port_type type; unsigned int port_type; unsigned int fifosize; - unsigned long rx_fifomask; - unsigned long rx_fifoshift; - unsigned long rx_fifofull; - unsigned long tx_fifomask; - unsigned long tx_fifoshift; - unsigned long tx_fifofull; - unsigned long clksel_mask; - unsigned long clksel_shift; - unsigned long ucon_mask; + u32 rx_fifomask; + u32 rx_fifoshift; + u32 rx_fifofull; + u32 tx_fifomask; + u32 tx_fifoshift; + u32 tx_fifofull; + u32 clksel_mask; + u32 clksel_shift; + u32 ucon_mask; u8 def_clk_sel; u8 num_clks; u8 iotype;