diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 10 | ||||
-rw-r--r-- | drivers/ata/ahci.h | 4 | ||||
-rw-r--r-- | drivers/ata/disk_ata_drive.c | 12 | ||||
-rw-r--r-- | drivers/ata/ide-sff.c | 8 | ||||
-rw-r--r-- | drivers/ata/intf_platform_ide.c | 7 | ||||
-rw-r--r-- | drivers/ata/pata-imx.c | 9 | ||||
-rw-r--r-- | drivers/ata/sata-imx.c | 9 | ||||
-rw-r--r-- | drivers/ata/sata_mv.c | 5 |
8 files changed, 33 insertions, 31 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index f4b93183ce..de67482881 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -541,14 +541,14 @@ void ahci_print_info(struct ahci_device *ahci) cap2 & HOST_CAP2_BOH ? "boh " : ""); } -void ahci_info(struct device_d *dev) +void ahci_info(struct device *dev) { struct ahci_device *ahci = dev->priv; ahci_print_info(ahci); } -static int ahci_detect(struct device_d *dev) +static int ahci_detect(struct device *dev) { struct ahci_device *ahci = dev->priv; int n_ports = max_t(int, ahci->n_ports, fls(ahci->port_map)); @@ -624,6 +624,7 @@ int ahci_add_host(struct ahci_device *ahci) ahci_port->ata.dev = ahci->dev; ahci_port->port_mmio = ahci_port_base(ahci->mmio_base, i); ahci_port->ata.ops = &ahci_ops; + ahci_port->ata.ahci = true; ata_port_register(&ahci_port->ata); } @@ -636,7 +637,7 @@ int ahci_add_host(struct ahci_device *ahci) return 0; } -static int ahci_probe(struct device_d *dev) +static int ahci_probe(struct device *dev) { struct resource *iores; struct ahci_device *ahci; @@ -669,8 +670,9 @@ static __maybe_unused struct of_device_id ahci_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, ahci_dt_ids); -static struct driver_d ahci_driver = { +static struct driver ahci_driver = { .name = "ahci", .probe = ahci_probe, .of_compatible = DRV_OF_COMPAT(ahci_dt_ids), diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 77196592ed..196bde73c2 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -184,7 +184,7 @@ struct ahci_port { }; struct ahci_device { - struct device_d *dev; + struct device *dev; struct ahci_port ports[AHCI_MAX_PORTS]; u32 n_ports; void __iomem *mmio_base; @@ -197,6 +197,6 @@ struct ahci_device { int ahci_add_host(struct ahci_device *ahci); void ahci_print_info(struct ahci_device *ahci); -void ahci_info(struct device_d *dev); +void ahci_info(struct device *dev); #endif diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata/disk_ata_drive.c index 7df0879b19..a49acc1641 100644 --- a/drivers/ata/disk_ata_drive.c +++ b/drivers/ata/disk_ata_drive.c @@ -199,7 +199,7 @@ static int ata_port_init(struct ata_port *port) { int rc; struct ata_port_operations *ops = port->ops; - struct device_d *dev = &port->class_dev; + struct device *dev = &port->class_dev; if (ops->init) { rc = ops->init(port); @@ -245,6 +245,7 @@ static int ata_port_init(struct ata_port *port) port->blk.num_blocks = ata_id_n_sectors(port->id); port->blk.blockbits = SECTOR_SHIFT; + port->blk.type = port->ahci ? BLK_TYPE_AHCI : BLK_TYPE_IDE; rc = blockdevice_register(&port->blk); if (rc != 0) { @@ -254,11 +255,6 @@ static int ata_port_init(struct ata_port *port) dev_info(dev, "registered /dev/%s\n", port->blk.cdev.name); - /* create partitions on demand */ - rc = parse_partition_table(&port->blk); - if (rc != 0) - dev_warn(dev, "No partition table found\n"); - return 0; on_error: @@ -293,14 +289,14 @@ static int ata_set_probe(struct param_d *param, void *priv) return ata_port_detect(port); } -static int ata_detect(struct device_d *dev) +static int ata_detect(struct device *dev) { struct ata_port *port = container_of(dev, struct ata_port, class_dev); return ata_port_detect(port); } -static void ata_info(struct device_d *dev) +static void ata_info(struct device *dev) { struct ata_port *port = container_of(dev, struct ata_port, class_dev); diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c index 69055e0585..f25dfeae43 100644 --- a/drivers/ata/ide-sff.c +++ b/drivers/ata/ide-sff.c @@ -26,7 +26,7 @@ static inline uint8_t ata_rd_byte(struct ide_port *ide, void __iomem *addr) if (ide->io.mmio) return readb(addr); else - return (uint8_t) inb((int) addr); + return (uint8_t) inb((ulong)addr); } /** @@ -42,7 +42,7 @@ static inline void ata_wr_byte(struct ide_port *ide, uint8_t value, if (ide->io.mmio) writeb(value, addr); else - outb(value, (int) addr); + outb(value, (ulong)addr); } /** @@ -57,7 +57,7 @@ static inline uint16_t ata_rd_word(struct ide_port *ide, if (ide->io.mmio) return readw(addr); else - return (uint16_t) inw((int) addr); + return (uint16_t) inw((ulong)addr); } /** @@ -73,7 +73,7 @@ static inline void ata_wr_word(struct ide_port *ide, uint16_t value, if (ide->io.mmio) writew(value, addr); else - outw(value, (int) addr); + outw(value, (ulong)addr); } /** diff --git a/drivers/ata/intf_platform_ide.c b/drivers/ata/intf_platform_ide.c index 96ea3717b6..0d69b4b0c3 100644 --- a/drivers/ata/intf_platform_ide.c +++ b/drivers/ata/intf_platform_ide.c @@ -65,7 +65,7 @@ static void platform_ide_setup_port(void *reg_base, void *alt_base, } } -static int platform_ide_probe(struct device_d *dev) +static int platform_ide_probe(struct device *dev) { struct resource *iores; int rc; @@ -74,7 +74,7 @@ static int platform_ide_probe(struct device_d *dev) void *reg_base, *alt_base = NULL; struct resource *reg, *alt; int mmio = 0; - struct device_node *dn = dev->device_node; + struct device_node *dn = dev->of_node; u32 ioport_shift = 0; int dataif_be = 0; void (*reset)(int) = NULL; @@ -144,8 +144,9 @@ static __maybe_unused struct of_device_id platform_ide_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, platform_ide_dt_ids); -static struct driver_d platform_ide_driver = { +static struct driver platform_ide_driver = { .name = "ide_intf", .probe = platform_ide_probe, .of_compatible = DRV_OF_COMPAT(platform_ide_dt_ids), diff --git a/drivers/ata/pata-imx.c b/drivers/ata/pata-imx.c index 383f5f3bc1..e10babd1bb 100644 --- a/drivers/ata/pata-imx.c +++ b/drivers/ata/pata-imx.c @@ -132,14 +132,14 @@ static void imx_pata_setup_port(void *reg_base, void *alt_base, } } -static int pata_imx_detect(struct device_d *dev) +static int pata_imx_detect(struct device *dev) { struct ide_port *ide = dev->priv; return ata_port_detect(&ide->port); } -static int imx_pata_probe(struct device_d *dev) +static int imx_pata_probe(struct device *dev) { struct resource *iores; struct ide_port *ide; @@ -171,7 +171,7 @@ static int imx_pata_probe(struct device_d *dev) ide->port.dev = dev; - ide->port.devname = xstrdup(of_alias_get(dev->device_node)); + ide->port.devname = xstrdup(of_alias_get(dev->of_node)); dev->priv = ide; dev->detect = pata_imx_detect; @@ -201,8 +201,9 @@ static __maybe_unused struct of_device_id imx_pata_dt_ids[] = { /* sentinel */ }, }; +MODULE_DEVICE_TABLE(of, imx_pata_dt_ids); -static struct driver_d imx_pata_driver = { +static struct driver imx_pata_driver = { .name = "imx-pata", .probe = imx_pata_probe, .of_compatible = DRV_OF_COMPAT(imx_pata_dt_ids), diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c index 9415e34055..5bcbfca5b5 100644 --- a/drivers/ata/sata-imx.c +++ b/drivers/ata/sata-imx.c @@ -10,8 +10,8 @@ #include <linux/clk.h> #include <linux/err.h> #include <malloc.h> -#include <mach/imx53-regs.h> -#include <mach/imx6-regs.h> +#include <mach/imx/imx53-regs.h> +#include <mach/imx/imx6-regs.h> #include <mfd/imx6q-iomuxc-gpr.h> #include "ahci.h" @@ -83,7 +83,7 @@ static int imx_sata_init_1ms(struct imx_ahci *imx_ahci) return 0; } -static int imx_sata_probe(struct device_d *dev) +static int imx_sata_probe(struct device *dev) { struct resource *iores; struct imx_ahci *imx_ahci; @@ -158,8 +158,9 @@ static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, imx_sata_dt_ids); -static struct driver_d imx_sata_driver = { +static struct driver imx_sata_driver = { .name = "imx-sata", .probe = imx_sata_probe, .id_table = imx_sata_ids, diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 05b27f1008..f92d311c4a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -90,7 +90,7 @@ static void mv_soc_65n_phy_errata(void __iomem *base) writel(reg, base + PHY_MODE9_GEN1); } -static int mv_sata_probe(struct device_d *dev) +static int mv_sata_probe(struct device *dev) { struct resource *iores; void __iomem *base; @@ -215,8 +215,9 @@ static const struct of_device_id mv_sata_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, mv_sata_dt_ids); -static struct driver_d mv_sata_driver = { +static struct driver mv_sata_driver = { .name = "mv_sata", .probe = mv_sata_probe, .of_compatible = mv_sata_dt_ids, |