ION has to guarantee that two of the heaps are
adjacent to each other. This is due to a limitation
in the hardware. Add code to ensure these heaps
are adjacent.
Change-Id: Icc18437a50e1d872112468d02b61ab47fd70acc9
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
When registering irq chip drivers, one common requirement is to
specify the irq_domain irq_base and nr_irq. These fields represent
the system wide logical interrupt range the domain occupies.
For systems with only one interrupt controller, it's trivial to
know these values. But for systems with several irq chip drivers,
it becomes painful to keep track of interrupt ranges in platform
defines. These create needless compile time dependencies, of
which the Device Tree aims to solve.
irq_alloc_desc() can search for a free irq, but is very
inefficient for determining the availability of large ranges.
Additionally, some irq chip drivers allocate irq descriptors
lazily. For example, portions of the Device Tree may not be parsed
until a particular bus is probed. But of_irq_init() is intended to
be run at init time, and this is a natural time to allocate irq
domains. Thus by the time we allocate our irq descriptors, we already
need to know a range of acceptable irqs to use for the domain.
To solve these problems, let's introduce
irq_domain_find_free_range(), which will return to the caller the
first available irq domain range not used already by the system.
This range can then be specified with irq_domain_add().
Change-Id: I8b0f5d25b173c76b8fc5d4f46b3fe9c6bf5c3c8f
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
It should not be valid to add an irq_domain with a logical irq
range that overlaps with another already registered to the
system. Return an error on such an occurrence.
This change also inherently sorts the irq_domains by logical
irq_base as they are added.
Change-Id: Idef697dbe4584d783703d053fbf09f1b17e62ab0
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
The current irq_domain_add() design assumes the underlying
irq_descs are valid when irq_domain_add() is called. It also
assumes that every hwirq enlisted in the irq_domain is valid.
Often, these assumptions are not correct.
Typically, irq_domain_add() is called at board_init time, but
sometimes interrupt chip drivers are not initialized until an
underlying bus is probed. When using SPARSE_IRQ, it's quite
natural to hold off allocating irq_descs until the board
topology specifies them as included.
And in such device topologies, there's no guarantee that chip
interrupt numbers will be contiguous. For example, each hwirq may
map to a particular device, but that device may or may not be
present in the actual hardware configuration. In order to support
this, we need the concept of an irq_domain that supports holes
in it.
In order to solve these problems, let's break the irq_domain
creation from the irq registration process. The irq_domain
creation can occur at init time and then have no dependencies. An
interrupt is not 'registered' with the domain until its resources
have already been allocated by the chip driver. For simple cases,
an additional API is provided to register the entire
logical irq_domain range to provide feature parity with what
already exists.
Change-Id: Ie3340d07ba8663196dc87d1185e3bb7fbed4be4d
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Refactor platform data to allow for better
expansion in the future. Add void * for
elements unique to each heap type.
Change-Id: I435679819c67ce917b5798009eff7e71047fd2ea
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
It's for migrating to generic clk framework API.
The helper functions help cases clk_enable/clk_disable is used
in non-atomic context.
For example, Call clk_enable in probe and clk_disable in remove.
Change-Id: If4023d1856ecc07f332f072c1b4831ad3cba82de
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Secure buffers provides a way to allow premium encrypted
multimedia content to be decrypted in a secured
memory area that does not allow for interception of the
decrypted content.
Add support for heap type that allow heap to be
used for content protection. Introduce new content
protection heap type and id's.
Change-Id: Idd56aa8805b5b74d1b9ab3fe8964aacc218668c1
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Allow client to send information to replace a specific field of
the cmd buffer with the physical address. This is done via a new
IOCTL, TZCOM_IOCTL_SEND_CMD_FD_REQ, which is used to import the
ion fd handle. This IOCTL takes in a new send_cmd_fd_op_req
structure that has the same format as send-cmd_op_req with a
new field added: an array of ion handles (ifd_data.fd) and
cmd_buf_offset.
The client sends in an array of ion fd handle along with the
offset to the command buffer field.
This new IOCTL allows a client to send information regarding
which field(s) (at cmd_buf_offset) in the cmd_buf to replace.
These field(s) are replaced with the physical addr of the
buffer addressed by the respective ifd_data.fd handle.
Change-Id: If210013d46e24776fe6f5c6aa257505b3b1e6e00
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Allow the pm8921-charger driver to initiate charging on a
registered 3rd party charging driver through the power supply class.
Also enable the maintenance of charging properties such as online
and charge type using the power supply class rather than
directly depending on the 3rd party driver.
When a external charger is registered using power_supply_register
the external_power_changed callback of the charger driver checks
for an external charger named "dc". This removes the dependency
of a 3rd party charger to call directly into the charger driver.
Also, update the isl9519q driver to reflect the changes and
utilize power supply class calls to enable charging
on the isl chip from PM8921 charger driver.
This serves as an example for other 3rd party external
chargers supporting PMIC with high current charging.
Finally, add pr_fmt macro which automatically adds function name
to print statements and remove __func__ from individual print
statements.
Change-Id: If05e598be260d924ec3263bad33317cf4e7543a1
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Rename power_supply_set_charging_by to power_supply_set_online to
more accurately reflect the intent of the API.
Add power_supply_set_charge_type to enable a charger driver to set
a POWER_SUPPLY_PROP_CHARGE_TYPE. Ultimately this is handled like
a request, the receiving charger driver then can handle the request
and report the adequate POWER_SUPPLY_PROP_CHARGE_TYPE once necessary
action has been taken.
Change-Id: Idf4760c7d6c0f61a9eccc656cd469a6ac5fdc6cd
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
The msm_idle_stats_update_event() function is now a public function.
In case of IDLE_TIMER expiry, kgsl calls this function to immediately
wake up waiting processes.
Change-Id: Ia259d10e08deea71db047d8091cc97066fba3c1c
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Removes register/unregister calls and replaces them
with start/stop. No need to pre-register the buffers
anymore.
Change-Id: I2f12c3a5791252ad09032cc628d93fb1dc50fee0
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
* changes:
Revert "cpu-hotplug: Add the function 'cpu_hotplug_inprogress'"
Revert "printk: Don't allow cpu to get console lock during hotplugging"
Revert "partition_sched_domains: Do not destroy old sched domain on cpu_up"
Add control definitions and documentation for controls
specific to codec devices.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Change-Id: I94e1be196120988cfee2420ba6bd342eece1f481
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name. Clock names
are updated to match the new naming convention.
CRs-Fixed: 327559
Change-Id: I78757806589e037a0655a63e7ee20c935214c99d
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
* changes:
power: pm8921-charger: Add pm8921_set_usb_power_supply_type
power: pm8921-charger: warn if the battery is hot
power: pm8921-charger: end of charge fixes
Add MSMFB_MDP_PP IOCTL and required data structures for new post processing
features
Change-Id: I459a18bbb739f79833901159a19c2c8705147b57
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
HouseKeeping ADC (HKADC) on the PMIC is used by clients
to measure voltage, current and temperature. Clients
include the Battery, Charger and Thermal clients that
require reading the ADC in real time. This also
supports reading the ADC channels that are mapped through
the PMIC MPP's such as the PA THERM channel.
Change-Id: I3c4fd9d368550c1cca168ea097e0d457d01d695e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
ION based allocation is added for the writeback support
for content security.
Change-Id: Iaa7ec07a7cbc05c818af6f26a2c42c8c36b9bcb5
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
This reverts commit 3d321a3570.
Since sched domains are allocated dynamically now these
changes are N/A for 3.0. Hence the revert.
Change-Id: I0059a4384c871815c01455d4b6f5c8be582a5d73
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
USB can distinguish between types of USB connections such as a
DC charger or PC connection.
Let the USB drivers set the specifc power_supply_type via this
function.
CRs-Fixed: 326548
Change-Id: I31954b3f8d2b1e5fd72712e1f94f67fdbc2e205d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Crash was observed (9x15) when USB cable was
disconnected. Root cause was NULL pointer and
USB BAM reset due to USB PHY reset. On 9x15 no
reset on disconnect will be performed.
CRs-Fixed: 326999
Change-Id: I006afb8dcd225caf9280dd915f8af3edfaebff5a
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
During SSR Riva should not be 'powered on' until all the host
drivers finish their shutdown routines. Add APIs to support
this synchronization mechanism.
Change-Id: Id211cf2deb7accd0e4bdfe8cd328e6807eac875e
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Add a function mmc_detect_card_removed() which upper layers can use to
determine immediately if a card has been removed. This function should
be called after an I/O request fails so that all queued I/O requests
can be errored out immediately instead of waiting for the card device
to be removed.
Change-Id: Iad4806319b6ad67048674adfdd919458186521d6
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
[sthumma@codeaurora.org: Fixed merge conflicts]
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Delete the pm8018-regulator driver now that it has been replaced
by the pm8xxx-regulator driver.
Change-Id: I18b4944dcea6ef6900f740b61621548bd1ac9d49
Signed-off-by: David Collins <collinsd@codeaurora.org>
Delete the pm8921-regulator driver now that it has been replaced
by the pm8xxx-regulator driver.
Change-Id: I36ab68ae7b37988356397d4ac5039aa78a1a2955
Signed-off-by: David Collins <collinsd@codeaurora.org>
Change the pm8018-core driver so that it registers devices for
the pm8xxx-regulator driver instead of for the pm8018-regulator
driver.
This necessitates changing board file platform data for existing
PMIC 8018 regulators so that additional pm8xxx-regulator data is
properly specified.
Change-Id: I3f64f756a6c48c0dd1684f8d8e98a6fa8dddd6ca
Signed-off-by: David Collins <collinsd@codeaurora.org>
change sequence of kernel NL attributes which align hostap NL
attributes sequence so it will copy probe response IE's properly
and pass it to the driver.
Change-Id: I6c3b46b99f2537c4ea0335135f21416c81797af4
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
* changes:
ARM: gic: use module.h instead of export.h
ARM: gic: fix irq_alloc_descs handling for sparse irq
ARM: gic: add OF based initialization
ARM: gic: add irq_domain support
module.h: split out the EXPORT_SYMBOL into export.h
irq: support domains with non-zero hwirq base
Rotator is capable of performing 1/2, 1/4 and 1/8 down scaling. Add
downscale_ratio parameter to provide support for this feature.
CRs-Fixed: 315874
Change-Id: I57dc3456ccc9bec2a125750b3e9909ffcbaf45f6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Some board configurations have different needs for usb overvoltage
thresholds and debounce time for usb detection.
Provide apis to program threshold voltage, debounce time and
disable/enable overvoltage protection.
CRs-Fixed: 324137
Change-Id: Ie618ca12be819739a623cf41e5e1198305467aa5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>