From: "M Tamseel Shams" <m.shams@samsung.com>
To: "'Robin Murphy'" <robin.murphy@arm.com>, <kgene@kernel.org>,
<krzk@kernel.org>, <gregkh@linuxfoundation.org>,
<jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org, alim.akhtar@samsung.com,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org
Subject: RE: [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC
Date: Wed, 17 Jun 2020 22:38:01 +0530 [thread overview]
Message-ID: <000101d644c9$e06bba40$a1432ec0$@samsung.com> (raw)
In-Reply-To: <027c0955-3246-8c1e-4d0d-053a2a177dc6@arm.com>
Hi Robin,
> -----Original Message-----
> From: Robin Murphy <robin.murphy@arm.com>
> Sent: Monday, June 15, 2020 6:43 PM
> To: Tamseel Shams <m.shams@samsung.com>; kgene@kernel.org;
> krzk@kernel.org; gregkh@linuxfoundation.org; jslaby@suse.com
> Cc: linux-samsung-soc@vger.kernel.org; linux-serial@vger.kernel.org; linux-
> kernel@vger.kernel.org; alim.akhtar@samsung.com; linux-arm-
> kernel@lists.infradead.org
> Subject: Re: [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for
> various Samsung SoC
>
> On 2020-06-15 13:26, Tamseel Shams wrote:
> > else {
> > port->irq = ret;
> > ourport->rx_irq = ret;
> > - ourport->tx_irq = ret + 1;
> > + if (ourport->info->irq_cnt == 1)
> > + ourport->tx_irq = ret;
> > + else
> > + ourport->tx_irq = ret + 1;
> > }
> >
> > - ret = platform_get_irq(platdev, 1);
> > - if (ret > 0)
> > - ourport->tx_irq = ret;
> > + if (ourport->info->irq_cnt != 1) {
> > + ret = platform_get_irq(platdev, 1);
> > + if (ret > 0)
> > + ourport->tx_irq = ret;
>
> FWIW, if you're not going to do anything in the error case then you may as well
> just call platform_get_irq_optional() unconditionally.
>
> Robin.
>
My intention behind not using 'platform_get_irq_optional' was that it does not prints the error when the 2nd interrupt resource is missing for the older UART's. I am just using it to give information to the user in error case. I can use 'platform_get_irq_optional' too.
Thanks & Regards
Tamseel
> > + }
> > /*
> > * DMA is currently supported only on DT platforms, if DMA properties
> > * are specified.
> > @@ -2387,6 +2393,7 @@ static struct s3c24xx_serial_drv_data
> s3c2410_serial_drv_data = {
> > .name = "Samsung S3C2410 UART",
> > .type = PORT_S3C2410,
> > .fifosize = 16,
> > + .irq_cnt = 2,
> > .rx_fifomask = S3C2410_UFSTAT_RXMASK,
> > .rx_fifoshift = S3C2410_UFSTAT_RXSHIFT,
> > .rx_fifofull = S3C2410_UFSTAT_RXFULL,
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-06-17 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200615124355epcas5p446ae2f1b63331ef87334cd7d696c3c43@epcas5p4.samsung.com>
2020-06-15 12:26 ` [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC Tamseel Shams
2020-06-15 12:50 ` Greg KH
2020-06-17 16:28 ` M Tamseel Shams
2020-06-15 13:13 ` Robin Murphy
2020-06-17 17:08 ` M Tamseel Shams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000101d644c9$e06bba40$a1432ec0$@samsung.com' \
--to=m.shams@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).