ppp: replace PPP_MTU with PPP_MRU

This replaces the uses of PPP_MTU with PPP_MRU
since both are identical.

Change-Id: Id5c1c590f4c04ab5d6b79da520b5c8eae01881e6
Signed-off-by: tirupathireddy <tirupath@codeaurora.org>
defconfig: enable L2TP/IPSEC VPN protocol

Add PP2P VPN and L2TP/IPsec VPN feature

CRs-Fixed: 391061
Change-Id: I053dcda947a2756283213d29457d1adcde3dfcb0
Signed-off-by: tirupathireddy <tirupath@codeaurora.org>
msm: smem_log: Initialize SMEM log after SMD

The smem_log dependency on SMSM is a legacy dependency that waited
for the modem to allocate the SMEM items before smem_log was initialized.
Now that smem_log can allocate the items first if necessary, it no longer
needs to wait for the modem since the only true dependency is that the
SMD module has initialized SMEM.

Update dependency information to initialize smem_log once SMD has
been initialized.

CRs-Fixed: 389529
Change-Id: I452eb31c8d2d1aea8ae02f8786a8c46f98c3ca2c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
usb: gadget: Do not pullup D+ by default on bootup

UDC core is starting device controllers as soon as gadget driver
is registered with the UDC, resulting in controller pulling up D+.
This can cause problems with drivers which registers with UDC during
initialization but are ready for enumeration only after user enables
it later. One example of such a driver is android.c

Change-Id: I8985839bd2659f3e3962fe85bd261cd63f43a991
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
msm_fb: display: Removing clk_set_rate in atomic context

clk_set_rate was getting called in an atomic context. This change
is needed to comply with Phase 3 clock API's.

Change-Id: If7fa9d624b07789803177da55e6c84c3686a2bde
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Bluetooth: Disabled the MULTICAST_ADDR_SET feature for BNEP.

Found there are some IOT issues when this command is sent from
DUT. This command is only a dummy implementation. As this doesn't
have any impact on functionality, disabled the feature.

Change-Id: Ib435ac17df9d0377bd0b41fdc33b68c738eeaccc
CRs-Fixed: 390090
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
lib: Pass the correct align offset to bitmap_find_next_zero_area_off

bitmap_find_next_zero_area_off requires everything to be given in terms
of bits. genpool no longer keeps track of everything in terms of bits
so the start address must be shifted before passing to
bitmap_find_next_zero_area_off. Without this, if the start address
is unaligned, the code will not take this into account.

Change-Id: I49e3dba51c48e2f97b03b21304e1258e83881c6b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: smd: remove riva v1 hardware workaround

8960 v1 with the defective v1 riva hardware is no longer supported.  This
makes the workaround code in SMD dead code that is never used.

This reverts afb8c4a9b88e8792d8915f69c236ee07b86e7220 and
afb8c4a9b88e8792d8915f69c236ee07b86e7220

Change-Id: I18fde559cbeea9c43398ebbb53d692f4a382788b
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm_serial_hs: Call clk_set_rate() from non-atomic context

By default, HSUART Core CLK frequency is set to 7.37MHz. With this
CLK Frequency, it is not possible to get higher baud rate of 3.2 or
4 Mbps. Hence to set higher baud rate, driver calls clk_set_rate()
to set HSUART Core CLK frequency as ( required baud_rate * 16 ).
clk_set_rate() shouldn't be call from atomic context otherwise below
BUG is seen.

BUG: sleeping function called from invalid context at
mutex.c:85 in_atomic(): 1, irqs_disabled(): 128, pid: 1, name: init
[<c00151c4>] (unwind_backtrace+0x0/0x12c) from
		[<c07aebbc>] (mutex_lock+0x18/0x3c)
[<c07aebbc>] (mutex_lock+0x18/0x3c) from
		[<c0021258>] (clk_set_rate+0x2c/0x178)
[<c0021258>] (clk_set_rate+0x2c/0x178) from
		[<c0364a34>] (msm_hs_set_termios+0x820/0xb9c)
[<c0364a34>] (msm_hs_set_termios+0x820/0xb9c)
		from [<c0362170>] (uart_change_speed+0x90/0x94)
[<c0362170>] (uart_change_speed+0x90/0x94)
		from [<c03626c0>] (uart_startup+0xc8/0x1a0)
[<c03626c0>] (uart_startup+0xc8/0x1a0)
		from [<c0363534>] (uart_open+0xe4/0x13c)
[<c0363534>] (uart_open+0xe4/0x13c)
		from [<c0343d64>] (tty_open+0x360/0x4ec)
[<c0343d64>] (tty_open+0x360/0x4ec)
		from [<c013787c>] (chrdev_open+0x114/0x134)
[<c013787c>] (chrdev_open+0x114/0x134)
		from [<c0132844>] (__dentry_open+0x190/0x29c)
[<c0132844>] (__dentry_open+0x190/0x29c)
		from [<c0132a00>] (nameidata_to_filp+0x50/0x5c)
[<c0132a00>] (nameidata_to_filp+0x50/0x5c)
		from [<c0141b08>] (do_last+0x7ec/0x928)
[<c0141b08>] (do_last+0x7ec/0x928)
		from [<c0141d08>] (path_openat+0xc4/0x390)
[<c0141d08>] (path_openat+0xc4/0x390)
		from [<c01420b4>] (do_filp_open+0x30/0x7c)
[<c01420b4>] (do_filp_open+0x30/0x7c)
		from [<c0132518>] (do_sys_open+0xd8/0x174)
[<c0132518>] (do_sys_open+0xd8/0x174)
		from [<c000e380>] (ret_fast_syscall+0x0/0x30)

Hence use mutex to protect msm_set_termios() allowing clk_set_rate()
to be called from non-atomic context.

Change-Id: I92073aaf0c80a9a432c47d42286d9a130cf5172c
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
msm: Remove incorrect SAW2 PMIC DATA commands

SAW v2.2 does not support PMIC_DLY. Remove the incorrect mapping in the
probe method. Also, PMIC_DATA0 is used by L2 SPM for enabling the S5
gang in SAW v2.2. Using this to buffer the S5 gang voltage is
unnecessary and incorrect.

Change-Id: If07b40b91f73e4ae101840f864823da968c0950b
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
usb: gadget: Resume usb bus on reset

When receiving reset interrupt from the usb controller, check if the bus
is suspended. If so then first resume the bus and only then reset
the usb controller.

This fixes a case of race condition when reset
interrupt is happening right after suspend interrupt. In this case
there might be a race in which the msm_otg will execute the suspend
event in the work queue after the reset interrupt finished. In this case
the bus will be suspended after the reset and no further event
(resume/reset) will arrive from host, keeping the device in LPM forever.

Change-Id: Ifd4bee52eb42c3313821a799a935539d1789d42e
CRs-Fixed: 381806, 386464
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Bluetooth: GAP: Dont allow role switch when there is another ACL

The scatternet scenarios are difficult to be handled in SOC. This
change not to allow role switch during outgoing ACL connections
will avoid scatternet scenarios.

CRs-fixed: 392836
Change-Id: I5769b71879ea951755e115424fb2b5b504e95784
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
arm: common: fix cpaccess asm instruction

The write_val argument was not specified as an input
on the asm instruction. The compiler thought it wasn't used,
even though the asm instruction does use r0, which
is how write_val is passed into the function. The compiler
would optimise out the argument being passed into
the function.

Add write_val as an input operand to prevent it being
optimised out.

Change-Id: I71f35e1b2e3c655f4020163d089d9c71bbd6614b
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
msm: kgsl: Do not save context if it is being destroyed

No need to save a context if it is being destroyed since
it will no longer be used at all. This is better for
performance and also avoids the use of legacy kgsl
context save code for contexts that use preambles

Change-Id: I19a64e82188b4132f353bb61c21e4ed2281092fc
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
defconfig: msm8960: enable interactive governor

Enable interactive governor in config to enable the analysis
of system usecases with interactive governor.

Change-Id: I56d021bfda3eb8c1e116892df577b7e729a3dde0
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
msm_fb: display: Add pseudo-planar 422 H1V2 support in the MDP4

Rotator outputs pseudo-planar 422 H1V2 for interleaved inputs
on 90 degree rotation. Add changes to support MDP_Y_CRCB_H1V2
in MDP4.

CRs-Fixed: 371303
Change-Id: I8083bf44f9e2addf9e8732268147c1c3f6c0e2af
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
ASoC: msm: Add AIO support for multi channel pcm platform driver

Add Async write mechanism for multichannel PCM platform driver.
This will facilitate to have meta data information flow from apps
To DSP and vice versa.

Change-Id: I0c7238b997588fd5ef9946a7dc83bfbe9ce1a1f7
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
msm: mdss: Correct HDMI interface polarity for different resolutions.

For HDMI, hsync and vsync polarity for resolution height greater than or
equal to 720 lines is active high. And for resolution height less
than 720 lines is active low. Program the these settings correctly
for mdp's hdmi interface.

Change-Id: I1a8889662f55676c13dfa8b7172bf7bcf7351cf5
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
power: pm8921 and ltc4088-charger: add pm_power_set_property

Add pm_power_set_property_usb API to support the power
supply framework APIs which allow changing the type of
a given power supply.

This is required to avoid the use of PMIC specific APIs
in the USB driver and encourage the use of the power
supply framework.

Change-Id: Ifba2bd1248e8bb47a0700dec4d321d32db4f2066
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
msm: board-qrd7627a: Enabling RTB for 7627a and 8625.

Enabling RTB(Register Trace Buffer) will help in taking RTB logs. RTB
implements uncached logging of particular events (like readl/writel,
printk, hotplug etc). RTB is useful because it provides a
rough indication of the last events that occured on each core prior to
a crash/reset.

Change-Id: I7b26e2c2b8d012028beaa3d1ed36f85603ad411f
Signed-off-by: Utsab Bose <ubose@codeaurora.org>