Commit 578ca87c authored by Prabhakar Kushwaha's avatar Prabhakar Kushwaha Committed by Jeff Garzik

sata_fsl: Update RX_WATER_MARK for TRANSCFG

RX_WATER_MARK sets the number of locations in Rx FIFO that can be used before
the transport layer instructs the link layer to transmit HOLDS. Note that it
can take some time for the HOLDs to get to the other end, and that in the
interim there must be enough room in the FIFO to absorb all data that could
arrive.

Update the new recommended value to 16.
Signed-off-by: default avatarPrabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 4ac7534a
...@@ -185,6 +185,11 @@ enum { ...@@ -185,6 +185,11 @@ enum {
COMMANDSTAT = 0x20, COMMANDSTAT = 0x20,
}; };
/* TRANSCFG (transport-layer) configuration control */
enum {
TRANSCFG_RX_WATER_MARK = (1 << 4),
};
/* PHY (link-layer) configuration control */ /* PHY (link-layer) configuration control */
enum { enum {
PHY_BIST_ENABLE = 0x01, PHY_BIST_ENABLE = 0x01,
...@@ -1305,6 +1310,7 @@ static int sata_fsl_probe(struct platform_device *ofdev, ...@@ -1305,6 +1310,7 @@ static int sata_fsl_probe(struct platform_device *ofdev,
struct sata_fsl_host_priv *host_priv = NULL; struct sata_fsl_host_priv *host_priv = NULL;
int irq; int irq;
struct ata_host *host; struct ata_host *host;
u32 temp;
struct ata_port_info pi = sata_fsl_port_info[0]; struct ata_port_info pi = sata_fsl_port_info[0];
const struct ata_port_info *ppi[] = { &pi, NULL }; const struct ata_port_info *ppi[] = { &pi, NULL };
...@@ -1319,6 +1325,12 @@ static int sata_fsl_probe(struct platform_device *ofdev, ...@@ -1319,6 +1325,12 @@ static int sata_fsl_probe(struct platform_device *ofdev,
ssr_base = hcr_base + 0x100; ssr_base = hcr_base + 0x100;
csr_base = hcr_base + 0x140; csr_base = hcr_base + 0x140;
if (!of_device_is_compatible(ofdev->dev.of_node, "fsl,mpc8315-sata")) {
temp = ioread32(csr_base + TRANSCFG);
temp = temp & 0xffffffe0;
iowrite32(temp | TRANSCFG_RX_WATER_MARK, csr_base + TRANSCFG);
}
DPRINTK("@reset i/o = 0x%x\n", ioread32(csr_base + TRANSCFG)); DPRINTK("@reset i/o = 0x%x\n", ioread32(csr_base + TRANSCFG));
DPRINTK("sizeof(cmd_desc) = %d\n", sizeof(struct command_desc)); DPRINTK("sizeof(cmd_desc) = %d\n", sizeof(struct command_desc));
DPRINTK("sizeof(#define cmd_desc) = %d\n", SATA_FSL_CMD_DESC_SIZE); DPRINTK("sizeof(#define cmd_desc) = %d\n", SATA_FSL_CMD_DESC_SIZE);
......
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