Commit 7ba7917c authored by Stefan Reinauer's avatar Stefan Reinauer Committed by Tom Rini
Browse files

ahci: Improve AHCI debugging



- remove unused ssleep macro
- add some useful debugging information
Signed-off-by: default avatarStefan Reinauer <reinauer@chromium.org>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 9a65b875
...@@ -68,7 +68,6 @@ static void ahci_setup_port(struct ahci_ioports *port, unsigned long base, ...@@ -68,7 +68,6 @@ static void ahci_setup_port(struct ahci_ioports *port, unsigned long base,
#define msleep(a) udelay(a * 1000) #define msleep(a) udelay(a * 1000)
#define ssleep(a) msleep(a * 1000)
static int waiting_for_cmd_completed(volatile u8 *offset, static int waiting_for_cmd_completed(volatile u8 *offset,
int timeout_msec, int timeout_msec,
...@@ -153,6 +152,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent) ...@@ -153,6 +152,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
tmp = readl(port_mmio + PORT_CMD); tmp = readl(port_mmio + PORT_CMD);
if (tmp & (PORT_CMD_LIST_ON | PORT_CMD_FIS_ON | if (tmp & (PORT_CMD_LIST_ON | PORT_CMD_FIS_ON |
PORT_CMD_FIS_RX | PORT_CMD_START)) { PORT_CMD_FIS_RX | PORT_CMD_START)) {
debug("Port %d is active. Deactivating.\n", i);
tmp &= ~(PORT_CMD_LIST_ON | PORT_CMD_FIS_ON | tmp &= ~(PORT_CMD_LIST_ON | PORT_CMD_FIS_ON |
PORT_CMD_FIS_RX | PORT_CMD_START); PORT_CMD_FIS_RX | PORT_CMD_START);
writel_with_flush(tmp, port_mmio + PORT_CMD); writel_with_flush(tmp, port_mmio + PORT_CMD);
...@@ -163,6 +163,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent) ...@@ -163,6 +163,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
msleep(500); msleep(500);
} }
debug("Spinning up port %d... ", i);
writel(PORT_CMD_SPIN_UP, port_mmio + PORT_CMD); writel(PORT_CMD_SPIN_UP, port_mmio + PORT_CMD);
j = 0; j = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment