public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the pxa tree
@ 2008-09-14 19:27 Stephen Rothwell
       [not found] ` <20080915052750.0b0c924c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Rothwell @ 2008-09-14 19:27 UTC (permalink / raw)
  To: Eric Miao; +Cc: linux-next, Ned Forrester

Hi Eric,

Today's linux-next merge of the pxa tree got a conflict in
drivers/spi/pxa2xx_spi.c between commit
8423597d676615f3dd2d9ab36f59f147086b90b8 ("pxa2xx_spi: chipselect
bugfixes") from Linus' tree and commit
5625ef19d54c02838c867b6a5c87823e021ac7a5 ("spi: pxa2xx_spi introduce chip
select gpio to simplify the common cases") from the pxa tree.

I fixed it up (see below) and can carry the fixup (though it could be
fixed in the pxa tree in a merge with Linus' tree).  Please check the
fixup.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc drivers/spi/pxa2xx_spi.c
index 0e53354,98d2338..0000000
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@@ -406,46 -430,11 +430,48 @@@ static void giveback(struct driver_dat
  					struct spi_transfer,
  					transfer_list);
  
 +	/* Delay if requested before any change in chip select */
 +	if (last_transfer->delay_usecs)
 +		udelay(last_transfer->delay_usecs);
 +
 +	/* Drop chip select UNLESS cs_change is true or we are returning
 +	 * a message with an error, or next message is for another chip
 +	 */
  	if (!last_transfer->cs_change)
- 		drv_data->cs_control(PXA2XX_CS_DEASSERT);
+ 		cs_deassert(drv_data);
 +	else {
 +		struct spi_message *next_msg;
 +
 +		/* Holding of cs was hinted, but we need to make sure
 +		 * the next message is for the same chip.  Don't waste
 +		 * time with the following tests unless this was hinted.
 +		 *
 +		 * We cannot postpone this until pump_messages, because
 +		 * after calling msg->complete (below) the driver that
 +		 * sent the current message could be unloaded, which
 +		 * could invalidate the cs_control() callback...
 +		 */
 +
 +		/* get a pointer to the next message, if any */
 +		spin_lock_irqsave(&drv_data->lock, flags);
 +		if (list_empty(&drv_data->queue))
 +			next_msg = NULL;
 +		else
 +			next_msg = list_entry(drv_data->queue.next,
 +					struct spi_message, queue);
 +		spin_unlock_irqrestore(&drv_data->lock, flags);
 +
 +		/* see if the next and current messages point
 +		 * to the same chip
 +		 */
 +		if (next_msg && next_msg->spi != msg->spi)
 +			next_msg = NULL;
 +		if (!next_msg || msg->state == ERROR_STATE)
- 			drv_data->cs_control(PXA2XX_CS_DEASSERT);
++			cs_deassert(drv_data);
 +	}
  
+ 	drv_data->cur_chip = NULL;
+ 
  	msg->state = NULL;
  	if (msg->complete)
  		msg->complete(msg->context);
@@@ -882,33 -873,16 +908,33 @@@ static void pump_transfers(unsigned lon
  					transfer_list);
  		if (previous->delay_usecs)
  			udelay(previous->delay_usecs);
 +
 +		/* Drop chip select only if cs_change is requested */
 +		if (previous->cs_change)
- 			drv_data->cs_control(PXA2XX_CS_DEASSERT);
++			cs_deassert(drv_data);
  	}
  
 -	/* Check transfer length */
 -	if (transfer->len > 8191)
 -	{
 -		dev_warn(&drv_data->pdev->dev, "pump_transfers: transfer "
 -				"length greater than 8191\n");
 -		message->status = -EINVAL;
 -		giveback(drv_data);
 -		return;
 +	/* Check for transfers that need multiple DMA segments */
 +	if (transfer->len > MAX_DMA_LEN && chip->enable_dma) {
 +
 +		/* reject already-mapped transfers; PIO won't always work */
 +		if (message->is_dma_mapped
 +				|| transfer->rx_dma || transfer->tx_dma) {
 +			dev_err(&drv_data->pdev->dev,
 +				"pump_transfers: mapped transfer length "
 +				"of %lu is greater than %d\n",
 +				transfer->len, MAX_DMA_LEN);
 +			message->status = -EINVAL;
 +			giveback(drv_data);
 +			return;
 +		}
 +
 +		/* warn ... we force this to PIO mode */
 +		if (printk_ratelimit())
 +			dev_warn(&message->spi->dev, "pump_transfers: "
 +				"DMA disabled for transfer length %ld "
 +				"greater than %d\n",
 +				(long)drv_data->len, MAX_DMA_LEN);
  	}
  
  	/* Setup the transfer state based on the type of transfer */

^ permalink raw reply	[flat|nested] 15+ messages in thread
* linux-next: manual merge of the pxa tree
@ 2008-09-18 18:46 Stephen Rothwell
  2008-09-18 19:00 ` Eric Miao
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Rothwell @ 2008-09-18 18:46 UTC (permalink / raw)
  To: Eric Miao; +Cc: linux-next, Russell King

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

Hi Eric,

Today's linux-next merge of the pxa tree got a lot of conflicts against
the arm tree.  Unfortunately, I don't have time today to resolve them, so
you should probably rebase your tree on the arm tree (or merge the arm
tree into yours) and resolve the conflicts.

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread
* linux-next: manual merge of the pxa tree
@ 2008-09-17 20:31 Stephen Rothwell
  2008-09-17 21:40 ` Russell King
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Rothwell @ 2008-09-17 20:31 UTC (permalink / raw)
  To: Eric Miao; +Cc: linux-next, Russell King

Hi Eric,

Today's linux-next merge of the pxa tree got a conflict in
arch/arm/mach-pxa/spitz.c between commit
fced80c735941fa518ac67c0b61bbe153fb8c050 ("[ARM] Convert asm/io.h to
linux/io.h") from the arm tree and commit
546ed5880bf813e1386696c02d288d7ffba517d6 ("[ARM] pxa/spitz: use SPI-based
driver for ads7846, corgi-lcd and max1111") from the pxa tree.

Just overlapping additions.  I fixed it up (see below) and can carry the
fix.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc arch/arm/mach-pxa/spitz.c
index 7e181afc,8b06b7a..0000000
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@@ -22,7 -23,9 +23,10 @@@
  #include <linux/mmc/host.h>
  #include <linux/pm.h>
  #include <linux/backlight.h>
 +#include <linux/io.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+ #include <linux/spi/corgi_lcd.h>
  
  #include <asm/setup.h>
  #include <asm/memory.h>

^ permalink raw reply	[flat|nested] 15+ messages in thread
* linux-next: manual merge of the pxa tree
@ 2008-09-11 22:35 Stephen Rothwell
  2008-09-12  0:49 ` Eric Miao
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Rothwell @ 2008-09-11 22:35 UTC (permalink / raw)
  To: Eric Miao; +Cc: linux-next

Hi Eric,

Today's linux-next merge of the pxa tree got a conflict in
arch/arm/mach-pxa/corgi.c arch/arm/mach-pxa/spitz.c between commit
fced80c735941fa518ac67c0b61bbe153fb8c050 ("[ARM] Convert asm/io.h to
linux/io.h") from the arm tree and commits
c22e92f200a2b5ab8b3571747865afe3dcc7b6b3 ("[ARM] pxa/corgi: use SPI-based
driver for ads7846, corgi-lcd and max1111"),
db710817e3432af4d30896cdc41f144e4da7c7e2 ("[ARM] pxa/akita: use pca953x
instead of akita-ioexp") and 43d5f82350734562e22b9ad9de3ad0aaec6aaffe
("[ARM] pxa/spitz: use SPI-based driver for ads7846, corgi-lcd and
max1111") from the pxa tree.

Just overlapping additions of includes.  I fixed it up (see below) and
can carry the fixup.

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc arch/arm/mach-pxa/corgi.c
index 4cbf08b,201b49a..0000000
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@@ -20,8 -20,11 +20,12 @@@
  #include <linux/interrupt.h>
  #include <linux/mmc/host.h>
  #include <linux/pm.h>
+ #include <linux/gpio.h>
  #include <linux/backlight.h>
 +#include <linux/io.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+ #include <linux/spi/corgi_lcd.h>
  #include <video/w100fb.h>
  
  #include <asm/setup.h>
diff --cc arch/arm/mach-pxa/spitz.c
index 7e181afc,08efb44..0000000
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@@ -22,7 -24,11 +24,12 @@@
  #include <linux/mmc/host.h>
  #include <linux/pm.h>
  #include <linux/backlight.h>
 +#include <linux/io.h>
+ #include <linux/i2c.h>
+ #include <linux/i2c/pca953x.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+ #include <linux/spi/corgi_lcd.h>
  
  #include <asm/setup.h>
  #include <asm/memory.h>

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

end of thread, other threads:[~2008-09-25  8:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-14 19:27 linux-next: manual merge of the pxa tree Stephen Rothwell
     [not found] ` <20080915052750.0b0c924c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2008-09-15 13:18   ` Ned Forrester
2008-09-16  3:02     ` Eric Miao
2008-09-25  4:57       ` [spi-devel-general] " David Brownell
2008-09-25  7:49         ` Eric Miao
     [not found]           ` <f17812d70809250049g3f3b86e7x12dab8cc4f8b1cd6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-25  8:20             ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2008-09-18 18:46 Stephen Rothwell
2008-09-18 19:00 ` Eric Miao
2008-09-17 20:31 Stephen Rothwell
2008-09-17 21:40 ` Russell King
2008-09-17 22:14   ` Stephen Rothwell
2008-09-17 22:28     ` Russell King
2008-09-18  0:02       ` Stephen Rothwell
2008-09-11 22:35 Stephen Rothwell
2008-09-12  0:49 ` Eric Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox