* Re: [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
2010-09-10 10:13 ` [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC Nicolas Ferre
@ 2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:26 ` Sergei Shtylyov
1 sibling, 0 replies; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-10 9:23 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-kernel, linux-arm-kernel, avictor.za
> +/*
> + * MCI (SD/MMC)
> + * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
> + */
> +static struct at91_mmc_data __initdata ek_mmc_data = {
> + .wire4 = 1,
> +// .det_pin = ... not connected
> +// .wp_pin = ... not connected
> +// .vcc_pin = ... not connected
can we remove this 3 comments
Best Regards,
J.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: dm9000 initialization update
2010-09-10 10:13 [PATCH] AT91: dm9000 initialization update Nicolas Ferre
@ 2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 9:51 ` Nicolas Ferre
2010-09-10 10:13 ` [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC Nicolas Ferre
2010-09-10 10:19 ` [PATCH] AT91: dm9000 initialization update Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 1 reply; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-10 9:23 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-kernel, linux-arm-kernel, avictor.za
On 12:13 Fri 10 Sep , Nicolas Ferre wrote:
> Add information in dm9000 mac/phy chip initialization:
> - irq resource details
> - platform data details
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> arch/arm/mach-at91/board-sam9261ek.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
> index c4c8865..b4307ab 100644
> --- a/arch/arm/mach-at91/board-sam9261ek.c
> +++ b/arch/arm/mach-at91/board-sam9261ek.c
> @@ -93,11 +93,12 @@ static struct resource dm9000_resource[] = {
> .start = AT91_PIN_PC11,
> .end = AT91_PIN_PC11,
> .flags = IORESOURCE_IRQ
> + | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
both?
Best Regards,
J.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: dm9000 initialization update
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-09-10 9:51 ` Nicolas Ferre
2010-09-10 10:18 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Ferre @ 2010-09-10 9:51 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD
Cc: linux-kernel, linux-arm-kernel, avictor.za
Le 10/09/2010 11:23, Jean-Christophe PLAGNIOL-VILLARD :
> On 12:13 Fri 10 Sep , Nicolas Ferre wrote:
>> Add information in dm9000 mac/phy chip initialization:
>> - irq resource details
>> - platform data details
>>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>> ---
>> arch/arm/mach-at91/board-sam9261ek.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
>> index c4c8865..b4307ab 100644
>> --- a/arch/arm/mach-at91/board-sam9261ek.c
>> +++ b/arch/arm/mach-at91/board-sam9261ek.c
>> @@ -93,11 +93,12 @@ static struct resource dm9000_resource[] = {
>> .start = AT91_PIN_PC11,
>> .end = AT91_PIN_PC11,
>> .flags = IORESOURCE_IRQ
>> + | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
> both?
Yes, only configuration supported by GPIO irqs...
Regards,
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] AT91: dm9000 initialization update
@ 2010-09-10 10:13 Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-09-10 10:13 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel, avictor.za; +Cc: Nicolas Ferre
Add information in dm9000 mac/phy chip initialization:
- irq resource details
- platform data details
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/mach-at91/board-sam9261ek.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index c4c8865..b4307ab 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -93,11 +93,12 @@ static struct resource dm9000_resource[] = {
.start = AT91_PIN_PC11,
.end = AT91_PIN_PC11,
.flags = IORESOURCE_IRQ
+ | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
}
};
static struct dm9000_plat_data dm9000_platdata = {
- .flags = DM9000_PLATF_16BITONLY,
+ .flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
};
static struct platform_device dm9000_device = {
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
2010-09-10 10:13 [PATCH] AT91: dm9000 initialization update Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-09-10 10:13 ` Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:26 ` Sergei Shtylyov
2010-09-10 10:19 ` [PATCH] AT91: dm9000 initialization update Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 2 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-09-10 10:13 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel, avictor.za; +Cc: Nicolas Ferre
The sd/mmc data structure is not used if SPI is selected. The configuration
of PIO on the board prevent from using both interfaces at the same time
(board dependent).
Remove the warnings at compilation time adding a preprocessor condition.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/mach-at91/board-sam9261ek.c | 30 +++++++++++++++++++-----------
1 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index b4307ab..19d4d2c 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -169,17 +169,6 @@ static struct at91_udc_data __initdata ek_udc_data = {
/*
- * MCI (SD/MMC)
- */
-static struct at91_mmc_data __initdata ek_mmc_data = {
- .wire4 = 1,
-// .det_pin = ... not connected
-// .wp_pin = ... not connected
-// .vcc_pin = ... not connected
-};
-
-
-/*
* NAND flash
*/
static struct mtd_partition __initdata ek_nand_partition[] = {
@@ -247,6 +236,10 @@ static void __init ek_add_device_nand(void)
at91_add_device_nand(&ek_nand_data);
}
+/*
+ * SPI related devices
+ */
+#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
/*
* ADS7846 Touchscreen
@@ -357,6 +350,21 @@ static struct spi_board_info ek_spi_devices[] = {
#endif
};
+#else /* CONFIG_SPI_ATMEL_* */
+
+/*
+ * MCI (SD/MMC)
+ * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
+ */
+static struct at91_mmc_data __initdata ek_mmc_data = {
+ .wire4 = 1,
+// .det_pin = ... not connected
+// .wp_pin = ... not connected
+// .vcc_pin = ... not connected
+};
+
+#endif /* CONFIG_SPI_ATMEL_* */
+
/*
* LCD Controller
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: dm9000 initialization update
2010-09-10 9:51 ` Nicolas Ferre
@ 2010-09-10 10:18 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-10 10:18 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-kernel, linux-arm-kernel, avictor.za
On 11:51 Fri 10 Sep , Nicolas Ferre wrote:
> Le 10/09/2010 11:23, Jean-Christophe PLAGNIOL-VILLARD :
> > On 12:13 Fri 10 Sep , Nicolas Ferre wrote:
> >> Add information in dm9000 mac/phy chip initialization:
> >> - irq resource details
> >> - platform data details
> >>
> >> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> >> ---
> >> arch/arm/mach-at91/board-sam9261ek.c | 3 ++-
> >> 1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
> >> index c4c8865..b4307ab 100644
> >> --- a/arch/arm/mach-at91/board-sam9261ek.c
> >> +++ b/arch/arm/mach-at91/board-sam9261ek.c
> >> @@ -93,11 +93,12 @@ static struct resource dm9000_resource[] = {
> >> .start = AT91_PIN_PC11,
> >> .end = AT91_PIN_PC11,
> >> .flags = IORESOURCE_IRQ
> >> + | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
> > both?
>
> Yes, only configuration supported by GPIO irqs...
ok fine
Best Regards,
J.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: dm9000 initialization update
2010-09-10 10:13 [PATCH] AT91: dm9000 initialization update Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:13 ` [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC Nicolas Ferre
@ 2010-09-10 10:19 ` Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 0 replies; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-10 10:19 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-kernel, linux-arm-kernel, avictor.za
On 12:13 Fri 10 Sep , Nicolas Ferre wrote:
> Add information in dm9000 mac/phy chip initialization:
> - irq resource details
> - platform data details
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Best Regards,
J.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
2010-09-10 10:13 ` [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-09-10 10:26 ` Sergei Shtylyov
2010-09-10 11:06 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2010-09-10 10:26 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-kernel, linux-arm-kernel, avictor.za
Hello.
On 10-09-2010 14:13, Nicolas Ferre wrote:
> The sd/mmc data structure is not used if SPI is selected. The configuration
> of PIO on the board prevent from using both interfaces at the same time
> (board dependent).
> Remove the warnings at compilation time adding a preprocessor condition.
> Signed-off-by: Nicolas Ferre<nicolas.ferre@atmel.com>
[...]
> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
> index b4307ab..19d4d2c 100644
> --- a/arch/arm/mach-at91/board-sam9261ek.c
> +++ b/arch/arm/mach-at91/board-sam9261ek.c
> @@ -169,17 +169,6 @@ static struct at91_udc_data __initdata ek_udc_data = {
>
>
> /*
> - * MCI (SD/MMC)
> - */
> -static struct at91_mmc_data __initdata ek_mmc_data = {
> - .wire4 = 1,
> -// .det_pin = ... not connected
> -// .wp_pin = ... not connected
> -// .vcc_pin = ... not connected
> -};
> -
> -
> -/*
> * NAND flash
> */
> static struct mtd_partition __initdata ek_nand_partition[] = {
> @@ -247,6 +236,10 @@ static void __init ek_add_device_nand(void)
> at91_add_device_nand(&ek_nand_data);
> }
>
> +/*
> + * SPI related devices
> + */
> +#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
>
> /*
> * ADS7846 Touchscreen
> @@ -357,6 +350,21 @@ static struct spi_board_info ek_spi_devices[] = {
> #endif
> };
>
> +#else /* CONFIG_SPI_ATMEL_* */
> +
> +/*
> + * MCI (SD/MMC)
> + * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
> + */
> +static struct at91_mmc_data __initdata ek_mmc_data = {
> + .wire4 = 1,
> +// .det_pin = ... not connected
> +// .wp_pin = ... not connected
> +// .vcc_pin = ... not connected
The coding style document forbids C99 style // comments. Could replace
with normal comment or #if 0...
WBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
2010-09-10 10:26 ` Sergei Shtylyov
@ 2010-09-10 11:06 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 11:25 ` Nicolas Ferre
0 siblings, 1 reply; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-10 11:06 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Nicolas Ferre, avictor.za, linux-kernel, linux-arm-kernel
> > * ADS7846 Touchscreen
> >@@ -357,6 +350,21 @@ static struct spi_board_info ek_spi_devices[] = {
> > #endif
> > };
> >
> >+#else /* CONFIG_SPI_ATMEL_* */
> >+
> >+/*
> >+ * MCI (SD/MMC)
> >+ * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
> >+ */
> >+static struct at91_mmc_data __initdata ek_mmc_data = {
> >+ .wire4 = 1,
> >+// .det_pin = ... not connected
> >+// .wp_pin = ... not connected
> >+// .vcc_pin = ... not connected
>
> The coding style document forbids C99 style // comments. Could
> replace with normal comment or #if 0...
no dead code please
Best Regards,
J.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
2010-09-10 11:06 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-09-10 11:25 ` Nicolas Ferre
2010-09-10 12:42 ` [PATCH] AT91: at91sam9261ek: remove C99 comments but keep information Nicolas Ferre
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Ferre @ 2010-09-10 11:25 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD, Sergei Shtylyov, avictor.za
Cc: linux-kernel, linux-arm-kernel
Le 10/09/2010 13:06, Jean-Christophe PLAGNIOL-VILLARD :
>>> * ADS7846 Touchscreen
>>> @@ -357,6 +350,21 @@ static struct spi_board_info ek_spi_devices[] = {
>>> #endif
>>> };
>>>
>>> +#else /* CONFIG_SPI_ATMEL_* */
>>> +
>>> +/*
>>> + * MCI (SD/MMC)
>>> + * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
>>> + */
>>> +static struct at91_mmc_data __initdata ek_mmc_data = {
>>> + .wire4 = 1,
>>> +// .det_pin = ... not connected
>>> +// .wp_pin = ... not connected
>>> +// .vcc_pin = ... not connected
>>
>> The coding style document forbids C99 style // comments. Could
>> replace with normal comment or #if 0...
> no dead code please
I kept those comments because it is just a move of code.
But ok, it seem that they are not liked by several people. As I am in a
"tiny fixes" mood, I post an additional patch to remove them ;-)
Cheers,
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] AT91: at91sam9261ek: remove C99 comments but keep information
2010-09-10 12:42 ` [PATCH] AT91: at91sam9261ek: remove C99 comments but keep information Nicolas Ferre
@ 2010-09-10 12:25 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 12+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-10 12:25 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-kernel, linux-arm-kernel, avictor.za
On 14:42 Fri 10 Sep , Nicolas Ferre wrote:
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Best Regards,
J.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] AT91: at91sam9261ek: remove C99 comments but keep information
2010-09-10 11:25 ` Nicolas Ferre
@ 2010-09-10 12:42 ` Nicolas Ferre
2010-09-10 12:25 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Ferre @ 2010-09-10 12:42 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel, avictor.za; +Cc: Nicolas Ferre
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/mach-at91/board-sam9261ek.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 19d4d2c..65eb094 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -351,16 +351,14 @@ static struct spi_board_info ek_spi_devices[] = {
};
#else /* CONFIG_SPI_ATMEL_* */
+/* spi0 and mmc/sd share the same PIO pins: cannot be used at the same time */
/*
* MCI (SD/MMC)
- * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
+ * det_pin, wp_pin and vcc_pin are not connected
*/
static struct at91_mmc_data __initdata ek_mmc_data = {
.wire4 = 1,
-// .det_pin = ... not connected
-// .wp_pin = ... not connected
-// .vcc_pin = ... not connected
};
#endif /* CONFIG_SPI_ATMEL_* */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-09-10 12:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 10:13 [PATCH] AT91: dm9000 initialization update Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 9:51 ` Nicolas Ferre
2010-09-10 10:18 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:13 ` [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:26 ` Sergei Shtylyov
2010-09-10 11:06 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 11:25 ` Nicolas Ferre
2010-09-10 12:42 ` [PATCH] AT91: at91sam9261ek: remove C99 comments but keep information Nicolas Ferre
2010-09-10 12:25 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:19 ` [PATCH] AT91: dm9000 initialization update Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox