diff options
Diffstat (limited to 'drivers')
77 files changed, 313 insertions, 189 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 0033fafc470b..7671dbac6015 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
@@ -123,6 +123,15 @@ config AHCI_IMX | |||
123 | 123 | ||
124 | If unsure, say N. | 124 | If unsure, say N. |
125 | 125 | ||
126 | config AHCI_MVEBU | ||
127 | tristate "Marvell EBU AHCI SATA support" | ||
128 | depends on ARCH_MVEBU | ||
129 | help | ||
130 | This option enables support for the Marvebu EBU SoC's | ||
131 | onboard AHCI SATA. | ||
132 | |||
133 | If unsure, say N. | ||
134 | |||
126 | config AHCI_SUNXI | 135 | config AHCI_SUNXI |
127 | tristate "Allwinner sunxi AHCI SATA support" | 136 | tristate "Allwinner sunxi AHCI SATA support" |
128 | depends on ARCH_SUNXI | 137 | depends on ARCH_SUNXI |
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index 44c8016e565c..5a02aeecef5b 100644 --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile | |||
@@ -12,6 +12,7 @@ obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o | |||
12 | obj-$(CONFIG_SATA_HIGHBANK) += sata_highbank.o libahci.o | 12 | obj-$(CONFIG_SATA_HIGHBANK) += sata_highbank.o libahci.o |
13 | obj-$(CONFIG_AHCI_DA850) += ahci_da850.o libahci.o libahci_platform.o | 13 | obj-$(CONFIG_AHCI_DA850) += ahci_da850.o libahci.o libahci_platform.o |
14 | obj-$(CONFIG_AHCI_IMX) += ahci_imx.o libahci.o libahci_platform.o | 14 | obj-$(CONFIG_AHCI_IMX) += ahci_imx.o libahci.o libahci_platform.o |
15 | obj-$(CONFIG_AHCI_MVEBU) += ahci_mvebu.o libahci.o libahci_platform.o | ||
15 | obj-$(CONFIG_AHCI_SUNXI) += ahci_sunxi.o libahci.o libahci_platform.o | 16 | obj-$(CONFIG_AHCI_SUNXI) += ahci_sunxi.o libahci.o libahci_platform.o |
16 | obj-$(CONFIG_AHCI_ST) += ahci_st.o libahci.o libahci_platform.o | 17 | obj-$(CONFIG_AHCI_ST) += ahci_st.o libahci.o libahci_platform.o |
17 | obj-$(CONFIG_AHCI_XGENE) += ahci_xgene.o libahci.o libahci_platform.o | 18 | obj-$(CONFIG_AHCI_XGENE) += ahci_xgene.o libahci.o libahci_platform.o |
diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index b51605ac5974..0cd7c7a39e5b 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c | |||
@@ -77,7 +77,7 @@ static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc); | |||
77 | static int acard_ahci_port_start(struct ata_port *ap); | 77 | static int acard_ahci_port_start(struct ata_port *ap); |
78 | static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); | 78 | static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
79 | 79 | ||
80 | #ifdef CONFIG_PM | 80 | #ifdef CONFIG_PM_SLEEP |
81 | static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 81 | static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
82 | static int acard_ahci_pci_device_resume(struct pci_dev *pdev); | 82 | static int acard_ahci_pci_device_resume(struct pci_dev *pdev); |
83 | #endif | 83 | #endif |
@@ -118,13 +118,13 @@ static struct pci_driver acard_ahci_pci_driver = { | |||
118 | .id_table = acard_ahci_pci_tbl, | 118 | .id_table = acard_ahci_pci_tbl, |
119 | .probe = acard_ahci_init_one, | 119 | .probe = acard_ahci_init_one, |
120 | .remove = ata_pci_remove_one, | 120 | .remove = ata_pci_remove_one, |
121 | #ifdef CONFIG_PM | 121 | #ifdef CONFIG_PM_SLEEP |
122 | .suspend = acard_ahci_pci_device_suspend, | 122 | .suspend = acard_ahci_pci_device_suspend, |
123 | .resume = acard_ahci_pci_device_resume, | 123 | .resume = acard_ahci_pci_device_resume, |
124 | #endif | 124 | #endif |
125 | }; | 125 | }; |
126 | 126 | ||
127 | #ifdef CONFIG_PM | 127 | #ifdef CONFIG_PM_SLEEP |
128 | static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | 128 | static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) |
129 | { | 129 | { |
130 | struct ata_host *host = pci_get_drvdata(pdev); | 130 | struct ata_host *host = pci_get_drvdata(pdev); |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 60707814a84b..dae5607e1115 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -445,10 +445,14 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
445 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ | 445 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ |
446 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9192), | 446 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9192), |
447 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ | 447 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ |
448 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a0), | ||
449 | .driver_data = board_ahci_yes_fbs }, | ||
448 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), | 450 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), |
449 | .driver_data = board_ahci_yes_fbs }, | 451 | .driver_data = board_ahci_yes_fbs }, |
450 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230), | 452 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230), |
451 | .driver_data = board_ahci_yes_fbs }, | 453 | .driver_data = board_ahci_yes_fbs }, |
454 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x0642), | ||
455 | .driver_data = board_ahci_yes_fbs }, | ||
452 | 456 | ||
453 | /* Promise */ | 457 | /* Promise */ |
454 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ | 458 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ |
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index af63c75c2001..05882e4445a6 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
@@ -237,6 +237,7 @@ enum { | |||
237 | error-handling stage) */ | 237 | error-handling stage) */ |
238 | AHCI_HFLAG_MULTI_MSI = (1 << 16), /* multiple PCI MSIs */ | 238 | AHCI_HFLAG_MULTI_MSI = (1 << 16), /* multiple PCI MSIs */ |
239 | AHCI_HFLAG_NO_DEVSLP = (1 << 17), /* no device sleep */ | 239 | AHCI_HFLAG_NO_DEVSLP = (1 << 17), /* no device sleep */ |
240 | AHCI_HFLAG_NO_FBS = (1 << 18), /* no FBS */ | ||
240 | 241 | ||
241 | /* ap->flags bits */ | 242 | /* ap->flags bits */ |
242 | 243 | ||
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index 2c83613ce2db..2b77d53bccf8 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c | |||
@@ -85,7 +85,8 @@ static int ahci_da850_probe(struct platform_device *pdev) | |||
85 | 85 | ||
86 | da850_sata_init(dev, pwrdn_reg, hpriv->mmio); | 86 | da850_sata_init(dev, pwrdn_reg, hpriv->mmio); |
87 | 87 | ||
88 | rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info, 0, 0); | 88 | rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info, |
89 | 0, 0, 0); | ||
89 | if (rc) | 90 | if (rc) |
90 | goto disable_resources; | 91 | goto disable_resources; |
91 | 92 | ||
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index 8befeb69eeb1..3a901520c62b 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c | |||
@@ -432,7 +432,8 @@ static int imx_ahci_probe(struct platform_device *pdev) | |||
432 | reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000; | 432 | reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000; |
433 | writel(reg_val, hpriv->mmio + IMX_TIMER1MS); | 433 | writel(reg_val, hpriv->mmio + IMX_TIMER1MS); |
434 | 434 | ||
435 | ret = ahci_platform_init_host(pdev, hpriv, &ahci_imx_port_info, 0, 0); | 435 | ret = ahci_platform_init_host(pdev, hpriv, &ahci_imx_port_info, |
436 | 0, 0, 0); | ||
436 | if (ret) | 437 | if (ret) |
437 | imx_sata_disable(hpriv); | 438 | imx_sata_disable(hpriv); |
438 | 439 | ||
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c new file mode 100644 index 000000000000..fd3dfd733b84 --- /dev/null +++ b/drivers/ata/ahci_mvebu.c | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * AHCI glue platform driver for Marvell EBU SOCs | ||
3 | * | ||
4 | * Copyright (C) 2014 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
7 | * Marcin Wojtas <mw@semihalf.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/ahci_platform.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/mbus.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/of_device.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include "ahci.h" | ||
21 | |||
22 | #define AHCI_VENDOR_SPECIFIC_0_ADDR 0xa0 | ||
23 | #define AHCI_VENDOR_SPECIFIC_0_DATA 0xa4 | ||
24 | |||
25 | #define AHCI_WINDOW_CTRL(win) (0x60 + ((win) << 4)) | ||
26 | #define AHCI_WINDOW_BASE(win) (0x64 + ((win) << 4)) | ||
27 | #define AHCI_WINDOW_SIZE(win) (0x68 + ((win) << 4)) | ||
28 | |||
29 | static void ahci_mvebu_mbus_config(struct ahci_host_priv *hpriv, | ||
30 | const struct mbus_dram_target_info *dram) | ||
31 | { | ||
32 | int i; | ||
33 | |||
34 | for (i = 0; i < 4; i++) { | ||
35 | writel(0, hpriv->mmio + AHCI_WINDOW_CTRL(i)); | ||
36 | writel(0, hpriv->mmio + AHCI_WINDOW_BASE(i)); | ||
37 | writel(0, hpriv->mmio + AHCI_WINDOW_SIZE(i)); | ||
38 | } | ||
39 | |||
40 | for (i = 0; i < dram->num_cs; i++) { | ||
41 | const struct mbus_dram_window *cs = dram->cs + i; | ||
42 | |||
43 | writel((cs->mbus_attr << 8) | | ||
44 | (dram->mbus_dram_target_id << 4) | 1, | ||
45 | hpriv->mmio + AHCI_WINDOW_CTRL(i)); | ||
46 | writel(cs->base, hpriv->mmio + AHCI_WINDOW_BASE(i)); | ||
47 | writel(((cs->size - 1) & 0xffff0000), | ||
48 | hpriv->mmio + AHCI_WINDOW_SIZE(i)); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv) | ||
53 | { | ||
54 | /* | ||
55 | * Enable the regret bit to allow the SATA unit to regret a | ||
56 | * request that didn't receive an acknowlegde and avoid a | ||
57 | * deadlock | ||
58 | */ | ||
59 | writel(0x4, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_ADDR); | ||
60 | writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA); | ||
61 | } | ||
62 | |||
63 | static const struct ata_port_info ahci_mvebu_port_info = { | ||
64 | .flags = AHCI_FLAG_COMMON, | ||
65 | .pio_mask = ATA_PIO4, | ||
66 | .udma_mask = ATA_UDMA6, | ||
67 | .port_ops = &ahci_platform_ops, | ||
68 | }; | ||
69 | |||
70 | static int ahci_mvebu_probe(struct platform_device *pdev) | ||
71 | { | ||
72 | struct ahci_host_priv *hpriv; | ||
73 | const struct mbus_dram_target_info *dram; | ||
74 | int rc; | ||
75 | |||
76 | hpriv = ahci_platform_get_resources(pdev); | ||
77 | if (IS_ERR(hpriv)) | ||
78 | return PTR_ERR(hpriv); | ||
79 | |||
80 | rc = ahci_platform_enable_resources(hpriv); | ||
81 | if (rc) | ||
82 | return rc; | ||
83 | |||
84 | dram = mv_mbus_dram_info(); | ||
85 | if (!dram) | ||
86 | return -ENODEV; | ||
87 | |||
88 | ahci_mvebu_mbus_config(hpriv, dram); | ||
89 | ahci_mvebu_regret_option(hpriv); | ||
90 | |||
91 | rc = ahci_platform_init_host(pdev, hpriv, &ahci_mvebu_port_info, | ||
92 | 0, 0, 0); | ||
93 | if (rc) | ||
94 | goto disable_resources; | ||
95 | |||
96 | return 0; | ||
97 | |||
98 | disable_resources: | ||
99 | ahci_platform_disable_resources(hpriv); | ||
100 | return rc; | ||
101 | } | ||
102 | |||
103 | static const struct of_device_id ahci_mvebu_of_match[] = { | ||
104 | { .compatible = "marvell,armada-380-ahci", }, | ||
105 | { }, | ||
106 | }; | ||
107 | MODULE_DEVICE_TABLE(of, ahci_mvebu_of_match); | ||
108 | |||
109 | /* | ||
110 | * We currently don't provide power management related operations, | ||
111 | * since there is no suspend/resume support at the platform level for | ||
112 | * Armada 38x for the moment. | ||
113 | */ | ||
114 | static struct platform_driver ahci_mvebu_driver = { | ||
115 | .probe = ahci_mvebu_probe, | ||
116 | .remove = ata_platform_remove_one, | ||
117 | .driver = { | ||
118 | .name = "ahci-mvebu", | ||
119 | .owner = THIS_MODULE, | ||
120 | .of_match_table = ahci_mvebu_of_match, | ||
121 | }, | ||
122 | }; | ||
123 | module_platform_driver(ahci_mvebu_driver); | ||
124 | |||
125 | MODULE_DESCRIPTION("Marvell EBU AHCI SATA driver"); | ||
126 | MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>, Marcin Wojtas <mw@semihalf.com>"); | ||
127 | MODULE_LICENSE("GPL"); | ||
128 | MODULE_ALIAS("platform:ahci_mvebu"); | ||
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index ef67e79944f9..ebe505c17763 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/of_device.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/libata.h> | 21 | #include <linux/libata.h> |
21 | #include <linux/ahci_platform.h> | 22 | #include <linux/ahci_platform.h> |
@@ -33,6 +34,7 @@ static int ahci_probe(struct platform_device *pdev) | |||
33 | struct device *dev = &pdev->dev; | 34 | struct device *dev = &pdev->dev; |
34 | struct ahci_platform_data *pdata = dev_get_platdata(dev); | 35 | struct ahci_platform_data *pdata = dev_get_platdata(dev); |
35 | struct ahci_host_priv *hpriv; | 36 | struct ahci_host_priv *hpriv; |
37 | unsigned long hflags = 0; | ||
36 | int rc; | 38 | int rc; |
37 | 39 | ||
38 | hpriv = ahci_platform_get_resources(pdev); | 40 | hpriv = ahci_platform_get_resources(pdev); |
@@ -55,7 +57,11 @@ static int ahci_probe(struct platform_device *pdev) | |||
55 | goto disable_resources; | 57 | goto disable_resources; |
56 | } | 58 | } |
57 | 59 | ||
58 | rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0); | 60 | if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) |
61 | hflags |= AHCI_HFLAG_NO_FBS; | ||
62 | |||
63 | rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, | ||
64 | hflags, 0, 0); | ||
59 | if (rc) | 65 | if (rc) |
60 | goto pdata_exit; | 66 | goto pdata_exit; |
61 | 67 | ||
@@ -76,6 +82,7 @@ static const struct of_device_id ahci_of_match[] = { | |||
76 | { .compatible = "snps,exynos5440-ahci", }, | 82 | { .compatible = "snps,exynos5440-ahci", }, |
77 | { .compatible = "ibm,476gtr-ahci", }, | 83 | { .compatible = "ibm,476gtr-ahci", }, |
78 | { .compatible = "snps,dwc-ahci", }, | 84 | { .compatible = "snps,dwc-ahci", }, |
85 | { .compatible = "hisilicon,hisi-ahci", }, | ||
79 | {}, | 86 | {}, |
80 | }; | 87 | }; |
81 | MODULE_DEVICE_TABLE(of, ahci_of_match); | 88 | MODULE_DEVICE_TABLE(of, ahci_of_match); |
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c index 633222226c19..2595598df9ce 100644 --- a/drivers/ata/ahci_st.c +++ b/drivers/ata/ahci_st.c | |||
@@ -166,7 +166,7 @@ static int st_ahci_probe(struct platform_device *pdev) | |||
166 | if (err) | 166 | if (err) |
167 | return err; | 167 | return err; |
168 | 168 | ||
169 | err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, 0, 0); | 169 | err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, 0, 0, 0); |
170 | if (err) { | 170 | if (err) { |
171 | ahci_platform_disable_resources(hpriv); | 171 | ahci_platform_disable_resources(hpriv); |
172 | return err; | 172 | return err; |
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c index 42d3f64e74b3..02002f125bd4 100644 --- a/drivers/ata/ahci_sunxi.c +++ b/drivers/ata/ahci_sunxi.c | |||
@@ -157,8 +157,6 @@ static void ahci_sunxi_start_engine(struct ata_port *ap) | |||
157 | } | 157 | } |
158 | 158 | ||
159 | static const struct ata_port_info ahci_sunxi_port_info = { | 159 | static const struct ata_port_info ahci_sunxi_port_info = { |
160 | AHCI_HFLAGS(AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | | ||
161 | AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ), | ||
162 | .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ, | 160 | .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ, |
163 | .pio_mask = ATA_PIO4, | 161 | .pio_mask = ATA_PIO4, |
164 | .udma_mask = ATA_UDMA6, | 162 | .udma_mask = ATA_UDMA6, |
@@ -169,6 +167,7 @@ static int ahci_sunxi_probe(struct platform_device *pdev) | |||
169 | { | 167 | { |
170 | struct device *dev = &pdev->dev; | 168 | struct device *dev = &pdev->dev; |
171 | struct ahci_host_priv *hpriv; | 169 | struct ahci_host_priv *hpriv; |
170 | unsigned long hflags; | ||
172 | int rc; | 171 | int rc; |
173 | 172 | ||
174 | hpriv = ahci_platform_get_resources(pdev); | 173 | hpriv = ahci_platform_get_resources(pdev); |
@@ -185,7 +184,11 @@ static int ahci_sunxi_probe(struct platform_device *pdev) | |||
185 | if (rc) | 184 | if (rc) |
186 | goto disable_resources; | 185 | goto disable_resources; |
187 | 186 | ||
188 | rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info, 0, 0); | 187 | hflags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | |
188 | AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ; | ||
189 | |||
190 | rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info, | ||
191 | hflags, 0, 0); | ||
189 | if (rc) | 192 | if (rc) |
190 | goto disable_resources; | 193 | goto disable_resources; |
191 | 194 | ||
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c index 77c89bf171f1..042a9bb45c86 100644 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c | |||
@@ -303,7 +303,6 @@ static struct ata_port_operations xgene_ahci_ops = { | |||
303 | }; | 303 | }; |
304 | 304 | ||
305 | static const struct ata_port_info xgene_ahci_port_info = { | 305 | static const struct ata_port_info xgene_ahci_port_info = { |
306 | AHCI_HFLAGS(AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ), | ||
307 | .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ, | 306 | .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ, |
308 | .pio_mask = ATA_PIO4, | 307 | .pio_mask = ATA_PIO4, |
309 | .udma_mask = ATA_UDMA6, | 308 | .udma_mask = ATA_UDMA6, |
@@ -382,6 +381,7 @@ static int xgene_ahci_probe(struct platform_device *pdev) | |||
382 | struct ahci_host_priv *hpriv; | 381 | struct ahci_host_priv *hpriv; |
383 | struct xgene_ahci_context *ctx; | 382 | struct xgene_ahci_context *ctx; |
384 | struct resource *res; | 383 | struct resource *res; |
384 | unsigned long hflags; | ||
385 | int rc; | 385 | int rc; |
386 | 386 | ||
387 | hpriv = ahci_platform_get_resources(pdev); | 387 | hpriv = ahci_platform_get_resources(pdev); |
@@ -450,7 +450,10 @@ static int xgene_ahci_probe(struct platform_device *pdev) | |||
450 | goto disable_resources; | 450 | goto disable_resources; |
451 | } | 451 | } |
452 | 452 | ||
453 | rc = ahci_platform_init_host(pdev, hpriv, &xgene_ahci_port_info, 0, 0); | 453 | hflags = AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ; |
454 | |||
455 | rc = ahci_platform_init_host(pdev, hpriv, &xgene_ahci_port_info, | ||
456 | hflags, 0, 0); | ||
454 | if (rc) | 457 | if (rc) |
455 | goto disable_resources; | 458 | goto disable_resources; |
456 | 459 | ||
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c index 9498a7d3846f..9ff545ce8da3 100644 --- a/drivers/ata/ata_generic.c +++ b/drivers/ata/ata_generic.c | |||
@@ -241,7 +241,7 @@ static struct pci_driver ata_generic_pci_driver = { | |||
241 | .id_table = ata_generic, | 241 | .id_table = ata_generic, |
242 | .probe = ata_generic_init_one, | 242 | .probe = ata_generic_init_one, |
243 | .remove = ata_pci_remove_one, | 243 | .remove = ata_pci_remove_one, |
244 | #ifdef CONFIG_PM | 244 | #ifdef CONFIG_PM_SLEEP |
245 | .suspend = ata_pci_device_suspend, | 245 | .suspend = ata_pci_device_suspend, |
246 | .resume = ata_pci_device_resume, | 246 | .resume = ata_pci_device_resume, |
247 | #endif | 247 | #endif |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 6334c8d7c3f1..893e30e9a9ef 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -830,7 +830,7 @@ static bool piix_irq_check(struct ata_port *ap) | |||
830 | return ap->ops->bmdma_status(ap) & ATA_DMA_INTR; | 830 | return ap->ops->bmdma_status(ap) & ATA_DMA_INTR; |
831 | } | 831 | } |
832 | 832 | ||
833 | #ifdef CONFIG_PM | 833 | #ifdef CONFIG_PM_SLEEP |
834 | static int piix_broken_suspend(void) | 834 | static int piix_broken_suspend(void) |
835 | { | 835 | { |
836 | static const struct dmi_system_id sysids[] = { | 836 | static const struct dmi_system_id sysids[] = { |
@@ -1767,7 +1767,7 @@ static struct pci_driver piix_pci_driver = { | |||
1767 | .id_table = piix_pci_tbl, | 1767 | .id_table = piix_pci_tbl, |
1768 | .probe = piix_init_one, | 1768 | .probe = piix_init_one, |
1769 | .remove = piix_remove_one, | 1769 | .remove = piix_remove_one, |
1770 | #ifdef CONFIG_PM | 1770 | #ifdef CONFIG_PM_SLEEP |
1771 | .suspend = piix_pci_device_suspend, | 1771 | .suspend = piix_pci_device_suspend, |
1772 | .resume = piix_pci_device_resume, | 1772 | .resume = piix_pci_device_resume, |
1773 | #endif | 1773 | #endif |
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index b9861453fc81..40ea583d3610 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
@@ -464,6 +464,11 @@ void ahci_save_initial_config(struct device *dev, | |||
464 | cap |= HOST_CAP_FBS; | 464 | cap |= HOST_CAP_FBS; |
465 | } | 465 | } |
466 | 466 | ||
467 | if ((cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_NO_FBS)) { | ||
468 | dev_info(dev, "controller can't do FBS, turning off CAP_FBS\n"); | ||
469 | cap &= ~HOST_CAP_FBS; | ||
470 | } | ||
471 | |||
467 | if (force_port_map && port_map != force_port_map) { | 472 | if (force_port_map && port_map != force_port_map) { |
468 | dev_info(dev, "forcing port_map 0x%x -> 0x%x\n", | 473 | dev_info(dev, "forcing port_map 0x%x -> 0x%x\n", |
469 | port_map, force_port_map); | 474 | port_map, force_port_map); |
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c index 7cb3a85719c0..3a5b4ed25a4f 100644 --- a/drivers/ata/libahci_platform.c +++ b/drivers/ata/libahci_platform.c | |||
@@ -283,6 +283,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_get_resources); | |||
283 | * @pdev: platform device pointer for the host | 283 | * @pdev: platform device pointer for the host |
284 | * @hpriv: ahci-host private data for the host | 284 | * @hpriv: ahci-host private data for the host |
285 | * @pi_template: template for the ata_port_info to use | 285 | * @pi_template: template for the ata_port_info to use |
286 | * @host_flags: ahci host flags used in ahci_host_priv | ||
286 | * @force_port_map: param passed to ahci_save_initial_config | 287 | * @force_port_map: param passed to ahci_save_initial_config |
287 | * @mask_port_map: param passed to ahci_save_initial_config | 288 | * @mask_port_map: param passed to ahci_save_initial_config |
288 | * | 289 | * |
@@ -296,6 +297,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_get_resources); | |||
296 | int ahci_platform_init_host(struct platform_device *pdev, | 297 | int ahci_platform_init_host(struct platform_device *pdev, |
297 | struct ahci_host_priv *hpriv, | 298 | struct ahci_host_priv *hpriv, |
298 | const struct ata_port_info *pi_template, | 299 | const struct ata_port_info *pi_template, |
300 | unsigned long host_flags, | ||
299 | unsigned int force_port_map, | 301 | unsigned int force_port_map, |
300 | unsigned int mask_port_map) | 302 | unsigned int mask_port_map) |
301 | { | 303 | { |
@@ -312,7 +314,8 @@ int ahci_platform_init_host(struct platform_device *pdev, | |||
312 | } | 314 | } |
313 | 315 | ||
314 | /* prepare host */ | 316 | /* prepare host */ |
315 | hpriv->flags |= (unsigned long)pi.private_data; | 317 | pi.private_data = (void *)host_flags; |
318 | hpriv->flags |= host_flags; | ||
316 | 319 | ||
317 | ahci_save_initial_config(dev, hpriv, force_port_map, mask_port_map); | 320 | ahci_save_initial_config(dev, hpriv, force_port_map, mask_port_map); |
318 | 321 | ||
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index ef8567de6a75..72691fd93948 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1993,7 +1993,11 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) | |||
1993 | memcpy(rbuf, hdr, sizeof(hdr)); | 1993 | memcpy(rbuf, hdr, sizeof(hdr)); |
1994 | memcpy(&rbuf[8], "ATA ", 8); | 1994 | memcpy(&rbuf[8], "ATA ", 8); |
1995 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); | 1995 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); |
1996 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); | 1996 | |
1997 | /* From SAT, use last 2 words from fw rev unless they are spaces */ | ||
1998 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV + 2, 4); | ||
1999 | if (strncmp(&rbuf[32], " ", 4) == 0) | ||
2000 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); | ||
1997 | 2001 | ||
1998 | if (rbuf[32] == 0 || rbuf[32] == ' ') | 2002 | if (rbuf[32] == 0 || rbuf[32] == ' ') |
1999 | memcpy(&rbuf[32], "n/a ", 4); | 2003 | memcpy(&rbuf[32], "n/a ", 4); |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index b603720b877d..1121153f1ecd 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -2433,15 +2433,6 @@ int ata_pci_sff_activate_host(struct ata_host *host, | |||
2433 | mask = (1 << 2) | (1 << 0); | 2433 | mask = (1 << 2) | (1 << 0); |
2434 | if ((tmp8 & mask) != mask) | 2434 | if ((tmp8 & mask) != mask) |
2435 | legacy_mode = 1; | 2435 | legacy_mode = 1; |
2436 | #if defined(CONFIG_NO_ATA_LEGACY) | ||
2437 | /* Some platforms with PCI limits cannot address compat | ||
2438 | port space. In that case we punt if their firmware has | ||
2439 | left a device in compatibility mode */ | ||
2440 | if (legacy_mode) { | ||
2441 | printk(KERN_ERR "ata: Compatibility mode ATA is not supported on this platform, skipping.\n"); | ||
2442 | return -EOPNOTSUPP; | ||
2443 | } | ||
2444 | #endif | ||
2445 | } | 2436 | } |
2446 | 2437 | ||
2447 | if (!devres_open_group(dev, NULL, GFP_KERNEL)) | 2438 | if (!devres_open_group(dev, NULL, GFP_KERNEL)) |
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index 5108b8744dce..b70fce2a38eb 100644 --- a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c | |||
@@ -265,7 +265,7 @@ static struct pci_driver pacpi_pci_driver = { | |||
265 | .id_table = pacpi_pci_tbl, | 265 | .id_table = pacpi_pci_tbl, |
266 | .probe = pacpi_init_one, | 266 | .probe = pacpi_init_one, |
267 | .remove = ata_pci_remove_one, | 267 | .remove = ata_pci_remove_one, |
268 | #ifdef CONFIG_PM | 268 | #ifdef CONFIG_PM_SLEEP |
269 | .suspend = ata_pci_device_suspend, | 269 | .suspend = ata_pci_device_suspend, |
270 | .resume = ata_pci_device_resume, | 270 | .resume = ata_pci_device_resume, |
271 | #endif | 271 | #endif |
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 1b7b2ccabcff..d19cd88ed2d3 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -589,7 +589,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
589 | return ata_pci_bmdma_init_one(pdev, ppi, &ali_sht, NULL, 0); | 589 | return ata_pci_bmdma_init_one(pdev, ppi, &ali_sht, NULL, 0); |
590 | } | 590 | } |
591 | 591 | ||
592 | #ifdef CONFIG_PM | 592 | #ifdef CONFIG_PM_SLEEP |
593 | static int ali_reinit_one(struct pci_dev *pdev) | 593 | static int ali_reinit_one(struct pci_dev *pdev) |
594 | { | 594 | { |
595 | struct ata_host *host = pci_get_drvdata(pdev); | 595 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -616,7 +616,7 @@ static struct pci_driver ali_pci_driver = { | |||
616 | .id_table = ali, | 616 | .id_table = ali, |
617 | .probe = ali_init_one, | 617 | .probe = ali_init_one, |
618 | .remove = ata_pci_remove_one, | 618 | .remove = ata_pci_remove_one, |
619 | #ifdef CONFIG_PM | 619 | #ifdef CONFIG_PM_SLEEP |
620 | .suspend = ata_pci_device_suspend, | 620 | .suspend = ata_pci_device_suspend, |
621 | .resume = ali_reinit_one, | 621 | .resume = ali_reinit_one, |
622 | #endif | 622 | #endif |
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 1206fa6b62ca..8d4d959a821c 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
@@ -574,7 +574,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
574 | return ata_pci_bmdma_init_one(pdev, ppi, &amd_sht, hpriv, 0); | 574 | return ata_pci_bmdma_init_one(pdev, ppi, &amd_sht, hpriv, 0); |
575 | } | 575 | } |
576 | 576 | ||
577 | #ifdef CONFIG_PM | 577 | #ifdef CONFIG_PM_SLEEP |
578 | static int amd_reinit_one(struct pci_dev *pdev) | 578 | static int amd_reinit_one(struct pci_dev *pdev) |
579 | { | 579 | { |
580 | struct ata_host *host = pci_get_drvdata(pdev); | 580 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -625,7 +625,7 @@ static struct pci_driver amd_pci_driver = { | |||
625 | .id_table = amd, | 625 | .id_table = amd, |
626 | .probe = amd_init_one, | 626 | .probe = amd_init_one, |
627 | .remove = ata_pci_remove_one, | 627 | .remove = ata_pci_remove_one, |
628 | #ifdef CONFIG_PM | 628 | #ifdef CONFIG_PM_SLEEP |
629 | .suspend = ata_pci_device_suspend, | 629 | .suspend = ata_pci_device_suspend, |
630 | .resume = amd_reinit_one, | 630 | .resume = amd_reinit_one, |
631 | #endif | 631 | #endif |
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index 3aa4e655e3c6..96c05c9494fa 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c | |||
@@ -422,7 +422,7 @@ static const struct pci_device_id artop_pci_tbl[] = { | |||
422 | { } /* terminate list */ | 422 | { } /* terminate list */ |
423 | }; | 423 | }; |
424 | 424 | ||
425 | #ifdef CONFIG_PM | 425 | #ifdef CONFIG_PM_SLEEP |
426 | static int atp8xx_reinit_one(struct pci_dev *pdev) | 426 | static int atp8xx_reinit_one(struct pci_dev *pdev) |
427 | { | 427 | { |
428 | struct ata_host *host = pci_get_drvdata(pdev); | 428 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -444,7 +444,7 @@ static struct pci_driver artop_pci_driver = { | |||
444 | .id_table = artop_pci_tbl, | 444 | .id_table = artop_pci_tbl, |
445 | .probe = artop_init_one, | 445 | .probe = artop_init_one, |
446 | .remove = ata_pci_remove_one, | 446 | .remove = ata_pci_remove_one, |
447 | #ifdef CONFIG_PM | 447 | #ifdef CONFIG_PM_SLEEP |
448 | .suspend = ata_pci_device_suspend, | 448 | .suspend = ata_pci_device_suspend, |
449 | .resume = atp8xx_reinit_one, | 449 | .resume = atp8xx_reinit_one, |
450 | #endif | 450 | #endif |
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 30fa4ca4cef6..970f7767e5fd 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
@@ -298,7 +298,7 @@ static struct pci_driver atiixp_pci_driver = { | |||
298 | .id_table = atiixp, | 298 | .id_table = atiixp, |
299 | .probe = atiixp_init_one, | 299 | .probe = atiixp_init_one, |
300 | .remove = ata_pci_remove_one, | 300 | .remove = ata_pci_remove_one, |
301 | #ifdef CONFIG_PM | 301 | #ifdef CONFIG_PM_SLEEP |
302 | .resume = ata_pci_device_resume, | 302 | .resume = ata_pci_device_resume, |
303 | .suspend = ata_pci_device_suspend, | 303 | .suspend = ata_pci_device_suspend, |
304 | #endif | 304 | #endif |
diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c index 7e73a0f1e323..a705cfca90f7 100644 --- a/drivers/ata/pata_atp867x.c +++ b/drivers/ata/pata_atp867x.c | |||
@@ -530,7 +530,7 @@ err_out: | |||
530 | return rc; | 530 | return rc; |
531 | } | 531 | } |
532 | 532 | ||
533 | #ifdef CONFIG_PM | 533 | #ifdef CONFIG_PM_SLEEP |
534 | static int atp867x_reinit_one(struct pci_dev *pdev) | 534 | static int atp867x_reinit_one(struct pci_dev *pdev) |
535 | { | 535 | { |
536 | struct ata_host *host = pci_get_drvdata(pdev); | 536 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -558,7 +558,7 @@ static struct pci_driver atp867x_driver = { | |||
558 | .id_table = atp867x_pci_tbl, | 558 | .id_table = atp867x_pci_tbl, |
559 | .probe = atp867x_init_one, | 559 | .probe = atp867x_init_one, |
560 | .remove = ata_pci_remove_one, | 560 | .remove = ata_pci_remove_one, |
561 | #ifdef CONFIG_PM | 561 | #ifdef CONFIG_PM_SLEEP |
562 | .suspend = ata_pci_device_suspend, | 562 | .suspend = ata_pci_device_suspend, |
563 | .resume = atp867x_reinit_one, | 563 | .resume = atp867x_reinit_one, |
564 | #endif | 564 | #endif |
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index ba0d8a29dc23..03f2f2bc83bd 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
@@ -1619,7 +1619,7 @@ static int bfin_atapi_remove(struct platform_device *pdev) | |||
1619 | return 0; | 1619 | return 0; |
1620 | } | 1620 | } |
1621 | 1621 | ||
1622 | #ifdef CONFIG_PM | 1622 | #ifdef CONFIG_PM_SLEEP |
1623 | static int bfin_atapi_suspend(struct platform_device *pdev, pm_message_t state) | 1623 | static int bfin_atapi_suspend(struct platform_device *pdev, pm_message_t state) |
1624 | { | 1624 | { |
1625 | struct ata_host *host = platform_get_drvdata(pdev); | 1625 | struct ata_host *host = platform_get_drvdata(pdev); |
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index 57f1be64dbf2..c47caa807fa9 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c | |||
@@ -231,7 +231,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
231 | return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL, 0); | 231 | return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL, 0); |
232 | } | 232 | } |
233 | 233 | ||
234 | #ifdef CONFIG_PM | 234 | #ifdef CONFIG_PM_SLEEP |
235 | static int cmd640_reinit_one(struct pci_dev *pdev) | 235 | static int cmd640_reinit_one(struct pci_dev *pdev) |
236 | { | 236 | { |
237 | struct ata_host *host = pci_get_drvdata(pdev); | 237 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -256,7 +256,7 @@ static struct pci_driver cmd640_pci_driver = { | |||
256 | .id_table = cmd640, | 256 | .id_table = cmd640, |
257 | .probe = cmd640_init_one, | 257 | .probe = cmd640_init_one, |
258 | .remove = ata_pci_remove_one, | 258 | .remove = ata_pci_remove_one, |
259 | #ifdef CONFIG_PM | 259 | #ifdef CONFIG_PM_SLEEP |
260 | .suspend = ata_pci_device_suspend, | 260 | .suspend = ata_pci_device_suspend, |
261 | .resume = cmd640_reinit_one, | 261 | .resume = cmd640_reinit_one, |
262 | #endif | 262 | #endif |
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 6bca3505b9e9..13ca5883285b 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c | |||
@@ -487,7 +487,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
487 | return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); | 487 | return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); |
488 | } | 488 | } |
489 | 489 | ||
490 | #ifdef CONFIG_PM | 490 | #ifdef CONFIG_PM_SLEEP |
491 | static int cmd64x_reinit_one(struct pci_dev *pdev) | 491 | static int cmd64x_reinit_one(struct pci_dev *pdev) |
492 | { | 492 | { |
493 | struct ata_host *host = pci_get_drvdata(pdev); | 493 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -518,7 +518,7 @@ static struct pci_driver cmd64x_pci_driver = { | |||
518 | .id_table = cmd64x, | 518 | .id_table = cmd64x, |
519 | .probe = cmd64x_init_one, | 519 | .probe = cmd64x_init_one, |
520 | .remove = ata_pci_remove_one, | 520 | .remove = ata_pci_remove_one, |
521 | #ifdef CONFIG_PM | 521 | #ifdef CONFIG_PM_SLEEP |
522 | .suspend = ata_pci_device_suspend, | 522 | .suspend = ata_pci_device_suspend, |
523 | .resume = cmd64x_reinit_one, | 523 | .resume = cmd64x_reinit_one, |
524 | #endif | 524 | #endif |
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index bcde4b786807..d65cb9d2fa8c 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c | |||
@@ -229,7 +229,7 @@ static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
229 | return ata_host_register(host, &cs5520_sht); | 229 | return ata_host_register(host, &cs5520_sht); |
230 | } | 230 | } |
231 | 231 | ||
232 | #ifdef CONFIG_PM | 232 | #ifdef CONFIG_PM_SLEEP |
233 | /** | 233 | /** |
234 | * cs5520_reinit_one - device resume | 234 | * cs5520_reinit_one - device resume |
235 | * @pdev: PCI device | 235 | * @pdev: PCI device |
@@ -278,7 +278,7 @@ static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | |||
278 | pci_save_state(pdev); | 278 | pci_save_state(pdev); |
279 | return 0; | 279 | return 0; |
280 | } | 280 | } |
281 | #endif /* CONFIG_PM */ | 281 | #endif /* CONFIG_PM_SLEEP */ |
282 | 282 | ||
283 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the | 283 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the |
284 | core ATA code can handle it */ | 284 | core ATA code can handle it */ |
@@ -295,7 +295,7 @@ static struct pci_driver cs5520_pci_driver = { | |||
295 | .id_table = pata_cs5520, | 295 | .id_table = pata_cs5520, |
296 | .probe = cs5520_init_one, | 296 | .probe = cs5520_init_one, |
297 | .remove = ata_pci_remove_one, | 297 | .remove = ata_pci_remove_one, |
298 | #ifdef CONFIG_PM | 298 | #ifdef CONFIG_PM_SLEEP |
299 | .suspend = cs5520_pci_device_suspend, | 299 | .suspend = cs5520_pci_device_suspend, |
300 | .resume = cs5520_reinit_one, | 300 | .resume = cs5520_reinit_one, |
301 | #endif | 301 | #endif |
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c index 8afe854a5a50..48ae4b434474 100644 --- a/drivers/ata/pata_cs5530.c +++ b/drivers/ata/pata_cs5530.c | |||
@@ -326,7 +326,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
326 | return ata_pci_bmdma_init_one(pdev, ppi, &cs5530_sht, NULL, 0); | 326 | return ata_pci_bmdma_init_one(pdev, ppi, &cs5530_sht, NULL, 0); |
327 | } | 327 | } |
328 | 328 | ||
329 | #ifdef CONFIG_PM | 329 | #ifdef CONFIG_PM_SLEEP |
330 | static int cs5530_reinit_one(struct pci_dev *pdev) | 330 | static int cs5530_reinit_one(struct pci_dev *pdev) |
331 | { | 331 | { |
332 | struct ata_host *host = pci_get_drvdata(pdev); | 332 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -343,7 +343,7 @@ static int cs5530_reinit_one(struct pci_dev *pdev) | |||
343 | ata_host_resume(host); | 343 | ata_host_resume(host); |
344 | return 0; | 344 | return 0; |
345 | } | 345 | } |
346 | #endif /* CONFIG_PM */ | 346 | #endif /* CONFIG_PM_SLEEP */ |
347 | 347 | ||
348 | static const struct pci_device_id cs5530[] = { | 348 | static const struct pci_device_id cs5530[] = { |
349 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), }, | 349 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), }, |
@@ -356,7 +356,7 @@ static struct pci_driver cs5530_pci_driver = { | |||
356 | .id_table = cs5530, | 356 | .id_table = cs5530, |
357 | .probe = cs5530_init_one, | 357 | .probe = cs5530_init_one, |
358 | .remove = ata_pci_remove_one, | 358 | .remove = ata_pci_remove_one, |
359 | #ifdef CONFIG_PM | 359 | #ifdef CONFIG_PM_SLEEP |
360 | .suspend = ata_pci_device_suspend, | 360 | .suspend = ata_pci_device_suspend, |
361 | .resume = cs5530_reinit_one, | 361 | .resume = cs5530_reinit_one, |
362 | #endif | 362 | #endif |
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index 2c0986fa4bb2..97584e8456d9 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c | |||
@@ -200,7 +200,7 @@ static struct pci_driver cs5535_pci_driver = { | |||
200 | .id_table = cs5535, | 200 | .id_table = cs5535, |
201 | .probe = cs5535_init_one, | 201 | .probe = cs5535_init_one, |
202 | .remove = ata_pci_remove_one, | 202 | .remove = ata_pci_remove_one, |
203 | #ifdef CONFIG_PM | 203 | #ifdef CONFIG_PM_SLEEP |
204 | .suspend = ata_pci_device_suspend, | 204 | .suspend = ata_pci_device_suspend, |
205 | .resume = ata_pci_device_resume, | 205 | .resume = ata_pci_device_resume, |
206 | #endif | 206 | #endif |
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index 32ddcae5a360..6c15a554efbe 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c | |||
@@ -297,7 +297,7 @@ static struct pci_driver cs5536_pci_driver = { | |||
297 | .id_table = cs5536, | 297 | .id_table = cs5536, |
298 | .probe = cs5536_init_one, | 298 | .probe = cs5536_init_one, |
299 | .remove = ata_pci_remove_one, | 299 | .remove = ata_pci_remove_one, |
300 | #ifdef CONFIG_PM | 300 | #ifdef CONFIG_PM_SLEEP |
301 | .suspend = ata_pci_device_suspend, | 301 | .suspend = ata_pci_device_suspend, |
302 | .resume = ata_pci_device_resume, | 302 | .resume = ata_pci_device_resume, |
303 | #endif | 303 | #endif |
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c index 3435bd6a5cc9..793018460d82 100644 --- a/drivers/ata/pata_cypress.c +++ b/drivers/ata/pata_cypress.c | |||
@@ -151,7 +151,7 @@ static struct pci_driver cy82c693_pci_driver = { | |||
151 | .id_table = cy82c693, | 151 | .id_table = cy82c693, |
152 | .probe = cy82c693_init_one, | 152 | .probe = cy82c693_init_one, |
153 | .remove = ata_pci_remove_one, | 153 | .remove = ata_pci_remove_one, |
154 | #ifdef CONFIG_PM | 154 | #ifdef CONFIG_PM_SLEEP |
155 | .suspend = ata_pci_device_suspend, | 155 | .suspend = ata_pci_device_suspend, |
156 | .resume = ata_pci_device_resume, | 156 | .resume = ata_pci_device_resume, |
157 | #endif | 157 | #endif |
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index f440892225f4..4a57a6f032d9 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c | |||
@@ -288,7 +288,7 @@ static struct pci_driver efar_pci_driver = { | |||
288 | .id_table = efar_pci_tbl, | 288 | .id_table = efar_pci_tbl, |
289 | .probe = efar_init_one, | 289 | .probe = efar_init_one, |
290 | .remove = ata_pci_remove_one, | 290 | .remove = ata_pci_remove_one, |
291 | #ifdef CONFIG_PM | 291 | #ifdef CONFIG_PM_SLEEP |
292 | .suspend = ata_pci_device_suspend, | 292 | .suspend = ata_pci_device_suspend, |
293 | .resume = ata_pci_device_resume, | 293 | .resume = ata_pci_device_resume, |
294 | #endif | 294 | #endif |
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index cad9d45749c4..6ad5c072ce34 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c | |||
@@ -708,8 +708,8 @@ static void ep93xx_pata_dma_start(struct ata_queued_cmd *qc) | |||
708 | struct dma_chan *channel = qc->dma_dir == DMA_TO_DEVICE | 708 | struct dma_chan *channel = qc->dma_dir == DMA_TO_DEVICE |
709 | ? drv_data->dma_tx_channel : drv_data->dma_rx_channel; | 709 | ? drv_data->dma_tx_channel : drv_data->dma_rx_channel; |
710 | 710 | ||
711 | txd = channel->device->device_prep_slave_sg(channel, qc->sg, | 711 | txd = dmaengine_prep_slave_sg(channel, qc->sg, qc->n_elem, qc->dma_dir, |
712 | qc->n_elem, qc->dma_dir, DMA_CTRL_ACK, NULL); | 712 | DMA_CTRL_ACK); |
713 | if (!txd) { | 713 | if (!txd) { |
714 | dev_err(qc->ap->dev, "failed to prepare slave for sg dma\n"); | 714 | dev_err(qc->ap->dev, "failed to prepare slave for sg dma\n"); |
715 | return; | 715 | return; |
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index 8e76f79689d3..cbc3de793d1d 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c | |||
@@ -386,7 +386,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
386 | return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); | 386 | return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); |
387 | } | 387 | } |
388 | 388 | ||
389 | #ifdef CONFIG_PM | 389 | #ifdef CONFIG_PM_SLEEP |
390 | static int hpt36x_reinit_one(struct pci_dev *dev) | 390 | static int hpt36x_reinit_one(struct pci_dev *dev) |
391 | { | 391 | { |
392 | struct ata_host *host = pci_get_drvdata(dev); | 392 | struct ata_host *host = pci_get_drvdata(dev); |
@@ -411,7 +411,7 @@ static struct pci_driver hpt36x_pci_driver = { | |||
411 | .id_table = hpt36x, | 411 | .id_table = hpt36x, |
412 | .probe = hpt36x_init_one, | 412 | .probe = hpt36x_init_one, |
413 | .remove = ata_pci_remove_one, | 413 | .remove = ata_pci_remove_one, |
414 | #ifdef CONFIG_PM | 414 | #ifdef CONFIG_PM_SLEEP |
415 | .suspend = ata_pci_device_suspend, | 415 | .suspend = ata_pci_device_suspend, |
416 | .resume = hpt36x_reinit_one, | 416 | .resume = hpt36x_reinit_one, |
417 | #endif | 417 | #endif |
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c index 255c5aaff3a8..d019cdd5bc9f 100644 --- a/drivers/ata/pata_hpt3x3.c +++ b/drivers/ata/pata_hpt3x3.c | |||
@@ -249,7 +249,7 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
249 | IRQF_SHARED, &hpt3x3_sht); | 249 | IRQF_SHARED, &hpt3x3_sht); |
250 | } | 250 | } |
251 | 251 | ||
252 | #ifdef CONFIG_PM | 252 | #ifdef CONFIG_PM_SLEEP |
253 | static int hpt3x3_reinit_one(struct pci_dev *dev) | 253 | static int hpt3x3_reinit_one(struct pci_dev *dev) |
254 | { | 254 | { |
255 | struct ata_host *host = pci_get_drvdata(dev); | 255 | struct ata_host *host = pci_get_drvdata(dev); |
@@ -277,7 +277,7 @@ static struct pci_driver hpt3x3_pci_driver = { | |||
277 | .id_table = hpt3x3, | 277 | .id_table = hpt3x3, |
278 | .probe = hpt3x3_init_one, | 278 | .probe = hpt3x3_init_one, |
279 | .remove = ata_pci_remove_one, | 279 | .remove = ata_pci_remove_one, |
280 | #ifdef CONFIG_PM | 280 | #ifdef CONFIG_PM_SLEEP |
281 | .suspend = ata_pci_device_suspend, | 281 | .suspend = ata_pci_device_suspend, |
282 | .resume = hpt3x3_reinit_one, | 282 | .resume = hpt3x3_reinit_one, |
283 | #endif | 283 | #endif |
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c index e0872db913d6..af424573c2ff 100644 --- a/drivers/ata/pata_imx.c +++ b/drivers/ata/pata_imx.c | |||
@@ -185,7 +185,7 @@ static int pata_imx_remove(struct platform_device *pdev) | |||
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
188 | #ifdef CONFIG_PM | 188 | #ifdef CONFIG_PM_SLEEP |
189 | static int pata_imx_suspend(struct device *dev) | 189 | static int pata_imx_suspend(struct device *dev) |
190 | { | 190 | { |
191 | struct ata_host *host = dev_get_drvdata(dev); | 191 | struct ata_host *host = dev_get_drvdata(dev); |
@@ -244,7 +244,7 @@ static struct platform_driver pata_imx_driver = { | |||
244 | .name = DRV_NAME, | 244 | .name = DRV_NAME, |
245 | .of_match_table = imx_pata_dt_ids, | 245 | .of_match_table = imx_pata_dt_ids, |
246 | .owner = THIS_MODULE, | 246 | .owner = THIS_MODULE, |
247 | #ifdef CONFIG_PM | 247 | #ifdef CONFIG_PM_SLEEP |
248 | .pm = &pata_imx_pm_ops, | 248 | .pm = &pata_imx_pm_ops, |
249 | #endif | 249 | #endif |
250 | }, | 250 | }, |
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index 81369d187a5c..4f97d1e52f85 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c | |||
@@ -283,7 +283,7 @@ static struct pci_driver it8213_pci_driver = { | |||
283 | .id_table = it8213_pci_tbl, | 283 | .id_table = it8213_pci_tbl, |
284 | .probe = it8213_init_one, | 284 | .probe = it8213_init_one, |
285 | .remove = ata_pci_remove_one, | 285 | .remove = ata_pci_remove_one, |
286 | #ifdef CONFIG_PM | 286 | #ifdef CONFIG_PM_SLEEP |
287 | .suspend = ata_pci_device_suspend, | 287 | .suspend = ata_pci_device_suspend, |
288 | .resume = ata_pci_device_resume, | 288 | .resume = ata_pci_device_resume, |
289 | #endif | 289 | #endif |
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index dc3d7877f29d..a5088ecb349f 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
@@ -935,7 +935,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
935 | return ata_pci_bmdma_init_one(pdev, ppi, &it821x_sht, NULL, 0); | 935 | return ata_pci_bmdma_init_one(pdev, ppi, &it821x_sht, NULL, 0); |
936 | } | 936 | } |
937 | 937 | ||
938 | #ifdef CONFIG_PM | 938 | #ifdef CONFIG_PM_SLEEP |
939 | static int it821x_reinit_one(struct pci_dev *pdev) | 939 | static int it821x_reinit_one(struct pci_dev *pdev) |
940 | { | 940 | { |
941 | struct ata_host *host = pci_get_drvdata(pdev); | 941 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -965,7 +965,7 @@ static struct pci_driver it821x_pci_driver = { | |||
965 | .id_table = it821x, | 965 | .id_table = it821x, |
966 | .probe = it821x_init_one, | 966 | .probe = it821x_init_one, |
967 | .remove = ata_pci_remove_one, | 967 | .remove = ata_pci_remove_one, |
968 | #ifdef CONFIG_PM | 968 | #ifdef CONFIG_PM_SLEEP |
969 | .suspend = ata_pci_device_suspend, | 969 | .suspend = ata_pci_device_suspend, |
970 | .resume = it821x_reinit_one, | 970 | .resume = it821x_reinit_one, |
971 | #endif | 971 | #endif |
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index b1cfa0258fd3..4d1a5d2c4287 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
@@ -157,7 +157,7 @@ static struct pci_driver jmicron_pci_driver = { | |||
157 | .id_table = jmicron_pci_tbl, | 157 | .id_table = jmicron_pci_tbl, |
158 | .probe = jmicron_init_one, | 158 | .probe = jmicron_init_one, |
159 | .remove = ata_pci_remove_one, | 159 | .remove = ata_pci_remove_one, |
160 | #ifdef CONFIG_PM | 160 | #ifdef CONFIG_PM_SLEEP |
161 | .suspend = ata_pci_device_suspend, | 161 | .suspend = ata_pci_device_suspend, |
162 | .resume = ata_pci_device_resume, | 162 | .resume = ata_pci_device_resume, |
163 | #endif | 163 | #endif |
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index c28d0645e851..a02f76fdcfcd 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c | |||
@@ -845,8 +845,7 @@ static int pata_macio_slave_config(struct scsi_device *sdev) | |||
845 | return 0; | 845 | return 0; |
846 | } | 846 | } |
847 | 847 | ||
848 | #ifdef CONFIG_PM | 848 | #ifdef CONFIG_PM_SLEEP |
849 | |||
850 | static int pata_macio_do_suspend(struct pata_macio_priv *priv, pm_message_t mesg) | 849 | static int pata_macio_do_suspend(struct pata_macio_priv *priv, pm_message_t mesg) |
851 | { | 850 | { |
852 | int rc; | 851 | int rc; |
@@ -907,8 +906,7 @@ static int pata_macio_do_resume(struct pata_macio_priv *priv) | |||
907 | 906 | ||
908 | return 0; | 907 | return 0; |
909 | } | 908 | } |
910 | 909 | #endif /* CONFIG_PM_SLEEP */ | |
911 | #endif /* CONFIG_PM */ | ||
912 | 910 | ||
913 | static struct scsi_host_template pata_macio_sht = { | 911 | static struct scsi_host_template pata_macio_sht = { |
914 | ATA_BASE_SHT(DRV_NAME), | 912 | ATA_BASE_SHT(DRV_NAME), |
@@ -1208,8 +1206,7 @@ static int pata_macio_detach(struct macio_dev *mdev) | |||
1208 | return 0; | 1206 | return 0; |
1209 | } | 1207 | } |
1210 | 1208 | ||
1211 | #ifdef CONFIG_PM | 1209 | #ifdef CONFIG_PM_SLEEP |
1212 | |||
1213 | static int pata_macio_suspend(struct macio_dev *mdev, pm_message_t mesg) | 1210 | static int pata_macio_suspend(struct macio_dev *mdev, pm_message_t mesg) |
1214 | { | 1211 | { |
1215 | struct ata_host *host = macio_get_drvdata(mdev); | 1212 | struct ata_host *host = macio_get_drvdata(mdev); |
@@ -1223,8 +1220,7 @@ static int pata_macio_resume(struct macio_dev *mdev) | |||
1223 | 1220 | ||
1224 | return pata_macio_do_resume(host->private_data); | 1221 | return pata_macio_do_resume(host->private_data); |
1225 | } | 1222 | } |
1226 | 1223 | #endif /* CONFIG_PM_SLEEP */ | |
1227 | #endif /* CONFIG_PM */ | ||
1228 | 1224 | ||
1229 | #ifdef CONFIG_PMAC_MEDIABAY | 1225 | #ifdef CONFIG_PMAC_MEDIABAY |
1230 | static void pata_macio_mb_event(struct macio_dev* mdev, int mb_state) | 1226 | static void pata_macio_mb_event(struct macio_dev* mdev, int mb_state) |
@@ -1316,8 +1312,7 @@ static void pata_macio_pci_detach(struct pci_dev *pdev) | |||
1316 | ata_host_detach(host); | 1312 | ata_host_detach(host); |
1317 | } | 1313 | } |
1318 | 1314 | ||
1319 | #ifdef CONFIG_PM | 1315 | #ifdef CONFIG_PM_SLEEP |
1320 | |||
1321 | static int pata_macio_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) | 1316 | static int pata_macio_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) |
1322 | { | 1317 | { |
1323 | struct ata_host *host = pci_get_drvdata(pdev); | 1318 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -1331,8 +1326,7 @@ static int pata_macio_pci_resume(struct pci_dev *pdev) | |||
1331 | 1326 | ||
1332 | return pata_macio_do_resume(host->private_data); | 1327 | return pata_macio_do_resume(host->private_data); |
1333 | } | 1328 | } |
1334 | 1329 | #endif /* CONFIG_PM_SLEEP */ | |
1335 | #endif /* CONFIG_PM */ | ||
1336 | 1330 | ||
1337 | static struct of_device_id pata_macio_match[] = | 1331 | static struct of_device_id pata_macio_match[] = |
1338 | { | 1332 | { |
@@ -1360,7 +1354,7 @@ static struct macio_driver pata_macio_driver = | |||
1360 | }, | 1354 | }, |
1361 | .probe = pata_macio_attach, | 1355 | .probe = pata_macio_attach, |
1362 | .remove = pata_macio_detach, | 1356 | .remove = pata_macio_detach, |
1363 | #ifdef CONFIG_PM | 1357 | #ifdef CONFIG_PM_SLEEP |
1364 | .suspend = pata_macio_suspend, | 1358 | .suspend = pata_macio_suspend, |
1365 | .resume = pata_macio_resume, | 1359 | .resume = pata_macio_resume, |
1366 | #endif | 1360 | #endif |
@@ -1383,7 +1377,7 @@ static struct pci_driver pata_macio_pci_driver = { | |||
1383 | .id_table = pata_macio_pci_match, | 1377 | .id_table = pata_macio_pci_match, |
1384 | .probe = pata_macio_pci_attach, | 1378 | .probe = pata_macio_pci_attach, |
1385 | .remove = pata_macio_pci_detach, | 1379 | .remove = pata_macio_pci_detach, |
1386 | #ifdef CONFIG_PM | 1380 | #ifdef CONFIG_PM_SLEEP |
1387 | .suspend = pata_macio_pci_suspend, | 1381 | .suspend = pata_macio_pci_suspend, |
1388 | .resume = pata_macio_pci_resume, | 1382 | .resume = pata_macio_pci_resume, |
1389 | #endif | 1383 | #endif |
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 6bad3df3a13c..ae9feb1ba8f7 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
@@ -171,7 +171,7 @@ static struct pci_driver marvell_pci_driver = { | |||
171 | .id_table = marvell_pci_tbl, | 171 | .id_table = marvell_pci_tbl, |
172 | .probe = marvell_init_one, | 172 | .probe = marvell_init_one, |
173 | .remove = ata_pci_remove_one, | 173 | .remove = ata_pci_remove_one, |
174 | #ifdef CONFIG_PM | 174 | #ifdef CONFIG_PM_SLEEP |
175 | .suspend = ata_pci_device_suspend, | 175 | .suspend = ata_pci_device_suspend, |
176 | .resume = ata_pci_device_resume, | 176 | .resume = ata_pci_device_resume, |
177 | #endif | 177 | #endif |
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index 0024ced3e200..ccd1c83a05cc 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c | |||
@@ -819,9 +819,7 @@ mpc52xx_ata_remove(struct platform_device *op) | |||
819 | return 0; | 819 | return 0; |
820 | } | 820 | } |
821 | 821 | ||
822 | 822 | #ifdef CONFIG_PM_SLEEP | |
823 | #ifdef CONFIG_PM | ||
824 | |||
825 | static int | 823 | static int |
826 | mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state) | 824 | mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state) |
827 | { | 825 | { |
@@ -847,10 +845,8 @@ mpc52xx_ata_resume(struct platform_device *op) | |||
847 | 845 | ||
848 | return 0; | 846 | return 0; |
849 | } | 847 | } |
850 | |||
851 | #endif | 848 | #endif |
852 | 849 | ||
853 | |||
854 | static struct of_device_id mpc52xx_ata_of_match[] = { | 850 | static struct of_device_id mpc52xx_ata_of_match[] = { |
855 | { .compatible = "fsl,mpc5200-ata", }, | 851 | { .compatible = "fsl,mpc5200-ata", }, |
856 | { .compatible = "mpc5200-ata", }, | 852 | { .compatible = "mpc5200-ata", }, |
@@ -861,7 +857,7 @@ static struct of_device_id mpc52xx_ata_of_match[] = { | |||
861 | static struct platform_driver mpc52xx_ata_of_platform_driver = { | 857 | static struct platform_driver mpc52xx_ata_of_platform_driver = { |
862 | .probe = mpc52xx_ata_probe, | 858 | .probe = mpc52xx_ata_probe, |
863 | .remove = mpc52xx_ata_remove, | 859 | .remove = mpc52xx_ata_remove, |
864 | #ifdef CONFIG_PM | 860 | #ifdef CONFIG_PM_SLEEP |
865 | .suspend = mpc52xx_ata_suspend, | 861 | .suspend = mpc52xx_ata_suspend, |
866 | .resume = mpc52xx_ata_resume, | 862 | .resume = mpc52xx_ata_resume, |
867 | #endif | 863 | #endif |
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index f39a5379e816..202b4d601393 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c | |||
@@ -223,7 +223,7 @@ static struct pci_driver mpiix_pci_driver = { | |||
223 | .id_table = mpiix, | 223 | .id_table = mpiix, |
224 | .probe = mpiix_init_one, | 224 | .probe = mpiix_init_one, |
225 | .remove = ata_pci_remove_one, | 225 | .remove = ata_pci_remove_one, |
226 | #ifdef CONFIG_PM | 226 | #ifdef CONFIG_PM_SLEEP |
227 | .suspend = ata_pci_device_suspend, | 227 | .suspend = ata_pci_device_suspend, |
228 | .resume = ata_pci_device_resume, | 228 | .resume = ata_pci_device_resume, |
229 | #endif | 229 | #endif |
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c index e3b97093ef9a..0ea18331d466 100644 --- a/drivers/ata/pata_netcell.c +++ b/drivers/ata/pata_netcell.c | |||
@@ -92,7 +92,7 @@ static struct pci_driver netcell_pci_driver = { | |||
92 | .id_table = netcell_pci_tbl, | 92 | .id_table = netcell_pci_tbl, |
93 | .probe = netcell_init_one, | 93 | .probe = netcell_init_one, |
94 | .remove = ata_pci_remove_one, | 94 | .remove = ata_pci_remove_one, |
95 | #ifdef CONFIG_PM | 95 | #ifdef CONFIG_PM_SLEEP |
96 | .suspend = ata_pci_device_suspend, | 96 | .suspend = ata_pci_device_suspend, |
97 | .resume = ata_pci_device_resume, | 97 | .resume = ata_pci_device_resume, |
98 | #endif | 98 | #endif |
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c index 56201a69af12..efb272da8567 100644 --- a/drivers/ata/pata_ninja32.c +++ b/drivers/ata/pata_ninja32.c | |||
@@ -152,8 +152,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
152 | IRQF_SHARED, &ninja32_sht); | 152 | IRQF_SHARED, &ninja32_sht); |
153 | } | 153 | } |
154 | 154 | ||
155 | #ifdef CONFIG_PM | 155 | #ifdef CONFIG_PM_SLEEP |
156 | |||
157 | static int ninja32_reinit_one(struct pci_dev *pdev) | 156 | static int ninja32_reinit_one(struct pci_dev *pdev) |
158 | { | 157 | { |
159 | struct ata_host *host = pci_get_drvdata(pdev); | 158 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -183,7 +182,7 @@ static struct pci_driver ninja32_pci_driver = { | |||
183 | .id_table = ninja32, | 182 | .id_table = ninja32, |
184 | .probe = ninja32_init_one, | 183 | .probe = ninja32_init_one, |
185 | .remove = ata_pci_remove_one, | 184 | .remove = ata_pci_remove_one, |
186 | #ifdef CONFIG_PM | 185 | #ifdef CONFIG_PM_SLEEP |
187 | .suspend = ata_pci_device_suspend, | 186 | .suspend = ata_pci_device_suspend, |
188 | .resume = ninja32_reinit_one, | 187 | .resume = ninja32_reinit_one, |
189 | #endif | 188 | #endif |
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c index 6154c3ee11a5..200e1eb23a20 100644 --- a/drivers/ata/pata_ns87410.c +++ b/drivers/ata/pata_ns87410.c | |||
@@ -161,7 +161,7 @@ static struct pci_driver ns87410_pci_driver = { | |||
161 | .id_table = ns87410, | 161 | .id_table = ns87410, |
162 | .probe = ns87410_init_one, | 162 | .probe = ns87410_init_one, |
163 | .remove = ata_pci_remove_one, | 163 | .remove = ata_pci_remove_one, |
164 | #ifdef CONFIG_PM | 164 | #ifdef CONFIG_PM_SLEEP |
165 | .suspend = ata_pci_device_suspend, | 165 | .suspend = ata_pci_device_suspend, |
166 | .resume = ata_pci_device_resume, | 166 | .resume = ata_pci_device_resume, |
167 | #endif | 167 | #endif |
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index d44df7ccfe43..84c6b225b56e 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c | |||
@@ -385,7 +385,7 @@ static const struct pci_device_id ns87415_pci_tbl[] = { | |||
385 | { } /* terminate list */ | 385 | { } /* terminate list */ |
386 | }; | 386 | }; |
387 | 387 | ||
388 | #ifdef CONFIG_PM | 388 | #ifdef CONFIG_PM_SLEEP |
389 | static int ns87415_reinit_one(struct pci_dev *pdev) | 389 | static int ns87415_reinit_one(struct pci_dev *pdev) |
390 | { | 390 | { |
391 | struct ata_host *host = pci_get_drvdata(pdev); | 391 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -407,7 +407,7 @@ static struct pci_driver ns87415_pci_driver = { | |||
407 | .id_table = ns87415_pci_tbl, | 407 | .id_table = ns87415_pci_tbl, |
408 | .probe = ns87415_init_one, | 408 | .probe = ns87415_init_one, |
409 | .remove = ata_pci_remove_one, | 409 | .remove = ata_pci_remove_one, |
410 | #ifdef CONFIG_PM | 410 | #ifdef CONFIG_PM_SLEEP |
411 | .suspend = ata_pci_device_suspend, | 411 | .suspend = ata_pci_device_suspend, |
412 | .resume = ns87415_reinit_one, | 412 | .resume = ns87415_reinit_one, |
413 | #endif | 413 | #endif |
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index 83c4ddb1bc7f..2a97d3a531ec 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c | |||
@@ -865,7 +865,7 @@ static int octeon_cf_probe(struct platform_device *pdev) | |||
865 | if (node == NULL) | 865 | if (node == NULL) |
866 | return -EINVAL; | 866 | return -EINVAL; |
867 | 867 | ||
868 | cf_port = kzalloc(sizeof(*cf_port), GFP_KERNEL); | 868 | cf_port = devm_kzalloc(&pdev->dev, sizeof(*cf_port), GFP_KERNEL); |
869 | if (!cf_port) | 869 | if (!cf_port) |
870 | return -ENOMEM; | 870 | return -ENOMEM; |
871 | 871 | ||
@@ -881,10 +881,9 @@ static int octeon_cf_probe(struct platform_device *pdev) | |||
881 | n_size = of_n_size_cells(node); | 881 | n_size = of_n_size_cells(node); |
882 | 882 | ||
883 | reg_prop = of_find_property(node, "reg", ®_len); | 883 | reg_prop = of_find_property(node, "reg", ®_len); |
884 | if (!reg_prop || reg_len < sizeof(__be32)) { | 884 | if (!reg_prop || reg_len < sizeof(__be32)) |
885 | rv = -EINVAL; | 885 | return -EINVAL; |
886 | goto free_cf_port; | 886 | |
887 | } | ||
888 | cs_num = reg_prop->value; | 887 | cs_num = reg_prop->value; |
889 | cf_port->cs0 = be32_to_cpup(cs_num); | 888 | cf_port->cs0 = be32_to_cpup(cs_num); |
890 | 889 | ||
@@ -901,16 +900,13 @@ static int octeon_cf_probe(struct platform_device *pdev) | |||
901 | res_dma = platform_get_resource(dma_dev, IORESOURCE_MEM, 0); | 900 | res_dma = platform_get_resource(dma_dev, IORESOURCE_MEM, 0); |
902 | if (!res_dma) { | 901 | if (!res_dma) { |
903 | of_node_put(dma_node); | 902 | of_node_put(dma_node); |
904 | rv = -EINVAL; | 903 | return -EINVAL; |
905 | goto free_cf_port; | ||
906 | } | 904 | } |
907 | cf_port->dma_base = (u64)devm_ioremap_nocache(&pdev->dev, res_dma->start, | 905 | cf_port->dma_base = (u64)devm_ioremap_nocache(&pdev->dev, res_dma->start, |
908 | resource_size(res_dma)); | 906 | resource_size(res_dma)); |
909 | |||
910 | if (!cf_port->dma_base) { | 907 | if (!cf_port->dma_base) { |
911 | of_node_put(dma_node); | 908 | of_node_put(dma_node); |
912 | rv = -EINVAL; | 909 | return -EINVAL; |
913 | goto free_cf_port; | ||
914 | } | 910 | } |
915 | 911 | ||
916 | irq_handler = octeon_cf_interrupt; | 912 | irq_handler = octeon_cf_interrupt; |
@@ -921,41 +917,34 @@ static int octeon_cf_probe(struct platform_device *pdev) | |||
921 | of_node_put(dma_node); | 917 | of_node_put(dma_node); |
922 | } | 918 | } |
923 | res_cs1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 919 | res_cs1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
924 | if (!res_cs1) { | 920 | if (!res_cs1) |
925 | rv = -EINVAL; | 921 | return -EINVAL; |
926 | goto free_cf_port; | 922 | |
927 | } | ||
928 | cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start, | 923 | cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start, |
929 | resource_size(res_cs1)); | 924 | resource_size(res_cs1)); |
930 | |||
931 | if (!cs1) | 925 | if (!cs1) |
932 | goto free_cf_port; | 926 | return rv; |
927 | |||
928 | if (reg_len < (n_addr + n_size + 1) * sizeof(__be32)) | ||
929 | return -EINVAL; | ||
933 | 930 | ||
934 | if (reg_len < (n_addr + n_size + 1) * sizeof(__be32)) { | ||
935 | rv = -EINVAL; | ||
936 | goto free_cf_port; | ||
937 | } | ||
938 | cs_num += n_addr + n_size; | 931 | cs_num += n_addr + n_size; |
939 | cf_port->cs1 = be32_to_cpup(cs_num); | 932 | cf_port->cs1 = be32_to_cpup(cs_num); |
940 | } | 933 | } |
941 | 934 | ||
942 | res_cs0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 935 | res_cs0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
943 | 936 | if (!res_cs0) | |
944 | if (!res_cs0) { | 937 | return -EINVAL; |
945 | rv = -EINVAL; | ||
946 | goto free_cf_port; | ||
947 | } | ||
948 | 938 | ||
949 | cs0 = devm_ioremap_nocache(&pdev->dev, res_cs0->start, | 939 | cs0 = devm_ioremap_nocache(&pdev->dev, res_cs0->start, |
950 | resource_size(res_cs0)); | 940 | resource_size(res_cs0)); |
951 | |||
952 | if (!cs0) | 941 | if (!cs0) |
953 | goto free_cf_port; | 942 | return rv; |
954 | 943 | ||
955 | /* allocate host */ | 944 | /* allocate host */ |
956 | host = ata_host_alloc(&pdev->dev, 1); | 945 | host = ata_host_alloc(&pdev->dev, 1); |
957 | if (!host) | 946 | if (!host) |
958 | goto free_cf_port; | 947 | return rv; |
959 | 948 | ||
960 | ap = host->ports[0]; | 949 | ap = host->ports[0]; |
961 | ap->private_data = cf_port; | 950 | ap->private_data = cf_port; |
@@ -1020,17 +1009,12 @@ static int octeon_cf_probe(struct platform_device *pdev) | |||
1020 | 1009 | ||
1021 | ata_port_desc(ap, "cmd %p ctl %p", base, ap->ioaddr.ctl_addr); | 1010 | ata_port_desc(ap, "cmd %p ctl %p", base, ap->ioaddr.ctl_addr); |
1022 | 1011 | ||
1023 | |||
1024 | dev_info(&pdev->dev, "version " DRV_VERSION" %d bit%s.\n", | 1012 | dev_info(&pdev->dev, "version " DRV_VERSION" %d bit%s.\n", |
1025 | is_16bit ? 16 : 8, | 1013 | is_16bit ? 16 : 8, |
1026 | cf_port->is_true_ide ? ", True IDE" : ""); | 1014 | cf_port->is_true_ide ? ", True IDE" : ""); |
1027 | 1015 | ||
1028 | return ata_host_activate(host, irq, irq_handler, | 1016 | return ata_host_activate(host, irq, irq_handler, |
1029 | IRQF_SHARED, &octeon_cf_sht); | 1017 | IRQF_SHARED, &octeon_cf_sht); |
1030 | |||
1031 | free_cf_port: | ||
1032 | kfree(cf_port); | ||
1033 | return rv; | ||
1034 | } | 1018 | } |
1035 | 1019 | ||
1036 | static void octeon_cf_shutdown(struct device *dev) | 1020 | static void octeon_cf_shutdown(struct device *dev) |
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c index 319b64491b7b..b9bf78b7d48d 100644 --- a/drivers/ata/pata_oldpiix.c +++ b/drivers/ata/pata_oldpiix.c | |||
@@ -258,7 +258,7 @@ static struct pci_driver oldpiix_pci_driver = { | |||
258 | .id_table = oldpiix_pci_tbl, | 258 | .id_table = oldpiix_pci_tbl, |
259 | .probe = oldpiix_init_one, | 259 | .probe = oldpiix_init_one, |
260 | .remove = ata_pci_remove_one, | 260 | .remove = ata_pci_remove_one, |
261 | #ifdef CONFIG_PM | 261 | #ifdef CONFIG_PM_SLEEP |
262 | .suspend = ata_pci_device_suspend, | 262 | .suspend = ata_pci_device_suspend, |
263 | .resume = ata_pci_device_resume, | 263 | .resume = ata_pci_device_resume, |
264 | #endif | 264 | #endif |
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c index fb042e0519d0..3a944a029264 100644 --- a/drivers/ata/pata_opti.c +++ b/drivers/ata/pata_opti.c | |||
@@ -184,7 +184,7 @@ static struct pci_driver opti_pci_driver = { | |||
184 | .id_table = opti, | 184 | .id_table = opti, |
185 | .probe = opti_init_one, | 185 | .probe = opti_init_one, |
186 | .remove = ata_pci_remove_one, | 186 | .remove = ata_pci_remove_one, |
187 | #ifdef CONFIG_PM | 187 | #ifdef CONFIG_PM_SLEEP |
188 | .suspend = ata_pci_device_suspend, | 188 | .suspend = ata_pci_device_suspend, |
189 | .resume = ata_pci_device_resume, | 189 | .resume = ata_pci_device_resume, |
190 | #endif | 190 | #endif |
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c index bb71ea214b99..bdec7efa4643 100644 --- a/drivers/ata/pata_optidma.c +++ b/drivers/ata/pata_optidma.c | |||
@@ -440,7 +440,7 @@ static struct pci_driver optidma_pci_driver = { | |||
440 | .id_table = optidma, | 440 | .id_table = optidma, |
441 | .probe = optidma_init_one, | 441 | .probe = optidma_init_one, |
442 | .remove = ata_pci_remove_one, | 442 | .remove = ata_pci_remove_one, |
443 | #ifdef CONFIG_PM | 443 | #ifdef CONFIG_PM_SLEEP |
444 | .suspend = ata_pci_device_suspend, | 444 | .suspend = ata_pci_device_suspend, |
445 | .resume = ata_pci_device_resume, | 445 | .resume = ata_pci_device_resume, |
446 | #endif | 446 | #endif |
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 1151f23177bb..4d06a5cda987 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c | |||
@@ -62,7 +62,7 @@ enum { | |||
62 | }; | 62 | }; |
63 | 63 | ||
64 | static int pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); | 64 | static int pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
65 | #ifdef CONFIG_PM | 65 | #ifdef CONFIG_PM_SLEEP |
66 | static int pdc2027x_reinit_one(struct pci_dev *pdev); | 66 | static int pdc2027x_reinit_one(struct pci_dev *pdev); |
67 | #endif | 67 | #endif |
68 | static int pdc2027x_prereset(struct ata_link *link, unsigned long deadline); | 68 | static int pdc2027x_prereset(struct ata_link *link, unsigned long deadline); |
@@ -128,7 +128,7 @@ static struct pci_driver pdc2027x_pci_driver = { | |||
128 | .id_table = pdc2027x_pci_tbl, | 128 | .id_table = pdc2027x_pci_tbl, |
129 | .probe = pdc2027x_init_one, | 129 | .probe = pdc2027x_init_one, |
130 | .remove = ata_pci_remove_one, | 130 | .remove = ata_pci_remove_one, |
131 | #ifdef CONFIG_PM | 131 | #ifdef CONFIG_PM_SLEEP |
132 | .suspend = ata_pci_device_suspend, | 132 | .suspend = ata_pci_device_suspend, |
133 | .resume = pdc2027x_reinit_one, | 133 | .resume = pdc2027x_reinit_one, |
134 | #endif | 134 | #endif |
@@ -761,7 +761,7 @@ static int pdc2027x_init_one(struct pci_dev *pdev, | |||
761 | IRQF_SHARED, &pdc2027x_sht); | 761 | IRQF_SHARED, &pdc2027x_sht); |
762 | } | 762 | } |
763 | 763 | ||
764 | #ifdef CONFIG_PM | 764 | #ifdef CONFIG_PM_SLEEP |
765 | static int pdc2027x_reinit_one(struct pci_dev *pdev) | 765 | static int pdc2027x_reinit_one(struct pci_dev *pdev) |
766 | { | 766 | { |
767 | struct ata_host *host = pci_get_drvdata(pdev); | 767 | struct ata_host *host = pci_get_drvdata(pdev); |
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index defa050e1784..9001991d2830 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c | |||
@@ -377,7 +377,7 @@ static struct pci_driver pdc202xx_pci_driver = { | |||
377 | .id_table = pdc202xx, | 377 | .id_table = pdc202xx, |
378 | .probe = pdc202xx_init_one, | 378 | .probe = pdc202xx_init_one, |
379 | .remove = ata_pci_remove_one, | 379 | .remove = ata_pci_remove_one, |
380 | #ifdef CONFIG_PM | 380 | #ifdef CONFIG_PM_SLEEP |
381 | .suspend = ata_pci_device_suspend, | 381 | .suspend = ata_pci_device_suspend, |
382 | .resume = ata_pci_device_resume, | 382 | .resume = ata_pci_device_resume, |
383 | #endif | 383 | #endif |
diff --git a/drivers/ata/pata_piccolo.c b/drivers/ata/pata_piccolo.c index 0b46be117051..35cb0e263237 100644 --- a/drivers/ata/pata_piccolo.c +++ b/drivers/ata/pata_piccolo.c | |||
@@ -110,7 +110,7 @@ static struct pci_driver ata_tosh_pci_driver = { | |||
110 | .id_table = ata_tosh, | 110 | .id_table = ata_tosh, |
111 | .probe = ata_tosh_init_one, | 111 | .probe = ata_tosh_init_one, |
112 | .remove = ata_pci_remove_one, | 112 | .remove = ata_pci_remove_one, |
113 | #ifdef CONFIG_PM | 113 | #ifdef CONFIG_PM_SLEEP |
114 | .suspend = ata_pci_device_suspend, | 114 | .suspend = ata_pci_device_suspend, |
115 | .resume = ata_pci_device_resume, | 115 | .resume = ata_pci_device_resume, |
116 | #endif | 116 | #endif |
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index be3f10240dca..a3f1123d17aa 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c | |||
@@ -237,7 +237,7 @@ static struct pci_driver radisys_pci_driver = { | |||
237 | .id_table = radisys_pci_tbl, | 237 | .id_table = radisys_pci_tbl, |
238 | .probe = radisys_init_one, | 238 | .probe = radisys_init_one, |
239 | .remove = ata_pci_remove_one, | 239 | .remove = ata_pci_remove_one, |
240 | #ifdef CONFIG_PM | 240 | #ifdef CONFIG_PM_SLEEP |
241 | .suspend = ata_pci_device_suspend, | 241 | .suspend = ata_pci_device_suspend, |
242 | .resume = ata_pci_device_resume, | 242 | .resume = ata_pci_device_resume, |
243 | #endif | 243 | #endif |
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c index 521b2137ea3e..9ce5952216bc 100644 --- a/drivers/ata/pata_rdc.c +++ b/drivers/ata/pata_rdc.c | |||
@@ -382,7 +382,7 @@ static struct pci_driver rdc_pci_driver = { | |||
382 | .id_table = rdc_pci_tbl, | 382 | .id_table = rdc_pci_tbl, |
383 | .probe = rdc_init_one, | 383 | .probe = rdc_init_one, |
384 | .remove = rdc_remove_one, | 384 | .remove = rdc_remove_one, |
385 | #ifdef CONFIG_PM | 385 | #ifdef CONFIG_PM_SLEEP |
386 | .suspend = ata_pci_device_suspend, | 386 | .suspend = ata_pci_device_suspend, |
387 | .resume = ata_pci_device_resume, | 387 | .resume = ata_pci_device_resume, |
388 | #endif | 388 | #endif |
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index caedc90855b2..b3ec18c6bcc6 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c | |||
@@ -101,7 +101,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en | |||
101 | return -ENODEV; | 101 | return -ENODEV; |
102 | } | 102 | } |
103 | 103 | ||
104 | #ifdef CONFIG_PM | 104 | #ifdef CONFIG_PM_SLEEP |
105 | static int rz1000_reinit_one(struct pci_dev *pdev) | 105 | static int rz1000_reinit_one(struct pci_dev *pdev) |
106 | { | 106 | { |
107 | struct ata_host *host = pci_get_drvdata(pdev); | 107 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -133,7 +133,7 @@ static struct pci_driver rz1000_pci_driver = { | |||
133 | .id_table = pata_rz1000, | 133 | .id_table = pata_rz1000, |
134 | .probe = rz1000_init_one, | 134 | .probe = rz1000_init_one, |
135 | .remove = ata_pci_remove_one, | 135 | .remove = ata_pci_remove_one, |
136 | #ifdef CONFIG_PM | 136 | #ifdef CONFIG_PM_SLEEP |
137 | .suspend = ata_pci_device_suspend, | 137 | .suspend = ata_pci_device_suspend, |
138 | .resume = rz1000_reinit_one, | 138 | .resume = rz1000_reinit_one, |
139 | #endif | 139 | #endif |
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index 0610e78c8a2a..fb528831fb92 100644 --- a/drivers/ata/pata_samsung_cf.c +++ b/drivers/ata/pata_samsung_cf.c | |||
@@ -619,7 +619,7 @@ static int __exit pata_s3c_remove(struct platform_device *pdev) | |||
619 | return 0; | 619 | return 0; |
620 | } | 620 | } |
621 | 621 | ||
622 | #ifdef CONFIG_PM | 622 | #ifdef CONFIG_PM_SLEEP |
623 | static int pata_s3c_suspend(struct device *dev) | 623 | static int pata_s3c_suspend(struct device *dev) |
624 | { | 624 | { |
625 | struct platform_device *pdev = to_platform_device(dev); | 625 | struct platform_device *pdev = to_platform_device(dev); |
@@ -670,7 +670,7 @@ static struct platform_driver pata_s3c_driver = { | |||
670 | .driver = { | 670 | .driver = { |
671 | .name = DRV_NAME, | 671 | .name = DRV_NAME, |
672 | .owner = THIS_MODULE, | 672 | .owner = THIS_MODULE, |
673 | #ifdef CONFIG_PM | 673 | #ifdef CONFIG_PM_SLEEP |
674 | .pm = &pata_s3c_pm_ops, | 674 | .pm = &pata_s3c_pm_ops, |
675 | #endif | 675 | #endif |
676 | }, | 676 | }, |
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index 96a232fffae6..c71de5d680d1 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c | |||
@@ -254,7 +254,7 @@ static struct pci_driver sc1200_pci_driver = { | |||
254 | .id_table = sc1200, | 254 | .id_table = sc1200, |
255 | .probe = sc1200_init_one, | 255 | .probe = sc1200_init_one, |
256 | .remove = ata_pci_remove_one, | 256 | .remove = ata_pci_remove_one, |
257 | #ifdef CONFIG_PM | 257 | #ifdef CONFIG_PM_SLEEP |
258 | .suspend = ata_pci_device_suspend, | 258 | .suspend = ata_pci_device_suspend, |
259 | .resume = ata_pci_device_resume, | 259 | .resume = ata_pci_device_resume, |
260 | #endif | 260 | #endif |
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index f1f5b5ae3382..4e006d74bef8 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c | |||
@@ -1096,7 +1096,7 @@ static struct pci_driver scc_pci_driver = { | |||
1096 | .id_table = scc_pci_tbl, | 1096 | .id_table = scc_pci_tbl, |
1097 | .probe = scc_init_one, | 1097 | .probe = scc_init_one, |
1098 | .remove = ata_pci_remove_one, | 1098 | .remove = ata_pci_remove_one, |
1099 | #ifdef CONFIG_PM | 1099 | #ifdef CONFIG_PM_SLEEP |
1100 | .suspend = ata_pci_device_suspend, | 1100 | .suspend = ata_pci_device_suspend, |
1101 | .resume = ata_pci_device_resume, | 1101 | .resume = ata_pci_device_resume, |
1102 | #endif | 1102 | #endif |
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c index 5a1cde0ea360..b920c3407f8b 100644 --- a/drivers/ata/pata_sch.c +++ b/drivers/ata/pata_sch.c | |||
@@ -64,7 +64,7 @@ static struct pci_driver sch_pci_driver = { | |||
64 | .id_table = sch_pci_tbl, | 64 | .id_table = sch_pci_tbl, |
65 | .probe = sch_init_one, | 65 | .probe = sch_init_one, |
66 | .remove = ata_pci_remove_one, | 66 | .remove = ata_pci_remove_one, |
67 | #ifdef CONFIG_PM | 67 | #ifdef CONFIG_PM_SLEEP |
68 | .suspend = ata_pci_device_suspend, | 68 | .suspend = ata_pci_device_suspend, |
69 | .resume = ata_pci_device_resume, | 69 | .resume = ata_pci_device_resume, |
70 | #endif | 70 | #endif |
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c index e27f31fe1b67..fc5f31d4828e 100644 --- a/drivers/ata/pata_serverworks.c +++ b/drivers/ata/pata_serverworks.c | |||
@@ -436,7 +436,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id | |||
436 | return ata_pci_bmdma_init_one(pdev, ppi, &serverworks_sht, NULL, 0); | 436 | return ata_pci_bmdma_init_one(pdev, ppi, &serverworks_sht, NULL, 0); |
437 | } | 437 | } |
438 | 438 | ||
439 | #ifdef CONFIG_PM | 439 | #ifdef CONFIG_PM_SLEEP |
440 | static int serverworks_reinit_one(struct pci_dev *pdev) | 440 | static int serverworks_reinit_one(struct pci_dev *pdev) |
441 | { | 441 | { |
442 | struct ata_host *host = pci_get_drvdata(pdev); | 442 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -468,7 +468,7 @@ static struct pci_driver serverworks_pci_driver = { | |||
468 | .id_table = serverworks, | 468 | .id_table = serverworks, |
469 | .probe = serverworks_init_one, | 469 | .probe = serverworks_init_one, |
470 | .remove = ata_pci_remove_one, | 470 | .remove = ata_pci_remove_one, |
471 | #ifdef CONFIG_PM | 471 | #ifdef CONFIG_PM_SLEEP |
472 | .suspend = ata_pci_device_suspend, | 472 | .suspend = ata_pci_device_suspend, |
473 | .resume = serverworks_reinit_one, | 473 | .resume = serverworks_reinit_one, |
474 | #endif | 474 | #endif |
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 73fe362d9716..f597edccedec 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
@@ -403,7 +403,7 @@ use_ioports: | |||
403 | return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0); | 403 | return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0); |
404 | } | 404 | } |
405 | 405 | ||
406 | #ifdef CONFIG_PM | 406 | #ifdef CONFIG_PM_SLEEP |
407 | static int sil680_reinit_one(struct pci_dev *pdev) | 407 | static int sil680_reinit_one(struct pci_dev *pdev) |
408 | { | 408 | { |
409 | struct ata_host *host = pci_get_drvdata(pdev); | 409 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -429,7 +429,7 @@ static struct pci_driver sil680_pci_driver = { | |||
429 | .id_table = sil680, | 429 | .id_table = sil680, |
430 | .probe = sil680_init_one, | 430 | .probe = sil680_init_one, |
431 | .remove = ata_pci_remove_one, | 431 | .remove = ata_pci_remove_one, |
432 | #ifdef CONFIG_PM | 432 | #ifdef CONFIG_PM_SLEEP |
433 | .suspend = ata_pci_device_suspend, | 433 | .suspend = ata_pci_device_suspend, |
434 | .resume = sil680_reinit_one, | 434 | .resume = sil680_reinit_one, |
435 | #endif | 435 | #endif |
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 78d913aa93c8..626f989d5c6a 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -869,7 +869,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
869 | return ata_pci_bmdma_init_one(pdev, ppi, &sis_sht, chipset, 0); | 869 | return ata_pci_bmdma_init_one(pdev, ppi, &sis_sht, chipset, 0); |
870 | } | 870 | } |
871 | 871 | ||
872 | #ifdef CONFIG_PM | 872 | #ifdef CONFIG_PM_SLEEP |
873 | static int sis_reinit_one(struct pci_dev *pdev) | 873 | static int sis_reinit_one(struct pci_dev *pdev) |
874 | { | 874 | { |
875 | struct ata_host *host = pci_get_drvdata(pdev); | 875 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -899,7 +899,7 @@ static struct pci_driver sis_pci_driver = { | |||
899 | .id_table = sis_pci_tbl, | 899 | .id_table = sis_pci_tbl, |
900 | .probe = sis_init_one, | 900 | .probe = sis_init_one, |
901 | .remove = ata_pci_remove_one, | 901 | .remove = ata_pci_remove_one, |
902 | #ifdef CONFIG_PM | 902 | #ifdef CONFIG_PM_SLEEP |
903 | .suspend = ata_pci_device_suspend, | 903 | .suspend = ata_pci_device_suspend, |
904 | .resume = sis_reinit_one, | 904 | .resume = sis_reinit_one, |
905 | #endif | 905 | #endif |
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index 900f0e4a1faf..4935f61f629c 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c | |||
@@ -337,7 +337,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id | |||
337 | return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0); | 337 | return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0); |
338 | } | 338 | } |
339 | 339 | ||
340 | #ifdef CONFIG_PM | 340 | #ifdef CONFIG_PM_SLEEP |
341 | static int sl82c105_reinit_one(struct pci_dev *pdev) | 341 | static int sl82c105_reinit_one(struct pci_dev *pdev) |
342 | { | 342 | { |
343 | struct ata_host *host = pci_get_drvdata(pdev); | 343 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -365,7 +365,7 @@ static struct pci_driver sl82c105_pci_driver = { | |||
365 | .id_table = sl82c105, | 365 | .id_table = sl82c105, |
366 | .probe = sl82c105_init_one, | 366 | .probe = sl82c105_init_one, |
367 | .remove = ata_pci_remove_one, | 367 | .remove = ata_pci_remove_one, |
368 | #ifdef CONFIG_PM | 368 | #ifdef CONFIG_PM_SLEEP |
369 | .suspend = ata_pci_device_suspend, | 369 | .suspend = ata_pci_device_suspend, |
370 | .resume = sl82c105_reinit_one, | 370 | .resume = sl82c105_reinit_one, |
371 | #endif | 371 | #endif |
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index 7bc78e264f9e..d9364af8eb63 100644 --- a/drivers/ata/pata_triflex.c +++ b/drivers/ata/pata_triflex.c | |||
@@ -207,7 +207,7 @@ static const struct pci_device_id triflex[] = { | |||
207 | { }, | 207 | { }, |
208 | }; | 208 | }; |
209 | 209 | ||
210 | #ifdef CONFIG_PM | 210 | #ifdef CONFIG_PM_SLEEP |
211 | static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | 211 | static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) |
212 | { | 212 | { |
213 | struct ata_host *host = pci_get_drvdata(pdev); | 213 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -233,7 +233,7 @@ static struct pci_driver triflex_pci_driver = { | |||
233 | .id_table = triflex, | 233 | .id_table = triflex, |
234 | .probe = triflex_init_one, | 234 | .probe = triflex_init_one, |
235 | .remove = ata_pci_remove_one, | 235 | .remove = ata_pci_remove_one, |
236 | #ifdef CONFIG_PM | 236 | #ifdef CONFIG_PM_SLEEP |
237 | .suspend = triflex_ata_pci_device_suspend, | 237 | .suspend = triflex_ata_pci_device_suspend, |
238 | .resume = ata_pci_device_resume, | 238 | .resume = ata_pci_device_resume, |
239 | #endif | 239 | #endif |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index f6c9632bdff6..1ca6bcab369f 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -659,7 +659,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
659 | return ata_pci_bmdma_init_one(pdev, ppi, &via_sht, (void *)config, 0); | 659 | return ata_pci_bmdma_init_one(pdev, ppi, &via_sht, (void *)config, 0); |
660 | } | 660 | } |
661 | 661 | ||
662 | #ifdef CONFIG_PM | 662 | #ifdef CONFIG_PM_SLEEP |
663 | /** | 663 | /** |
664 | * via_reinit_one - reinit after resume | 664 | * via_reinit_one - reinit after resume |
665 | * @pdev; PCI device | 665 | * @pdev; PCI device |
@@ -704,7 +704,7 @@ static struct pci_driver via_pci_driver = { | |||
704 | .id_table = via, | 704 | .id_table = via, |
705 | .probe = via_init_one, | 705 | .probe = via_init_one, |
706 | .remove = ata_pci_remove_one, | 706 | .remove = ata_pci_remove_one, |
707 | #ifdef CONFIG_PM | 707 | #ifdef CONFIG_PM_SLEEP |
708 | .suspend = ata_pci_device_suspend, | 708 | .suspend = ata_pci_device_suspend, |
709 | .resume = via_reinit_one, | 709 | .resume = via_reinit_one, |
710 | #endif | 710 | #endif |
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index fb0b40a191c2..616a6d2ac20c 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -774,20 +774,6 @@ static int sata_fsl_port_start(struct ata_port *ap) | |||
774 | VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); | 774 | VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); |
775 | VPRINTK("CHBA = 0x%x\n", ioread32(hcr_base + CHBA)); | 775 | VPRINTK("CHBA = 0x%x\n", ioread32(hcr_base + CHBA)); |
776 | 776 | ||
777 | #ifdef CONFIG_MPC8315_DS | ||
778 | /* | ||
779 | * Workaround for 8315DS board 3gbps link-up issue, | ||
780 | * currently limit SATA port to GEN1 speed | ||
781 | */ | ||
782 | sata_fsl_scr_read(&ap->link, SCR_CONTROL, &temp); | ||
783 | temp &= ~(0xF << 4); | ||
784 | temp |= (0x1 << 4); | ||
785 | sata_fsl_scr_write(&ap->link, SCR_CONTROL, temp); | ||
786 | |||
787 | sata_fsl_scr_read(&ap->link, SCR_CONTROL, &temp); | ||
788 | dev_warn(dev, "scr_control, speed limited to %x\n", temp); | ||
789 | #endif | ||
790 | |||
791 | return 0; | 777 | return 0; |
792 | } | 778 | } |
793 | 779 | ||
@@ -1588,7 +1574,7 @@ static int sata_fsl_remove(struct platform_device *ofdev) | |||
1588 | return 0; | 1574 | return 0; |
1589 | } | 1575 | } |
1590 | 1576 | ||
1591 | #ifdef CONFIG_PM | 1577 | #ifdef CONFIG_PM_SLEEP |
1592 | static int sata_fsl_suspend(struct platform_device *op, pm_message_t state) | 1578 | static int sata_fsl_suspend(struct platform_device *op, pm_message_t state) |
1593 | { | 1579 | { |
1594 | struct ata_host *host = platform_get_drvdata(op); | 1580 | struct ata_host *host = platform_get_drvdata(op); |
@@ -1644,7 +1630,7 @@ static struct platform_driver fsl_sata_driver = { | |||
1644 | }, | 1630 | }, |
1645 | .probe = sata_fsl_probe, | 1631 | .probe = sata_fsl_probe, |
1646 | .remove = sata_fsl_remove, | 1632 | .remove = sata_fsl_remove, |
1647 | #ifdef CONFIG_PM | 1633 | #ifdef CONFIG_PM_SLEEP |
1648 | .suspend = sata_fsl_suspend, | 1634 | .suspend = sata_fsl_suspend, |
1649 | .resume = sata_fsl_resume, | 1635 | .resume = sata_fsl_resume, |
1650 | #endif | 1636 | #endif |
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c index 5c54d957370a..069827826b20 100644 --- a/drivers/ata/sata_inic162x.c +++ b/drivers/ata/sata_inic162x.c | |||
@@ -785,7 +785,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl) | |||
785 | return 0; | 785 | return 0; |
786 | } | 786 | } |
787 | 787 | ||
788 | #ifdef CONFIG_PM | 788 | #ifdef CONFIG_PM_SLEEP |
789 | static int inic_pci_device_resume(struct pci_dev *pdev) | 789 | static int inic_pci_device_resume(struct pci_dev *pdev) |
790 | { | 790 | { |
791 | struct ata_host *host = pci_get_drvdata(pdev); | 791 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -898,7 +898,7 @@ static const struct pci_device_id inic_pci_tbl[] = { | |||
898 | static struct pci_driver inic_pci_driver = { | 898 | static struct pci_driver inic_pci_driver = { |
899 | .name = DRV_NAME, | 899 | .name = DRV_NAME, |
900 | .id_table = inic_pci_tbl, | 900 | .id_table = inic_pci_tbl, |
901 | #ifdef CONFIG_PM | 901 | #ifdef CONFIG_PM_SLEEP |
902 | .suspend = ata_pci_device_suspend, | 902 | .suspend = ata_pci_device_suspend, |
903 | .resume = inic_pci_device_resume, | 903 | .resume = inic_pci_device_resume, |
904 | #endif | 904 | #endif |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 05c8a44adf8e..391cfda1e83f 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -4222,7 +4222,7 @@ static int mv_platform_remove(struct platform_device *pdev) | |||
4222 | return 0; | 4222 | return 0; |
4223 | } | 4223 | } |
4224 | 4224 | ||
4225 | #ifdef CONFIG_PM | 4225 | #ifdef CONFIG_PM_SLEEP |
4226 | static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state) | 4226 | static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state) |
4227 | { | 4227 | { |
4228 | struct ata_host *host = platform_get_drvdata(pdev); | 4228 | struct ata_host *host = platform_get_drvdata(pdev); |
@@ -4289,7 +4289,7 @@ static struct platform_driver mv_platform_driver = { | |||
4289 | #ifdef CONFIG_PCI | 4289 | #ifdef CONFIG_PCI |
4290 | static int mv_pci_init_one(struct pci_dev *pdev, | 4290 | static int mv_pci_init_one(struct pci_dev *pdev, |
4291 | const struct pci_device_id *ent); | 4291 | const struct pci_device_id *ent); |
4292 | #ifdef CONFIG_PM | 4292 | #ifdef CONFIG_PM_SLEEP |
4293 | static int mv_pci_device_resume(struct pci_dev *pdev); | 4293 | static int mv_pci_device_resume(struct pci_dev *pdev); |
4294 | #endif | 4294 | #endif |
4295 | 4295 | ||
@@ -4299,7 +4299,7 @@ static struct pci_driver mv_pci_driver = { | |||
4299 | .id_table = mv_pci_tbl, | 4299 | .id_table = mv_pci_tbl, |
4300 | .probe = mv_pci_init_one, | 4300 | .probe = mv_pci_init_one, |
4301 | .remove = ata_pci_remove_one, | 4301 | .remove = ata_pci_remove_one, |
4302 | #ifdef CONFIG_PM | 4302 | #ifdef CONFIG_PM_SLEEP |
4303 | .suspend = ata_pci_device_suspend, | 4303 | .suspend = ata_pci_device_suspend, |
4304 | .resume = mv_pci_device_resume, | 4304 | .resume = mv_pci_device_resume, |
4305 | #endif | 4305 | #endif |
@@ -4457,7 +4457,7 @@ static int mv_pci_init_one(struct pci_dev *pdev, | |||
4457 | IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht); | 4457 | IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht); |
4458 | } | 4458 | } |
4459 | 4459 | ||
4460 | #ifdef CONFIG_PM | 4460 | #ifdef CONFIG_PM_SLEEP |
4461 | static int mv_pci_device_resume(struct pci_dev *pdev) | 4461 | static int mv_pci_device_resume(struct pci_dev *pdev) |
4462 | { | 4462 | { |
4463 | struct ata_host *host = pci_get_drvdata(pdev); | 4463 | struct ata_host *host = pci_get_drvdata(pdev); |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index ba5f27120332..cdf99fac139a 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -295,7 +295,7 @@ struct nv_swncq_port_priv { | |||
295 | #define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & (1 << (19 + (12 * (PORT))))) | 295 | #define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & (1 << (19 + (12 * (PORT))))) |
296 | 296 | ||
297 | static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); | 297 | static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
298 | #ifdef CONFIG_PM | 298 | #ifdef CONFIG_PM_SLEEP |
299 | static int nv_pci_device_resume(struct pci_dev *pdev); | 299 | static int nv_pci_device_resume(struct pci_dev *pdev); |
300 | #endif | 300 | #endif |
301 | static void nv_ck804_host_stop(struct ata_host *host); | 301 | static void nv_ck804_host_stop(struct ata_host *host); |
@@ -379,7 +379,7 @@ static struct pci_driver nv_pci_driver = { | |||
379 | .name = DRV_NAME, | 379 | .name = DRV_NAME, |
380 | .id_table = nv_pci_tbl, | 380 | .id_table = nv_pci_tbl, |
381 | .probe = nv_init_one, | 381 | .probe = nv_init_one, |
382 | #ifdef CONFIG_PM | 382 | #ifdef CONFIG_PM_SLEEP |
383 | .suspend = ata_pci_device_suspend, | 383 | .suspend = ata_pci_device_suspend, |
384 | .resume = nv_pci_device_resume, | 384 | .resume = nv_pci_device_resume, |
385 | #endif | 385 | #endif |
@@ -2431,7 +2431,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2431 | return ata_pci_sff_activate_host(host, ipriv->irq_handler, ipriv->sht); | 2431 | return ata_pci_sff_activate_host(host, ipriv->irq_handler, ipriv->sht); |
2432 | } | 2432 | } |
2433 | 2433 | ||
2434 | #ifdef CONFIG_PM | 2434 | #ifdef CONFIG_PM_SLEEP |
2435 | static int nv_pci_device_resume(struct pci_dev *pdev) | 2435 | static int nv_pci_device_resume(struct pci_dev *pdev) |
2436 | { | 2436 | { |
2437 | struct ata_host *host = pci_get_drvdata(pdev); | 2437 | struct ata_host *host = pci_get_drvdata(pdev); |
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 2b25bd83fc9d..61eb6d77dac7 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c | |||
@@ -937,7 +937,7 @@ static int sata_rcar_remove(struct platform_device *pdev) | |||
937 | return 0; | 937 | return 0; |
938 | } | 938 | } |
939 | 939 | ||
940 | #ifdef CONFIG_PM | 940 | #ifdef CONFIG_PM_SLEEP |
941 | static int sata_rcar_suspend(struct device *dev) | 941 | static int sata_rcar_suspend(struct device *dev) |
942 | { | 942 | { |
943 | struct ata_host *host = dev_get_drvdata(dev); | 943 | struct ata_host *host = dev_get_drvdata(dev); |
@@ -991,7 +991,7 @@ static struct platform_driver sata_rcar_driver = { | |||
991 | .name = DRV_NAME, | 991 | .name = DRV_NAME, |
992 | .owner = THIS_MODULE, | 992 | .owner = THIS_MODULE, |
993 | .of_match_table = sata_rcar_match, | 993 | .of_match_table = sata_rcar_match, |
994 | #ifdef CONFIG_PM | 994 | #ifdef CONFIG_PM_SLEEP |
995 | .pm = &sata_rcar_pm_ops, | 995 | .pm = &sata_rcar_pm_ops, |
996 | #endif | 996 | #endif |
997 | }, | 997 | }, |
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 3062f8605b29..40b76b2d18c6 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
@@ -112,7 +112,7 @@ enum { | |||
112 | }; | 112 | }; |
113 | 113 | ||
114 | static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); | 114 | static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
115 | #ifdef CONFIG_PM | 115 | #ifdef CONFIG_PM_SLEEP |
116 | static int sil_pci_device_resume(struct pci_dev *pdev); | 116 | static int sil_pci_device_resume(struct pci_dev *pdev); |
117 | #endif | 117 | #endif |
118 | static void sil_dev_config(struct ata_device *dev); | 118 | static void sil_dev_config(struct ata_device *dev); |
@@ -166,7 +166,7 @@ static struct pci_driver sil_pci_driver = { | |||
166 | .id_table = sil_pci_tbl, | 166 | .id_table = sil_pci_tbl, |
167 | .probe = sil_init_one, | 167 | .probe = sil_init_one, |
168 | .remove = ata_pci_remove_one, | 168 | .remove = ata_pci_remove_one, |
169 | #ifdef CONFIG_PM | 169 | #ifdef CONFIG_PM_SLEEP |
170 | .suspend = ata_pci_device_suspend, | 170 | .suspend = ata_pci_device_suspend, |
171 | .resume = sil_pci_device_resume, | 171 | .resume = sil_pci_device_resume, |
172 | #endif | 172 | #endif |
@@ -802,7 +802,7 @@ static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
802 | &sil_sht); | 802 | &sil_sht); |
803 | } | 803 | } |
804 | 804 | ||
805 | #ifdef CONFIG_PM | 805 | #ifdef CONFIG_PM_SLEEP |
806 | static int sil_pci_device_resume(struct pci_dev *pdev) | 806 | static int sil_pci_device_resume(struct pci_dev *pdev) |
807 | { | 807 | { |
808 | struct ata_host *host = pci_get_drvdata(pdev); | 808 | struct ata_host *host = pci_get_drvdata(pdev); |
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index aa1051ba6d13..0534890f118a 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -353,8 +353,10 @@ static void sil24_error_handler(struct ata_port *ap); | |||
353 | static void sil24_post_internal_cmd(struct ata_queued_cmd *qc); | 353 | static void sil24_post_internal_cmd(struct ata_queued_cmd *qc); |
354 | static int sil24_port_start(struct ata_port *ap); | 354 | static int sil24_port_start(struct ata_port *ap); |
355 | static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); | 355 | static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
356 | #ifdef CONFIG_PM | 356 | #ifdef CONFIG_PM_SLEEP |
357 | static int sil24_pci_device_resume(struct pci_dev *pdev); | 357 | static int sil24_pci_device_resume(struct pci_dev *pdev); |
358 | #endif | ||
359 | #ifdef CONFIG_PM | ||
358 | static int sil24_port_resume(struct ata_port *ap); | 360 | static int sil24_port_resume(struct ata_port *ap); |
359 | #endif | 361 | #endif |
360 | 362 | ||
@@ -375,7 +377,7 @@ static struct pci_driver sil24_pci_driver = { | |||
375 | .id_table = sil24_pci_tbl, | 377 | .id_table = sil24_pci_tbl, |
376 | .probe = sil24_init_one, | 378 | .probe = sil24_init_one, |
377 | .remove = ata_pci_remove_one, | 379 | .remove = ata_pci_remove_one, |
378 | #ifdef CONFIG_PM | 380 | #ifdef CONFIG_PM_SLEEP |
379 | .suspend = ata_pci_device_suspend, | 381 | .suspend = ata_pci_device_suspend, |
380 | .resume = sil24_pci_device_resume, | 382 | .resume = sil24_pci_device_resume, |
381 | #endif | 383 | #endif |
@@ -1350,7 +1352,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1350 | &sil24_sht); | 1352 | &sil24_sht); |
1351 | } | 1353 | } |
1352 | 1354 | ||
1353 | #ifdef CONFIG_PM | 1355 | #ifdef CONFIG_PM_SLEEP |
1354 | static int sil24_pci_device_resume(struct pci_dev *pdev) | 1356 | static int sil24_pci_device_resume(struct pci_dev *pdev) |
1355 | { | 1357 | { |
1356 | struct ata_host *host = pci_get_drvdata(pdev); | 1358 | struct ata_host *host = pci_get_drvdata(pdev); |
@@ -1370,7 +1372,9 @@ static int sil24_pci_device_resume(struct pci_dev *pdev) | |||
1370 | 1372 | ||
1371 | return 0; | 1373 | return 0; |
1372 | } | 1374 | } |
1375 | #endif | ||
1373 | 1376 | ||
1377 | #ifdef CONFIG_PM | ||
1374 | static int sil24_port_resume(struct ata_port *ap) | 1378 | static int sil24_port_resume(struct ata_port *ap) |
1375 | { | 1379 | { |
1376 | sil24_config_pmp(ap, ap->nr_pmp_links); | 1380 | sil24_config_pmp(ap, ap->nr_pmp_links); |
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index b513428171b3..d1637ac40a73 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c | |||
@@ -82,7 +82,7 @@ static struct pci_driver sis_pci_driver = { | |||
82 | .id_table = sis_pci_tbl, | 82 | .id_table = sis_pci_tbl, |
83 | .probe = sis_init_one, | 83 | .probe = sis_init_one, |
84 | .remove = ata_pci_remove_one, | 84 | .remove = ata_pci_remove_one, |
85 | #ifdef CONFIG_PM | 85 | #ifdef CONFIG_PM_SLEEP |
86 | .suspend = ata_pci_device_suspend, | 86 | .suspend = ata_pci_device_suspend, |
87 | .resume = ata_pci_device_resume, | 87 | .resume = ata_pci_device_resume, |
88 | #endif | 88 | #endif |
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index f72e84228c5c..47bf89464cef 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c | |||
@@ -103,7 +103,7 @@ static struct pci_driver svia_pci_driver = { | |||
103 | .name = DRV_NAME, | 103 | .name = DRV_NAME, |
104 | .id_table = svia_pci_tbl, | 104 | .id_table = svia_pci_tbl, |
105 | .probe = svia_init_one, | 105 | .probe = svia_init_one, |
106 | #ifdef CONFIG_PM | 106 | #ifdef CONFIG_PM_SLEEP |
107 | .suspend = ata_pci_device_suspend, | 107 | .suspend = ata_pci_device_suspend, |
108 | .resume = ata_pci_device_resume, | 108 | .resume = ata_pci_device_resume, |
109 | #endif | 109 | #endif |