aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRichard Röjfors <richard.rojfors@pelagicore.com>2010-03-25 14:44:23 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-05-27 19:37:31 -0400
commitdc64f30fa557ab1108e97e499a9acc550baa38bc (patch)
tree54903967dcc6246c7cefd7632d1052805db2e0c8 /drivers
parent872c1b14e78661086ade8b501888850da2636eee (diff)
mfd: Add timb-dma to all configurations of timberdale
Add platform data for timb-dma, and add it in to timb-dma in all configurations of timberdale. Also incremented the version number. Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/timberdale.c97
-rw-r--r--drivers/mfd/timberdale.h14
2 files changed, 96 insertions, 15 deletions
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index 1ac77d16dce9..2d4691acd033 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -41,6 +41,8 @@
41 41
42#include <media/timb_radio.h> 42#include <media/timb_radio.h>
43 43
44#include <linux/timb_dma.h>
45
44#include "timberdale.h" 46#include "timberdale.h"
45 47
46#define DRIVER_NAME "timberdale" 48#define DRIVER_NAME "timberdale"
@@ -270,6 +272,65 @@ static __devinitdata struct timb_radio_platform_data
270 } 272 }
271}; 273};
272 274
275static __devinitdata struct timb_dma_platform_data timb_dma_platform_data = {
276 .nr_channels = 10,
277 .channels = {
278 {
279 /* UART RX */
280 .rx = true,
281 .descriptors = 2,
282 .descriptor_elements = 1
283 },
284 {
285 /* UART TX */
286 .rx = false,
287 .descriptors = 2,
288 .descriptor_elements = 1
289 },
290 {
291 /* MLB RX */
292 .rx = true,
293 .descriptors = 2,
294 .descriptor_elements = 1
295 },
296 {
297 /* MLB TX */
298 .rx = false,
299 .descriptors = 2,
300 .descriptor_elements = 1
301 },
302 {
303 /* Video RX */
304 .rx = true,
305 .bytes_per_line = 1440,
306 .descriptors = 2,
307 .descriptor_elements = 16
308 },
309 {
310 /* Video framedrop */
311 },
312 {
313 /* SDHCI RX */
314 .rx = true,
315 },
316 {
317 /* SDHCI TX */
318 },
319 {
320 /* ETH RX */
321 .rx = true,
322 .descriptors = 2,
323 .descriptor_elements = 1
324 },
325 {
326 /* ETH TX */
327 .rx = false,
328 .descriptors = 2,
329 .descriptor_elements = 1
330 },
331 }
332};
333
273const static __devinitconst struct resource timberdale_dma_resources[] = { 334const static __devinitconst struct resource timberdale_dma_resources[] = {
274 { 335 {
275 .start = DMAOFFSET, 336 .start = DMAOFFSET,
@@ -285,6 +346,13 @@ const static __devinitconst struct resource timberdale_dma_resources[] = {
285 346
286static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { 347static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
287 { 348 {
349 .name = "timb-dma",
350 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
351 .resources = timberdale_dma_resources,
352 .platform_data = &timb_dma_platform_data,
353 .data_size = sizeof(timb_dma_platform_data),
354 },
355 {
288 .name = "timb-uart", 356 .name = "timb-uart",
289 .num_resources = ARRAY_SIZE(timberdale_uart_resources), 357 .num_resources = ARRAY_SIZE(timberdale_uart_resources),
290 .resources = timberdale_uart_resources, 358 .resources = timberdale_uart_resources,
@@ -322,14 +390,16 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
322 .num_resources = ARRAY_SIZE(timberdale_eth_resources), 390 .num_resources = ARRAY_SIZE(timberdale_eth_resources),
323 .resources = timberdale_eth_resources, 391 .resources = timberdale_eth_resources,
324 }, 392 },
393};
394
395static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
325 { 396 {
326 .name = "timb-dma", 397 .name = "timb-dma",
327 .num_resources = ARRAY_SIZE(timberdale_dma_resources), 398 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
328 .resources = timberdale_dma_resources, 399 .resources = timberdale_dma_resources,
400 .platform_data = &timb_dma_platform_data,
401 .data_size = sizeof(timb_dma_platform_data),
329 }, 402 },
330};
331
332static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
333 { 403 {
334 .name = "timb-uart", 404 .name = "timb-uart",
335 .num_resources = ARRAY_SIZE(timberdale_uart_resources), 405 .num_resources = ARRAY_SIZE(timberdale_uart_resources),
@@ -378,14 +448,16 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
378 .num_resources = ARRAY_SIZE(timberdale_eth_resources), 448 .num_resources = ARRAY_SIZE(timberdale_eth_resources),
379 .resources = timberdale_eth_resources, 449 .resources = timberdale_eth_resources,
380 }, 450 },
451};
452
453static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
381 { 454 {
382 .name = "timb-dma", 455 .name = "timb-dma",
383 .num_resources = ARRAY_SIZE(timberdale_dma_resources), 456 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
384 .resources = timberdale_dma_resources, 457 .resources = timberdale_dma_resources,
458 .platform_data = &timb_dma_platform_data,
459 .data_size = sizeof(timb_dma_platform_data),
385 }, 460 },
386};
387
388static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
389 { 461 {
390 .name = "timb-uart", 462 .name = "timb-uart",
391 .num_resources = ARRAY_SIZE(timberdale_uart_resources), 463 .num_resources = ARRAY_SIZE(timberdale_uart_resources),
@@ -419,14 +491,16 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
419 .platform_data = &timberdale_xspi_platform_data, 491 .platform_data = &timberdale_xspi_platform_data,
420 .data_size = sizeof(timberdale_xspi_platform_data), 492 .data_size = sizeof(timberdale_xspi_platform_data),
421 }, 493 },
494};
495
496static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
422 { 497 {
423 .name = "timb-dma", 498 .name = "timb-dma",
424 .num_resources = ARRAY_SIZE(timberdale_dma_resources), 499 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
425 .resources = timberdale_dma_resources, 500 .resources = timberdale_dma_resources,
501 .platform_data = &timb_dma_platform_data,
502 .data_size = sizeof(timb_dma_platform_data),
426 }, 503 },
427};
428
429static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
430 { 504 {
431 .name = "timb-uart", 505 .name = "timb-uart",
432 .num_resources = ARRAY_SIZE(timberdale_uart_resources), 506 .num_resources = ARRAY_SIZE(timberdale_uart_resources),
@@ -465,11 +539,6 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
465 .num_resources = ARRAY_SIZE(timberdale_eth_resources), 539 .num_resources = ARRAY_SIZE(timberdale_eth_resources),
466 .resources = timberdale_eth_resources, 540 .resources = timberdale_eth_resources,
467 }, 541 },
468 {
469 .name = "timb-dma",
470 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
471 .resources = timberdale_dma_resources,
472 },
473}; 542};
474 543
475static const __devinitconst struct resource timberdale_sdhc_resources[] = { 544static const __devinitconst struct resource timberdale_sdhc_resources[] = {
diff --git a/drivers/mfd/timberdale.h b/drivers/mfd/timberdale.h
index 902c45120241..c11bf6ebfe00 100644
--- a/drivers/mfd/timberdale.h
+++ b/drivers/mfd/timberdale.h
@@ -23,7 +23,7 @@
23#ifndef MFD_TIMBERDALE_H 23#ifndef MFD_TIMBERDALE_H
24#define MFD_TIMBERDALE_H 24#define MFD_TIMBERDALE_H
25 25
26#define DRV_VERSION "0.1" 26#define DRV_VERSION "0.2"
27 27
28/* This driver only support versions >= 3.8 and < 4.0 */ 28/* This driver only support versions >= 3.8 and < 4.0 */
29#define TIMB_SUPPORTED_MAJOR 3 29#define TIMB_SUPPORTED_MAJOR 3
@@ -127,4 +127,16 @@
127#define GPIO_PIN_BT_RST 15 127#define GPIO_PIN_BT_RST 15
128#define GPIO_NR_PINS 16 128#define GPIO_NR_PINS 16
129 129
130/* DMA Channels */
131#define DMA_UART_RX 0
132#define DMA_UART_TX 1
133#define DMA_MLB_RX 2
134#define DMA_MLB_TX 3
135#define DMA_VIDEO_RX 4
136#define DMA_VIDEO_DROP 5
137#define DMA_SDHCI_RX 6
138#define DMA_SDHCI_TX 7
139#define DMA_ETH_RX 8
140#define DMA_ETH_TX 9
141
130#endif 142#endif