Message ID | 1444385206-7011-1-git-send-email-mugunthanvnm@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Friday 09 October 2015 03:36 PM, Mugunthan V N wrote: > cpdma is capable of placing the dma descriptors in ddr using > dma_alloc_coherent() when the internal bd ram size is not enough. > To utilize this feature pass the DT parameter "no_bd_ram" and > increase bd_ram_size and number of rx descriptors. > > Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Dave Please drop this patch as it is not working on AM437x platform. Will send a v2 after fixing it. Regards Mugunthan V N -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 8fc90f1..cf1a625 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1987,6 +1987,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, } data->ale_entries = prop; + data->no_bd_ram = of_property_read_bool(node, "no_bd_ram"); + if (of_property_read_u32(node, "bd_ram_size", &prop)) { dev_err(&pdev->dev, "Missing bd_ram_size property in the DT.\n"); return -EINVAL; @@ -2358,6 +2360,8 @@ static int cpsw_probe(struct platform_device *pdev) dma_params.desc_mem_size = data->bd_ram_size; dma_params.desc_align = 16; dma_params.has_ext_regs = true; + if (data->no_bd_ram) + dma_params.desc_mem_phys = 0; dma_params.desc_hw_addr = dma_params.desc_mem_phys; priv->dma = cpdma_ctlr_create(&dma_params); diff --git a/drivers/net/ethernet/ti/cpsw.h b/drivers/net/ethernet/ti/cpsw.h index ca90efa..b654ac2 100644 --- a/drivers/net/ethernet/ti/cpsw.h +++ b/drivers/net/ethernet/ti/cpsw.h @@ -33,6 +33,7 @@ struct cpsw_platform_data { u32 cpts_clock_mult; /* convert input clock ticks to nanoseconds */ u32 cpts_clock_shift; /* convert input clock ticks to nanoseconds */ u32 ale_entries; /* ale table size */ + bool no_bd_ram; /* set if cpsw bd ram should not be used */ u32 bd_ram_size; /*buffer descriptor ram size */ u32 rx_descs; /* Number of Rx Descriptios */ u32 mac_control; /* Mac control register */
cpdma is capable of placing the dma descriptors in ddr using dma_alloc_coherent() when the internal bd ram size is not enough. To utilize this feature pass the DT parameter "no_bd_ram" and increase bd_ram_size and number of rx descriptors. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> --- drivers/net/ethernet/ti/cpsw.c | 4 ++++ drivers/net/ethernet/ti/cpsw.h | 1 + 2 files changed, 5 insertions(+)