Lines Matching refs:i
103 int i; in waiting_for_cmd_completed() local
106 for (i = 0; ((status = readl(offset)) & sign) && i < timeout_msec; i++) in waiting_for_cmd_completed()
109 return (i < timeout_msec) ? 0 : -1; in waiting_for_cmd_completed()
160 int i = 1000; in ahci_reset() local
174 i--; in ahci_reset()
175 } while ((i > 0) && (tmp & HOST_RESET)); in ahci_reset()
177 if (i == 0) { in ahci_reset()
199 int i, j, ret; in ahci_host_init() local
249 for (i = 0; i < uc_priv->n_ports; i++) { in ahci_host_init()
250 uc_priv->port[i].port_mmio = ahci_port_base(mmio, i); in ahci_host_init()
251 if (!(port_map & (1 << i))) in ahci_host_init()
253 port_mmio = (u8 *)uc_priv->port[i].port_mmio; in ahci_host_init()
259 debug("Port %d is active. Deactivating.\n", i); in ahci_host_init()
282 ret = ahci_link_up(uc_priv, i); in ahci_host_init()
284 printf("SATA link %d timeout.\n", i); in ahci_host_init()
295 debug("Spinning up device on SATA port %d... ", i); in ahci_host_init()
312 debug("SATA link %d down (COMINIT received), retrying...\n", i); in ahci_host_init()
313 i--; in ahci_host_init()
333 writel(1 << i, mmio + HOST_IRQ_STAT); in ahci_host_init()
337 debug("SATA port %d status: 0x%x\n", i, tmp); in ahci_host_init()
339 uc_priv->link_port_map |= (0x01 << i); in ahci_host_init()
519 int i; in ahci_fill_sg() local
527 for (i = 0; i < sg_count; i++) { in ahci_fill_sg()
529 phys_addr_t pa = (unsigned long)buf + i * MAX_DATA_BYTE_COUNT; in ahci_fill_sg()
700 int i; in ata_id_strcpy() local
701 for (i = 0; i < len / 2; i++) in ata_id_strcpy()
702 target[i] = swab16(src[i]); in ata_id_strcpy()
997 int i; in ahci_start_ports() local
1001 for (i = 0; i < uc_priv->n_ports; i++) { in ahci_start_ports()
1002 if (((linkmap >> i) & 0x01)) { in ahci_start_ports()
1003 if (ahci_port_start(uc_priv, (u8) i)) { in ahci_start_ports()
1004 printf("Can not start port %d\n", i); in ahci_start_ports()