This source file includes following definitions.
- brcmf_dmi_probe
1
2
3
4
5
6 #include <linux/dmi.h>
7 #include <linux/mod_devicetable.h>
8 #include "core.h"
9 #include "common.h"
10 #include "brcm_hw_ids.h"
11
12
13 static char dmi_board_type[128];
14
15 struct brcmf_dmi_data {
16 u32 chip;
17 u32 chiprev;
18 const char *board_type;
19 };
20
21
22
23 static const struct brcmf_dmi_data acepc_t8_data = {
24 BRCM_CC_4345_CHIP_ID, 6, "acepc-t8"
25 };
26
27 static const struct brcmf_dmi_data gpd_win_pocket_data = {
28 BRCM_CC_4356_CHIP_ID, 2, "gpd-win-pocket"
29 };
30
31 static const struct brcmf_dmi_data jumper_ezpad_mini3_data = {
32 BRCM_CC_43430_CHIP_ID, 0, "jumper-ezpad-mini3"
33 };
34
35 static const struct brcmf_dmi_data meegopad_t08_data = {
36 BRCM_CC_43340_CHIP_ID, 2, "meegopad-t08"
37 };
38
39 static const struct brcmf_dmi_data pov_tab_p1006w_data = {
40 BRCM_CC_43340_CHIP_ID, 2, "pov-tab-p1006w-data"
41 };
42
43 static const struct dmi_system_id dmi_platform_data[] = {
44 {
45
46 .matches = {
47 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
48 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
49 DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),
50
51 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
52 },
53 .driver_data = (void *)&acepc_t8_data,
54 },
55 {
56
57 .matches = {
58 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
59 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
60 DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T11"),
61
62 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
63 },
64 .driver_data = (void *)&acepc_t8_data,
65 },
66 {
67
68
69
70
71
72
73
74
75 .matches = {
76 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
77 DMI_MATCH(DMI_BOARD_NAME, "Default string"),
78 DMI_MATCH(DMI_BOARD_SERIAL, "Default string"),
79 DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
80 },
81 .driver_data = (void *)&gpd_win_pocket_data,
82 },
83 {
84
85 .matches = {
86 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
87 DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
88
89 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
90 },
91 .driver_data = (void *)&jumper_ezpad_mini3_data,
92 },
93 {
94
95 .matches = {
96 DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
97 DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
98 DMI_MATCH(DMI_BOARD_NAME, "T3 MRD"),
99 DMI_MATCH(DMI_BOARD_VERSION, "V1.1"),
100 },
101 .driver_data = (void *)&meegopad_t08_data,
102 },
103 {
104
105 .matches = {
106 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
107 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
108
109 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
110 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
111 },
112 .driver_data = (void *)&pov_tab_p1006w_data,
113 },
114 {}
115 };
116
117 void brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev)
118 {
119 const struct dmi_system_id *match;
120 const struct brcmf_dmi_data *data;
121 const char *sys_vendor;
122 const char *product_name;
123
124
125
126
127 for (match = dmi_first_match(dmi_platform_data);
128 match;
129 match = dmi_first_match(match + 1)) {
130 data = match->driver_data;
131
132 if (data->chip == chip && data->chiprev == chiprev) {
133 settings->board_type = data->board_type;
134 return;
135 }
136 }
137
138
139 sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR);
140 product_name = dmi_get_system_info(DMI_PRODUCT_NAME);
141 if (sys_vendor && product_name) {
142 snprintf(dmi_board_type, sizeof(dmi_board_type), "%s-%s",
143 sys_vendor, product_name);
144 settings->board_type = dmi_board_type;
145 }
146 }