diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dma-contiguous.h | 19 | ||||
| -rw-r--r-- | include/linux/dma-removed.h | 16 | ||||
| -rw-r--r-- | include/linux/ion.h | 278 | ||||
| -rw-r--r-- | include/linux/mdss_io_util.h | 112 | ||||
| -rw-r--r-- | include/linux/msm_ion.h | 380 | ||||
| -rw-r--r-- | include/linux/msm_kgsl.h | 2 | ||||
| -rw-r--r-- | include/linux/qdsp6v2/apr.h | 2 | ||||
| -rw-r--r-- | include/linux/qpnp/qpnp-adc.h | 7 | ||||
| -rw-r--r-- | include/linux/slimbus/slimbus.h | 7 | ||||
| -rw-r--r-- | include/linux/test-iosched.h | 3 | ||||
| -rw-r--r-- | include/linux/usb/msm_hsusb.h | 4 | ||||
| -rw-r--r-- | include/linux/usb/usbnet.h | 4 |
12 files changed, 166 insertions, 668 deletions
diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h index 9975eef4cad..594d836df37 100644 --- a/include/linux/dma-contiguous.h +++ b/include/linux/dma-contiguous.h @@ -74,7 +74,8 @@ void dma_contiguous_reserve(phys_addr_t addr_limit); int dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t *res_base, phys_addr_t limit, const char *name, - bool in_system); + bool in_system, + bool remove); int dma_contiguous_add_device(struct device *dev, phys_addr_t base); @@ -95,7 +96,8 @@ static inline int dma_declare_contiguous(struct device *dev, phys_addr_t size, phys_addr_t base, phys_addr_t limit) { int ret; - ret = dma_contiguous_reserve_area(size, &base, limit, NULL, true); + ret = dma_contiguous_reserve_area(size, &base, limit, NULL, true, + false); if (ret == 0) ret = dma_contiguous_add_device(dev, base); return ret; @@ -107,15 +109,16 @@ static inline int dma_declare_contiguous_reserved(struct device *dev, phys_addr_t limit) { int ret; - ret = dma_contiguous_reserve_area(size, &base, limit, NULL, false); + ret = dma_contiguous_reserve_area(size, &base, limit, NULL, false, + false); if (ret == 0) ret = dma_contiguous_add_device(dev, base); return ret; } -struct page *dma_alloc_from_contiguous(struct device *dev, int count, +unsigned long dma_alloc_from_contiguous(struct device *dev, int count, unsigned int order); -bool dma_release_from_contiguous(struct device *dev, struct page *pages, +bool dma_release_from_contiguous(struct device *dev, unsigned long pfn, int count); #else @@ -132,14 +135,14 @@ int dma_declare_contiguous(struct device *dev, phys_addr_t size, } static inline -struct page *dma_alloc_from_contiguous(struct device *dev, int count, +unsigned long dma_alloc_from_contiguous(struct device *dev, int count, unsigned int order) { - return NULL; + return 0; } static inline -bool dma_release_from_contiguous(struct device *dev, struct page *pages, +bool dma_release_from_contiguous(struct device *dev, unsigned long pfn, int count) { return false; diff --git a/include/linux/dma-removed.h b/include/linux/dma-removed.h new file mode 100644 index 00000000000..3a0f1a4b45e --- /dev/null +++ b/include/linux/dma-removed.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only 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. + */ + +#include <linux/dma-mapping.h> + +extern struct dma_map_ops removed_dma_ops; diff --git a/include/linux/ion.h b/include/linux/ion.h index 7c55c7d27a8..242fef6ba99 100644 --- a/include/linux/ion.h +++ b/include/linux/ion.h @@ -1,276 +1,6 @@ -/* - * include/linux/ion.h - * - * Copyright (C) 2011 Google, Inc. - * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * 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. - * - */ +#ifndef __LINUX_ION_H__ +#define __LINUX_ION_H__ -#ifndef _LINUX_ION_H -#define _LINUX_ION_H +#include "../../drivers/staging/android/ion/ion.h" -#include <linux/err.h> -#include <uapi/linux/ion.h> - -struct ion_device; -struct ion_heap; -struct ion_mapper; -struct ion_client; -struct ion_buffer; - -/* This should be removed some day when phys_addr_t's are fully - plumbed in the kernel, and all instances of ion_phys_addr_t should - be converted to phys_addr_t. For the time being many kernel interfaces - do not accept phys_addr_t's that would have to */ -#define ion_phys_addr_t dma_addr_t - -/** - * struct ion_platform_heap - defines a heap in the given platform - * @type: type of the heap from ion_heap_type enum - * @id: unique identifier for heap. When allocating higher numbers - * will be allocated from first. At allocation these are passed - * as a bit mask and therefore can not exceed ION_NUM_HEAP_IDS. - * @name: used for debug purposes - * @base: base address of heap in physical memory if applicable - * @size: size of the heap in bytes if applicable - * @has_outer_cache: set to 1 if outer cache is used, 0 otherwise. - * @extra_data: Extra data specific to each heap type - * @priv: heap private data - * @align: required alignment in physical memory if applicable - * @priv: private info passed from the board file - * - * Provided by the board file. - */ -struct ion_platform_heap { - enum ion_heap_type type; - unsigned int id; - const char *name; - ion_phys_addr_t base; - size_t size; - unsigned int has_outer_cache; - void *extra_data; - ion_phys_addr_t align; - void *priv; -}; - -/** - * struct ion_platform_data - array of platform heaps passed from board file - * @has_outer_cache: set to 1 if outer cache is used, 0 otherwise. - * @nr: number of structures in the array - * @heaps: array of platform_heap structions - * - * Provided by the board file in the form of platform data to a platform device. - */ -struct ion_platform_data { - unsigned int has_outer_cache; - int nr; - struct ion_platform_heap *heaps; -}; - -#ifdef CONFIG_ION - -/** - * ion_reserve() - reserve memory for ion heaps if applicable - * @data: platform data specifying starting physical address and - * size - * - * Calls memblock reserve to set aside memory for heaps that are - * located at specific memory addresses or of specfic sizes not - * managed by the kernel - */ -void ion_reserve(struct ion_platform_data *data); - -/** - * ion_client_create() - allocate a client and returns it - * @dev: the global ion device - * @heap_type_mask: mask of heaps this client can allocate from - * @name: used for debugging - */ -struct ion_client *ion_client_create(struct ion_device *dev, - const char *name); - -/** - * ion_client_destroy() - free's a client and all it's handles - * @client: the client - * - * Free the provided client and all it's resources including - * any handles it is holding. - */ -void ion_client_destroy(struct ion_client *client); - -/** - * ion_alloc - allocate ion memory - * @client: the client - * @len: size of the allocation - * @align: requested allocation alignment, lots of hardware blocks - * have alignment requirements of some kind - * @heap_id_mask: mask of heaps to allocate from, if multiple bits are set - * heaps will be tried in order from highest to lowest - * id - * @flags: heap flags, the low 16 bits are consumed by ion, the - * high 16 bits are passed on to the respective heap and - * can be heap custom - * - * Allocate memory in one of the heaps provided in heap mask and return - * an opaque handle to it. - */ -struct ion_handle *ion_alloc(struct ion_client *client, size_t len, - size_t align, unsigned int heap_id_mask, - unsigned int flags); - -/** - * ion_free - free a handle - * @client: the client - * @handle: the handle to free - * - * Free the provided handle. - */ -void ion_free(struct ion_client *client, struct ion_handle *handle); - -/** - * ion_phys - returns the physical address and len of a handle - * @client: the client - * @handle: the handle - * @addr: a pointer to put the address in - * @len: a pointer to put the length in - * - * This function queries the heap for a particular handle to get the - * handle's physical address. It't output is only correct if - * a heap returns physically contiguous memory -- in other cases - * this api should not be implemented -- ion_sg_table should be used - * instead. Returns -EINVAL if the handle is invalid. This has - * no implications on the reference counting of the handle -- - * the returned value may not be valid if the caller is not - * holding a reference. - */ -int ion_phys(struct ion_client *client, struct ion_handle *handle, - ion_phys_addr_t *addr, size_t *len); - -/** - * ion_map_dma - return an sg_table describing a handle - * @client: the client - * @handle: the handle - * - * This function returns the sg_table describing - * a particular ion handle. - */ -struct sg_table *ion_sg_table(struct ion_client *client, - struct ion_handle *handle); - -/** - * ion_map_kernel - create mapping for the given handle - * @client: the client - * @handle: handle to map - * - * Map the given handle into the kernel and return a kernel address that - * can be used to access this address. - */ -void *ion_map_kernel(struct ion_client *client, struct ion_handle *handle); - -/** - * ion_unmap_kernel() - destroy a kernel mapping for a handle - * @client: the client - * @handle: handle to unmap - */ -void ion_unmap_kernel(struct ion_client *client, struct ion_handle *handle); - -/** - * ion_share_dma_buf() - share buffer as dma-buf - * @client: the client - * @handle: the handle - */ -struct dma_buf *ion_share_dma_buf(struct ion_client *client, - struct ion_handle *handle); - -/** - * ion_share_dma_buf_fd() - given an ion client, create a dma-buf fd - * @client: the client - * @handle: the handle - */ -int ion_share_dma_buf_fd(struct ion_client *client, struct ion_handle *handle); - -/** - * ion_import_dma_buf() - given an dma-buf fd from the ion exporter get handle - * @client: the client - * @fd: the dma-buf fd - * - * Given an dma-buf fd that was allocated through ion via ion_share_dma_buf, - * import that fd and return a handle representing it. If a dma-buf from - * another exporter is passed in this function will return ERR_PTR(-EINVAL) - */ -struct ion_handle *ion_import_dma_buf(struct ion_client *client, int fd); - -#else -static inline void ion_reserve(struct ion_platform_data *data) -{ - -} - -static inline struct ion_client *ion_client_create(struct ion_device *dev, - unsigned int heap_mask, const char *name) -{ - return ERR_PTR(-ENODEV); -} - -static inline void ion_client_destroy(struct ion_client *client) { } - -static inline struct ion_handle *ion_alloc(struct ion_client *client, - size_t len, size_t align, - unsigned int heap_mask, - unsigned int flags) -{ - return ERR_PTR(-ENODEV); -} - -static inline void ion_free(struct ion_client *client, - struct ion_handle *handle) { } - - -static inline int ion_phys(struct ion_client *client, - struct ion_handle *handle, ion_phys_addr_t *addr, size_t *len) -{ - return -ENODEV; -} - -static inline struct sg_table *ion_sg_table(struct ion_client *client, - struct ion_handle *handle) -{ - return ERR_PTR(-ENODEV); -} - -static inline void *ion_map_kernel(struct ion_client *client, - struct ion_handle *handle) -{ - return ERR_PTR(-ENODEV); -} - -static inline void ion_unmap_kernel(struct ion_client *client, - struct ion_handle *handle) { } - -static inline int ion_share_dma_buf(struct ion_client *client, struct ion_handle *handle) -{ - return -ENODEV; -} - -static inline struct ion_handle *ion_import_dma_buf(struct ion_client *client, int fd) -{ - return ERR_PTR(-ENODEV); -} - -static inline int ion_handle_get_flags(struct ion_client *client, - struct ion_handle *handle, unsigned long *flags) -{ - return -ENODEV; -} - -#endif /* CONFIG_ION */ -#endif /* _LINUX_ION_H */ +#endif /* __LINUX_ION_H__ */ diff --git a/include/linux/mdss_io_util.h b/include/linux/mdss_io_util.h new file mode 100644 index 00000000000..6ad21e88787 --- /dev/null +++ b/include/linux/mdss_io_util.h @@ -0,0 +1,112 @@ +/* Copyright (c) 2012, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only 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. + */ + +#ifndef __MDSS_IO_UTIL_H__ +#define __MDSS_IO_UTIL_H__ + +#include <linux/gpio.h> +#include <linux/platform_device.h> +#include <linux/regulator/consumer.h> +#include <linux/i2c.h> +#include <linux/types.h> + +#ifdef DEBUG +#define DEV_DBG(fmt, args...) pr_err(fmt, ##args) +#else +#define DEV_DBG(fmt, args...) pr_debug(fmt, ##args) +#endif +#define DEV_INFO(fmt, args...) pr_info(fmt, ##args) +#define DEV_WARN(fmt, args...) pr_warn(fmt, ##args) +#define DEV_ERR(fmt, args...) pr_err(fmt, ##args) + +struct dss_io_data { + u32 len; + void __iomem *base; +}; + +void dss_reg_w(struct dss_io_data *io, u32 offset, u32 value, u32 debug); +u32 dss_reg_r(struct dss_io_data *io, u32 offset, u32 debug); +void dss_reg_dump(void __iomem *base, u32 len, const char *prefix, u32 debug); + +#define DSS_REG_W_ND(io, offset, val) dss_reg_w(io, offset, val, false) +#define DSS_REG_W(io, offset, val) dss_reg_w(io, offset, val, true) +#define DSS_REG_R_ND(io, offset) dss_reg_r(io, offset, false) +#define DSS_REG_R(io, offset) dss_reg_r(io, offset, true) + +enum dss_vreg_type { + DSS_REG_LDO, + DSS_REG_VS, +}; + +struct dss_vreg { + struct regulator *vreg; /* vreg handle */ + char vreg_name[32]; + int min_voltage; + int max_voltage; + int enable_load; + int disable_load; + int pre_on_sleep; + int post_on_sleep; + int pre_off_sleep; + int post_off_sleep; +}; + +struct dss_gpio { + unsigned gpio; + unsigned value; + char gpio_name[32]; +}; + +enum dss_clk_type { + DSS_CLK_AHB, /* no set rate. rate controlled through rpm */ + DSS_CLK_PCLK, + DSS_CLK_OTHER, +}; + +struct dss_clk { + struct clk *clk; /* clk handle */ + char clk_name[32]; + enum dss_clk_type type; + unsigned long rate; +}; + +struct dss_module_power { + unsigned num_vreg; + struct dss_vreg *vreg_config; + unsigned num_gpio; + struct dss_gpio *gpio_config; + unsigned num_clk; + struct dss_clk *clk_config; +}; + +int msm_dss_ioremap_byname(struct platform_device *pdev, + struct dss_io_data *io_data, const char *name); +void msm_dss_iounmap(struct dss_io_data *io_data); + +int msm_dss_enable_gpio(struct dss_gpio *in_gpio, int num_gpio, int enable); +int msm_dss_gpio_enable(struct dss_gpio *in_gpio, int num_gpio, int enable); + +int msm_dss_config_vreg(struct device *dev, struct dss_vreg *in_vreg, + int num_vreg, int config); +int msm_dss_enable_vreg(struct dss_vreg *in_vreg, int num_vreg, int enable); + +int msm_dss_get_clk(struct device *dev, struct dss_clk *clk_arry, int num_clk); +void msm_dss_put_clk(struct dss_clk *clk_arry, int num_clk); +int msm_dss_clk_set_rate(struct dss_clk *clk_arry, int num_clk); +int msm_dss_enable_clk(struct dss_clk *clk_arry, int num_clk, int enable); + +int mdss_i2c_byte_read(struct i2c_client *client, uint8_t slave_addr, + uint8_t reg_offset, uint8_t *read_buf); +int mdss_i2c_byte_write(struct i2c_client *client, uint8_t slave_addr, + uint8_t reg_offset, uint8_t *value); + +#endif /* __MDSS_IO_UTIL_H__ */ diff --git a/include/linux/msm_ion.h b/include/linux/msm_ion.h index c84f67caa3d..04afdf58742 100644 --- a/include/linux/msm_ion.h +++ b/include/linux/msm_ion.h @@ -1,378 +1,6 @@ -#ifndef _LINUX_MSM_ION_H -#define _LINUX_MSM_ION_H +#ifndef __LINUX_MSM_ION_H__ +#define __LINUX_MSM_ION_H__ -#include <uapi/linux/msm_ion.h> +#include "../../drivers/staging/android/ion/msm/msm_ion.h" -enum ion_permission_type { - IPT_TYPE_MM_CARVEOUT = 0, - IPT_TYPE_MFC_SHAREDMEM = 1, - IPT_TYPE_MDP_WRITEBACK = 2, -}; - -/* - * This flag allows clients when mapping into the IOMMU to specify to - * defer un-mapping from the IOMMU until the buffer memory is freed. - */ -#define ION_IOMMU_UNMAP_DELAYED 1 - -/* - * This flag allows clients to defer unsecuring a buffer until the buffer - * is actually freed. - */ -#define ION_UNSECURE_DELAYED 1 - -/** - * struct ion_cp_heap_pdata - defines a content protection heap in the given - * platform - * @permission_type: Memory ID used to identify the memory to TZ - * @align: Alignment requirement for the memory - * @secure_base: Base address for securing the heap. - * Note: This might be different from actual base address - * of this heap in the case of a shared heap. - * @secure_size: Memory size for securing the heap. - * Note: This might be different from actual size - * of this heap in the case of a shared heap. - * @fixed_position If nonzero, position in the fixed area. - * @iommu_map_all: Indicates whether we should map whole heap into IOMMU. - * @iommu_2x_map_domain: Indicates the domain to use for overmapping. - * @request_region: function to be called when the number of allocations - * goes from 0 -> 1 - * @release_region: function to be called when the number of allocations - * goes from 1 -> 0 - * @setup_region: function to be called upon ion registration - * @allow_nonsecure_alloc: allow non-secure allocations from this heap. For - * secure heaps, this flag must be set so allow non-secure - * allocations. For non-secure heaps, this flag is ignored. - * - */ -struct ion_cp_heap_pdata { - enum ion_permission_type permission_type; - unsigned int align; - ion_phys_addr_t secure_base; /* Base addr used when heap is shared */ - size_t secure_size; /* Size used for securing heap when heap is shared*/ - int is_cma; - enum ion_fixed_position fixed_position; - int iommu_map_all; - int iommu_2x_map_domain; - int (*request_region)(void *); - int (*release_region)(void *); - void *(*setup_region)(void); - int allow_nonsecure_alloc; -}; - -/** - * struct ion_co_heap_pdata - defines a carveout heap in the given platform - * @adjacent_mem_id: Id of heap that this heap must be adjacent to. - * @align: Alignment requirement for the memory - * @fixed_position If nonzero, position in the fixed area. - * @request_region: function to be called when the number of allocations - * goes from 0 -> 1 - * @release_region: function to be called when the number of allocations - * goes from 1 -> 0 - * @setup_region: function to be called upon ion registration - * @memory_type:Memory type used for the heap - * - */ -struct ion_co_heap_pdata { - int adjacent_mem_id; - unsigned int align; - enum ion_fixed_position fixed_position; - int (*request_region)(void *); - int (*release_region)(void *); - void *(*setup_region)(void); -}; - -/** - * struct ion_cma_pdata - extra data for CMA regions - * @default_prefetch_size - default size to use for prefetching - */ -struct ion_cma_pdata { - unsigned long default_prefetch_size; -}; - -#ifdef CONFIG_ION -/** - * msm_ion_client_create - allocate a client using the ion_device specified in - * drivers/gpu/ion/msm/msm_ion.c - * - * heap_mask and name are the same as ion_client_create, return values - * are the same as ion_client_create. - */ - -struct ion_client *msm_ion_client_create(unsigned int heap_mask, - const char *name); - -/** - * ion_handle_get_flags - get the flags for a given handle - * - * @client - client who allocated the handle - * @handle - handle to get the flags - * @flags - pointer to store the flags - * - * Gets the current flags for a handle. These flags indicate various options - * of the buffer (caching, security, etc.) - */ -int ion_handle_get_flags(struct ion_client *client, struct ion_handle *handle, - unsigned long *flags); - - -/** - * ion_map_iommu - map the given handle into an iommu - * - * @client - client who allocated the handle - * @handle - handle to map - * @domain_num - domain number to map to - * @partition_num - partition number to allocate iova from - * @align - alignment for the iova - * @iova_length - length of iova to map. If the iova length is - * greater than the handle length, the remaining - * address space will be mapped to a dummy buffer. - * @iova - pointer to store the iova address - * @buffer_size - pointer to store the size of the buffer - * @flags - flags for options to map - * @iommu_flags - flags specific to the iommu. - * - * Maps the handle into the iova space specified via domain number. Iova - * will be allocated from the partition specified via partition_num. - * Returns 0 on success, negative value on error. - */ -int ion_map_iommu(struct ion_client *client, struct ion_handle *handle, - int domain_num, int partition_num, unsigned long align, - unsigned long iova_length, ion_phys_addr_t *iova, - unsigned long *buffer_size, - unsigned long flags, unsigned long iommu_flags); - - -/** - * ion_handle_get_size - get the allocated size of a given handle - * - * @client - client who allocated the handle - * @handle - handle to get the size - * @size - pointer to store the size - * - * gives the allocated size of a handle. returns 0 on success, negative - * value on error - * - * NOTE: This is intended to be used only to get a size to pass to map_iommu. - * You should *NOT* rely on this for any other usage. - */ - -int ion_handle_get_size(struct ion_client *client, struct ion_handle *handle, - unsigned long *size); - -/** - * ion_unmap_iommu - unmap the handle from an iommu - * - * @client - client who allocated the handle - * @handle - handle to unmap - * @domain_num - domain to unmap from - * @partition_num - partition to unmap from - * - * Decrement the reference count on the iommu mapping. If the count is - * 0, the mapping will be removed from the iommu. - */ -void ion_unmap_iommu(struct ion_client *client, struct ion_handle *handle, - int domain_num, int partition_num); - - -/** - * ion_secure_heap - secure a heap - * - * @client - a client that has allocated from the heap heap_id - * @heap_id - heap id to secure. - * @version - version of content protection - * @data - extra data needed for protection - * - * Secure a heap - * Returns 0 on success - */ -int ion_secure_heap(struct ion_device *dev, int heap_id, int version, - void *data); - -/** - * ion_unsecure_heap - un-secure a heap - * - * @client - a client that has allocated from the heap heap_id - * @heap_id - heap id to un-secure. - * @version - version of content protection - * @data - extra data needed for protection - * - * Un-secure a heap - * Returns 0 on success - */ -int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, - void *data); - -/** - * msm_ion_do_cache_op - do cache operations. - * - * @client - pointer to ION client. - * @handle - pointer to buffer handle. - * @vaddr - virtual address to operate on. - * @len - Length of data to do cache operation on. - * @cmd - Cache operation to perform: - * ION_IOC_CLEAN_CACHES - * ION_IOC_INV_CACHES - * ION_IOC_CLEAN_INV_CACHES - * - * Returns 0 on success - */ -int msm_ion_do_cache_op(struct ion_client *client, struct ion_handle *handle, - void *vaddr, unsigned long len, unsigned int cmd); - -/** - * msm_ion_secure_heap - secure a heap. Wrapper around ion_secure_heap. - * - * @heap_id - heap id to secure. - * - * Secure a heap - * Returns 0 on success - */ -int msm_ion_secure_heap(int heap_id); - -/** - * msm_ion_unsecure_heap - unsecure a heap. Wrapper around ion_unsecure_heap. - * - * @heap_id - heap id to secure. - * - * Un-secure a heap - * Returns 0 on success - */ -int msm_ion_unsecure_heap(int heap_id); - -/** - * msm_ion_secure_heap_2_0 - secure a heap using 2.0 APIs - * Wrapper around ion_secure_heap. - * - * @heap_id - heap id to secure. - * @usage - usage hint to TZ - * - * Secure a heap - * Returns 0 on success - */ -int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage); - -/** - * msm_ion_unsecure_heap - unsecure a heap secured with 3.0 APIs. - * Wrapper around ion_unsecure_heap. - * - * @heap_id - heap id to secure. - * @usage - usage hint to TZ - * - * Un-secure a heap - * Returns 0 on success - */ -int msm_ion_unsecure_heap_2_0(int heap_id, enum cp_mem_usage usage); - -/** - * msm_ion_secure_buffer - secure an individual buffer - * - * @client - client who has access to the buffer - * @handle - buffer to secure - * @usage - usage hint to TZ - * @flags - flags for the securing - */ -int msm_ion_secure_buffer(struct ion_client *client, struct ion_handle *handle, - enum cp_mem_usage usage, int flags); - -/** - * msm_ion_unsecure_buffer - unsecure an individual buffer - * - * @client - client who has access to the buffer - * @handle - buffer to secure - */ -int msm_ion_unsecure_buffer(struct ion_client *client, - struct ion_handle *handle); -#else -static inline struct ion_client *msm_ion_client_create(unsigned int heap_mask, - const char *name) -{ - return ERR_PTR(-ENODEV); -} - -static inline int ion_map_iommu(struct ion_client *client, - struct ion_handle *handle, int domain_num, - int partition_num, unsigned long align, - unsigned long iova_length, ion_phys_addr_t *iova, - unsigned long *buffer_size, - unsigned long flags, - unsigned long iommu_flags) -{ - return -ENODEV; -} - -static inline int ion_handle_get_size(struct ion_client *client, - struct ion_handle *handle, unsigned long *size) -{ - return -ENODEV; -} - -static inline void ion_unmap_iommu(struct ion_client *client, - struct ion_handle *handle, int domain_num, - int partition_num) -{ - return; -} - -static inline int ion_secure_heap(struct ion_device *dev, int heap_id, - int version, void *data) -{ - return -ENODEV; - -} - -static inline int ion_unsecure_heap(struct ion_device *dev, int heap_id, - int version, void *data) -{ - return -ENODEV; -} - -static inline void ion_mark_dangling_buffers_locked(struct ion_device *dev) -{ -} - -static inline int msm_ion_do_cache_op(struct ion_client *client, - struct ion_handle *handle, void *vaddr, - unsigned long len, unsigned int cmd) -{ - return -ENODEV; -} - -static inline int msm_ion_secure_heap(int heap_id) -{ - return -ENODEV; - -} - -static inline int msm_ion_unsecure_heap(int heap_id) -{ - return -ENODEV; -} - -static inline int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage) -{ - return -ENODEV; -} - -static inline int msm_ion_unsecure_heap_2_0(int heap_id, - enum cp_mem_usage usage) -{ - return -ENODEV; -} - -static inline int msm_ion_secure_buffer(struct ion_client *client, - struct ion_handle *handle, - enum cp_mem_usage usage, - int flags) -{ - return -ENODEV; -} - -static inline int msm_ion_unsecure_buffer(struct ion_client *client, - struct ion_handle *handle) -{ - return -ENODEV; -} -#endif /* CONFIG_ION */ - -#endif +#endif /* __LINUX_MSM_ION_H__ */ diff --git a/include/linux/msm_kgsl.h b/include/linux/msm_kgsl.h index 0203b64b024..8ee8ac14acc 100644 --- a/include/linux/msm_kgsl.h +++ b/include/linux/msm_kgsl.h @@ -79,6 +79,7 @@ struct kgsl_pwrlevel { * @csdev: Pointer to the coresight device for this device * @coresight_pdata: Coresight configuration for specific device * @chipid: Chip ID for the device's GPU + * @pm_qos_latency: latency value for cpu */ struct kgsl_device_platform_data { struct kgsl_pwrlevel pwrlevel[KGSL_MAX_PWRLEVELS]; @@ -95,6 +96,7 @@ struct kgsl_device_platform_data { struct coresight_device *csdev; struct coresight_platform_data *coresight_pdata; unsigned int chipid; + unsigned int pm_qos_latency; }; #ifdef CONFIG_MSM_KGSL_DRM diff --git a/include/linux/qdsp6v2/apr.h b/include/linux/qdsp6v2/apr.h index 7f7707f0490..e16cc338b58 100644 --- a/include/linux/qdsp6v2/apr.h +++ b/include/linux/qdsp6v2/apr.h @@ -14,7 +14,7 @@ #define __APR_H_ #include <linux/mutex.h> -#include <mach/subsystem_notif.h> +#include <soc/qcom/subsystem_notif.h> enum apr_subsys_state { APR_SUBSYS_DOWN, diff --git a/include/linux/qpnp/qpnp-adc.h b/include/linux/qpnp/qpnp-adc.h index 2a24ca7f9c7..8bcec8b0a49 100644 --- a/include/linux/qpnp/qpnp-adc.h +++ b/include/linux/qpnp/qpnp-adc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -191,6 +191,7 @@ enum qpnp_adc_calib_type { * %CHAN_PATH_SCALING2: ratio of {1, 4} * %CHAN_PATH_SCALING3: ratio of {1, 6} * %CHAN_PATH_SCALING4: ratio of {1, 20} + * %CHAN_PATH_SCALING5: ratio of {1, 8} * %CHAN_PATH_NONE: Do not use this pre-scaling ratio type. * * The pre-scaling is applied for signals to be within the voltage range @@ -202,6 +203,7 @@ enum qpnp_adc_channel_scaling_param { PATH_SCALING2, PATH_SCALING3, PATH_SCALING4, + PATH_SCALING5, PATH_SCALING_NONE, }; @@ -900,7 +902,8 @@ static const struct qpnp_vadc_scaling_ratio qpnp_vadc_amux_scaling_ratio[] = { {1, 3}, {1, 4}, {1, 6}, - {1, 20} + {1, 20}, + {1, 8} }; /** diff --git a/include/linux/slimbus/slimbus.h b/include/linux/slimbus/slimbus.h index 67f4d8c967e..56a3a5fdb02 100644 --- a/include/linux/slimbus/slimbus.h +++ b/include/linux/slimbus/slimbus.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -634,6 +634,10 @@ struct slim_pending_ch { * @driver: Device's driver. Pointer to access routines. * @ctrl: Slimbus controller managing the bus hosting this device. * @laddr: 1-byte Logical address of this device. + * @reported: Flag to indicate whether this device reported present. The flag + * is set when device reports present, and is reset when it reports + * absent. This flag alongwith notified flag below is used to call + * device_up, or device_down callbacks for driver of this device. * @mark_define: List of channels pending definition/activation. * @mark_suspend: List of channels pending suspend. * @mark_removal: List of channels pending removal. @@ -657,6 +661,7 @@ struct slim_device { struct slim_driver *driver; struct slim_controller *ctrl; u8 laddr; + bool reported; struct list_head mark_define; struct list_head mark_suspend; struct list_head mark_removal; diff --git a/include/linux/test-iosched.h b/include/linux/test-iosched.h index 3551b7efd31..0bfed06cc09 100644 --- a/include/linux/test-iosched.h +++ b/include/linux/test-iosched.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -28,6 +28,7 @@ #define TEST_PATTERN_FF 0xFFFFFFFF #define TEST_NO_PATTERN 0xDEADBEEF #define BIO_U32_SIZE 1024 +#define TEST_BIO_SIZE PAGE_SIZE /* use one page bios */ struct test_data; diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h index 894f157f418..66d6a9e1314 100644 --- a/include/linux/usb/msm_hsusb.h +++ b/include/linux/usb/msm_hsusb.h @@ -2,7 +2,7 @@ * * Copyright (C) 2008 Google, Inc. * Author: Brian Swetland <swetland@google.com> - * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -359,6 +359,7 @@ struct msm_otg_platform_data { * @chg_check_timer: The timer used to implement the workaround to detect * very slow plug in of wall charger. * @ui_enabled: USB Intterupt is enabled or disabled. + * @pm_done: Indicates whether USB is PM resumed */ struct msm_otg { struct usb_phy phy; @@ -478,6 +479,7 @@ struct msm_otg { bool ext_chg_active; struct completion ext_chg_wait; int ui_enabled; + bool pm_done; }; struct ci13xxx_platform_data { diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index b2bf1229fe3..08db46e4f1e 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -138,9 +138,6 @@ struct driver_info { /* link reset handling, called from defer_kevent */ int (*link_reset)(struct usbnet *); - /*in case if usbnet wrapper wants to override rx_complete()*/ - void (*rx_complete) (struct urb *); - /* fixup rx packet (strip framing) */ int (*rx_fixup)(struct usbnet *dev, struct sk_buff *skb); @@ -250,7 +247,6 @@ extern void usbnet_set_msglevel(struct net_device *, u32); extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); extern int usbnet_nway_reset(struct net_device *net); extern void usbnet_terminate_urbs(struct usbnet *dev); -extern void rx_complete(struct urb *urb); extern int usbnet_manage_power(struct usbnet *, int); extern void usbnet_link_change(struct usbnet *, bool, bool); |
