Axel Lin [Sun, 25 Sep 2016 12:13:57 +0000 (20:13 +0800)]
PM / devfreq: exynos-nocp: Select REGMAP_MMIO
This driver uses devm_regmap_init_mmio(), so select REGMAP_MMIO to avoid
build failure.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Krzysztof Kozlowski [Fri, 19 Aug 2016 06:36:55 +0000 (08:36 +0200)]
PM / devfreq: Add COMPILE_TEST for build coverage
The SoC-specific devfreq and devfreq-event drivers can be build tested
on all architectures.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Wei Yongjun [Fri, 8 Jul 2016 13:44:04 +0000 (13:44 +0000)]
PM / devfreq: exynos-ppmu: remove unneeded of_node_put()
for_each_child_of_node() performs an of_node_put() on each iteration, so
putting an of_node_put() before a continue results in a double put.
Generated by: scripts/coccinelle/iterators/device_node_continue.cocci
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Peter Chen [Fri, 1 Jul 2016 09:42:01 +0000 (17:42 +0800)]
PM / devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
[Commit updated to fix an error by MyungJoo]
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Peter Chen [Fri, 1 Jul 2016 09:42:00 +0000 (17:42 +0800)]
PM / devfreq: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Bartlomiej Zolnierkiewicz [Tue, 28 Jun 2016 11:21:08 +0000 (20:21 +0900)]
PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe()
iounmap() needs to be called in case of memory allocation
(for devfreq-event devices) failure. Fix it.
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Bartlomiej Zolnierkiewicz [Tue, 28 Jun 2016 11:21:09 +0000 (13:21 +0200)]
PM / devfreq: exynos: fix error path in exynos_bus_probe()
In case of exynos_bus_parse_of() failure the code shouldn't
try to remove the OPP table and disable+unprepare bus->clk
as it has been already handled in exynos_bus_parse_of().
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Paul Gortmaker [Sat, 25 Jun 2016 18:43:51 +0000 (03:43 +0900)]
PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU tristate
The Kconfig currently controlling compilation of this code is:
config DEVFREQ_EVENT_EXYNOS_PPMU
bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver"
...meaning that it currently is not being built as a module by anyone.
Rather than rip out the existing modular code, Chanwoo indicated
that he'd rather see the driver offered as tristate.
I don't have the hardware for runtime validation, so this change
is only validated for compile and modpost.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Paul Gortmaker [Sat, 25 Jun 2016 18:43:50 +0000 (14:43 -0400)]
PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP tristate
The Kconfig currently controlling compilation of this code is:
event/Kconfig:config DEVFREQ_EVENT_EXYNOS_NOCP
event/Kconfig: bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"
...meaning that it currently is not being built as a module by anyone.
Rather than rip out the existing modular code, Chanwoo indicated
that he'd rather see the driver offered as tristate.
I don't have the hardware for runtime validation, so this change
is only validated for compile and modpost.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Paul Gortmaker [Sat, 25 Jun 2016 18:43:49 +0000 (03:43 +0900)]
PM / devfreq: make exynos-bus ARM_EXYNOS_BUS_DEVFREQ tristate
The Kconfig currently controlling compilation of this code is:
devfreq/Kconfig:config ARM_EXYNOS_BUS_DEVFREQ
devfreq/Kconfig: bool "ARM EXYNOS Generic Memory Bus DEVFREQ Driver"
...meaning that it currently is not being built as a module by anyone.
Rather than rip out the existing modular code, Chanwoo indicated
that he'd rather see the driver offered as tristate.
I don't have the hardware for runtime validation, so this change
is only validated for compile and modpost.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Paul Gortmaker [Sat, 25 Jun 2016 18:43:48 +0000 (03:43 +0900)]
PM / devfreq: make devfreq-event explicitly non-modular
The Kconfig currently controlling compilation of this code is:
menuconfig PM_DEVFREQ_EVENT
bool "DEVFREQ-Event device 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 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.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Paul Gortmaker [Sat, 25 Jun 2016 18:43:47 +0000 (03:43 +0900)]
PM / devfreq: make devfreq explicitly non-modular
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>
Chanwoo Choi [Thu, 23 Jun 2016 02:18:43 +0000 (11:18 +0900)]
PM / devfreq: Send the DEVFREQ_POSTCHANGE notification when target() is failed
This patch sends the DEVFREQ_POSTCHANGE notification when
devfreq->profile->targer() is failed. The PRECHANGE/POSTCHANGE
should be paired.
Fixes:
0fe3a66410a3 (PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier)
Reported-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Lukasz Luba [Tue, 31 May 2016 10:25:09 +0000 (11:25 +0100)]
PM / devfreq: fix initialization of current frequency in last status
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>
Dan Carpenter [Thu, 26 May 2016 06:45:42 +0000 (09:45 +0300)]
PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check
Smatch complains because platform_get_resource() returns NULL on error
and not an error pointer so the check is wrong. Julia Lawall pointed
out that normally we don't check these, because devm_ioremap_resource()
has a check for NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 16 May 2016 02:41:57 +0000 (11:41 +0900)]
PM / devfreq: remove double put_device
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>
Cai Zhiyong [Sat, 14 May 2016 06:13:30 +0000 (14:13 +0800)]
PM / devfreq: fix double call put_device
1295 */
1296 void device_unregister(struct device *dev)
1297 {
1298 pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
1299 device_del(dev);
1300 put_device(dev);
1301 }
1302 EXPORT_SYMBOL_GPL(device_unregister);
1303
device_unregister is called put_device, there is no need to call
put_device(&devfreq->dev) again.
Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 2 Oct 2015 03:48:54 +0000 (12:48 +0900)]
PM / devfreq: fix duplicated kfree on devfreq pointer
device_unregister() calls kfree already.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 2 Oct 2015 03:39:23 +0000 (12:39 +0900)]
PM / devfreq: devm_kzalloc to have dev pointer more precisely
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>
MyungJoo Ham [Fri, 29 Apr 2016 07:13:03 +0000 (16:13 +0900)]
PM / devfreq: style/typo fixes
- Typo in comments fixed
- Unnecessary return statement removed
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Fri, 27 Nov 2015 04:03:59 +0000 (13:03 +0900)]
PM / devfreq: exynos: Add the detailed correlation for Exynos5422 bus
This patch adds the detailed corrleation between sub-blocks and power line
for Exynos5422.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Thu, 14 Apr 2016 05:37:12 +0000 (14:37 +0900)]
PM / devfreq: event: Find the instance of devfreq-event device by using phandle
This patch use the phandle to find the instance of devfreq-event device in
Device Tree when calling the devfreq_event_get_edev_by_phandle() because there
is two type devfreq-event devices as following:
First case, exynos-ppmu.c driver provides the maximum four event of each PPMU.
So, when getting the instance of devfreq-event device, using the unique name of
struct devfreq_event_desc.
Second case, exynos-nocp.c driver provide the only one event of each NoC Probe
device. So, when getting the instance of devfreq-event device, using the
phandle of each NoC probe device.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Thu, 7 Apr 2016 02:29:11 +0000 (11:29 +0900)]
PM / devfreq: event: Add new Exynos NoC probe driver
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. The packets that the Network
on Chip (NoC) probes detects are transported over the network infrastructure.
Exynos542x bus has multiple NoC probes to provide bandwidth information about
behavior of the SoC that you can use while analyzing system performance.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Mon, 23 Nov 2015 14:58:17 +0000 (23:58 +0900)]
PM / devfreq: exynos: Remove unused exynos4/5 busfreq driver
This patch removes the unused exynos4/5 busfreq driver. Instead,
generic exynos-bus frequency driver support the all Exynos SoCs.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Fri, 27 Nov 2015 03:55:23 +0000 (12:55 +0900)]
PM / devfreq: exynos: Add the detailed correlation between sub-blocks and power line
This patch adds the detailed correlation between sub-blocks and power line
for Exynos3250, Exynos4210 and Exynos4x12.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Mon, 23 Nov 2015 14:18:52 +0000 (23:18 +0900)]
PM / devfreq: exynos: Update documentation for bus devices using passive governor
This patch updates the documentation for passive bus devices and adds the
detailed example of Exynos3250.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Thu, 5 Nov 2015 09:29:27 +0000 (18:29 +0900)]
PM / devfreq: exynos: Add support of bus frequency of sub-blocks using passive governor
This patch adds the support of bus frequency feature for sub-blocks which share
the one power line. If each bus depends on the power line, each bus is not able
to change the voltage by oneself. To optimize the power-consumption on runtime,
some buses using the same power line should change the source clock and
regulator at the same time. So, this patch uses the passive governor to support
the bus frequency for all buses which sharing the one power line.
For example,
Exynos3250 include the two power line for AXI buses as following:
: VDD_MIF : MIF (Memory Interface) provide the DMC (Dynamic Memory Controller)
with the power (regulator).
: VDD_INT : INT (Internal) provide the various sub-blocks with the power
(regulator).
Each bus is included in as follwoing block. In the case of VDD_MIF, only DMC bus
use the power line. So, there is no any depencency between buese. But, in the
case of VDD_INT, various buses share the one power line of VDD_INT. We need to
make the depenency between buses. When using passive governor, there is no
problem to support the bus frequency as DVFS for all buses. One bus should be
operated as the parent bus device which gathering the current load of INT block
and then decides the new frequency with some governors except of passive
governor. After deciding the new frequency by the parent bus device, the rest
bus devices will change the each source clock according to new frequency of the
parent bus device.
- MIF (Memory Interface) block
: VDD_MIF |--- DMC
- INT (Internal) block
: VDD_INT |--- LEFTBUS (parent)
|--- PERIL
|--- MFC
|--- G3D
|--- RIGHTBUS
|--- FSYS
|--- LCD0
|--- PERIR
|--- ISP
|--- CAM
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[tjakobi: Reported debugfs error during booting and cw00.choi fix it.]
Reported-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Tue, 22 Mar 2016 04:44:03 +0000 (13:44 +0900)]
PM / devfreq: Add new passive governor
This patch adds the new passive governor for DEVFREQ framework. The following
governors are already present and used for DVFS (Dynamic Voltage and Frequency
Scaling) drivers. The following governors are independently used for one device
driver which don't give the influence to other device drviers and also don't
receive the effect from other device drivers.
- ondemand / performance / powersave / userspace
The passive governor depends on operation of parent driver with specific
governos extremely and is not able to decide the new frequency by oneself.
According to the decided new frequency of parent driver with governor,
the passive governor uses it to decide the appropriate frequency for own
device driver. The passive governor must need the following information
from device tree:
- the source clock and OPP tables
- the instance of parent device
For exameple,
there are one more devfreq device drivers which need to change their source
clock according to their utilization on runtime. But, they share the same
power line (e.g., regulator). So, specific device driver is operated as parent
with ondemand governor and then the rest device driver with passive governor
is influenced by parent device.
Suggested-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[tjakobi: Reported RCU locking issue and cw00.choi fix it]
Reported-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
[linux.amoon: Reported possible recursive locking and cw00.choi fix it]
Reported-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Tue, 26 Jan 2016 04:21:26 +0000 (13:21 +0900)]
PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier
This patch adds the new DEVFREQ_TRANSITION_NOTIFIER notifier to send
the notification when the frequency of device is changed.
This notifier has two state as following:
- DEVFREQ_PRECHANGE : Notify it before chaning the frequency of device
- DEVFREQ_POSTCHANGE : Notify it after changed the frequency of device
And this patch adds the resourced-managed function to release the resource
automatically when error happen.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Tue, 10 Nov 2015 11:31:07 +0000 (20:31 +0900)]
PM / devfreq: Add devfreq_get_devfreq_by_phandle()
This patch adds the new devfreq_get_devfreq_by_phandle() OF helper function
which can find the instance of devfreq device by using phandle ("devfreq").
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
[m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Chanwoo Choi [Wed, 4 Nov 2015 01:52:45 +0000 (10:52 +0900)]
PM / devfreq: exynos: Add documentation for generic exynos bus frequency driver
This patch adds the documentation for generic exynos bus frequency
driver.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Tue, 3 Nov 2015 10:04:16 +0000 (19:04 +0900)]
PM / devfreq: exynos: Add generic exynos bus frequency driver
This patch adds the generic exynos bus frequency driver for AMBA AXI bus
of sub-blocks in exynos SoC with DEVFREQ framework. The Samsung Exynos SoC
have the common architecture for bus between DRAM and sub-blocks in SoC.
This driver can support the generic bus frequency driver for Exynos SoCs.
In devicetree, Each bus block has a bus clock, regulator, operation-point
and devfreq-event devices which measure the utilization of each bus block.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Geert Uytterhoeven [Mon, 14 Mar 2016 15:29:02 +0000 (16:29 +0100)]
PM / devfreq: Spelling s/frequnecy/frequency/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
MyungJoo Ham [Mon, 23 Nov 2015 06:45:36 +0000 (15:45 +0900)]
PM / devfreq: Do not show statistics if it's not ready.
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>
Chanwoo Choi [Thu, 19 Nov 2015 07:28:46 +0000 (16:28 +0900)]
PM / devfreq: Modify the indentation of trans_stat sysfs for readability
This patch modifies the indentation of 'trans_stat' sysfs to improve readability.
The 1GHz is 1000,000,000. So it needs the least 10 position to show the GHz unit.
- Before apply this patch,
-sh-3.2# cat trans_stat
From : To
:50000000100000000133000000200000000400000000 time(ms)
*
50000000: 0 0 0 0 7 1817635
100000000: 4 0 0 0 4 1590
133000000: 1 4 0 0 7 975
200000000: 2 2 7 0 1 2655
400000000: 0 2 5 12 0 1860
Total transition : 58
- After apply this patch,
-sh-3.2# cat trans_stat
From : To
:
50000000 100000000 133000000 200000000 400000000 time(ms)
*
50000000: 0 0 0 0 7 14405
100000000: 4 0 0 0 3 2015
133000000: 2 3 0 0 7 1020
200000000: 1 2 7 0 0 2970
400000000: 0 2 5 10 0 1575
Total transition : 53
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Wed, 18 Nov 2015 05:49:02 +0000 (14:49 +0900)]
PM / devfreq: Set the freq_table of devfreq device
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>
Chanwoo Choi [Fri, 13 Nov 2015 10:25:28 +0000 (19:25 +0900)]
PM / devfreq: Add show_one macro to delete the duplicate code
This patch adds the 'show_one' macro to simplify the duplicate code
of both max_freq_show() and min_freq_show().
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Thu, 19 Nov 2015 08:03:44 +0000 (17:03 +0900)]
PM / devfreq: event: Fix the error and warning from script/checkpatch.pl
This patch just fixes following error and warning by using
scripts/checkpatch.pl.
- Follwoing issue from checkpatch.pl:
ERROR: space prohibited before that close parenthesis ')'
+ if (count < 0 ) {
WARNING: line over 80 characters
+ ptr = devres_alloc(devm_devfreq_event_release, sizeof(*ptr), GFP_KERNEL);
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Tue, 17 Nov 2015 05:25:06 +0000 (14:25 +0900)]
PM / devfreq: event: Remove the error log of devfreq_event_get_edev_by_phandle()
This patch just removes the error log when
devfreq_event_get_edev_by_phandle() fail to get the instance of
devfreq-event device. It is related to sequence of the probe() of each
driver. So, this error log might show the always during kernel booting.
Each driver using this function can show the appropriate error log.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Geliang Tang [Thu, 1 Oct 2015 14:18:19 +0000 (22:18 +0800)]
PM / devfreq: fix double kfree
When device_register() fails, kfree(devfreq) is called already in
devfreq_dev_release(), hence there is no need to call kfree(devfreq)
in err_dev again.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Tobias Jakobi [Mon, 21 Sep 2015 18:23:52 +0000 (20:23 +0200)]
PM / devfreq: Fix governor_store()
Writing the currently set governor into sysfs currently
seems to fail.
Fix this by setting the return code to zero before
leaving governor_store().
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Xiaolong Ye [Fri, 11 Sep 2015 03:05:23 +0000 (11:05 +0800)]
PM / devfreq: Fix incorrect type issue.
time_in_state in struct devfreq is defined as unsigned long, so
devm_kzalloc should use sizeof(unsigned long) as argument instead
of sizeof(unsigned int), otherwise it will cause unexpected result
in 64bit system.
Signed-off-by: Xiaolong Ye <yexl@marvell.com>
Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 18 Aug 2015 04:45:49 +0000 (13:45 +0900)]
PM / devfreq: comments for get_dev_status usage updated
With the introduction of devfreq_update_stats(), governors
are not recommended to use get_dev_status() directly.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
[jy0922.shim: apply mainline patch]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Javi Merino [Fri, 14 Aug 2015 17:57:00 +0000 (18:57 +0100)]
PM / devfreq: drop comment about thermal setting max_freq
The thermal infrastructure should use the devfreq cooling device, which
uses the OPP library to disable OPPs as necessary.
Fix a couple of typos in the same comment while we are at it.
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Javi Merino [Fri, 14 Aug 2015 17:56:56 +0000 (18:56 +0100)]
PM / devfreq: cache the last call to get_dev_status()
The return value of get_dev_status() can be reused. Cache it so that
other parts of the kernel can reuse it instead of having to call the
same function again.
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Viresh Kumar [Mon, 10 Aug 2015 06:12:25 +0000 (11:42 +0530)]
PM / devfreq: Drop unlikely before IS_ERR(_OR_NULL)
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Chanwoo Choi [Wed, 9 Aug 2017 02:48:33 +0000 (11:48 +0900)]
Revert "PM / devfreq: exynos: Add documentation for generic exynos memory bus frequency driver"
This reverts commit
2dea71417b1b164cd8f4a4e8b8cbcfd1e2d50b3d.
Chanwoo Choi [Tue, 8 Aug 2017 08:17:04 +0000 (17:17 +0900)]
Revert "PM / devfreq: exynos: Add generic exynos memory bus frequency driver"
This reverts commit
81e71993f7d397915a664706f9e84e61b4c43c76.
Chanwoo Choi [Tue, 8 Aug 2017 08:16:55 +0000 (17:16 +0900)]
Revert "PM / devfreq: exynos: Remove unused exynos4 memory busfreq driver"
This reverts commit
c77ebcc61f5b84ddba67898bf7c1c491fcce9221.
Chanwoo Choi [Tue, 8 Aug 2017 07:54:15 +0000 (16:54 +0900)]
Revert "PM / devfreq: cache the last call to get_dev_status()"
This reverts commit
f97b42f9e6fd63101ded5bb5c4d37cce59920ff5.
Chanwoo Choi [Tue, 8 Aug 2017 07:54:05 +0000 (16:54 +0900)]
Revert "PM / devfreq: comments for get_dev_status usage updated"
This reverts commit
9b75a7414e3cf606b15b1c67c5ad486af73bcf30.
Denis Khalikov [Fri, 25 Aug 2017 13:11:14 +0000 (16:11 +0300)]
packaging: Disable UBSan build
UBSan build on kernel will cause build error because kernel has its own
sanitizer build options. So, dislable UBSan build from packaging spec.
Change-Id: Ie06197677c9949eb8ed9537af6fc366d20d3a000
Signed-off-by: Denis Khalikov <d.khalikov@partner.samsung.com>
Sylwester Nawrocki [Mon, 21 Aug 2017 16:19:50 +0000 (18:19 +0200)]
fimc-is: Remove BUG() from fimc_is_itf_s_param()
The condition being tested for that BUG() invocation is often
recoverable, so replace BUG() with a WARN_ON() and return EINVAL.
This prevents specific user space call sequences crashing the kernel,
which should never happen.
The callers of fimc_is_itf_s_param() function will be updated in
subsequent patches if necessary, to prevent any further possible
crashes.
Change-Id: I90a08278baa0cee85a4a69fa1b278e28e5c6764a
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Sylwester Nawrocki [Mon, 21 Aug 2017 11:29:21 +0000 (13:29 +0200)]
fimc-is: Remove F/W log dump at ISP video node close
The fimc_is_hw_logdump() call was added for debug purpose,
it slows down the camera close sequence by few seconds
so remove that function call.
Change-Id: If0ce3ab16550130be9233c8a5aae4e5874065247
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Hoegeun Kwon [Mon, 21 Aug 2017 01:08:53 +0000 (10:08 +0900)]
drm/exynos/gsc: Fix check pos size and allocated memory size
It will not allow to use various resolutions if we allow to use only
resolution with multiple of 16.
Therefore the pos size changed by a multiple of 16 is compared with
the allocated memory without error handling for multiples of resolution.
Change-Id: I6ce5f059baa23dd06b56ecf780261fad349e2314
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Hoegeun Kwon [Mon, 21 Aug 2017 01:06:34 +0000 (10:06 +0900)]
drm/exynos/gsc: Fix the multiple of resolution to 16
There is a problem that multiples of 4, 8 are considered only for
certain format. Change to a multiple of 16 to accommodate all formats.
Change-Id: I56a664ea85bc136ad424dfb40e29d20e4225c481
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Hoegeun Kwon [Fri, 18 Aug 2017 04:28:52 +0000 (13:28 +0900)]
drm/exynos/gsc: Fix check multiples of source resolution
The destination resolution is not related to multiples of 4, 8.
Therefore check only the source resolution.
Change-Id: I1fca3718ccd176522e6016f0efe08a00a55975aa
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Alexander Aksenov [Thu, 27 Jul 2017 12:51:55 +0000 (15:51 +0300)]
packaging: Add kernel devel package to odroid spec
Add kernel devel package to odroid spec to build out-of-tree kernel
modules.
Change-Id: I2e28ee5b6bec342b0d1d5c3e3409ff1f4aac8c7a
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Jaechul Lee [Thu, 10 Aug 2017 02:03:58 +0000 (11:03 +0900)]
packaging: Remove symbolic link in a devel package
The symbolic link to kernel-devel-tizen-dev doesn't need anymore because
those who want to build SWAP-DA will use the absolute package name for
building respectively on the several kernels.
The out-of-tree kernel module build uses absolute devel package name to
bulid SWAP-DA. It should be left out to prevent a conflict between
each kernel devel packages.
Change-Id: I5eb1182500c1f9201420b958b1ad0617ec167f04
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Chanwoo Choi [Thu, 10 Aug 2017 05:33:47 +0000 (14:33 +0900)]
sensors: brcm: Remove wake_lock to fix the suspend issue
Even if TM2 doesn't use the wake_lock feature, the brcm sensor
drivers used the wake_lock and the the count of GPS interrupt
of brcm sensor is too much. The too much interrupt causes the
pending of reading the 'sys/power/wakeup_count' and then failed
to enter the suspend state by user-process.
This patch removes the wake_lock code to fix the suspend issue.
Change-Id: Ibd161a7a53adc4398f145e482a90efa35febbdb6
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Hoegeun Kwon [Thu, 20 Jul 2017 04:25:49 +0000 (13:25 +0900)]
drm/exynos/gsc: Add resolution check and error handling
If the gscaler device tries to rotate the screen with a resolution
other than a multiple of 4 and 8, a kernel panic [1] occurs because of
referring unallocated memory areas. The cause of this problem is that
multiples of the resolution must be a multiple of 4, 8 each
horizontally and vertically. It is related to the hardware limit of
gscaler.
Add error handling to check that each horizontal and vertical
resolution is not a multiple of 4 and 8.
[1]
BUG: failure at drivers/iommu/exynos-iommu.c:425/exynos_sysmmu_irq()!
Kernel panic - not syncing: BUG!
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.36-00004-gfbfeb5b-dirty #215
Hardware name: Samsung TM2 board (DT)
Call trace:
[<
ffffffc00008a008>] dump_backtrace+0x0/0x12c
[<
ffffffc00008a148>] show_stack+0x14/0x1c
[<
ffffffc000a5c818>] dump_stack+0x84/0xa8
[<
ffffffc000a589d4>] panic+0xf0/0x234
[<
ffffffc00045c4c0>] exynos_sysmmu_irq+0x68/0x78
[<
ffffffc0000e8ab4>] handle_irq_event_percpu+0x78/0x290
[<
ffffffc0000e8d18>] handle_irq_event+0x4c/0x78
[<
ffffffc0000eb9c0>] handle_fasteoi_irq+0xe4/0x198
[<
ffffffc0000e8050>] generic_handle_irq+0x34/0x4c
[<
ffffffc0000e83a4>] __handle_domain_irq+0x88/0xf0
[<
ffffffc000082418>] gic_handle_irq+0x34/0x84
Exception stack(0xffffffc001097da0 to 0xffffffc001097ed0)
7da0:
010a1000 ffffffc0 00000000 00000080 01097ef0 ffffffc0 00086974 ffffffc0
7dc0:
00000000 00000000 01097f00 ffffffc0 00000001 00000000 00000000 00000000
7de0:
00000000 00000000 98e93c98 ffffffc0 6abd3580 00000018 99087c98 ffffffc0
7e00:
010af230 ffffffc0 01097e40 ffffffc0 ffffb3a1 00000000 00a72988 ffffffc0
7e20:
f1efd6f4 00000000 f1efd708 00000000 f1efe290 00000000 00000000 00000000
7e40:
0010cfa0 ffffffc0 00000000 00000000 00000000 00000000 010a1000 ffffffc0
7e60:
0122a000 ffffffc0 00a71000 ffffffc0 00000000 00000000 00000000 00000000
7e80:
010891b0 ffffffc0 0108a740 ffffffc0 01083be0 ffffffc0 00f54000 ffffffc0
7ea0:
00000000 00000000 01097ef0 ffffffc0 00086970 ffffffc0 01097ef0 ffffffc0
7ec0:
00086974 ffffffc0 60000145 00000000
[<
ffffffc000085700>] el1_irq+0x80/0xf8
[<
ffffffc0000d9d50>] cpu_startup_entry+0x290/0x458
[<
ffffffc000a5702c>] rest_init+0x84/0x8c
[<
ffffffc000fe9984>] start_kernel+0x398/0x3ac
Change-Id: I5e81a5217a0eaa12e8645cbe4fe118661decc037
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Marek Szyprowski [Wed, 9 Aug 2017 00:38:47 +0000 (09:38 +0900)]
clk: samsung: exynos5433: Correct typos in SoC name
This patch fixes simple typos in Exynos5433 clocks driver. The SoC name
was referred a few times as '5443' instead of '5433'.
Change-Id: Ie0507e195a323b134af0cb0c775637755b128df7
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
[cw00.choi: Apply mainline patch as backporting]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Marek Szyprowski [Thu, 26 Jan 2017 12:37:53 +0000 (13:37 +0100)]
clk: samsung: exynos5433: Add data for 250MHz and 278MHz PLL rates
Default clock configuration applied by the bootloader for TM2 and TM2e
boards includes 250MHz and 278MHz rate for DISP PLL clock. To ensure
such configuration for those boards with 'assigned-clock-*' properties,
parameters for those two additional rates are needed.
Change-Id: I637f105f7141bb5854f1f78cacc215eb7c447621
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[cw00.choi: Apply mainline patch as backporting]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Marek Szyprowski [Wed, 9 Aug 2017 00:36:41 +0000 (09:36 +0900)]
clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks
Add missing identifiers for phyclk_mipidphy0_bitclkdiv8_phy and
phyclk_mipidphy0_rxclkesc0_phy clocks. Access to those clocks is needed
to setup initial clock configuration for display subsystem in device tree
in order to avoid dependency on the configuration left by the bootloader.
Change-Id: I808ec0e89d38e55e6ca5839bf365dce7b694af27
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[cw00.choi: Apply mainline patch as backporting]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 8 Dec 2016 04:58:07 +0000 (13:58 +0900)]
clk: samsung: exynos5433: Set NoC (Network On Chip) clocks as critical
The ACLK_BUS0/1/2 are used for NoC (Network on Chip). If NoC's clocks are
disabled, the system halt happens. Following clocks must be always enabled:
- CLK_ACLK_BUS0_400 : NoC's bus clock for PERIC/PERIS/FSYS/MSCL,
- CLK_ACLK_BUS1_400 : NoC's bus clock for MFC/HEVC/G3D,
- CLK_ACLK_BUS2_400 : NoC's bus clock for GSCL/DISP/G2D/CAM0/CAM1/ISP.
This patch also adds the CLK_SET_RATE_PARENT flag to the CLK_SCLK_JPEG_MSCL
because this clock should be used for bus frequency scaling. This clock need
to be changed on the fly with CLK_SET_RATE_PARENT flag.
Change-Id: I37661bb8c4d8c36d96464df6eeb2927be1065a2a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[cw00.choi: Apply mainline patch as backporting]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Marek Szyprowski [Fri, 18 Nov 2016 10:04:18 +0000 (11:04 +0100)]
clk: exynos5433: Mark some clocks as critical
Some parent clocks of the Exynos5433 CMUs must be always enabled to access
any register in the given CMU or devices connected to it. For the time
being, until a proper solution based on runtime PM is applied, mark those
clocks as critical (instead of ignore unused) to prevent disabling them.
Change-Id: Icf0955a6a357acd90865512d326da04974ba9ed9
Reported-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[cw00.choi: Apply mainline patch as backporting]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Marek Szyprowski [Thu, 17 Nov 2016 11:42:52 +0000 (12:42 +0100)]
clk: exynos5433: Fix parent clocks for FSYS block
The proper parent clock for FSYS block is "aclk_fsys_200"
according to the Exynos5433 reference manual.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
[cw00.choi: Apply mainline patch as backporting]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Change-Id: I02f8fad8004de987d0f85fae6269af0a7b71225a
Lee Jones [Wed, 9 Aug 2017 00:50:03 +0000 (09:50 +0900)]
clk: WARN_ON about to disable a critical clock
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/
1455225554-13267-3-git-send-email-mturquette@baylibre.com
[cw00.choi: Fix the merge conflict and apply mainline patch]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Change-Id: Ibf56e2d41935224629097b50c7856e19349c82ad
Lee Jones [Wed, 9 Aug 2017 00:47:55 +0000 (09:47 +0900)]
clk: Allow clocks to be marked as CRITICAL
Critical clocks are those which must not be gated, else undefined
or catastrophic failure would occur. Here we have chosen to
ensure the prepare/enable counts are correctly incremented, so as
not to confuse users with enabled clocks with no visible users.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/
1455225554-13267-2-git-send-email-mturquette@baylibre.com
[cw00.choi: Fix the merge conflict and apply the mainline patch]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Change-Id: Ic4ec2959426dc4a424bf71bdc6b725dd9022616c
Dongwoo Lee [Fri, 14 Apr 2017 03:36:30 +0000 (12:36 +0900)]
Revert "Revert "usb: core: lpm: set lpm_capable for root hub device""
This reverts commit '
dc463ecea9d0 ("Revert "usb: core: lpm: set lpm_capable
for root hub device"")'
The original commit was reverted because it makes the USB port is not
working on Odroid-XU4. But now PHY tuning resolves this problem, so it
will be restored.
Change-Id: I59cdd3a6bf2f0fce06dce88a4f7844a82ed1eab5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Dongwoo Lee [Tue, 11 Apr 2017 05:32:44 +0000 (14:32 +0900)]
usb: host: xhci-plat: Tune PHY after xhci reset
It tunes PHY to enable USB 3.0 super-speed mode.
Since xhci reset clears PHY CR port settings, PHY should be re-tuned
after xhci reset completes.
Change-Id: I1ab574c592d1a64b2735773b387687997647d89a
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Dongwoo Lee [Wed, 22 Mar 2017 04:54:50 +0000 (13:54 +0900)]
phy: exynos5-usbdrd: Add USB 3.0 super-speed mode tune
It implements PHY tune operation to activate USB 3.0 super-speed mode.
Change-Id: I56971effacc2d3383b1fc55c2e73f76f54d603a0
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Dongwoo Lee [Fri, 7 Apr 2017 06:22:18 +0000 (15:22 +0900)]
phy: core: Add PHY tune operation
PHY framework currently provides phy_init to set initial state of
registers, powers and clocks but it is always called before xhci is
probed. However, some PHYs might need to adjust their configuration
during its operation because of h/w characteristics (or problem).
To resolve this problem, it provides tune operation to generic PHY
framework.
Change-Id: I74b0104d6ecada8c4274036c69497b9368e7f38a
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Wook Song [Wed, 28 Jun 2017 08:57:08 +0000 (17:57 +0900)]
arm64: dts: exynos5433: Enable exynos-avs on the tm2 and tm2e boards
This patch adds the exynos-avs device nodes to the exynos5433-tm2 and
exynos5433-tm2e board dts files. The vdd-supply property required by
each exynos-avs device is also added to the corresponding device node.
Change-Id: Ia4ae2bd0624bb97d98157820fdae93bf4dace6a0
Signed-off-by: Wook Song <wook16.song@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Wook Song [Wed, 28 Jun 2017 06:18:06 +0000 (15:18 +0900)]
arm64: dts: exynos5433: Add exynos-avs device node
This patch adds exynos AVS device tree node for Exynos5433. Since the
AVS device driver for Exynos5433 requries the phandle of the syscon node
for chipid register set, this patch also adds the "syscon" compatible
property to the exynos-chipid binding node.
Change-Id: Icef5aba65fac3864553ebdac233181015bb2f393
Signed-off-by: Wook Song <wook16.song@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Wook Song [Tue, 24 Jan 2017 08:10:54 +0000 (17:10 +0900)]
PM / AVS: exynos-avs: Add Adaptive Voltage Scaling (AVS) device driver
In Exynos SoC, Adaptive Supply Voltage (ASV) is a technique, which
provides sets of voltage values optimized to the SoC revision variations
for given operating frequencies of devices such as CPU, GPU, and BUS.
For each given operating frequency of the device, there is an ASV group
number, which indicates the SoC revision variaion. By using the ASV
group number, it is possible to identify which one is the most suitable
set of voltages. In general, the ASV group numbers are decided at the
manufactoring time and we can get these numbers by reading specific
memory addresses mapped to a special read-only region.
This patch adds a dt-based common device driver for ASV support in
Exynos SoC. Since the ASV technique can be also viewed as a Adaptive
Voltage Scaling (AVS) feature, we let this device driver be included in
drivers/power/avs directory. This common device driver supports basic
operations to read the ASV group number and replace the OPP table of the
device with the optimized one by using the ASV group number.
In the current version of the AVS common device driver, instead of
supporting all the resource types, CPU-related resource types are
supported. It will be extended to support other types of resources such
as GPU and BUS.
For the specific SoC support by using this common device driver, this
patch also adds a device driver for Exynos5433 SoC. In the case of
Exynos5433 SoC, there are four vesions of the OPP tables for each
resource. Since each OPP table contains 16 sets of voltages for 16 ASV
groups, 64 sets of operating points are required to only support the
Little cluster. Therefore, in the current implementation, this
Exynos5433-specific device driver only supports the optimized OPP table
for the ASV group number of 8 in version 2 of the OPP table (which is
the latest version). It will be also extended to supprot all of the 16
ASV groups in the OPP table version 2 soon.
Change-Id: Ie4d7e810a42c1cbcad7c6af9a77cce0964e104bb
Signed-off-by: Wook Song <wook16.song@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Wook Song [Tue, 24 Jan 2017 07:47:16 +0000 (16:47 +0900)]
PM / AVS: exynos-avs: Add binding document for exynos-avs
This patch adds a device tree binding document describing the exynos AVS
device driver.
Change-Id: I6f40e5ee9d9c796f3318dbfd71448c63f9467f8e
Signed-off-by: Wook Song <wook16.song@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Seung-Woo Kim [Mon, 10 Jul 2017 10:33:46 +0000 (19:33 +0900)]
local/net: bcm4358: fix misleading-indentation build warning
This patch fixes following build warning caused by wrong indent:
drivers/net/wireless/bcmdhd4358/wl_cfg80211.c: In function 'wl_cfg80211_mgmt_tx':
drivers/net/wireless/bcmdhd4358/wl_cfg80211.c:6345:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if ((dev == bcmcfg_to_prmry_ndev(cfg)) && cfg->p2p)
^~
drivers/net/wireless/bcmdhd4358/wl_cfg80211.c:6347:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
wl_cfgp2p_set_management_ie(cfg, dev, bssidx,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I6ab0087a11b9a1a2be05211ba0ef751ff8f564b7
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Mon, 10 Jul 2017 10:26:32 +0000 (19:26 +0900)]
sched: hmp: fix misleading-indentation build warning
This patch fixes following build warning caused by wrong indent:
kernel/sched/fair.c: In function 'move_specific_task':
kernel/sched/fair.c:9074:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (throttled_lb_pair(task_group(p), env->src_rq->cpu,
^~
kernel/sched/fair.c:9078:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (!hmp_can_migrate_task(p, env))
^~
Change-Id: Ibaad680588b9b6b7f1ba6fec3ec1422963268d7a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Hoegeun Kwon [Fri, 7 Apr 2017 06:11:14 +0000 (15:11 +0900)]
drm/exynos/gsc: Add rotation hardware limits of gscaler
The gscaler has hardware rotation limits that need to be imported from
dts. Parse them and add them to the property list.
The rotation hardware limits are related to the cropped source size.
When swap occurs, use rot_max size instead of crop_max size.
Also the scaling limits are related to post size, use pos size to
check the limits.
Change-Id: I081568c20ac5b30e5decd76498b39bacf29829b6
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Hoegeun Kwon [Fri, 7 Apr 2017 06:27:56 +0000 (15:27 +0900)]
arm64: dts: exynos: Add the hardware rotation limits for gsc
The gscaler has maximum size of input or output rotation. Add the
hardware limits property for the gscaler rotation in the exynos5433
dts.
Change-Id: Ifb1109d635e5a6993f29803ac04636e84120e0b7
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Hoegeun Kwon [Fri, 7 Apr 2017 06:28:18 +0000 (15:28 +0900)]
ARM: dts: exynos: Add the hardware rotation limits for gsc
The gscaler has maximum size of input or output rotation. Add the
hardware limits property for the gscaler rotation in the exynos5250
and exynos5420 dts.
Change-Id: Ia37f7c7334bad31ca8f96d0c57cab54dd2e1cbfd
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Seung-Woo Kim [Tue, 4 Jul 2017 01:11:09 +0000 (10:11 +0900)]
packaging: fix baselibs not to include aarch64 header package
The armv7l repo already has kernel-headers for tm2 board, so
repackaging with baselibs is not required for the package, and
this patch fixes baselibs not to include aarch64 header package
for armv7l.
Change-Id: I43fbd1fd0e4f984b35b51aacfcf614d959b0c163
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Hoegeun Kwon [Fri, 30 Jun 2017 06:00:36 +0000 (15:00 +0900)]
drm/panel: s6e3ha2: Remove unnecessary error handling and func
Remove the callback function(s6e3ha2_get_brightness) because it
supports get brightness in the backlight framework.
And also backlight framework of mainline already checks
whether the brightness value is valid or not so it removes
the relevant code from panel driver.
Change-Id: Ia27c10e317289440ef1818ad8b48d1413f32ff36
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Jaechul Lee [Thu, 22 Jun 2017 02:03:27 +0000 (11:03 +0900)]
ASoC: samsung: i2s: Supported high resolution rates
This driver can support more frequencies over 96KHz. There are no reasons to
limit the frequency range below 96KHz. If codecs/amps or something else can't
support high resolution rate, the constraints would be set rates properly
because each drivers has its own limits.
This patch was tested with 192KHz audio stream on exynos5433
Change-Id: I35233199f1b1ee10239793780e9bb14fdc590aca
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Seung-Woo Kim [Fri, 23 Jun 2017 09:45:42 +0000 (18:45 +0900)]
ARM: tizen_{odroid,tm2}_defconfig: fix maximum ram block device size
Tizen platform needs to support 12MiB ram bloack device, so this
patch fixes maximum ram block device size as 12MiB.
Change-Id: Iaedb2d4f949166cfb43b71bc7d2202c3b6b40cb6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seungyoun Ju [Fri, 30 Jun 2017 02:46:53 +0000 (11:46 +0900)]
Bluetooth: Fix enhance audio streaming chopping issue
If BT controller's buffer is occupied by another profile such as
OPP or SPP, and it is blocked due to RF condition, A2DP packets
couldn't be sent properly. It causes the A2DP chopping issue.
It is because HCI buffer is limited but another tx requests
occupy it and audio sreaming packet delay is occurred. So this
patch reserves some HCI buffer for A2DP to guarantee A2DP QoS
better.
Change-Id: I7f423f885ef6b7b0a56880d259fd7cd47ce60213
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Seung-Woo Kim [Tue, 18 Apr 2017 01:15:12 +0000 (10:15 +0900)]
usb: gadget: slp: fix to use arm system_serial if no dmi serial
From ARM system, system_serial is identical serial number. So, this
patch fixes to use arm system_serial as serial of lagacy slp usb
gadget instead of fixed serial if there is no dmi serial value.
Change-Id: Ie28c6c3d2afc54fc1ea54d3eb67100d3ed27165d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 19 Apr 2017 01:00:36 +0000 (10:00 +0900)]
usb: gadget: slp: fix to use serial number of dmi
For identical serial string of slp gadget, this patch fixes to use
product serial of dmi if the dmi value is set.
Change-Id: Ic75f6c7730cba5860afdf3bd60babc754b3ecd67
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 18 Apr 2017 01:11:01 +0000 (10:11 +0900)]
LOCAL / ARM: SAMSUNG: set chip product id as system_serial
The Exynos SoC has 64bit chip product id and it is identical for
each chip. So it can be used as system_serial.
Change-Id: Id739b865a1e355a0209841ff2ca1802b5daeabb2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 22 Jun 2017 09:41:20 +0000 (18:41 +0900)]
fimc-is: change metadata header as uapi header
The header fimc-is-metadata.h is required from user, so it should
be a uapi header. So this patch moves the header to uapi header.
Change-Id: I5618889c806d4463da0bf0ea947bf5d1b667d5e3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 22 Jun 2017 09:16:42 +0000 (18:16 +0900)]
uapi: add missing exynos camera interface header
The header videodev2_exynos_camera.h is required as uapi header,
but it is missed from install script. So this patch adds the
missing header.
Change-Id: I71b40de01c23ec210d1a9c8cea633116a41da8be
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 22 Jun 2017 07:45:48 +0000 (16:45 +0900)]
packaging: tm2: add kernel headers for arm 32 bit
To support 32 bit compat, kernel headers should be required for arm
32 bit, so this adds kernel headers for 32 bit.
Change-Id: I973b7413a4cb61b5159cc045c870663092aa5240
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Hoegeun Kwon [Fri, 21 Apr 2017 01:59:21 +0000 (10:59 +0900)]
drm/exynos/ipp: Add check the property even if ipp id exists
If user calls exynos_drm_ipp_set_property() with ioctl, check_property
is not executed if ipp id(prop_id) is present.
This means that you can not dynamically check the rotation limits, So
check the property even if ipp id exists.
Change-Id: Ibc99dda25ea41ded3db7f3307ca3a4b0ba5de9bb
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Gonzha Dmitriy Evgenevich [Wed, 24 May 2017 10:56:15 +0000 (13:56 +0300)]
packaging: Turn off building with ASan
Turn off ASan for ASan sanitized firmware build
Change-Id: I4df18ac8d98cf99c08a2302640e18bea82672240
Signed-off-by: Gonzha Dmitriy Evgenevich <d.gonzha@samsung.com>
Paweł Szewczyk [Wed, 17 May 2017 11:27:16 +0000 (13:27 +0200)]
ARM: defconfig: odroid: Disable CONFIG_OABI_COMPAT
This change allows enabling syscall auditing (CONFIG_AUDITSYSCALL).
Change-Id: I145f9f74dfacae050346ed0feee4bc27dd155234
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Jaehoon Chung [Thu, 20 Apr 2017 10:53:25 +0000 (19:53 +0900)]
extcon: max77843: control the JIG pin by Auto detection
Control the JIG pin by Auto dection.
Coontrol3 register has JIGset[1:0].
00: JIG pin controlled by Auto detection
01: JIG pin Output Low
10 to 11 : JIG pin Hi-Impedance
This patch is for fixing 'poweroff" issue.
- Download the some image
- After downloading the image, rebooting target.
- Press the poweroff, it runs 'reboot' instead of 'poweroff'
Change-Id: Ie17a46f79f2b4da6bbffc7d57feaddc7524b3524
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Eric Dumazet [Tue, 30 Aug 2016 04:34:58 +0000 (00:34 -0400)]
udp: properly support MSG_PEEK with truncated buffers
[ Upstream commit
197c949e7798fbf28cfadc69d9ca0c2abbf93191 ]
Backport of this upstream commit into stable kernels :
89c22d8c3b27 ("net: Fix skb csum races when peeking")
exposed a bug in udp stack vs MSG_PEEK support, when user provides
a buffer smaller than skb payload.
In this case,
skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr),
msg->msg_iov);
returns -EFAULT.
This bug does not happen in upstream kernels since Al Viro did a great
job to replace this into :
skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg);
This variant is safe vs short buffers.
For the time being, instead reverting Herbert Xu patch and add back
skb->ip_summed invalid changes, simply store the result of
udp_lib_checksum_complete() so that we avoid computing the checksum a
second time, and avoid the problematic
skb_copy_and_csum_datagram_iovec() call.
This patch can be applied on recent kernels as it avoids a double
checksumming, then backported to stable kernels as a bug fix.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[Applied missed stable commit from linux-4.4.y tree to resolve CVE-2016-10229]
Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I736f7d244cade936e8991e2419466e803fead571
Andrzej Hajda [Tue, 11 Apr 2017 11:31:37 +0000 (13:31 +0200)]
drm/exynos/hdmi: dis-join pipeline on power-off
Tizen's way of interaction with old/non-atomic DRM unveils apparent bug
in DRM core - pipeline is not destroyed on connector's removal. As a
result after re-connect full modeset code is not executed and can cause
incorrect behavior of the driver. The patch forcibly dis-joins the
pipeline on hdmi power-off to fix it.
Change-Id: If0798684ba90ddede5ccb6b59ca1ae672f35d3c0
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Andrzej Hajda [Tue, 11 Apr 2017 11:20:24 +0000 (13:20 +0200)]
drm/exynos/decon5433: replace old method of enabling PHY with pipe clk
DECON requires clock provided by HDMI-PHY prior to its configuration,
and the clock should be off after DECON disable.
Since introduction of pipe_clk DECON can fully control PHY clock.
It obsoletes exynos_hdmiphy_enable workaround.
The patch adds also missing code to disable HDMI-PHY on DECON disable.
Change-Id: I61b42bec9883d4f43a0ed5bcf1ed9f1b1f81781d
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>