linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: at91: remove ISI code for AT91SAM9263
@ 2014-05-15  8:34 Paul Bolle
  2014-05-16  3:04 ` Josh Wu
  2014-05-16  7:49 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Bolle @ 2014-05-15  8:34 UTC (permalink / raw)
  To: Andrew Victor, Nicolas Ferre, Jean-Christophe Plagniol-Villard,
	Russell King
  Cc: linux-arm-kernel, linux-kernel

In v2.6.25 code was added for an Image Sensor Interface (ISI) for
AT91SAM9263. That code depended on the Kconfig macro
CONFIG_VIDEO_AT91_ISI and its MODULE variant. The related Kconfig symbol
has never been added to the tree. The net effect of this was that
at91_add_device_isi() was a NOP. No one noticed because no callers of
that function were added to the tree at that time.

The first caller of a function with that name was added in v3.4. But
that caller apparently only called the function defined for AT91SAM9G45.
(that function was also added in v3.4). So even then AT91SAM9263's NOP
version of at91_add_device_isi() remained unused. This means that the
ISI code for AT91SAM9263 can be removed.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Untested!

Could someone please verify that this definition of
at91_add_device_isi() really never will be called.

 arch/arm/mach-at91/at91sam9263_devices.c | 57 --------------------------------
 1 file changed, 57 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 43d53d6156dd..f2dab0a872a1 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -897,63 +897,6 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
 

 /* --------------------------------------------------------------------
- *  Image Sensor Interface
- * -------------------------------------------------------------------- */
-
-#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
-
-struct resource isi_resources[] = {
-	[0] = {
-		.start	= AT91SAM9263_BASE_ISI,
-		.end	= AT91SAM9263_BASE_ISI + SZ_16K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
-		.end	= NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-static struct platform_device at91sam9263_isi_device = {
-	.name		= "at91_isi",
-	.id		= -1,
-	.resource	= isi_resources,
-	.num_resources	= ARRAY_SIZE(isi_resources),
-};
-
-void __init at91_add_device_isi(struct isi_platform_data *data,
-		bool use_pck_as_mck)
-{
-	at91_set_A_periph(AT91_PIN_PE0, 0);	/* ISI_D0 */
-	at91_set_A_periph(AT91_PIN_PE1, 0);	/* ISI_D1 */
-	at91_set_A_periph(AT91_PIN_PE2, 0);	/* ISI_D2 */
-	at91_set_A_periph(AT91_PIN_PE3, 0);	/* ISI_D3 */
-	at91_set_A_periph(AT91_PIN_PE4, 0);	/* ISI_D4 */
-	at91_set_A_periph(AT91_PIN_PE5, 0);	/* ISI_D5 */
-	at91_set_A_periph(AT91_PIN_PE6, 0);	/* ISI_D6 */
-	at91_set_A_periph(AT91_PIN_PE7, 0);	/* ISI_D7 */
-	at91_set_A_periph(AT91_PIN_PE8, 0);	/* ISI_PCK */
-	at91_set_A_periph(AT91_PIN_PE9, 0);	/* ISI_HSYNC */
-	at91_set_A_periph(AT91_PIN_PE10, 0);	/* ISI_VSYNC */
-	at91_set_B_periph(AT91_PIN_PE12, 0);	/* ISI_PD8 */
-	at91_set_B_periph(AT91_PIN_PE13, 0);	/* ISI_PD9 */
-	at91_set_B_periph(AT91_PIN_PE14, 0);	/* ISI_PD10 */
-	at91_set_B_periph(AT91_PIN_PE15, 0);	/* ISI_PD11 */
-
-	if (use_pck_as_mck) {
-		at91_set_B_periph(AT91_PIN_PE11, 0);	/* ISI_MCK (PCK3) */
-
-		/* TODO: register the PCK for ISI_MCK and set its parent */
-	}
-}
-#else
-void __init at91_add_device_isi(struct isi_platform_data *data,
-		bool use_pck_as_mck) {}
-#endif
-
-
-/* --------------------------------------------------------------------
  *  Timer/Counter block
  * -------------------------------------------------------------------- */
 
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: at91: remove ISI code for AT91SAM9263
  2014-05-15  8:34 [PATCH] ARM: at91: remove ISI code for AT91SAM9263 Paul Bolle
@ 2014-05-16  3:04 ` Josh Wu
  2014-05-16  7:49 ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 0 replies; 5+ messages in thread
From: Josh Wu @ 2014-05-16  3:04 UTC (permalink / raw)
  To: Paul Bolle, Andrew Victor, Nicolas Ferre,
	Jean-Christophe Plagniol-Villard, Russell King
  Cc: linux-kernel, linux-arm-kernel

Hi, Paul

On 5/15/2014 4:34 PM, Paul Bolle wrote:
> In v2.6.25 code was added for an Image Sensor Interface (ISI) for
> AT91SAM9263. That code depended on the Kconfig macro
> CONFIG_VIDEO_AT91_ISI and its MODULE variant. The related Kconfig symbol
> has never been added to the tree. The net effect of this was that
> at91_add_device_isi() was a NOP. No one noticed because no callers of
> that function were added to the tree at that time.
>
> The first caller of a function with that name was added in v3.4. But
> that caller apparently only called the function defined for AT91SAM9G45.
> (that function was also added in v3.4). So even then AT91SAM9263's NOP
> version of at91_add_device_isi() remained unused. This means that the
> ISI code for AT91SAM9263 can be removed.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> Untested!
>
> Could someone please verify that this definition of
> at91_add_device_isi() really never will be called.

Right. There is no implement to support for at91sam9263 ISI. So in 
at91sam9263ek it will not call at91_add_device_isi().
Current ISI driver only support at91sam9g45 and later chips.

Acked-by: Josh Wu <josh.wu@atmel.com>

Best Regards,
Josh Wu

>
>   arch/arm/mach-at91/at91sam9263_devices.c | 57 --------------------------------
>   1 file changed, 57 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
> index 43d53d6156dd..f2dab0a872a1 100644
> --- a/arch/arm/mach-at91/at91sam9263_devices.c
> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
> @@ -897,63 +897,6 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
>   
>
>   /* --------------------------------------------------------------------
> - *  Image Sensor Interface
> - * -------------------------------------------------------------------- */
> -
> -#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
> -
> -struct resource isi_resources[] = {
> -	[0] = {
> -		.start	= AT91SAM9263_BASE_ISI,
> -		.end	= AT91SAM9263_BASE_ISI + SZ_16K - 1,
> -		.flags	= IORESOURCE_MEM,
> -	},
> -	[1] = {
> -		.start	= NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
> -		.end	= NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
> -		.flags	= IORESOURCE_IRQ,
> -	},
> -};
> -
> -static struct platform_device at91sam9263_isi_device = {
> -	.name		= "at91_isi",
> -	.id		= -1,
> -	.resource	= isi_resources,
> -	.num_resources	= ARRAY_SIZE(isi_resources),
> -};
> -
> -void __init at91_add_device_isi(struct isi_platform_data *data,
> -		bool use_pck_as_mck)
> -{
> -	at91_set_A_periph(AT91_PIN_PE0, 0);	/* ISI_D0 */
> -	at91_set_A_periph(AT91_PIN_PE1, 0);	/* ISI_D1 */
> -	at91_set_A_periph(AT91_PIN_PE2, 0);	/* ISI_D2 */
> -	at91_set_A_periph(AT91_PIN_PE3, 0);	/* ISI_D3 */
> -	at91_set_A_periph(AT91_PIN_PE4, 0);	/* ISI_D4 */
> -	at91_set_A_periph(AT91_PIN_PE5, 0);	/* ISI_D5 */
> -	at91_set_A_periph(AT91_PIN_PE6, 0);	/* ISI_D6 */
> -	at91_set_A_periph(AT91_PIN_PE7, 0);	/* ISI_D7 */
> -	at91_set_A_periph(AT91_PIN_PE8, 0);	/* ISI_PCK */
> -	at91_set_A_periph(AT91_PIN_PE9, 0);	/* ISI_HSYNC */
> -	at91_set_A_periph(AT91_PIN_PE10, 0);	/* ISI_VSYNC */
> -	at91_set_B_periph(AT91_PIN_PE12, 0);	/* ISI_PD8 */
> -	at91_set_B_periph(AT91_PIN_PE13, 0);	/* ISI_PD9 */
> -	at91_set_B_periph(AT91_PIN_PE14, 0);	/* ISI_PD10 */
> -	at91_set_B_periph(AT91_PIN_PE15, 0);	/* ISI_PD11 */
> -
> -	if (use_pck_as_mck) {
> -		at91_set_B_periph(AT91_PIN_PE11, 0);	/* ISI_MCK (PCK3) */
> -
> -		/* TODO: register the PCK for ISI_MCK and set its parent */
> -	}
> -}
> -#else
> -void __init at91_add_device_isi(struct isi_platform_data *data,
> -		bool use_pck_as_mck) {}
> -#endif
> -
> -
> -/* --------------------------------------------------------------------
>    *  Timer/Counter block
>    * -------------------------------------------------------------------- */
>   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: at91: remove ISI code for AT91SAM9263
  2014-05-15  8:34 [PATCH] ARM: at91: remove ISI code for AT91SAM9263 Paul Bolle
  2014-05-16  3:04 ` Josh Wu
@ 2014-05-16  7:49 ` Jean-Christophe PLAGNIOL-VILLARD
  2014-05-23 11:50   ` [PATCH v2] ARM: at91: #if 0 out " Paul Bolle
  1 sibling, 1 reply; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-05-16  7:49 UTC (permalink / raw)
  To: Paul Bolle
  Cc: Jean-Christophe PLAGNIOL-VILLARD, Andrew Victor, Nicolas FERRE,
	Russell King, linux-arm-kernel, linux-kernel


On May 15, 2014, at 4:34 PM, Paul Bolle <pebolle@tiscali.nl> wrote:

> 
> In v2.6.25 code was added for an Image Sensor Interface (ISI) for
> AT91SAM9263. That code depended on the Kconfig macro
> CONFIG_VIDEO_AT91_ISI and its MODULE variant. The related Kconfig symbol
> has never been added to the tree. The net effect of this was that
> at91_add_device_isi() was a NOP. No one noticed because no callers of
> that function were added to the tree at that time.
> 
> The first caller of a function with that name was added in v3.4. But
> that caller apparently only called the function defined for AT91SAM9G45.
> (that function was also added in v3.4). So even then AT91SAM9263's NOP
> version of at91_add_device_isi() remained unused. This means that the
> ISI code for AT91SAM9263 can be removed.
> 

Nack

this is just resources and allow until this is converted to DTS to have the pinctrl and register information

Best Regards,
J.

> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> Untested!
> 
> Could someone please verify that this definition of
> at91_add_device_isi() really never will be called.
> 
> arch/arm/mach-at91/at91sam9263_devices.c | 57 --------------------------------
> 1 file changed, 57 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
> index 43d53d6156dd..f2dab0a872a1 100644
> --- a/arch/arm/mach-at91/at91sam9263_devices.c
> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
> @@ -897,63 +897,6 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
> 
> 
> /* --------------------------------------------------------------------
> - *  Image Sensor Interface
> - * -------------------------------------------------------------------- */
> -
> -#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
> -
> -struct resource isi_resources[] = {
> -	[0] = {
> -		.start	= AT91SAM9263_BASE_ISI,
> -		.end	= AT91SAM9263_BASE_ISI + SZ_16K - 1,
> -		.flags	= IORESOURCE_MEM,
> -	},
> -	[1] = {
> -		.start	= NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
> -		.end	= NR_IRQS_LEGACY + AT91SAM9263_ID_ISI,
> -		.flags	= IORESOURCE_IRQ,
> -	},
> -};
> -
> -static struct platform_device at91sam9263_isi_device = {
> -	.name		= "at91_isi",
> -	.id		= -1,
> -	.resource	= isi_resources,
> -	.num_resources	= ARRAY_SIZE(isi_resources),
> -};
> -
> -void __init at91_add_device_isi(struct isi_platform_data *data,
> -		bool use_pck_as_mck)
> -{
> -	at91_set_A_periph(AT91_PIN_PE0, 0);	/* ISI_D0 */
> -	at91_set_A_periph(AT91_PIN_PE1, 0);	/* ISI_D1 */
> -	at91_set_A_periph(AT91_PIN_PE2, 0);	/* ISI_D2 */
> -	at91_set_A_periph(AT91_PIN_PE3, 0);	/* ISI_D3 */
> -	at91_set_A_periph(AT91_PIN_PE4, 0);	/* ISI_D4 */
> -	at91_set_A_periph(AT91_PIN_PE5, 0);	/* ISI_D5 */
> -	at91_set_A_periph(AT91_PIN_PE6, 0);	/* ISI_D6 */
> -	at91_set_A_periph(AT91_PIN_PE7, 0);	/* ISI_D7 */
> -	at91_set_A_periph(AT91_PIN_PE8, 0);	/* ISI_PCK */
> -	at91_set_A_periph(AT91_PIN_PE9, 0);	/* ISI_HSYNC */
> -	at91_set_A_periph(AT91_PIN_PE10, 0);	/* ISI_VSYNC */
> -	at91_set_B_periph(AT91_PIN_PE12, 0);	/* ISI_PD8 */
> -	at91_set_B_periph(AT91_PIN_PE13, 0);	/* ISI_PD9 */
> -	at91_set_B_periph(AT91_PIN_PE14, 0);	/* ISI_PD10 */
> -	at91_set_B_periph(AT91_PIN_PE15, 0);	/* ISI_PD11 */
> -
> -	if (use_pck_as_mck) {
> -		at91_set_B_periph(AT91_PIN_PE11, 0);	/* ISI_MCK (PCK3) */
> -
> -		/* TODO: register the PCK for ISI_MCK and set its parent */
> -	}
> -}
> -#else
> -void __init at91_add_device_isi(struct isi_platform_data *data,
> -		bool use_pck_as_mck) {}
> -#endif
> -
> -
> -/* --------------------------------------------------------------------
>  *  Timer/Counter block
>  * -------------------------------------------------------------------- */
> 
> -- 
> 1.9.0
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] ARM: at91: #if 0 out ISI code for AT91SAM9263
  2014-05-16  7:49 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2014-05-23 11:50   ` Paul Bolle
  2014-06-04  8:45     ` Josh Wu
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Bolle @ 2014-05-23 11:50 UTC (permalink / raw)
  To: Andrew Victor, Nicolas Ferre, Jean-Christophe Plagniol-Villard,
	Russell King
  Cc: Josh Wu, linux-arm-kernel, linux-kernel

In v2.6.25 code was added for an Image Sensor Interface (ISI) for
AT91SAM9263. That code depended on the Kconfig macro
CONFIG_VIDEO_AT91_ISI and its MODULE variant. The related Kconfig symbol
has never been added to the tree. The net effect of this was that
at91_add_device_isi() was a NOP. No one noticed because no callers of
that function were added to the tree at that time.

The first caller of a function with that name was added in v3.4. But
that caller apparently only called the function defined for AT91SAM9G45.
(that function was also added in v3.4). So even then AT91SAM9263's NOP
version of at91_add_device_isi() remained unused.

This means that the ISI code for AT91SAM9263 could be removed. But,
since it can be useful for future reference, let's "#if 0" it instead.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
v2: Jean-Christophe would like to keep the information currently hidden
behind "#if defined(CONFIG_VIDEO_AT91_ISI) [...]". I'd like the
reference to that Kconfig macro dropped. Using "#if 0" will do both, so
that makes for a nice compromise, I'd say.

Josh verified that this definition of at91_add_device_isi() never will
be called. Thanks!

Still untested!

 arch/arm/mach-at91/at91sam9263_devices.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 43d53d6156dd..30af3048ade5 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -900,8 +900,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
  *  Image Sensor Interface
  * -------------------------------------------------------------------- */
 
-#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
-
+#if 0 /* keep for future reference */
 struct resource isi_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_ISI,
@@ -947,9 +946,6 @@ void __init at91_add_device_isi(struct isi_platform_data *data,
 		/* TODO: register the PCK for ISI_MCK and set its parent */
 	}
 }
-#else
-void __init at91_add_device_isi(struct isi_platform_data *data,
-		bool use_pck_as_mck) {}
 #endif
 
 
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ARM: at91: #if 0 out ISI code for AT91SAM9263
  2014-05-23 11:50   ` [PATCH v2] ARM: at91: #if 0 out " Paul Bolle
@ 2014-06-04  8:45     ` Josh Wu
  0 siblings, 0 replies; 5+ messages in thread
From: Josh Wu @ 2014-06-04  8:45 UTC (permalink / raw)
  To: Paul Bolle, Andrew Victor, Nicolas Ferre,
	Jean-Christophe Plagniol-Villard, Russell King
  Cc: linux-arm-kernel, linux-kernel

Hi, Paul

On 5/23/2014 7:50 PM, Paul Bolle wrote:
> In v2.6.25 code was added for an Image Sensor Interface (ISI) for
> AT91SAM9263. That code depended on the Kconfig macro
> CONFIG_VIDEO_AT91_ISI and its MODULE variant. The related Kconfig symbol
> has never been added to the tree. The net effect of this was that
> at91_add_device_isi() was a NOP. No one noticed because no callers of
> that function were added to the tree at that time.
>
> The first caller of a function with that name was added in v3.4. But
> that caller apparently only called the function defined for AT91SAM9G45.
> (that function was also added in v3.4). So even then AT91SAM9263's NOP
> version of at91_add_device_isi() remained unused.
>
> This means that the ISI code for AT91SAM9263 could be removed. But,
> since it can be useful for future reference, let's "#if 0" it instead.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> v2: Jean-Christophe would like to keep the information currently hidden
> behind "#if defined(CONFIG_VIDEO_AT91_ISI) [...]". I'd like the
> reference to that Kconfig macro dropped. Using "#if 0" will do both, so
> that makes for a nice compromise, I'd say.

I think we can keep the #if 0 as a reference so far. When the devices 
file is finally removed. We will add the ISI resouces to DT file.
So I am ok with this.

Hi, J.C.

What do you think of this patch?

Best Regards,
Josh Wu
>
> Josh verified that this definition of at91_add_device_isi() never will
> be called. Thanks!
>
> Still untested!
>
>   arch/arm/mach-at91/at91sam9263_devices.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
> index 43d53d6156dd..30af3048ade5 100644
> --- a/arch/arm/mach-at91/at91sam9263_devices.c
> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
> @@ -900,8 +900,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_pdata *data) {}
>    *  Image Sensor Interface
>    * -------------------------------------------------------------------- */
>   
> -#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
> -
> +#if 0 /* keep for future reference */
>   struct resource isi_resources[] = {
>   	[0] = {
>   		.start	= AT91SAM9263_BASE_ISI,
> @@ -947,9 +946,6 @@ void __init at91_add_device_isi(struct isi_platform_data *data,
>   		/* TODO: register the PCK for ISI_MCK and set its parent */
>   	}
>   }
> -#else
> -void __init at91_add_device_isi(struct isi_platform_data *data,
> -		bool use_pck_as_mck) {}
>   #endif
>   
>   


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-04  8:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-15  8:34 [PATCH] ARM: at91: remove ISI code for AT91SAM9263 Paul Bolle
2014-05-16  3:04 ` Josh Wu
2014-05-16  7:49 ` Jean-Christophe PLAGNIOL-VILLARD
2014-05-23 11:50   ` [PATCH v2] ARM: at91: #if 0 out " Paul Bolle
2014-06-04  8:45     ` Josh Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).