summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/ide-sff.c9
-rw-r--r--drivers/mtd/nand/nand_s3c24xx.c2
-rw-r--r--drivers/of/of_path.c2
-rw-r--r--drivers/serial/efi-stdio.c3
-rw-r--r--drivers/serial/serial_ns16550.c19
-rw-r--r--drivers/usb/gadget/Kconfig1
6 files changed, 28 insertions, 8 deletions
diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c
index e32cc3f..6dc89d7 100644
--- a/drivers/ata/ide-sff.c
+++ b/drivers/ata/ide-sff.c
@@ -389,11 +389,10 @@ int ide_port_register(struct ide_port *ide)
ide->port.ops = &ide_ops;
ret = ata_port_register(&ide->port);
- if (!ret)
- ata_port_detect(&ide->port);
-
if (ret)
- free(ide);
+ return ret;
+
+ ata_port_detect(&ide->port);
- return ret;
+ return 0;
}
diff --git a/drivers/mtd/nand/nand_s3c24xx.c b/drivers/mtd/nand/nand_s3c24xx.c
index 83d4517..df22735 100644
--- a/drivers/mtd/nand/nand_s3c24xx.c
+++ b/drivers/mtd/nand/nand_s3c24xx.c
@@ -614,7 +614,7 @@ void __nand_boot_init s3c24x0_nand_load_image(void *dest, int size, int page)
void __nand_boot_init nand_boot(void)
{
void *dest = _text;
- int size = ld_var(_barebox_image_size);
+ int size = barebox_image_size;
int page = 0;
s3c24x0_nand_load_image(dest, size, page);
diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index 946b9c7..e0b2dc1 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -66,7 +66,7 @@ static int __of_find_path(struct device_node *node, const char *part, char **out
return -ENODEV;
}
- if (!dev->driver)
+ if (dev->bus && !dev->driver)
return -ENODEV;
device_detect(dev);
diff --git a/drivers/serial/efi-stdio.c b/drivers/serial/efi-stdio.c
index bf14c5e..5ab9173 100644
--- a/drivers/serial/efi-stdio.c
+++ b/drivers/serial/efi-stdio.c
@@ -99,9 +99,10 @@ static struct efi_ctrlkey ctrlkeys[] = {
{ 0x05, BB_KEY_HOME },
{ 0x06, BB_KEY_END },
{ 0x07, BB_KEY_INSERT },
- { 0x08, BB_KEY_DEL },
+ { 0x08, BB_KEY_DEL7 },
{ 0x09, BB_KEY_PAGEUP },
{ 0x0a, BB_KEY_PAGEDOWN },
+ { 0x17, 27 /* escape key */ },
};
static int efi_read_key(struct efi_console_priv *priv, bool wait)
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index c6548e3..439b7d5 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -287,12 +287,31 @@ static int ns16550_tstc(struct console_device *cdev)
static void ns16550_probe_dt(struct device_d *dev, struct ns16550_priv *priv)
{
struct device_node *np = dev->device_node;
+ u32 width;
if (!IS_ENABLED(CONFIG_OFDEVICE))
return;
of_property_read_u32(np, "clock-frequency", &priv->plat.clock);
of_property_read_u32(np, "reg-shift", &priv->plat.shift);
+ if (!of_property_read_u32(np, "reg-io-width", &width))
+ switch (width) {
+ case 1:
+ priv->read_reg = ns16550_read_reg_mmio_8;
+ priv->write_reg = ns16550_write_reg_mmio_8;
+ break;
+ case 2:
+ priv->read_reg = ns16550_read_reg_mmio_16;
+ priv->write_reg = ns16550_write_reg_mmio_16;
+ break;
+ case 4:
+ priv->read_reg = ns16550_read_reg_mmio_32;
+ priv->write_reg = ns16550_write_reg_mmio_32;
+ break;
+ default:
+ dev_err(dev, "unsupported reg-io-width (%d)\n",
+ width);
+ }
}
static struct ns16550_drvdata ns16450_drvdata = {
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 81c3723..eb279ae 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -19,6 +19,7 @@ config USB_GADGET_DRIVER_AT91
bool
prompt "at91 gadget driver"
depends on ARCH_AT91
+ depends on !ARCH_SAMA5D4
default y
select USB_GADGET_DUALSPEED