From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mugunthan V N Date: Tue, 8 Mar 2016 12:00:41 +0530 Subject: [U-Boot] [PATCH 1/3] drivers: block: Kconfig: set default n to CONFIG_DISK In-Reply-To: References: <1456981589-14403-1-git-send-email-mugunthanvnm@ti.com> <1456981589-14403-2-git-send-email-mugunthanvnm@ti.com> Message-ID: <56DE7191.1010702@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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 >> > --- >> > 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