This source file includes following definitions.
- sdm845_qcom_llcc_remove
- sdm845_qcom_llcc_probe
1
2
3
4
5
6
7 #include <linux/kernel.h>
8 #include <linux/module.h>
9 #include <linux/of.h>
10 #include <linux/of_device.h>
11 #include <linux/soc/qcom/llcc-qcom.h>
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 #define SCT_ENTRY(uid, sid, mc, p, fs, bway, rway, cmod, ptw, dca, rp, a) \
38 { \
39 .usecase_id = uid, \
40 .slice_id = sid, \
41 .max_cap = mc, \
42 .priority = p, \
43 .fixed_size = fs, \
44 .bonus_ways = bway, \
45 .res_ways = rway, \
46 .cache_mode = cmod, \
47 .probe_target_ways = ptw, \
48 .dis_cap_alloc = dca, \
49 .retain_on_pc = rp, \
50 .activate_on_init = a, \
51 }
52
53 static struct llcc_slice_config sdm845_data[] = {
54 SCT_ENTRY(LLCC_CPUSS, 1, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 1),
55 SCT_ENTRY(LLCC_VIDSC0, 2, 512, 2, 1, 0x0, 0x0f0, 0, 0, 1, 1, 0),
56 SCT_ENTRY(LLCC_VIDSC1, 3, 512, 2, 1, 0x0, 0x0f0, 0, 0, 1, 1, 0),
57 SCT_ENTRY(LLCC_ROTATOR, 4, 563, 2, 1, 0x0, 0x00e, 2, 0, 1, 1, 0),
58 SCT_ENTRY(LLCC_VOICE, 5, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 0),
59 SCT_ENTRY(LLCC_AUDIO, 6, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 0),
60 SCT_ENTRY(LLCC_MDMHPGRW, 7, 1024, 2, 0, 0xfc, 0xf00, 0, 0, 1, 1, 0),
61 SCT_ENTRY(LLCC_MDM, 8, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 0),
62 SCT_ENTRY(LLCC_CMPT, 10, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 0),
63 SCT_ENTRY(LLCC_GPUHTW, 11, 512, 1, 1, 0xc, 0x0, 0, 0, 1, 1, 0),
64 SCT_ENTRY(LLCC_GPU, 12, 2304, 1, 0, 0xff0, 0x2, 0, 0, 1, 1, 0),
65 SCT_ENTRY(LLCC_MMUHWT, 13, 256, 2, 0, 0x0, 0x1, 0, 0, 1, 0, 1),
66 SCT_ENTRY(LLCC_CMPTDMA, 15, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 0),
67 SCT_ENTRY(LLCC_DISP, 16, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 0),
68 SCT_ENTRY(LLCC_VIDFW, 17, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 0),
69 SCT_ENTRY(LLCC_MDMHPFX, 20, 1024, 2, 1, 0x0, 0xf00, 0, 0, 1, 1, 0),
70 SCT_ENTRY(LLCC_MDMPNG, 21, 1024, 0, 1, 0x1e, 0x0, 0, 0, 1, 1, 0),
71 SCT_ENTRY(LLCC_AUDHW, 22, 1024, 1, 1, 0xffc, 0x2, 0, 0, 1, 1, 0),
72 };
73
74 static int sdm845_qcom_llcc_remove(struct platform_device *pdev)
75 {
76 return qcom_llcc_remove(pdev);
77 }
78
79 static int sdm845_qcom_llcc_probe(struct platform_device *pdev)
80 {
81 return qcom_llcc_probe(pdev, sdm845_data, ARRAY_SIZE(sdm845_data));
82 }
83
84 static const struct of_device_id sdm845_qcom_llcc_of_match[] = {
85 { .compatible = "qcom,sdm845-llcc", },
86 { }
87 };
88
89 static struct platform_driver sdm845_qcom_llcc_driver = {
90 .driver = {
91 .name = "sdm845-llcc",
92 .of_match_table = sdm845_qcom_llcc_of_match,
93 },
94 .probe = sdm845_qcom_llcc_probe,
95 .remove = sdm845_qcom_llcc_remove,
96 };
97 module_platform_driver(sdm845_qcom_llcc_driver);
98
99 MODULE_DESCRIPTION("QCOM sdm845 LLCC driver");
100 MODULE_LICENSE("GPL v2");