Commit Graph

844306 Commits

Author SHA1 Message Date
Meng Dongyang
cba3c4bdda usb: dwc2: make hcd into L3 power off state when suspend
The controller will reset and run into error state if turn
off power when suspend in host mode. This patch stop hcd to
make the controller into L3 state to make sure that the
controller and driver state will reset when resume.

Change-Id: If66bc1a249e919f440ecde0c66f18dabde0b2e62
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2019-10-21 16:57:14 +08:00
William Wu
f9299aad43 usb: dwc2: power on/off phy for otg mode
The commit dc71e51944 ("usb: dwc2: make otg manage lowlevel
hw on its own") aimed to control the clk and phy power for
otg mode, but it also introduced lost of new problems, so we
revert it.

This patch only controls phy power for otg mode, it can fix
the dwc2 udc start fail issue with the following error log:

dwc2_hsotg_init_fifo: timeout flushing fifos (GRSTCTL=80000430)
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
bound driver configfs-gadget
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001

Change-Id: Id6996aecab7f0aaaf12530b7a377144e23ef1667
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-21 16:57:14 +08:00
William Wu
eb6d585c9a FROMLIST: usb: dwc2: resume root hub to handle disconnect of device
When handle disconnect of the hcd during bus_suspend, hcd
needs to resume its root hub, otherwise the root hub will
not disconnect the existing devices under its port.

This issue always happens when connecting with usb devices
which support auto-suspend function (e.g. usb hub).

(am from https://patchwork.kernel.org/patch/9751469/)
Change-Id: I663fdea73f36e89130d9a250612363968cbff941
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-21 16:57:14 +08:00
Frank Wang
59b1f262d8 usb: dwc2: add multiple clock handling
Originally, dwc2 just handle one clock named otg, however, it may have
two or more clock need to manage for some new SoCs, so this adds
change clk to clk's array of dwc2_hsotg to handle more clocks operation.

Change-Id: I661297ef908d9eace2215205018fa94d12cea128
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2019-10-21 16:57:14 +08:00
Jacob Chen
48ca5779e3 FROMLIST: usb: dwc2: assert phy reset when waking up in rk3288 platform
On the rk3288 USB host-only port (the one that's not the OTG-enabled
port) the PHY can get into a bad state when a wakeup is asserted (not
just a wakeup from full system suspend but also a wakeup from
autosuspend).

We can get the PHY out of its bad state by asserting its "port reset",
but unfortunately that seems to assert a reset onto the USB bus so it
could confuse things if we don't actually deenumerate / reenumerate the
device.

We can also get the PHY out of its bad state by fully resetting it using
the reset from the CRU (clock reset unit) in chip, which does a more full
reset.  The CRU-based reset appears to actually cause devices on the bus
to be removed and reinserted, which fixes the problem (albeit in a hacky
way).

It's unfortunate that we need to do a full re-enumeration of devices at
wakeup time, but this is better than alternative of letting the bus get
wedged.

Change-Id: I3120a38a7f646a9d244f04bd2dcfef7474a4a6d1
Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(am from https://mail-archive.com/linux-kernel@vger.kernel.org/msg1254059.html)
2019-10-21 16:57:14 +08:00
Shixiang Zheng
e09c7baf75 arm64: Makerfile: try using python script for auto convert bmp logo
Change-Id: I7e3ced455f5f7d05b00558d2e7753168a68b7d7f
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-10-21 16:17:04 +08:00
Yu YongZhen
e52d05cf03 arm: Makefile: pack logo when CONFIG_DRM
Change-Id: I11ce5935ddff13618776a82faae56670f31b1d51
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
2019-10-21 16:13:45 +08:00
Shixiang Zheng
14c37b9fb4 ARM: Makerfile: try using python script for auto convert bmp logo
Change-Id: I11730f39b317d1d267e60500f0228bb960e44cce
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-10-21 16:13:08 +08:00
Tao Huang
fc5f57b2b0 net: rockchip_wlan: rtl8723cs: work around clang bug
/tmp/rtl8703b_phycfg-53954c.s: Assembler messages:
/tmp/rtl8703b_phycfg-53954c.s:3071: Error: selected processor does not support `bfc w0,#4,#4'

Change-Id: I9a2cf7ea8b4da82ab6148043983ad57b68b93562
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-21 15:56:59 +08:00
Tao Huang
2f0f1a27bd net: rockchip_wlan: rtl8723cs: fix clang compile error
drivers/net/wireless/rockchip_wlan/rtl8723cs/core/rtw_debug.c:45:44: error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time]
        RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);

Change-Id: I07e50007edc508ec684eb421cfe5fd4378c96553
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-21 15:56:59 +08:00
Jianing Ren
2e4b6184c7 HACK: arm64: dts: rk3399-android: fixing the adb function cannot be used
This is a HACK patch setting dwc3 dr-mode from otg to peripheral.

Change-Id: I4a6ba065e0369315e95f6ad251b58cc16b1c4e81
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-10-21 14:46:31 +08:00
William Wu
4e9d8608a8 usb: gadget: composite: fix double freeing of freed memory
The following message can be observed on rk3399 nougat board
when switch MTP/charge mode with KASan backported :

=============================================================================
BUG kmalloc-192 (Not tainted): Object already free
-----------------------------------------------------------------------------

Disabling lock debugging due to kernel taint
INFO: Allocated in dwc3_gadget_ep_alloc_request+0x2c/0xf4 age=977 cpu=4 pid=1
alloc_debug_processing+0x128/0x17c
___slab_alloc.constprop.56+0x520/0x604
__slab_alloc.isra.53.constprop.55+0x24/0x34
kmem_cache_alloc_trace+0xa4/0x210
dwc3_gadget_ep_alloc_request+0x2c/0xf4
__ffs_func_bind_do_descs+0x15c/0x1b0
ffs_do_descs+0x50/0x180
ffs_func_bind+0x3e4/0x634
usb_add_function+0x78/0xe8
configfs_composite_bind+0x240/0x2d8
udc_bind_to_driver+0x38/0xcc
usb_udc_attach_driver+0x80/0xa8
gadget_dev_desc_UDC_store+0xa0/0xe4
configfs_write_file+0xfc/0x14c
__vfs_write+0x38/0xfc
vfs_write+0xac/0x174
INFO: Freed in dwc3_gadget_ep_free_request+0x84/0xbc age=4 cpu=4 pid=1
free_debug_processing+0x29c/0x36c
__slab_free+0x60/0x388
kfree+0x210/0x27c
dwc3_gadget_ep_free_request+0x84/0xbc
ffs_func_unbind+0x88/0xe4
purge_configs_funcs+0xa8/0x100
configfs_composite_unbind+0x34/0x5c
usb_gadget_remove_driver+0x74/0xa0
usb_gadget_unregister_driver+0x60/0xa4
unregister_gadget+0x24/0x48
gadget_dev_desc_UDC_store+0x7c/0xe4
configfs_write_file+0xfc/0x14c
__vfs_write+0x38/0xfc
vfs_write+0xac/0x174
SyS_write+0x54/0xa4
el0_svc_naked+0x24/0x28
Hardware name: Rockchip RK3399 Evaluation Board v3 edp (Android) (DT)
Call trace:
[<ffffff9008088490>] dump_backtrace+0x0/0x1c8
[<ffffff900808866c>] show_stack+0x14/0x1c
[<ffffff900835cbe4>] dump_stack+0x8c/0xac
[<ffffff900819f840>] print_trailer+0x188/0x198
[<ffffff900819f9bc>] object_err+0x3c/0x4c
[<ffffff90081a1fb8>] free_debug_processing+0x27c/0x36c
[<ffffff90081a2108>] __slab_free+0x60/0x388
[<ffffff90081a2c88>] kfree+0x210/0x27c
[<ffffff9008645a58>] composite_dev_cleanup+0x74/0xfc
[<ffffff900864789c>] configfs_composite_bind+0x2b8/0x2d8
[<ffffff900864953c>] udc_bind_to_driver+0x38/0xcc
[<ffffff9008649650>] usb_udc_attach_driver+0x80/0xa8
[<ffffff900864835c>] gadget_dev_desc_UDC_store+0xa0/0xe4
[<ffffff9008218144>] configfs_write_file+0xfc/0x14c
[<ffffff90081ac958>] __vfs_write+0x38/0xfc
[<ffffff90081ad290>] vfs_write+0xac/0x174
[<ffffff90081adc4c>] SyS_write+0x54/0xa4
[<ffffff90080826f0>] el0_svc_naked+0x24/0x28

This patch sets the usb_request pointer to NULL after the
free the usb_request buf. And the composite_dev_cleanup()
will check if the usb_request pointer is NULL before do
kfree and avoid double freeing freed menory.

Change-Id: I69df57553cb14d046b8b8206becd342a5e5fb7ba
Signed-off-by: William Wu <wulf@rock-chips.com>
2019-10-21 11:47:18 +08:00
Shunhua Lan
ec584b4972 ASoC: rt5651: Porting to rockchip platform
1 add mclk control
2 add speaker amplifier control

Change-Id: Ib3c03cd281f1ebf4d6d583076bd3930bbe3b3fe0
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-21 11:00:32 +08:00
Elaine Zhang
cf11cb15dd ARM: dts: rockchip: remove the regulator-initial-mode for vcc_ddr
The driver does not match the dts, pmic driver is update to 4.19 kernel,
but the dts node is not update,make the vcc_ddr regulator init failed:
[    2.126351] rk808 0-001a: chip id: 0x8160
[    2.134083] rk808-regulator rk808-regulator: there is no dvs0 gpio
[    2.134229] rk808-regulator rk808-regulator: there is no dvs1 gpio
[    2.134347] DCDC_REG1: supplied by vcc_sys
[    2.136769] DCDC_REG2: supplied by vcc_sys
[    2.138759] DCDC_REG3: supplied by vcc_sys
[    2.139064] vcc_ddr: no set_mode operation
[    2.139110] rk808 0-001a: failed to register 2 regulator
[    2.140110] rk808-regulator: probe of rk808-regulator failed with error -22

Change-Id: Ieecd8678345202db0be5ac4c669c890283793d42
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-10-18 14:04:30 +08:00
Wang Panzhenzhuan
4b28c34a8e arm64: dts: rockchip: rk3399-sapphire-excavator-edp: enable ov13850 & module attached vcm & flash
Change-Id: I3d62df5dd2dce4919314c30f7f4652e8f6e59fd2
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-10-18 09:21:05 +08:00
Wang Panzhenzhuan
48957476c9 arm64: configs: rockchip_defconfig: enable ov13850 & vcm149c & SGM3784
OV13850 Camera Module used by rk3399 & rk3399pro excavator board

Change-Id: Ieb06cc519609392475db1d4f0103a89d22110fd4
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-10-18 09:20:40 +08:00
Bian Jin chen
a2c4ea38c3 arm64: dts: rockchip: enabled rng default for px30-android
Change-Id: I4d892e5856c3c22c8ecbdbebc3f18c0cab20cf8a
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-10-18 09:14:28 +08:00
Yifeng Zhao
c1886ed7a3 drivers: rk_nand: support Micron B05A and B16A
include commit:
1.f7468ce49e84: drivers: rk_nand: fix the exception of f2fs execution discard function
2.6dfc7913e70b: drivers: rk_nand: support SKHynix 14nm 2D 16GB Nand Flash
3.c76939e892ef: drivers: rk_nand: fix ota update loader fail issue
4.d44aa2f187e4: drivers: rk_nand: add zftl for arm32

Change-Id: Ie430a7388c9b2a21b32fca91e5197e5f035b5ac1
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-17 18:07:32 +08:00
Simon Xue
bac8464303 PCI: rockchip: support remove dma_trx_obj
When PCIe link broken, remove pcie dev and reprobe may repair the link,
also need to remove the dma_trx_obj

Change-Id: If0a243d7c39bef5763c22fa53d5e7a6d515412f5
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-17 16:00:38 +08:00
Simon Xue
61e3540d6e arm64: dts: rockchip: rk1808: update softreset about pcie
Delete SRST_PCIEPHY_POR, SRST_PCIEPHY_P, SRST_PCIEPHY_PIPE from PCIe
node, combo phy node already include these softreset

Change-Id: I7f1c739fbbb9b8c43ecb620b5d0655d0e1d221cb
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-17 10:18:37 +08:00
Simon Xue
f6a80248e3 phy: rockchip-inno-combphy: support low power consumption mode
Support low power consumption mode when PCIe suspend.

1. Add missing Kconfig and Makefile
2. Add usb3phy_grf_p reset
3. Turn off PCIe phy pd
4. Write some more MAGIC registers to enter low power mode like following:
	/* enter PCIe phy low power mode */
	writel(0x36, priv->mmio + 0x2150);
	writel(0x36, priv->mmio + 0x3150);
	writel(0x02, priv->mmio + 0x21e8);
	writel(0x02, priv->mmio + 0x31e8);
	writel(0x0c, priv->mmio + 0x2080);
	writel(0x0c, priv->mmio + 0x3080);
	writel(0x08, priv->mmio + 0x20c0);
	writel(0x08, priv->mmio + 0x30c0);
	writel(0x08, priv->mmio + 0x2058);

	writel(0x10, priv->mmio + 0x2044);
	writel(0x10, priv->mmio + 0x21a8);
	writel(0x10, priv->mmio + 0x31a8);
	writel(0x08, priv->mmio + 0x2058);
	writel(0x08, priv->mmio + 0x3058);
	writel(0x40, priv->mmio + 0x205c);
	writel(0x40, priv->mmio + 0x305c);
	writel(0x08, priv->mmio + 0x2184);
	writel(0x08, priv->mmio + 0x3184);
	writel(0x00, priv->mmio + 0x2150);
	writel(0x00, priv->mmio + 0x3150);
	writel(0x10, priv->mmio + 0x20e0);
	writel(0x00, priv->mmio + 0x21e8);
	writel(0x00, priv->mmio + 0x31e8);

Change-Id: I2dc7f99e54d336f45a13b2842bde1a02300311fc
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-17 10:18:17 +08:00
Wu Liangqing
f4b51e5712 arm64: dts: rockchip: enabled rng default for rk3399-android
Change-Id: I7d895feb2c6d41d0560f083736462854a2224e89
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-10-17 10:10:59 +08:00
Lin Jinhan
0d70be3bb5 ARM: dts: rockchip: add rng node for rk3288
rng node is compflict with crypto node, so default disable

rng node and crypto node.

Change-Id: I9a28108a5667f88c15d5cc9916d927115cdb8918
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-17 10:08:51 +08:00
Lin Jinhan
e5f89c5233 arm64: dts: rockchip: rk3328: add rng node
Change-Id: Ic443f0e08ac427654008a2225eb9a8565b20fda5
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-17 10:07:53 +08:00
Lin Jinhan
27fcf8bea2 ARM: dts: rk312x: add rng node
Change-Id: I1ce01820a13d5cf3bc6fdf22c192c0a8ce92f700
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-17 10:07:36 +08:00
Finley Xiao
32948d8b86 PM / devfreq: Add new device link for sysfs
As the device name has been changed to devfreq(X), but user should find
devfreq driver with their parent device name, so add a new link named
with parent name.

Change-Id: I5077ddecbcc8db8d59cb6f16f2be5107b391677d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-17 08:52:12 +08:00
Lin Jinhan
0ab296d5cf arm: rockchip_defconfig: enable CONFIG_HW_RANDOM_ROCKCHIP
enable CONFIG_HW_RANDOM & CONFIG_HW_RANDOM_ROCKCHIP

Change-Id: Ieb1bfa78ef62fa8998e13cb4e55f1d3559e88532
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-16 19:20:59 +08:00
William Wu
955bb70bf1 phy: add cp_test callback
There are several SoCs (e.g. rk3228h and rk3328) that integrated
with Inno USB3 PHY, they can't toggle CP test pattern when do
USB3 compliance test by default.

This patch add a cp_test callback for USB3 controller to enable
the special USB3 PHY to toggle the CP test pattern.

Change-Id: I2d603202723a4c044d4231af10cfe2c60ec0e988
Signed-off-by: William Wu <wulf@rock-chips.com>
2019-10-16 17:35:55 +08:00
Simon Xue
72dd89e1ca PCI: rockchip: Add Rockchip DW PCIe controller support
1. Add support for DW PCIe controller found on RK1808 SoC platform
2. Add support PCIe udma transfer

Change-Id: Ic6d638782d1f55f965d663f73eee14bafa392740
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-16 17:34:16 +08:00
Shawn Lin
61ba789f0c PCI: dwc: Skip allocating own MSI domain if using external MSI domain
On some platform, external MSI domain is using instead of the one
created by designware driver. For instance, if using GIC-V3-ITS
as a MSI domain, we only need set msi-map in the devicetree but
never need any bit in the designware driver to handle MSI stuff.
So skip allocating its own MSI domain for that case.

Change-Id: Ic4f5f0a1a1833c778c4e4750cb88f34a5b37a198
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-16 17:33:00 +08:00
Lin Jinhan
67e7bc4cc0 arm64: dts: rockchip: add rng node for rk3399
use rng of crypto1

Change-Id: Ic8cd339d43012a356d981284726ac4d8158a2316
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-16 15:30:36 +08:00
Lin Jinhan
689282bdce hwrng: rockchip: fix bugs on read trng output regs
memcpy_fromio requrie 8 byte align on arm64 while crypto v1 trng output
regs offset is 0x204.

Change-Id: Ida2239a3d493bd9910c63ae4c4be1c23f9cc1212
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-16 15:29:35 +08:00
Lin Jinhan
f80caf71dd hwrng: rockchip - add support for Rockchip CRYPTO V1 HW RNG
Change-Id: Ic01b8d40730506a9deee301bccbbe9b91b1dd6a8
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-16 15:29:11 +08:00
Lin Jinhan
45f41e9f7f dt-bindings: rng: Document the Rockchip CRYPTO V1 HW RNG bindings
Change-Id: Ie266005701812b96647ea7835e6d4bdf035ba0f9
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-16 15:28:55 +08:00
Simon Xue
4ea884cd60 phy: add PCIE_EP and PCIE_RC modes
Innosilicon combophy for PCIe still need different
configuration between EP and RC mode.

Change-Id: Ie1f14e63785f44d84a2b3a154990c6a54eb1156e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-10-16 15:26:13 +08:00
Tao Huang
8de6f25db1 arm64: rockchip_defconfig: remove nonexistent config
-CONFIG_DEFAULT_USE_ENERGY_AWARE
-CONFIG_MEMORY_STATE_TIME
-CONFIG_GPIO_RK8XX
-CONFIG_MMC_BLOCK_BOUNCE
-CONFIG_ANDROID_TIMED_GPIO
-CONFIG_ANDROID_LOW_MEMORY_KILLER
-CONFIG_SYNC
-CONFIG_SW_SYNC_USER
-CONFIG_ION_ROCKCHIP
-CONFIG_TIMER_STATS
-CONFIG_DEBUG_SET_MODULE_RONX

Change-Id: I2bf328e70a54878e28084becb9de1f791cc12b1e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-16 10:39:18 +08:00
Tao Huang
d2460b1714 arm64: rockchip_defconfig: disable CC_OPTIMIZE_FOR_SIZE
For better performance.

Change-Id: I7f4a64644078140f5882dac655ec34e25a4b648d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 18:08:43 +08:00
Tao Huang
d767344a13 power: supply: rk818_charger: fix gcc warning
drivers/power/supply/rk818_charger.c: In function 'rk818_cg_usb_get_property':
drivers/power/supply/rk818_charger.c:448:11: warning: 'fake_offline' may be used uninitialized in this function [-Wmaybe-uninitialized]
   else if (fake_offline)
           ^

Change-Id: I07ccf6e136d47c75db56004de1c78436e570a356
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 18:08:43 +08:00
Tao Huang
7b74e8b780 power: supply: rk818_battery: fix gcc warning
drivers/power/supply/rk818_battery.c: In function 'rk818_bat_calc_zero_linek':
drivers/power/supply/rk818_battery.c:1582:6: warning: 'cnt' may be used uninitialized in this function [-Wmaybe-uninitialized]
   cnt++;
   ~~~^~
drivers/power/supply/rk818_battery.c: In function 'rk818_battery_resume':
drivers/power/supply/rk818_battery.c:3465:20: warning: 'time_step' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int interval_sec, time_step, pwroff_vol;
                    ^~~~~~~~~

Change-Id: I405e7c1b3a3b567693244b40acdf8ed924331cf7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 18:08:43 +08:00
Tao Huang
20e4b440ce power: supply: rk817_battery: fix gcc warning
drivers/power/supply/rk817_battery.c: In function 'rk817_bat_pm_resume':
drivers/power/supply/rk817_battery.c:3290:34: warning: 'time_step' may be used uninitialized in this function [-Wmaybe-uninitialized]
      (battery->sleep_dischrg_sec > time_step)) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

Change-Id: I5ca86f00471e467448145bcb001d17b0ed242c49
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 18:08:43 +08:00
Tao Huang
3854c061b9 net: rockchip_wlan: bcmdhd: fix gcc warning
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_packet_chain':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1291:77: warning: '*((void *)&before+8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
    write, ttl_len, now.tv_sec-before.tv_sec, now.tv_nsec/1000-before.tv_nsec/1000));
                                                                             ^
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1107:23: note: 'before' was declared here
  struct timespec now, before;
                       ^~~~~~

Change-Id: I34e1b7132ad2771932e53475788dd4f3607f0233
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 18:08:43 +08:00
Tao Huang
6664bfef49 input: sensors: mc3230: fix gcc warning
drivers/input/sensors/accel/mc3230.c: In function 'sensor_report_value':
drivers/input/sensors/accel/mc3230.c:602:4: warning: 'result' may be used uninitialized in this function [-Wmaybe-uninitialized]
  x = mc3230_convert_to_int(buffer[0]) * g_value;
  ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/sensors/accel/mc3230.c:521:6: note: 'result' was declared here
  int result;
      ^~~~~~

Change-Id: I817bbd56a2a194388bde705cbfa350f8d33b6efa
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 18:08:43 +08:00
Tao Huang
8959d2a951 thermal: rk3368: fix gcc warning
drivers/thermal/rk3368_thermal.c: In function 'rk3368_thermal_get_temp':
drivers/thermal/rk3368_thermal.c:580:12: warning: 'val_cpu' may be used uninitialized in this function [-Wmaybe-uninitialized]
   old_data = tsadc_data;
   ~~~~~~~~~^~~~~~~~~~~~
drivers/thermal/rk3368_thermal.c:529:6: note: 'val_cpu' was declared here
  int val_cpu;
      ^~~~~~~

Change-Id: I365441507082cbbd0f7be01e5f0a09674af6230d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 18:08:43 +08:00
Jon Lin
e2a024e1cc drivers: rkflash: remove using memzero func
Change-Id: I4310c9f0aa75c5d1b0abbd31ba84746a74e1f655
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-10-15 16:13:55 +08:00
Tao Huang
52d7b98f85 ARM: rockchip_defconfig: enable HZ_1000
For save boot time.

Change-Id: Id7c7db00f23a528445ffc651679d6efac65673fe
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 14:48:55 +08:00
Tao Huang
9a883c648a arm64: rockchip_defconfig: enable HZ_1000
For save boot time.

Change-Id: I46496ae86e462882cfd3e357a3b0ee3cfc3117da
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-15 14:35:16 +08:00
Bian Jin chen
985ebcf8d2 arm64: rockchip_defconfig: enable CONFIG_HW_RANDOM
Enable the Rockchip HW random driver to prevent Android init
from hang due to low entropy.

Change-Id: I0f2c2c1c27c4c91002a42c8cb77e44809815bd03
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-10-15 14:19:06 +08:00
Zhen Chen
de4888b119 MALI: bifrost: Add necessary calling of dev_pm_opp_put()
According to
commit 8a31d9d942 ("PM / OPP: Update OPP users to put reference")

Fixes: b0ad177659 ("MALI: rockchip: upgrade Bifrost DDK to r20p0-01rel0, from r12p0-01rel0")
Change-Id: I2df7c7ddab0ae740e75579a0f620c3d918f0eed5
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-10-15 12:02:31 +08:00
Liang Chen
70537fcbc1 Revert "FROMLIST: sched/topology: Make Energy Aware Scheduling depend on schedutil"
We use cpufreq_interactive governor with Energ Aware Scheduling.

This reverts commit 1e6b1214f1.

Change-Id: I782bed880c858537a89e8928921cbecaeb31d593
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-10-15 11:14:27 +08:00
Liang Chen
0543e06990 arm64: rockchip_defconfig: enable ENERGY_MODEL and CPU_FREQ_GOV_SCHEDUTIL
Change-Id: Id6205d8e81c0250ca486465c8236f4c54a0f14bf
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-10-15 11:14:18 +08:00