Devicetree
 help / color / mirror / Atom feed
* [PATCH] of/platform: export of_default_bus_match_table
@ 2016-01-05  2:17 Masahiro Yamada
  2016-01-05 10:13 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2016-01-05  2:17 UTC (permalink / raw)
  To: devicetree
  Cc: Paul Gortmaker, Arnd Bergmann, Olof Johansson, Masahiro Yamada,
	Frank Rowand, Rob Herring, linux-kernel, Grant Likely

Currently, drivers/bus/uniphier-system-bus.c is kept from being a
module due to the unresolved reference to of_default_bus_match_table.

Refer to commit 326ea45aa827 ("bus: uniphier: allow only built-in
driver").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/of/platform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index af98343..8d103e4 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -31,6 +31,7 @@ const struct of_device_id of_default_bus_match_table[] = {
 #endif /* CONFIG_ARM_AMBA */
 	{} /* Empty terminated list */
 };
+EXPORT_SYMBOL(of_default_bus_match_table);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] of/platform: export of_default_bus_match_table
  2016-01-05  2:17 [PATCH] of/platform: export of_default_bus_match_table Masahiro Yamada
@ 2016-01-05 10:13 ` Arnd Bergmann
  2016-01-05 10:50   ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-01-05 10:13 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: devicetree, Paul Gortmaker, Olof Johansson, Frank Rowand,
	Rob Herring, linux-kernel, Grant Likely

On Tuesday 05 January 2016 11:17:53 Masahiro Yamada wrote:
> Currently, drivers/bus/uniphier-system-bus.c is kept from being a
> module due to the unresolved reference to of_default_bus_match_table.
> 
> Refer to commit 326ea45aa827 ("bus: uniphier: allow only built-in
> driver").
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  drivers/of/platform.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index af98343..8d103e4 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -31,6 +31,7 @@ const struct of_device_id of_default_bus_match_table[] = {
>  #endif /* CONFIG_ARM_AMBA */
>         {} /* Empty terminated list */
>  };
> +EXPORT_SYMBOL(of_default_bus_match_table);

I wonder if the uniphier bus should actually use the default
match table at all. Sorry for not having thought of that when
I did my patch.

What kinds of devices do you see below this bus? Do you have multiple
levels of devices? Are they all platform devices or could they
be AMBA?

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of/platform: export of_default_bus_match_table
  2016-01-05 10:13 ` Arnd Bergmann
@ 2016-01-05 10:50   ` Masahiro Yamada
  2016-01-05 11:48     ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2016-01-05 10:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Paul Gortmaker, Olof Johansson,
	Frank Rowand, Rob Herring, Linux Kernel Mailing List,
	Grant Likely

Hi Arnd,

2016-01-05 19:13 GMT+09:00 Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>:
> On Tuesday 05 January 2016 11:17:53 Masahiro Yamada wrote:
>> Currently, drivers/bus/uniphier-system-bus.c is kept from being a
>> module due to the unresolved reference to of_default_bus_match_table.
>>
>> Refer to commit 326ea45aa827 ("bus: uniphier: allow only built-in
>> driver").
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
>> ---
>>
>>  drivers/of/platform.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>> index af98343..8d103e4 100644
>> --- a/drivers/of/platform.c
>> +++ b/drivers/of/platform.c
>> @@ -31,6 +31,7 @@ const struct of_device_id of_default_bus_match_table[] = {
>>  #endif /* CONFIG_ARM_AMBA */
>>         {} /* Empty terminated list */
>>  };
>> +EXPORT_SYMBOL(of_default_bus_match_table);
>
> I wonder if the uniphier bus should actually use the default
> match table at all. Sorry for not having thought of that when
> I did my patch.
>
> What kinds of devices do you see below this bus? Do you have multiple
> levels of devices? Are they all platform devices or could they
> be AMBA?


This bus is used to connect external (on-board) devices with the SoC.

So, no possibility for AMBA, but
I want "simple-bus" for grouping some device nodes.
Also, "simple-mfd" would be useful because an external device could be an MFD.


Please see arch/arm/boot/dts/uniphier-support-card.dtsi

It describes an add-on card (expansion board)
which has ETHER, UART, etc. on it.

I implemented it as "simple-bus".

This card is connected to the chip select 1
of the UniPhier System Bus.


-- 
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of/platform: export of_default_bus_match_table
  2016-01-05 10:50   ` Masahiro Yamada
@ 2016-01-05 11:48     ` Arnd Bergmann
  2016-01-05 14:21       ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-01-05 11:48 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: devicetree, Paul Gortmaker, Olof Johansson, Frank Rowand,
	Rob Herring, Linux Kernel Mailing List, Grant Likely

On Tuesday 05 January 2016 19:50:31 Masahiro Yamada wrote:
> 2016-01-05 19:13 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> > On Tuesday 05 January 2016 11:17:53 Masahiro Yamada wrote:
> 
> This bus is used to connect external (on-board) devices with the SoC.
> 
> So, no possibility for AMBA, but
> I want "simple-bus" for grouping some device nodes.
> Also, "simple-mfd" would be useful because an external device could be an MFD.
> 
> 
> Please see arch/arm/boot/dts/uniphier-support-card.dtsi
> 
> It describes an add-on card (expansion board)
> which has ETHER, UART, etc. on it.
> 
> I implemented it as "simple-bus".
> 
> This card is connected to the chip select 1
> of the UniPhier System Bus.
> 

Ok, got it. So you could alternatively define your own match table
in the driver with just "simple-bus" and  "simple-mfd". I think either
way is fine, let's see what the DT maintainers prefer.

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of/platform: export of_default_bus_match_table
  2016-01-05 11:48     ` Arnd Bergmann
@ 2016-01-05 14:21       ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2016-01-05 14:21 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Masahiro Yamada,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Paul Gortmaker, Olof Johansson, Frank Rowand,
	Linux Kernel Mailing List, Grant Likely

On Tue, Jan 5, 2016 at 5:48 AM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> On Tuesday 05 January 2016 19:50:31 Masahiro Yamada wrote:
>> 2016-01-05 19:13 GMT+09:00 Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>:
>> > On Tuesday 05 January 2016 11:17:53 Masahiro Yamada wrote:
>>
>> This bus is used to connect external (on-board) devices with the SoC.
>>
>> So, no possibility for AMBA, but
>> I want "simple-bus" for grouping some device nodes.
>> Also, "simple-mfd" would be useful because an external device could be an MFD.
>>
>>
>> Please see arch/arm/boot/dts/uniphier-support-card.dtsi
>>
>> It describes an add-on card (expansion board)
>> which has ETHER, UART, etc. on it.
>>
>> I implemented it as "simple-bus".
>>
>> This card is connected to the chip select 1
>> of the UniPhier System Bus.
>>
>
> Ok, got it. So you could alternatively define your own match table
> in the driver with just "simple-bus" and  "simple-mfd". I think either
> way is fine, let's see what the DT maintainers prefer.

I'd like a wrapper function here and try to eliminate non-default
matches (as well as auxdata). All but a few callers pass either
of_default_bus_match_table or NULL (populate only the immediate
children). So no, I don't want to see more match tables. It shouldn't
hurt to have extra entries in the match table (BTW, we should also
kill off "amba-bus" which is an ambiguous term).

If the wrapper was done as a static inline, we'd still need this
export, so I'm fine with this change and will apply it.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-05 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-05  2:17 [PATCH] of/platform: export of_default_bus_match_table Masahiro Yamada
2016-01-05 10:13 ` Arnd Bergmann
2016-01-05 10:50   ` Masahiro Yamada
2016-01-05 11:48     ` Arnd Bergmann
2016-01-05 14:21       ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox