In case devfreq->previous_freq is still uninitialized in
devfreq_update_status(), i.e. it has value '0', the lookups in
that function fail, eventually leading to some error message:
[ 3.041292] devfreq bus_dmc: Couldn't update frequency transition information.
Just skip the statup update in this situation.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit d0563a039c)
Change-Id: Ie5cb810ec30d816a234c9ad6160be120ee755d4d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
The Kconfig currently controlling compilation of this code is:
menuconfig PM_DEVFREQ
bool "Generic Dynamic Voltage and Frequency Scaling (DVFS) support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
This code wasn't using module_init, so we don't need to be concerned
with altering the initcall level here.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
We don't replace module.h with init.h since the file already has that.
But we do add export.h since this file does export some symbols.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 417dc4bb6b)
Change-Id: Ia691d91eaee8a04700d9c8e5c9340cc85175cd3a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Some systems need current frequency from last_status for calculation
but it is zeroed during initialization. When the device starts there is
no history, but we can assume that the last frequency was the
same as the initial frequency (which is also used in 'previous_freq').
The log shows the result of this misinterpreted value.
[ 2.042847] ... Failed to get voltage for frequency 0: -34
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 8d39fc085d)
Change-Id: I81f1addcd483df1d23f2cde0cf671494a37e64f3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
When device_register() returns with error, it has already
done put_device() on the input device pointer.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 67ffdb529b)
Change-Id: Id1398a975f208f1942d4b1b1503e5255379f41cc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
devm_kzalloc of devfreq's statistics data structure has been
using its parent device as the dev allocated for.
If a device's devfreq is disabled in run-time,
such allocated memory won't be freed.
Desginating more precisely with the devfreq device
pointer fixes the issue.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 3e1d7fb0d2)
Change-Id: I657d7d43e6b7e82cce1c57267ee81b0ab45c0965
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Before this patch for a device without statistics support,
$ cat trans_stat
From : To
: time(ms)
Total transitions : 0
$
After this patch applied for such a device,
$ cat trans_stat
Not Supported.
$
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 34bd322070)
Change-Id: Iae8a0e839cdd9b6d2e1c5c1332d85796b928f535
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This patch initialize the freq_table array of each devfreq device by using
the devfreq_set_freq_table(). If freq_table is NULL, the devfreq framework
is not able to support the frequency transtion information through sysfs.
The OPP core uses the integer type for the number of opps in the opp list
and uses the 'unsigned long' type for each frequency. So, this patch
modifies the type of some variable as following:
- the type of freq_table : unsigned int -> unsigned long
- the type of max_state : unsigned int -> int
- Corrected types, format strings, mutex usages by MyungJoo
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 0ec09ac2ce)
Conflicts:
drivers/staging/imgtec/rogue/pvr_dvfs_device.c
Change-Id: I245439d5aa572e914ee4821bdcdafec7ebcb5599
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
some frequency not fix VDD_CENTER to 0.9V, although these frequency not
enable, to prevent these frequency being enable, fix all VDD_CENTER to
0.9V
Change-Id: I711bf091962f1ca1508b2611bfcaf26e37e451fd
Signed-off-by: CanYang He <hcy@rock-chips.com>
On an eDP connection, the eDP sink must operate only in Enhanced Framing Mode.
The Source must send only Enhanced Framing on the main link, and must only
write a '0' to DPCD 00101h: LANE_COUNT_SET Bit 7: ENHANCED_FRAME_EN bit.
Independent of method used, DP1.2-compliant eDP Receivers shall indicate any
eDP protocol differentiation method they support through the Receiver
Capability Field of DPCD (DPCD:0000Dh).
Change-Id: Ia57f3242c16e2ace0c13076992c2c14eda9e7ca7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
This patch adds the related dts binding document for Rockchip NAND
controller v9.
Change-Id: I783cb1cd957907744812ace2179bb861e7ca4e63
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
The nand controller V9 driver for RK3326 and RKPX30.
Change-Id: Ife2190218c29f4ed33def72c092e1fe510c838d0
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
This patch adds the related dts binding document for Rockchip NAND
controller v6.
Change-Id: Ib2b196d723a29f8aad95f56905a954547bc93e91
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
The power supply for vccio_flash is depends on GPIO0_A4(pin R3 on SoCs),
if GPIO0_A4 input high, vccio_flash = 1.8v
if GPIO0_A4 input low, vccio_flash = 3.3v
Reference to rk_board_init() in arch/arm/mach-rockchip/rk3308/rk3308.c,
it has configure vccio3 io-domain, so here needn't to do more.
BUT lack of vccio3 will make regulator summary hard to read, it's better
to configure vccio3 = <&vccio_flash> after double check its voltage.
Change-Id: I5c17cba5ac184b84800df654544cc3f8fe8c2480
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This patch fixes the BT interrupt abnormal with bootup.
Change-Id: If4c5a8792d95cad4339e57219fd7a17dc8bc349f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
To match trunk code of preisp, change some message id.
Change-Id: I08dfc21cc65edefc296901633f3366a5f5241a92
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Power **vccio3** was fixed to VCC_IO that is always supply 3.3v, and
it's used as functions pins for sfc/nandc.
Change-Id: I0f5a60ab944a773c1dd254adf1dbc6af16b35403
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Power **vccio3** was fixed to VCC_IO that is always supply 3.3v, and
it's used as functions pins for sfc/nandc.
Change-Id: I928770f34ea30fe5bc6569219385d3dbf59c3db1
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This is because of the commit form upstream: commit 5ffa2aed38
("of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP")
Change-Id: I87d332caf5b3aaf3848b709c276ddb00db1327e0
Signed-off-by: Liang Chen <cl@rock-chips.com>
Some boards have SD card connectors where the power rail cannot be switched
off by the driver. However there are various circumstances when a card
might be re-initialized, such as after system resume, warm re-boot, or
error handling. However, a UHS card will continue to use 1.8V signaling
unless it is power cycled.
If the card has not been power cycled, it may still be using 1.8V
signaling. According to the SD spec., the Bus Speed Mode (function group 1)
bits 2 to 4 are zero if the card is initialized at 3.3V signal level. Thus
they can be used to determine if the card has already switched to 1.8V
signaling. Detect that situation and try to initialize a UHS-I (1.8V)
transfer mode.
Tested with the following cards:
Transcend 4GB High Speed
Kingston 64GB SDR104
Lexar by Micron HIGH-PERFORMANCE 300x 16GB DDR50
SanDisk Ultra 8GB DDR50
Transcend Ultimate 600x 16GB SDR104
Transcend Premium 300x 64GB SDR104
Lexar by Micron Professional 1000x 32GB UHS-II SDR104
SanDisk Extreme Pro 16GB SDR104
Change-Id: Iab33b1020f857ff754f3d00494ecee44c96e02b6
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Zhoujie Wu <zjwu@marvell.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 6a11fc47f1)
fix cts CaptureRequestTest#testEdgeModeControl failed
failed log:
Frame duration must be in the range of [33333333, 33333333],
value 33903000 is out of range [32833332, 33833332])
Change-Id: I054e3546736edcdba041c4a37cb9975ed3fa0870
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
PCIe spec requires max cfg space size is 4KB, and the hierarchy
of PCIe tree only support up to 256 devices. So the reserved
cfg space for RC is 1MB per spec.
If any callers access the cfg space out of range, the spec asks
PCIe RC kick back 0xffffffff. However, Rockchip RC will crash
if this happens. So the software should manually check the ECAM
size in PCIe accessors to workaround it.
Change-Id: If4d40add229f9c315eab6d99b290766695208daf
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
The ROM code for Rockchip platform never support detecting
SD 3.0 mode, so if the SD card contains system image running
into SD 3.0 mode in kernel, it will fails to reboot.
The problem is SD 3.0 mode is using 1.8V signal and could only
be switched back into 2.0 mode by power cycle. If the customed
board could not switch off its power rail, the ROM code can't
soft reset the SD.
Add mmc_sd_shutdown to workaround this special case and don't
bother normal SD cards used as external disk by checking the
RESTRICT_CARD_TYPE_MMC flag.
Change-Id: I4c3d3111c0bce0ad3cd4f0c6592ff595d7015afe
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
If the device has a 'power-domains' property that the power framework
prefer to use dev_pm_ops for suspend&resume. The legacy suspend & resume
callback for nandc driver would not be used.
Anyway, it's better use dev_pm_ops whether 'power-domains' is existent.
Change-Id: I0e2822a44f3f0d458b778636cd84c5ae54505cf5
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>