aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537/boards/stamp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/stamp.c')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c78
1 files changed, 74 insertions, 4 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 7fbb0bbf867..2221173e489 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -1420,7 +1420,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1420#endif 1420#endif
1421}; 1421};
1422 1422
1423#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1423#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
1424/* SPI controller data */ 1424/* SPI controller data */
1425static struct bfin5xx_spi_master bfin_spi0_info = { 1425static struct bfin5xx_spi_master bfin_spi0_info = {
1426 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, 1426 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
@@ -1462,7 +1462,7 @@ static struct platform_device bfin_spi0_device = {
1462 1462
1463/* SPORT SPI controller data */ 1463/* SPORT SPI controller data */
1464static struct bfin5xx_spi_master bfin_sport_spi0_info = { 1464static struct bfin5xx_spi_master bfin_sport_spi0_info = {
1465 .num_chipselect = 1, /* master only supports one device */ 1465 .num_chipselect = MAX_BLACKFIN_GPIOS,
1466 .enable_dma = 0, /* master don't support DMA */ 1466 .enable_dma = 0, /* master don't support DMA */
1467 .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI, 1467 .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI,
1468 P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0}, 1468 P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0},
@@ -1492,7 +1492,7 @@ static struct platform_device bfin_sport_spi0_device = {
1492}; 1492};
1493 1493
1494static struct bfin5xx_spi_master bfin_sport_spi1_info = { 1494static struct bfin5xx_spi_master bfin_sport_spi1_info = {
1495 .num_chipselect = 1, /* master only supports one device */ 1495 .num_chipselect = MAX_BLACKFIN_GPIOS,
1496 .enable_dma = 0, /* master don't support DMA */ 1496 .enable_dma = 0, /* master don't support DMA */
1497 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI, 1497 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI,
1498 P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0}, 1498 P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0},
@@ -1558,6 +1558,71 @@ static struct platform_device bfin_lq035q1_device = {
1558}; 1558};
1559#endif 1559#endif
1560 1560
1561#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
1562 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1563#include <linux/videodev2.h>
1564#include <media/blackfin/bfin_capture.h>
1565#include <media/blackfin/ppi.h>
1566
1567static const unsigned short ppi_req[] = {
1568 P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
1569 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
1570 P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
1571 0,
1572};
1573
1574static const struct ppi_info ppi_info = {
1575 .type = PPI_TYPE_PPI,
1576 .dma_ch = CH_PPI,
1577 .irq_err = IRQ_PPI_ERROR,
1578 .base = (void __iomem *)PPI_CONTROL,
1579 .pin_req = ppi_req,
1580};
1581
1582#if defined(CONFIG_VIDEO_VS6624) \
1583 || defined(CONFIG_VIDEO_VS6624_MODULE)
1584static struct v4l2_input vs6624_inputs[] = {
1585 {
1586 .index = 0,
1587 .name = "Camera",
1588 .type = V4L2_INPUT_TYPE_CAMERA,
1589 .std = V4L2_STD_UNKNOWN,
1590 },
1591};
1592
1593static struct bcap_route vs6624_routes[] = {
1594 {
1595 .input = 0,
1596 .output = 0,
1597 },
1598};
1599
1600static const unsigned vs6624_ce_pin = GPIO_PF10;
1601
1602static struct bfin_capture_config bfin_capture_data = {
1603 .card_name = "BF537",
1604 .inputs = vs6624_inputs,
1605 .num_inputs = ARRAY_SIZE(vs6624_inputs),
1606 .routes = vs6624_routes,
1607 .i2c_adapter_id = 0,
1608 .board_info = {
1609 .type = "vs6624",
1610 .addr = 0x10,
1611 .platform_data = (void *)&vs6624_ce_pin,
1612 },
1613 .ppi_info = &ppi_info,
1614 .ppi_control = (PACK_EN | DLEN_8 | XFR_TYPE | 0x0020),
1615};
1616#endif
1617
1618static struct platform_device bfin_capture_device = {
1619 .name = "bfin_capture",
1620 .dev = {
1621 .platform_data = &bfin_capture_data,
1622 },
1623};
1624#endif
1625
1561#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1626#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1562#ifdef CONFIG_SERIAL_BFIN_UART0 1627#ifdef CONFIG_SERIAL_BFIN_UART0
1563static struct resource bfin_uart0_resources[] = { 1628static struct resource bfin_uart0_resources[] = {
@@ -2716,7 +2781,7 @@ static struct platform_device *stamp_devices[] __initdata = {
2716 &net2272_bfin_device, 2781 &net2272_bfin_device,
2717#endif 2782#endif
2718 2783
2719#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 2784#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
2720 &bfin_spi0_device, 2785 &bfin_spi0_device,
2721#endif 2786#endif
2722 2787
@@ -2733,6 +2798,11 @@ static struct platform_device *stamp_devices[] __initdata = {
2733 &bfin_lq035q1_device, 2798 &bfin_lq035q1_device,
2734#endif 2799#endif
2735 2800
2801#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
2802 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
2803 &bfin_capture_device,
2804#endif
2805
2736#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 2806#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
2737#ifdef CONFIG_SERIAL_BFIN_UART0 2807#ifdef CONFIG_SERIAL_BFIN_UART0
2738 &bfin_uart0_device, 2808 &bfin_uart0_device,