- fsl_sata_reg_t *reg = (fsl_sata_reg_t *)reg_base;
- u32 scontrol;
-
- /* Disable the SATA interface and put PHY offline */
- scontrol = in_le32(®->scontrol);
- scontrol = (scontrol & 0x0f0) | 0x304;
- out_le32(®->scontrol, scontrol);
-
- /* No speed strict */
- scontrol = in_le32(®->scontrol);
- scontrol = scontrol & ~0x0f0;
- out_le32(®->scontrol, scontrol);
-
- /* Issue PHY wake/reset, Hardware_reset_asserted */
- scontrol = in_le32(®->scontrol);
- scontrol = (scontrol & 0x0f0) | 0x301;
- out_le32(®->scontrol, scontrol);
-
- mdelay(100);
-
- /* Resume PHY, COMRESET negated, the device initialize hardware
- * and execute diagnostics, send good status-signature to host,
- * which is D2H register FIS, and then the device enter idle state.
- */
- scontrol = in_le32(®->scontrol);
- scontrol = (scontrol & 0x0f0) | 0x300;
- out_le32(®->scontrol, scontrol);
-
- mdelay(100);
- return;