Message ID | 1462124192-8748-8-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
On Sun, May 01, 2016 at 11:35:55AM -0600, Simon Glass wrote: > Add some functions needed by the SCSI code. This allows it to be compiled > for sandbox, thus increasing build coverage. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v2: None > > drivers/block/Makefile | 2 +- > drivers/block/sandbox_scsi.c | 29 +++++++++++++++++++++++++++++ > 2 files changed, 30 insertions(+), 1 deletion(-) > create mode 100644 drivers/block/sandbox_scsi.c > > diff --git a/drivers/block/Makefile b/drivers/block/Makefile > index b832ae1..3b48eac 100644 > --- a/drivers/block/Makefile > +++ b/drivers/block/Makefile > @@ -22,7 +22,7 @@ obj-$(CONFIG_SATA_MV) += sata_mv.o > obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o > obj-$(CONFIG_SATA_SIL) += sata_sil.o > obj-$(CONFIG_IDE_SIL680) += sil680.o > -obj-$(CONFIG_SANDBOX) += sandbox.o > +obj-$(CONFIG_SANDBOX) += sandbox.o sandbox_scsi.o > obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o > obj-$(CONFIG_SYSTEMACE) += systemace.o > obj-$(CONFIG_BLOCK_CACHE) += blkcache.o > diff --git a/drivers/block/sandbox_scsi.c b/drivers/block/sandbox_scsi.c > new file mode 100644 > index 0000000..d342a7a > --- /dev/null > +++ b/drivers/block/sandbox_scsi.c > @@ -0,0 +1,29 @@ > +/* > + * Copyright (C) 2015 Google, Inc > + * Written by Simon Glass <sjg@chromium.org> > + * > + * SPDX-License-Identifier: GPL-2.0+ > + * > + * This file contains dummy implementations of SCSI functions requried so > + * that CONFIG_SCSI_can be enabled for sandbox. Typo. And I assume long term we can delete this file as we should be able to eventually compile in the various SCSI controllers and have them be not probed and OK, yes (and similar for SATA)?
Hi Tom, On 2 May 2016 at 19:02, Tom Rini <trini@konsulko.com> wrote: > On Sun, May 01, 2016 at 11:35:55AM -0600, Simon Glass wrote: > >> Add some functions needed by the SCSI code. This allows it to be compiled >> for sandbox, thus increasing build coverage. >> >> Signed-off-by: Simon Glass <sjg@chromium.org> >> --- >> >> Changes in v2: None >> >> drivers/block/Makefile | 2 +- >> drivers/block/sandbox_scsi.c | 29 +++++++++++++++++++++++++++++ >> 2 files changed, 30 insertions(+), 1 deletion(-) >> create mode 100644 drivers/block/sandbox_scsi.c >> >> diff --git a/drivers/block/Makefile b/drivers/block/Makefile >> index b832ae1..3b48eac 100644 >> --- a/drivers/block/Makefile >> +++ b/drivers/block/Makefile >> @@ -22,7 +22,7 @@ obj-$(CONFIG_SATA_MV) += sata_mv.o >> obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o >> obj-$(CONFIG_SATA_SIL) += sata_sil.o >> obj-$(CONFIG_IDE_SIL680) += sil680.o >> -obj-$(CONFIG_SANDBOX) += sandbox.o >> +obj-$(CONFIG_SANDBOX) += sandbox.o sandbox_scsi.o >> obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o >> obj-$(CONFIG_SYSTEMACE) += systemace.o >> obj-$(CONFIG_BLOCK_CACHE) += blkcache.o >> diff --git a/drivers/block/sandbox_scsi.c b/drivers/block/sandbox_scsi.c >> new file mode 100644 >> index 0000000..d342a7a >> --- /dev/null >> +++ b/drivers/block/sandbox_scsi.c >> @@ -0,0 +1,29 @@ >> +/* >> + * Copyright (C) 2015 Google, Inc >> + * Written by Simon Glass <sjg@chromium.org> >> + * >> + * SPDX-License-Identifier: GPL-2.0+ >> + * >> + * This file contains dummy implementations of SCSI functions requried so >> + * that CONFIG_SCSI_can be enabled for sandbox. > > Typo. And I assume long term we can delete this file as we should be > able to eventually compile in the various SCSI controllers and have them > be not probed and OK, yes (and similar for SATA)? Yes that's right. Once there is a proper set of SCSi operations we can use those instead of these functions. Regards, Simon
On 2 May 2016 at 19:02, Tom Rini <trini@konsulko.com> wrote: > On Sun, May 01, 2016 at 11:35:55AM -0600, Simon Glass wrote: > >> Add some functions needed by the SCSI code. This allows it to be compiled >> for sandbox, thus increasing build coverage. >> >> Signed-off-by: Simon Glass <sjg@chromium.org> >> --- >> >> Changes in v2: None >> >> drivers/block/Makefile | 2 +- >> drivers/block/sandbox_scsi.c | 29 +++++++++++++++++++++++++++++ >> 2 files changed, 30 insertions(+), 1 deletion(-) >> create mode 100644 drivers/block/sandbox_scsi.c Applied to u-boot-dm.
diff --git a/drivers/block/Makefile b/drivers/block/Makefile index b832ae1..3b48eac 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -22,7 +22,7 @@ obj-$(CONFIG_SATA_MV) += sata_mv.o obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o obj-$(CONFIG_SATA_SIL) += sata_sil.o obj-$(CONFIG_IDE_SIL680) += sil680.o -obj-$(CONFIG_SANDBOX) += sandbox.o +obj-$(CONFIG_SANDBOX) += sandbox.o sandbox_scsi.o obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o obj-$(CONFIG_SYSTEMACE) += systemace.o obj-$(CONFIG_BLOCK_CACHE) += blkcache.o diff --git a/drivers/block/sandbox_scsi.c b/drivers/block/sandbox_scsi.c new file mode 100644 index 0000000..d342a7a --- /dev/null +++ b/drivers/block/sandbox_scsi.c @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2015 Google, Inc + * Written by Simon Glass <sjg@chromium.org> + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This file contains dummy implementations of SCSI functions requried so + * that CONFIG_SCSI_can be enabled for sandbox. + */ + +#include <common.h> +#include <scsi.h> + +void scsi_bus_reset(void) +{ +} + +void scsi_init(void) +{ +} + +int scsi_exec(ccb *pccb) +{ + return 0; +} + +void scsi_print_error(ccb *pccb) +{ +}
Add some functions needed by the SCSI code. This allows it to be compiled for sandbox, thus increasing build coverage. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v2: None drivers/block/Makefile | 2 +- drivers/block/sandbox_scsi.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 drivers/block/sandbox_scsi.c