Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbfdbe9d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'sh/for-2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: fix a number of Oopses and leaks in SH framebuffer driver
  SH: fix error paths in DMA driver
  sh: sh7751 pci controller io port fix
  sh: Fix maximum number of SCIF ports in R2D defconfigs
  SH: fix TS field shift calculation for DMA drivers
parents 722154e4 8bed9055
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -877,7 +877,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
#
#
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX3100 is not set
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_NR_UARTS=1
CONFIG_SERIAL_SH_SCI_NR_UARTS=2
CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CORE_CONSOLE=y
+1 −1
Original line number Original line Diff line number Diff line
@@ -963,7 +963,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
#
#
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX3100 is not set
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_NR_UARTS=1
CONFIG_SERIAL_SH_SCI_NR_UARTS=2
CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CORE_CONSOLE=y
+3 −2
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/io.h>
#include <linux/io.h>
#include "pci-sh4.h"
#include "pci-sh4.h"
#include <asm/addrspace.h>
#include <asm/addrspace.h>
#include <asm/sizes.h>


static int __init __area_sdram_check(struct pci_channel *chan,
static int __init __area_sdram_check(struct pci_channel *chan,
				     unsigned int area)
				     unsigned int area)
@@ -47,8 +48,8 @@ static int __init __area_sdram_check(struct pci_channel *chan,
static struct resource sh7751_pci_resources[] = {
static struct resource sh7751_pci_resources[] = {
	{
	{
		.name	= "SH7751_IO",
		.name	= "SH7751_IO",
		.start	= SH7751_PCI_IO_BASE,
		.start	= 0x1000,
		.end	= SH7751_PCI_IO_BASE + SH7751_PCI_IO_SIZE - 1,
		.end	= SZ_4M - 1,
		.flags	= IORESOURCE_IO
		.flags	= IORESOURCE_IO
	}, {
	}, {
		.name	= "SH7751_mem",
		.name	= "SH7751_mem",
+1 −1
Original line number Original line Diff line number Diff line
@@ -76,7 +76,7 @@ enum {
}
}


#define TS_INDEX2VAL(i)	((((i) & 3) << CHCR_TS_LOW_SHIFT) | \
#define TS_INDEX2VAL(i)	((((i) & 3) << CHCR_TS_LOW_SHIFT) | \
			 ((((i) >> 2) & 3) << CHCR_TS_HIGH_SHIFT))
			 (((i) & 0xc) << CHCR_TS_HIGH_SHIFT))


#else /* CONFIG_CPU_SH4A */
#else /* CONFIG_CPU_SH4A */


+21 −6
Original line number Original line Diff line number Diff line
@@ -290,6 +290,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan)
	struct sh_dmae_chan *sh_chan = to_sh_chan(chan);
	struct sh_dmae_chan *sh_chan = to_sh_chan(chan);
	struct sh_desc *desc;
	struct sh_desc *desc;
	struct sh_dmae_slave *param = chan->private;
	struct sh_dmae_slave *param = chan->private;
	int ret;


	pm_runtime_get_sync(sh_chan->dev);
	pm_runtime_get_sync(sh_chan->dev);


@@ -301,11 +302,15 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan)
		struct sh_dmae_slave_config *cfg;
		struct sh_dmae_slave_config *cfg;


		cfg = sh_dmae_find_slave(sh_chan, param->slave_id);
		cfg = sh_dmae_find_slave(sh_chan, param->slave_id);
		if (!cfg)
		if (!cfg) {
			return -EINVAL;
			ret = -EINVAL;
			goto efindslave;
		}


		if (test_and_set_bit(param->slave_id, sh_dmae_slave_used))
		if (test_and_set_bit(param->slave_id, sh_dmae_slave_used)) {
			return -EBUSY;
			ret = -EBUSY;
			goto etestused;
		}


		param->config = cfg;
		param->config = cfg;


@@ -334,10 +339,20 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan)
	}
	}
	spin_unlock_bh(&sh_chan->desc_lock);
	spin_unlock_bh(&sh_chan->desc_lock);


	if (!sh_chan->descs_allocated)
	if (!sh_chan->descs_allocated) {
		pm_runtime_put(sh_chan->dev);
		ret = -ENOMEM;
		goto edescalloc;
	}


	return sh_chan->descs_allocated;
	return sh_chan->descs_allocated;

edescalloc:
	if (param)
		clear_bit(param->slave_id, sh_dmae_slave_used);
etestused:
efindslave:
	pm_runtime_put(sh_chan->dev);
	return ret;
}
}


/*
/*
Loading