* [U-Boot] [PATCH 0/3] fix for build break with CONFIG_DISK scsi_init()
@ 2016-03-03 5:06 Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK Mugunthan V N
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Mugunthan V N @ 2016-03-03 5:06 UTC (permalink / raw)
To: u-boot
This series fixes the build break with the SATA DM bringup series
on TI DRA7xx platformi [1].
Simon, I am not able to build the seires for chromebook_link, may
be because of the compiler I have, can you verify this series?
arch/x86/lib/built-in.o: In function `__wrap___udivdi3':
/home/mugunthan/workspace/git/work/u-boot/dm-sata/arch/x86/lib/gcc.c:25: undefined reference to `__normal___udivdi3'
Makefile:1171: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1
[1]: https://www.mail-archive.com/u-boot at lists.denx.de/msg202781.html
Mugunthan V N (3):
drivers: block: Kconfig: set default n to CONFIG_DISK
configs: chromebook_link: enable CONFIG_DISK for accessing sata disk
drive
cmd: scsi: compile out scsi_init when CONFIG_DISK is defined
cmd/scsi.c | 3 ++-
configs/chromebook_link_defconfig | 1 +
drivers/block/Kconfig | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
--
2.7.2.333.g70bd996
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK
2016-03-03 5:06 [U-Boot] [PATCH 0/3] fix for build break with CONFIG_DISK scsi_init() Mugunthan V N
@ 2016-03-03 5:06 ` Mugunthan V N
2016-03-07 2:39 ` Simon Glass
2016-03-03 5:06 ` [U-Boot] [PATCH 2/3] configs: chromebook_link: enable CONFIG_DISK for accessing sata disk drive Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 3/3] cmd: scsi: compile out scsi_init when CONFIG_DISK is defined Mugunthan V N
2 siblings, 1 reply; 9+ messages in thread
From: Mugunthan V N @ 2016-03-03 5:06 UTC (permalink / raw)
To: u-boot
When a platform is converted to support DM and when its scsi
driver is not converted to support DM, there is a build break as
multiple definition of scsi_init(). So select CONFIG_DISK only
when the platform supports CONFIG_DISK.
drivers/built-in.o: In function `scsi_init':
/home/mugunthan/workspace/git/work/u-boot/dm-sata/drivers/block/disk-uclass.c:37: multiple definition of `scsi_init'
board/sunxi/built-in.o:/home/mugunthan/workspace/git/work/u-boot/dm-sata/board/sunxi/ahci.c:74: first defined here
Makefile:1171: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/block/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 915c1eb..e62bf75 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -1,7 +1,7 @@
config DISK
bool "Support disk controllers with driver model"
depends on DM
- default y if DM
+ default n if DM
help
This enables a uclass for disk controllers in U-Boot. Various driver
types can use this, such as AHCI/SATA. It does not provide any standard
--
2.7.2.333.g70bd996
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/3] configs: chromebook_link: enable CONFIG_DISK for accessing sata disk drive
2016-03-03 5:06 [U-Boot] [PATCH 0/3] fix for build break with CONFIG_DISK scsi_init() Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK Mugunthan V N
@ 2016-03-03 5:06 ` Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 3/3] cmd: scsi: compile out scsi_init when CONFIG_DISK is defined Mugunthan V N
2 siblings, 0 replies; 9+ messages in thread
From: Mugunthan V N @ 2016-03-03 5:06 UTC (permalink / raw)
To: u-boot
As the CONFIG_DISK Kconfig default value is changed to 'n',
select CONFIG_DISK for chromebook_link in defconfig
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
configs/chromebook_link_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig
index 1cee7d4..4ab03c7 100644
--- a/configs/chromebook_link_defconfig
+++ b/configs/chromebook_link_defconfig
@@ -48,3 +48,4 @@ CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
CONFIG_FRAMEBUFFER_VESA_MODE_11A=y
CONFIG_USE_PRIVATE_LIBGCC=y
CONFIG_TPM=y
+CONFIG_DISK=y
--
2.7.2.333.g70bd996
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/3] cmd: scsi: compile out scsi_init when CONFIG_DISK is defined
2016-03-03 5:06 [U-Boot] [PATCH 0/3] fix for build break with CONFIG_DISK scsi_init() Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 2/3] configs: chromebook_link: enable CONFIG_DISK for accessing sata disk drive Mugunthan V N
@ 2016-03-03 5:06 ` Mugunthan V N
2 siblings, 0 replies; 9+ messages in thread
From: Mugunthan V N @ 2016-03-03 5:06 UTC (permalink / raw)
To: u-boot
When CONFIG_DISK is defined, disk_uclass takes care of scsi_init,
so compile out scsi_init when CONFIG_DISK is defined.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
cmd/scsi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmd/scsi.c b/cmd/scsi.c
index bc7d1b6..e2ae046 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -181,7 +181,8 @@ int scsi_get_disk_count(void)
return scsi_max_devs;
}
-#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT) && \
+ !defined(CONFIG_DISK)
void scsi_init(void)
{
int busdevfunc = -1;
--
2.7.2.333.g70bd996
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK
2016-03-03 5:06 ` [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK Mugunthan V N
@ 2016-03-07 2:39 ` Simon Glass
2016-03-08 6:30 ` Mugunthan V N
0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2016-03-07 2:39 UTC (permalink / raw)
To: u-boot
Hi Mugunthan,
On 2 March 2016 at 22:06, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> When a platform is converted to support DM and when its scsi
> driver is not converted to support DM, there is a build break as
> multiple definition of scsi_init(). So select CONFIG_DISK only
> when the platform supports CONFIG_DISK.
>
> drivers/built-in.o: In function `scsi_init':
> /home/mugunthan/workspace/git/work/u-boot/dm-sata/drivers/block/disk-uclass.c:37: multiple definition of `scsi_init'
> board/sunxi/built-in.o:/home/mugunthan/workspace/git/work/u-boot/dm-sata/board/sunxi/ahci.c:74: first defined here
> Makefile:1171: recipe for target 'u-boot' failed
> make: *** [u-boot] Error 1
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
> drivers/block/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
This is because you are defining scsi_init() in the uclass, but I
don't think that is a great idea. Or at least it should only be
defined if DISK is enabled.
Regards,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK
2016-03-07 2:39 ` Simon Glass
@ 2016-03-08 6:30 ` Mugunthan V N
2016-03-13 2:52 ` Simon Glass
0 siblings, 1 reply; 9+ messages in thread
From: Mugunthan V N @ 2016-03-08 6:30 UTC (permalink / raw)
To: u-boot
Hi Simon
On Monday 07 March 2016 08:09 AM, Simon Glass wrote:
> Hi Mugunthan,
>
> On 2 March 2016 at 22:06, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> > When a platform is converted to support DM and when its scsi
>> > driver is not converted to support DM, there is a build break as
>> > multiple definition of scsi_init(). So select CONFIG_DISK only
>> > when the platform supports CONFIG_DISK.
>> >
>> > drivers/built-in.o: In function `scsi_init':
>> > /home/mugunthan/workspace/git/work/u-boot/dm-sata/drivers/block/disk-uclass.c:37: multiple definition of `scsi_init'
>> > board/sunxi/built-in.o:/home/mugunthan/workspace/git/work/u-boot/dm-sata/board/sunxi/ahci.c:74: first defined here
>> > Makefile:1171: recipe for target 'u-boot' failed
>> > make: *** [u-boot] Error 1
>> >
>> > Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
>> > ---
>> > drivers/block/Kconfig | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
> This is because you are defining scsi_init() in the uclass, but I
> don't think that is a great idea. Or at least it should only be
> defined if DISK is enabled.
By default if DM is enabled DISK is also enabled as the Kconfig default
is "y if DM", So this patch makes default n for DISK so that it can be
enabled in platform defconfig which supports CONFIG_DISK.
Regards
Mugunthan V N
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK
2016-03-08 6:30 ` Mugunthan V N
@ 2016-03-13 2:52 ` Simon Glass
2016-03-13 13:08 ` Tom Rini
0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2016-03-13 2:52 UTC (permalink / raw)
To: u-boot
Hi Mugunthan,
On 7 March 2016 at 23:30, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> Hi Simon
>
> On Monday 07 March 2016 08:09 AM, Simon Glass wrote:
>> Hi Mugunthan,
>>
>> On 2 March 2016 at 22:06, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>>> > When a platform is converted to support DM and when its scsi
>>> > driver is not converted to support DM, there is a build break as
>>> > multiple definition of scsi_init(). So select CONFIG_DISK only
>>> > when the platform supports CONFIG_DISK.
>>> >
>>> > drivers/built-in.o: In function `scsi_init':
>>> > /home/mugunthan/workspace/git/work/u-boot/dm-sata/drivers/block/disk-uclass.c:37: multiple definition of `scsi_init'
>>> > board/sunxi/built-in.o:/home/mugunthan/workspace/git/work/u-boot/dm-sata/board/sunxi/ahci.c:74: first defined here
>>> > Makefile:1171: recipe for target 'u-boot' failed
>>> > make: *** [u-boot] Error 1
>>> >
>>> > Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
>>> > ---
>>> > drivers/block/Kconfig | 2 +-
>>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> This is because you are defining scsi_init() in the uclass, but I
>> don't think that is a great idea. Or at least it should only be
>> defined if DISK is enabled.
>
> By default if DM is enabled DISK is also enabled as the Kconfig default
> is "y if DM", So this patch makes default n for DISK so that it can be
> enabled in platform defconfig which supports CONFIG_DISK.
I'm trying to get my blk uclass applied - part of it is in u-boot-dm/next.
Then I think we should drop UCLASS_DISK. I'll take a look at this and
then we can figure out your patch.
I thought it might go in this release, but since it didn't, we may as
well do things properly.
Regards,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK
2016-03-13 2:52 ` Simon Glass
@ 2016-03-13 13:08 ` Tom Rini
2016-04-09 16:02 ` Simon Glass
0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2016-03-13 13:08 UTC (permalink / raw)
To: u-boot
On Sat, Mar 12, 2016 at 07:52:01PM -0700, Simon Glass wrote:
> Hi Mugunthan,
>
> On 7 March 2016 at 23:30, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> > Hi Simon
> >
> > On Monday 07 March 2016 08:09 AM, Simon Glass wrote:
> >> Hi Mugunthan,
> >>
> >> On 2 March 2016 at 22:06, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> >>> > When a platform is converted to support DM and when its scsi
> >>> > driver is not converted to support DM, there is a build break as
> >>> > multiple definition of scsi_init(). So select CONFIG_DISK only
> >>> > when the platform supports CONFIG_DISK.
> >>> >
> >>> > drivers/built-in.o: In function `scsi_init':
> >>> > /home/mugunthan/workspace/git/work/u-boot/dm-sata/drivers/block/disk-uclass.c:37: multiple definition of `scsi_init'
> >>> > board/sunxi/built-in.o:/home/mugunthan/workspace/git/work/u-boot/dm-sata/board/sunxi/ahci.c:74: first defined here
> >>> > Makefile:1171: recipe for target 'u-boot' failed
> >>> > make: *** [u-boot] Error 1
> >>> >
> >>> > Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> >>> > ---
> >>> > drivers/block/Kconfig | 2 +-
> >>> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >> This is because you are defining scsi_init() in the uclass, but I
> >> don't think that is a great idea. Or at least it should only be
> >> defined if DISK is enabled.
> >
> > By default if DM is enabled DISK is also enabled as the Kconfig default
> > is "y if DM", So this patch makes default n for DISK so that it can be
> > enabled in platform defconfig which supports CONFIG_DISK.
>
> I'm trying to get my blk uclass applied - part of it is in u-boot-dm/next.
>
> Then I think we should drop UCLASS_DISK. I'll take a look at this and
> then we can figure out your patch.
>
> I thought it might go in this release, but since it didn't, we may as
> well do things properly.
Yes, I had hoped to take it this release but it got too close to the end
before we (mostly...) had the Kconfig changes to not break other boards
done so lets do it better in the next release instead.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160313/e26de060/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK
2016-03-13 13:08 ` Tom Rini
@ 2016-04-09 16:02 ` Simon Glass
0 siblings, 0 replies; 9+ messages in thread
From: Simon Glass @ 2016-04-09 16:02 UTC (permalink / raw)
To: u-boot
Hi,
On 13 March 2016 at 07:08, Tom Rini <trini@konsulko.com> wrote:
>
> On Sat, Mar 12, 2016 at 07:52:01PM -0700, Simon Glass wrote:
> > Hi Mugunthan,
> >
> > On 7 March 2016 at 23:30, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> > > Hi Simon
> > >
> > > On Monday 07 March 2016 08:09 AM, Simon Glass wrote:
> > >> Hi Mugunthan,
> > >>
> > >> On 2 March 2016 at 22:06, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> > >>> > When a platform is converted to support DM and when its scsi
> > >>> > driver is not converted to support DM, there is a build break as
> > >>> > multiple definition of scsi_init(). So select CONFIG_DISK only
> > >>> > when the platform supports CONFIG_DISK.
> > >>> >
> > >>> > drivers/built-in.o: In function `scsi_init':
> > >>> > /home/mugunthan/workspace/git/work/u-boot/dm-sata/drivers/block/disk-uclass.c:37: multiple definition of `scsi_init'
> > >>> > board/sunxi/built-in.o:/home/mugunthan/workspace/git/work/u-boot/dm-sata/board/sunxi/ahci.c:74: first defined here
> > >>> > Makefile:1171: recipe for target 'u-boot' failed
> > >>> > make: *** [u-boot] Error 1
> > >>> >
> > >>> > Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> > >>> > ---
> > >>> > drivers/block/Kconfig | 2 +-
> > >>> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >> This is because you are defining scsi_init() in the uclass, but I
> > >> don't think that is a great idea. Or at least it should only be
> > >> defined if DISK is enabled.
> > >
> > > By default if DM is enabled DISK is also enabled as the Kconfig default
> > > is "y if DM", So this patch makes default n for DISK so that it can be
> > > enabled in platform defconfig which supports CONFIG_DISK.
> >
> > I'm trying to get my blk uclass applied - part of it is in u-boot-dm/next.
> >
> > Then I think we should drop UCLASS_DISK. I'll take a look at this and
> > then we can figure out your patch.
> >
> > I thought it might go in this release, but since it didn't, we may as
> > well do things properly.
>
> Yes, I had hoped to take it this release but it got too close to the end
> before we (mostly...) had the Kconfig changes to not break other boards
> done so lets do it better in the next release instead.
I've been out for a few weeks but I plan to get a new series out next
week that drops UCLASS_DISK, among other things.
Regards,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-04-09 16:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 5:06 [U-Boot] [PATCH 0/3] fix for build break with CONFIG_DISK scsi_init() Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK Mugunthan V N
2016-03-07 2:39 ` Simon Glass
2016-03-08 6:30 ` Mugunthan V N
2016-03-13 2:52 ` Simon Glass
2016-03-13 13:08 ` Tom Rini
2016-04-09 16:02 ` Simon Glass
2016-03-03 5:06 ` [U-Boot] [PATCH 2/3] configs: chromebook_link: enable CONFIG_DISK for accessing sata disk drive Mugunthan V N
2016-03-03 5:06 ` [U-Boot] [PATCH 3/3] cmd: scsi: compile out scsi_init when CONFIG_DISK is defined Mugunthan V N
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox