diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/Kconfig | 9 | ||||
-rw-r--r-- | drivers/ata/ahci.c | 4 | ||||
-rw-r--r-- | drivers/serial/serial-uclass.c | 24 | ||||
-rw-r--r-- | drivers/spi/Kconfig | 1 |
4 files changed, 22 insertions, 16 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 3fe53d6d4f..049f7efd10 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -20,6 +20,14 @@ config SATA See also CMD_SATA which provides command-line support. +config SYS_SATA_MAX_PORTS + int "Maximum supported SATA ports" + depends on SCSI_AHCI && !DM_SCSI + default 1 + help + Sets the maximum number of ports to scan when looking for devices. + Ports from 0 to (this value - 1) are scanned. + config LIBATA bool help @@ -37,6 +45,7 @@ config AHCI_PCI bool "Support for PCI-based AHCI controller" depends on PCI depends on DM_SCSI + depends on SCSI_AHCI help Enables support for the PCI-based AHCI controller. diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 272c48b8e5..6998b82aa5 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -211,8 +211,8 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv) uc_priv->cap, uc_priv->port_map, uc_priv->n_ports); #if !defined(CONFIG_DM_SCSI) - if (uc_priv->n_ports > CONFIG_SYS_SCSI_MAX_SCSI_ID) - uc_priv->n_ports = CONFIG_SYS_SCSI_MAX_SCSI_ID; + if (uc_priv->n_ports > CONFIG_SYS_SATA_MAX_PORTS) + uc_priv->n_ports = CONFIG_SYS_SATA_MAX_PORTS; #endif for (i = 0; i < uc_priv->n_ports; i++) { diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 77d3f37372..067fae2614 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -31,7 +31,7 @@ static const unsigned long baudrate_table[] = CFG_SYS_BAUDRATE_TABLE; static int serial_check_stdout(const void *blob, struct udevice **devp) { int node = -1; - const char *str, *p, *name; + const char *str, *p; int namelen; /* Check for a chosen console */ @@ -39,20 +39,16 @@ static int serial_check_stdout(const void *blob, struct udevice **devp) if (str) { p = strchr(str, ':'); namelen = p ? p - str : strlen(str); + /* + * This also deals with things like + * + * stdout-path = "serial0:115200n8"; + * + * since fdt_path_offset_namelen() treats a str not + * beginning with '/' as an alias and thus applies + * fdt_get_alias_namelen() to it. + */ node = fdt_path_offset_namelen(blob, str, namelen); - - if (node < 0) { - /* - * Deal with things like - * stdout-path = "serial0:115200n8"; - * - * We need to look up the alias and then follow it to - * the correct node. - */ - name = fdt_get_alias_namelen(blob, str, namelen); - if (name) - node = fdt_path_offset(blob, name); - } } if (node < 0) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index cdd2304aeb..b44565b86f 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -573,6 +573,7 @@ endif # if DM_SPI config FSL_ESPI bool "Freescale eSPI driver" + depends on MPC85xx imply SPI_FLASH_BAR help Enable the Freescale eSPI driver. This driver can be used to |