Browse Source

add AHCI_PORT macro for fast boot.

Change-Id: I2c17520001b70169935db045cef828990046cef7
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
master
QiaoChong 6 years ago
committed by Chong Qiao
parent
commit
7097a89979
  1. 8
      sys/dev/pci/ahci.c

8
sys/dev/pci/ahci.c

@ -276,9 +276,15 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
probe_ent->cap = readl(mmio + HOST_CAP);
probe_ent->port_map = readl(mmio + HOST_PORTS_IMPL);
#ifndef AHCI_PORT
probe_ent->n_ports = (probe_ent->cap & 0x1f) + 1;
i = 0;
#else
i= AHCI_PORT;
probe_ent->n_ports = AHCI_PORT + 1;
#endif
for (i = 0; i < probe_ent->n_ports; i++) {
for ( ; i < probe_ent->n_ports; i++) {
probe_ent->port[i].port_mmio = ahci_port_base((u32) mmio, i);
port_mmio = (u8 *) probe_ent->port[i].port_mmio;
ahci_setup_port(&probe_ent->port[i], (unsigned long)mmio, i);

Loading…
Cancel
Save