Commit e1f40bf0 authored by Alexandre Bailon's avatar Alexandre Bailon Committed by Vinod Koul

dmaengine: cppi41: rename platform variables

Currently, only the AM335x is supported by the driver.
Though the driver has a glue layer to support different platforms,
some platform variable names are not prefixed with the platform name.
To facilitate the addition of a new platform,
rename some variables owned by the AM335x glue.
Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 6ee60246
...@@ -149,7 +149,7 @@ struct cppi41_dd { ...@@ -149,7 +149,7 @@ struct cppi41_dd {
}; };
#define FIST_COMPLETION_QUEUE 93 #define FIST_COMPLETION_QUEUE 93
static struct chan_queues usb_queues_tx[] = { static struct chan_queues am335x_usb_queues_tx[] = {
/* USB0 ENDP 1 */ /* USB0 ENDP 1 */
[ 0] = { .submit = 32, .complete = 93}, [ 0] = { .submit = 32, .complete = 93},
[ 1] = { .submit = 34, .complete = 94}, [ 1] = { .submit = 34, .complete = 94},
...@@ -185,7 +185,7 @@ static struct chan_queues usb_queues_tx[] = { ...@@ -185,7 +185,7 @@ static struct chan_queues usb_queues_tx[] = {
[29] = { .submit = 90, .complete = 139}, [29] = { .submit = 90, .complete = 139},
}; };
static const struct chan_queues usb_queues_rx[] = { static const struct chan_queues am335x_usb_queues_rx[] = {
/* USB0 ENDP 1 */ /* USB0 ENDP 1 */
[ 0] = { .submit = 1, .complete = 109}, [ 0] = { .submit = 1, .complete = 109},
[ 1] = { .submit = 2, .complete = 110}, [ 1] = { .submit = 2, .complete = 110},
...@@ -932,8 +932,9 @@ static bool cpp41_dma_filter_fn(struct dma_chan *chan, void *param) ...@@ -932,8 +932,9 @@ static bool cpp41_dma_filter_fn(struct dma_chan *chan, void *param)
else else
queues = cdd->queues_rx; queues = cdd->queues_rx;
BUILD_BUG_ON(ARRAY_SIZE(usb_queues_rx) != ARRAY_SIZE(usb_queues_tx)); BUILD_BUG_ON(ARRAY_SIZE(am335x_usb_queues_rx) !=
if (WARN_ON(cchan->port_num > ARRAY_SIZE(usb_queues_rx))) ARRAY_SIZE(am335x_usb_queues_tx));
if (WARN_ON(cchan->port_num > ARRAY_SIZE(am335x_usb_queues_rx)))
return false; return false;
cchan->q_num = queues[cchan->port_num].submit; cchan->q_num = queues[cchan->port_num].submit;
...@@ -961,15 +962,15 @@ static struct dma_chan *cppi41_dma_xlate(struct of_phandle_args *dma_spec, ...@@ -961,15 +962,15 @@ static struct dma_chan *cppi41_dma_xlate(struct of_phandle_args *dma_spec,
&dma_spec->args[0]); &dma_spec->args[0]);
} }
static const struct cppi_glue_infos usb_infos = { static const struct cppi_glue_infos am335x_usb_infos = {
.isr = cppi41_irq, .isr = cppi41_irq,
.queues_rx = usb_queues_rx, .queues_rx = am335x_usb_queues_rx,
.queues_tx = usb_queues_tx, .queues_tx = am335x_usb_queues_tx,
.td_queue = { .submit = 31, .complete = 0 }, .td_queue = { .submit = 31, .complete = 0 },
}; };
static const struct of_device_id cppi41_dma_ids[] = { static const struct of_device_id cppi41_dma_ids[] = {
{ .compatible = "ti,am3359-cppi41", .data = &usb_infos}, { .compatible = "ti,am3359-cppi41", .data = &am335x_usb_infos},
{}, {},
}; };
MODULE_DEVICE_TABLE(of, cppi41_dma_ids); MODULE_DEVICE_TABLE(of, cppi41_dma_ids);
......
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