Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199381
b: refs/heads/master
c: dc64f30
h: refs/heads/master
i:
  199379: 9fca944
v: v3
  • Loading branch information
Richard Röjfors authored and Samuel Ortiz committed May 27, 2010
1 parent e25d449 commit 4ce672b
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 872c1b14e78661086ade8b501888850da2636eee
refs/heads/master: dc64f30fa557ab1108e97e499a9acc550baa38bc
97 changes: 83 additions & 14 deletions trunk/drivers/mfd/timberdale.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

#include <media/timb_radio.h>

#include <linux/timb_dma.h>

#include "timberdale.h"

#define DRIVER_NAME "timberdale"
Expand Down Expand Up @@ -270,6 +272,65 @@ static __devinitdata struct timb_radio_platform_data
}
};

static __devinitdata struct timb_dma_platform_data timb_dma_platform_data = {
.nr_channels = 10,
.channels = {
{
/* UART RX */
.rx = true,
.descriptors = 2,
.descriptor_elements = 1
},
{
/* UART TX */
.rx = false,
.descriptors = 2,
.descriptor_elements = 1
},
{
/* MLB RX */
.rx = true,
.descriptors = 2,
.descriptor_elements = 1
},
{
/* MLB TX */
.rx = false,
.descriptors = 2,
.descriptor_elements = 1
},
{
/* Video RX */
.rx = true,
.bytes_per_line = 1440,
.descriptors = 2,
.descriptor_elements = 16
},
{
/* Video framedrop */
},
{
/* SDHCI RX */
.rx = true,
},
{
/* SDHCI TX */
},
{
/* ETH RX */
.rx = true,
.descriptors = 2,
.descriptor_elements = 1
},
{
/* ETH TX */
.rx = false,
.descriptors = 2,
.descriptor_elements = 1
},
}
};

const static __devinitconst struct resource timberdale_dma_resources[] = {
{
.start = DMAOFFSET,
Expand All @@ -284,6 +345,13 @@ const static __devinitconst struct resource timberdale_dma_resources[] = {
};

static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
{
.name = "timb-dma",
.num_resources = ARRAY_SIZE(timberdale_dma_resources),
.resources = timberdale_dma_resources,
.platform_data = &timb_dma_platform_data,
.data_size = sizeof(timb_dma_platform_data),
},
{
.name = "timb-uart",
.num_resources = ARRAY_SIZE(timberdale_uart_resources),
Expand Down Expand Up @@ -322,14 +390,16 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
.num_resources = ARRAY_SIZE(timberdale_eth_resources),
.resources = timberdale_eth_resources,
},
};

static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
{
.name = "timb-dma",
.num_resources = ARRAY_SIZE(timberdale_dma_resources),
.resources = timberdale_dma_resources,
.platform_data = &timb_dma_platform_data,
.data_size = sizeof(timb_dma_platform_data),
},
};

static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
{
.name = "timb-uart",
.num_resources = ARRAY_SIZE(timberdale_uart_resources),
Expand Down Expand Up @@ -378,14 +448,16 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
.num_resources = ARRAY_SIZE(timberdale_eth_resources),
.resources = timberdale_eth_resources,
},
};

static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
{
.name = "timb-dma",
.num_resources = ARRAY_SIZE(timberdale_dma_resources),
.resources = timberdale_dma_resources,
.platform_data = &timb_dma_platform_data,
.data_size = sizeof(timb_dma_platform_data),
},
};

static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
{
.name = "timb-uart",
.num_resources = ARRAY_SIZE(timberdale_uart_resources),
Expand Down Expand Up @@ -419,14 +491,16 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
.platform_data = &timberdale_xspi_platform_data,
.data_size = sizeof(timberdale_xspi_platform_data),
},
};

static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
{
.name = "timb-dma",
.num_resources = ARRAY_SIZE(timberdale_dma_resources),
.resources = timberdale_dma_resources,
.platform_data = &timb_dma_platform_data,
.data_size = sizeof(timb_dma_platform_data),
},
};

static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
{
.name = "timb-uart",
.num_resources = ARRAY_SIZE(timberdale_uart_resources),
Expand Down Expand Up @@ -465,11 +539,6 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
.num_resources = ARRAY_SIZE(timberdale_eth_resources),
.resources = timberdale_eth_resources,
},
{
.name = "timb-dma",
.num_resources = ARRAY_SIZE(timberdale_dma_resources),
.resources = timberdale_dma_resources,
},
};

static const __devinitconst struct resource timberdale_sdhc_resources[] = {
Expand Down
14 changes: 13 additions & 1 deletion trunk/drivers/mfd/timberdale.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef MFD_TIMBERDALE_H
#define MFD_TIMBERDALE_H

#define DRV_VERSION "0.1"
#define DRV_VERSION "0.2"

/* This driver only support versions >= 3.8 and < 4.0 */
#define TIMB_SUPPORTED_MAJOR 3
Expand Down Expand Up @@ -127,4 +127,16 @@
#define GPIO_PIN_BT_RST 15
#define GPIO_NR_PINS 16

/* DMA Channels */
#define DMA_UART_RX 0
#define DMA_UART_TX 1
#define DMA_MLB_RX 2
#define DMA_MLB_TX 3
#define DMA_VIDEO_RX 4
#define DMA_VIDEO_DROP 5
#define DMA_SDHCI_RX 6
#define DMA_SDHCI_TX 7
#define DMA_ETH_RX 8
#define DMA_ETH_TX 9

#endif

0 comments on commit 4ce672b

Please sign in to comment.