All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Misc Tegra patches
@ 2011-02-20  3:38 ` Stephen Warren
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: ccross-hpIqsD4AKlfQT0dZR+AlfA, konkers-hpIqsD4AKlfQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren

I have various patches for arch/arm/mach-tegra queued up in order to support
the new ASoC driver. This series is all those patches except those that touch
clock-related code, since I need to wait for Colin's series to land first,
then drop some of my patches, and fix up any merge conflicts.

* ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO

Simple fix. I think not previously posted.

* ARM: tegra: Prevent requeuing in-progress DMA requests

Already in {android,linux}-tegra-2.6.3[67], but not yet in mainline or
for-next.

* ARM: tegra: pinmux: Expose set_func, add get_*
* ARM: tegra: Move pinmux init call

Those two are needed to support updating tegra2_clocks.c's handling of
cdev[12] (see patch series I posted a while back to linux-tegra@).

I believe the first of these was previously posted, but not yet applied
since it was part of a series that included a number of clock changes
that needed to wait for Colin's clock changes.

The second probably hasn't been posted before, but if it has, this
version also covers the trimslice board.

Stephen Warren (4):
  ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO
  ARM: tegra: Prevent requeuing in-progress DMA requests
  ARM: tegra: pinmux: Expose set_func, add get_*
  ARM: tegra: Move pinmux init call

 arch/arm/mach-tegra/board-harmony.c       |    4 +-
 arch/arm/mach-tegra/board-trimslice.c     |    4 +-
 arch/arm/mach-tegra/dma.c                 |    8 ++++
 arch/arm/mach-tegra/include/mach/gpio.h   |    2 +-
 arch/arm/mach-tegra/include/mach/pinmux.h |    9 ++++
 arch/arm/mach-tegra/pinmux.c              |   64 ++++++++++++++++++++++++++---
 6 files changed, 80 insertions(+), 11 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/4] Misc Tegra patches
@ 2011-02-20  3:38 ` Stephen Warren
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: linux-arm-kernel

I have various patches for arch/arm/mach-tegra queued up in order to support
the new ASoC driver. This series is all those patches except those that touch
clock-related code, since I need to wait for Colin's series to land first,
then drop some of my patches, and fix up any merge conflicts.

* ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO

Simple fix. I think not previously posted.

* ARM: tegra: Prevent requeuing in-progress DMA requests

Already in {android,linux}-tegra-2.6.3[67], but not yet in mainline or
for-next.

* ARM: tegra: pinmux: Expose set_func, add get_*
* ARM: tegra: Move pinmux init call

Those two are needed to support updating tegra2_clocks.c's handling of
cdev[12] (see patch series I posted a while back to linux-tegra@).

I believe the first of these was previously posted, but not yet applied
since it was part of a series that included a number of clock changes
that needed to wait for Colin's clock changes.

The second probably hasn't been posted before, but if it has, this
version also covers the trimslice board.

Stephen Warren (4):
  ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO
  ARM: tegra: Prevent requeuing in-progress DMA requests
  ARM: tegra: pinmux: Expose set_func, add get_*
  ARM: tegra: Move pinmux init call

 arch/arm/mach-tegra/board-harmony.c       |    4 +-
 arch/arm/mach-tegra/board-trimslice.c     |    4 +-
 arch/arm/mach-tegra/dma.c                 |    8 ++++
 arch/arm/mach-tegra/include/mach/gpio.h   |    2 +-
 arch/arm/mach-tegra/include/mach/pinmux.h |    9 ++++
 arch/arm/mach-tegra/pinmux.c              |   64 ++++++++++++++++++++++++++---
 6 files changed, 80 insertions(+), 11 deletions(-)

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

* [PATCH 1/4] ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO
  2011-02-20  3:38 ` Stephen Warren
@ 2011-02-20  3:38     ` Stephen Warren
  -1 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: ccross-hpIqsD4AKlfQT0dZR+AlfA, konkers-hpIqsD4AKlfQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-tegra/include/mach/gpio.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index e31f486..12a7cf6 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -31,7 +31,7 @@
 #define gpio_cansleep		__gpio_cansleep
 
 #define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-#define TEGRA_IRQ_TO_GPIO(irq) ((gpio) - INT_GPIO_BASE)
+#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
 
 static inline int gpio_to_irq(unsigned int gpio)
 {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/4] ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO
@ 2011-02-20  3:38     ` Stephen Warren
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/mach-tegra/include/mach/gpio.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index e31f486..12a7cf6 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -31,7 +31,7 @@
 #define gpio_cansleep		__gpio_cansleep
 
 #define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-#define TEGRA_IRQ_TO_GPIO(irq) ((gpio) - INT_GPIO_BASE)
+#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
 
 static inline int gpio_to_irq(unsigned int gpio)
 {
-- 
1.7.1

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

* [PATCH 2/4] ARM: tegra: Prevent requeuing in-progress DMA requests
  2011-02-20  3:38 ` Stephen Warren
@ 2011-02-20  3:38     ` Stephen Warren
  -1 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: ccross-hpIqsD4AKlfQT0dZR+AlfA, konkers-hpIqsD4AKlfQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren

If a request already in the queue is passed to tegra_dma_enqueue_req,
tegra_dma_req.node->{next,prev} will end up pointing to itself instead
of at tegra_dma_channel.list, which is the way a the end-of-list
should be set up. When the DMA request completes and is list_del'd,
the list head will still point at it, yet the node's next/prev will
contain the list poison values. When the next DMA request completes,
a kernel panic will occur when those poison values are dereferenced.

This makes the DMA driver more robust in the face of buggy clients.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-tegra/dma.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
index 250bc7b..f3b869b 100644
--- a/arch/arm/mach-tegra/dma.c
+++ b/arch/arm/mach-tegra/dma.c
@@ -311,6 +311,7 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
 	struct tegra_dma_req *req)
 {
 	unsigned long irq_flags;
+	struct tegra_dma_req *_req;
 	int start_dma = 0;
 
 	if (req->size > NV_DMA_MAX_TRASFER_SIZE ||
@@ -321,6 +322,13 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
 
 	spin_lock_irqsave(&ch->lock, irq_flags);
 
+	list_for_each_entry(_req, &ch->list, node) {
+		if (req == _req) {
+			spin_unlock_irqrestore(&ch->lock, irq_flags);
+			return -EEXIST;
+		}
+	}
+
 	req->bytes_transferred = 0;
 	req->status = 0;
 	req->buffer_status = 0;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/4] ARM: tegra: Prevent requeuing in-progress DMA requests
@ 2011-02-20  3:38     ` Stephen Warren
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: linux-arm-kernel

If a request already in the queue is passed to tegra_dma_enqueue_req,
tegra_dma_req.node->{next,prev} will end up pointing to itself instead
of at tegra_dma_channel.list, which is the way a the end-of-list
should be set up. When the DMA request completes and is list_del'd,
the list head will still point at it, yet the node's next/prev will
contain the list poison values. When the next DMA request completes,
a kernel panic will occur when those poison values are dereferenced.

This makes the DMA driver more robust in the face of buggy clients.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/mach-tegra/dma.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
index 250bc7b..f3b869b 100644
--- a/arch/arm/mach-tegra/dma.c
+++ b/arch/arm/mach-tegra/dma.c
@@ -311,6 +311,7 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
 	struct tegra_dma_req *req)
 {
 	unsigned long irq_flags;
+	struct tegra_dma_req *_req;
 	int start_dma = 0;
 
 	if (req->size > NV_DMA_MAX_TRASFER_SIZE ||
@@ -321,6 +322,13 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
 
 	spin_lock_irqsave(&ch->lock, irq_flags);
 
+	list_for_each_entry(_req, &ch->list, node) {
+		if (req == _req) {
+			spin_unlock_irqrestore(&ch->lock, irq_flags);
+			return -EEXIST;
+		}
+	}
+
 	req->bytes_transferred = 0;
 	req->status = 0;
 	req->buffer_status = 0;
-- 
1.7.1

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

* [PATCH 3/4] ARM: tegra: pinmux: Expose set_func, add get_*
  2011-02-20  3:38 ` Stephen Warren
@ 2011-02-20  3:38     ` Stephen Warren
  -1 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: ccross-hpIqsD4AKlfQT0dZR+AlfA, konkers-hpIqsD4AKlfQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren

Expose set_func for consistency with other set_* functions, plus other
drivers can use this basic API more easily than
tegra_pinmux_config_*_table.

Implement get_* to allow other drivers (e.g. clock) to initialize their
state (e.g. cdev[12] parenting/enable) based on pinmux state.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-tegra/include/mach/pinmux.h |    9 ++++
 arch/arm/mach-tegra/pinmux.c              |   64 ++++++++++++++++++++++++++---
 2 files changed, 67 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-tegra/include/mach/pinmux.h b/arch/arm/mach-tegra/include/mach/pinmux.h
index defd877..368dc3e 100644
--- a/arch/arm/mach-tegra/include/mach/pinmux.h
+++ b/arch/arm/mach-tegra/include/mach/pinmux.h
@@ -218,6 +218,15 @@ struct tegra_pingroup_desc {
 extern const struct tegra_pingroup_desc tegra_soc_pingroups[];
 extern const struct tegra_drive_pingroup_desc tegra_soc_drive_pingroups[];
 
+int tegra_pinmux_get_func(enum tegra_pingroup pg,
+	enum tegra_mux_func *func);
+int tegra_pinmux_get_tristate(enum tegra_pingroup pg,
+	enum tegra_tristate *tristate);
+int tegra_pinmux_get_pullupdown(enum tegra_pingroup pg,
+	enum tegra_pullupdown *pupd);
+
+int tegra_pinmux_set_func(enum tegra_pingroup pg,
+	enum tegra_mux_func func);
 int tegra_pinmux_set_tristate(enum tegra_pingroup pg,
 	enum tegra_tristate tristate);
 int tegra_pinmux_set_pullupdown(enum tegra_pingroup pg,
diff --git a/arch/arm/mach-tegra/pinmux.c b/arch/arm/mach-tegra/pinmux.c
index f80d507..1c69d4d 100644
--- a/arch/arm/mach-tegra/pinmux.c
+++ b/arch/arm/mach-tegra/pinmux.c
@@ -180,14 +180,66 @@ static inline void pg_writel(unsigned long value, unsigned long offset)
 	writel(value, IO_TO_VIRT(TEGRA_APB_MISC_BASE + offset));
 }
 
-static int tegra_pinmux_set_func(const struct tegra_pingroup_config *config)
+int tegra_pinmux_get_func(enum tegra_pingroup pg,
+	enum tegra_mux_func *func)
+{
+	int mux;
+	unsigned long reg;
+
+	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
+		return -ERANGE;
+
+	if (pingroups[pg].mux_reg < 0)
+		return -EINVAL;
+
+	reg = pg_readl(pingroups[pg].mux_reg);
+	mux = (reg >> pingroups[pg].mux_bit) & 3;
+	*func = pingroups[pg].funcs[mux];
+
+	return 0;
+}
+
+int tegra_pinmux_get_tristate(enum tegra_pingroup pg,
+	enum tegra_tristate *tristate)
+{
+	unsigned long reg;
+
+	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
+		return -ERANGE;
+
+	if (pingroups[pg].tri_reg < 0)
+		return -EINVAL;
+
+	reg = pg_readl(pingroups[pg].tri_reg);
+	*tristate = reg & (1 << pingroups[pg].tri_bit);
+
+	return 0;
+}
+
+int tegra_pinmux_get_pullupdown(enum tegra_pingroup pg,
+	enum tegra_pullupdown *pupd)
+{
+	unsigned long reg;
+
+	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
+		return -ERANGE;
+
+	if (pingroups[pg].pupd_reg < 0)
+		return -EINVAL;
+
+	reg = pg_readl(pingroups[pg].pupd_reg);
+	*pupd = (reg >> pingroups[pg].pupd_bit) & 3;
+
+	return 0;
+}
+
+int tegra_pinmux_set_func(enum tegra_pingroup pg,
+	enum tegra_mux_func func)
 {
 	int mux = -1;
 	int i;
 	unsigned long reg;
 	unsigned long flags;
-	enum tegra_pingroup pg = config->pingroup;
-	enum tegra_mux_func func = config->func;
 
 	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
 		return -ERANGE;
@@ -291,7 +343,7 @@ static void tegra_pinmux_config_pingroup(const struct tegra_pingroup_config *con
 	int err;
 
 	if (pingroups[pingroup].mux_reg >= 0) {
-		err = tegra_pinmux_set_func(config);
+		err = tegra_pinmux_set_func(pingroup, func);
 		if (err < 0)
 			pr_err("pinmux: can't set pingroup %s func to %s: %d\n",
 			       pingroup_name(pingroup), func_name(func), err);
@@ -598,7 +650,7 @@ void tegra_pinmux_set_safe_pinmux_table(const struct tegra_pingroup_config *conf
 			continue;
 		}
 		c.func = pingroups[c.pingroup].func_safe;
-		err = tegra_pinmux_set_func(&c);
+		err = tegra_pinmux_set_func(c.pingroup, c.func);
 		if (err < 0)
 			pr_err("%s: tegra_pinmux_set_func returned %d setting "
 			       "%s to %s\n", __func__, err,
@@ -618,7 +670,7 @@ void tegra_pinmux_config_pinmux_table(const struct tegra_pingroup_config *config
 			WARN_ON(1);
 			continue;
 		}
-		err = tegra_pinmux_set_func(&config[i]);
+		err = tegra_pinmux_set_func(config[i].pingroup, config[i].func);
 		if (err < 0)
 			pr_err("%s: tegra_pinmux_set_func returned %d setting "
 			       "%s to %s\n", __func__, err,
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 3/4] ARM: tegra: pinmux: Expose set_func, add get_*
@ 2011-02-20  3:38     ` Stephen Warren
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: linux-arm-kernel

Expose set_func for consistency with other set_* functions, plus other
drivers can use this basic API more easily than
tegra_pinmux_config_*_table.

Implement get_* to allow other drivers (e.g. clock) to initialize their
state (e.g. cdev[12] parenting/enable) based on pinmux state.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/mach-tegra/include/mach/pinmux.h |    9 ++++
 arch/arm/mach-tegra/pinmux.c              |   64 ++++++++++++++++++++++++++---
 2 files changed, 67 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-tegra/include/mach/pinmux.h b/arch/arm/mach-tegra/include/mach/pinmux.h
index defd877..368dc3e 100644
--- a/arch/arm/mach-tegra/include/mach/pinmux.h
+++ b/arch/arm/mach-tegra/include/mach/pinmux.h
@@ -218,6 +218,15 @@ struct tegra_pingroup_desc {
 extern const struct tegra_pingroup_desc tegra_soc_pingroups[];
 extern const struct tegra_drive_pingroup_desc tegra_soc_drive_pingroups[];
 
+int tegra_pinmux_get_func(enum tegra_pingroup pg,
+	enum tegra_mux_func *func);
+int tegra_pinmux_get_tristate(enum tegra_pingroup pg,
+	enum tegra_tristate *tristate);
+int tegra_pinmux_get_pullupdown(enum tegra_pingroup pg,
+	enum tegra_pullupdown *pupd);
+
+int tegra_pinmux_set_func(enum tegra_pingroup pg,
+	enum tegra_mux_func func);
 int tegra_pinmux_set_tristate(enum tegra_pingroup pg,
 	enum tegra_tristate tristate);
 int tegra_pinmux_set_pullupdown(enum tegra_pingroup pg,
diff --git a/arch/arm/mach-tegra/pinmux.c b/arch/arm/mach-tegra/pinmux.c
index f80d507..1c69d4d 100644
--- a/arch/arm/mach-tegra/pinmux.c
+++ b/arch/arm/mach-tegra/pinmux.c
@@ -180,14 +180,66 @@ static inline void pg_writel(unsigned long value, unsigned long offset)
 	writel(value, IO_TO_VIRT(TEGRA_APB_MISC_BASE + offset));
 }
 
-static int tegra_pinmux_set_func(const struct tegra_pingroup_config *config)
+int tegra_pinmux_get_func(enum tegra_pingroup pg,
+	enum tegra_mux_func *func)
+{
+	int mux;
+	unsigned long reg;
+
+	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
+		return -ERANGE;
+
+	if (pingroups[pg].mux_reg < 0)
+		return -EINVAL;
+
+	reg = pg_readl(pingroups[pg].mux_reg);
+	mux = (reg >> pingroups[pg].mux_bit) & 3;
+	*func = pingroups[pg].funcs[mux];
+
+	return 0;
+}
+
+int tegra_pinmux_get_tristate(enum tegra_pingroup pg,
+	enum tegra_tristate *tristate)
+{
+	unsigned long reg;
+
+	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
+		return -ERANGE;
+
+	if (pingroups[pg].tri_reg < 0)
+		return -EINVAL;
+
+	reg = pg_readl(pingroups[pg].tri_reg);
+	*tristate = reg & (1 << pingroups[pg].tri_bit);
+
+	return 0;
+}
+
+int tegra_pinmux_get_pullupdown(enum tegra_pingroup pg,
+	enum tegra_pullupdown *pupd)
+{
+	unsigned long reg;
+
+	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
+		return -ERANGE;
+
+	if (pingroups[pg].pupd_reg < 0)
+		return -EINVAL;
+
+	reg = pg_readl(pingroups[pg].pupd_reg);
+	*pupd = (reg >> pingroups[pg].pupd_bit) & 3;
+
+	return 0;
+}
+
+int tegra_pinmux_set_func(enum tegra_pingroup pg,
+	enum tegra_mux_func func)
 {
 	int mux = -1;
 	int i;
 	unsigned long reg;
 	unsigned long flags;
-	enum tegra_pingroup pg = config->pingroup;
-	enum tegra_mux_func func = config->func;
 
 	if (pg < 0 || pg >=  TEGRA_MAX_PINGROUP)
 		return -ERANGE;
@@ -291,7 +343,7 @@ static void tegra_pinmux_config_pingroup(const struct tegra_pingroup_config *con
 	int err;
 
 	if (pingroups[pingroup].mux_reg >= 0) {
-		err = tegra_pinmux_set_func(config);
+		err = tegra_pinmux_set_func(pingroup, func);
 		if (err < 0)
 			pr_err("pinmux: can't set pingroup %s func to %s: %d\n",
 			       pingroup_name(pingroup), func_name(func), err);
@@ -598,7 +650,7 @@ void tegra_pinmux_set_safe_pinmux_table(const struct tegra_pingroup_config *conf
 			continue;
 		}
 		c.func = pingroups[c.pingroup].func_safe;
-		err = tegra_pinmux_set_func(&c);
+		err = tegra_pinmux_set_func(c.pingroup, c.func);
 		if (err < 0)
 			pr_err("%s: tegra_pinmux_set_func returned %d setting "
 			       "%s to %s\n", __func__, err,
@@ -618,7 +670,7 @@ void tegra_pinmux_config_pinmux_table(const struct tegra_pingroup_config *config
 			WARN_ON(1);
 			continue;
 		}
-		err = tegra_pinmux_set_func(&config[i]);
+		err = tegra_pinmux_set_func(config[i].pingroup, config[i].func);
 		if (err < 0)
 			pr_err("%s: tegra_pinmux_set_func returned %d setting "
 			       "%s to %s\n", __func__, err,
-- 
1.7.1

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

* [PATCH 4/4] ARM: tegra: Move pinmux init call
  2011-02-20  3:38 ` Stephen Warren
@ 2011-02-20  3:38     ` Stephen Warren
  -1 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: ccross-hpIqsD4AKlfQT0dZR+AlfA, konkers-hpIqsD4AKlfQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren

In order for the clock initialization to pick up the results of the
pinmux initialization (which will initialize various parameters of
clocks cdev1, cdev2), the pinmux initialization must happen first.
Move the pinmux init to achieve this.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-tegra/board-harmony.c   |    4 ++--
 arch/arm/mach-tegra/board-trimslice.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index b9dbdb1..eea5ad6 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -104,12 +104,12 @@ static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = {
 
 static void __init tegra_harmony_init(void)
 {
+	harmony_pinmux_init();
+
 	tegra_common_init();
 
 	tegra_clk_init_from_table(harmony_clk_init_table);
 
-	harmony_pinmux_init();
-
 	platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
 }
 
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index ef233b2..aef6abb 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -85,12 +85,12 @@ subsys_initcall(tegra_trimslice_pci_init);
 
 static void __init tegra_trimslice_init(void)
 {
+	trimslice_pinmux_init();
+
 	tegra_common_init();
 
 	tegra_clk_init_from_table(trimslice_clk_init_table);
 
-	trimslice_pinmux_init();
-
 	platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices));
 }
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 4/4] ARM: tegra: Move pinmux init call
@ 2011-02-20  3:38     ` Stephen Warren
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-20  3:38 UTC (permalink / raw)
  To: linux-arm-kernel

In order for the clock initialization to pick up the results of the
pinmux initialization (which will initialize various parameters of
clocks cdev1, cdev2), the pinmux initialization must happen first.
Move the pinmux init to achieve this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/mach-tegra/board-harmony.c   |    4 ++--
 arch/arm/mach-tegra/board-trimslice.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index b9dbdb1..eea5ad6 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -104,12 +104,12 @@ static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = {
 
 static void __init tegra_harmony_init(void)
 {
+	harmony_pinmux_init();
+
 	tegra_common_init();
 
 	tegra_clk_init_from_table(harmony_clk_init_table);
 
-	harmony_pinmux_init();
-
 	platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
 }
 
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index ef233b2..aef6abb 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -85,12 +85,12 @@ subsys_initcall(tegra_trimslice_pci_init);
 
 static void __init tegra_trimslice_init(void)
 {
+	trimslice_pinmux_init();
+
 	tegra_common_init();
 
 	tegra_clk_init_from_table(trimslice_clk_init_table);
 
-	trimslice_pinmux_init();
-
 	platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices));
 }
 
-- 
1.7.1

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

* Re: [PATCH 2/4] ARM: tegra: Prevent requeuing in-progress DMA requests
  2011-02-20  3:38     ` Stephen Warren
@ 2011-02-21  4:09         ` Colin Cross
  -1 siblings, 0 replies; 18+ messages in thread
From: Colin Cross @ 2011-02-21  4:09 UTC (permalink / raw)
  To: Stephen Warren
  Cc: konkers-hpIqsD4AKlfQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> If a request already in the queue is passed to tegra_dma_enqueue_req,
> tegra_dma_req.node->{next,prev} will end up pointing to itself instead
> of at tegra_dma_channel.list, which is the way a the end-of-list
> should be set up. When the DMA request completes and is list_del'd,
> the list head will still point at it, yet the node's next/prev will
> contain the list poison values. When the next DMA request completes,
> a kernel panic will occur when those poison values are dereferenced.
>
> This makes the DMA driver more robust in the face of buggy clients.
>
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  arch/arm/mach-tegra/dma.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
> index 250bc7b..f3b869b 100644
> --- a/arch/arm/mach-tegra/dma.c
> +++ b/arch/arm/mach-tegra/dma.c
> @@ -311,6 +311,7 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
>        struct tegra_dma_req *req)
>  {
>        unsigned long irq_flags;
> +       struct tegra_dma_req *_req;
>        int start_dma = 0;
>
>        if (req->size > NV_DMA_MAX_TRASFER_SIZE ||
> @@ -321,6 +322,13 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
>
>        spin_lock_irqsave(&ch->lock, irq_flags);
>
> +       list_for_each_entry(_req, &ch->list, node) {
> +               if (req == _req) {
> +                       spin_unlock_irqrestore(&ch->lock, irq_flags);
> +                       return -EEXIST;
> +               }
> +       }
> +
>        req->bytes_transferred = 0;
>        req->status = 0;
>        req->buffer_status = 0;
> --
> 1.7.1
>
>

Pushed to tegra for-next
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/4] ARM: tegra: Prevent requeuing in-progress DMA requests
@ 2011-02-21  4:09         ` Colin Cross
  0 siblings, 0 replies; 18+ messages in thread
From: Colin Cross @ 2011-02-21  4:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren@nvidia.com> wrote:
> If a request already in the queue is passed to tegra_dma_enqueue_req,
> tegra_dma_req.node->{next,prev} will end up pointing to itself instead
> of at tegra_dma_channel.list, which is the way a the end-of-list
> should be set up. When the DMA request completes and is list_del'd,
> the list head will still point at it, yet the node's next/prev will
> contain the list poison values. When the next DMA request completes,
> a kernel panic will occur when those poison values are dereferenced.
>
> This makes the DMA driver more robust in the face of buggy clients.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> ?arch/arm/mach-tegra/dma.c | ? ?8 ++++++++
> ?1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
> index 250bc7b..f3b869b 100644
> --- a/arch/arm/mach-tegra/dma.c
> +++ b/arch/arm/mach-tegra/dma.c
> @@ -311,6 +311,7 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
> ? ? ? ?struct tegra_dma_req *req)
> ?{
> ? ? ? ?unsigned long irq_flags;
> + ? ? ? struct tegra_dma_req *_req;
> ? ? ? ?int start_dma = 0;
>
> ? ? ? ?if (req->size > NV_DMA_MAX_TRASFER_SIZE ||
> @@ -321,6 +322,13 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch,
>
> ? ? ? ?spin_lock_irqsave(&ch->lock, irq_flags);
>
> + ? ? ? list_for_each_entry(_req, &ch->list, node) {
> + ? ? ? ? ? ? ? if (req == _req) {
> + ? ? ? ? ? ? ? ? ? ? ? spin_unlock_irqrestore(&ch->lock, irq_flags);
> + ? ? ? ? ? ? ? ? ? ? ? return -EEXIST;
> + ? ? ? ? ? ? ? }
> + ? ? ? }
> +
> ? ? ? ?req->bytes_transferred = 0;
> ? ? ? ?req->status = 0;
> ? ? ? ?req->buffer_status = 0;
> --
> 1.7.1
>
>

Pushed to tegra for-next

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

* Re: [PATCH 4/4] ARM: tegra: Move pinmux init call
  2011-02-20  3:38     ` Stephen Warren
@ 2011-02-22  3:21         ` Colin Cross
  -1 siblings, 0 replies; 18+ messages in thread
From: Colin Cross @ 2011-02-22  3:21 UTC (permalink / raw)
  To: Stephen Warren
  Cc: konkers-hpIqsD4AKlfQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> In order for the clock initialization to pick up the results of the
> pinmux initialization (which will initialize various parameters of
> clocks cdev1, cdev2), the pinmux initialization must happen first.
> Move the pinmux init to achieve this.
>
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  arch/arm/mach-tegra/board-harmony.c   |    4 ++--
>  arch/arm/mach-tegra/board-trimslice.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
> index b9dbdb1..eea5ad6 100644
> --- a/arch/arm/mach-tegra/board-harmony.c
> +++ b/arch/arm/mach-tegra/board-harmony.c
> @@ -104,12 +104,12 @@ static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = {
>
>  static void __init tegra_harmony_init(void)
>  {
> +       harmony_pinmux_init();
> +
>        tegra_common_init();
>
>        tegra_clk_init_from_table(harmony_clk_init_table);
>
> -       harmony_pinmux_init();
> -
>        platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
>  }
>
> diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
> index ef233b2..aef6abb 100644
> --- a/arch/arm/mach-tegra/board-trimslice.c
> +++ b/arch/arm/mach-tegra/board-trimslice.c
> @@ -85,12 +85,12 @@ subsys_initcall(tegra_trimslice_pci_init);
>
>  static void __init tegra_trimslice_init(void)
>  {
> +       trimslice_pinmux_init();
> +
>        tegra_common_init();
>
>        tegra_clk_init_from_table(trimslice_clk_init_table);
>
> -       trimslice_pinmux_init();
> -
>        platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices));
>  }

This isn't going to work any more.  In order for the timer to get a
reference to its clock, clocks have to be up before the system timer
is initialized, so Russell added an init_early hook for clock
initialization.  init_machine happens much later, so the per-board
pinmux init will always happen after clock init.

The calls from clk_dev1/2 init into tegra_pinmux_get_func should be
fine, but they will pick up the bootloader's settings instead of the
board pinmux table settings.  You would need to use the pinmux tables
to untristate the pins (or maybe add untristating, but not
re-tristating, to the clk_enable op?), and add clk_dev1/2 entries to
the clock init table to set the parent to get the correct pinmux
settings.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 4/4] ARM: tegra: Move pinmux init call
@ 2011-02-22  3:21         ` Colin Cross
  0 siblings, 0 replies; 18+ messages in thread
From: Colin Cross @ 2011-02-22  3:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren@nvidia.com> wrote:
> In order for the clock initialization to pick up the results of the
> pinmux initialization (which will initialize various parameters of
> clocks cdev1, cdev2), the pinmux initialization must happen first.
> Move the pinmux init to achieve this.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> ?arch/arm/mach-tegra/board-harmony.c ? | ? ?4 ++--
> ?arch/arm/mach-tegra/board-trimslice.c | ? ?4 ++--
> ?2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
> index b9dbdb1..eea5ad6 100644
> --- a/arch/arm/mach-tegra/board-harmony.c
> +++ b/arch/arm/mach-tegra/board-harmony.c
> @@ -104,12 +104,12 @@ static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = {
>
> ?static void __init tegra_harmony_init(void)
> ?{
> + ? ? ? harmony_pinmux_init();
> +
> ? ? ? ?tegra_common_init();
>
> ? ? ? ?tegra_clk_init_from_table(harmony_clk_init_table);
>
> - ? ? ? harmony_pinmux_init();
> -
> ? ? ? ?platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
> ?}
>
> diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
> index ef233b2..aef6abb 100644
> --- a/arch/arm/mach-tegra/board-trimslice.c
> +++ b/arch/arm/mach-tegra/board-trimslice.c
> @@ -85,12 +85,12 @@ subsys_initcall(tegra_trimslice_pci_init);
>
> ?static void __init tegra_trimslice_init(void)
> ?{
> + ? ? ? trimslice_pinmux_init();
> +
> ? ? ? ?tegra_common_init();
>
> ? ? ? ?tegra_clk_init_from_table(trimslice_clk_init_table);
>
> - ? ? ? trimslice_pinmux_init();
> -
> ? ? ? ?platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices));
> ?}

This isn't going to work any more.  In order for the timer to get a
reference to its clock, clocks have to be up before the system timer
is initialized, so Russell added an init_early hook for clock
initialization.  init_machine happens much later, so the per-board
pinmux init will always happen after clock init.

The calls from clk_dev1/2 init into tegra_pinmux_get_func should be
fine, but they will pick up the bootloader's settings instead of the
board pinmux table settings.  You would need to use the pinmux tables
to untristate the pins (or maybe add untristating, but not
re-tristating, to the clk_enable op?), and add clk_dev1/2 entries to
the clock init table to set the parent to get the correct pinmux
settings.

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

* RE: [PATCH 4/4] ARM: tegra: Move pinmux init call
  2011-02-22  3:21         ` Colin Cross
@ 2011-02-22 17:27             ` Stephen Warren
  -1 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-22 17:27 UTC (permalink / raw)
  To: Colin Cross
  Cc: konkers-hpIqsD4AKlfQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Colin Cross wrote at Monday, February 21, 2011 8:22 PM:
> 
> On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> wrote:
> > In order for the clock initialization to pick up the results of the
> > pinmux initialization (which will initialize various parameters of
> > clocks cdev1, cdev2), the pinmux initialization must happen first.
> > Move the pinmux init to achieve this.
>...
> >  {
> > +       harmony_pinmux_init();
> > +
> >        tegra_common_init();
> >
> >        tegra_clk_init_from_table(harmony_clk_init_table);
> >
> > -       harmony_pinmux_init();
> > -
> 
> This isn't going to work any more.  In order for the timer to get a
> reference to its clock, clocks have to be up before the system timer
> is initialized, so Russell added an init_early hook for clock
> initialization.  init_machine happens much later, so the per-board
> pinmux init will always happen after clock init.

OK. Drop this patch then.

IIRC, this patch was mostly about making the state (e.g. debugfs files) match
between the pinmux and clock drivers. At least initially I'll ignore this now
that I know what's going on with the audio clocks, and just make audio work
with the appropriate pinmux settings as you suggest.

Maybe that approach will obviate the need for my patch that adds set_parent
for cdev[12], if it's done by pinmux settings instead. I'll check and see.
We can think about the underlying synchronization issue between clock/pinmux
later I think.

-- 
nvpublic

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 4/4] ARM: tegra: Move pinmux init call
@ 2011-02-22 17:27             ` Stephen Warren
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Warren @ 2011-02-22 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

Colin Cross wrote at Monday, February 21, 2011 8:22 PM:
> 
> On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren@nvidia.com>
> wrote:
> > In order for the clock initialization to pick up the results of the
> > pinmux initialization (which will initialize various parameters of
> > clocks cdev1, cdev2), the pinmux initialization must happen first.
> > Move the pinmux init to achieve this.
>...
> > ?{
> > + ? ? ? harmony_pinmux_init();
> > +
> > ? ? ? ?tegra_common_init();
> >
> > ? ? ? ?tegra_clk_init_from_table(harmony_clk_init_table);
> >
> > - ? ? ? harmony_pinmux_init();
> > -
> 
> This isn't going to work any more.  In order for the timer to get a
> reference to its clock, clocks have to be up before the system timer
> is initialized, so Russell added an init_early hook for clock
> initialization.  init_machine happens much later, so the per-board
> pinmux init will always happen after clock init.

OK. Drop this patch then.

IIRC, this patch was mostly about making the state (e.g. debugfs files) match
between the pinmux and clock drivers. At least initially I'll ignore this now
that I know what's going on with the audio clocks, and just make audio work
with the appropriate pinmux settings as you suggest.

Maybe that approach will obviate the need for my patch that adds set_parent
for cdev[12], if it's done by pinmux settings instead. I'll check and see.
We can think about the underlying synchronization issue between clock/pinmux
later I think.

-- 
nvpublic

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

* Re: [PATCH 1/4] ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO
  2011-02-20  3:38     ` Stephen Warren
@ 2011-02-22 19:58         ` Colin Cross
  -1 siblings, 0 replies; 18+ messages in thread
From: Colin Cross @ 2011-02-22 19:58 UTC (permalink / raw)
  To: Stephen Warren
  Cc: konkers-hpIqsD4AKlfQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  arch/arm/mach-tegra/include/mach/gpio.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
> index e31f486..12a7cf6 100644
> --- a/arch/arm/mach-tegra/include/mach/gpio.h
> +++ b/arch/arm/mach-tegra/include/mach/gpio.h
> @@ -31,7 +31,7 @@
>  #define gpio_cansleep          __gpio_cansleep
>
>  #define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
> -#define TEGRA_IRQ_TO_GPIO(irq) ((gpio) - INT_GPIO_BASE)
> +#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
>
>  static inline int gpio_to_irq(unsigned int gpio)
>  {
> --
> 1.7.1
>
>

Pushed to for-next
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/4] ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO
@ 2011-02-22 19:58         ` Colin Cross
  0 siblings, 0 replies; 18+ messages in thread
From: Colin Cross @ 2011-02-22 19:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Feb 19, 2011 at 7:38 PM, Stephen Warren <swarren@nvidia.com> wrote:
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> ?arch/arm/mach-tegra/include/mach/gpio.h | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
> index e31f486..12a7cf6 100644
> --- a/arch/arm/mach-tegra/include/mach/gpio.h
> +++ b/arch/arm/mach-tegra/include/mach/gpio.h
> @@ -31,7 +31,7 @@
> ?#define gpio_cansleep ? ? ? ? ?__gpio_cansleep
>
> ?#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
> -#define TEGRA_IRQ_TO_GPIO(irq) ((gpio) - INT_GPIO_BASE)
> +#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
>
> ?static inline int gpio_to_irq(unsigned int gpio)
> ?{
> --
> 1.7.1
>
>

Pushed to for-next

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

end of thread, other threads:[~2011-02-22 19:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-20  3:38 [PATCH 0/4] Misc Tegra patches Stephen Warren
2011-02-20  3:38 ` Stephen Warren
     [not found] ` <1298173137-9242-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-02-20  3:38   ` [PATCH 1/4] ARM: tegra: Fix typo in TEGRA_IRQ_TO_GPIO Stephen Warren
2011-02-20  3:38     ` Stephen Warren
     [not found]     ` <1298173137-9242-2-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-02-22 19:58       ` Colin Cross
2011-02-22 19:58         ` Colin Cross
2011-02-20  3:38   ` [PATCH 2/4] ARM: tegra: Prevent requeuing in-progress DMA requests Stephen Warren
2011-02-20  3:38     ` Stephen Warren
     [not found]     ` <1298173137-9242-3-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-02-21  4:09       ` Colin Cross
2011-02-21  4:09         ` Colin Cross
2011-02-20  3:38   ` [PATCH 3/4] ARM: tegra: pinmux: Expose set_func, add get_* Stephen Warren
2011-02-20  3:38     ` Stephen Warren
2011-02-20  3:38   ` [PATCH 4/4] ARM: tegra: Move pinmux init call Stephen Warren
2011-02-20  3:38     ` Stephen Warren
     [not found]     ` <1298173137-9242-5-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-02-22  3:21       ` Colin Cross
2011-02-22  3:21         ` Colin Cross
     [not found]         ` <AANLkTimcadeAHWuFApw_H+AEs+hgURxCRO2X92M9cehG-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 17:27           ` Stephen Warren
2011-02-22 17:27             ` Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.