1212OSDefineMetaClassAndStructors (IntelBluetoothOpsGen2, BtIntel)
1313
1414bool IntelBluetoothOpsGen2::
15- setup( )
15+ bootloaderSetup(IntelVersion *ver )
1616{
17- IntelVersion ver ;
17+ IntelVersion newVer ;
1818 IntelBootParams params;
19- IntelDebugFeatures features;
2019 uint32_t bootParams;
2120 char ddcname[64 ];
2221
@@ -26,26 +25,12 @@ setup()
2625 */
2726 bootParams = 0x00000000 ;
2827
29- /* Read the Intel version information to determine if the device
30- * is in bootloader mode or if it already has operational firmware
31- * loaded.
32- */
33- if (!readVersion (&ver)) {
34- XYLog (" Intel Read version failed\n " );
35- resetToBootloader ();
36- return false ;
37- }
38-
39- if (!intelVersionInfo (&ver)) {
40- return false ;
41- }
42-
43- if (!downloadFirmware (&ver, ¶ms, &bootParams)) {
28+ if (!downloadFirmware (ver, ¶ms, &bootParams)) {
4429 return false ;
4530 }
4631
4732 /* controller is already having an operational firmware */
48- if (ver. fw_variant == 0x23 ) {
33+ if (ver-> fw_variant == 0x23 ) {
4934 XYLog (" Frimware is already running, finishing\n " );
5035 goto finish;
5136 }
@@ -55,7 +40,7 @@ setup()
5540 return false ;
5641 }
5742
58- if (!getFirmware (& ver, ¶ms, ddcname, sizeof (ddcname), " ddc" )) {
43+ if (!getFirmware (ver, ¶ms, ddcname, sizeof (ddcname), " ddc" )) {
5944 XYLog (" Unsupported Intel firmware naming\n " );
6045 } else {
6146 /* Once the device is running in operational mode, it needs to
@@ -67,20 +52,12 @@ setup()
6752 loadDDCConfig (ddcname);
6853 }
6954
70- /* Read the Intel supported features and if new exception formats
71- * supported, need to load the additional DDC config to enable.
72- */
73- readDebugFeatures (&features);
74-
75- /* Set DDC mask for available debug features */
76- setDebugFeatures (&features);
77-
7855 /* Read the Intel version information after loading the FW */
79- if (!readVersion (&ver )) {
56+ if (!readVersion (&newVer )) {
8057 return false ;
8158 }
8259
83- intelVersionInfo (&ver );
60+ intelVersionInfo (&newVer );
8461
8562finish:
8663
@@ -96,6 +73,28 @@ setup()
9673 return true ;
9774}
9875
76+ bool IntelBluetoothOpsGen2::
77+ setup ()
78+ {
79+ IntelVersion ver;
80+
81+ /* Read the Intel version information to determine if the device
82+ * is in bootloader mode or if it already has operational firmware
83+ * loaded.
84+ */
85+ if (!readVersion (&ver)) {
86+ XYLog (" Intel Read version failed\n " );
87+ resetToBootloader ();
88+ return false ;
89+ }
90+
91+ if (!intelVersionInfo (&ver)) {
92+ return false ;
93+ }
94+
95+ return bootloaderSetup (&ver);
96+ }
97+
9998bool IntelBluetoothOpsGen2::
10099downloadFirmware (IntelVersion *ver, IntelBootParams *params, uint32_t *bootParams)
101100{
0 commit comments