diff mbox

of/platform: export of_default_bus_match_table

Message ID 1451960273-19934-1-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada Jan. 5, 2016, 2:17 a.m. UTC
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(+)

-- 
1.9.1

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

Comments

Masahiro Yamada Jan. 5, 2016, 10:50 a.m. UTC | #1
Hi Arnd,

2016-01-05 19:13 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> 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?



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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann Jan. 5, 2016, 11:48 a.m. UTC | #2
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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring Jan. 5, 2016, 2:21 p.m. UTC | #3
On Tue, Jan 5, 2016 at 5:48 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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.


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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)
 {