Merge "Revert "msm: kgsl: Add per context timestamp"" into msm-3.0
msm: kgsl: Do not take spinlock when mapping to IOMMU

The IOMMU driver takes a spinlock internally when mapping, so
do not take an additional spinlock when mapping to IOMMU table.

Change-Id: I772ffb09af95ed15dc2c3495affa9efd48e4af5b
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
usb: gadget: ci13xxx_msm: allow to be loaded/unloaded as module

Add support for the module to be dynamically loaded and unloaded.
This change adds remove function to restore all initialized values.

Change-Id: I0a311bac469aa87fa7892fa2b5f4db07f17abf0f
Signed-off-by: Lena Salman <esalman@codeaurora.org>
usb: gadget: allow android gadget to bind/unbind several times

This is needed if we want to change the underlying udc, or insmod
the dynamically linked udc after android gadget is already up.

Change-Id: I71923764af85f4d50a2ebf7c7476cf0ef23fe819
Signed-off-by: Lena Salman <esalman@codeaurora.org>
msm: dcvs_idle: Provide CPU core idle information to msm_dcvs

The msm_dcvs algorithm takes in core idle information and outputs the
frequency for the core to run at. This driver registers with the
CPU_PM interface to get the idle enter and idle exit notification and
passes this to the msm_dcvs driver for every CPU core.

Change-Id: I2b7ddbae2ac00f7c129d307022f8b1b928e2956e
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Merge "msm: kgsl: Do not take spinlock when mapping to IOMMU" into msm-3.0
Merge changes I71923764,I0a311bac into msm-3.0

* changes:
  usb: gadget: allow android gadget to bind/unbind several times
  usb: gadget: ci13xxx_msm: allow to be loaded/unloaded as module
USB: ci13xxx_msm: add module license

Since commit "193ab2a usb: gadget: allow multiple gadgets to be built"
the udc controllers can be compiled as a module. The ci13xxx_msm driver
is missing the MODULE_LICENSE statement, so loading fails with:

ci13xxx_msm: module license 'unspecified' taints kernel.
ci13xxx_msm: Unknown symbol dev_set_name (err 0)
ci13xxx_msm: Unknown symbol platform_get_irq (err 0)
ci13xxx_msm: Unknown symbol device_unregister (err 0)
ci13xxx_msm: Unknown symbol usb_add_gadget_udc (err 0)
ci13xxx_msm: Unknown symbol put_device (err 0)
ci13xxx_msm: Unknown symbol platform_driver_register (err 0)
ci13xxx_msm: Unknown symbol platform_get_resource (err 0)
ci13xxx_msm: Unknown symbol device_register (err 0)
ci13xxx_msm: Unknown symbol usb_del_gadget_udc (err 0)

This patch adds the missing MODULE_LICENSE statement with GPL v2 according
to the header of the driver.

Tested-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[esalman@codeaurora.org -
	Add missing MODULE_LICENSE to hsic flavor well]
Signed-off-by: Lena Salman <esalman@codeaurora.org>
Change-Id: Iaa5706a5203bca556468fa41f4723ca88b0c71cf
msm: dcvs: Add 'msm-dcvs' cpufreq governor

The 'msm-dcvs' CPUFreq governor interfaces the msm_dcvs driver frequency
change requests with the CPUFreq framework.

Change-Id: I950e5b09f568412760d9b022f59f208c6bcb54ce
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Merge "ASoC: msm: Reset pcm irq position in WRITE_DONE event" into msm-3.0
Merge "msm: dcvs: Add 'msm-dcvs' cpufreq governor" into msm-3.0
msm: 8930: Add fabric devices to enable bus scaling on 8930

Add fabric devices to the kernel by listing them in initialization
data to enable bus scaling on msm8930

Change-Id: I071f4387413f0200f7ffe3b220c70da5815061d5
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: rpm-8930: Update RPM IDs as supported by the RPM driver

The RPM IDs for 8930 are updated to reflect the on bus IDs
supported by the Resource Power Manager(RPM) hardware.

Change-Id: I962676877cc5a388d60185a99b8a58563ecb36c2
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
msm: iommu: use sg_dma_address() in iommu_map_range()

Ion carveout and content protect buffers do not have
a struct page and thus sg_phys() cannot be used on them.
Try sg_dma_address() first and if it returns 0 then
use sg_phys().

Change-Id: I95ccb8f5a3c86cd09ecf2a2737c260f4996059ac
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: set the dma_address field of scatterlists

Ion carveout and content protect heap buffers do not
have a struct page associated with them. Thus
sg_phys() will not work reliably on these buffers.
Set the dma_address field on physically contiguous
buffers.  When mapping a scatterlist to the gpummu
use sg_dma_address() first and if it returns 0
then use sg_phys().

Change-Id: Ie5f19986446be4383dfbfffa2534136b592e8e46
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
gpu: ion: set dma_address for contiguous heaps in ion_map_dma()

Ion carveout and content protect heap buffers do not
have a struct page associated with them. Thus
sg_phys() will not work reliably on these buffers,
so set dma_address on their scatterlists.

CRs-Fixed: 345257
Change-Id: Ifdad5ce497de170f47b4ee2f7a93563a5cbe1a96
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: board-8930: Add video device instance

The instance of video codec device is added to support video
for 8930. The video codec device instance contains information
of mem type used, vidc bus data and the resources

Change-Id: I96c3dd339e00660c770e81a8bfd31d4c5c6cc505
Signed-off-by: Arun Menon <menon@codeaurora.org>
msm: board-8930: Create a dedicated board file for the GPU

Make a dedicated board file for the KGSL GPU device.

Change-Id: Ia9fc45e650adc102e82675d412a52965672b25fa
Signed-off-by: Sudhakara Rao Tentu <srtentu@codeaurora.org>
msm: kgsl: Configure VBIF settings for GPU with dual SMMU

Use default VBIF seetings for single SMMU in case of 8x30 and
configure VBIF settings for dual SMMU in case of 8064.

Change-Id: I0e9522eecc687615f285d905d8bd6ae4341595c9
Signed-off-by: Sudhakara Rao Tentu <srtentu@codeaurora.org>
msm: scm: Add a feat version query API

Some users of SCM need to detect features and also detect if
those features have certain versions available. Most notably the
jtag save restore code needs to detect if the secure environment
supports save and restore of jtag state so that it can skip doing
its own save and restore.

Add this API so that the code can work with either version of the
secure code.

Change-Id: Ice34a894b1eb48cbf741138858e68c91c6bdd98d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>