aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorTom Rini2016-12-09 07:56:54 -0500
committerTom Rini2016-12-09 07:56:54 -0500
commit361a879902a3cbdb692149a1ac580e3199e771ba (patch)
tree22d8f65bdf2e41096d13f2bfd458fb25b3c3698d /drivers/block
parent3edc0c252257e4afed163a3a74aba24a5509b198 (diff)
Revert "Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze"
This reverts commit 3edc0c252257e4afed163a3a74aba24a5509b198, reversing changes made to bb135a0180c31fbd7456021fb9700b49bba7f533.
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/Kconfig22
-rw-r--r--drivers/block/Makefile1
-rw-r--r--drivers/block/ahci.c30
-rw-r--r--drivers/block/blk-uclass.c2
-rw-r--r--drivers/block/sata_ceva.c41
-rw-r--r--drivers/block/scsi-uclass.c27
6 files changed, 11 insertions, 112 deletions
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 88e66e2377a..fe5aa07f921 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -19,15 +19,6 @@ config AHCI
operations at present. The block device interface has not been converted
to driver model.
-config DM_SCSI
- bool "Support SCSI controllers with driver model"
- depends on BLK
- help
- This option enables the SCSI (Small Computer System Interface) uclass
- which supports SCSI and SATA HDDs. For every device configuration
- (IDs/LUNs) a block device is created with RAW read/write and
- filesystem support.
-
config BLOCK_CACHE
bool "Use block device cache"
default n
@@ -36,16 +27,3 @@ config BLOCK_CACHE
This is most useful when accessing filesystems under U-Boot since
it will prevent repeated reads from directory structures and other
filesystem data structures.
-
-menu "SATA/SCSI device support"
-
-config SATA_CEVA
- bool "Ceva Sata controller"
- depends on AHCI
- depends on DM_SCSI
- help
- This option enables Ceva Sata controller hard IP available on Xilinx
- ZynqMP. Support up to 2 external devices. Complient with SATA 3.1 and
- AHCI 1.3 specifications with hot-plug detect feature.
-
-endmenu
diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index a72feecd545..436b79f9816 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -12,7 +12,6 @@ obj-y += blk_legacy.o
endif
obj-$(CONFIG_AHCI) += ahci-uclass.o
-obj-$(CONFIG_DM_SCSI) += scsi-uclass.o
obj-$(CONFIG_SCSI_AHCI) += ahci.o
obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
obj-$(CONFIG_FSL_SATA) += fsl_sata.o
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 3fa14a76b88..5139989d0b5 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -168,7 +168,7 @@ int ahci_reset(void __iomem *base)
static int ahci_host_init(struct ahci_probe_ent *probe_ent)
{
-#if !defined(CONFIG_SCSI_AHCI_PLAT) && !defined(CONFIG_DM_SCSI)
+#ifndef CONFIG_SCSI_AHCI_PLAT
# ifdef CONFIG_DM_PCI
struct udevice *dev = probe_ent->dev;
struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
@@ -198,7 +198,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
writel(cap_save, mmio + HOST_CAP);
writel_with_flush(0xf, mmio + HOST_PORTS_IMPL);
-#if !defined(CONFIG_SCSI_AHCI_PLAT) && !defined(CONFIG_DM_SCSI)
+#ifndef CONFIG_SCSI_AHCI_PLAT
# ifdef CONFIG_DM_PCI
if (pplat->vendor == PCI_VENDOR_ID_INTEL) {
u16 tmp16;
@@ -327,7 +327,6 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
writel(tmp | HOST_IRQ_EN, mmio + HOST_CTL);
tmp = readl(mmio + HOST_CTL);
debug("HOST_CTL 0x%x\n", tmp);
-#if !defined(CONFIG_DM_SCSI)
#ifndef CONFIG_SCSI_AHCI_PLAT
# ifdef CONFIG_DM_PCI
dm_pci_read_config16(dev, PCI_COMMAND, &tmp16);
@@ -339,15 +338,14 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
pci_write_config_word(pdev, PCI_COMMAND, tmp16);
# endif
#endif
-#endif
return 0;
}
static void ahci_print_info(struct ahci_probe_ent *probe_ent)
{
-#if !defined(CONFIG_SCSI_AHCI_PLAT) && !defined(CONFIG_DM_SCSI)
-# if defined(CONFIG_DM_PCI)
+#ifndef CONFIG_SCSI_AHCI_PLAT
+# ifdef CONFIG_DM_PCI
struct udevice *dev = probe_ent->dev;
# else
pci_dev_t pdev = probe_ent->dev;
@@ -374,7 +372,7 @@ static void ahci_print_info(struct ahci_probe_ent *probe_ent)
else
speed_s = "?";
-#if defined(CONFIG_SCSI_AHCI_PLAT) || defined(CONFIG_DM_SCSI)
+#ifdef CONFIG_SCSI_AHCI_PLAT
scc_s = "SATA";
#else
# ifdef CONFIG_DM_PCI
@@ -426,15 +424,13 @@ static void ahci_print_info(struct ahci_probe_ent *probe_ent)
}
#ifndef CONFIG_SCSI_AHCI_PLAT
-# if defined(CONFIG_DM_PCI) || defined(CONFIG_DM_SCSI)
+# ifdef CONFIG_DM_PCI
static int ahci_init_one(struct udevice *dev)
# else
static int ahci_init_one(pci_dev_t dev)
# endif
{
-#if !defined(CONFIG_DM_SCSI)
u16 vendor;
-#endif
int rc;
probe_ent = malloc(sizeof(struct ahci_probe_ent));
@@ -454,7 +450,6 @@ static int ahci_init_one(pci_dev_t dev)
probe_ent->pio_mask = 0x1f;
probe_ent->udma_mask = 0x7f; /*Fixme,assume to support UDMA6 */
-#if !defined(CONFIG_DM_SCSI)
#ifdef CONFIG_DM_PCI
probe_ent->mmio_base = dm_pci_map_bar(dev, PCI_BASE_ADDRESS_5,
PCI_REGION_MEM);
@@ -478,10 +473,6 @@ static int ahci_init_one(pci_dev_t dev)
if (vendor == 0x197b)
pci_write_config_byte(dev, 0x41, 0xa1);
#endif
-#else
- struct scsi_platdata *plat = dev_get_platdata(dev);
- probe_ent->mmio_base = (void *)plat->base;
-#endif
debug("ahci mmio_base=0x%p\n", probe_ent->mmio_base);
/* initialize adapter */
@@ -963,17 +954,14 @@ int scsi_exec(ccb *pccb)
}
-#if defined(CONFIG_DM_SCSI)
-void scsi_low_level_init(int busdevfunc, struct udevice *dev)
-#else
+
void scsi_low_level_init(int busdevfunc)
-#endif
{
int i;
u32 linkmap;
#ifndef CONFIG_SCSI_AHCI_PLAT
-# if defined(CONFIG_DM_PCI)
+# ifdef CONFIG_DM_PCI
struct udevice *dev;
int ret;
@@ -981,8 +969,6 @@ void scsi_low_level_init(int busdevfunc)
if (ret)
return;
ahci_init_one(dev);
-# elif defined(CONFIG_DM_SCSI)
- ahci_init_one(dev);
# else
ahci_init_one(busdevfunc);
# endif
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 38cb9388da6..2e041c2b3dc 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -26,7 +26,7 @@ static const char *if_typename_str[IF_TYPE_COUNT] = {
static enum uclass_id if_type_uclass_id[IF_TYPE_COUNT] = {
[IF_TYPE_IDE] = UCLASS_INVALID,
- [IF_TYPE_SCSI] = UCLASS_SCSI,
+ [IF_TYPE_SCSI] = UCLASS_INVALID,
[IF_TYPE_ATAPI] = UCLASS_INVALID,
[IF_TYPE_USB] = UCLASS_MASS_STORAGE,
[IF_TYPE_DOC] = UCLASS_INVALID,
diff --git a/drivers/block/sata_ceva.c b/drivers/block/sata_ceva.c
index 9b5466483aa..dcc3b90b17f 100644
--- a/drivers/block/sata_ceva.c
+++ b/drivers/block/sata_ceva.c
@@ -5,7 +5,6 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
-#include <dm.h>
#include <netdev.h>
#include <ahci.h>
#include <scsi.h>
@@ -74,9 +73,10 @@
#define DRV_NAME "ahci-ceva"
#define CEVA_FLAG_BROKEN_GEN2 1
-static int ceva_init_sata(ulong mmio)
+int init_sata(int dev)
{
ulong tmp;
+ ulong mmio = ZYNQMP_SATA_BASEADDR;
int i;
/*
@@ -111,40 +111,3 @@ static int ceva_init_sata(ulong mmio)
}
return 0;
}
-
-static int sata_ceva_probe(struct udevice *dev)
-{
- struct scsi_platdata *plat = dev_get_platdata(dev);
-
- ceva_init_sata(plat->base);
- return 0;
-}
-
-static const struct udevice_id sata_ceva_ids[] = {
- { .compatible = "ceva,ahci-1v84" },
- { }
-};
-
-static int sata_ceva_ofdata_to_platdata(struct udevice *dev)
-{
- struct scsi_platdata *plat = dev_get_platdata(dev);
-
- plat->base = dev_get_addr(dev);
- if (plat->base == FDT_ADDR_T_NONE)
- return -EINVAL;
-
- /* Hardcode number for ceva sata controller */
- plat->max_lun = 1; /* Actually two but untested */
- plat->max_id = 2;
-
- return 0;
-}
-
-U_BOOT_DRIVER(ceva_host_blk) = {
- .name = "ceva_sata",
- .id = UCLASS_SCSI,
- .of_match = sata_ceva_ids,
- .probe = sata_ceva_probe,
- .ofdata_to_platdata = sata_ceva_ofdata_to_platdata,
- .platdata_auto_alloc_size = sizeof(struct scsi_platdata),
-};
diff --git a/drivers/block/scsi-uclass.c b/drivers/block/scsi-uclass.c
deleted file mode 100644
index 05da6cdeab8..00000000000
--- a/drivers/block/scsi-uclass.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2015 Google, Inc
- * Written by Simon Glass <sjg@chromium.org>
- * Copyright (c) 2016 Xilinx, Inc
- * Written by Michal Simek
- *
- * Based on ahci-uclass.c
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-#include <dm.h>
-#include <scsi.h>
-
-static int scsi_post_probe(struct udevice *dev)
-{
- debug("%s: device %p\n", __func__, dev);
- scsi_low_level_init(0, dev);
- return 0;
-}
-
-UCLASS_DRIVER(scsi) = {
- .id = UCLASS_SCSI,
- .name = "scsi",
- .post_probe = scsi_post_probe,
-};