Message ID | 20240220101227.80741-1-m.shams@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-72897-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp330096dyc; Tue, 20 Feb 2024 03:23:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUb/7BCQ9JcirRMiha9G+St5ACf0Cw2QYq/6MdfC/MvJaX0wgV6R9M0bGLI1NStKhq8mKKK+kKFEcmCM0PAbG3ZsYbC4w== X-Google-Smtp-Source: AGHT+IEii7BuYmXwIVbFHNPj+K6o494wibd2pr+FL9PxZ6Lmz2MfefGO+pACzrUGeev3Y3HHtljB X-Received: by 2002:a17:907:7887:b0:a3e:fd31:86cc with SMTP id ku7-20020a170907788700b00a3efd3186ccmr961767ejc.47.1708428190945; Tue, 20 Feb 2024 03:23:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708428190; cv=pass; d=google.com; s=arc-20160816; b=pYWIlqkwnELSuhKTHBrtfosf5rQDXbxhsYnBvlbL/mly4CWX1i6aSLZl5HOb2Lurwh 68KmM17+Y8WJlGePk5H+9j0zROImU4Zc0LfZff+KuIj3Yse2UckVinKUEIVAFYu2wSjY ozMVUEMHrgHaVQ35xoc4mbWpyDw5T1XqQyH2rsiOu8Q88YQChHn2yeXQ58dqiIcZgsiY KHauCfzGo1R1/OuIX0LCEMeX4BQUqY9dbvD3fUEhPTVAcsrJ3uzNa38DOBOIpgurZ2HK M+RDzVu1Bp6NDcw4EeZ+yoR44k3SqdpzNdgfoNLjesyTOm/qIYspkRsZ/ULGl2Fvsydu WKCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :dlp-filter:cms-type:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=9fGAvkkWp12wfZXJbzbavv2ZwQH5uBgyjHpo2ixsD5g=; fh=edLB8JDrDewqQNp89P66DoSOdr1UWKc/1F6Ywwma0Zg=; b=J0smR5uB3IBoV6Ok52rZug9VF8jv1HnEFeQTbk1xvZCtCd1wHhmsJKBJi948fA5Cpf J4tq4LfHNlLc6zBQJj7Gwf7jm0T9eET+MGGLg6+DqvTJbnGw9UPxdw2cgUqCNpyLZTkC OuUMgiloVazpT4G11PW6rWVvybtW/mxMrWA29mIvS1NfjeUwHhIIGvdailUbAr4Fcjh/ +H8kpTrtliuewZm3D6tyvfFQqK9EpM+gUNspd/htWrQOOTyX8QeMNlQqtfK/MhkXWd6o DPedd6yWOLUYEcPocZKbXdvxtKu0wJ7U8GH2A77q6ASK4WXZOTqJEBvW8G9/gqxvdXC1 kKWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="s9nrO5Y/"; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-72897-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72897-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ck23-20020a170906c45700b00a3f0f32058fsi244809ejb.860.2024.02.20.03.23.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 03:23:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72897-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="s9nrO5Y/"; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-72897-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72897-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 665AC1F24460 for <ouuuleilei@gmail.com>; Tue, 20 Feb 2024 11:23:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F66A66B2D; Tue, 20 Feb 2024 11:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="s9nrO5Y/" Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D730664D9 for <linux-kernel@vger.kernel.org>; Tue, 20 Feb 2024 11:21:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708428102; cv=none; b=ShL1UsBGE0ov1CjMqCau/KBsONRGCUz7tD+mMREnjJrlB7dDwSLmLdPiz1w8Crw/ZdH2XuB4HTxu8DV4yNC4n9/Rns2Or3GlnacwNsD37vqQ6wEBJM0CvTQ0ujR3SdQEMMIfaGv3aOtN414zisz+dbEWyqfM1yg9CHOhqwcZJG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708428102; c=relaxed/simple; bh=INHQvRB/ojgLL1jJyHv4kt04JhA8r1SShwN3sZfPsZ8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:References; b=RVw4A9KWOOPJmap8J3nfsBjOZn50lIdnWtYWGUJtmjFtwMxdhvoq7EA/5NHU6hy/ruKI7d8+5VLnKHNCw/0eSlV8JNSUUFNTJgddCRpIOkwb38Quv2rUiVIil1/ZDpCRfyTiV7rZOh/UvDPpDUGiykdw1Q9u9A/pSEOxWjyLHzY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=s9nrO5Y/; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240220112138epoutp014e1a62ae0652fc2ebd460999fae0d76b~1jk3JEODR2828228282epoutp01f for <linux-kernel@vger.kernel.org>; Tue, 20 Feb 2024 11:21:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240220112138epoutp014e1a62ae0652fc2ebd460999fae0d76b~1jk3JEODR2828228282epoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1708428098; bh=9fGAvkkWp12wfZXJbzbavv2ZwQH5uBgyjHpo2ixsD5g=; h=From:To:Cc:Subject:Date:References:From; b=s9nrO5Y/2+9rMxzcwO8lBRBvPHPBIM4ouJ72/qRImVKjFySSrIQpgghQQcKSogBEG fUweX6u8ppsM01TrPotpPf4ou8a8vJQStDRecYXQ7ai67mGZpf+/zp7fozxuusgIIa wsfkGdBEWurXdqw72A2V24O8iKSUDyKJOT1uquKw= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20240220112138epcas5p2f6ce1ff37994ee8c17b9d478d645c430~1jk24n3rP2571225712epcas5p2a; Tue, 20 Feb 2024 11:21:38 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.175]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4TfH6S2xGcz4x9Pv; Tue, 20 Feb 2024 11:21:36 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 8E.F3.09672.04B84D56; Tue, 20 Feb 2024 20:21:36 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20240220101235epcas5p16db3f82c8db1efd32299c48c875cdc87~1iokWVZc32498224982epcas5p1u; Tue, 20 Feb 2024 10:12:35 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240220101235epsmtrp15a637026f007baa6d501581fbe3dc121~1iokVk8672766527665epsmtrp1D; Tue, 20 Feb 2024 10:12:35 +0000 (GMT) X-AuditID: b6c32a4b-60bfd700000025c8-0e-65d48b404943 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 92.43.07368.21B74D56; Tue, 20 Feb 2024 19:12:34 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240220101233epsmtip2b9ecc58a6460c97f07645740b25e1462~1iojAi0Ht1920319203epsmtip2I; Tue, 20 Feb 2024 10:12:33 +0000 (GMT) From: Tamseel Shams <m.shams@samsung.com> To: alim.akhtar@samsung.com, krzysztof.kozlowski+dt@linaro.org, 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, Tamseel Shams <m.shams@samsung.com> Subject: [PATCH v3] serial: samsung: honor fifosize from dts at first Date: Tue, 20 Feb 2024 15:42:27 +0530 Message-Id: <20240220101227.80741-1-m.shams@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHKsWRmVeSWpSXmKPExsWy7bCmhq5D95VUg+W/BSwezNvGZtG8eD2b xbu5MhZ9Lx4yW2x6fI3V4vKuOWwWM87vY7I4s7iX3eJu62J2B06PTas62TzuXNvD5rF/7hp2 j81L6j36tqxi9Pi8SS6ALSrbJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8x N9VWycUnQNctMwfoJiWFssScUqBQQGJxsZK+nU1RfmlJqkJGfnGJrVJqQUpOgUmBXnFibnFp XrpeXmqJlaGBgZEpUGFCdsbrX/wFxwUqTs+fwtLA+J63i5GTQ0LARGLNusfsXYxcHEICuxkl pk9bBeV8YpRYdO40I4TzjVFi68XzLDAts49MgkrsZZS4eXojVEsrk8TqE9OYuhg5ONgENCWO n+cGMUUEiiQaP/OClDALbGCUeNCzAaxEWMBVYvUCGZCZLAKqEn92dzKC2LwCFhKTW26yQ+yS l1i94QAzSK+EwCF2iUXXrrJBJFwkFv94A1UkLPHq+BYoW0riZX8blJ0uMfdhLxOEXSCxbNd3 qLi9xIErc1hAbmAGOnP9Ln2IsKzE1FPrwMqZBfgken8/gWrlldgxD8ZWlPi/ux9qjLjEuxVT WCFsD4kVcyaAnSYkECtxtOct6wRG2VkIGxYwMq5ilEwtKM5NTy02LTDOSy2HR1Nyfu4mRnBC 0/LewfjowQe9Q4xMHIyHGCU4mJVEeFnKr6QK8aYkVlalFuXHF5XmpBYfYjQFhtlEZinR5Hxg Ss0riTc0sTQwMTMzM7E0NjNUEud93To3RUggPbEkNTs1tSC1CKaPiYNTq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eZ8H2kov7ZrS9/65UEagxv61FW8/d+UYXjzLJRiue7PhjV4t8xmBCb1f2ZLV ts5z/rXxy8QNS17JlN2XTeNakZ4bGjBtJfscNs2//7fWy2i4hxX3mSzR4ZvdflCBzSax313j neHCqR7NrO2XAsq3htTHWXUrTdYQ+dDW+XLZ9bKkDSkfkhdFZco8DHk2+fd+i8kc3GWBS5+1 /coQePVt7qOvSizFGYmGWsxFxYkATQEMn50CAAA= X-CMS-MailID: 20240220101235epcas5p16db3f82c8db1efd32299c48c875cdc87 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240220101235epcas5p16db3f82c8db1efd32299c48c875cdc87 References: <CGME20240220101235epcas5p16db3f82c8db1efd32299c48c875cdc87@epcas5p1.samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791416798624146340 X-GMAIL-MSGID: 1791416798624146340 |
Series |
[v3] serial: samsung: honor fifosize from dts at first
|
|
Commit Message
Tamseel Shams
Feb. 20, 2024, 10:12 a.m. UTC
Currently for platforms which passes UART fifosize from DT gets
override by local driver structure "s3c24xx_serial_drv_data",
which is not intended. Change the code to honor fifosize from
device tree at first.
Signed-off-by: Tamseel Shams <m.shams@samsung.com>
---
Change Log:
v1 -> v2:
Acknowledged Krzysztof's comments
Initialized "ret" variable
v2 -> v3:
intoduced new variable "fifosize_prop" to handle
return value from call of "of_property_read_u32"
drivers/tty/serial/samsung_tty.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 71d17d804fda..745702ec8eda 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1952,7 +1952,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct s3c24xx_uart_port *ourport; int index = probe_index; - int ret, prop = 0; + int ret, prop = 0, fifosize_prop = 1; if (np) { ret = of_alias_get_id(np, "serial"); @@ -1990,8 +1990,8 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) } if (np) { - of_property_read_u32(np, - "samsung,uart-fifosize", &ourport->port.fifosize); + fifosize_prop = of_property_read_u32(np, "samsung,uart-fifosize", + &ourport->port.fifosize); if (of_property_read_u32(np, "reg-io-width", &prop) == 0) { switch (prop) { @@ -2009,10 +2009,13 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) } } - if (ourport->drv_data->fifosize[index]) - ourport->port.fifosize = ourport->drv_data->fifosize[index]; - else if (ourport->info->fifosize) - ourport->port.fifosize = ourport->info->fifosize; + if (fifosize_prop) { + if (ourport->drv_data->fifosize[index]) + ourport->port.fifosize = ourport->drv_data->fifosize[index]; + else if (ourport->info->fifosize) + ourport->port.fifosize = ourport->info->fifosize; + } + ourport->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SAMSUNG_CONSOLE); /*