Message ID | 1456981589-14403-2-git-send-email-mugunthanvnm@ti.com |
---|---|
State | Deferred |
Delegated to: | Simon Glass |
Headers | show |
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
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
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
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.
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
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
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(-)