| 177e15df | 04-Mar-2024 |
Uwe Kleine-König <[email protected]> |
PM / devfreq: exynos-ppmu: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible
PM / devfreq: exynos-ppmu: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| 481d97ba | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: add support for RK3588
Add support for the RK3588 to the driver. The RK3588 has four DDR channels with a register stride of 0x4000 between the channel registers, also it
PM / devfreq: rockchip-dfi: add support for RK3588
Add support for the RK3588 to the driver. The RK3588 has four DDR channels with a register stride of 0x4000 between the channel registers, also it has a DDRMON_CTRL register per channel.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| bbe7cbd0 | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: account for multiple DDRMON_CTRL registers
The currently supported RK3399 has a set of registers per channel, but it has only a single DDRMON_CTRL register. With upcoming
PM / devfreq: rockchip-dfi: account for multiple DDRMON_CTRL registers
The currently supported RK3399 has a set of registers per channel, but it has only a single DDRMON_CTRL register. With upcoming RK3588 this will be different, the RK3588 has a DDRMON_CTRL register per channel.
Instead of expecting a single DDRMON_CTRL register, loop over the channels and write the channel specific DDRMON_CTRL register. Break out early out of the loop when there is only a single DDRMON_CTRL register like on the RK3399.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| d1d0b3fe | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: make register stride SoC specific
The currently supported RK3399 has a stride of 20 between the channel specific registers. Upcoming RK3588 has a different stride, so put
PM / devfreq: rockchip-dfi: make register stride SoC specific
The currently supported RK3399 has a stride of 20 between the channel specific registers. Upcoming RK3588 has a different stride, so put the stride into driver data to make it configurable. While at it convert decimal 20 to hex 0x14 for consistency with RK3588 which has a register stride 0x4000 and we want to write that in hex as well.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| 4d586b57 | 19-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: Add perf support
The DFI is a unit which is suitable for measuring DDR utilization, but so far it could only be used as an event driver for the DDR frequency scaling driv
PM / devfreq: rockchip-dfi: Add perf support
The DFI is a unit which is suitable for measuring DDR utilization, but so far it could only be used as an event driver for the DDR frequency scaling driver. This adds perf support to the DFI driver.
Usage with the 'perf' tool can look like:
perf stat -a -e rockchip_ddr/cycles/,\ rockchip_ddr/read-bytes/,\ rockchip_ddr/write-bytes/,\ rockchip_ddr/bytes/ sleep 1
Performance counter stats for 'system wide':
1582524826 rockchip_ddr/cycles/ 1802.25 MB rockchip_ddr/read-bytes/ 1793.72 MB rockchip_ddr/write-bytes/ 3595.90 MB rockchip_ddr/bytes/
1.014369709 seconds time elapsed
perf support has been tested on a RK3568 and a RK3399, the latter with dual channel DDR.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> [cw00.choi: Fix typo from 'write_acccess' to 'write_access'] Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| 2785cc00 | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: give variable a better name
struct dmc_count_channel::total counts the clock cycles of the DDR controller. Rename it accordingly to give the reader a better idea what thi
PM / devfreq: rockchip-dfi: give variable a better name
struct dmc_count_channel::total counts the clock cycles of the DDR controller. Rename it accordingly to give the reader a better idea what this is about. While at it, at some documentation to struct dmc_count_channel.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| b82932fb | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: Pass private data struct to internal functions
The internal functions do not need the struct devfreq_event_dev *, so pass them the struct rockchip_dfi *. This is a prepar
PM / devfreq: rockchip-dfi: Pass private data struct to internal functions
The internal functions do not need the struct devfreq_event_dev *, so pass them the struct rockchip_dfi *. This is a preparation for adding perf support later which doesn't have a struct devfreq_event_dev *.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| d3b0f6ab | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: Clean up DDR type register defines
Use the HIWORD_UPDATE() define known from other rockchip drivers to make the defines look less odd to the readers who've seen other roc
PM / devfreq: rockchip-dfi: Clean up DDR type register defines
Use the HIWORD_UPDATE() define known from other rockchip drivers to make the defines look less odd to the readers who've seen other rockchip drivers.
The HIWORD registers have their functional bits in the lower 16 bits whereas the upper 16 bits contain a mask. Only the functional bits that have the corresponding mask bit set are modified during a write. Although the register writes look different, the end result should be the same, at least there's no functional change intended with this patch.
Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Sascha Hauer <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| 74002e66 | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rk3399_dmc,dfi: generalize DDRTYPE defines
The DDRTYPE defines are named to be RK3399 specific, but they can be used for other Rockchip SoCs as well, so replace the RK3399_PMUGRF_ pref
PM / devfreq: rk3399_dmc,dfi: generalize DDRTYPE defines
The DDRTYPE defines are named to be RK3399 specific, but they can be used for other Rockchip SoCs as well, so replace the RK3399_PMUGRF_ prefix with ROCKCHIP_. They are defined in a SoC specific header file, so when generalizing the prefix also move the new defines to a SoC agnostic header file. While at it use GENMASK to define the DDRTYPE bitfield and give it a name including the full register name.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| 99911664 | 18-Oct-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: Use free running counter
The DDR_MON counters are free running counters. These are resetted to 0 when starting them over like currently done when reading the current coun
PM / devfreq: rockchip-dfi: Use free running counter
The DDR_MON counters are free running counters. These are resetted to 0 when starting them over like currently done when reading the current counter values.
Resetting the counters becomes a problem with perf support we want to add later, because perf needs counters that are not modified elsewhere.
This patch removes resetting the counters and keeps them running instead. That means we no longer use the absolute counter values but instead compare them with the counter values we read last time. Not stopping the counters also has the impact that they are running while we are reading them. We cannot read multiple timers atomically, so the values do not exactly fit together. The effect should be negligible though as the time between two measurements is some orders of magnitude bigger than the time we need to read multiple registers.
Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| e50fa1a5 | 06-Oct-2023 |
Rob Herring <[email protected]> |
PM / devfreq: exynos-ppmu: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly i
PM / devfreq: exynos-ppmu: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers.
Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| 41982740 | 04-Jul-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: dfi store raw values in counter struct
When adding perf support to the DFI driver the perf part will need the raw counter values, so move the fixed * 4 factor to rockchip
PM / devfreq: rockchip-dfi: dfi store raw values in counter struct
When adding perf support to the DFI driver the perf part will need the raw counter values, so move the fixed * 4 factor to rockchip_dfi_get_event().
Link: https://lore.kernel.org/lkml/[email protected]/ Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| 9325b3ec | 04-Jul-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: use consistent name for private data struct
The variable name for the private data struct is 'info' in some functions and 'data' in others. Both names do not give a clue
PM / devfreq: rockchip-dfi: use consistent name for private data struct
The variable name for the private data struct is 'info' in some functions and 'data' in others. Both names do not give a clue what type the variable has, so consistently use 'dfi'.
Link: https://lore.kernel.org/lkml/[email protected]/ Reviewed-by: Heiko Stuebner <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|
| bbf47900 | 04-Jul-2023 |
Sascha Hauer <[email protected]> |
PM / devfreq: rockchip-dfi: Embed desc into private data struct
No need for an extra allocation, just embed the struct devfreq_event_desc into the private data struct.
Link: https://lore.kernel.org
PM / devfreq: rockchip-dfi: Embed desc into private data struct
No need for an extra allocation, just embed the struct devfreq_event_desc into the private data struct.
Link: https://lore.kernel.org/lkml/[email protected]/ Reviewed-by: Heiko Stuebner <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
show more ...
|