Commit Graph

607108 Commits

Author SHA1 Message Date
Tao Huang
921df26c80 f2fs: fix out-of-bounds read in update_free_nid_bitmap
test_bit will access with unsigned long, which cause this bug.
Workaround by enlarge free_nid_bitmap.

BUG: KASAN: slab-out-of-bounds in update_free_nid_bitmap+0x98/0x16c
Read of size 8 at addr ffffffc06275c9ff by task init/195

CPU: 3 PID: 195 Comm: init Not tainted 4.4.114 #55
Hardware name: Rockchip rk3326 evb board (DT)
Call trace:
 dump_backtrace+0x0/0x244
 show_stack+0x14/0x1c
 dump_stack+0xa4/0xcc
 print_address_description+0xa4/0x308
 kasan_report+0x258/0x29c
 __asan_load8+0x78/0x80
 update_free_nid_bitmap+0x98/0x16c
 build_node_manager+0x884/0x950
 f2fs_fill_super+0x14bc/0x1ca8
 mount_bdev+0x174/0x208
 f2fs_mount+0x14/0x1c
 mount_fs+0xbc/0x1b0
 vfs_kern_mount+0xbc/0x1c8
 do_mount+0xcf0/0xe68
 SyS_mount+0x94/0xe0
 el0_svc_naked+0x24/0x28

Change-Id: I9167447ded0a8c2da1b80cdc671615c9108c02be
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-23 11:47:45 +08:00
Shawn Lin
bc6e99f243 mmc: dw_mmc: Fix the CTO timeout overflow calculation for 32-bit systems
Just follow the convention of fixing for DTO timeout.

Change-Id: I753b5a6f2ab409e58c83a59212592f3b430b018a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-23 11:26:18 +08:00
Evgeniy Didin
9c8f6bbf41 FROMLIST: mmc: dw_mmc: Fix the DTO timeout overflow calculation for 32-bit systems
In commit 9d9491a7da ("mmc: dw_mmc: Fix the DTO timeout calculation")
have been made
changes which cause multiply overflow for 32-bit systems.
The broken timeout calculations caused false interrupt latency warnings
and stacktrace splat (such as below) when accessing the SD Card.

| Running :  4M-check-reassembly-tcp-cmykw2-rotatew2.out -v0 -w1
| -  Info: Finished target initialization.
| mmcblk0: error -110 transferring data, sector 320544, nr 2048, cmd
response
|  0x900, card status 0x0
| mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz,
actual
| 396825HZ div = 63)
| mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 25000000Hz,
actual
|  25000000HZ div = 1)
| ------------[ cut here ]------------
| softirq: huh, entered softirq 6 TASKLET 6f6a9412 with preempt_count
00000101,
| exited with 00000100?
| WARNING: CPU: 2 PID: 0 at ../lib/scatterlist.c:652
sg_miter_next+0x28/0x20c
| Modules linked in:
| CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.15.0 #57
|
| Stack Trace:
|  arc_unwind_core.constprop.1+0xd0/0xf4
|  dump_stack+0x68/0x80
|  warn_slowpath_null+0x4e/0xec
|  sg_miter_next+0x28/0x20c
|  dw_mci_read_data_pio+0x44/0x190
|  dw_mmc f000a000.mmc: Unexpected interrupt latency
|   dw_mci_interrupt+0x3ee/0x530
|  __handle_irq_event_percpu+0x56/0x150
|  handle_irq_event+0x34/0x78
|  handle_level_irq+0x8e/0x120
|  generic_handle_irq+0x1c/0x2c
|  idu_cascade_isr+0x30/0x6c
|  __handle_domain_irq+0x72/0xc8
|  ret_from_exception+0x0/0x8
|---[ end trace 2a58c9af6c25fe51 ]---

Lets cast this multiply to u64 type which prevents overflow.

Tested-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Fixes: 9d9491a7da ("mmc: dw_mmc: Fix the DTO timeout calculation")
Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com> # ARC STAR
9001306872 HSDK, sdio: board crashes when copying big files
Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
CC: Alexey Brodkin <abrodkin@synopsys.com>
CC: Eugeniy Paltsev <paltsev@synopsys.com>
CC: Douglas Anderson <dianders@chromium.org>
CC: Ulf Hansson <ulf.hansson@linaro.org>
CC: linux-kernel@vger.kernel.org
CC: linux-snps-arc@lists.infradead.org
Cc: <stable@vger.kernel.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ib7614b17116e53debe738787fc26a04beba5f388
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-23 11:25:08 +08:00
XiaoDong Huang
f64e967ae6 arm64: dts: rockchip: px30: adjust suspend voltage
1. adjust vdd_logic to 950000uV.
2. adjust vdd_arm to 950000uV.
3. set vdd_10 on.
4. set vcc3v0_pmu on.

Change-Id: I1af72ccbc615f6bdcb59f51ac6ea54e8c3bfe2af
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-02-22 16:28:36 +08:00
Wyon Bi
99cb28c225 arm64: dts: rockchip: allow to disable vcc3v3_lcd on px30-evb board
remove the 'regulator-always-on' property from vcc3v3_lcd

Change-Id: I056601ed575b993065c17d245195bd376808bbed
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-02-22 15:31:08 +08:00
Finley Xiao
14aba8d378 clk: rockchip: Fix cpu frequency overflowing
If change parent to alternate parent and the old parent clock speed is less
than the clock speed of the alternate parent, add dividers first and then
select alternate parent.

If change parent to primary parent, select primary parent first and then
remove dividers.

Change-Id: Ib82de9a936effe5c885639799f3bb5629dc89f8d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-22 15:30:40 +08:00
shengfei Xu
2c1c86dca0 power: rk817: fix the battery charging but dispaly soc not up
Change-Id: I3153dad46c959670f11dd91c7cbd687f4136c171
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-22 11:39:59 +08:00
Finley Xiao
73403cf5b2 clk: rockchip: px30: fix gpll enable_cnt and prepare_cnt error
The gpll clock has not yet been created when its children do enable and
prepare in cru critical talbe, so move its children into pmucru critical
talbe that the gpll clock has been created before its children do enable
and prepare.

Change-Id: If5243326bf1d3c926bb1bb12e56e4b9fc9282762
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-22 10:57:17 +08:00
Finley Xiao
fda77d7005 clk: rockchip: px30: Add clock id for aclk_bus_src and aclk_peri_src
Change-Id: I3467b4f799a6f5402eed3d20e4bd2c02ae30c92f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-22 10:55:21 +08:00
Finley Xiao
d9c3f985e4 arm64: dts: rockchip: px30: xin32k use the fixed clk
If xin32k use the rk808_clkout1, rk808 init is too late,
xin32k enable count and prepare count is not match with it's child clk.

Change-Id: Iec5d1f91b2289b18f41b4d915e6859154a5b7635
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 17:57:25 +08:00
Finley Xiao
0813f9a09a arm64: dts: rockchip: px30: Change clock id for gpu
Change-Id: I04ccacc3f60c7a1e4b0fa854680564963ec110fd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 17:34:58 +08:00
Finley Xiao
dd6270d4da clk: rockchip: px30: Fix gpu frequency overflowing
It needs to contains rate and mux clk for gpu composite clk, so that
the clk_composite_set_rate_and_parent function can be called.

Change-Id: I9818df2adbbcf40f616d2ca230cd83ea1ef2c14f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 17:34:57 +08:00
Finley Xiao
f09c78549e MALI: bifrost: support sharing regulator with other devices
If the regulator is shared between several devices then the lowest
request voltage that meets the system constraints will be used.

Change-Id: Icb6afcb571bddd6709d352dfad8fc2da80567bc0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 16:21:57 +08:00
Finley Xiao
6e0e7a80fa MALI: bifrost: Avoid GPU voltage domain keeping the initial voltage
If there is only one opp whose frequency is equal to the initial value
in opp table list, the GPU voltage domain will keep the initial voltage,
it may be too large.

Change-Id: If2ae1c876de185d810e05296b1b9e98855c3ef48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 16:21:48 +08:00
shengfei Xu
2fcb17dc99 regulator: rk808: rk809: the sw1 enable bit intercnvert with sw2
Change-Id: I240ac375005e0521c808c09b3f7f07e9899bda63
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-13 11:21:32 +08:00
Tao Huang
375c137b91 drivers/regulator/syr82x: fix compile warning
drivers/regulator/syr82x.c:451:3: warning: this if
clause does not guard... [-Wmisleading-indentation]

Change-Id: Ibdb1f6f903d1e0dece7b58aa3ec89d075e6d5b79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-13 10:29:31 +08:00
Tao Huang
0be7b88d66 drivers/input/touchscreen/cy8c_touchpad: fix compile warning
drivers/input/touchscreen/cy8c_touchpad.c:77:20: warning: xfer_msg[1].flags
is used uninitialized in this function [-Wuninitialized]

Change-Id: I2d1f199f098b38af92037e2ebbd63c05fc4a1f35
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-13 10:01:26 +08:00
Wen Nuan
2ae8d516c3 ARM: dts: rockchip: rk3288: Add dts mipi-dphy TXRX1 node for rk3288
Change-Id: I0b6122b2b34ae0f24f0d4a1111c1bbe6018cac4e
Signed-off-by: Wen Nuan <leo.wen@rock-chips.com>
2018-02-13 09:55:56 +08:00
Wen Nuan
ad46e68846 phy: rockchip: mipi-dphy-tx1rx1: add mipi-dphy TX1RX1 channel for RK3288
This patch adds the function of mipi-dphy TX1RX1 for RK3288, the
mipi-dphy TX1RX1 is matched when "txrx_base_addr" is valid.

Change-Id: I01640925157a7082e942188b29f6bbf1318cf3d5
Signed-off-by: Wen Nuan <leo.wen@rock-chips.com>
2018-02-13 09:39:36 +08:00
William Wu
67217a757a arm64: dts: rockchip: use spdifm2_tx for rk3328-evb-android
Change-Id: I6d13fb703deffccb87bc311733afb88c1c90bbdd
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-11 21:13:25 +08:00
Sugar Zhang
84c9e0030a arm64: configs: rockchip_defconfig: enable pdm interface
Change-Id: I3d6b75d3e08bf542e8b0da014fd4a6b263fac124
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-11 21:08:29 +08:00
Sugar Zhang
8b8065853a arm64: dts: rockchip: px30: fixup pdm pinctrl
Change-Id: I5a3978a486c63dae718b46be142eed263788e5f3
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-11 21:08:17 +08:00
Tao Huang
2e98315186 arm64: rockchip_defconfig: enable CONFIG_CRYPTO_CRC32_ARM64
Change-Id: I70e8ba303d5c3b0210912a31e3175425c1f1a63f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 20:56:13 +08:00
Tao Huang
d1c247b600 sound/soc/codecs/rt5651: fix compile warning
sound/soc/codecs/rt5651.c:351:14: warning: duplicate const
declaration specifier [-Wduplicate-decl-specifier]

Change-Id: I25ac1012398c7742c7b66d6a57f4956b96ba0aa4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 20:29:43 +08:00
Tao Huang
f1da8a190e sound/soc/codecs/rk817_codec: fix compile warning
sound/soc/codecs/rk817_codec.c:405:14: warning: duplicate const
declaration specifier [-Wduplicate-decl-specifier]

Change-Id: I572b1778f29a48b0756ac60488ce2311cc372f8b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 20:20:51 +08:00
Tao Huang
75df0e02ac ARM: rockchip_defconfig: bump CONFIG_ANDROID_VERSION to 0x08000000
Change-Id: Ia66100f8d828aa0ae3a7c3c66906c51d07548b92
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:23:00 +08:00
Tao Huang
4f33232979 Revert "Revert "ARM: rockchip_defconfig: enable CONFIG_IKCONFIG""
This reverts commit cbd1d90f72.

8588d88f1a ("ANDROID: android-base.cfg: add CONFIG_IKCONFIG option")

This adds CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC options, which are a
requirement for the O release.

Change-Id: I438ade881219034618afb4cd5174bf750a79d319
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:22:54 +08:00
Tao Huang
badf2c4918 arm64: rockchip_defconfig: bump CONFIG_ANDROID_VERSION to 0x08000000
Change-Id: Iafd493187f579ec4f5d202a496548f70be7a868a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:22:26 +08:00
Tao Huang
ea18c3d20d Revert "Revert "arm64: rockchip_defconfig: enable CONFIG_IKCONFIG""
This reverts commit 95bc3a8935.

8588d88f1a ("ANDROID: android-base.cfg: add CONFIG_IKCONFIG option")

This adds CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC options, which are a
requirement for the O release.

Change-Id: Id02fde91ed902f266ff5c81ec04e2427a2877847
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:22:10 +08:00
Tao Huang
aa349fbf38 ARM: rockchip_defconfig: remove CONFIG_ANDROID_LOW_MEMORY_KILLER
e8f5f841b764 ("remove CONFIG_ANDROID_LOW_MEMORY_KILLER requirement")

Kernel configuration options should include either
CONFIG_ANDROID_LOW_MEMORY_KILLER for in-kernel lowmemorykiller driver
to be used or a combination of CONFIG_MEMCG and CONFIG_MEMCG_SWAP
if userspace lmkd is preferred. It is not currently possible to express
this logical requirement in the config fragment so the
CONFIG_ANDROID_LOW_MEMORY_KILLER requirement is simply
removed for now.

Change-Id: I9cea0552a285ac635fc44f4b45762988e423d7db
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:21:55 +08:00
Tao Huang
7adc50bef2 arm64: rockchip_defconfig: remove CONFIG_ANDROID_LOW_MEMORY_KILLER
e8f5f841b764 ("remove CONFIG_ANDROID_LOW_MEMORY_KILLER requirement")

Kernel configuration options should include either
CONFIG_ANDROID_LOW_MEMORY_KILLER for in-kernel lowmemorykiller driver
to be used or a combination of CONFIG_MEMCG and CONFIG_MEMCG_SWAP
if userspace lmkd is preferred. It is not currently possible to express
this logical requirement in the config fragment so the
CONFIG_ANDROID_LOW_MEMORY_KILLER requirement is simply
removed for now.

Change-Id: I69b9682029a50f4579f3ba11e6a9a497c5a51c28
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:21:41 +08:00
Tao Huang
1dd2b51cdf net/wireless/rockchip_wlan: fix compile warning
Change-Id: Ife9d64914e2986a07a649064ee0141d83fea69e2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:21:16 +08:00
Zorro Liu
d55db1d3ba arm64: dts: rockchip: modify gsensor layout value of px30-evb-ddr3-v10 board
Change-Id: I7ecdf9db002e3754189e345e27efbb249146539b
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-11 19:18:00 +08:00
Zorro Liu
5db5490025 drivers: input: sensors: update accel sensor mma7660 driver
Change-Id: Id3cf0cf3a14a07010524d0de58dc523bfcb3b735
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-11 19:17:53 +08:00
Caesar Wang
2a8ce270ad arm64: dts: rockchip: remove the hdmi-cec pinctrl for rk3399 excavator
As the edp_hpd pinctrl is reused by hdmi-cec. So the rk3399 will hit the
pinctrl register failed on bootup.

Says: the failed log:
[0.927577] rockchip-pinctrl pinctrl: pin gpio4-23 already requested by
ff940000.hdmi; cannot claim for ff970000.edp
[0.928519 ] rockchip-pinctrl pinctrl: pin-151 (ff970000.edp) status -22
[0.929112] rockchip-pinctrl pinctrl: could not request pin 151
(gpio4-23) from group edp-hpd  on device rockchip-pinctr

That will cause the edp can't work on rk3399 SoCs.

Fixes: commit
6e4eaff822 ("arm64: dts: rockchip: add HDMI cec support for rk3399")

Change-Id: I8ba20db55025e33c082beda5160e0398f1681766
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-11 19:17:18 +08:00
Finley Xiao
093bfc848c clk: rockchip: rk3328: Fix clk_cif_src parent
Change-Id: I0ea209224880b8c51a385ed46827bb0d8f7dd219
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-11 19:15:16 +08:00
Finley Xiao
0cb664eb76 clk: rockchip: px30: Remove clk_gpu_divnp5
Change-Id: I67f47f5fdd7873c22b1349e3aeb80b7157c7844c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-11 19:12:19 +08:00
Finley Xiao
f457f16cd2 clk: rockchip: px30: Fix clk_gmac_rmii_sel parent
Change-Id: Idf1bd416a3879048afd3763d4a6d056c34171bbb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-11 19:10:15 +08:00
Sandy Huang
ce0ec8d27b drm/rockchip: vop: alpha_pre_mul mode depend on user space
Change-Id: Iaada438902ddddbbd00890c53a58cc49af3c3d3e
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-02-11 19:08:48 +08:00
Sandy Huang
424a08f4cb drm/rockchip: px30 vop: delete win2
Change-Id: If36214c7f57c96d7a06e81db383300cff0669681
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-02-11 14:58:38 +08:00
Finley Xiao
aed92d3f61 clk: rockchip: px30: Fix clk_i2s0_rx parent
Change-Id: Ia523234cf5b210bbfe51cbf075943e7f44123ca9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-11 12:08:25 +08:00
Zheng Yang
5f1c036a65 drm/bridge: synopsys: dw-hdmi: fix kernel logo flash when output YCbCr422 mode
On rockchip platform, hdmi input format is YCbCr444 when output mode
is YCbCr422. Then the value of HDMI_TX_INVID0 on YCbCr422 is same as
the value of YCbCr444, both is 0x09/0x0b. This make enc_out_bus_format
stroed in struct hdmi_data is wrong, which is MEDIA_BUS_FMT_YUV8_1X24
or MEDIA_BUS_FMT_YUV10_1X30.

When android set enc_out_bus_format to YCbCr422, dw_hdmi_setup will be
called and logo will flash.

This patch use colorspace restored in HDMI_FC_AVICONF0 to distinguish them.

Change-Id: I6b913951b58fb47628617c11d6059bc1be4e370a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-02-11 10:21:53 +08:00
Zhong Yichong
80f0ef45db arm64: dts: rockchip: rk3326 evb: enable isp
Change-Id: I0a41db448bbb51afcaa4b538cf0aefac25e7c762
Signed-off-by: Zhong Yichong <zyc@rock-chips.com>
2018-02-10 16:30:53 +08:00
Zhong Yichong
0bef3afae9 camera: rockchip: camsys_drv: disable cru reset of rk3326 isp now
Because it will cause CPU hangs on, so disable the reset temporarily.

Change-Id: I612be4b47145fd1ebf8d8e5d44270f26151768fa
Signed-off-by: Zhong Yichong <zyc@rock-chips.com>
2018-02-10 16:29:56 +08:00
Zhong Yichong
f943a72c35 arm64: dts: rockchip: px30: modify isp mipiphy count from 0 to 1
Change-Id: I878c8b6ee15885662c215b52143cd73474dd8cbf
Signed-off-by: Zhong Yichong <zyc@rock-chips.com>
2018-02-10 16:07:29 +08:00
Zhong Yichong
16bb8bd923 arm64: dts: rockchip: px30: modify the isp reg range
Change-Id: I3326908e0445c1230b73169b9d9b34a31658d0b2
Signed-off-by: Zhong Yichong <zyc@rock-chips.com>
2018-02-10 16:07:19 +08:00
shengfei Xu
69441faf9e mfd: rk808: rk809 chip name register is same as rk817
Change-Id: I22f5735ab3272a53d2e97012f452c340f16b0bff
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-10 14:58:46 +08:00
Rocky Hao
9b2724a451 thermal: rockchip: fix channal invertion issue for px30
Change-Id: Ifed5628c18cece0658754095e718da39ac703413
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-02-10 11:34:03 +08:00
Tao Huang
9b3f148373 ARM: rockchip_defconfig: enable CONFIG_MEMORY_STATE_TIME
f3d9c312b8 ("Implement memory_state_time, used by qcom,cpubw")

New driver memory_state_time tracks time spent in different DDR
frequency and bandwidth states.

Memory drivers such as qcom,cpubw can post updated state to the driver
after registering a callback. Processed by a workqueue

Bandwidth buckets are read in from device tree in the relevant qualcomm
section, can be defined in any quantity and spacing.

The data is exposed at /sys/kernel/memory_state_time, able to be read by
the Android framework.

Functionality is behind a config option CONFIG_MEMORY_STATE_TIME

Change-Id: Ic3b0b631efd697713360f193ede440cd9ad3bc29
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-10 10:34:38 +08:00
Tao Huang
319ff3657f arm64: rockchip_defconfig: enable CONFIG_MEMORY_STATE_TIME
f3d9c312b8 ("Implement memory_state_time, used by qcom,cpubw")

New driver memory_state_time tracks time spent in different DDR
frequency and bandwidth states.

Memory drivers such as qcom,cpubw can post updated state to the driver
after registering a callback. Processed by a workqueue

Bandwidth buckets are read in from device tree in the relevant qualcomm
section, can be defined in any quantity and spacing.

The data is exposed at /sys/kernel/memory_state_time, able to be read by
the Android framework.

Functionality is behind a config option CONFIG_MEMORY_STATE_TIME

Change-Id: I4391cc3ed42c9f332bce4a7809c6f120e2798dae
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-10 10:34:23 +08:00