drivers/soc/samsung/exynos5422-asv.c
Source file repositories/reference/linux-study-clean/drivers/soc/samsung/exynos5422-asv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/soc/samsung/exynos5422-asv.c- Extension
.c- Size
- 24423 bytes
- Lines
- 507
- Domain
- Driver Families
- Bucket
- drivers/soc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitrev.hlinux/errno.hlinux/regmap.hlinux/soc/samsung/exynos-chipid.hlinux/slab.hexynos-asv.hexynos5422-asv.h
Detected Declarations
function exynos5422_asv_get_groupfunction __asv_offset_voltagefunction exynos5422_asv_offset_voltage_setupfunction exynos5422_asv_opp_get_voltagefunction exynos5422_asv_parse_tablefunction exynos5422_asv_parse_bin2function exynos5422_asv_parse_sgfunction exynos5422_asv_initexport exynos5422_asv_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2019 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Samsung Exynos 5422 SoC Adaptive Supply Voltage support
*/
#include <linux/bitrev.h>
#include <linux/errno.h>
#include <linux/regmap.h>
#include <linux/soc/samsung/exynos-chipid.h>
#include <linux/slab.h>
#include "exynos-asv.h"
#include "exynos5422-asv.h"
#define ASV_GROUPS_NUM 14
#define ASV_ARM_DVFS_NUM 20
#define ASV_ARM_BIN2_DVFS_NUM 17
#define ASV_KFC_DVFS_NUM 14
#define ASV_KFC_BIN2_DVFS_NUM 12
/*
* This array is a set of 4 ASV data tables, first column of each ASV table
* contains frequency value in MHz and subsequent columns contain the CPU
* cluster's supply voltage values in uV.
* In order to create a set of OPPs for specific SoC revision one of the voltage
* columns (1...14) from one of the tables (0...3) is selected during
* initialization. There are separate ASV tables for the big (ARM) and little
* (KFC) CPU cluster. Only OPPs which are already defined in devicetree
* will be updated.
*/
static const u32 asv_arm_table[][ASV_ARM_DVFS_NUM][ASV_GROUPS_NUM + 1] = {
{
/* ARM 0, 1 */
{ 2100, 1362500, 1362500, 1350000, 1337500, 1325000, 1312500, 1300000,
1275000, 1262500, 1250000, 1237500, 1225000, 1212500, 1200000 },
{ 2000, 1312500, 1312500, 1300000, 1287500, 1275000, 1262500, 1250000,
1237500, 1225000, 1237500, 1225000, 1212500, 1200000, 1187500 },
{ 1900, 1250000, 1237500, 1225000, 1212500, 1200000, 1187500, 1175000,
1162500, 1150000, 1162500, 1150000, 1137500, 1125000, 1112500 },
{ 1800, 1200000, 1187500, 1175000, 1162500, 1150000, 1137500, 1125000,
1112500, 1100000, 1112500, 1100000, 1087500, 1075000, 1062500 },
{ 1700, 1162500, 1150000, 1137500, 1125000, 1112500, 1100000, 1087500,
1075000, 1062500, 1075000, 1062500, 1050000, 1037500, 1025000 },
{ 1600, 1125000, 1112500, 1100000, 1087500, 1075000, 1062500, 1050000,
1037500, 1025000, 1037500, 1025000, 1012500, 1000000, 987500 },
{ 1500, 1087500, 1075000, 1062500, 1050000, 1037500, 1025000, 1012500,
1000000, 987500, 1000000, 987500, 975000, 962500, 950000 },
{ 1400, 1062500, 1050000, 1037500, 1025000, 1012500, 1000000, 987500,
975000, 962500, 975000, 962500, 950000, 937500, 925000 },
{ 1300, 1050000, 1037500, 1025000, 1012500, 1000000, 987500, 975000,
962500, 950000, 962500, 950000, 937500, 925000, 912500 },
{ 1200, 1025000, 1012500, 1000000, 987500, 975000, 962500, 950000,
937500, 925000, 937500, 925000, 912500, 900000, 900000 },
{ 1100, 1000000, 987500, 975000, 962500, 950000, 937500, 925000,
912500, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 1000, 975000, 962500, 950000, 937500, 925000, 912500, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 900, 950000, 937500, 925000, 912500, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 800, 925000, 912500, 900000, 900000, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 700, 900000, 900000, 900000, 900000, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 600, 900000, 900000, 900000, 900000, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 500, 900000, 900000, 900000, 900000, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 400, 900000, 900000, 900000, 900000, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 300, 900000, 900000, 900000, 900000, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
{ 200, 900000, 900000, 900000, 900000, 900000, 900000, 900000,
900000, 900000, 900000, 900000, 900000, 900000, 900000 },
}, {
/* ARM 2 */
{ 2100, 1362500, 1362500, 1350000, 1337500, 1325000, 1312500, 1300000,
1275000, 1262500, 1250000, 1237500, 1225000, 1212500, 1200000 },
{ 2000, 1312500, 1312500, 1312500, 1300000, 1275000, 1262500, 1250000,
1237500, 1225000, 1237500, 1225000, 1212500, 1200000, 1187500 },
{ 1900, 1262500, 1250000, 1250000, 1237500, 1212500, 1200000, 1187500,
1175000, 1162500, 1175000, 1162500, 1150000, 1137500, 1125000 },
{ 1800, 1212500, 1200000, 1187500, 1175000, 1162500, 1150000, 1137500,
1125000, 1112500, 1125000, 1112500, 1100000, 1087500, 1075000 },
{ 1700, 1175000, 1162500, 1150000, 1137500, 1125000, 1112500, 1100000,
1087500, 1075000, 1087500, 1075000, 1062500, 1050000, 1037500 },
{ 1600, 1137500, 1125000, 1112500, 1100000, 1087500, 1075000, 1062500,
Annotation
- Immediate include surface: `linux/bitrev.h`, `linux/errno.h`, `linux/regmap.h`, `linux/soc/samsung/exynos-chipid.h`, `linux/slab.h`, `exynos-asv.h`, `exynos5422-asv.h`.
- Detected declarations: `function exynos5422_asv_get_group`, `function __asv_offset_voltage`, `function exynos5422_asv_offset_voltage_setup`, `function exynos5422_asv_opp_get_voltage`, `function exynos5422_asv_parse_table`, `function exynos5422_asv_parse_bin2`, `function exynos5422_asv_parse_sg`, `function exynos5422_asv_init`, `export exynos5422_asv_init`.
- Atlas domain: Driver Families / drivers/soc.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.