Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Andy Shevchenko
On Tue, May 14, 2019 at 02:02:40PM +0200, Esben Haabendal wrote: > Andy Shevchenko writes: > > > On Tue, May 14, 2019 at 12:23 PM Andy Shevchenko > > wrote: > >> On Tue, May 14, 2019 at 10:24 AM Esben Haabendal > >> wrote: > > > >> > Please take a look at https://lkml.org/lkml/2019/4/9/576 >

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Andy Shevchenko
On Tue, May 14, 2019 at 02:02:36PM +0200, Esben Haabendal wrote: > Andy Shevchenko writes: > > On Tue, May 14, 2019 at 10:24 AM Esben Haabendal wrote: > >> Andy Shevchenko writes: > >> > On Tue, May 07, 2019 at 02:22:18PM +0200, Esben Haabendal wrote: > > > >> We are on repeat here. I don't

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Esben Haabendal
Andy Shevchenko writes: > On Tue, May 14, 2019 at 10:24 AM Esben Haabendal wrote: >> Andy Shevchenko writes: >> > On Tue, May 07, 2019 at 02:22:18PM +0200, Esben Haabendal wrote: > >> We are on repeat here. I don't agree with you here. I have a simple >> generic 8250 (16550A) compatible

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Esben Haabendal
Andy Shevchenko writes: > On Tue, May 14, 2019 at 12:23 PM Andy Shevchenko > wrote: >> On Tue, May 14, 2019 at 10:24 AM Esben Haabendal wrote: > >> > Please take a look at https://lkml.org/lkml/2019/4/9/576 >> > ("[PATCH v2 2/4] mfd: ioc3: Add driver for SGI IOC3 chip") >> >> Thank you for

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Andy Shevchenko
On Tue, May 14, 2019 at 12:23 PM Andy Shevchenko wrote: > On Tue, May 14, 2019 at 10:24 AM Esben Haabendal wrote: > > Please take a look at https://lkml.org/lkml/2019/4/9/576 > > ("[PATCH v2 2/4] mfd: ioc3: Add driver for SGI IOC3 chip") > > Thank you for this link. > Now, look at this comment:

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Andy Shevchenko
On Tue, May 14, 2019 at 10:24 AM Esben Haabendal wrote: > Andy Shevchenko writes: > > On Tue, May 07, 2019 at 02:22:18PM +0200, Esben Haabendal wrote: > We are on repeat here. I don't agree with you here. I have a simple > generic 8250 (16550A) compatible device, and cannot use it in a mfd >

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Esben Haabendal
Andy Shevchenko writes: > On Tue, May 07, 2019 at 02:22:18PM +0200, Esben Haabendal wrote: >> Andy Shevchenko writes: >> > On Tue, May 07, 2019 at 01:35:58PM +0200, Esben Haabendal wrote: >> >> Lee Jones writes: >> >> > On Thu, 02 May 2019, Esben Haabendal wrote: >> >> > >> >> >> Could you

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-14 Thread Esben Haabendal
Andy Shevchenko writes: > On Tue, May 07, 2019 at 02:22:18PM +0200, Esben Haabendal wrote: >> Andy Shevchenko writes: >> > On Tue, May 07, 2019 at 01:35:58PM +0200, Esben Haabendal wrote: >> >> Lee Jones writes: >> >> > On Thu, 02 May 2019, Esben Haabendal wrote: >> >> > >> >> >> Could you

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-07 Thread Andy Shevchenko
On Tue, May 07, 2019 at 02:22:18PM +0200, Esben Haabendal wrote: > Andy Shevchenko writes: > > On Tue, May 07, 2019 at 01:35:58PM +0200, Esben Haabendal wrote: > >> Lee Jones writes: > >> > On Thu, 02 May 2019, Esben Haabendal wrote: > >> > > >> >> Could you help clarify whether or not this

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-07 Thread Esben Haabendal
Andy Shevchenko writes: > On Tue, May 07, 2019 at 01:35:58PM +0200, Esben Haabendal wrote: >> Lee Jones writes: >> > On Thu, 02 May 2019, Esben Haabendal wrote: >> > >> >> Could you help clarify whether or not this patch is trying to do >> >> something odd/wrong? >> >> >> >> I might be

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-07 Thread Andy Shevchenko
On Tue, May 07, 2019 at 01:35:58PM +0200, Esben Haabendal wrote: > Lee Jones writes: > > On Thu, 02 May 2019, Esben Haabendal wrote: > > > >> Could you help clarify whether or not this patch is trying to do > >> something odd/wrong? > >> > >> I might be misunderstanding Andy (probably is), but

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-07 Thread Esben Haabendal
Lee Jones writes: > On Thu, 02 May 2019, Esben Haabendal wrote: > >> Could you help clarify whether or not this patch is trying to do >> something odd/wrong? >> >> I might be misunderstanding Andy (probably is), but the discussion >> revolves around the changes I propose where I change the

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-07 Thread Esben Haabendal
Lee Jones writes: > On Tue, 07 May 2019, Lee Jones wrote: >> On Thu, 02 May 2019, Esben Haabendal wrote: >> >> > Could you help clarify whether or not this patch is trying to do >> > something odd/wrong? >> > >> > I might be misunderstanding Andy (probably is), but the discussion >> > revolves

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-07 Thread Lee Jones
On Tue, 07 May 2019, Lee Jones wrote: > On Thu, 02 May 2019, Esben Haabendal wrote: > > > Hi Lee > > > > Could you help clarify whether or not this patch is trying to do > > something odd/wrong? > > > > I might be misunderstanding Andy (probably is), but the discussion > > revolves around the

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-07 Thread Lee Jones
On Thu, 02 May 2019, Esben Haabendal wrote: > Hi Lee > > Could you help clarify whether or not this patch is trying to do > something odd/wrong? > > I might be misunderstanding Andy (probably is), but the discussion > revolves around the changes I propose where I change the serial8250 > driver

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-06 Thread Andy Shevchenko
Let's start from simple things: - I really failed to find where resources are requested in mfd_add_device(): https://elixir.bootlin.com/linux/latest/ident/mfd_add_device - as for 8250_dw.c (as MFD child of intel-lpss-pci.c) see below... 1. 8250_dw.c remaps resources, but doesn't request them. 2.

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-06 Thread Esben Haabendal
> On Mon, May 06, 2019 at 05:46:56PM +0200, Esben Haabendal wrote: >> Andy Shevchenko writes: >> >> > On Wed, May 01, 2019 at 09:17:37AM +0200, Esben Haabendal wrote: >> >> >> Andy Shevchenko writes: > >> As an example, the sm501.c driver, the only driver in drivers/mfd/ which >> uses serial8250

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-06 Thread Andy Shevchenko
On Mon, May 06, 2019 at 05:46:56PM +0200, Esben Haabendal wrote: > Andy Shevchenko writes: > >> > On Wed, May 01, 2019 at 09:17:37AM +0200, Esben Haabendal wrote: > >> >> Andy Shevchenko writes: > As an example, the sm501.c driver, the only driver in drivers/mfd/ which > uses serial8250 driver,

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-06 Thread Esben Haabendal
Andy Shevchenko writes: >> > On Wed, May 01, 2019 at 09:17:37AM +0200, Esben Haabendal wrote: >> >> Andy Shevchenko writes: >> > >> >> > Hmm... Currently it's done inside individual port drivers, like >> >> > 8250_dw.c. >> >> > Each of the drivers can do it differently, for example 8250_lpss.c

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-06 Thread Esben Haabendal
"Enrico Weigelt, metux IT consult" writes: > On 30.04.19 16:04, Esben Haabendal wrote: >> Allow getting memory resource (mapbase or iobase) as well as irq from >> platform_device resources. >> >> The UPF_DEV_RESOURCES flag must be set for devices where platform_device >> resources are to be

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-02 Thread Enrico Weigelt, metux IT consult
On 30.04.19 16:04, Esben Haabendal wrote: > Allow getting memory resource (mapbase or iobase) as well as irq from > platform_device resources. > > The UPF_DEV_RESOURCES flag must be set for devices where platform_device > resources are to be used. When not set, driver behaves as before. > >

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-02 Thread Andy Shevchenko
On Thu, May 02, 2019 at 02:41:45PM +0200, Esben Haabendal wrote: > Hi Lee > > Could you help clarify whether or not this patch is trying to do > something odd/wrong? > > I might be misunderstanding Andy (probably is), but the discussion > revolves around the changes I propose where I change the

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-02 Thread Esben Haabendal
Hi Lee Could you help clarify whether or not this patch is trying to do something odd/wrong? I might be misunderstanding Andy (probably is), but the discussion revolves around the changes I propose where I change the serial8250 driver to use platform_get_resource() in favour of

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-02 Thread Andy Shevchenko
On Wed, May 01, 2019 at 09:17:37AM +0200, Esben Haabendal wrote: > Andy Shevchenko writes: > > Hmm... Currently it's done inside individual port drivers, like 8250_dw.c. > > Each of the drivers can do it differently, for example 8250_lpss.c or > > 8250_pnp.c. > > So, you would prefer to create

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-01 Thread Esben Haabendal
Andy Shevchenko writes: > On Tue, Apr 30, 2019 at 04:04:13PM +0200, Esben Haabendal wrote: >> Remaining platform_data fields (other than mapbase, iobase, mapsize and >> irq) are used just as before. Note > > Note what? Note nothing. I will remove it, sorry about that. >> +static int

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-04-30 Thread Andy Shevchenko
On Tue, Apr 30, 2019 at 04:04:13PM +0200, Esben Haabendal wrote: > Allow getting memory resource (mapbase or iobase) as well as irq from > platform_device resources. > > The UPF_DEV_RESOURCES flag must be set for devices where platform_device > resources are to be used. When not set, driver

[PATCH] serial: 8250: Add support for using platform_device resources

2019-04-30 Thread Esben Haabendal
Allow getting memory resource (mapbase or iobase) as well as irq from platform_device resources. The UPF_DEV_RESOURCES flag must be set for devices where platform_device resources are to be used. When not set, driver behaves as before. This allows use of the serial8250 driver together with