2014-02-19 11:04:18

by Michal Simek

[permalink] [raw]
Subject: [RFC PATCH v2 0/2] Syscon early initialization


Attachments:
(No filename) (1.54 kB)
(No filename) (198.00 B)
Download all attachments

2014-02-19 11:14:17

by Alexander Shiyan

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/2] mfd: syscon: Support early initialization

Среда, 19 февраля 2014, 12:04 +01:00 от Michal Simek <[email protected]>:
> Some platforms need to get system controller
> ready as soon as possible.
> The patch provides early_syscon_initialization
> which create early mapping for all syscon compatible
> devices in early_syscon_probe.
> Regmap is get via syscon_early_regmap_lookup_by_phandle()
>
> Regular device probes attach device to regmap
> via regmap_attach_dev().
>
> For early syscon initialization is necessary to extend
> struct syscon and provide remove function
> which unmap all early init structures.
>
> Signed-off-by: Michal Simek <[email protected]>
> ---
...

> +static struct of_device_id of_syscon_ids[] = {
> + { .compatible = "syscon" },
> + {},
> };

You should move syscon_ids out of #ifdef CONFIG_OF

---
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2014-02-19 11:17:28

by Alexander Shiyan

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/2] mfd: syscon: Support early initialization

Среда, 19 февраля 2014, 15:14 +04:00 от Alexander Shiyan <[email protected]>:
> Среда, 19 февраля 2014, 12:04 +01:00 от Michal Simek <[email protected]>:
> > Some platforms need to get system controller
> > ready as soon as possible.
> > The patch provides early_syscon_initialization
> > which create early mapping for all syscon compatible
> > devices in early_syscon_probe.
> > Regmap is get via syscon_early_regmap_lookup_by_phandle()
> >
> > Regular device probes attach device to regmap
> > via regmap_attach_dev().
> >
> > For early syscon initialization is necessary to extend
> > struct syscon and provide remove function
> > which unmap all early init structures.
> >
> > Signed-off-by: Michal Simek <[email protected]>
> > ---
> ...
>
> > +static struct of_device_id of_syscon_ids[] = {
> > + { .compatible = "syscon" },
> > + {},
> > };
>
> You should move syscon_ids out of #ifdef CONFIG_OF

Oh, confused, sorry for noise.

---
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2014-02-19 11:41:40

by Lee Jones

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/2] mfd: syscon: Support early initialization

FAO Arnd, Mark,

> Some platforms need to get system controller
> ready as soon as possible.
> The patch provides early_syscon_initialization
> which create early mapping for all syscon compatible
> devices in early_syscon_probe.
> Regmap is get via syscon_early_regmap_lookup_by_phandle()
>
> Regular device probes attach device to regmap
> via regmap_attach_dev().
>
> For early syscon initialization is necessary to extend
> struct syscon and provide remove function
> which unmap all early init structures.
>
> Signed-off-by: Michal Simek <[email protected]>
> ---
>
> Changes in v2:
> - Fix bad logic in early_syscon_probe
> - Fix compilation failure for x86_64 reported by zero day testing system
> - Regmap change available here
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/nodev
>
> drivers/mfd/syscon.c | 128 +++++++++++++++++++++++++++++++++++++++------
> include/linux/mfd/syscon.h | 11 ++++
> 2 files changed, 122 insertions(+), 17 deletions(-)

I have the same reservations as last time:

http://archive.arm.linux.org.uk/lurker/message/20140212.095424.96cb7281.html

I believe you were waiting for Arnd and/or Mark to comment.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-02-19 11:44:56

by Michal Simek

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/2] mfd: syscon: Support early initialization

On 02/19/2014 12:41 PM, Lee Jones wrote:
> FAO Arnd, Mark,
>
>> Some platforms need to get system controller
>> ready as soon as possible.
>> The patch provides early_syscon_initialization
>> which create early mapping for all syscon compatible
>> devices in early_syscon_probe.
>> Regmap is get via syscon_early_regmap_lookup_by_phandle()
>>
>> Regular device probes attach device to regmap
>> via regmap_attach_dev().
>>
>> For early syscon initialization is necessary to extend
>> struct syscon and provide remove function
>> which unmap all early init structures.
>>
>> Signed-off-by: Michal Simek <[email protected]>
>> ---
>>
>> Changes in v2:
>> - Fix bad logic in early_syscon_probe
>> - Fix compilation failure for x86_64 reported by zero day testing system
>> - Regmap change available here
>> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/nodev
>>
>> drivers/mfd/syscon.c | 128 +++++++++++++++++++++++++++++++++++++++------
>> include/linux/mfd/syscon.h | 11 ++++
>> 2 files changed, 122 insertions(+), 17 deletions(-)
>
> I have the same reservations as last time:
>
> http://archive.arm.linux.org.uk/lurker/message/20140212.095424.96cb7281.html
>
> I believe you were waiting for Arnd and/or Mark to comment.

yes on Arnd because Mark already applied that regmap part.
But of course any input how to get this done will be helpful.

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: http://www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



Attachments:
signature.asc (263.00 B)
OpenPGP digital signature

2014-02-19 13:05:29

by Mark Brown

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/2] mfd: syscon: Support early initialization

On Wed, Feb 19, 2014 at 12:44:50PM +0100, Michal Simek wrote:
> On 02/19/2014 12:41 PM, Lee Jones wrote:

> > I believe you were waiting for Arnd and/or Mark to comment.

> yes on Arnd because Mark already applied that regmap part.
> But of course any input how to get this done will be helpful.

Like I said I've never seen the user you're adding for the regmap API so
I've no particular opinion on it.


Attachments:
(No filename) (404.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-19 13:51:46

by Michal Simek

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/2] mfd: syscon: Support early initialization

On 02/19/2014 01:17 PM, Mark Brown wrote:
> On Wed, Feb 19, 2014 at 12:44:50PM +0100, Michal Simek wrote:
>> On 02/19/2014 12:41 PM, Lee Jones wrote:
>
>>> I believe you were waiting for Arnd and/or Mark to comment.
>
>> yes on Arnd because Mark already applied that regmap part.
>> But of course any input how to get this done will be helpful.
>
> Like I said I've never seen the user you're adding for the regmap API so
> I've no particular opinion on it.

2/2 is the code where I would like to use this when clk subsystem
start to use better io helper functions then just static inline
clk_readl/clk_writel.

Then my 2/2 driver will be just nicer than current implementation.

Regarding syscon changes. I think the right question is if this driver
should be still in drivers/mfd/ or should be moved to somewhere else
(drivers/base for example).

Thanks,
Michal


--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: http://www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



Attachments:
signature.asc (263.00 B)
OpenPGP digital signature

2014-02-19 14:00:10

by Mark Brown

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/2] mfd: syscon: Support early initialization

On Wed, Feb 19, 2014 at 02:51:36PM +0100, Michal Simek wrote:
> On 02/19/2014 01:17 PM, Mark Brown wrote:

> > Like I said I've never seen the user you're adding for the regmap API so
> > I've no particular opinion on it.

> 2/2 is the code where I would like to use this when clk subsystem
> start to use better io helper functions then just static inline
> clk_readl/clk_writel.

> Then my 2/2 driver will be just nicer than current implementation.

OK, but I still haven't seen the code (or Lee's concerns for that
matter).


Attachments:
(No filename) (527.00 B)
e
signature.asc (836.00 B)
Digital signature
Download all attachments