commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=1a51ce76672442fc24be48593ca8b5a2c8f4b9c1
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk

ppi_info contains ppi board info

Signed-off-by: Scott Jiang <[email protected]>
---
 arch/blackfin/mach-bf537/boards/stamp.c |   48 +++++++++---------------------
 1 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index f026351..0c3b626 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -1557,37 +1557,23 @@ static struct platform_device bfin_lq035q1_device = {
 };
 #endif
 
-#if defined(CONFIG_VIDEO_BLACKFIN_PPI) \
-	|| defined(CONFIG_VIDEO_BLACKFIN_PPI_MODULE)
-static struct resource bfin_ppi_resources[] = {
-	{
-		.start = CH_PPI,
-		.end   = CH_PPI,
-		.flags = IORESOURCE_DMA,
-	},
-	{
-		.start = IRQ_PPI_ERROR,
-		.end   = IRQ_PPI_ERROR,
-		.flags = IORESOURCE_IRQ,
-	},
-	{
-		.start = PPI_CONTROL,
-		.end   = PPI_FRAME + 3,
-		.flags = IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device bfin_ppi_device = {
-	.name          = "ppi",
-	.id            = -1,
-	.num_resources = ARRAY_SIZE(bfin_ppi_resources),
-	.resource      = bfin_ppi_resources,
-};
-#endif
-
 #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
 	|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
 #include <media/blackfin/bfin_capture.h>
+static const unsigned short ppi_req[] = {
+	P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
+	P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
+	P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
+	0,
+};
+
+static const struct ppi_info ppi_info = {
+	.name = "ppi",
+	.dma_ch = CH_PPI,
+	.irq_err = IRQ_PPI_ERROR,
+	.base = PPI_CONTROL,
+	.pin_req = ppi_req,
+};
 
 #if defined(CONFIG_VIDEO_VS6624) \
 	|| defined(CONFIG_VIDEO_VS6624_MODULE)
@@ -1620,6 +1606,7 @@ static struct bfin_capture_config bfin_capture_data = {
 		.addr = 0x10,
 		.platform_data = (void *)&vs6624_ce_pin,
 	},
+	.ppi_info = &ppi_info,
 	.ppi_control = (PACK_EN | DLEN_8 | XFR_TYPE | 0x0020),
 };
 #endif
@@ -2810,11 +2797,6 @@ static struct platform_device *stamp_devices[] __initdata = {
 	&bfin_capture_device,
 #endif
 
-#if defined(CONFIG_VIDEO_BLACKFIN_PPI) \
-	|| defined(CONFIG_VIDEO_BLACKFIN_PPI_MODULE)
-	&bfin_ppi_device,
-#endif
-
 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
 #ifdef CONFIG_SERIAL_BFIN_UART0
 	&bfin_uart0_device,
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to