Merge Upstream's stable 3.0.21 branch into msm-3.0
This consists 814 commits and some merge conflicts.
The merge conflicts are because of some local changes to
msm-3.0 as well as some conflicts between google's tree and
the upstream tree.
Conflicts:
arch/arm/kernel/head.S
drivers/bluetooth/ath3k.c
drivers/bluetooth/btusb.c
drivers/mmc/core/core.c
drivers/tty/serial/serial_core.c
drivers/usb/host/ehci-hub.c
drivers/usb/serial/qcserial.c
fs/namespace.c
fs/proc/base.c
Change-Id: I62e2edbe213f84915e27f8cd6e4f6ce23db22a21
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
This fix is intended when using QSEOS_VERSION_13.
Targets that have not moved to latest QSEE, will run into
a failure when the qseecom daemon is run. qseecom daemon
opens the qseecom device and registers the listeners.
In the old QSEE version 13, the app itself responds to these
request for registering the listeners. So the app needs to have
loaded prior to issuing the register listeners request.
Change-Id: Ic1756aac2b8d8cc22b9b630053e77ba7f7a49c91
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
The secure processor does not have the capability to vote
for the DFAB clock. The vote for DFAB clock in HLOS ensures
that the secure processor does not freeze.
CRs-fixed: 335852
Change-Id: I8c003299c30efce2e391b8da168f691e850ce763
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
Currently, the qseecom driver uses the dfab clock definition
of scm driver. The new definition fixes this problem.
The driver should for NULL before setting the clock rate.
Change-Id: Iad653ee855b834a475b43502d36e4673c4bd03a3
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
When a request to register a previously registered
listener is received return status indicating it was
already registered.
Change-Id: I2507396bf7bd114254e31547b54096cb0fad7aad
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
This driver is based of the TZCOM (planned to be deprecated soon).
It shares the same design as TZCOM with some re-organization and
new features added. QSEEcom (Qualcomm Secure Execution environment
Communicator) is named accordingly to be consistent with the
nomenclature used in the secure domain. The following additional
features (on top of current TZCOM) driver are implemented:
(1) Add support for multi-image loading.
The image that was loaded in TZCOM was hard-coded to "tzapps".
During a open() tzapps was loaded using pil driver call pil_get().
This severly limted the number of images that could be loaded to
one single application: named "tzapps". qseecom driver provides a
way to load any image on request. Client simply send the image
data in a specific format and this data is sent over to QSEE
(Qualcomm Secure Execution enviroment) to load accordingly.
(2) Add support for multi-client.
TZcom driver did not have provisions to support multiple clients
to interface with the single tzapp image loaded on the secure
domain. The changes added in qseecom driver allows for multiple
client to interface with a single image laoded and running in
secure domain.
(3) Add support for performance tweaking in QSEE
Added capability to send requests to QSEE to set specific clocks
for optimal crypto performance. This essentially will increase
the crypto performance on the secure domain. The crypto
functionality is used extensively by the current existing qseecom
client(s).
(4) Retain legacy support for QSEOS version 1.3.
In order for the existing applications to work with old QSEE image,
qseecom also supports the old mechanism (loading tzapp image via
pil). This was a requirement for existing products that are not
yet using the latest secure code.
Change-Id: I7cf2d62c612cb4d17b33579e66bee44c9844dfda
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
In a scenario where the client application crashes, tzapps is left
running on the secure domain. When a client application crashes,
the tzapp (loaded during open) needs to be unloaded to clean off
the tzapps state machine.
Change-Id: If0a14667c5d49e066bd777c2b1389915595f32aa
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
If a heap is marked as reusuable (i.e. memory is to be gotten from
fmem) the base used from allocation should not come from
allocate_contiguous_memory but from fmem_get_info instead. Otherwise,
the memory allocated isn't actually coming from fmem.
Change-Id: If9737c93df3bd34e9cac9585a4dbbc8993562c5f
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Fix a possible Null pointer dereference when allocating the
garbage page and fixed potential leaks caused in the error path.
Fixed potential leaks in pmem_remove.
Change-Id: I7d4fa0798553691ed80e5024b19ba363249576b3
CRs-Fixed: 313700
Signed-off-by: Vipul Gandhi <vgandhi@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>
Individual pmem devices can now be marked as reusable. The
memory will be reused through fmem.
Change-Id: Id71c2e0c42f093420c241771d7a2620ed2accfc4
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
the request_region/release_region call backs now return
an error code. This way if the request fails the allocation
can fail as well.
Change-Id: I817c65a43935fb41176ad03f5a7672fb5640084e
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
These supporting files control the building of the TSPP driver.
Change-Id: I6cc087dd0c15ea5ce949506412466ec1fd39a5d1
Signed-off-by: Joel Nider <jnider@codeaurora.org>
The TSPP driver manages the transport stream packet processor. This core
is used to offload the main CPU by handling MPEG TS packets, generally
coming from a broadcast modem using the ISDB-T (or variant) protocol.
Change-Id: Ia4c16dcce970ae0f52d8d17957a92fce34ecdb44
Signed-off-by: Joel Nider <jnider@codeaurora.org>
commit 161f14191dc166c4e3f37f68af1bc199c6868b7d upstream.
Since 43cc71eed1 (platform: prefix MODALIAS
with "platform:"), the platform modalias is prefixed with "platform:".
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
commit 2a9887919457c6e1bd482e8448223be59d19010a upstream.
ISSUE:
Using ML7831, MAC address writing doesn't work well.
CAUSE:
ML7831 and EG20T have the same register map for MAC address access.
However, this driver processes the writing the same as ML7223.
This is not true.
This driver must process the writing the same as EG20T.
This patch fixes the issue.
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: Masayuki Ohtak <masa-korg@dsn.okisemi.com>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Return invalid error if a NULL virtual address is
passed for pmem cache maintenance ioctl's
Change-Id: I18c369d4c2ac790b622408a988d171d6f75c4cd3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
* common/android-3.0: (570 commits)
misc: remove kernel debugger core
ARM: common: fiq_debugger: dump sysrq directly to console if enabled
ARM: common: fiq_debugger: add irq context debug functions
net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
net: wireless: bcmdhd: Call init_ioctl() only if was started properly
net: wireless: bcmdhd: Fix possible memory leak in escan/iscan
cpufreq: interactive governor: default 20ms timer
cpufreq: interactive governor: go to intermediate hi speed before max
cpufreq: interactive governor: scale to max only if at min speed
cpufreq: interactive governor: apply intermediate load on current speed
ARM: idle: update idle ticks before call idle end notifier
input: gpio_input: don't print debounce message unless flag is set
net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
net: wireless: bcmdhd: Improve suspend/resume processing
net: wireless: bcmdhd: Check if FW is Ok for internal FW call
tcp: Don't nuke connections for the wrong protocol
ARM: common: fiq_debugger: make uart irq be no_suspend
net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
mm: avoid livelock on !__GFP_FS allocations
...
Conflicts:
arch/arm/mm/cache-l2x0.c
arch/arm/vfp/vfpmodule.c
drivers/mmc/core/host.c
kernel/power/wakelock.c
net/bluetooth/hci_event.c
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
Move the following subdevices to use the pm8xxx interface -
mpp, irq, gpio, keypad, power-key, leds, othc, vibrator,
rtc, batt-alarm, thermal, upl, nfc, pwm, xoadc, regulators,
xo-buffers, charger.
This allows usage of a common driver for modules which are same
across multiple PM8XXX PMICs. It also provides flexibility
to add/remove subdevices for multiple board configurations.
Change-Id: Id9795552fc9f4a2c920c070babfaef1f4cd6ca61
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
The current split between this and the fiq debugger is awkward and does
not have any benefit (the interface between the two is also too simplistic).
The fiq debugger code itself needs a lot of refactoring, part of which
would be to split out some components that are arch indpendent.
So, for now, move this very small piece back into the fiq_debugger.
Change-Id: Ie4ec2a2f5d907be1691a0eb6ae9304aad29ecd14
Signed-off-by: Dima Zavin <dima@android.com>
Input voltage range for Headset detect is in the region
close to the acceptable voltage range for this ADC.
Applying overall calibration on this channel offsets the
input voltage on this channel. Therefore use ideal
calibration for the HDSET MPP channel.
Change-Id: I9d4e926f9522ac2715accac47b1031d37ae38df7
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Add support for writing data to EEPROM.
Change-Id: Id6b5096f2d59d21773c06ba3803151c2f3248956
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
[sboyd@codeaurora.org: use usleep_range() instead of msleep()]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Some devices need to know if the data is to be output or read, so add a
data direction into the eeprom structure to tell the driver whether the
data line should be driven.
The user in this case is the Micrel KS8851 which has a direction
control for the EEPROM data line and thus needs to know whether
to drive it (writing) or to tristate it for receiving.
Change-Id: Ic8bd7e13ce9bde423001ca23f3de02e76e1dbdaf
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
commit 05faadcf59507e8eea57ffbeea9cbb14c9a2ab3d upstream.
Commit 2a7fade7e0 ("hwmon: lis3: Power on corrections") caused a
regression on HP laptops with 8bit chip. Writing CTRL2_BOOT_8B bit seems
clearing the BIOS setup, and no proper interrupt for DriveGuard will be
triggered any more.
Since the init code there is basically only for embedded devices, put a
pdata check so that the problematic initialization will be skipped for
hp_accel stuff.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Andrew Morton <akpm@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-Add checks in the driver for suspend_noirq/resume_noirq
to prevent clients from invoking the driver for ADC requests
after suspend has begun. This will lead to interrupts being
lost since the request is done very late into suspend.
-Obtain a wakelock when an ADC request is occuring.
CRs-Fixed: 295261
Change-Id: I610e1fbcd25f5ff947cb7e5e7738100ac86015a9
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Add a new IOCTL call to the driver to properly
abort all threads blocked on wait queues. Updated
release call for proper cleanup.
CRs-fixed: 303637, 304152
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
Use safe list iterator where needed, check return
value for scm_call and add condition check for
different input buffer lengths.
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
Rename the clocks per the new naming convention under which
similarly named clocks are distinguished between using their
associated device's name and ID.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
When using CONFIG_MSM_USE_TSIF1 to enable the second tsif instance,
the device initialization failed because of a errant device ID. The
check has been updated to accept the correct device ID range (0..1)
Signed-off-by: Joel Nider <jnider@codeaurora.org>
Response buffer is always an offset in input shared buffer.
Can't rely on the sb_in_rsp_addr as that value is not filled
from TZ side. This also makes it consitent with the response
buffer calculation in tzcom_send_cmd().
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
- Zero out SB input buffer after a request is
successfully fulfilled to meet security
requirements.
- Remove redundant check for response length.
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
Since the PMEM driver establishes ioremaps on the fly for
on demand devices it is possible for the virtual address space
to become quickly fragmented. For such devices, pre-reserve the
virtual address range and only set up page table mappings when
required.
CRs-Fixed: 299510
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>