Respond to the apps only polling command with an error
response when the modem is up.
Change-Id: Ifd9ae10a57339bf405a117cacfd987dec1875cd7
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
Also re-structures the code so that adding new target
support will be easier.
Change-Id: I5ad9100932da5454afbf1c996d71a6338dc59dbb
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
DIAG traffic can go over USB, UART and SD card. Input received from SD
card needs to be validated before sending to modem. Whereas, traffic
from UART does not need such check.
Change-Id: If5d29cc3a1eba6ce0336f09c774e11f6060d5ead
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
From 8960 onwards, application processor handles master diag. Other
slave processors can come up on different time. This change will
update each slave processor with latest mask info when it comes up.
Change-Id: Icc5f607043c8dc00dbfd504952beccaff5641f41
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Add bus scaling support to rotator driver
Change-Id: I53faf6070a9dc6d6359b6d58cb7cb618217ee8c0
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Add support for relaying the MDM 9k diag traffic over HSIC
to the USB DIAG MDM channel and vice versa. Also modify usb
diag_bridge to use signed parameters for buffer sizes. This
is especially needed for the final parameter of the read
and write callbacks, wherein a negative errno value may be
passed to convey an error.
Change-Id: Ifa516356a5d72597d82929a56d714f8dfb2964de
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
Rotator expects planar input in YCbCr order, wrong color can be seen
on ouput image when given YCrCb because the chromninance planes picked
are not correct. Swap Cb and Cr plane addresses to output correct image.
Change-Id: Ia05ab704d18da4aac49e63fb805c40a95ea51a33
CRs-Fixed: 327956
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
DIAG provides packet request/response service. A PC tool
can send a request and receive response from an app on
phone. In case, app is not running, the phone should return
an error response, which is almost same length as request.
A buffer overrun can happen, if the request is too huge. Thus,
adding a check to prevent buffer overrun.
Change-Id: I0955f9bcb703274bd1286047102c8303e6691c84
CRs-Fixed: 323841
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
DIAG char driver maintains registrations for remote processors in a table.
When the remote processor goes down, the registrations should be cleaned
up. This change adds the clean up process in event of a restart. Also when
the peripheral goes down for subsystem restart, the SMD channel between
apps processor and peripheral has to be set to NULL, to prevent further SMD
operations. When the peripheral comes back up, this SMD channel can be
re-initialized.
CRs-Fixed: 326120
Change-Id: I49afad5e3bc04f62024c1dc66f272726ae13c3e6
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
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>
Due to separate branches for Fusion targets, some fixes
for SDIO layer were missing on mainline. This will add the
missing fixes on the mainline.
Change-Id: I56cd617a744ca9d280bac50370dc9aba11958fdf
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
The rotator driver requests exact rates. There is no need to call
the clk_set_min_rate() API, which will soon be removed altogether.
Call clk_set_rate() instead.
Change-Id: Ica9cb30f85132e92a00b0000eea498c47645b697
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
When the modem goes down for subsystem restart, the SMD channel between
apps processor and modem has to be set to NULL, to prevent further SMD
operations. When the modem comes back up, this SMD channel can be
re-initialized.
Change-Id: I4854de8cbdfd157867c2c9513a297f18af51d626
Signed-off-by: Shalabh Jain <shalabhj@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>
Add support for ion memory heaps in the rotator
driver
Change-Id: Id844050871e4aaa7fa0e0fc9d69646d6d9875b85
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
The driver checks if the PRNG h/w is enabled. If it is not ON, it
enables the PRNG h/w.
Change-Id: I7c73eba7ba47f4fca116cfe0884758e6dd130ed0
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
Update drivers' usage of cpu_is_msm8960() to also include a
check for cpu_is_msm8930(), to support the pre-silicon
effort.
Change-Id: I2d7bbdd297d35764680b2007b941f7344ba85bc7
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
The deprecated API has been replaced by recommended one.
This fixes Klocwork error: 41336
Change-Id: I2996ffb413dcc3ff4998357b7e31972897da1826
CRs-Fixed: 313372
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
This change will add DIAG support for new target APQ8064.
Change-Id: Ic8d21dc39e42fc254f71ee62df8160641c8068f8
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Add configuration parameters for MSM9615 device.
PRNG hardware registers initialization in msm_rng.c is done
currently for MSM9615.
Change-Id: I2a05e9e582ce94a25bec71e1acaee95d62cd9469
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
check that offset is within the range of buffer to avoid possible
access to other memory regions.
Change-Id: I37f49b0c95cc9bf79a09c7b0fa04f1135b691a5d
CRs-Fixed: 308058
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
DIAG char driver maintains registrations for remote processors in a table.
When the remote processor goes down, the registrations should be cleaned
up. This change adds the clean up process in event of a restart.
Change-Id: I191099242bb9997efe5612a8b02ca3dc17f096ff
CRs-Fixed: 311580
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Added changes to support YV12 input format in the Rotator.
Output will be Pseudoplanar in this case.
Change-Id: Ic77ad2b6a3aaa66ad923494fb6c96e07738d674b
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
DIAG traffic has been supported over USB and SD card. This
change adds capability to route DIAG traffic over UART.
Change-Id: I0d6732fcbb19950700218140d581b5759e676b74
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
DIAG uses dedicated buffers for each peripheral processor, to
write their data to USB. Setting the right locking condition
before DIAG uses buffer, enables mutual exclusion.
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
8960 V2 contains different version from V1, until we
have the proper soc check in the board file to modify
the rotator device version disabling the check in the
rotator driver. It won't have any side effects.
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
DIAG opens connection with USB to drain traffic generated on
different processors. With 8960, we have a new processor added.
Thus, DIAG-USB connection needs to account for an extra buffer for
traffic generated on this processor.
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
rotator session is not be shared by threads with same parent.
Therefore repalce task_tgid_nr(current) with current->pid.
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
DIAG driver pulls MDM9k traffic onto MSM using the SDIO bridge.
This patch adds capability to close this channel under special
circumstances.
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
DIAG allocates memory to read from SMD channel. if for some reason,
the read function is to be exited, the allocated memory should be
released.
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name. This allows
the clock names to be updated to match the new naming convention.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
DIAG uses SMD control channels to transfer packet registration
information from slave processors. While USB is disconnected, under
some scenarios, the SMD data might be left unread. Hence, when USB
gets connected, a special effort has to be made to read any unread
data on SMD control channel. Also each time a registration information
is stored in diag table, the SMD channel needs to be polled once more.
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
commit 3321c07ae5068568cd61ac9f4ba749006a7185c9 upstream.
Since the buffer might contain security related data it might be a good idea to
zero the buffer after we have copied it to userspace.
This got assigned CVE-2011-1162.
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>