sata_mv.c (6481f2b52cd5411ea6342b749daf0e4f3b390d7b) sata_mv.c (c4bc7d7310a40c8c0b917e88983dc4a8e6b59e38)
1/*
2 * sata_mv.c - Marvell SATA support
3 *
4 * Copyright 2008-2009: Marvell Corporation, all rights reserved.
5 * Copyright 2005: EMC Corporation, all rights reserved.
6 * Copyright 2005 Red Hat, Inc. All rights reserved.
7 *
8 * Originally written by Brett Russ.

--- 3896 unchanged lines hidden (view full) ---

3905 hpriv->ops->reset_bus(host, mmio);
3906 hpriv->ops->enable_leds(hpriv, mmio);
3907
3908 for (port = 0; port < host->n_ports; port++) {
3909 struct ata_port *ap = host->ports[port];
3910 void __iomem *port_mmio = mv_port_base(mmio, port);
3911
3912 mv_port_init(&ap->ioaddr, port_mmio);
1/*
2 * sata_mv.c - Marvell SATA support
3 *
4 * Copyright 2008-2009: Marvell Corporation, all rights reserved.
5 * Copyright 2005: EMC Corporation, all rights reserved.
6 * Copyright 2005 Red Hat, Inc. All rights reserved.
7 *
8 * Originally written by Brett Russ.

--- 3896 unchanged lines hidden (view full) ---

3905 hpriv->ops->reset_bus(host, mmio);
3906 hpriv->ops->enable_leds(hpriv, mmio);
3907
3908 for (port = 0; port < host->n_ports; port++) {
3909 struct ata_port *ap = host->ports[port];
3910 void __iomem *port_mmio = mv_port_base(mmio, port);
3911
3912 mv_port_init(&ap->ioaddr, port_mmio);
3913
3914#ifdef CONFIG_PCI
3915 if (!IS_SOC(hpriv)) {
3916 unsigned int offset = port_mmio - mmio;
3917 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio");
3918 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port");
3919 }
3920#endif
3921 }
3922
3923 for (hc = 0; hc < n_hc; hc++) {
3924 void __iomem *hc_mmio = mv_hc_base(mmio, hc);
3925
3926 VPRINTK("HC%i: HC config=0x%08x HC IRQ cause "
3927 "(before clear)=0x%08x\n", hc,
3928 readl(hc_mmio + HC_CFG),

--- 334 unchanged lines hidden (view full) ---

4263static int mv_pci_init_one(struct pci_dev *pdev,
4264 const struct pci_device_id *ent)
4265{
4266 static int printed_version;
4267 unsigned int board_idx = (unsigned int)ent->driver_data;
4268 const struct ata_port_info *ppi[] = { &mv_port_info[board_idx], NULL };
4269 struct ata_host *host;
4270 struct mv_host_priv *hpriv;
3913 }
3914
3915 for (hc = 0; hc < n_hc; hc++) {
3916 void __iomem *hc_mmio = mv_hc_base(mmio, hc);
3917
3918 VPRINTK("HC%i: HC config=0x%08x HC IRQ cause "
3919 "(before clear)=0x%08x\n", hc,
3920 readl(hc_mmio + HC_CFG),

--- 334 unchanged lines hidden (view full) ---

4255static int mv_pci_init_one(struct pci_dev *pdev,
4256 const struct pci_device_id *ent)
4257{
4258 static int printed_version;
4259 unsigned int board_idx = (unsigned int)ent->driver_data;
4260 const struct ata_port_info *ppi[] = { &mv_port_info[board_idx], NULL };
4261 struct ata_host *host;
4262 struct mv_host_priv *hpriv;
4271 int n_ports, rc;
4263 int n_ports, port, rc;
4272
4273 if (!printed_version++)
4274 dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n");
4275
4276 /* allocate host */
4277 n_ports = mv_get_hc_count(ppi[0]->flags) * MV_PORTS_PER_HC;
4278
4279 host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);

--- 19 unchanged lines hidden (view full) ---

4299 rc = pci_go_64(pdev);
4300 if (rc)
4301 return rc;
4302
4303 rc = mv_create_dma_pools(hpriv, &pdev->dev);
4304 if (rc)
4305 return rc;
4306
4264
4265 if (!printed_version++)
4266 dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n");
4267
4268 /* allocate host */
4269 n_ports = mv_get_hc_count(ppi[0]->flags) * MV_PORTS_PER_HC;
4270
4271 host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);

--- 19 unchanged lines hidden (view full) ---

4291 rc = pci_go_64(pdev);
4292 if (rc)
4293 return rc;
4294
4295 rc = mv_create_dma_pools(hpriv, &pdev->dev);
4296 if (rc)
4297 return rc;
4298
4299 for (port = 0; port < host->n_ports; port++) {
4300 struct ata_port *ap = host->ports[port];
4301 void __iomem *port_mmio = mv_port_base(hpriv->base, port);
4302 unsigned int offset = port_mmio - hpriv->base;
4303
4304 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio");
4305 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port");
4306 }
4307
4307 /* initialize adapter */
4308 rc = mv_init_host(host, board_idx);
4309 if (rc)
4310 return rc;
4311
4312 /* Enable message-switched interrupts, if requested */
4313 if (msi && pci_enable_msi(pdev) == 0)
4314 hpriv->hp_flags |= MV_HP_FLAG_MSI;

--- 48 unchanged lines hidden ---
4308 /* initialize adapter */
4309 rc = mv_init_host(host, board_idx);
4310 if (rc)
4311 return rc;
4312
4313 /* Enable message-switched interrupts, if requested */
4314 if (msi && pci_enable_msi(pdev) == 0)
4315 hpriv->hp_flags |= MV_HP_FLAG_MSI;

--- 48 unchanged lines hidden ---