mfd: Use DMA for timberdale's ks8842
authorRichard Röjfors <richard.rojfors@pelagicore.com>
Wed, 15 Sep 2010 14:49:24 +0000 (16:49 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Oct 2010 22:29:36 +0000 (00:29 +0200)
This patch defines platform data for the ks8842 int the timberdale
MFD.
The platform data contains DMA channels to be used by the driver.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/timberdale.c

index ac5995026c8836f392806293a6092c4f1ce30ac7..727f62c15a6055612b0f4939d55474ff7b440d23 100644 (file)
@@ -43,6 +43,8 @@
 
 #include <linux/timb_dma.h>
 
+#include <linux/ks8842.h>
+
 #include "timberdale.h"
 
 #define DRIVER_NAME "timberdale"
@@ -161,6 +163,12 @@ static const __devinitconst struct resource timberdale_spi_resources[] = {
        },
 };
 
+static __devinitdata struct ks8842_platform_data
+       timberdale_ks8842_platform_data = {
+       .rx_dma_channel = DMA_ETH_RX,
+       .tx_dma_channel = DMA_ETH_TX
+};
+
 static const __devinitconst struct resource timberdale_eth_resources[] = {
        {
                .start  = ETHOFFSET,
@@ -389,6 +397,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
                .name = "ks8842",
                .num_resources = ARRAY_SIZE(timberdale_eth_resources),
                .resources = timberdale_eth_resources,
+               .platform_data = &timberdale_ks8842_platform_data,
+               .data_size = sizeof(timberdale_ks8842_platform_data)
        },
 };
 
@@ -447,6 +457,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
                .name = "ks8842",
                .num_resources = ARRAY_SIZE(timberdale_eth_resources),
                .resources = timberdale_eth_resources,
+               .platform_data = &timberdale_ks8842_platform_data,
+               .data_size = sizeof(timberdale_ks8842_platform_data)
        },
 };
 
@@ -538,6 +550,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
                .name = "ks8842",
                .num_resources = ARRAY_SIZE(timberdale_eth_resources),
                .resources = timberdale_eth_resources,
+               .platform_data = &timberdale_ks8842_platform_data,
+               .data_size = sizeof(timberdale_ks8842_platform_data)
        },
 };