This is because set_fmt ops maybe called when PD is off,
and in such case, regmap_ops will lead system hang.
enale PD before doing regmap_ops.
Change-Id: I86c04679c22e4763fd2539f88371ad1d33951723
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
In order to prevent aliasing attacks on the branch predictor,
invalidate the BTB on CPUs that are known to be affected when taking
a prefetch abort on a address that is outside of a user task limit.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git kpti
commit a07373c8c365746583f25f49fee41b1bc0ff94b2)
CVE-2017-5715
Change-Id: I6b0db5fbf1d495b03560b665dca37c2834d6f3a9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
In order to avoid aliasing attacks against the branch predictor,
some implementations require to invalidate the BTB when switching
from one user context to another.
For this, we reuse the existing implementation for Cortex-A8, and
apply it to A9, A12 and A17.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git kpti
commit efcd0e857a656bbd1c1da15ff984ad6402332c61)
CVE-2017-5715
Change-Id: Ica839802de678a5456abadf09bb6434efd43da2c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Add constants and callback functions for the dwmac on px30 soc.
The base structure is the same, but registers and the bits in
them moved slightly, and add the clk_mac_speed for the select
of mac speed.
Change-Id: If1aeb2fbafb70a8cb68f9d26a97c5b2a46dcb90f
Signed-off-by: David Wu <david.wu@rock-chips.com>
The default value of the max_transfer_size is only 65535,
but according to the field of PktSizeWidth in GHWCFG3, the
otg controller on rockchip platforms can support max 512KB
transfer size. So we increase the otg max_transfer_size to
128KB, it can help to avoid dividing into two hardware
transmissions if the usb device class driver(e.g. f_mtp.c)
request to transfer more than 65535 Bytes data in a single
usb request.
Change-Id: Ic281965815e48e4a146a13f9d37f88a10ee0d33e
Signed-off-by: William Wu <william.wu@rock-chips.com>
If there is more data in the request than we could fit into
a single hardware request, then check both of the following
conditions:
- ep->dwc_ep.xfer_len < ep->dwc_ep.total_len;
- deptsiz.b.xfersize == 0;
If ep->dwc_ep.xfer_len < ep->dwc_ep.total_len and deptsiz.b.xfersize
isn't zero, it means that we have received a short packet from
host, then we shouldn't setup transfer for next portion of
data.
This patch can fix the following issue:
Use MTP to transfer more than 4GB single file from PC to RK3368
tablet base on the follow conditions:
- Increase the default Tx/Rx buf size to 64K or more in f_mtp.c
- Set the core_params->max_transfer_size to 65535;
Without this patch, it will fail to transfer the file at the end
because the f_mtp driver is waiting for a short packet to signal
EOF for file sizes > 4 gig, but the dwc2 driver doesn't handle
the short packet.
Change-Id: I172d48d727da4b75153705ce6b60728203dd35ca
Signed-off-by: William Wu <william.wu@rock-chips.com>
when power off, no need to lock/unlock reset_lock. and
if set reg failed, need to unlock reset_lock.
Change-Id: If0a50920504bb69f9fa13790e85af1830fda7946
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
The new partition path is compatible with the following two partition names.
GTP partition: rknand0px
Old partition: rknand_X(rknand_system)
Change-Id: I993d42064bf4e093bfe01512db563f635baeff39
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
For the hardware bug of RK3288 OHCI, we use commit cfe6f1dd57
("usb: ehci: add rockchip relinquishing port quirk support") to fix
it previously. However, it have been ineffective after upstream commit
94c43b9897 ("USB: Check for dropped connection before switching to
full speed") was merged due to the condition of relinquishing port was
changed.
This patch adds an additional condition for the previous commit to ensure
no relinquish port quirk can take effect for RK3288 EHCI.
Change-Id: I0630265e101afb349816955e069e1c121745ac08
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
if the sdmmc detect with iomux sdmmc_detn will false trigger
once the system into deepsleep
Change-Id: I5928b94327175ee2b39bd0740ea2eafa9d28604d
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
This reverts commit 49d083bd72.
The patch is part of PIE, we do not need it anymore.
Change-Id: Iedc231105fa18c3cadd2cfd023c451c40570be96
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
when wake up only power on hdmi phy, it may result in tmds pll unlock
because when in deep suspend, the power maybe no in a normal state.
now reinstall all register when wark up.
Change-Id: Ie882fa9b99bc6f4bfb3b2a6ea88a043b2f89ed58
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
reinstall hdmi TMDS clock when set color depth between 8bit and 10bit
to fix tmds clock frequency mismatch
Change-Id: I5ac951cd6cc0ac04b595009be7ae250e42290854
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
When clear the force mode bits, it needs to wait up to
100 ms to account for any potential IDDIG filter delay.
In the current code, it will call this three times during
probe if dr_mode == OTG. With this patch, we can reduce
it to once. It can help to speed up the DWC2 probe time.
Change-Id: I588042b03b086599e4020c3072653dfb3138fdc1
Signed-off-by: William Wu <william.wu@rock-chips.com>
We've found that while in host mode, using Android, if one runs
the command:
stop adbd
The existing usb devices being utilized in host mode are disconnected.
This is most visible with usb networking devices.
This seems to be due to adbd closing the file:
/dev/usb-ffs/adb/ep0
Which calls ffs_ep0_release() and the following backtrace:
[<ffffff800875a430>] dwc2_hsotg_ep_disable+0x148/0x150
[<ffffff800875a498>] dwc2_hsotg_udc_stop+0x60/0x110
[<ffffff8008787950>] usb_gadget_remove_driver+0x58/0x78
[<ffffff80087879e4>] usb_gadget_unregister_driver+0x74/0xe8
[<ffffff80087850c0>] unregister_gadget+0x28/0x58
[<ffffff800878511c>] unregister_gadget_item+0x2c/0x40
[<ffffff8008790ea8>] ffs_data_clear+0xe8/0xf8
[<ffffff8008790ed8>] ffs_data_reset+0x20/0x58
[<ffffff8008793218>] ffs_data_closed+0x98/0xe8
[<ffffff80087932d8>] ffs_ep0_release+0x20/0x30
Then when dwc2_hsotg_ep_disable() is called, we call
kill_all_requests() which causes a bunch of the following
messages:
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
init: Service 'adbd' (pid 1915) killed by signal 9
init: Sending signal 9 to service 'adbd' (pid 1915) process group...
init: Successfully killed process cgroup uid 0 pid 1915 in 0ms
init: processing action (init.svc.adbd=stopped) from (/init.usb.configfs.rc:15)
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 8 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 12 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 15 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 3 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_update_urb_state_abn(): trimming xfer length
And the usb devices connected are basically hung at this point.
It seems like if we're in host mode, we probably shouldn't run
the dwc2_hostg_ep_disable logic, so this patch returns an error
in that case.
With this patch (along with the previous patch in this set), we avoid
the mismatched interrupts and connected usb devices continue to function.
I'm not sure if some other solution would be better here, but this seems
to work, so I wanted to send it out for input on what the right approach
should be.
Change-Id: Iabdcdd0e33dc2009bfa5127971b7c6097a69c98f
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: YongQin Liu <yongqin.liu@linaro.org>
Cc: John Youn <johnyoun@synopsys.com>
Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Chen Yu <chenyu56@huawei.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Tested-by: Minas Harutyunyan <hminas@synopsys.com>
Reported-by: YongQin Liu <yongqin.liu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 9b481092c2)