static void ahci_reg_init(AHCIState *s)

{

    int i;



    s->control_regs.cap = (s->ports - 1) |

                          (AHCI_NUM_COMMAND_SLOTS << 8) |

                          (AHCI_SUPPORTED_SPEED_GEN1 << AHCI_SUPPORTED_SPEED) |

                          HOST_CAP_NCQ | HOST_CAP_AHCI;



    s->control_regs.impl = (1 << s->ports) - 1;



    s->control_regs.version = AHCI_VERSION_1_0;



    for (i = 0; i < s->ports; i++) {

        s->dev[i].port_state = STATE_RUN;

    }

}

static void ahci_reg_init(AHCIState *s)

{

    int i;



    s->control_regs.cap = (s->ports - 1) |

                          (AHCI_NUM_COMMAND_SLOTS << 8) |

                          (AHCI_SUPPORTED_SPEED_GEN1 << AHCI_SUPPORTED_SPEED) |

                          HOST_CAP_NCQ | HOST_CAP_AHCI;



    s->control_regs.impl = (1 << s->ports) - 1;



    s->control_regs.version = AHCI_VERSION_1_0;



    for (i = 0; i < s->ports; i++) {

        s->dev[i].port_state = STATE_RUN;

    }

}

                          HOST_CAP_NCQ | HOST_CAP_AHCI;
static void FUNC_0(AHCIState *VAR_0)

{

    int VAR_1;



    VAR_0->control_regs.cap = (VAR_0->ports - 1) |

                          (AHCI_NUM_COMMAND_SLOTS << 8) |

                          (AHCI_SUPPORTED_SPEED_GEN1 << AHCI_SUPPORTED_SPEED) |

                          HOST_CAP_NCQ | HOST_CAP_AHCI;



    VAR_0->control_regs.impl = (1 << VAR_0->ports) - 1;



    VAR_0->control_regs.version = AHCI_VERSION_1_0;



    for (VAR_1 = 0; VAR_1 < VAR_0->ports; VAR_1++) {

        VAR_0->dev[VAR_1].port_state = STATE_RUN;

    }

}

static void FUNC_0(AHCIState *VAR_0)
{ int VAR_1; VAR_0->control_regs.cap = (VAR_0->ports - 1) |
(AHCI_NUM_COMMAND_SLOTS << 8) |
(AHCI_SUPPORTED_SPEED_GEN1 << AHCI_SUPPORTED_SPEED) |
HOST_CAP_NCQ | HOST_CAP_AHCI; VAR_0->control_regs.impl = (1 << VAR_0->ports) - 1; VAR_0->control_regs.version = AHCI_VERSION_1_0; for (VAR_1 = 0; VAR_1 < VAR_0->ports; VAR_1++) { VAR_0->dev[VAR_1].port_state = STATE_RUN; } }