summaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches/0112-ahci-platform-Add-enable_-disable_resources-helper-f.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-02-11 10:09:23 +0000
committerJohn Crispin <john@openwrt.org>2015-02-11 10:09:23 +0000
commit88ddb3746188037afd38d631f7a893587fa8bdf0 (patch)
treedf4684db63441435126c4b6ff1fda4ce615e1ff0 /target/linux/ipq806x/patches/0112-ahci-platform-Add-enable_-disable_resources-helper-f.patch
parentddcbef5766fa18f52e7a7d1928b25edc63e73937 (diff)
downloadmaster-31e0f0ae-88ddb3746188037afd38d631f7a893587fa8bdf0.tar.gz
master-31e0f0ae-88ddb3746188037afd38d631f7a893587fa8bdf0.tar.bz2
master-31e0f0ae-88ddb3746188037afd38d631f7a893587fa8bdf0.zip
ipq806x: update target to v3.18
Patches in the ipq806x/patches folder were out of tree in v3.14. The newest patch at the time was from June, so we can safely assume that either the patches have been merged, or they have been rejected for a good reason. If patches are seen missing, we'll cherry-pick them on a per-needed basis. This new kernel have been tested on AP148, which seems to works fine. Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> SVN-Revision: 44386
Diffstat (limited to 'target/linux/ipq806x/patches/0112-ahci-platform-Add-enable_-disable_resources-helper-f.patch')
-rw-r--r--target/linux/ipq806x/patches/0112-ahci-platform-Add-enable_-disable_resources-helper-f.patch201
1 files changed, 0 insertions, 201 deletions
diff --git a/target/linux/ipq806x/patches/0112-ahci-platform-Add-enable_-disable_resources-helper-f.patch b/target/linux/ipq806x/patches/0112-ahci-platform-Add-enable_-disable_resources-helper-f.patch
deleted file mode 100644
index 888ee324f8..0000000000
--- a/target/linux/ipq806x/patches/0112-ahci-platform-Add-enable_-disable_resources-helper-f.patch
+++ /dev/null
@@ -1,201 +0,0 @@
-From 3b2df84624b38362cb84c2d4c6d1d3540c5069d3 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede@redhat.com>
-Date: Sat, 22 Feb 2014 16:53:33 +0100
-Subject: [PATCH 112/182] ahci-platform: Add enable_ / disable_resources
- helper functions
-
-tj: Minor comment formatting updates.
-
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
----
- drivers/ata/ahci_platform.c | 106 +++++++++++++++++++++++++++--------------
- include/linux/ahci_platform.h | 2 +
- 2 files changed, 71 insertions(+), 37 deletions(-)
-
---- a/drivers/ata/ahci_platform.c
-+++ b/drivers/ata/ahci_platform.c
-@@ -133,6 +133,62 @@ void ahci_platform_disable_clks(struct a
- }
- EXPORT_SYMBOL_GPL(ahci_platform_disable_clks);
-
-+/**
-+ * ahci_platform_enable_resources - Enable platform resources
-+ * @hpriv: host private area to store config values
-+ *
-+ * This function enables all ahci_platform managed resources in the
-+ * following order:
-+ * 1) Regulator
-+ * 2) Clocks (through ahci_platform_enable_clks)
-+ *
-+ * If resource enabling fails at any point the previous enabled resources
-+ * are disabled in reverse order.
-+ *
-+ * RETURNS:
-+ * 0 on success otherwise a negative error code
-+ */
-+int ahci_platform_enable_resources(struct ahci_host_priv *hpriv)
-+{
-+ int rc;
-+
-+ if (hpriv->target_pwr) {
-+ rc = regulator_enable(hpriv->target_pwr);
-+ if (rc)
-+ return rc;
-+ }
-+
-+ rc = ahci_platform_enable_clks(hpriv);
-+ if (rc)
-+ goto disable_regulator;
-+
-+ return 0;
-+
-+disable_regulator:
-+ if (hpriv->target_pwr)
-+ regulator_disable(hpriv->target_pwr);
-+ return rc;
-+}
-+EXPORT_SYMBOL_GPL(ahci_platform_enable_resources);
-+
-+/**
-+ * ahci_platform_disable_resources - Disable platform resources
-+ * @hpriv: host private area to store config values
-+ *
-+ * This function disables all ahci_platform managed resources in the
-+ * following order:
-+ * 1) Clocks (through ahci_platform_disable_clks)
-+ * 2) Regulator
-+ */
-+void ahci_platform_disable_resources(struct ahci_host_priv *hpriv)
-+{
-+ ahci_platform_disable_clks(hpriv);
-+
-+ if (hpriv->target_pwr)
-+ regulator_disable(hpriv->target_pwr);
-+}
-+EXPORT_SYMBOL_GPL(ahci_platform_disable_resources);
-+
- static void ahci_put_clks(struct ahci_host_priv *hpriv)
- {
- int c;
-@@ -215,15 +271,9 @@ static int ahci_probe(struct platform_de
- hpriv->clks[i] = clk;
- }
-
-- if (hpriv->target_pwr) {
-- rc = regulator_enable(hpriv->target_pwr);
-- if (rc)
-- goto free_clk;
-- }
--
-- rc = ahci_enable_clks(dev, hpriv);
-+ rc = ahci_platform_enable_resources(hpriv);
- if (rc)
-- goto disable_regulator;
-+ goto free_clk;
-
- /*
- * Some platforms might need to prepare for mmio region access,
-@@ -234,7 +284,7 @@ static int ahci_probe(struct platform_de
- if (pdata && pdata->init) {
- rc = pdata->init(dev, hpriv->mmio);
- if (rc)
-- goto disable_unprepare_clk;
-+ goto disable_resources;
- }
-
- ahci_save_initial_config(dev, hpriv,
-@@ -304,11 +354,8 @@ static int ahci_probe(struct platform_de
- pdata_exit:
- if (pdata && pdata->exit)
- pdata->exit(dev);
--disable_unprepare_clk:
-- ahci_disable_clks(hpriv);
--disable_regulator:
-- if (hpriv->target_pwr)
-- regulator_disable(hpriv->target_pwr);
-+disable_resources:
-+ ahci_platform_disable_resources(hpriv);
- free_clk:
- ahci_put_clks(hpriv);
- return rc;
-@@ -323,11 +370,8 @@ static void ahci_host_stop(struct ata_ho
- if (pdata && pdata->exit)
- pdata->exit(dev);
-
-- ahci_disable_clks(hpriv);
-+ ahci_platform_disable_resources(hpriv);
- ahci_put_clks(hpriv);
--
-- if (hpriv->target_pwr)
-- regulator_disable(hpriv->target_pwr);
- }
-
- #ifdef CONFIG_PM_SLEEP
-@@ -362,10 +406,7 @@ static int ahci_suspend(struct device *d
- if (pdata && pdata->suspend)
- return pdata->suspend(dev);
-
-- ahci_disable_clks(hpriv);
--
-- if (hpriv->target_pwr)
-- regulator_disable(hpriv->target_pwr);
-+ ahci_platform_disable_resources(hpriv);
-
- return 0;
- }
-@@ -377,26 +418,20 @@ static int ahci_resume(struct device *de
- struct ahci_host_priv *hpriv = host->private_data;
- int rc;
-
-- if (hpriv->target_pwr) {
-- rc = regulator_enable(hpriv->target_pwr);
-- if (rc)
-- return rc;
-- }
--
-- rc = ahci_enable_clks(dev, hpriv);
-+ rc = ahci_platform_enable_resources(hpriv);
- if (rc)
-- goto disable_regulator;
-+ return rc;
-
- if (pdata && pdata->resume) {
- rc = pdata->resume(dev);
- if (rc)
-- goto disable_unprepare_clk;
-+ goto disable_resources;
- }
-
- if (dev->power.power_state.event == PM_EVENT_SUSPEND) {
- rc = ahci_reset_controller(host);
- if (rc)
-- goto disable_unprepare_clk;
-+ goto disable_resources;
-
- ahci_init_controller(host);
- }
-@@ -405,11 +440,8 @@ static int ahci_resume(struct device *de
-
- return 0;
-
--disable_unprepare_clk:
-- ahci_disable_clks(hpriv);
--disable_regulator:
-- if (hpriv->target_pwr)
-- regulator_disable(hpriv->target_pwr);
-+disable_resources:
-+ ahci_platform_disable_resources(hpriv);
-
- return rc;
- }
---- a/include/linux/ahci_platform.h
-+++ b/include/linux/ahci_platform.h
-@@ -33,5 +33,7 @@ struct ahci_platform_data {
-
- int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
- void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
-+int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
-+void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
-
- #endif /* _AHCI_PLATFORM_H */