aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/timberdale.c
diff options
context:
space:
mode:
authorRichard Röjfors <richard.rojfors@pelagicore.com>2010-11-08 08:45:48 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:46 -0500
commitc091575c8b35b39b8f271e0d4b692329a705240a (patch)
treef8a20751423dee07c8492e19176d0f5c3b8632c4 /drivers/mfd/timberdale.c
parent9eae42e5a216059a146b3fbbe24b4fdc0b10c723 (diff)
[media] mfd: Add timberdale video-in driver to timberdale
This patch defines platform data for the video-in driver and adds it to all configurations of timberdale. Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/mfd/timberdale.c')
-rw-r--r--drivers/mfd/timberdale.c59
1 files changed, 58 insertions, 1 deletions
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index e948a2b45b86..6ad8a7f8d390 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -40,6 +40,7 @@
40#include <linux/spi/mc33880.h> 40#include <linux/spi/mc33880.h>
41 41
42#include <media/timb_radio.h> 42#include <media/timb_radio.h>
43#include <media/timb_video.h>
43 44
44#include <linux/timb_dma.h> 45#include <linux/timb_dma.h>
45 46
@@ -246,7 +247,23 @@ static const __devinitconst struct resource timberdale_uartlite_resources[] = {
246 }, 247 },
247}; 248};
248 249
249static const __devinitconst struct resource timberdale_radio_resources[] = { 250static __devinitdata struct i2c_board_info timberdale_adv7180_i2c_board_info = {
251 /* Requires jumper JP9 to be off */
252 I2C_BOARD_INFO("adv7180", 0x42 >> 1),
253 .irq = IRQ_TIMBERDALE_ADV7180
254};
255
256static __devinitdata struct timb_video_platform_data
257 timberdale_video_platform_data = {
258 .dma_channel = DMA_VIDEO_RX,
259 .i2c_adapter = 0,
260 .encoder = {
261 .info = &timberdale_adv7180_i2c_board_info
262 }
263};
264
265static const __devinitconst struct resource
266timberdale_radio_resources[] = {
250 { 267 {
251 .start = RDSOFFSET, 268 .start = RDSOFFSET,
252 .end = RDSEND, 269 .end = RDSEND,
@@ -278,6 +295,18 @@ static __devinitdata struct timb_radio_platform_data
278 } 295 }
279}; 296};
280 297
298static const __devinitconst struct resource timberdale_video_resources[] = {
299 {
300 .start = LOGIWOFFSET,
301 .end = LOGIWEND,
302 .flags = IORESOURCE_MEM,
303 },
304 /*
305 note that the "frame buffer" is located in DMA area
306 starting at 0x1200000
307 */
308};
309
281static __devinitdata struct timb_dma_platform_data timb_dma_platform_data = { 310static __devinitdata struct timb_dma_platform_data timb_dma_platform_data = {
282 .nr_channels = 10, 311 .nr_channels = 10,
283 .channels = { 312 .channels = {
@@ -378,6 +407,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
378 .data_size = sizeof(timberdale_gpio_platform_data), 407 .data_size = sizeof(timberdale_gpio_platform_data),
379 }, 408 },
380 { 409 {
410 .name = "timb-video",
411 .num_resources = ARRAY_SIZE(timberdale_video_resources),
412 .resources = timberdale_video_resources,
413 .platform_data = &timberdale_video_platform_data,
414 .data_size = sizeof(timberdale_video_platform_data),
415 },
416 {
381 .name = "timb-radio", 417 .name = "timb-radio",
382 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 418 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
383 .resources = timberdale_radio_resources, 419 .resources = timberdale_radio_resources,
@@ -438,6 +474,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
438 .resources = timberdale_mlogicore_resources, 474 .resources = timberdale_mlogicore_resources,
439 }, 475 },
440 { 476 {
477 .name = "timb-video",
478 .num_resources = ARRAY_SIZE(timberdale_video_resources),
479 .resources = timberdale_video_resources,
480 .platform_data = &timberdale_video_platform_data,
481 .data_size = sizeof(timberdale_video_platform_data),
482 },
483 {
441 .name = "timb-radio", 484 .name = "timb-radio",
442 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 485 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
443 .resources = timberdale_radio_resources, 486 .resources = timberdale_radio_resources,
@@ -488,6 +531,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
488 .data_size = sizeof(timberdale_gpio_platform_data), 531 .data_size = sizeof(timberdale_gpio_platform_data),
489 }, 532 },
490 { 533 {
534 .name = "timb-video",
535 .num_resources = ARRAY_SIZE(timberdale_video_resources),
536 .resources = timberdale_video_resources,
537 .platform_data = &timberdale_video_platform_data,
538 .data_size = sizeof(timberdale_video_platform_data),
539 },
540 {
491 .name = "timb-radio", 541 .name = "timb-radio",
492 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 542 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
493 .resources = timberdale_radio_resources, 543 .resources = timberdale_radio_resources,
@@ -531,6 +581,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
531 .data_size = sizeof(timberdale_gpio_platform_data), 581 .data_size = sizeof(timberdale_gpio_platform_data),
532 }, 582 },
533 { 583 {
584 .name = "timb-video",
585 .num_resources = ARRAY_SIZE(timberdale_video_resources),
586 .resources = timberdale_video_resources,
587 .platform_data = &timberdale_video_platform_data,
588 .data_size = sizeof(timberdale_video_platform_data),
589 },
590 {
534 .name = "timb-radio", 591 .name = "timb-radio",
535 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 592 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
536 .resources = timberdale_radio_resources, 593 .resources = timberdale_radio_resources,