Lines Matching +full:reset +full:- +full:mode

3  * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved
35 * Firmware-related functions implementation.
92 int mac_soft_reset_(struct aq_hw* hw, aq_fw_bootloader_mode* mode);
94 int mac_soft_reset_rbl_(struct aq_hw* hw, aq_fw_bootloader_mode* mode);
113 return (-EBUSY); in aq_fw_reset()
116 hw->rbl_enabled = bootExitCode != 0; in aq_fw_reset()
118 trace(dbg_init, "RBL enabled = %d", hw->rbl_enabled); in aq_fw_reset()
123 * 2) Driver may skip reset sequence and save time. in aq_fw_reset()
125 if (hw->fast_start_enabled && !ver) { in aq_fw_reset()
127 /* Skip reset as it just completed */ in aq_fw_reset()
132 aq_fw_bootloader_mode mode = boot_mode_unknown; in aq_fw_reset() local
133 int err = mac_soft_reset_(hw, &mode); in aq_fw_reset()
135 aq_log_error("MAC reset failed: %d", err); in aq_fw_reset()
139 switch (mode) { in aq_fw_reset()
142 hw->flash_present = true; in aq_fw_reset()
147 hw->flash_present = true; in aq_fw_reset()
152 return (-ENOTSUP); in aq_fw_reset()
156 aq_log_error("RBL> Host Bootload mode: this driver does not support Host Boot"); in aq_fw_reset()
157 return (-ENOTSUP); in aq_fw_reset()
159 trace(dbg_init, "RBL> Host Bootload mode"); in aq_fw_reset()
169 return (-ENOTSUP); in aq_fw_reset()
174 if (hw->fw_version.raw == 0) in aq_fw_ops_init()
175 hw->fw_version.raw = AQ_READ_REG(hw, 0x18); in aq_fw_ops_init()
178 hw->fw_version.major_version, hw->fw_version.minor_version, in aq_fw_ops_init()
179 hw->fw_version.build_number); in aq_fw_ops_init()
181 if (hw->fw_version.major_version == 1) { in aq_fw_ops_init()
183 hw->fw_ops = &aq_fw1x_ops; in aq_fw_ops_init()
185 } else if (hw->fw_version.major_version >= 2) { in aq_fw_ops_init()
187 hw->fw_ops = &aq_fw2x_ops; in aq_fw_ops_init()
191 aq_log_error("aq_fw_ops_init(): invalid F/W version %#x", hw->fw_version.raw); in aq_fw_ops_init()
192 return (-ENOTSUP); in aq_fw_ops_init()
196 int mac_soft_reset_(struct aq_hw* hw, aq_fw_bootloader_mode* mode /*= nullptr*/) in mac_soft_reset_() argument
198 if (hw->rbl_enabled) { in mac_soft_reset_()
199 return mac_soft_reset_rbl_(hw, mode); in mac_soft_reset_()
201 if (mode) in mac_soft_reset_()
202 *mode = boot_mode_flb; in mac_soft_reset_()
213 // Let Felicity hardware to complete SMBUS transaction before Global software reset. in mac_soft_reset_flb_()
218 * reset may not clear SPI interface. Clean it up manually before global reset. in mac_soft_reset_flb_()
230 if (!hw->fast_start_enabled) in mac_soft_reset_flb_()
234 * For the case SPI burst transaction was interrupted (by MCP reset above), in mac_soft_reset_flb_()
240 if (!hw->fast_start_enabled) { in mac_soft_reset_flb_()
258 /* FW reset */ in mac_soft_reset_flb_()
260 // Let Felicity hardware complete SMBUS transaction before Global software reset. in mac_soft_reset_flb_()
267 // Global software reset in mac_soft_reset_flb_()
282 trace_error(dbg_init, "FLB> Global Soft Reset failed"); in mac_soft_reset_flb_()
290 int mac_soft_reset_rbl_(struct aq_hw* hw, aq_fw_bootloader_mode* mode) in mac_soft_reset_rbl_() argument
292 trace(dbg_init, "RBL> MAC reset STARTED!"); in mac_soft_reset_rbl_()
298 // MAC FW will reload PHY FW if 1E.1000.3 was cleaned - #undone in mac_soft_reset_rbl_()
302 // Global software reset in mac_soft_reset_rbl_()
322 return (-EBUSY); in mac_soft_reset_rbl_()
326 if (mode) in mac_soft_reset_rbl_()
327 *mode = boot_mode_rbl_flash; in mac_soft_reset_rbl_()
328 trace(dbg_init, "RBL> reset complete! [Flash]"); in mac_soft_reset_rbl_()
330 if (mode) in mac_soft_reset_rbl_()
331 *mode = boot_mode_rbl_host_bootload; in mac_soft_reset_rbl_()
332 trace(dbg_init, "RBL> reset complete! [Host Bootload]"); in mac_soft_reset_rbl_()
335 return (-EBUSY); in mac_soft_reset_rbl_()
344 if ((hw->fw_version.raw = AQ_READ_REG(hw, 0x18)) != 0) in wait_init_mac_firmware_()
351 return (-EBUSY); in wait_init_mac_firmware_()