Lines Matching refs:scontrol

300 	u32 scontrol, serror;  in sata_link_resume()  local
303 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_resume()
312 scontrol = (scontrol & 0x0f0) | 0x300; in sata_link_resume()
313 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol))) in sata_link_resume()
324 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_resume()
326 } while ((scontrol & 0xf0f) != 0x300 && --tries); in sata_link_resume()
328 if ((scontrol & 0xf0f) != 0x300) { in sata_link_resume()
330 scontrol); in sata_link_resume()
372 u32 scontrol; in sata_link_scr_lpm() local
375 rc = sata_scr_read(link, SCR_CONTROL, &scontrol); in sata_link_scr_lpm()
382 scontrol |= (0x7 << 8); in sata_link_scr_lpm()
385 scontrol |= (0x4 << 12); in sata_link_scr_lpm()
391 scontrol &= ~(0x1 << 8); in sata_link_scr_lpm()
392 scontrol |= (0x6 << 8); in sata_link_scr_lpm()
399 scontrol &= ~(0x7 << 8); in sata_link_scr_lpm()
402 scontrol &= ~0xf; in sata_link_scr_lpm()
403 scontrol |= (0x1 << 2); in sata_link_scr_lpm()
410 rc = sata_scr_write(link, SCR_CONTROL, scontrol); in sata_link_scr_lpm()
424 static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol) in __sata_set_spd_needed() argument
443 spd = (*scontrol >> 4) & 0xf; in __sata_set_spd_needed()
444 *scontrol = (*scontrol & ~0xf0) | ((target & 0xf) << 4); in __sata_set_spd_needed()
466 u32 scontrol; in sata_set_spd_needed() local
468 if (sata_scr_read(link, SCR_CONTROL, &scontrol)) in sata_set_spd_needed()
471 return __sata_set_spd_needed(link, &scontrol); in sata_set_spd_needed()
489 u32 scontrol; in sata_set_spd() local
492 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_set_spd()
495 if (!__sata_set_spd_needed(link, &scontrol)) in sata_set_spd()
498 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol))) in sata_set_spd()
533 u32 scontrol; in sata_link_hardreset() local
545 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_hardreset()
548 scontrol = (scontrol & 0x0f0) | 0x304; in sata_link_hardreset()
550 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol))) in sata_link_hardreset()
557 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_hardreset()
560 scontrol = (scontrol & 0x0f0) | 0x301; in sata_link_hardreset()
562 if ((rc = sata_scr_write_flush(link, SCR_CONTROL, scontrol))) in sata_link_hardreset()