diff options
author | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 09:48:20 +0200 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 14:02:16 +0200 |
commit | 2489007e7d740ccbc3e0a202914e243ad5178787 (patch) | |
tree | b8e6380ea7b1da63474ad68a5dba997e01146043 /drivers/base | |
parent | 5f67568eb31e3a813c7c52461dcf66ade15fc2e7 (diff) | |
download | kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.zip kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.gz kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.bz2 |
merge opensource jb u5
Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 4 | ||||
-rw-r--r-- | drivers/base/iommu.c | 124 | ||||
-rw-r--r-- | drivers/base/power/main.c | 13 | ||||
-rw-r--r-- | drivers/base/power/runtime.c | 3 |
4 files changed, 16 insertions, 128 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index b0c7092..68bd89e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1748,10 +1748,6 @@ void device_shutdown(void) pm_runtime_get_noresume(dev); pm_runtime_barrier(dev); - /* Don't allow any more runtime suspends */ - pm_runtime_get_noresume(dev); - pm_runtime_barrier(dev); - #if defined(CONFIG_MACH_Q1_BD) || defined(CONFIG_MACH_PX) || defined(CONFIG_MACH_MIDAS) /* Temporary log to analyze a problem during shutdown */ if (dev->bus && dev->bus->shutdown) { diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c deleted file mode 100644 index 6e6b6a1..0000000 --- a/drivers/base/iommu.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2007-2008 Advanced Micro Devices, Inc. - * Author: Joerg Roedel <joerg.roedel@amd.com> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <linux/bug.h> -#include <linux/types.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/errno.h> -#include <linux/iommu.h> - -static struct iommu_ops *iommu_ops; - -void register_iommu(struct iommu_ops *ops) -{ - if (iommu_ops) - BUG(); - - iommu_ops = ops; -} - -bool iommu_found(void) -{ - return iommu_ops != NULL; -} -EXPORT_SYMBOL_GPL(iommu_found); - -struct iommu_domain *iommu_domain_alloc(void) -{ - struct iommu_domain *domain; - int ret; - - domain = kmalloc(sizeof(*domain), GFP_KERNEL); - if (!domain) - return NULL; - - ret = iommu_ops->domain_init(domain); - if (ret) - goto out_free; - - return domain; - -out_free: - kfree(domain); - - return NULL; -} -EXPORT_SYMBOL_GPL(iommu_domain_alloc); - -void iommu_domain_free(struct iommu_domain *domain) -{ - iommu_ops->domain_destroy(domain); - kfree(domain); -} -EXPORT_SYMBOL_GPL(iommu_domain_free); - -int iommu_attach_device(struct iommu_domain *domain, struct device *dev) -{ - return iommu_ops->attach_dev(domain, dev); -} -EXPORT_SYMBOL_GPL(iommu_attach_device); - -void iommu_detach_device(struct iommu_domain *domain, struct device *dev) -{ - iommu_ops->detach_dev(domain, dev); -} -EXPORT_SYMBOL_GPL(iommu_detach_device); - -phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, - unsigned long iova) -{ - return iommu_ops->iova_to_phys(domain, iova); -} -EXPORT_SYMBOL_GPL(iommu_iova_to_phys); - -int iommu_domain_has_cap(struct iommu_domain *domain, - unsigned long cap) -{ - return iommu_ops->domain_has_cap(domain, cap); -} -EXPORT_SYMBOL_GPL(iommu_domain_has_cap); - -int iommu_map(struct iommu_domain *domain, unsigned long iova, - phys_addr_t paddr, int gfp_order, int prot) -{ - unsigned long invalid_mask; - size_t size; - - size = 0x1000UL << gfp_order; - invalid_mask = size - 1; - - BUG_ON((iova | paddr) & invalid_mask); - - return iommu_ops->map(domain, iova, paddr, gfp_order, prot); -} -EXPORT_SYMBOL_GPL(iommu_map); - -int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) -{ - unsigned long invalid_mask; - size_t size; - - size = 0x1000UL << gfp_order; - invalid_mask = size - 1; - - BUG_ON(iova & invalid_mask); - - return iommu_ops->unmap(domain, iova, gfp_order); -} -EXPORT_SYMBOL_GPL(iommu_unmap); diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index cc696d6..e7de161 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -1019,6 +1019,9 @@ static int device_suspend(struct device *dev) * dpm_suspend - Execute "suspend" callbacks for all non-sysdev devices. * @state: PM transition of the system being carried out. */ +#ifdef CONFIG_FAST_BOOT +extern bool fake_shut_down; +#endif int dpm_suspend(pm_message_t state) { ktime_t starttime = ktime_get(); @@ -1040,8 +1043,18 @@ int dpm_suspend(pm_message_t state) mutex_lock(&dpm_list_mtx); if (error) { pm_dev_err(dev, state, "", error); +#ifdef CONFIG_FAST_BOOT + if (fake_shut_down) { + pr_info("%s: fake shut down\n", __func__); + error = 0; + } else { + put_device(dev); + break; + } +#else put_device(dev); break; +#endif } if (!list_empty(&dev->power.entry)) list_move(&dev->power.entry, &dpm_suspended_list); diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 184cf54..4d21044 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -964,6 +964,9 @@ int pm_runtime_barrier(struct device *dev) { int retval = 0; +#ifdef CONFIG_MDM_HSIC_PM + wake_up_all(&dev->power.wait_queue); +#endif pm_runtime_get_noresume(dev); spin_lock_irq(&dev->power.lock); |