Skip to contentSkip to conversation

rm9200: update

PATCH Superseded Jean-Christophe PLAGNIOL-VILLARD 6 participants 25 messages Nov 20, 2010 – Nov 24, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi,

this patch update some issues found on rm9200 during the test of the rm9200 defconfig consolidation

The following changes since commit b86db4744230c94e480de56f1b7f31117edbf193:

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (2010-11-19 19:46:45 -0800)

are available in the git repository at:

git://git.jcrosoft.org/linux-2.6.git rm9200

Jean-Christophe PLAGNIOL-VILLARD (6):
at91: Convert remaining boards to new-style UART initialization
at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used
at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used
at91: rename rm9200ek and rm9200dk board file name
atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

 arch/arm/mach-at91/Makefile                        |    4 +-
 arch/arm/mach-at91/at91rm9200_devices.c            |   45 --------------------
 arch/arm/mach-at91/board-1arm.c                    |   26 ++++++------
 arch/arm/mach-at91/board-kafa.c                    |   21 ++++------
 arch/arm/mach-at91/board-picotux200.c              |   25 +++++------
 .../arm/mach-at91/{board-dk.c => board-rm9200dk.c} |    2 +
 .../arm/mach-at91/{board-ek.c => board-rm9200ek.c} |    2 +
 arch/arm/mach-at91/include/mach/board.h            |    6 ---
 drivers/spi/atmel_spi.c                            |    4 +-
 9 files changed, 42 insertions(+), 93 deletions(-)
 rename arch/arm/mach-at91/{board-dk.c => board-rm9200dk.c} (99%)
 rename arch/arm/mach-at91/{board-ek.c => board-rm9200ek.c} (99%)

Best Regards,
J.

#1 lore raw

PATCH 1/6 at91: Convert remaining boards to new-style UART initialization

Convert the following AT91RM9200-based boards to the new-style UART initialization:
- Ajeco 1ARM Single Board Computer
- Sperry-Sun KAFA board
- picotux 200

Remove the deprecated at91_init_serial

---
 arch/arm/mach-at91/at91rm9200_devices.c |   45 -------------------------------
 arch/arm/mach-at91/board-1arm.c         |   26 +++++++++---------
 arch/arm/mach-at91/board-kafa.c         |   21 +++++---------
 arch/arm/mach-at91/board-picotux200.c   |   23 +++++++---------
 arch/arm/mach-at91/include/mach/board.h |    6 ----
 5 files changed, 31 insertions(+), 90 deletions(-)
arch/arm/mach-at91/at91rm9200_devices.c +0 -45
index 9338825..7b53922 100644
@@ -1106,51 +1106,6 @@ static inline void configure_usart3_pins(unsigned pins)
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];	/* the UARTs to use */
 struct platform_device *atmel_default_console_device;	/* the serial console device */
 
-void __init __deprecated at91_init_serial(struct at91_uart_config *config)
-{
-	int i;
-
-	/* Fill in list of supported UARTs */
-	for (i = 0; i < config->nr_tty; i++) {
-		switch (config->tty_map[i]) {
-			case 0:
-				configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
-				at91_uarts[i] = &at91rm9200_uart0_device;
-				at91_clock_associate("usart0_clk", &at91rm9200_uart0_device.dev, "usart");
-				break;
-			case 1:
-				configure_usart1_pins(ATMEL_UART_CTS | ATMEL_UART_RTS | ATMEL_UART_DSR | ATMEL_UART_DTR | ATMEL_UART_DCD | ATMEL_UART_RI);
-				at91_uarts[i] = &at91rm9200_uart1_device;
-				at91_clock_associate("usart1_clk", &at91rm9200_uart1_device.dev, "usart");
-				break;
-			case 2:
-				configure_usart2_pins(0);
-				at91_uarts[i] = &at91rm9200_uart2_device;
-				at91_clock_associate("usart2_clk", &at91rm9200_uart2_device.dev, "usart");
-				break;
-			case 3:
-				configure_usart3_pins(0);
-				at91_uarts[i] = &at91rm9200_uart3_device;
-				at91_clock_associate("usart3_clk", &at91rm9200_uart3_device.dev, "usart");
-				break;
-			case 4:
-				configure_dbgu_pins();
-				at91_uarts[i] = &at91rm9200_dbgu_device;
-				at91_clock_associate("mck", &at91rm9200_dbgu_device.dev, "usart");
-				break;
-			default:
-				continue;
-		}
-		at91_uarts[i]->id = i;		/* update ID number to mapped ID */
-	}
-
-	/* Set serial console device */
-	if (config->console_tty < ATMEL_MAX_UART)
-		atmel_default_console_device = at91_uarts[config->console_tty];
-	if (!atmel_default_console_device)
-		printk(KERN_INFO "AT91: No default serial console defined.\n");
-}
-
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
 	struct platform_device *pdev;
arch/arm/mach-at91/board-1arm.c +13 -13
index 46bdc82..8a3fc84 100644
@@ -39,24 +39,24 @@
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata onearm_uart_config = {
-	.console_tty	= 0,				/* ttyS0 */
-	.nr_tty		= 3,
-	.tty_map	= { 4, 0, 1, -1, -1 },		/* ttyS0, ..., ttyS4 */
-};
-
 static void __init onearm_map_io(void)
 {
 	/* Initialize processor: 18.432 MHz crystal */
 	at91rm9200_initialize(18432000, AT91RM9200_PQFP);
 
-	/* Setup the serial ports and console */
-	at91_init_serial(&onearm_uart_config);
+	/* DBGU on ttyS0. (Rx & Tx only) */
+	at91_register_uart(0, 0, 0);
+
+	/* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
+	at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+	/* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+	at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
+			   | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+			   | ATMEL_UART_RI);
+
+	/* set serial console to ttyS0 (ie, DBGU) */
+	at91_set_serial_console(0);
 }
 
 static void __init onearm_init_irq(void)
arch/arm/mach-at91/board-kafa.c +8 -13
index c0ce79d..d2e1f4e 100644
@@ -39,17 +39,6 @@
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata kafa_uart_config = {
-	.console_tty	= 0,				/* ttyS0 */
-	.nr_tty		= 2,
-	.tty_map	= { 4, 0, -1, -1, -1 }		/* ttyS0, ..., ttyS4 */
-};
-
 static void __init kafa_map_io(void)
 {
 	/* Initialize processor: 18.432 MHz crystal */
@@ -58,8 +47,14 @@ static void __init kafa_map_io(void)
 	/* Set up the LEDs */
 	at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
 
-	/* Setup the serial ports and console */
-	at91_init_serial(&kafa_uart_config);
+	/* DBGU on ttyS0. (Rx & Tx only) */
+	at91_register_uart(0, 0, 0);
+
+	/* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
+	at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+	/* set serial console to ttyS0 (ie, DBGU) */
+	at91_set_serial_console(0);
 }
 
 static void __init kafa_init_irq(void)
arch/arm/mach-at91/board-picotux200.c +10 -13
index 9d833bb..ac1a3b5 100644
@@ -43,24 +43,21 @@
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata picotux200_uart_config = {
-	.console_tty	= 0,				/* ttyS0 */
-	.nr_tty		= 2,
-	.tty_map	= { 4, 1, -1, -1, -1 }		/* ttyS0, ..., ttyS4 */
-};
-
 static void __init picotux200_map_io(void)
 {
 	/* Initialize processor: 18.432 MHz crystal */
 	at91rm9200_initialize(18432000, AT91RM9200_BGA);
 
-	/* Setup the serial ports and console */
-	at91_init_serial(&picotux200_uart_config);
+	/* DBGU on ttyS0. (Rx & Tx only) */
+	at91_register_uart(0, 0, 0);
+
+	/* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+	at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+			  | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+			  | ATMEL_UART_RI);
+
+	/* set serial console to ttyS0 (ie, DBGU) */
+	at91_set_serial_console(0);
 }
 
 static void __init picotux200_init_irq(void)
arch/arm/mach-at91/include/mach/board.h +0 -6
index 58528aa..2b499eb 100644
@@ -137,13 +137,7 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de
 extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
 extern void __init at91_set_serial_console(unsigned portnr);
 
-struct at91_uart_config {
-	unsigned short	console_tty;	/* tty number of serial console */
-	unsigned short	nr_tty;		/* number of serial tty's */
-	short		tty_map[];	/* map UART to tty number */
-};
 extern struct platform_device *atmel_default_console_device;
-extern void __init __deprecated at91_init_serial(struct at91_uart_config *config);
 
 struct atmel_uart_data {
 	short			use_dma_tx;	/* use transmit DMA? */
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/6 at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/board-dk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-at91/board-dk.c +2 -0
index e14f0e1..16dfd0c 100644
@@ -91,10 +91,12 @@ static struct at91_cf_data __initdata dk_cf_data = {
 	// .vcc_pin	= ... always powered
 };
 
+#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
 static struct at91_mmc_data __initdata dk_mmc_data = {
 	.slot_b		= 0,
 	.wire4		= 1,
 };
+#endif
 
 static struct spi_board_info dk_spi_devices[] = {
 	{	/* DataFlash chip */
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/6 at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/board-ek.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-at91/board-ek.c +2 -0
index 56e92c4..6203cdf 100644
@@ -84,12 +84,14 @@ static struct at91_udc_data __initdata ek_udc_data = {
 	.pullup_pin	= AT91_PIN_PD5,
 };
 
+#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
 static struct at91_mmc_data __initdata ek_mmc_data = {
 	.det_pin	= AT91_PIN_PB27,
 	.slot_b		= 0,
 	.wire4		= 1,
 	.wp_pin		= AT91_PIN_PA17,
 };
+#endif
 
 static struct spi_board_info ek_spi_devices[] = {
 	{	/* DataFlash chip */
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/6 at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/board-picotux200.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-at91/board-picotux200.c +2 -0
index ac1a3b5..7259e7b 100644
@@ -79,12 +79,14 @@ static struct at91_usbh_data __initdata picotux200_usbh_data = {
 // 	.pullup_pin	= AT91_PIN_PD5,
 // };
 
+#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
 static struct at91_mmc_data __initdata picotux200_mmc_data = {
 	.det_pin	= AT91_PIN_PB27,
 	.slot_b		= 0,
 	.wire4		= 1,
 	.wp_pin		= AT91_PIN_PA17,
 };
+#endif
 
 // static struct spi_board_info picotux200_spi_devices[] = {
 // 	{	/* DataFlash chip */
Signature · 1 line
1.7.1
#5 lore raw

PATCH 4/6 at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used

Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/board-picotux200.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-at91/board-picotux200.c +0 -0
index ac1a3b5..7259e7b 100644
@@ -79,12 +79,14 @@ static struct at91_usbh_data __initdata picotux200_usbh_data = {
 // 	.pullup_pin	= AT91_PIN_PD5,

arch/arm/mach-at91/board-picotux200.c static struct at91_usbh_data __initdata picotux200_usbh_data = { · line 89

Quoted 10 lines
arch/arm/mach-at91/board-picotux200.c +2 -0
 // };
 
+#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
 static struct at91_mmc_data __initdata picotux200_mmc_data = {
 	.det_pin	= AT91_PIN_PB27,
 	.slot_b		= 0,
 	.wire4		= 1,
 	.wp_pin		= AT91_PIN_PA17,
 };
+#endif

I'd prefer __maybe_unused. Then introducing bugs is catched more easily because the code is always compiled.

arch/arm/mach-at91/board-picotux200.c static struct at91_usbh_data __initdata picotux200_usbh_data = { · line 92

Quoted 3 lines
arch/arm/mach-at91/board-picotux200.c +0 -0
 // static struct spi_board_info picotux200_spi_devices[] = {
 // 	{	/* DataFlash chip */

And it seems this file could get some care by removing c99-style comments ...

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#6 lore raw

PATCH 4/6 at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used

Quoted 14 lines · Uwe Kleine-K?nig
Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/board-picotux200.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-at91/board-picotux200.c +0 -0
index ac1a3b5..7259e7b 100644
@@ -79,12 +79,14 @@ static struct at91_usbh_data __initdata picotux200_usbh_data = {
 // 	.pullup_pin	= AT91_PIN_PD5,
 // };
 
Quoted 10 lines

arch/arm/mach-at91/board-picotux200.c static struct at91_usbh_data __initdata picotux200_usbh_data = { · line 89

Quoted 8 lines
arch/arm/mach-at91/board-picotux200.c +2 -0
+#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
 static struct at91_mmc_data __initdata picotux200_mmc_data = {
 	.det_pin	= AT91_PIN_PB27,
 	.slot_b		= 0,
 	.wire4		= 1,
 	.wp_pin		= AT91_PIN_PA17,
 };
+#endif

I'd prefer __maybe_unused. Then introducing bugs is catched more easily because the code is always compiled.

I prefer to remove the struct if not needed as we do an all at91

Quoted 6 lines

arch/arm/mach-at91/board-picotux200.c static struct at91_usbh_data __initdata picotux200_usbh_data = { · line 92

Quoted 4 lines
arch/arm/mach-at91/board-picotux200.c +0 -0
 // static struct spi_board_info picotux200_spi_devices[] = {
 // 	{	/* DataFlash chip */

And it seems this file could get some care by removing c99-style comments ...

I've other patch to finish the cleanup

Best Regards,
J.

#7 lore raw

PATCH 5/6 at91: rename rm9200ek and rm9200dk board file name

In reply to Jean-Christophe PLAGNIOL-VILLARD

to be a few more concistant with the other boards

as ek is for evaluation kit and dk for development kit

---
 arch/arm/mach-at91/Makefile                        |    4 ++--
 .../arm/mach-at91/{board-dk.c => board-rm9200dk.c} |    0
 .../arm/mach-at91/{board-ek.c => board-rm9200ek.c} |    0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/mach-at91/{board-dk.c => board-rm9200dk.c} (100%)
 rename arch/arm/mach-at91/{board-ek.c => board-rm9200ek.c} (100%)
arch/arm/mach-at91/Makefile +2 -2
index 821eb84..62d686f 100644
@@ -24,8 +24,8 @@ obj-$(CONFIG_ARCH_AT91X40)	+= at91x40.o at91x40_time.o
 
 # AT91RM9200 board-specific support
 obj-$(CONFIG_MACH_ONEARM)	+= board-1arm.o
-obj-$(CONFIG_ARCH_AT91RM9200DK)	+= board-dk.o
-obj-$(CONFIG_MACH_AT91RM9200EK)	+= board-ek.o
+obj-$(CONFIG_ARCH_AT91RM9200DK)	+= board-rm9200dk.o
+obj-$(CONFIG_MACH_AT91RM9200EK)	+= board-rm9200ek.o
 obj-$(CONFIG_MACH_CSB337)	+= board-csb337.o
 obj-$(CONFIG_MACH_CSB637)	+= board-csb637.o
 obj-$(CONFIG_MACH_CARMEVA)	+= board-carmeva.o
arch/arm/mach-at91/board-rm9200dk.c renamed from arch/arm/mach-at91/board-dk.c +0 -0
similarity index 100%
rename from arch/arm/mach-at91/board-dk.c
rename to arch/arm/mach-at91/board-rm9200dk.c
arch/arm/mach-at91/board-rm9200ek.c renamed from arch/arm/mach-at91/board-ek.c +0 -0
similarity index 100%
rename from arch/arm/mach-at91/board-ek.c
rename to arch/arm/mach-at91/board-rm9200ek.c
Signature · 1 line
1.7.1
#8 lore raw

PATCH 5/6 at91: rename rm9200ek and rm9200dk board file name

Hello Jean-Christophe,

Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

to be a few more concistant with the other boards

s/concistant/consistent/

Quoted 11 lines

as ek is for evaluation kit and dk for development kit

---
 arch/arm/mach-at91/Makefile                        |    4 ++--
 .../arm/mach-at91/{board-dk.c => board-rm9200dk.c} |    0
 .../arm/mach-at91/{board-ek.c => board-rm9200ek.c} |    0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/mach-at91/{board-dk.c => board-rm9200dk.c} (100%)
 rename arch/arm/mach-at91/{board-ek.c => board-rm9200ek.c} (100%)

arch/arm/mach-at91/board-dk.c starts with:

	/*
	 * linux/arch/arm/mach-at91/board-dk.c
	 *

IMHO you should adapt (or delete) this line.

Quoted 32 lines
arch/arm/mach-at91/Makefile +2 -2
index 821eb84..62d686f 100644
@@ -24,8 +24,8 @@ obj-$(CONFIG_ARCH_AT91X40)	+= at91x40.o at91x40_time.o
 
 # AT91RM9200 board-specific support
 obj-$(CONFIG_MACH_ONEARM)	+= board-1arm.o
-obj-$(CONFIG_ARCH_AT91RM9200DK)	+= board-dk.o
-obj-$(CONFIG_MACH_AT91RM9200EK)	+= board-ek.o
+obj-$(CONFIG_ARCH_AT91RM9200DK)	+= board-rm9200dk.o
+obj-$(CONFIG_MACH_AT91RM9200EK)	+= board-rm9200ek.o
 obj-$(CONFIG_MACH_CSB337)	+= board-csb337.o
 obj-$(CONFIG_MACH_CSB637)	+= board-csb637.o
 obj-$(CONFIG_MACH_CARMEVA)	+= board-carmeva.o
arch/arm/mach-at91/board-rm9200dk.c renamed from arch/arm/mach-at91/board-dk.c +0 -0
similarity index 100%
rename from arch/arm/mach-at91/board-dk.c
rename to arch/arm/mach-at91/board-rm9200dk.c
arch/arm/mach-at91/board-rm9200ek.c renamed from arch/arm/mach-at91/board-ek.c +0 -0
similarity index 100%
rename from arch/arm/mach-at91/board-ek.c
rename to arch/arm/mach-at91/board-rm9200ek.c
Signature · 7 lines
1.7.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#9 lore raw

PATCH 6/6 atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

In reply to Jean-Christophe PLAGNIOL-VILLARD

passing argument 2 of 'dma_map_single' discards qualifiers from pointer target type

---
 drivers/spi/atmel_spi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/spi/atmel_spi.c +3 -1
index 154529a..2cf6abd 100644
@@ -352,8 +352,10 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
 
 	xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS;
 	if (xfer->tx_buf) {
+		void *nonconst_tx = (void *)xfer->tx_buf; /* shut up gcc */
+
 		xfer->tx_dma = dma_map_single(dev,
-				(void *) xfer->tx_buf, xfer->len,
+				nonconst_tx, xfer->len,
 				DMA_TO_DEVICE);
 		if (dma_mapping_error(dev, xfer->tx_dma))
 			return -ENOMEM;
Signature · 1 line
1.7.1
#10 lore raw

PATCH 6/6 atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

Hello.

Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD

passing argument 2 of 'dma_map_single' discards qualifiers from pointer target type

---
  drivers/spi/atmel_spi.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
drivers/spi/atmel_spi.c +0 -0
index 154529a..2cf6abd 100644

drivers/spi/atmel_spi.c atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) · line 356

Quoted 5 lines
drivers/spi/atmel_spi.c +2 -0
@@ -352,8 +352,10 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
 
  	xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS;
  	if (xfer->tx_buf) {
+		void *nonconst_tx = (void *)xfer->tx_buf; /* shut up gcc */
+

Aren't casts to 'void *' automatic?

drivers/spi/atmel_spi.c atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) · line 361

Quoted 6 lines
drivers/spi/atmel_spi.c +1 -1
  		xfer->tx_dma = dma_map_single(dev,
-				(void *) xfer->tx_buf, xfer->len,
+				nonconst_tx, xfer->len,
  				DMA_TO_DEVICE);
  		if (dma_mapping_error(dev, xfer->tx_dma))
  			return -ENOMEM;

WBR, Sergei

#11 lore raw

PATCH 6/6 atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

Quoted 17 lines · Sergei Shtylyov

Hello.

Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD

passing argument 2 of 'dma_map_single' discards qualifiers from pointer target type

---
 drivers/spi/atmel_spi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/spi/atmel_spi.c +0 -0
index 154529a..2cf6abd 100644
@@ -352,8 +352,10 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
 
Quoted 6 lines

drivers/spi/atmel_spi.c atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) · line 356

Quoted 4 lines
drivers/spi/atmel_spi.c +2 -0
 	xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS;
 	if (xfer->tx_buf) {
+		void *nonconst_tx = (void *)xfer->tx_buf; /* shut up gcc */
+

Aren't casts to 'void *' automatic?

no as the tx_buf is const void *

Best Regards,
J.

#12 lore raw

Re: [PATCH 6/6] atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

In reply to Jean-Christophe PLAGNIOL-VILLARD

Hello,

[adding spi-devel-general and lkml to Cc:]

Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD

passing argument 2 of 'dma_map_single' discards qualifiers from pointer target type

---
 drivers/spi/atmel_spi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/spi/atmel_spi.c +0 -0
index 154529a..2cf6abd 100644

drivers/spi/atmel_spi.c atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) · line 359

Quoted 9 lines
drivers/spi/atmel_spi.c +3 -1
@@ -352,8 +352,10 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
 
 	xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS;
 	if (xfer->tx_buf) {
+		void *nonconst_tx = (void *)xfer->tx_buf; /* shut up gcc */
+
 		xfer->tx_dma = dma_map_single(dev,
-				(void *) xfer->tx_buf, xfer->len,
+				nonconst_tx, xfer->len,
 				DMA_TO_DEVICE);

Hmm, I wonder if this is the right approach to do this. I'd prefer to have something like:

dma_map_single_to_device(struct device *, const void *, ...)

don't know if that's sensible though.

And I wonder about gcc that your patch makes a difference.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#13 lore raw

Re: [PATCH 6/6] atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

Quoted 2 lines · Uwe Kleine-K?nig
Quoted 1 line

+??? ??? void

*nonconst_tx = (void *)xfer->tx_buf; /* shut up gcc */

Reads like a bad patch to me. Fix the bug,
don't just silence GCC. Or at least use
a better comment mentioning a constness
cast problems).

- Dave

#14 lore raw

Re: [PATCH 6/6] atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

Quoted 11 lines · David Brownell
Quoted 2 lines · Uwe Kleine-K?nig
Quoted 1 line

+??? ??? void

*nonconst_tx = (void *)xfer->tx_buf; /* shut up gcc */

Reads like a bad patch to me. Fix the bug,
don't just silence GCC. Or at least use
a better comment mentioning a constness
cast problems).

ok I change the comment

Best Regards,
J.

#15 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD

hi Jean-Christophe,

Quoted 4 lines

? ? ? ?this patch update some issues found on rm9200 ? ? ? ?during the test of the rm9200 defconfig consolidation

Quoted 8 lines

?git://git.jcrosoft.org/linux-2.6.git rm9200

Jean-Christophe PLAGNIOL-VILLARD (6):
? ? ?at91: Convert remaining boards to new-style UART initialization ? ? ?at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used ? ? ?at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used ? ? ?at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used ? ? ?at91: rename rm9200ek and rm9200dk board file name

For patches 1, 2, 3, 4 and 5 you can add a:

Quoted 1 line

? ? ?atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

Regards,
Andrew Victor

#16 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD

HI,

version 2

replace
at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used by
at91/picotux200: remove commenting usb device and dataflash support

fix comments
and add
at91/board-yl-9200: fix typo in video support

The following changes since commit b86db4744230c94e480de56f1b7f31117edbf193:

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (2010-11-19 19:46:45 -0800)

are available in the git repository at:

git://git.jcrosoft.org/linux-2.6.git rm9200

Jean-Christophe PLAGNIOL-VILLARD (7):
at91: Convert remaining boards to new-style UART initialization
at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used
at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used
at91: rename rm9200ek and rm9200dk board file name at91/picotux200: remove commenting usb device and dataflash support
atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer' at91/board-yl-9200: fix typo in video support

 arch/arm/mach-at91/Makefile                        |    4 +-
 arch/arm/mach-at91/at91rm9200_devices.c            |   45 -----------------
 arch/arm/mach-at91/board-1arm.c                    |   26 +++++-----
 arch/arm/mach-at91/board-kafa.c                    |   21 +++-----
 arch/arm/mach-at91/board-picotux200.c              |   53 ++++----------------
 .../arm/mach-at91/{board-dk.c => board-rm9200dk.c} |    4 +-
 .../arm/mach-at91/{board-ek.c => board-rm9200ek.c} |    4 +-
 arch/arm/mach-at91/board-yl-9200.c                 |    2 +-
 arch/arm/mach-at91/include/mach/board.h            |    6 --
 drivers/spi/atmel_spi.c                            |    6 ++-
 10 files changed, 45 insertions(+), 126 deletions(-)
 rename arch/arm/mach-at91/{board-dk.c => board-rm9200dk.c} (98%)
 rename arch/arm/mach-at91/{board-ek.c => board-rm9200ek.c} (98%)

Best Regards,
J.

Quoted 41 lines · Jean-Christophe PLAGNIOL-VILLARD

Hi,

this patch update some issues found on rm9200 during the test of the rm9200 defconfig consolidation

The following changes since commit b86db4744230c94e480de56f1b7f31117edbf193:

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (2010-11-19 19:46:45 -0800)

are available in the git repository at:

git://git.jcrosoft.org/linux-2.6.git rm9200

Jean-Christophe PLAGNIOL-VILLARD (6):
at91: Convert remaining boards to new-style UART initialization
at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used
at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used
at91: rename rm9200ek and rm9200dk board file name
atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

 arch/arm/mach-at91/Makefile                        |    4 +-
 arch/arm/mach-at91/at91rm9200_devices.c            |   45 --------------------
 arch/arm/mach-at91/board-1arm.c                    |   26 ++++++------
 arch/arm/mach-at91/board-kafa.c                    |   21 ++++------
 arch/arm/mach-at91/board-picotux200.c              |   25 +++++------
 .../arm/mach-at91/{board-dk.c => board-rm9200dk.c} |    2 +
 .../arm/mach-at91/{board-ek.c => board-rm9200ek.c} |    2 +
 arch/arm/mach-at91/include/mach/board.h            |    6 ---
 drivers/spi/atmel_spi.c                            |    4 +-
 9 files changed, 42 insertions(+), 93 deletions(-)
 rename arch/arm/mach-at91/{board-dk.c => board-rm9200dk.c} (99%)
 rename arch/arm/mach-at91/{board-ek.c => board-rm9200ek.c} (99%)

Best Regards,
J.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#17 lore raw

PATCH v2 1/7 at91: Convert remaining boards to new-style UART initialization

Convert the following AT91RM9200-based boards to the new-style UART initialization:
- Ajeco 1ARM Single Board Computer
- Sperry-Sun KAFA board
- picotux 200

Remove the deprecated at91_init_serial

---
 arch/arm/mach-at91/at91rm9200_devices.c |   45 -------------------------------
 arch/arm/mach-at91/board-1arm.c         |   26 +++++++++---------
 arch/arm/mach-at91/board-kafa.c         |   21 +++++---------
 arch/arm/mach-at91/board-picotux200.c   |   23 +++++++---------
 arch/arm/mach-at91/include/mach/board.h |    6 ----
 5 files changed, 31 insertions(+), 90 deletions(-)
arch/arm/mach-at91/at91rm9200_devices.c +0 -45
index 9338825..7b53922 100644
@@ -1106,51 +1106,6 @@ static inline void configure_usart3_pins(unsigned pins)
 static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART];	/* the UARTs to use */
 struct platform_device *atmel_default_console_device;	/* the serial console device */
 
-void __init __deprecated at91_init_serial(struct at91_uart_config *config)
-{
-	int i;
-
-	/* Fill in list of supported UARTs */
-	for (i = 0; i < config->nr_tty; i++) {
-		switch (config->tty_map[i]) {
-			case 0:
-				configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
-				at91_uarts[i] = &at91rm9200_uart0_device;
-				at91_clock_associate("usart0_clk", &at91rm9200_uart0_device.dev, "usart");
-				break;
-			case 1:
-				configure_usart1_pins(ATMEL_UART_CTS | ATMEL_UART_RTS | ATMEL_UART_DSR | ATMEL_UART_DTR | ATMEL_UART_DCD | ATMEL_UART_RI);
-				at91_uarts[i] = &at91rm9200_uart1_device;
-				at91_clock_associate("usart1_clk", &at91rm9200_uart1_device.dev, "usart");
-				break;
-			case 2:
-				configure_usart2_pins(0);
-				at91_uarts[i] = &at91rm9200_uart2_device;
-				at91_clock_associate("usart2_clk", &at91rm9200_uart2_device.dev, "usart");
-				break;
-			case 3:
-				configure_usart3_pins(0);
-				at91_uarts[i] = &at91rm9200_uart3_device;
-				at91_clock_associate("usart3_clk", &at91rm9200_uart3_device.dev, "usart");
-				break;
-			case 4:
-				configure_dbgu_pins();
-				at91_uarts[i] = &at91rm9200_dbgu_device;
-				at91_clock_associate("mck", &at91rm9200_dbgu_device.dev, "usart");
-				break;
-			default:
-				continue;
-		}
-		at91_uarts[i]->id = i;		/* update ID number to mapped ID */
-	}
-
-	/* Set serial console device */
-	if (config->console_tty < ATMEL_MAX_UART)
-		atmel_default_console_device = at91_uarts[config->console_tty];
-	if (!atmel_default_console_device)
-		printk(KERN_INFO "AT91: No default serial console defined.\n");
-}
-
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
 {
 	struct platform_device *pdev;
arch/arm/mach-at91/board-1arm.c +13 -13
index 46bdc82..8a3fc84 100644
@@ -39,24 +39,24 @@
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata onearm_uart_config = {
-	.console_tty	= 0,				/* ttyS0 */
-	.nr_tty		= 3,
-	.tty_map	= { 4, 0, 1, -1, -1 },		/* ttyS0, ..., ttyS4 */
-};
-
 static void __init onearm_map_io(void)
 {
 	/* Initialize processor: 18.432 MHz crystal */
 	at91rm9200_initialize(18432000, AT91RM9200_PQFP);
 
-	/* Setup the serial ports and console */
-	at91_init_serial(&onearm_uart_config);
+	/* DBGU on ttyS0. (Rx & Tx only) */
+	at91_register_uart(0, 0, 0);
+
+	/* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
+	at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+	/* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+	at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
+			   | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+			   | ATMEL_UART_RI);
+
+	/* set serial console to ttyS0 (ie, DBGU) */
+	at91_set_serial_console(0);
 }
 
 static void __init onearm_init_irq(void)
arch/arm/mach-at91/board-kafa.c +8 -13
index c0ce79d..d2e1f4e 100644
@@ -39,17 +39,6 @@
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata kafa_uart_config = {
-	.console_tty	= 0,				/* ttyS0 */
-	.nr_tty		= 2,
-	.tty_map	= { 4, 0, -1, -1, -1 }		/* ttyS0, ..., ttyS4 */
-};
-
 static void __init kafa_map_io(void)
 {
 	/* Initialize processor: 18.432 MHz crystal */
@@ -58,8 +47,14 @@ static void __init kafa_map_io(void)
 	/* Set up the LEDs */
 	at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
 
-	/* Setup the serial ports and console */
-	at91_init_serial(&kafa_uart_config);
+	/* DBGU on ttyS0. (Rx & Tx only) */
+	at91_register_uart(0, 0, 0);
+
+	/* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
+	at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+	/* set serial console to ttyS0 (ie, DBGU) */
+	at91_set_serial_console(0);
 }
 
 static void __init kafa_init_irq(void)
arch/arm/mach-at91/board-picotux200.c +10 -13
index 9d833bb..ac1a3b5 100644
@@ -43,24 +43,21 @@
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata picotux200_uart_config = {
-	.console_tty	= 0,				/* ttyS0 */
-	.nr_tty		= 2,
-	.tty_map	= { 4, 1, -1, -1, -1 }		/* ttyS0, ..., ttyS4 */
-};
-
 static void __init picotux200_map_io(void)
 {
 	/* Initialize processor: 18.432 MHz crystal */
 	at91rm9200_initialize(18432000, AT91RM9200_BGA);
 
-	/* Setup the serial ports and console */
-	at91_init_serial(&picotux200_uart_config);
+	/* DBGU on ttyS0. (Rx & Tx only) */
+	at91_register_uart(0, 0, 0);
+
+	/* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+	at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+			  | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+			  | ATMEL_UART_RI);
+
+	/* set serial console to ttyS0 (ie, DBGU) */
+	at91_set_serial_console(0);
 }
 
 static void __init picotux200_init_irq(void)
arch/arm/mach-at91/include/mach/board.h +0 -6
index 58528aa..2b499eb 100644
@@ -137,13 +137,7 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de
 extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
 extern void __init at91_set_serial_console(unsigned portnr);
 
-struct at91_uart_config {
-	unsigned short	console_tty;	/* tty number of serial console */
-	unsigned short	nr_tty;		/* number of serial tty's */
-	short		tty_map[];	/* map UART to tty number */
-};
 extern struct platform_device *atmel_default_console_device;
-extern void __init __deprecated at91_init_serial(struct at91_uart_config *config);
 
 struct atmel_uart_data {
 	short			use_dma_tx;	/* use transmit DMA? */
Signature · 1 line
1.7.1
#18 lore raw

PATCH v2 2/7 at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/board-dk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-at91/board-dk.c +2 -0
index e14f0e1..16dfd0c 100644
@@ -91,10 +91,12 @@ static struct at91_cf_data __initdata dk_cf_data = {
 	// .vcc_pin	= ... always powered
 };
 
+#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
 static struct at91_mmc_data __initdata dk_mmc_data = {
 	.slot_b		= 0,
 	.wire4		= 1,
 };
+#endif
 
 static struct spi_board_info dk_spi_devices[] = {
 	{	/* DataFlash chip */
Signature · 1 line
1.7.1
#19 lore raw

PATCH v2 3/7 at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/board-ek.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-at91/board-ek.c +2 -0
index 56e92c4..6203cdf 100644
@@ -84,12 +84,14 @@ static struct at91_udc_data __initdata ek_udc_data = {
 	.pullup_pin	= AT91_PIN_PD5,
 };
 
+#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
 static struct at91_mmc_data __initdata ek_mmc_data = {
 	.det_pin	= AT91_PIN_PB27,
 	.slot_b		= 0,
 	.wire4		= 1,
 	.wp_pin		= AT91_PIN_PA17,
 };
+#endif
 
 static struct spi_board_info ek_spi_devices[] = {
 	{	/* DataFlash chip */
Signature · 1 line
1.7.1
#20 lore raw

PATCH v2 4/7 at91: rename rm9200ek and rm9200dk board file name

In reply to Jean-Christophe PLAGNIOL-VILLARD

to be a few more concistant with the other boards

as ek is for evaluation kit and dk for development kit

---
 arch/arm/mach-at91/Makefile                        |    4 ++--
 .../arm/mach-at91/{board-dk.c => board-rm9200dk.c} |    2 +-
 .../arm/mach-at91/{board-ek.c => board-rm9200ek.c} |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
 rename arch/arm/mach-at91/{board-dk.c => board-rm9200dk.c} (99%)
 rename arch/arm/mach-at91/{board-ek.c => board-rm9200ek.c} (99%)
arch/arm/mach-at91/Makefile +2 -2
index 821eb84..62d686f 100644
@@ -24,8 +24,8 @@ obj-$(CONFIG_ARCH_AT91X40)	+= at91x40.o at91x40_time.o
 
 # AT91RM9200 board-specific support
 obj-$(CONFIG_MACH_ONEARM)	+= board-1arm.o
-obj-$(CONFIG_ARCH_AT91RM9200DK)	+= board-dk.o
-obj-$(CONFIG_MACH_AT91RM9200EK)	+= board-ek.o
+obj-$(CONFIG_ARCH_AT91RM9200DK)	+= board-rm9200dk.o
+obj-$(CONFIG_MACH_AT91RM9200EK)	+= board-rm9200ek.o
 obj-$(CONFIG_MACH_CSB337)	+= board-csb337.o
 obj-$(CONFIG_MACH_CSB637)	+= board-csb637.o
 obj-$(CONFIG_MACH_CARMEVA)	+= board-carmeva.o
arch/arm/mach-at91/board-rm9200dk.c renamed from arch/arm/mach-at91/board-dk.c +1 -1
similarity index 99%
rename from arch/arm/mach-at91/board-dk.c
rename to arch/arm/mach-at91/board-rm9200dk.c
index 16dfd0c..4c1047c 100644
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-at91/board-dk.c
+ * linux/arch/arm/mach-at91/board-rm9200dk.c
  *
  *  Copyright (C) 2005 SAN People
  *
arch/arm/mach-at91/board-rm9200ek.c renamed from arch/arm/mach-at91/board-ek.c +1 -1
similarity index 99%
rename from arch/arm/mach-at91/board-ek.c
rename to arch/arm/mach-at91/board-rm9200ek.c
index 6203cdf..9df1be8 100644
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-at91/board-ek.c
+ * linux/arch/arm/mach-at91/board-rm9200ek.c
  *
  *  Copyright (C) 2005 SAN People
  *
Signature · 1 line
1.7.1
#21 lore raw

PATCH v2 5/7 at91/picotux200: remove commenting usb device and dataflash support

In reply to Jean-Christophe PLAGNIOL-VILLARD

as based on http://www.picotux.com/pt200/picotux200.pdf
these board does not have such I/O

---
 arch/arm/mach-at91/board-picotux200.c |   30 ------------------------------
 1 files changed, 0 insertions(+), 30 deletions(-)
arch/arm/mach-at91/board-picotux200.c +0 -30
index ac1a3b5..55dad3a 100644
@@ -74,11 +74,6 @@ static struct at91_usbh_data __initdata picotux200_usbh_data = {
 	.ports		= 1,
 };
 
-// static struct at91_udc_data __initdata picotux200_udc_data = {
-// 	.vbus_pin	= AT91_PIN_PD4,
-// 	.pullup_pin	= AT91_PIN_PD5,
-// };
-
 static struct at91_mmc_data __initdata picotux200_mmc_data = {
 	.det_pin	= AT91_PIN_PB27,
 	.slot_b		= 0,
@@ -86,21 +81,6 @@ static struct at91_mmc_data __initdata picotux200_mmc_data = {
 	.wp_pin		= AT91_PIN_PA17,
 };
 
-// static struct spi_board_info picotux200_spi_devices[] = {
-// 	{	/* DataFlash chip */
-// 		.modalias	= "mtd_dataflash",
-// 		.chip_select	= 0,
-// 		.max_speed_hz	= 15 * 1000 * 1000,
-// 	},
-// #ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
-// 	{	/* DataFlash card */
-// 		.modalias	= "mtd_dataflash",
-// 		.chip_select	= 3,
-// 		.max_speed_hz	= 15 * 1000 * 1000,
-// 	},
-// #endif
-// };
-
 #define PICOTUX200_FLASH_BASE	AT91_CHIPSELECT_0
 #define PICOTUX200_FLASH_SIZE	SZ_4M
 
@@ -132,21 +112,11 @@ static void __init picotux200_board_init(void)
 	at91_add_device_eth(&picotux200_eth_data);
 	/* USB Host */
 	at91_add_device_usbh(&picotux200_usbh_data);
-	/* USB Device */
-	// at91_add_device_udc(&picotux200_udc_data);
-	// at91_set_multi_drive(picotux200_udc_data.pullup_pin, 1);	/* pullup_pin is connected to reset */
 	/* I2C */
 	at91_add_device_i2c(NULL, 0);
-	/* SPI */
-	// at91_add_device_spi(picotux200_spi_devices, ARRAY_SIZE(picotux200_spi_devices));
-#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
-	/* DataFlash card */
-	at91_set_gpio_output(AT91_PIN_PB22, 0);
-#else
 	/* MMC */
 	at91_set_gpio_output(AT91_PIN_PB22, 1);	/* this MMC card slot can optionally use SPI signaling (CS3). */
 	at91_add_device_mmc(0, &picotux200_mmc_data);
-#endif
 	/* NOR Flash */
 	platform_device_register(&picotux200_flash);
 }
Signature · 1 line
1.7.1
#22 lore raw

PATCH 6/7 atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'

In reply to Jean-Christophe PLAGNIOL-VILLARD

passing argument 2 of 'dma_map_single' discards qualifiers from pointer target type

---
 drivers/spi/atmel_spi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/spi/atmel_spi.c +5 -1
index 154529a..a067046 100644
@@ -352,8 +352,12 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
 
 	xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS;
 	if (xfer->tx_buf) {
+		/* tx_buf is a const void* where we need a void * for the dma
+		 * mapping */
+		void *nonconst_tx = (void *)xfer->tx_buf;
+
 		xfer->tx_dma = dma_map_single(dev,
-				(void *) xfer->tx_buf, xfer->len,
+				nonconst_tx, xfer->len,
 				DMA_TO_DEVICE);
 		if (dma_mapping_error(dev, xfer->tx_dma))
 			return -ENOMEM;
Signature · 1 line
1.7.1
#23 lore raw

PATCH 7/7 at91/board-yl-9200: fix typo in video support

In reply to Jean-Christophe PLAGNIOL-VILLARD

for the epson frambuffer support it's CONFIG_FB_S1D13XXX not CONFIG_FB_S1D135XX

---
 arch/arm/mach-at91/board-yl-9200.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-at91/board-yl-9200.c +1 -1
index 89df00a..e0f0080 100644
@@ -387,7 +387,7 @@ static struct spi_board_info yl9200_spi_devices[] = {
  * EPSON S1D13806 FB (discontinued chip)
  * EPSON S1D13506 FB
  */
-#if defined(CONFIG_FB_S1D135XX) || defined(CONFIG_FB_S1D13XXX_MODULE)
+#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
 #include <video/s1d13xxxfb.h>
 
 
Signature · 1 line
1.7.1
#24 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD

Hi Jean-Christophe,

Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD

version 2

replace
at91/picotux200: fix warning: 'picotux200_mmc_data' defined but not used by
at91/picotux200: remove commenting usb device and dataflash support

fix comments
and add
at91/board-yl-9200: fix typo in video support

as you seem to have access to several AT91RM9200 based boards, can you test this patch on them : http://www.spinics.net/lists/arm-kernel/msg101658.html ?

Thanks
Eric