Commit Graph

592747 Commits

Author SHA1 Message Date
Rocky Hao
857ad0187f cpufreq: interactive: fix cpufreq object duplicate creatation in sysfs
[    4.216722] sysfs: cannot create duplicate filename '/devices/system/cpu/cpufreq'
[    4.233798] ------------[ cut here ]------------
[    4.244376] WARNING: at fs/sysfs/dir.c:31
[    4.253556]
[    4.256975] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.4.0 #156
[    4.270730] Hardware name: Rockchip SDK tb board (DT)
[    4.282302] task: ffffffc039670000 ti: ffffffc039678000 task.ti: ffffffc039678000
[    4.299444] PC is at sysfs_warn_dup+0x5c/0x78
[    4.309422] LR is at sysfs_warn_dup+0x5c/0x78

Change-Id: Id21fe74dc082ec6c94fcb3e0cc11b78226549f7d
Fixes: bc68f6c4ef ("cpufreq: interactive: build fixes for 4.4")
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-03-07 17:49:18 +08:00
Wu Liang feng
275af0eee4 FROMLIST: usb: dwc3: Enable support for 64-bit system
Add 64-bit DMA operation support to the USB DWC3 driver.
First attempt to set the coherent DMA mask for 64-bit DMA.
If that failed, attempt again with 32-bit DMA.

Change-Id: I6d8e0e35ed606aa38d1dbadbb48f5629c1b39552
Signed-off-by: Thang Q. Nguyen <tqnguyen@apm.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(am from https://patchwork.kernel.org/patch/8109031/)
2016-03-07 15:26:35 +08:00
Wu Liang feng
bd88043dd7 FROMLIST: usb: dwc3: pass arch data to xhci-hcd child
The xhci-hcd child node needs to inherit archdata attribute to use
dma_ops functions and attributes. This patch enables the USB DWC3
driver to pass archdata attributes to its xhci-hcd child node.

Signed-off-by: Thang Q. Nguyen <tqnguyen@apm.com>

Change-Id: I82abc58fd8d01d2233499958713dd69ed58dedb5
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(am from https://patchwork.kernel.org/patch/8109041/)
2016-03-07 15:26:00 +08:00
Andy Yan
f410957952 FROMLIST: ARM64: dts: rockchip: add syscon-reboot-mode DT node
Add syscon-reboot-mode driver DT node for rk3368 platform

Change-Id: I050579c2392fad6c7756d0d8a5dfc1a8a36023e4
Tested-by: Caesar Wang <caesar.upstream@gmail.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2016-03-07 15:16:16 +08:00
David Wu
bd9e614eb8 ARM64: dts: rockchip: add gt9xx touchscreen support
need to modify the i2c4 scl and sda connection in hardware.

Change-Id: I57981a3891047412b9ea61112fbf5ff4a23223b3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-03-07 15:12:33 +08:00
Wenlong Zhuang
8d9ad6296b video: rockchip: vop-lite: fix get clock source failed
Rename clock name and fix deadlock when VOP irqs are disabling.

Signed-off-by: Wenlong Zhuang <daisen.zhuang@rock-chips.com>
Signed-off-by: Xubilv <xbl@rock-chips.com>
Change-Id: Ib794128e9e0dda0fc7b4c48d52d196e8ba70c11d
2016-03-07 15:11:28 +08:00
John Youn
ebe05c6cd2 UPSTREAM: usb: dwc3: Fix assignment of EP transfer resources
The assignement of EP transfer resources was not handled properly in the
dwc3 driver. Commit aebda61871 ("usb: dwc3: Reset the transfer
resource index on SET_INTERFACE") previously fixed one aspect of this
where resources may be exhausted with multiple calls to SET_INTERFACE.
However, it introduced an issue where composite devices with multiple
interfaces can be assigned the same transfer resources for different
endpoints. This patch solves both issues.

The assignment of transfer resources cannot perfectly follow the data
book due to the fact that the controller driver does not have all
knowledge of the configuration in advance. It is given this information
piecemeal by the composite gadget framework after every
SET_CONFIGURATION and SET_INTERFACE. Trying to follow the databook
programming model in this scenario can cause errors. For two reasons:

1) The databook says to do DEPSTARTCFG for every SET_CONFIGURATION and
SET_INTERFACE (8.1.5). This is incorrect in the scenario of multiple
interfaces.

2) The databook does not mention doing more DEPXFERCFG for new endpoint
on alt setting (8.1.6).

The following simplified method is used instead:

All hardware endpoints can be assigned a transfer resource and this
setting will stay persistent until either a core reset or hibernation.
So whenever we do a DEPSTARTCFG(0) we can go ahead and do DEPXFERCFG for
every hardware endpoint as well. We are guaranteed that there are as
many transfer resources as endpoints.

This patch triggers off of the calling dwc3_gadget_start_config() for
EP0-out, which always happens first, and which should only happen in one
of the above conditions.

Fixes: aebda61871 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE")
Cc: <stable@vger.kernel.org> # v3.2+
Reported-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
(cherry picked from commit c450960187)

Change-Id: I804cb4d2f3b79b3cfd4be5b0942ed6f866c1e580
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:42:58 +08:00
Jianqiang Tang
6c7a659098 UPSTREAM: usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.
This patch is needed in order to pass one test case
defined in the OTG Automated Compliance Test specification.

Specification location:
http://www.usb.org/developers/onthego/otgeh_compliance_plan_1_2.pdf

This test case uses PET Tool, and PET Tool is one USB hardware
equipment provided by MQP Electronics.

Test case id is 6.8.3 B-UUT Bypass Capacitance.

We must set this otg flag in order to be able to return OTG
descriptor during enumeration, otherwise this test case with
failed with below error: "Get OTG descriptor request stalled".

Signed-off-by: Jianqiang Tang <jianqiang.tang@intel.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
(cherry picked from commit 6a4290cc28)

Change-Id: If264c2a878ee8520edc57876ab2325dce4ca869e
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:41:09 +08:00
Felipe Balbi
6b51105e1c UPSTREAM: usb: dwc3: of-simple: fix build warning on !PM
if we have a !PM kernel build, our runtime
suspend/resume callbacks will be left defined but
unused. Add a ifdef CONFIG_PM guard.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 5072cfc40a)

Change-Id: I6a7ceb1a90162b132afce17423888ab0cbdf897b
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:39:28 +08:00
John Youn
64f6e3af25 UPSTREAM: usb: dwc3: gadget: don't send extra ZLP
If the request->length is zero, a ZLP should already be sent due to that
and another ZLP is not needed to terminate the transfer.

Fixes: 04c03d10e5 ("usb: dwc3: gadget: handle request->zero")
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit d9261898a4)

Change-Id: Ib976552f93321f6ea52d3f0151c66fd6f2db8b17
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:37:24 +08:00
Felipe Balbi
a1c3fa1060 UPSTREAM: usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()
instead of using:

	if (condition) {
		dev_WARN_ONCE(dev, true, "foo");
		return -EINVAL;
	}

let's use:

	if (dev_WARN_ONCE(dev, condition, "foo"))
		return -EINVAL;

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 95ca961c75)

Change-Id: I8a7ee1e00ddf619d23ab974663c11fe795e9a478
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:35:26 +08:00
Felipe Balbi
233835c23f UPSTREAM: usb: dwc3: trace: show request flags
struct usb_request have 3 flags which might be
important to know about during debug. This patch
shows each of the 3 flags as a single letter:

z -> for zero
s -> short not okay
i -> interrupt

A capital letter means the feature is enabled
while a lower case letter means it is disabled;

Thus 'zsI' indicates that a ZLP is not needed,
that we can accept a short packet and interrupt
for this request should be enabled.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 46a01427e9)

Change-Id: I5d60411c51eff9f5a5f1233680bca6369f6fc6b8
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:33:25 +08:00
Felipe Balbi
f8d926f487 UPSTREAM: usb: dwc3: gadget: handle request->zero
So far, dwc3 has always missed request->zero
handling for every endpoint. Let's implement
that so we can handle cases where transfer must
be finished with a ZLP.

Note that dwc3 is a little special. Even though
we're dealing with a ZLP, we still need a buffer
of wMaxPacketSize bytes; to hide that detail from
every gadget driver, we have a preallocated buffer
of 1024 bytes (biggest bulk size) to use (and
share) among all endpoints.

Reported-by: Ravi B <ravibabu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 04c03d10e5)

Change-Id: I4dce506b683a9381e73733d09dd03e12364bef1f
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:31:26 +08:00
Felipe Balbi
00d7b43031 UPSTREAM: usb: dwc3: remove dwc3-qcom in favor of dwc3-of-simple
Now that we have a generic dwc3-of-simple.c, we can
use that instead of maintaining dwc3-qcom.c which is
extremely similar.

Cc: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit b084662776)

Change-Id: I4ae3b2649b5b970ef2974d5fa41ac8ff2affb6e0
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:29:34 +08:00
Felipe Balbi
9d8dd68f16 UPSTREAM: usb: dwc3: add generic OF glue layer
For simple platforms which merely enable some clocks
and populate its children, we can use this generic
glue layer to avoid boilerplate code duplication.

For now this supports Qcom and Xilinx, but if we
find a way to add generic handling of regulators and
optional PHYs, we can absorb exynos as well.

Tested-by: Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 16adc674d0)

Change-Id: Ia397ebcc522d0cd33c8dd3ee286dc2e0a5383a58
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:27:17 +08:00
Felipe Balbi
bfb4bdd41b UPSTREAM: usb: dwc3: ep0: fix setup_packet_pending initialization
It just ocurred to me that dwc3 already gives a
really hint of when a setup packet is pending and
that's the SETUP_PENDING TRB Status for EP0 IRQs.

Fix setup_packet_pending initialization based on
that. While at that, also make sure the comment in
gadget.c matches what code is doing.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit b5d335e5ea)

Change-Id: I9e197bee86b681e3d0da8692df8fac861eb00844
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:25:23 +08:00
Felipe Balbi
d9863c64a6 UPSTREAM: usb: dwc3: gadget: simplify next_request() return check
In dwc3_cleanup_done_reqs() we expect that all
iterations of our while (1) loop will find a valid
struct dwc3_request *. In case we don't, we're
dumping a WARN_ON_ONCE() splat so that people report
the failure.

This patch is a simple cleanup converting:

	if (!req) {
		WARN_ON_ONCE(1);
		return 1;
	}

to:

	if (WARN_ON_ONCE(!req))
		return 1;

which is a little easier to read.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit ac7bdcc1b3)

Change-Id: I1bfea94c01ee9df01930fd743301a7d04ce9b442
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:23:26 +08:00
Felipe Balbi
4bb0aebe84 UPSTREAM: usb: dwc3: ep0: purge dev_dbg() calls
The last few dev_dbg() messages are converted to
tracepoints and we can finally ignore dev_dbg()
messages during debug sessions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit acc38c4970)

Change-Id: I9046eeff627c97360cc9903e78fdd8715f95ce28
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:23:13 +08:00
Felipe Balbi
860bc9247c UPSTREAM: usb: dwc3: core: purge dev_dbg() calls
The last few dev_dbg() messages are converted to
tracepoints and we can finally ignore dev_dbg()
messages during debug sessions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 1407bf13e3)

Change-Id: I7a39582e1b5bd29b5d377da4bfbf95f0598776d4
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:22:22 +08:00
Felipe Balbi
c0f46b3768 UPSTREAM: usb: dwc3: gadget: purge dev_dbg() calls
The last few dev_dbg() messages are converted to
tracepoints and we can finally ignore dev_dbg()
messages during debug sessions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit ec5e795cde)

Change-Id: Ia6d016de13b5944ff8add9f2bab3686a1651ed2f
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 21:13:38 +08:00
Felipe Balbi
286371ccd4 UPSTREAM: usb: dwc3: gadget: simplify dwc3_gadget_ep_queue()
By moving our sanity checks our internal function
__dwc3_gadget_ep_queue() we can simplify the
externally visible API while also making sure that
callers of __dwc3_gadget_ep_queue() also make use of
the same checks.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit bb423984c2)

Change-Id: I6fc7b972e288b4d3ffcb629daed784c87d243e32
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-03-06 20:57:18 +08:00
Frank Wang
e91f04cc31 ARM64: dts: rk3366: add DT nodes for usb2.0 ehci and ohci
Change-Id: I4ade5961f0192d7ceff7c61557ddee6aba98224c
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-03-04 19:27:41 +08:00
Sugar Zhang
2385068d5b ARM64: dts: rk3366-tb: add spdif sound
Change-Id: I21e2879b94844b48282ff9aaa41c3f9d1ef89982
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-03-04 18:50:33 +08:00
Sugar Zhang
3a0035d041 ARM64: dts: rk3366: add spdif
Change-Id: I3d0f86e54e537524b1542d2d94fd0a56fc9c7cf2
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-03-04 18:26:24 +08:00
Sugar Zhang
57fb8b9e76 ARM64: configs: rockchip_defconfig: enable spdif
Change-Id: Ie021387c717eec5b0f583e9ff5e41f1818383b8f
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-03-04 18:24:50 +08:00
Sugar Zhang
b0db090473 ASoC: rockchip: add bindings for spdif controller
this patch add compatible for rk3366/rk3368/rk3399 spdif,
these three spdifs share the same type.

Change-Id: Iac533f3481962556e3ca2b0c4b685b64aec6786a
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-03-04 18:24:27 +08:00
Huang, Tao
7c1abbfe2a mmc: block: ioctl return EINVAL if cmd unknown
We should return -EINVAL if cmd is not MMC_IOC_CMD or MMC_IOC_MULTI_CMD,
otherwise blkdev_roset will return -EPERM.

Android adb, make_block_device_writable ioctl BLKROSET will return error,
make adb remount with error:
remount of /system failed;
couldn't make block device writable: Operation not permitted

Change-Id: I7d0a5727110c0fd9ad301a377e5002eae23f8aed
Fixes: a5f5774c55 ("mmc: block: Add new ioctl to send multi commands")
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-03-04 18:21:42 +08:00
Roger Chen
ed1a9bcb8e ARM64: dts: rk3366-tb: correct reset pin for Ethernet PHY
Change-Id: I94c1f22880965ab69865eeb81c0a33fa4f4201b4
Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
2016-03-04 18:10:20 +08:00
Roger Chen
e4dfdf3f73 ARM64: dts: rk3366: fix SCLK_MAC_TX && drive strength for RGMII TX pins
Change-Id: I0fe3d33c99d1fb0fb5451ee6123d44e3399b84da
Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
2016-03-04 18:07:43 +08:00
Roger Chen
5294574c5b ARM64: configs: enable CONFIG_STMMAC_ETH for Rockchip GMAC
Change-Id: I469a1b97980316bb08810515efab926e59d2432c
Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
2016-03-04 18:07:02 +08:00
Huang, Tao
1f4fecf46b Revert "arm64: rockchip: rockchip_defconfig enable ARM_CPUIDLE and CPU_FREQ_DEFAULT_GOV_INTERACTIVE"
This reverts commit 754010a8f8.

interactive driver will tirgger warning:
sysfs: cannot create duplicate filename '/devices/system/cpu/cpufreq'

Change-Id: I8074820953f2f76093df038f437890d65d054a28
2016-03-04 18:05:49 +08:00
Feng Xiao
c2f7badd39 ARM64: dts: rockchip: rk3366: add cpu dvfs support for tb
Change-Id: Ibcefd6e6c0b351310c3768b9b0c1494a2664ff90
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-04 17:48:47 +08:00
Feng Xiao
b636c08934 clk: rockchip: rk3366: modify hdmi clk according to the latest cru document
Change-Id: I815406cd8dfd94e8526b96a827df487fe5381620
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-04 17:45:53 +08:00
Huang, Tao
754010a8f8 arm64: rockchip: rockchip_defconfig enable ARM_CPUIDLE and CPU_FREQ_DEFAULT_GOV_INTERACTIVE
Change-Id: I786be6ce3a5f647df65a4e7b51cbb28152f39a7d
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-03-04 15:46:37 +08:00
Huang, Tao
21fb355d61 arm64: rockchip: rockchip_defconfig enable SYSCON_REBOOT_MODE
Change-Id: I638e0a2a8acf0843dca07c2a3355a3d06a18daf7
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-03-04 15:33:00 +08:00
Huang, Tao
c7ec32bfff arm64: dts: rockchip: rk3366: add syscon-reboot-mode node
use PMU_GRF_OS_REG0 to communicate with loader.

Change-Id: I8c007192d77c5634f9cf899899683c6c8f44f8b8
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-03-04 15:32:43 +08:00
Huang, Tao
8ac30ce2a8 arm64: dts: rockchip: rk3366: remove clock-frequency from timer node
Change-Id: I3ab1697f591ebf53b0e0ca90203ccb883c78dacc
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-03-04 15:31:51 +08:00
Shawn Lin
61b914eb81 mmc: sdhci-of-arasan: add phy support for sdhci-of-arasan
This patch adds Generic PHY access for sdhci-of-arasan. Driver
can get PHY handler from dt-binding, and power-on/init the PHY.
Currently, it's just mandatory for arasan,sdhci-5.1.

Change-Id: If61621796380c4a12e50fd3140e58342fd5e68b0
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-03-04 15:12:26 +08:00
Andy Yan
7138bcb02e FROMLIST: dt-bindings: soc: add rockchip reboot mode head file
add macro #define for rockchip reboot mode

Change-Id: I84036d43864f80623519d0df959e1de7e1a540db
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2016-03-04 14:26:59 +08:00
Andy Yan
c9d9b80828 FROMLIST: power: reset: add reboot mode driver
This driver parse the reboot commands like "reboot loader"
and "reboot recovery" to get a boot mode described in the
device tree , then call the write interfae to store the boot
mode in some place like special register or sram , which can
be read by the bootloader after system reboot, then the bootloader
can take different action according to the mode stored.

This is commonly used on Android based devices, in order to
reboot the device into fastboot or recovery mode.

Change-Id: Ifce5a22493a52f3e15332bbf3c94ce7217d7d17c
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Tested-by: John Stultz <john.stultz@linaro.org>
Acked-by: John Stultz <john.stultz@linaro.org>
2016-03-04 14:25:43 +08:00
Andy Yan
bf1c11414e FROMLIST: dt-bindings: power: reset: add document for reboot-mode driver
add device tree bindings document for reboot-mode driver

Change-Id: I280e24e8c09e688e4f6dc51b7a1a658347f05db5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2016-03-04 14:24:53 +08:00
Shawn Lin
1cca6796fb Documentation: add description of phy for sdhci-of-arasan
This patch adds phys and phy-names for sdhci-of-arasan as required
properties for arasan,sdhci-5.1, and details the example as well.

Change-Id: Ia3fc9c6284fc6f557b90fa880c9f2e8d01a4d3c2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-03-04 14:20:40 +08:00
Shawn Lin
d7f7d30f85 Documentation: rockchip-dw-mshc: add description for rk3399
Add "rockchip,rk3399-dw-mshc", "rockchip,rk3288-dw-mshc" for
dwmmc on rk3399 platform.

Change-Id: Ieefafab5f0e9650271e823659e2bec1556c4a9bc
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-03-04 14:15:22 +08:00
Shawn Lin
d3e94b6309 ARM64: dts: rockchip: add emmc, sdio and sdmmc node for rk3399
This patch add emmc, sdio and sdmmc node to support
mmc stuff on rk3399 platform.

Change-Id: Ic15dfb48f8e1340aff9031a7dd75e98108772fe1
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-03-04 14:02:47 +08:00
Carlo Caione
64d956e398 UPSTREAM: mmc: core: Enable tuning according to the actual timing
While in sdhci_execute_tuning() the choice whether or not to enable the
tuning is done on the actual timing, in the mmc_sdio_init_uhs_card() the
check is done on the capability of the card.

This difference is causing some issues with some SDIO cards in DDR50
mode where the CDM19 is wrongly issued.

With this patch we modify the check in both
mmc_(sd|sdio)_init_uhs_card() functions to take the proper decision
only according to the actual timing specification.

Cc: stable@vger.kernel.org
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit e10c321977)

Change-Id: I5b72e0032bb55bc17bfae2ea81ee40801da7772b
2016-03-04 11:45:50 +08:00
Ulf Hansson
ee5943daee UPSTREAM: mmc: core: Optimize boot time by detecting cards simultaneously
The mmc workqueue is an ordered workqueue, allowing only one work to
execute per given time. As this workqueue is used for card detection, the
conseqeunce is that cards will be detected one by one waiting for each
other.

Moreover, most of the time spent during card initialization is waiting for
the card's internal firmware to be ready. From a CPU perspective this
typically means waiting for a completion variable to be kicked via an
IRQ-handler or waiting for a sleep timer to finish.

This behaviour of detecting/initializing cards is sub-optimal, especially
for SOCs having several controllers/cards.

Let's convert to use the system_freezable_wq for the mmc detect works.
This enables several works to be executed simultaneously and thus also
cards to be detected like so.

Tests on UX500, which holds two eMMC cards and an SD-card (actually also
an SDIO card, currently not detected), shows a significant improved
behaviour due to this change.

Before this change, both the eMMC cards waited for the SD card to be
initialized as its detect work entered the workqueue first. In some cases,
depending on the characteristic of the SD-card, they got delayed 1-1.5 s.

Additionally for the second eMMC, it needed to wait for the first eMMC to
be initialized which added another 120-190 ms.

Converting to the system_freezable_wq, removed these delays and made both
the eMMC cards available far earlier in the boot sequence.

Selecting the system_freezable_wq, in favour of for example the system_wq,
is because we need card detection mechanism to be disabled once userspace
are frozen during system PM. Currently the mmc core deal with this via PM
notifiers, but following patches may utilize the behaviour of the
system_freezable_wq, to simplify the use of the PM notifiers.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Alan Cooper <alcooperx@gmail.com>
Tested-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from commit 520bd7a8b4)

Change-Id: I52bc65649b285e825e931a370a9754d1475494dc
2016-03-03 20:02:42 +08:00
Huang, Tao
a3a3769fe0 Merge tag 'v4.4.3'
This is the 4.4.3 stable release
2016-03-03 19:46:53 +08:00
Huang, Tao
5b1f5a9940 Merge branch 'android-4.4' of https://android.googlesource.com/kernel/common
* android-4.4:
  video: adf: Fix modular build
  net: ppp: Fix modular build for PPPOLAC and PPPOPNS
  net: pppolac/pppopns: Replace msg.msg_iov with iov_iter_kvec()
  ANDROID: mmc: sdio: Disable retuning in sdio_reset_comm()
  ANDROID: mmc: Move tracepoint creation and export symbols
  ANDROID: kernel/watchdog: fix unused variable warning
  ANDROID: usb: gadget: f_mtp: don't use le16 for u8 field
  ANDROID: lowmemorykiller: fix declaration order warnings
  ANDROID: net: fix 'const' warnings
  net: diag: support v4mapped sockets in inet_diag_find_one_icsk()
  net: tcp: deal with listen sockets properly in tcp_abort.
  tcp: diag: add support for request sockets to tcp_abort()
  net: diag: Support destroying TCP sockets.
  net: diag: Support SOCK_DESTROY for inet sockets.
  net: diag: Add the ability to destroy a socket.
  net: diag: split inet_diag_dump_one_icsk into two
  Revert "mmc: Extend wakelock if bus is dead"
  Revert "mmc: core: Hold a wake lock accross delayed work + mmc rescan"
  ANDROID: mmc: move to a SCHED_FIFO thread
2016-03-03 19:42:14 +08:00
Shen Zhenyi
f9b786b2d7 video: rockchip: tve: code sync from kernel-3.10
Change-Id: I677105f02c1be03a062cbe80b3883000b107ca91
Signed-off-by: Shen Zhenyi <szy@rock-chips.com>
2016-03-03 19:08:02 +08:00
Shen Zhenyi
0c6fad26e3 ARM: dtsi: rk3036: tve add node to set value by user
Change-Id: If1e1043408f7489e00b94d0f8fa2564dbdc3159f
Signed-off-by: Shen Zhenyi <szy@rock-chips.com>
2016-03-03 19:07:31 +08:00