From d8006eead13b16a2cd2fbaa0bcf07a6944798344 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 15 Apr 2008 12:12:36 -0300 Subject: > Please, re-generate the affected V4L/DVB patches, without the PXA part. I'll > keep those changes on hold, until I get a confirmation that the PXA side is > committed on mainstream. Reverted several changes on soc_camera From: Mauro Carvalho Chehab As asked by Guennadi: Mauro, please, drop commits 2f4a87873f13924871d7bb82e27d02d0e16fbe02 and 9b7d577c508e7765860e599c0e98d4ac3fbaa2aa from your tree and replace 5f1e5244ee6b9f139a262d5e7a930a41488afbbe with the version below. Due to that change, that happened on v4l-dvb -git tree, several patches broke. This patch reverts all broken stuff, keeping this tree in sync with v4l-dvb -git tree. I'm waiting for Guennadi to fix the broken patches and ask me to pull them again. Signed-off-by: Mauro Carvalho Chehab --- linux/arch/arm/mach-pxa/devices.c | 32 ----------- linux/arch/arm/mach-pxa/pcm990-baseboard.c | 86 ------------------------------ 2 files changed, 118 deletions(-) (limited to 'linux/arch') diff --git a/linux/arch/arm/mach-pxa/devices.c b/linux/arch/arm/mach-pxa/devices.c index 3838aabdf..bfccb80ac 100644 --- a/linux/arch/arm/mach-pxa/devices.c +++ b/linux/arch/arm/mach-pxa/devices.c @@ -11,7 +11,6 @@ #include #include #include -#include #include "devices.h" @@ -541,37 +540,6 @@ struct platform_device pxa27x_device_ssp3 = { .resource = pxa27x_resource_ssp3, .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), }; - -static struct resource pxa27x_resource_camera[] = { - [0] = { - .start = 0x50000000, - .end = 0x50000fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_CAMERA, - .end = IRQ_CAMERA, - .flags = IORESOURCE_IRQ, - }, -}; - -static u64 pxa27x_dma_mask_camera = DMA_BIT_MASK(32); - -static struct platform_device pxa27x_device_camera = { - .name = "pxa27x-camera", - .id = 0, /* This is used to put cameras on this interface */ - .dev = { - .dma_mask = &pxa27x_dma_mask_camera, - .coherent_dma_mask = 0xffffffff, - }, - .num_resources = ARRAY_SIZE(pxa27x_resource_camera), - .resource = pxa27x_resource_camera, -}; - -void __init pxa_set_camera_info(struct pxacamera_platform_data *info) -{ - pxa_register_device(&pxa27x_device_camera, info); -} #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */ #ifdef CONFIG_PXA3xx diff --git a/linux/arch/arm/mach-pxa/pcm990-baseboard.c b/linux/arch/arm/mach-pxa/pcm990-baseboard.c index 07ac050f2..3dda16a20 100644 --- a/linux/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/linux/arch/arm/mach-pxa/pcm990-baseboard.c @@ -23,13 +23,6 @@ #include #include #include -#include - -#include - -#include -#include -#include #include #include #include @@ -264,76 +257,6 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = { .exit = NULL, }; -/* - * PXA27x Camera specific stuff - */ -#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) -static int pcm990_pxacamera_init(struct device *dev) -{ - pxa_gpio_mode(GPIO98_CIF_DD0_MD); - pxa_gpio_mode(GPIO105_CIF_DD1_MD); - pxa_gpio_mode(GPIO104_CIF_DD2_MD); - pxa_gpio_mode(GPIO103_CIF_DD3_MD); - pxa_gpio_mode(GPIO95_CIF_DD4_MD); - pxa_gpio_mode(GPIO94_CIF_DD5_MD); - pxa_gpio_mode(GPIO93_CIF_DD6_MD); - pxa_gpio_mode(GPIO108_CIF_DD7_MD); - pxa_gpio_mode(GPIO107_CIF_DD8_MD); - pxa_gpio_mode(GPIO106_CIF_DD9_MD); - pxa_gpio_mode(GPIO42_CIF_MCLK_MD); - pxa_gpio_mode(GPIO45_CIF_PCLK_MD); - pxa_gpio_mode(GPIO43_CIF_FV_MD); - pxa_gpio_mode(GPIO44_CIF_LV_MD); - - return 0; -} - -/* - * CICR4: PCLK_EN: Pixel clock is supplied by the sensor - * MCLK_EN: Master clock is generated by PXA - * PCP: Data sampled on the falling edge of pixel clock - */ -struct pxacamera_platform_data pcm990_pxacamera_platform_data = { - .init = pcm990_pxacamera_init, - .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 | - PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/, - .mclk_10khz = 1000, -}; - -#include - -static struct pca953x_platform_data pca9536_data = { - .gpio_base = NR_BUILTIN_GPIO + 1, -}; - -static struct soc_camera_link iclink[] = { - { - .bus_id = 0, /* Must match with the camera ID above */ - .gpio = NR_BUILTIN_GPIO + 1, - }, { - .bus_id = 0, /* Must match with the camera ID above */ - } -}; - -/* Board I2C devices. */ -static struct i2c_board_info __initdata pcm990_i2c_devices[] = { - { - /* Must initialize before the camera(s) */ - I2C_BOARD_INFO("pca953x", 0x41), - .type = "pca9536", - .platform_data = &pca9536_data, - }, { - I2C_BOARD_INFO("mt9v022", 0x48), - .type = "mt9v022", - .platform_data = &iclink[0], /* With extender */ - }, { - I2C_BOARD_INFO("mt9m001", 0x5d), - .type = "mt9m001", - .platform_data = &iclink[0], /* With extender */ - }, -}; -#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ - /* * AC97 support * Note: The connected AC97 mixer also reports interrupts at PCM990_AC97_IRQ @@ -403,14 +326,5 @@ void __init pcm990_baseboard_init(void) /* USB host */ pxa_set_ohci_info(&pcm990_ohci_platform_data); - pxa_set_i2c_info(NULL); - -#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) - pxa_set_camera_info(&pcm990_pxacamera_platform_data); - - i2c_register_board_info(0, pcm990_i2c_devices, - ARRAY_SIZE(pcm990_i2c_devices)); -#endif - printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n"); } -- cgit v1.2.3 From 93bee01e0e68bc7de364f39951aea01720da1a5e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 26 Apr 2008 14:14:26 -0300 Subject: Sync arm files From: Mauro Carvalho Chehab kernel-sync: Signed-off-by: Mauro Carvalho Chehab --- linux/arch/arm/mach-pxa/devices.c | 58 ++++++++++++++++++++ linux/arch/arm/mach-pxa/pcm990-baseboard.c | 87 ++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) (limited to 'linux/arch') diff --git a/linux/arch/arm/mach-pxa/devices.c b/linux/arch/arm/mach-pxa/devices.c index bfccb80ac..d6c05b6ea 100644 --- a/linux/arch/arm/mach-pxa/devices.c +++ b/linux/arch/arm/mach-pxa/devices.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include "devices.h" @@ -396,6 +398,31 @@ struct platform_device pxa25x_device_assp = { #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) +static struct resource pxa27x_resource_keypad[] = { + [0] = { + .start = 0x41500000, + .end = 0x4150004c, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_KEYPAD, + .end = IRQ_KEYPAD, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device pxa27x_device_keypad = { + .name = "pxa27x-keypad", + .id = -1, + .resource = pxa27x_resource_keypad, + .num_resources = ARRAY_SIZE(pxa27x_resource_keypad), +}; + +void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info) +{ + pxa_register_device(&pxa27x_device_keypad, info); +} + static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32); static struct resource pxa27x_resource_ohci[] = { @@ -540,6 +567,37 @@ struct platform_device pxa27x_device_ssp3 = { .resource = pxa27x_resource_ssp3, .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), }; + +static struct resource pxa27x_resource_camera[] = { + [0] = { + .start = 0x50000000, + .end = 0x50000fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_CAMERA, + .end = IRQ_CAMERA, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 pxa27x_dma_mask_camera = DMA_BIT_MASK(32); + +static struct platform_device pxa27x_device_camera = { + .name = "pxa27x-camera", + .id = 0, /* This is used to put cameras on this interface */ + .dev = { + .dma_mask = &pxa27x_dma_mask_camera, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(pxa27x_resource_camera), + .resource = pxa27x_resource_camera, +}; + +void __init pxa_set_camera_info(struct pxacamera_platform_data *info) +{ + pxa_register_device(&pxa27x_device_camera, info); +} #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */ #ifdef CONFIG_PXA3xx diff --git a/linux/arch/arm/mach-pxa/pcm990-baseboard.c b/linux/arch/arm/mach-pxa/pcm990-baseboard.c index 3dda16a20..e6be9d0ae 100644 --- a/linux/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/linux/arch/arm/mach-pxa/pcm990-baseboard.c @@ -23,8 +23,16 @@ #include #include #include +#include + +#include + +#include +#include +#include #include #include +#include #include #include #include @@ -257,6 +265,76 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = { .exit = NULL, }; +/* + * PXA27x Camera specific stuff + */ +#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) +static int pcm990_pxacamera_init(struct device *dev) +{ + pxa_gpio_mode(GPIO98_CIF_DD_0_MD); + pxa_gpio_mode(GPIO105_CIF_DD_1_MD); + pxa_gpio_mode(GPIO104_CIF_DD_2_MD); + pxa_gpio_mode(GPIO103_CIF_DD_3_MD); + pxa_gpio_mode(GPIO95_CIF_DD_4_MD); + pxa_gpio_mode(GPIO94_CIF_DD_5_MD); + pxa_gpio_mode(GPIO93_CIF_DD_6_MD); + pxa_gpio_mode(GPIO108_CIF_DD_7_MD); + pxa_gpio_mode(GPIO107_CIF_DD_8_MD); + pxa_gpio_mode(GPIO106_CIF_DD_9_MD); + pxa_gpio_mode(GPIO42_CIF_MCLK_MD); + pxa_gpio_mode(GPIO45_CIF_PCLK_MD); + pxa_gpio_mode(GPIO43_CIF_FV_MD); + pxa_gpio_mode(GPIO44_CIF_LV_MD); + + return 0; +} + +/* + * CICR4: PCLK_EN: Pixel clock is supplied by the sensor + * MCLK_EN: Master clock is generated by PXA + * PCP: Data sampled on the falling edge of pixel clock + */ +struct pxacamera_platform_data pcm990_pxacamera_platform_data = { + .init = pcm990_pxacamera_init, + .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 | + PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/, + .mclk_10khz = 1000, +}; + +#include + +static struct pca953x_platform_data pca9536_data = { + .gpio_base = NR_BUILTIN_GPIO + 1, +}; + +static struct soc_camera_link iclink[] = { + { + .bus_id = 0, /* Must match with the camera ID above */ + .gpio = NR_BUILTIN_GPIO + 1, + }, { + .bus_id = 0, /* Must match with the camera ID above */ + } +}; + +/* Board I2C devices. */ +static struct i2c_board_info __initdata pcm990_i2c_devices[] = { + { + /* Must initialize before the camera(s) */ + I2C_BOARD_INFO("pca953x", 0x41), + .type = "pca9536", + .platform_data = &pca9536_data, + }, { + I2C_BOARD_INFO("mt9v022", 0x48), + .type = "mt9v022", + .platform_data = &iclink[0], /* With extender */ + }, { + I2C_BOARD_INFO("mt9m001", 0x5d), + .type = "mt9m001", + .platform_data = &iclink[0], /* With extender */ + }, +}; +#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ + /* * AC97 support * Note: The connected AC97 mixer also reports interrupts at PCM990_AC97_IRQ @@ -326,5 +404,14 @@ void __init pcm990_baseboard_init(void) /* USB host */ pxa_set_ohci_info(&pcm990_ohci_platform_data); + pxa_set_i2c_info(NULL); + +#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) + pxa_set_camera_info(&pcm990_pxacamera_platform_data); + + i2c_register_board_info(0, pcm990_i2c_devices, + ARRAY_SIZE(pcm990_i2c_devices)); +#endif + printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n"); } -- cgit v1.2.3 From ade6577c13a32eaef761a14550dd18af91b8ace3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 2 May 2008 00:30:44 -0300 Subject: backport commit 3760f736716f74bdc62a4ba5406934338da93eb2 Author: Jean Delvare Date: Tue Apr 29 23:11:40 2008 +0200 i2c: Convert most new-style drivers to use module aliasing Based on earlier work by Jon Smirl and Jochen Friedrich. Update most new-style i2c drivers to use standard module aliasing instead of the old driver_name/type driver matching scheme. I've left the video drivers apart (except for SoC camera drivers) as they're a bit more diffcult to deal with, they'll have their own patch later. kernel-sync: Signed-off-by: Mauro Carvalho Chehab --- linux/arch/arm/mach-pxa/pcm990-baseboard.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'linux/arch') diff --git a/linux/arch/arm/mach-pxa/pcm990-baseboard.c b/linux/arch/arm/mach-pxa/pcm990-baseboard.c index e6be9d0ae..49d951db0 100644 --- a/linux/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/linux/arch/arm/mach-pxa/pcm990-baseboard.c @@ -320,16 +320,13 @@ static struct soc_camera_link iclink[] = { static struct i2c_board_info __initdata pcm990_i2c_devices[] = { { /* Must initialize before the camera(s) */ - I2C_BOARD_INFO("pca953x", 0x41), - .type = "pca9536", + I2C_BOARD_INFO("pca9536", 0x41), .platform_data = &pca9536_data, }, { I2C_BOARD_INFO("mt9v022", 0x48), - .type = "mt9v022", .platform_data = &iclink[0], /* With extender */ }, { I2C_BOARD_INFO("mt9m001", 0x5d), - .type = "mt9m001", .platform_data = &iclink[0], /* With extender */ }, }; -- cgit v1.2.3