dm: core: Add Kconfig for simple bus driver
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Add Kconfig entries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.
--- drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)
drivers/core/Kconfig +15 -0
@@ -59,3 +59,18 @@ config DM_SEQ_ALIAS Most boards will have a '/aliases' node containing the path to numbered devices (e.g. serial0 = &serial0). This feature can be disabled if it is not required, to save code space in SPL. + +config SIMPLE_BUS + bool "Support simple-bus driver" + depends on DM && OF_CONTROL + default y + help + Supports the 'simple-bus' driver, which is used on some systems. + +config SPL_SIMPLE_BUS + bool "Support simple-bus driver in SPL" + depends on SPL_DM && OF_CONTROL + default n + help + Supports the 'simple-bus' driver, which is used on some systems + in SPL.
drivers/core/Makefile +2 -3
@@ -5,9 +5,8 @@ # obj-y += device.o lists.o root.o uclass.o util.o -ifndef CONFIG_SPL_BUILD -obj-$(CONFIG_OF_CONTROL) += simple-bus.o -endif +obj-$(CONFIG_SIMPLE_BUS) += simple-bus.o +obj-$(CONFIG_SPL_SIMPLE_BUS) += simple-bus.o obj-$(CONFIG_DM_DEVICE_REMOVE) += device-remove.o obj-$(CONFIG_DM) += dump.o obj-$(CONFIG_OF_CONTROL) += regmap.o
Signature · 1 line
2.1.4
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 10 lines · Marek Vasut
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>--- drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 9 lines · Simon Glass
Quoted 8 lines · Marek Vasut
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
Quoted 5 lines
Quoted 3 lines
drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)Acked-by Simon Glass <[email protected]>
Whew, excellent. That's 1 patch in, 246+ to go ... :-)
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Hi Marek,
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Simon Glass
Quoted 8 lines · Marek Vasut
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)Acked-by Simon Glass <[email protected]>Whew, excellent. That's 1 patch in, 246+ to go ... :-)
Chin up, old boy. You'll get there :-)
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
In reply to Simon GlassHi Marek,
Quoted 5 lines · Simon Glass
Quoted 4 lines · Marek Vasut
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>--- drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)Acked-by Simon Glass <[email protected]>
I can't apply this right now as it breaks most tegra boards. We use a hack at present where we #undef things in config_uncmd_spl.h and that isn't visible to the Makefiles.
Assuming that Tom applies Masahiro's Kconfig improvements for SPL we can do it then.
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 1 line · Simon Glass
Hi Marek,
Hi Simon,
Quoted 14 lines · Simon Glass
Quoted 13 lines · Marek Vasut
Quoted 11 lines
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)
Quoted 8 lines
Quoted 1 line
Acked-by Simon Glass <[email protected]>I can't apply this right now as it breaks most tegra boards. We use a hack at present where we #undef things in
config_uncmd_spl.hand that isn't visible to the Makefiles.Assuming that Tom applies Masahiro's
Kconfigimprovements for SPL we can do it then.
Agh, OK, thanks for the heads up.
I hope this makes it into 2015.10, otherwise the SPL support for SoCFPGA will be completely useless.
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Hi Marek,
Quoted 25 lines · Marek Vasut
Quoted 1 line · Simon Glass
Hi Marek,
Hi Simon,
Quoted 20 lines · Simon Glass
Quoted 9 lines · Marek Vasut
Quoted 8 lines
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
Quoted 5 lines
Quoted 3 lines
drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)Acked-by Simon Glass <[email protected]>I can't apply this right now as it breaks most tegra boards. We use a hack at present where we #undef things in
config_uncmd_spl.hand that isn't visible to the Makefiles.
Quoted 7 lines
Quoted 2 lines
Assuming that Tom applies Masahiro's
Kconfigimprovements for SPL we can do it then.Agh, OK, thanks for the heads up.
I hope this makes it into 2015.10, otherwise the SPL support for SoCFPGA will be completely useless.
One way or another we'll figure this out sooner rather than later.
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 1 line · Simon Glass
Hi Marek,
Hi Simon,
Quoted 29 lines · Marek Vasut
Quoted 28 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi Simon,
Quoted 22 lines · Simon Glass
Quoted 9 lines · Marek Vasut
Quoted 8 lines
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
Quoted 5 lines
Quoted 3 lines
drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)Acked-by Simon Glass <[email protected]>I can't apply this right now as it breaks most tegra boards. We use a hack at present where we #undef things in
config_uncmd_spl.hand that isn't visible to the Makefiles.Assuming that Tom applies Masahiro's
Kconfigimprovements for SPL we can do it then.
Quoted 6 lines
Quoted 4 lines
Agh, OK, thanks for the heads up.
I hope this makes it into 2015.10, otherwise the SPL support for SoCFPGA will be completely useless.
One way or another we'll figure this out sooner rather than later.
I know :)
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 34 lines · Marek Vasut
Quoted 1 line · Simon Glass
Hi Marek,
Hi Simon,
Quoted 29 lines · Marek Vasut
Quoted 28 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi Simon,
Quoted 22 lines · Simon Glass
Quoted 9 lines · Marek Vasut
Quoted 8 lines
Add
Kconfigentries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
Quoted 5 lines
Quoted 3 lines
drivers/core/Kconfig | 15 +++++++++++++++ drivers/core/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-)Acked-by Simon Glass <[email protected]>I can't apply this right now as it breaks most tegra boards. We use a hack at present where we #undef things in
config_uncmd_spl.hand that isn't visible to the Makefiles.Assuming that Tom applies Masahiro's
Kconfigimprovements for SPL we can do it then.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Agh, OK, thanks for the heads up.
I hope this makes it into 2015.10, otherwise the SPL support for SoCFPGA will be completely useless.
One way or another we'll figure this out sooner rather than later.
I know :)
Masahiro's series landed so I have applied this to u-boot-dm.
Please check that it works as you expect.
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
On Saturday, August 22, 2015 at 03:40:26 PM, Simon Glass wrote:
Hi!
[...]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
One way or another we'll figure this out sooner rather than later.
I know :)
Masahiro's series landed so I have applied this to u-boot-dm.
Please check that it works as you expect.
I think we're having a minor duplicity here now. Check the drivers/core/Makefile, there's this bit already:
obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o
And since I have both CONFIG_OF_CONTROL and CONFIG_SPL_OF_CONTROL, I get the simple bus driver as well.
But I don't think that the current state is entirely correct. I propose the remove the above obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o from the Makefile to fix the duplicity and achieve the behavior you wanted to have. What do you think please ? I can send a quick patch.
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Hi Marek,
Quoted 19 lines · Marek Vasut
On Saturday, August 22, 2015 at 03:40:26 PM, Simon Glass wrote:
Hi!
[...]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
One way or another we'll figure this out sooner rather than later.
I know :)
Masahiro's series landed so I have applied this to u-boot-dm.
Please check that it works as you expect.
I think we're having a minor duplicity here now. Check the
drivers/core/Makefile, there's this bit already:obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o
Quoted 7 lines
And since I have both
CONFIG_OF_CONTROLandCONFIG_SPL_OF_CONTROL, I get the simple bus driver as well.But I don't think that the current state is entirely correct. I propose the remove the above obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o from the
Makefileto fix the duplicity and achieve the behavior you wanted to have. What do you think please ? I can send a quick patch.
Actually I think that is just a merge error that I made. Can you please check it now?
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 1 line · Simon Glass
Hi Marek,
Hi!
Quoted 23 lines · Marek Vasut
Quoted 22 lines · Simon Glass
Hi!
[...]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
One way or another we'll figure this out sooner rather than later.
I know :)
Masahiro's series landed so I have applied this to u-boot-dm.
Please check that it works as you expect.
I think we're having a minor duplicity here now. Check the
drivers/core/Makefile, there's this bit already:
obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.oAnd since I have both
CONFIG_OF_CONTROLandCONFIG_SPL_OF_CONTROL, I get the simple bus driver as well.
Quoted 7 lines
Quoted 4 lines
But I don't think that the current state is entirely correct. I propose the remove the above obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o from the
Makefileto fix the duplicity and achieve the behavior you wanted to have. What do you think please ? I can send a quick patch.Actually I think that is just a merge error that I made. Can you please check it now?
I think the in drivers/core/Kconfig , the SPL_SIMPLE_BUS should now depend on SPL_OF_CONTROL, not on OF_CONTROL, right ? :)
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Hi Marek,
Quoted 33 lines · Marek Vasut
Quoted 1 line · Simon Glass
Hi Marek,
Hi!
Quoted 28 lines · Marek Vasut
Quoted 26 lines · Simon Glass
Hi!
[...]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
One way or another we'll figure this out sooner rather than later.
I know :)
Masahiro's series landed so I have applied this to u-boot-dm.
Please check that it works as you expect.
I think we're having a minor duplicity here now. Check the
drivers/core/Makefile, there's this bit already:
obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.oAnd since I have both
CONFIG_OF_CONTROLandCONFIG_SPL_OF_CONTROL, I get the simple bus driver as well.But I don't think that the current state is entirely correct. I propose the remove the above obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o from the
Makefileto fix the duplicity and achieve the behavior you wanted to have. What do you think please ? I can send a quick patch.
Quoted 5 lines
Quoted 2 lines
Actually I think that is just a merge error that I made. Can you please check it now?
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)
Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 1 line · Simon Glass
Hi Marek,
Hi Simon,
Quoted 38 lines · Marek Vasut
Quoted 37 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi!
Quoted 31 lines · Marek Vasut
Quoted 19 lines · Simon Glass
Hi!
[...]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
One way or another we'll figure this out sooner rather than later.
I know :)
Masahiro's series landed so I have applied this to u-boot-dm.
Please check that it works as you expect.
I think we're having a minor duplicity here now. Check the
drivers/core/Makefile, there's this bit already:
obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.oQuoted 8 lines
And since I have both
CONFIG_OF_CONTROLandCONFIG_SPL_OF_CONTROL, I get the simple bus driver as well.But I don't think that the current state is entirely correct. I propose the remove the above obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o from the
Makefileto fix the duplicity and achieve the behavior you wanted to have. What do you think please ? I can send a quick patch.Actually I think that is just a merge error that I made. Can you please check it now?
Quoted 6 lines
Quoted 2 lines
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Heh :) I think that's the last missing bit, so feel free to fix it and we're good. But if you insist on a new patch, please do let me know :)
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Hi Marek,
Quoted 46 lines · Marek Vasut
Quoted 1 line · Simon Glass
Hi Marek,
Hi Simon,
Quoted 41 lines · Marek Vasut
Quoted 39 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi!
Quoted 23 lines · Marek Vasut
Quoted 22 lines · Simon Glass
Hi!
[...]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
One way or another we'll figure this out sooner rather than later.
I know :)
Masahiro's series landed so I have applied this to u-boot-dm.
Please check that it works as you expect.
I think we're having a minor duplicity here now. Check the
drivers/core/Makefile, there's this bit already:
obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.oAnd since I have both
CONFIG_OF_CONTROLandCONFIG_SPL_OF_CONTROL, I get the simple bus driver as well.Quoted 8 lines
Quoted 5 lines
But I don't think that the current state is entirely correct. I propose the remove the above obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o from the
Makefileto fix the duplicity and achieve the behavior you wanted to have. What do you think please ? I can send a quick patch.Actually I think that is just a merge error that I made. Can you please check it now?
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)
Quoted 6 lines
Quoted 3 lines
Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Heh :) I think that's the last missing bit, so feel free to fix it and we're good. But if you insist on a new patch, please do let me know :)
OK, done. Let me know how it looks.
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 1 line · Simon Glass
Hi Marek,
Hi Simon,
[...]
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Heh :) I think that's the last missing bit, so feel free to fix it and we're good. But if you insist on a new patch, please do let me know :)
OK, done. Let me know how it looks.
Looks great, thanks :)
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
2015-08-24 11:54 GMT+09:00 Marek Vasut <[email protected]>:
Quoted 14 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi Simon,
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Heh :) I think that's the last missing bit, so feel free to fix it and we're good. But if you insist on a new patch, please do let me know :)
OK, done. Let me know how it looks.
Looks great, thanks :)
Nope.
If CONFIG_OF_CONTROL is enabled and CONFIG_SIMPLE_BUS is disabled, I get build error.
LD u-bootdrivers/built-in.o: In function `dev_get_addr':/home/yamada/ref/u-boot-dm/drivers/core/device.c:571: undefined reference to `simple_bus_translate'
collect2: error: ld returned 1 exit status
make: *** [u-boot] Error 1
Do you really want to switch OF_CONTROL and SIMPLE_BUS separately?
simple-bus.c looks like a part of DM core rather than a driver because the address transformation (simple_bus_translate) is mandatory to handle reg properties in DTS correctly.
The reason for disabling SIMPLE_BUS but not OF_CONTROL, if any, is to save memory footprint of drivers/core/simple-bus.c Do you think it is significant?
I think this is enough:
obj-y += device.o lists.o root.o uclass.o util.o obj-$(CONFIG_DEVRES) += devres.o obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o obj-$(CONFIG_DM) += dump.o
obj-$(CONFIG_REGMAP) += regmap.o obj-$(CONFIG_SYSCON) += syscon-uclass.o
(drop "ifndef CONFIG_SPL_BUILD" and "endif")
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Quoted 20 lines · Masahiro Yamada
2015-08-24 11:54 GMT+09:00 Marek Vasut <[email protected]>:
Quoted 19 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi Simon,
[...]
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Heh :) I think that's the last missing bit, so feel free to fix it and we're good. But if you insist on a new patch, please do let me know :)
OK, done. Let me know how it looks.
Quoted 7 lines
Quoted 1 line
Looks great, thanks :)
Nope.
If
CONFIG_OF_CONTROLis enabled andCONFIG_SIMPLE_BUSis disabled, I get build error.
Hrm.
Quoted 9 lines
LD u-boot
drivers/built-in.o: In function `dev_get_addr':/home/yamada/ref/u-boot-dm/drivers/core/device.c:571: undefined reference to `simple_bus_translate'
collect2: error: ld returned 1 exit status
make: *** [u-boot] Error 1Do you really want to switch
OF_CONTROLandSIMPLE_BUSseparately?
I don't need it anymore in fact. I just needed to have simple-bus support enabled in SPL, which I have even without this patch now. This is how it came to be:
https://www.mail-archive.com/u-boot at lists.denx.de/msg179851.html
Quoted 19 lines
simple-bus.clooks like a part of DM core rather than a driver because the address transformation (simple_bus_translate) is mandatory to handle reg properties in DTS correctly.The reason for disabling
SIMPLE_BUSbut notOF_CONTROL, if any, is to save memory footprint ofdrivers/core/simple-bus.cDo you think it is significant?I think this is enough:
obj-y += device.o lists.o root.o uclass.o util.o obj-$(CONFIG_DEVRES) += devres.o obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o obj-$(CONFIG_DM) += dump.o
obj-$(CONFIG_REGMAP) += regmap.o obj-$(CONFIG_SYSCON) += syscon-uclass.o
Quoted 1 line
(drop "ifndef
CONFIG_SPL_BUILD" and "endif")
Feel free to apply the original patch ;-)
https://www.mail-archive.com/u-boot at lists.denx.de/msg178872.html
Best regards,
Marek Vasut
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
In reply to Masahiro YamadaHi Masahiro,
Quoted 41 lines · Masahiro Yamada
2015-08-24 11:54 GMT+09:00 Marek Vasut <[email protected]>:
Quoted 14 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi Simon,
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Heh :) I think that's the last missing bit, so feel free to fix it and we're good. But if you insist on a new patch, please do let me know :)
OK, done. Let me know how it looks.
Looks great, thanks :)
Nope.
If
CONFIG_OF_CONTROLis enabled andCONFIG_SIMPLE_BUSis disabled, I get build error.LD u-boot
drivers/built-in.o: In function `dev_get_addr':/home/yamada/ref/u-boot-dm/drivers/core/device.c:571: undefined reference to `simple_bus_translate'
collect2: error: ld returned 1 exit status
make: *** [u-boot] Error 1Do you really want to switch
OF_CONTROLandSIMPLE_BUSseparately?
Quoted 7 lines
simple-bus.clooks like a part of DM core rather than a driver because the address transformation (simple_bus_translate) is mandatory to handle reg properties in DTS correctly.The reason for disabling
SIMPLE_BUSbut notOF_CONTROL, if any, is to save memory footprint ofdrivers/core/simple-bus.cDo you think it is significant?
It's not large but it was enough for me to to split it out as an option recently. I'd like to avoid needless bloat particularly where it affects SPL.
We can fix that build error - it's just that we have the wrong condition:
#ifndef CONFIG_SPL_BUILD
if (device_get_uclass_id(dev->parent) == UCLASS_SIMPLE_BUS) addr = simple_bus_translate(dev->parent, addr); #endif
But I think this patch needs to be redone and resent since I am effectively rewriting it in the name of merge conflicts. I'll take a look.
Quoted 12 lines
I think this is enough:
obj-y += device.o lists.o root.o uclass.o util.o obj-$(CONFIG_DEVRES) += devres.o obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o obj-$(CONFIG_DM) += dump.o
obj-$(CONFIG_REGMAP) += regmap.o obj-$(CONFIG_SYSCON) += syscon-uclass.o
Quoted 1 line
(drop "ifndef
CONFIG_SPL_BUILD" and "endif")
Regards,
Simon
PATCH 1/1 dm: core: Add Kconfig for simple bus driver
Hi,
Quoted 59 lines · Simon Glass
Hi Masahiro,
Quoted 41 lines · Masahiro Yamada
2015-08-24 11:54 GMT+09:00 Marek Vasut <[email protected]>:
Quoted 14 lines · Simon Glass
Quoted 1 line
Hi Marek,
Hi Simon,
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
I think the in
drivers/core/Kconfig, theSPL_SIMPLE_BUSshould now depend onSPL_OF_CONTROL, not onOF_CONTROL, right ? :)Ah yes that sounds right. Would you like to send a new patch against mainline? I think it is best to consider this a rewrite rather than a merge!
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Heh :) I think that's the last missing bit, so feel free to fix it and we're good. But if you insist on a new patch, please do let me know :)
OK, done. Let me know how it looks.
Looks great, thanks :)
Nope.
If
CONFIG_OF_CONTROLis enabled andCONFIG_SIMPLE_BUSis disabled, I get build error.LD u-boot
drivers/built-in.o: In function `dev_get_addr':/home/yamada/ref/u-boot-dm/drivers/core/device.c:571: undefined reference to `simple_bus_translate'
collect2: error: ld returned 1 exit status
make: *** [u-boot] Error 1Do you really want to switch
OF_CONTROLandSIMPLE_BUSseparately?Quoted 7 lines
simple-bus.clooks like a part of DM core rather than a driver because the address transformation (simple_bus_translate) is mandatory to handle reg properties in DTS correctly.The reason for disabling
SIMPLE_BUSbut notOF_CONTROL, if any, is to save memory footprint ofdrivers/core/simple-bus.cDo you think it is significant?It's not large but it was enough for me to to split it out as an option recently. I'd like to avoid needless bloat particularly where it affects SPL.
We can fix that build error - it's just that we have the wrong condition:
Quoted 9 lines
#ifndef
CONFIG_SPL_BUILD
if (device_get_uclass_id(dev->parent)==UCLASS_SIMPLE_BUS) addr =simple_bus_translate(dev->parent, addr); #endifBut I think this patch needs to be redone and resent since I am effectively rewriting it in the name of merge conflicts. I'll take a look.
OK I've had another go at this, so if there are any other problems / changes, please submit a patch!
Applied (again) to u-boot-dm, thanks!
- Simon