Lines Matching refs:scontrol

302 	u32 scontrol, serror;  in sata_link_resume()  local
305 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_resume()
314 scontrol = (scontrol & 0x0f0) | 0x300; in sata_link_resume()
315 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol))) in sata_link_resume()
326 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_resume()
328 } while ((scontrol & 0xf0f) != 0x300 && --tries); in sata_link_resume()
330 if ((scontrol & 0xf0f) != 0x300) { in sata_link_resume()
332 scontrol); in sata_link_resume()
374 u32 scontrol; in sata_link_scr_lpm() local
377 rc = sata_scr_read(link, SCR_CONTROL, &scontrol); in sata_link_scr_lpm()
384 scontrol |= (0x7 << 8); in sata_link_scr_lpm()
387 scontrol |= (0x4 << 12); in sata_link_scr_lpm()
393 scontrol &= ~(0x1 << 8); in sata_link_scr_lpm()
394 scontrol |= (0x6 << 8); in sata_link_scr_lpm()
401 scontrol &= ~(0x7 << 8); in sata_link_scr_lpm()
408 scontrol |= (0x1 << 8); in sata_link_scr_lpm()
411 scontrol |= (0x2 << 8); in sata_link_scr_lpm()
414 scontrol |= (0x4 << 8); in sata_link_scr_lpm()
417 scontrol &= ~0xf; in sata_link_scr_lpm()
418 scontrol |= (0x1 << 2); in sata_link_scr_lpm()
425 rc = sata_scr_write(link, SCR_CONTROL, scontrol); in sata_link_scr_lpm()
439 static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol) in __sata_set_spd_needed() argument
458 spd = (*scontrol >> 4) & 0xf; in __sata_set_spd_needed()
459 *scontrol = (*scontrol & ~0xf0) | ((target & 0xf) << 4); in __sata_set_spd_needed()
481 u32 scontrol; in sata_set_spd_needed() local
483 if (sata_scr_read(link, SCR_CONTROL, &scontrol)) in sata_set_spd_needed()
486 return __sata_set_spd_needed(link, &scontrol); in sata_set_spd_needed()
504 u32 scontrol; in sata_set_spd() local
507 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_set_spd()
510 if (!__sata_set_spd_needed(link, &scontrol)) in sata_set_spd()
513 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol))) in sata_set_spd()
628 u32 scontrol; in sata_link_hardreset() local
640 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_hardreset()
643 scontrol = (scontrol & 0x0f0) | 0x304; in sata_link_hardreset()
645 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol))) in sata_link_hardreset()
652 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) in sata_link_hardreset()
655 scontrol = (scontrol & 0x0f0) | 0x301; in sata_link_hardreset()
657 if ((rc = sata_scr_write_flush(link, SCR_CONTROL, scontrol))) in sata_link_hardreset()