LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] powerpc/pci: Move IO workarounds to the common kernel dir
From: Benjamin Herrenschmidt @ 2011-04-11  5:54 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/io-workarounds.h    |   49 +++++++
 arch/powerpc/kernel/Makefile                 |    2 +
 arch/powerpc/kernel/io-workarounds.c         |  184 +++++++++++++++++++++++++
 arch/powerpc/platforms/Kconfig               |    3 +
 arch/powerpc/platforms/cell/Kconfig          |    1 +
 arch/powerpc/platforms/cell/Makefile         |    8 +-
 arch/powerpc/platforms/cell/celleb_pci.c     |    1 -
 arch/powerpc/platforms/cell/celleb_pci.h     |    3 +-
 arch/powerpc/platforms/cell/io-workarounds.c |  185 --------------------------
 arch/powerpc/platforms/cell/io-workarounds.h |   49 -------
 arch/powerpc/platforms/cell/qpace_setup.c    |    1 -
 arch/powerpc/platforms/cell/setup.c          |    2 +-
 arch/powerpc/platforms/cell/spider-pci.c     |    3 +-
 13 files changed, 247 insertions(+), 244 deletions(-)

diff --git a/arch/powerpc/include/asm/io-workarounds.h b/arch/powerpc/include/asm/io-workarounds.h
new file mode 100644
index 0000000..6efc778
--- /dev/null
+++ b/arch/powerpc/include/asm/io-workarounds.h
@@ -0,0 +1,49 @@
+/*
+ * Support PCI IO workaround
+ *
+ * (C) Copyright 2007-2008 TOSHIBA CORPORATION
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _IO_WORKAROUNDS_H
+#define _IO_WORKAROUNDS_H
+
+#include <linux/io.h>
+#include <asm/pci-bridge.h>
+
+/* Bus info */
+struct iowa_bus {
+	struct pci_controller *phb;
+	struct ppc_pci_io *ops;
+	void   *private;
+};
+
+void __devinit io_workaround_init(void);
+void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
+				 int (*)(struct iowa_bus *, void *), void *);
+struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
+struct iowa_bus *iowa_pio_find_bus(unsigned long);
+
+extern struct ppc_pci_io spiderpci_ops;
+extern int spiderpci_iowa_init(struct iowa_bus *, void *);
+
+#define SPIDER_PCI_REG_BASE		0xd000
+#define SPIDER_PCI_REG_SIZE		0x1000
+#define SPIDER_PCI_VCI_CNTL_STAT	0x0110
+#define SPIDER_PCI_DUMMY_READ		0x0810
+#define SPIDER_PCI_DUMMY_READ_BASE	0x0814
+
+#endif /* _IO_WORKAROUNDS_H */
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0fd6273..b0ba78f 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -105,6 +105,8 @@ obj-$(CONFIG_KEXEC)		+= machine_kexec.o crash.o \
 obj-$(CONFIG_AUDIT)		+= audit.o
 obj64-$(CONFIG_AUDIT)		+= compat_audit.o
 
+obj-$(CONFIG_PPC_IO_WORKAROUNDS)	+= io-workarounds.o
+
 obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
 obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_callchain.o
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
new file mode 100644
index 0000000..7e58457
--- /dev/null
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -0,0 +1,184 @@
+/*
+ * Support PCI IO workaround
+ *
+ *  Copyright (C) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ *		       IBM, Corp.
+ *  (C) Copyright 2007-2008 TOSHIBA CORPORATION
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#undef DEBUG
+
+#include <linux/kernel.h>
+
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/pgtable.h>
+#include <asm/ppc-pci.h>
+#include <asm/io-workarounds.h>
+
+#define IOWA_MAX_BUS	8
+
+static struct iowa_bus iowa_busses[IOWA_MAX_BUS];
+static unsigned int iowa_bus_count;
+
+static struct iowa_bus *iowa_pci_find(unsigned long vaddr, unsigned long paddr)
+{
+	int i, j;
+	struct resource *res;
+	unsigned long vstart, vend;
+
+	for (i = 0; i < iowa_bus_count; i++) {
+		struct iowa_bus *bus = &iowa_busses[i];
+		struct pci_controller *phb = bus->phb;
+
+		if (vaddr) {
+			vstart = (unsigned long)phb->io_base_virt;
+			vend = vstart + phb->pci_io_size - 1;
+			if ((vaddr >= vstart) && (vaddr <= vend))
+				return bus;
+		}
+
+		if (paddr)
+			for (j = 0; j < 3; j++) {
+				res = &phb->mem_resources[j];
+				if (paddr >= res->start && paddr <= res->end)
+					return bus;
+			}
+	}
+
+	return NULL;
+}
+
+struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR addr)
+{
+	struct iowa_bus *bus;
+	int token;
+
+	token = PCI_GET_ADDR_TOKEN(addr);
+
+	if (token && token <= iowa_bus_count)
+		bus = &iowa_busses[token - 1];
+	else {
+		unsigned long vaddr, paddr;
+		pte_t *ptep;
+
+		vaddr = (unsigned long)PCI_FIX_ADDR(addr);
+		if (vaddr < PHB_IO_BASE || vaddr >= PHB_IO_END)
+			return NULL;
+
+		ptep = find_linux_pte(init_mm.pgd, vaddr);
+		if (ptep == NULL)
+			paddr = 0;
+		else
+			paddr = pte_pfn(*ptep) << PAGE_SHIFT;
+		bus = iowa_pci_find(vaddr, paddr);
+
+		if (bus == NULL)
+			return NULL;
+	}
+
+	return bus;
+}
+
+struct iowa_bus *iowa_pio_find_bus(unsigned long port)
+{
+	unsigned long vaddr = (unsigned long)pci_io_base + port;
+	return iowa_pci_find(vaddr, 0);
+}
+
+
+#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)		\
+static ret iowa_##name at					\
+{								\
+	struct iowa_bus *bus;					\
+	bus = iowa_##space##_find_bus(aa);			\
+	if (bus && bus->ops && bus->ops->name)			\
+		return bus->ops->name al;			\
+	return __do_##name al;					\
+}
+
+#define DEF_PCI_AC_NORET(name, at, al, space, aa)		\
+static void iowa_##name at					\
+{								\
+	struct iowa_bus *bus;					\
+	bus = iowa_##space##_find_bus(aa);			\
+	if (bus && bus->ops && bus->ops->name) {		\
+		bus->ops->name al;				\
+		return;						\
+	}							\
+	__do_##name al;						\
+}
+
+#include <asm/io-defs.h>
+
+#undef DEF_PCI_AC_RET
+#undef DEF_PCI_AC_NORET
+
+static const struct ppc_pci_io __devinitconst iowa_pci_io = {
+
+#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)	.name = iowa_##name,
+#define DEF_PCI_AC_NORET(name, at, al, space, aa)	.name = iowa_##name,
+
+#include <asm/io-defs.h>
+
+#undef DEF_PCI_AC_RET
+#undef DEF_PCI_AC_NORET
+
+};
+
+static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
+				  unsigned long flags, void *caller)
+{
+	struct iowa_bus *bus;
+	void __iomem *res = __ioremap_caller(addr, size, flags, caller);
+	int busno;
+
+	bus = iowa_pci_find(0, (unsigned long)addr);
+	if (bus != NULL) {
+		busno = bus - iowa_busses;
+		PCI_SET_ADDR_TOKEN(res, busno + 1);
+	}
+	return res;
+}
+
+/* Regist new bus to support workaround */
+void __devinit iowa_register_bus(struct pci_controller *phb,
+			struct ppc_pci_io *ops,
+			int (*initfunc)(struct iowa_bus *, void *), void *data)
+{
+	struct iowa_bus *bus;
+	struct device_node *np = phb->dn;
+
+	if (iowa_bus_count >= IOWA_MAX_BUS) {
+		pr_err("IOWA:Too many pci bridges, "
+		       "workarounds disabled for %s\n", np->full_name);
+		return;
+	}
+
+	bus = &iowa_busses[iowa_bus_count];
+	bus->phb = phb;
+	bus->ops = ops;
+
+	if (initfunc)
+		if ((*initfunc)(bus, data))
+			return;
+
+	iowa_bus_count++;
+
+	pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
+}
+
+/* enable IO workaround */
+void __devinit io_workaround_init(void)
+{
+	static int io_workaround_inited;
+
+	if (io_workaround_inited)
+		return;
+	ppc_pci_io = iowa_pci_io;
+	ppc_md.ioremap = iowa_ioremap;
+	io_workaround_inited = 1;
+}
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 220b137..44059e1 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -162,6 +162,9 @@ config PPC_INDIRECT_PIO
 config PPC_INDIRECT_MEM
 	def_bool n
 
+config PPC_IO_WORKAROUNDS
+	def_bool n
+
 config GENERIC_IOMAP
 	def_bool n
 
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 3c7f1de..67d5009 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -16,6 +16,7 @@ config PPC_CELL_NATIVE
 	bool
 	select PPC_CELL_COMMON
 	select MPIC
+	select PPC_IO_WORKAROUNDS
 	select IBM_NEW_EMAC_EMAC4
 	select IBM_NEW_EMAC_RGMII
 	select IBM_NEW_EMAC_ZMII #test only
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index 83fafe9..8839ef6 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -1,7 +1,7 @@
 obj-$(CONFIG_PPC_CELL_COMMON)		+= cbe_regs.o interrupt.o pervasive.o
 
 obj-$(CONFIG_PPC_CELL_NATIVE)		+= iommu.o setup.o spider-pic.o \
-					   pmu.o io-workarounds.o spider-pci.o
+					   pmu.o spider-pci.o
 obj-$(CONFIG_CBE_RAS)			+= ras.o
 
 obj-$(CONFIG_CBE_THERM)			+= cbe_thermal.o
@@ -39,9 +39,9 @@ obj-y					+= celleb_setup.o \
 					   celleb_pci.o celleb_scc_epci.o \
 					   celleb_scc_pciex.o \
 					   celleb_scc_uhc.o \
-					   io-workarounds.o spider-pci.o \
-					   beat.o beat_htab.o beat_hvCall.o \
-					   beat_interrupt.o beat_iommu.o
+					   spider-pci.o beat.o beat_htab.o \
+					   beat_hvCall.o beat_interrupt.o \
+					   beat_iommu.o
 
 obj-$(CONFIG_SMP)			+= beat_smp.o
 obj-$(CONFIG_PPC_UDBG_BEAT)		+= beat_udbg.o
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c
index 404d1fc..c19b783 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.c
+++ b/arch/powerpc/platforms/cell/celleb_pci.c
@@ -41,7 +41,6 @@
 #include <asm/pci-bridge.h>
 #include <asm/ppc-pci.h>
 
-#include "io-workarounds.h"
 #include "celleb_pci.h"
 
 #define MAX_PCI_DEVICES    32
diff --git a/arch/powerpc/platforms/cell/celleb_pci.h b/arch/powerpc/platforms/cell/celleb_pci.h
index 4cba152..a801fcc 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.h
+++ b/arch/powerpc/platforms/cell/celleb_pci.h
@@ -26,8 +26,9 @@
 #include <asm/pci-bridge.h>
 #include <asm/prom.h>
 #include <asm/ppc-pci.h>
+#include <asm/io-workarounds.h>
 
-#include "io-workarounds.h"
+struct iowa_bus;
 
 struct celleb_phb_spec {
 	int (*setup)(struct device_node *, struct pci_controller *);
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
deleted file mode 100644
index 5c1118e..0000000
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Support PCI IO workaround
- *
- *  Copyright (C) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>
- *		       IBM, Corp.
- *  (C) Copyright 2007-2008 TOSHIBA CORPORATION
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#undef DEBUG
-
-#include <linux/kernel.h>
-
-#include <asm/io.h>
-#include <asm/machdep.h>
-#include <asm/pgtable.h>
-#include <asm/ppc-pci.h>
-
-#include "io-workarounds.h"
-
-#define IOWA_MAX_BUS	8
-
-static struct iowa_bus iowa_busses[IOWA_MAX_BUS];
-static unsigned int iowa_bus_count;
-
-static struct iowa_bus *iowa_pci_find(unsigned long vaddr, unsigned long paddr)
-{
-	int i, j;
-	struct resource *res;
-	unsigned long vstart, vend;
-
-	for (i = 0; i < iowa_bus_count; i++) {
-		struct iowa_bus *bus = &iowa_busses[i];
-		struct pci_controller *phb = bus->phb;
-
-		if (vaddr) {
-			vstart = (unsigned long)phb->io_base_virt;
-			vend = vstart + phb->pci_io_size - 1;
-			if ((vaddr >= vstart) && (vaddr <= vend))
-				return bus;
-		}
-
-		if (paddr)
-			for (j = 0; j < 3; j++) {
-				res = &phb->mem_resources[j];
-				if (paddr >= res->start && paddr <= res->end)
-					return bus;
-			}
-	}
-
-	return NULL;
-}
-
-struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR addr)
-{
-	struct iowa_bus *bus;
-	int token;
-
-	token = PCI_GET_ADDR_TOKEN(addr);
-
-	if (token && token <= iowa_bus_count)
-		bus = &iowa_busses[token - 1];
-	else {
-		unsigned long vaddr, paddr;
-		pte_t *ptep;
-
-		vaddr = (unsigned long)PCI_FIX_ADDR(addr);
-		if (vaddr < PHB_IO_BASE || vaddr >= PHB_IO_END)
-			return NULL;
-
-		ptep = find_linux_pte(init_mm.pgd, vaddr);
-		if (ptep == NULL)
-			paddr = 0;
-		else
-			paddr = pte_pfn(*ptep) << PAGE_SHIFT;
-		bus = iowa_pci_find(vaddr, paddr);
-
-		if (bus == NULL)
-			return NULL;
-	}
-
-	return bus;
-}
-
-struct iowa_bus *iowa_pio_find_bus(unsigned long port)
-{
-	unsigned long vaddr = (unsigned long)pci_io_base + port;
-	return iowa_pci_find(vaddr, 0);
-}
-
-
-#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)		\
-static ret iowa_##name at					\
-{								\
-	struct iowa_bus *bus;					\
-	bus = iowa_##space##_find_bus(aa);			\
-	if (bus && bus->ops && bus->ops->name)			\
-		return bus->ops->name al;			\
-	return __do_##name al;					\
-}
-
-#define DEF_PCI_AC_NORET(name, at, al, space, aa)		\
-static void iowa_##name at					\
-{								\
-	struct iowa_bus *bus;					\
-	bus = iowa_##space##_find_bus(aa);			\
-	if (bus && bus->ops && bus->ops->name) {		\
-		bus->ops->name al;				\
-		return;						\
-	}							\
-	__do_##name al;						\
-}
-
-#include <asm/io-defs.h>
-
-#undef DEF_PCI_AC_RET
-#undef DEF_PCI_AC_NORET
-
-static const struct ppc_pci_io __devinitconst iowa_pci_io = {
-
-#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)	.name = iowa_##name,
-#define DEF_PCI_AC_NORET(name, at, al, space, aa)	.name = iowa_##name,
-
-#include <asm/io-defs.h>
-
-#undef DEF_PCI_AC_RET
-#undef DEF_PCI_AC_NORET
-
-};
-
-static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
-				  unsigned long flags, void *caller)
-{
-	struct iowa_bus *bus;
-	void __iomem *res = __ioremap_caller(addr, size, flags, caller);
-	int busno;
-
-	bus = iowa_pci_find(0, (unsigned long)addr);
-	if (bus != NULL) {
-		busno = bus - iowa_busses;
-		PCI_SET_ADDR_TOKEN(res, busno + 1);
-	}
-	return res;
-}
-
-/* Regist new bus to support workaround */
-void __devinit iowa_register_bus(struct pci_controller *phb,
-			struct ppc_pci_io *ops,
-			int (*initfunc)(struct iowa_bus *, void *), void *data)
-{
-	struct iowa_bus *bus;
-	struct device_node *np = phb->dn;
-
-	if (iowa_bus_count >= IOWA_MAX_BUS) {
-		pr_err("IOWA:Too many pci bridges, "
-		       "workarounds disabled for %s\n", np->full_name);
-		return;
-	}
-
-	bus = &iowa_busses[iowa_bus_count];
-	bus->phb = phb;
-	bus->ops = ops;
-
-	if (initfunc)
-		if ((*initfunc)(bus, data))
-			return;
-
-	iowa_bus_count++;
-
-	pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
-}
-
-/* enable IO workaround */
-void __devinit io_workaround_init(void)
-{
-	static int io_workaround_inited;
-
-	if (io_workaround_inited)
-		return;
-	ppc_pci_io = iowa_pci_io;
-	ppc_md.ioremap = iowa_ioremap;
-	io_workaround_inited = 1;
-}
diff --git a/arch/powerpc/platforms/cell/io-workarounds.h b/arch/powerpc/platforms/cell/io-workarounds.h
deleted file mode 100644
index 6efc778..0000000
--- a/arch/powerpc/platforms/cell/io-workarounds.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Support PCI IO workaround
- *
- * (C) Copyright 2007-2008 TOSHIBA CORPORATION
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef _IO_WORKAROUNDS_H
-#define _IO_WORKAROUNDS_H
-
-#include <linux/io.h>
-#include <asm/pci-bridge.h>
-
-/* Bus info */
-struct iowa_bus {
-	struct pci_controller *phb;
-	struct ppc_pci_io *ops;
-	void   *private;
-};
-
-void __devinit io_workaround_init(void);
-void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
-				 int (*)(struct iowa_bus *, void *), void *);
-struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
-struct iowa_bus *iowa_pio_find_bus(unsigned long);
-
-extern struct ppc_pci_io spiderpci_ops;
-extern int spiderpci_iowa_init(struct iowa_bus *, void *);
-
-#define SPIDER_PCI_REG_BASE		0xd000
-#define SPIDER_PCI_REG_SIZE		0x1000
-#define SPIDER_PCI_VCI_CNTL_STAT	0x0110
-#define SPIDER_PCI_DUMMY_READ		0x0810
-#define SPIDER_PCI_DUMMY_READ_BASE	0x0814
-
-#endif /* _IO_WORKAROUNDS_H */
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c
index d31c594..51e2901 100644
--- a/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/arch/powerpc/platforms/cell/qpace_setup.c
@@ -42,7 +42,6 @@
 #include "interrupt.h"
 #include "pervasive.h"
 #include "ras.h"
-#include "io-workarounds.h"
 
 static void qpace_show_cpuinfo(struct seq_file *m)
 {
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index fd57bfe..af7b13c 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -51,11 +51,11 @@
 #include <asm/udbg.h>
 #include <asm/mpic.h>
 #include <asm/cell-regs.h>
+#include <asm/io-workarounds.h>
 
 #include "interrupt.h"
 #include "pervasive.h"
 #include "ras.h"
-#include "io-workarounds.h"
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
diff --git a/arch/powerpc/platforms/cell/spider-pci.c b/arch/powerpc/platforms/cell/spider-pci.c
index ca7731c..f1f7878 100644
--- a/arch/powerpc/platforms/cell/spider-pci.c
+++ b/arch/powerpc/platforms/cell/spider-pci.c
@@ -27,8 +27,7 @@
 
 #include <asm/ppc-pci.h>
 #include <asm/pci-bridge.h>
-
-#include "io-workarounds.h"
+#include <asm/io-workarounds.h>
 
 #define SPIDER_PCI_DISABLE_PREFETCH
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH 3/4] powerpc/pci: Make IO workarounds init implicit when first bus is registered
From: Benjamin Herrenschmidt @ 2011-04-11  5:54 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/io-workarounds.h |    1 -
 arch/powerpc/kernel/io-workarounds.c      |   27 +++++++++++++++------------
 arch/powerpc/platforms/cell/celleb_pci.c  |   18 +++++-------------
 arch/powerpc/platforms/cell/setup.c       |    2 --
 4 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/arch/powerpc/include/asm/io-workarounds.h b/arch/powerpc/include/asm/io-workarounds.h
index 6efc778..fbae492 100644
--- a/arch/powerpc/include/asm/io-workarounds.h
+++ b/arch/powerpc/include/asm/io-workarounds.h
@@ -31,7 +31,6 @@ struct iowa_bus {
 	void   *private;
 };
 
-void __devinit io_workaround_init(void);
 void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
 				 int (*)(struct iowa_bus *, void *), void *);
 struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
index 7e58457..d36515e 100644
--- a/arch/powerpc/kernel/io-workarounds.c
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -144,7 +144,19 @@ static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
 	return res;
 }
 
-/* Regist new bus to support workaround */
+/* Enable IO workaround */
+static void __devinit io_workaround_init(void)
+{
+	static int io_workaround_inited;
+
+	if (io_workaround_inited)
+		return;
+	ppc_pci_io = iowa_pci_io;
+	ppc_md.ioremap = iowa_ioremap;
+	io_workaround_inited = 1;
+}
+
+/* Register new bus to support workaround */
 void __devinit iowa_register_bus(struct pci_controller *phb,
 			struct ppc_pci_io *ops,
 			int (*initfunc)(struct iowa_bus *, void *), void *data)
@@ -152,6 +164,8 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
 	struct iowa_bus *bus;
 	struct device_node *np = phb->dn;
 
+	io_workaround_init();
+
 	if (iowa_bus_count >= IOWA_MAX_BUS) {
 		pr_err("IOWA:Too many pci bridges, "
 		       "workarounds disabled for %s\n", np->full_name);
@@ -171,14 +185,3 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
 	pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
 }
 
-/* enable IO workaround */
-void __devinit io_workaround_init(void)
-{
-	static int io_workaround_inited;
-
-	if (io_workaround_inited)
-		return;
-	ppc_pci_io = iowa_pci_io;
-	ppc_md.ioremap = iowa_ioremap;
-	io_workaround_inited = 1;
-}
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c
index c19b783..2904b0a 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.c
+++ b/arch/powerpc/platforms/cell/celleb_pci.c
@@ -468,18 +468,6 @@ static struct of_device_id celleb_phb_match[] __initdata = {
 	},
 };
 
-static int __init celleb_io_workaround_init(struct pci_controller *phb,
-					    struct celleb_phb_spec *phb_spec)
-{
-	if (phb_spec->ops) {
-		iowa_register_bus(phb, phb_spec->ops, phb_spec->iowa_init,
-				  phb_spec->iowa_data);
-		io_workaround_init();
-	}
-
-	return 0;
-}
-
 int __init celleb_setup_phb(struct pci_controller *phb)
 {
 	struct device_node *dev = phb->dn;
@@ -499,7 +487,11 @@ int __init celleb_setup_phb(struct pci_controller *phb)
 	if (rc)
 		return 1;
 
-	return celleb_io_workaround_init(phb, phb_spec);
+	if (phb_spec->ops)
+		iowa_register_bus(phb, phb_spec->ops,
+				  phb_spec->iowa_init,
+				  phb_spec->iowa_data);
+	return 0;
 }
 
 int celleb_pci_probe_mode(struct pci_bus *bus)
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index af7b13c..c73cf4c 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -136,8 +136,6 @@ static int __devinit cell_setup_phb(struct pci_controller *phb)
 
 	iowa_register_bus(phb, &spiderpci_ops, &spiderpci_iowa_init,
 				  (void *)SPIDER_PCI_REG_BASE);
-	io_workaround_init();
-
 	return 0;
 }
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH 4/4] powerpc/pci: Properly initialize IO workaround "private"
From: Benjamin Herrenschmidt @ 2011-04-11  5:54 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

Even when no initfunc is provided.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/io-workarounds.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
index d36515e..ffafaea 100644
--- a/arch/powerpc/kernel/io-workarounds.c
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -175,6 +175,7 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
 	bus = &iowa_busses[iowa_bus_count];
 	bus->phb = phb;
 	bus->ops = ops;
+	bus->private = data;
 
 	if (initfunc)
 		if ((*initfunc)(bus, data))
-- 
1.7.1

^ permalink raw reply related

* [PATCH] powerpc: Dump chip data pointer in virq_mapping
From: Michael Ellerman @ 2011-04-11  6:26 UTC (permalink / raw)
  To: linuxppc-dev

This can be useful for differentiating interrupts on the same host
but with different chip data.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/irq.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index f621b7d..ac32ba1 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1082,10 +1082,11 @@ static int virq_debug_show(struct seq_file *m, void *private)
 	struct irq_desc *desc;
 	const char *p;
 	static const char none[] = "none";
+	void *data;
 	int i;
 
-	seq_printf(m, "%-5s  %-7s  %-15s  %s\n", "virq", "hwirq",
-		      "chip name", "host name");
+	seq_printf(m, "%-5s  %-7s  %-15s  %-18s  %s\n", "virq", "hwirq",
+		      "chip name", "chip data", "host name");
 
 	for (i = 1; i < nr_irqs; i++) {
 		desc = irq_to_desc(i);
@@ -1107,6 +1108,9 @@ static int virq_debug_show(struct seq_file *m, void *private)
 				p = none;
 			seq_printf(m, "%-15s  ", p);
 
+			data = irq_desc_get_chip_data(desc);
+			seq_printf(m, "0x%16p  ", data);
+
 			if (irq_map[i].host && irq_map[i].host->of_node)
 				p = irq_map[i].host->of_node->full_name;
 			else
-- 
1.7.1

^ permalink raw reply related

* [PATCH] powerpc: Standardise on MMU_NO_CONTEXT
From: Michael Ellerman @ 2011-04-11  6:35 UTC (permalink / raw)
  To: linuxppc-dev

Use MMU_NO_CONTEXT as the initialiser for mm_context.id on book3e
and hash64.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/mmu-book3e.h |    2 ++
 arch/powerpc/include/asm/mmu-hash64.h |    2 ++
 arch/powerpc/include/asm/tlbflush.h   |    2 --
 arch/powerpc/mm/mmu_context_hash64.c  |    3 +--
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h
index 17194fc..f6e7d40 100644
--- a/arch/powerpc/include/asm/mmu-book3e.h
+++ b/arch/powerpc/include/asm/mmu-book3e.h
@@ -192,6 +192,8 @@
 
 extern unsigned int tlbcam_index;
 
+#define MMU_NO_CONTEXT      	((unsigned int)-1)
+
 typedef struct {
 	unsigned int	id;
 	unsigned int	active;
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index ae7b3ef..b589189 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -409,6 +409,8 @@ static inline void subpage_prot_init_new_context(struct mm_struct *mm) { }
 
 typedef unsigned long mm_context_id_t;
 
+#define MMU_NO_CONTEXT	0
+
 typedef struct {
 	mm_context_id_t id;
 	u16 user_psize;		/* page size index */
diff --git a/arch/powerpc/include/asm/tlbflush.h b/arch/powerpc/include/asm/tlbflush.h
index d50a380..852b139 100644
--- a/arch/powerpc/include/asm/tlbflush.h
+++ b/arch/powerpc/include/asm/tlbflush.h
@@ -32,8 +32,6 @@
 struct vm_area_struct;
 struct mm_struct;
 
-#define MMU_NO_CONTEXT      	((unsigned int)-1)
-
 extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
 			    unsigned long end);
 extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c
index 2535828..c585944 100644
--- a/arch/powerpc/mm/mmu_context_hash64.c
+++ b/arch/powerpc/mm/mmu_context_hash64.c
@@ -31,7 +31,6 @@ static DEFINE_IDA(mmu_context_ida);
  * Each segment contains 2^28 bytes.  Each context maps 2^44 bytes,
  * so we can support 2^19-1 contexts (19 == 35 + 28 - 44).
  */
-#define NO_CONTEXT	0
 #define MAX_CONTEXT	((1UL << 19) - 1)
 
 int __init_new_context(void)
@@ -95,5 +94,5 @@ void destroy_context(struct mm_struct *mm)
 {
 	__destroy_context(mm->context.id);
 	subpage_prot_free(mm);
-	mm->context.id = NO_CONTEXT;
+	mm->context.id = MMU_NO_CONTEXT;
 }
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH 1/4] powerpc/pci: Split IO vs MMIO indirect access hooks
From: Stephen Rothwell @ 2011-04-11  6:35 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

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

Hi Ben,

Just a small note:

On Mon, 11 Apr 2011 15:54:27 +1000 (EST) Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 59eeb77..220b137 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -152,13 +152,18 @@ config PPC_P7_NAP
>  	default n
>  
>  config PPC_INDIRECT_IO
> -	bool
> +	def_bool y
>  	select GENERIC_IOMAP
> -	default n
> +	depends on PPC_INDIRECT_PIO || PPC_INDIRECT_MMIO

config PPC_INDIRECT_IO
	bool
	select GENERIC_IOMAP

> +config PPC_INDIRECT_PIO
> +	def_bool n

config PPC_INDIRECT_PIO
	bool
	select PPC_INDIRECT_IO

> +config PPC_INDIRECT_MEM
> +	def_bool n

config PPC_INDIRECT_MEM
	bool
	select PPC_INDIRECT_IO

>  config GENERIC_IOMAP
> -	bool
> -	default n
> +	def_bool n

Just remove the "defaul n"  (or leave it alobe).

The default for bool is 'n'.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

^ permalink raw reply

* Re: [PATCH 2/4] powerpc/pci: Move IO workarounds to the common kernel dir
From: Stephen Rothwell @ 2011-04-11  6:38 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <5f157bce88237ae70829d2d6df1d792a69b7e02c.1302501428.git.michael@ellerman.id.au>

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

On Mon, 11 Apr 2011 15:54:28 +1000 (EST) Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 220b137..44059e1 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -162,6 +162,9 @@ config PPC_INDIRECT_PIO
>  config PPC_INDIRECT_MEM
>  	def_bool n
>  
> +config PPC_IO_WORKAROUNDS
> +	def_bool n
> +

Just "bool"

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

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

^ permalink raw reply

* [PATCH] driver/e1000e: Fix default interrupt mode select
From: Prabhakar Kushwaha @ 2011-04-11  6:38 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: meet2prabhu, Prabhakar, Jin Qing

From: Prabhakar <prabhakar@freescale.com>

e1000 default interrupt mode is MSI. No matter user select MSI or
disable MSI in kernel config.

Signed-off-by: Jin Qing <b24347@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 Based upon git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branch master)

 drivers/net/e1000e/param.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c
index a150e48..7b3bbec 100644
--- a/drivers/net/e1000e/param.c
+++ b/drivers/net/e1000e/param.c
@@ -390,7 +390,11 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
 			.type = range_option,
 			.name = "Interrupt Mode",
 			.err  = "defaulting to 2 (MSI-X)",
+#ifdef CONFIG_PCI_MSI
 			.def  = E1000E_INT_MODE_MSIX,
+#else
+			.def  = E1000E_INT_MODE_LEGACY,
+#endif
 			.arg  = { .r = { .min = MIN_INTMODE,
 					 .max = MAX_INTMODE } }
 		};
-- 
1.7.3

^ permalink raw reply related

* [PATCH] powerpc: Look for ibm, associativity-reference-points at the root
From: Michael Ellerman @ 2011-04-11  6:42 UTC (permalink / raw)
  To: linuxppc-dev

If we don't find ibm,associativity-reference-points as a child of
/rtas, look for it at the root of the tree instead. We use this on
Book3E where we have no RTAS but still use the sPAPR conventions
for NUMA.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/mm/numa.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 0dc95c0..6e90986 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -311,14 +311,13 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
 static int __init find_min_common_depth(void)
 {
 	int depth;
-	struct device_node *rtas_root;
 	struct device_node *chosen;
+	struct device_node *root;
 	const char *vec5;
 
-	rtas_root = of_find_node_by_path("/rtas");
-
-	if (!rtas_root)
-		return -1;
+	root = of_find_node_by_path("/rtas");
+	if (!root)
+		root = of_find_node_by_path("/");
 
 	/*
 	 * This property is a set of 32-bit integers, each representing
@@ -332,7 +331,7 @@ static int __init find_min_common_depth(void)
 	 * NUMA boundary and the following are progressively less significant
 	 * boundaries. There can be more than one level of NUMA.
 	 */
-	distance_ref_points = of_get_property(rtas_root,
+	distance_ref_points = of_get_property(root,
 					"ibm,associativity-reference-points",
 					&distance_ref_points_depth);
 
@@ -376,11 +375,11 @@ static int __init find_min_common_depth(void)
 		distance_ref_points_depth = MAX_DISTANCE_REF_POINTS;
 	}
 
-	of_node_put(rtas_root);
+	of_node_put(root);
 	return depth;
 
 err:
-	of_node_put(rtas_root);
+	of_node_put(root);
 	return -1;
 }
 
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH] fix build warnings on defconfigs
From: Igor Grinberg @ 2011-04-11  6:11 UTC (permalink / raw)
  To: wanlong.gao
  Cc: linux-mips, david.woodhouse, tony, nicolas.ferre, paulus, eric,
	sam, sfr, linux, khilman, manuel.lauss, u.kleine-koenig, mingo,
	rientjes, anton, ben-linux, linux-arm-kernel, linux-kernel, ralf,
	santosh.shilimkar, akpm, linuxppc-dev, hans-christian.egtvedt
In-Reply-To: <1302375858-11253-1-git-send-email-wanlong.gao@gmail.com>

On 04/09/11 22:04, wanlong.gao@gmail.com wrote:

> From: Wanlong Gao <wanlong.gao@gmail.com>
>
> Change the BT_L2CAP and BT_SCO defconfigs from 'm' to 'y',
> since BT_L2CAP and BT_SCO had changed to bool configs.
>
> Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
> ---

For:

>  arch/arm/configs/cm_x2xx_defconfig         |    4 ++--
>  arch/arm/configs/cm_x300_defconfig         |    4 ++--
>  arch/arm/configs/em_x270_defconfig         |    4 ++--

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

-- 
Regards,
Igor.

^ permalink raw reply

* Re: Problem with mini-PCI-E slot on P2020RDB
From: Fabian Bertholm @ 2011-04-11  8:23 UTC (permalink / raw)
  To: Kushwaha Prabhakar-B32579
  Cc: Mahajan Vivek-B08308, Felix Radensky, Aggrwal Poonam-B10812,
	Leon Woestenberg, linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878
In-Reply-To: <071A08F2C6A57E4E94D980ECA553F87416D42F@039-SN1MPN1-004.039d.mgd.msft.net>

Hello Kushwaha Prabhakar,

Our impression is that there is the same issue on the P1020/P1011 RDB.
Can you confirm this?

Best Regards,
Fabe


2011/4/8 Kushwaha Prabhakar-B32579 <B32579@freescale.com>:
>
>
>> -----Original Message-----
>> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
>> Sent: Thursday, April 07, 2011 10:50 PM
>> To: linuxppc-dev@ozlabs.org
>> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
>> Radensky; Kushwaha Prabhakar-B32579
>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>
>> Hello,
>>
>> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky <felix@embedded-sol.com>
>> wrote:
>> > Kumar Gala wrote:
>> >> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
>> >>>> Thanks a lot. If I understand you correctly, the only way I can get
>> >>>> ath9k driver to work on this board using legacy interrupts is to
>> >>>> wait for a hardware fix. Right ?
>> >>>>
>> >>> Correct
>> >>
>> >> I'm confused. =A0What's the issue with IRQ0 on the P2020RDB? =A0Is it
>> >> used for another purpose?
>> >
>> > There's a problem with IRQ0 with respect to mini-PCI-E slot. I have
>> > Atheros wireless card plugged into it. ath9k wireless driver for this
>> > card uses legacy PCI-E interrupts, and I get "irq 16: nobody cared"
>> > message when driver executes request_irq(). Vivek has come to a
>> > conclusion that the problem is related to incorrect IRQ0 routing for
>> > mini-PCI-E slot on P2020RDB.
>> >
>>
>> I would like to understand this issue better, as I seem to be running
>> into something similar, and it puts my board design on hold.
>>
>> Can someone (from Freescale) explain what happens if a PCI Express end
>> point on the mini-PCIe slot raises a legacy interrupt, and where this
>> goes wrong?
>>
>> From what document or source code file can I conclude that the PCIe
>> legacy interrupt is shared with IRQ0?
>>
>>
>> I found this:
>>
>> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
>> Problem:IRQ0 held low
>> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
>> See R420 in Rev D schematic.
>> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
>> See R423 in Rev D schematic.
>>
>>
>
> Hello Leon,
>
> =A0Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For Ath=
eros issue.
> =A0Can you please try followings, Meanwhile I will try to dig into it.
> =A0 http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td2680=
2038.html
>
> Regarding sata_sil24, Please see my e-mail on Linux-ide for correct IDSEL=
 value.
> Please first try IDSEL value mentioned in email on Linux-ide. Then try th=
is URL..
>
> --Prabhakar
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>

^ permalink raw reply

* RE: Problem with mini-PCI-E slot on P2020RDB
From: Kushwaha Prabhakar-B32579 @ 2011-04-11  9:06 UTC (permalink / raw)
  To: Fabian Bertholm
  Cc: Mahajan Vivek-B08308, Felix Radensky, Aggrwal Poonam-B10812,
	Leon Woestenberg, linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878
In-Reply-To: <BANLkTi=QHOPTiuu2uXr1AcCXrpL3AT4cUw@mail.gmail.com>

Hi Fabe,

Yes .. P1020/P1011 RDB has same issue as of P2020RDB.

It was because of some missing patches at u-boot and Linux.

U-boot patch : It is already present in open source. Please use latest code=
 base
Linux patch : I am in process of posting in open source. Please make mentio=
ned changes of IDSEL.

--Prabhakar

> -----Original Message-----
> From: Fabian Bertholm [mailto:fabeisageek@googlemail.com]
> Sent: Monday, April 11, 2011 1:53 PM
> To: Kushwaha Prabhakar-B32579
> Cc: Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan Vivek-B08308;
> Felix Radensky; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>=20
> Hello Kushwaha Prabhakar,
>=20
> Our impression is that there is the same issue on the P1020/P1011 RDB.
> Can you confirm this?
>=20
> Best Regards,
> Fabe
>=20
>=20
> 2011/4/8 Kushwaha Prabhakar-B32579 <B32579@freescale.com>:
> >
> >
> >> -----Original Message-----
> >> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
> >> Sent: Thursday, April 07, 2011 10:50 PM
> >> To: linuxppc-dev@ozlabs.org
> >> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
> >> Radensky; Kushwaha Prabhakar-B32579
> >> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
> >>
> >> Hello,
> >>
> >> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky
> >> <felix@embedded-sol.com>
> >> wrote:
> >> > Kumar Gala wrote:
> >> >> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
> >> >>>> Thanks a lot. If I understand you correctly, the only way I can
> >> >>>> get ath9k driver to work on this board using legacy interrupts
> >> >>>> is to wait for a hardware fix. Right ?
> >> >>>>
> >> >>> Correct
> >> >>
> >> >> I'm confused. =A0What's the issue with IRQ0 on the P2020RDB? =A0Is =
it
> >> >> used for another purpose?
> >> >
> >> > There's a problem with IRQ0 with respect to mini-PCI-E slot. I have
> >> > Atheros wireless card plugged into it. ath9k wireless driver for
> >> > this card uses legacy PCI-E interrupts, and I get "irq 16: nobody
> cared"
> >> > message when driver executes request_irq(). Vivek has come to a
> >> > conclusion that the problem is related to incorrect IRQ0 routing
> >> > for mini-PCI-E slot on P2020RDB.
> >> >
> >>
> >> I would like to understand this issue better, as I seem to be running
> >> into something similar, and it puts my board design on hold.
> >>
> >> Can someone (from Freescale) explain what happens if a PCI Express
> >> end point on the mini-PCIe slot raises a legacy interrupt, and where
> >> this goes wrong?
> >>
> >> From what document or source code file can I conclude that the PCIe
> >> legacy interrupt is shared with IRQ0?
> >>
> >>
> >> I found this:
> >>
> >> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
> >> Problem:IRQ0 held low
> >> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
> >> See R420 in Rev D schematic.
> >> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
> >> See R423 in Rev D schematic.
> >>
> >>
> >
> > Hello Leon,
> >
> > =A0Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For
> Atheros issue.
> > =A0Can you please try followings, Meanwhile I will try to dig into it.
> >
> > http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td26802
> > 038.html
> >
> > Regarding sata_sil24, Please see my e-mail on Linux-ide for correct
> IDSEL value.
> > Please first try IDSEL value mentioned in email on Linux-ide. Then try
> this URL..
> >
> > --Prabhakar
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
> >

^ permalink raw reply

* [PATCH 3/4] usb:fix a typo
From: Weiping Pan(潘卫平) @ 2011-04-11 10:16 UTC (permalink / raw)
  Cc: David Brownell, Weiping Pan  (=E6=BD=98=E5=8D=AB=E5=B9=B3),
	Greg Kroah-Hartman, open list, open list:FREESCALE USB PER...,
	open list:FREESCALE USB PER...

replace tranmitted with transmitted.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
---
 drivers/usb/gadget/fsl_qe_udc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/fsl_qe_udc.h b/drivers/usb/gadget/fsl_qe_udc.h
index e35e24f..1da5fb0 100644
--- a/drivers/usb/gadget/fsl_qe_udc.h
+++ b/drivers/usb/gadget/fsl_qe_udc.h
@@ -207,7 +207,7 @@ struct qe_frame{
 
 /* Frame status field */
 /* Receive side */
-#define FRAME_OK               0x00000000 /* Frame tranmitted or received OK */
+#define FRAME_OK               0x00000000 /* Frame transmitted or received OK */
 #define FRAME_ERROR            0x80000000 /* Error occurred on frame */
 #define START_FRAME_LOST       0x40000000 /* START_FRAME_LOST */
 #define END_FRAME_LOST         0x20000000 /* END_FRAME_LOST */
-- 
1.7.4

^ permalink raw reply related

* Re: Problem with mini-PCI-E slot on P2020RDB
From: Felix Radensky @ 2011-04-11  8:39 UTC (permalink / raw)
  To: Kushwaha Prabhakar-B32579
  Cc: Mahajan Vivek-B08308, Aggrwal Poonam-B10812, Leon Woestenberg,
	linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878, Fabian Bertholm
In-Reply-To: <071A08F2C6A57E4E94D980ECA553F87416F971@039-SN1MPN1-004.039d.mgd.msft.net>

Hi,

Assuming I have all patches in place, will this problem be
resolved on earlier board revisions (before rev D) ?

Felix.

On 04/11/2011 12:06 PM, Kushwaha Prabhakar-B32579 wrote:
> Hi Fabe,
>
> Yes .. P1020/P1011 RDB has same issue as of P2020RDB.
>
> It was because of some missing patches at u-boot and Linux.
>
> U-boot patch : It is already present in open source. Please use latest code base
> Linux patch : I am in process of posting in open source. Please make mentioned changes of IDSEL.
>
> --Prabhakar
>
>> -----Original Message-----
>> From: Fabian Bertholm [mailto:fabeisageek@googlemail.com]
>> Sent: Monday, April 11, 2011 1:53 PM
>> To: Kushwaha Prabhakar-B32579
>> Cc: Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan Vivek-B08308;
>> Felix Radensky; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>
>> Hello Kushwaha Prabhakar,
>>
>> Our impression is that there is the same issue on the P1020/P1011 RDB.
>> Can you confirm this?
>>
>> Best Regards,
>> Fabe
>>
>>
>> 2011/4/8 Kushwaha Prabhakar-B32579<B32579@freescale.com>:
>>>
>>>> -----Original Message-----
>>>> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
>>>> Sent: Thursday, April 07, 2011 10:50 PM
>>>> To: linuxppc-dev@ozlabs.org
>>>> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
>>>> Radensky; Kushwaha Prabhakar-B32579
>>>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>>>
>>>> Hello,
>>>>
>>>> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky
>>>> <felix@embedded-sol.com>
>>>> wrote:
>>>>> Kumar Gala wrote:
>>>>>> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
>>>>>>>> Thanks a lot. If I understand you correctly, the only way I can
>>>>>>>> get ath9k driver to work on this board using legacy interrupts
>>>>>>>> is to wait for a hardware fix. Right ?
>>>>>>>>
>>>>>>> Correct
>>>>>> I'm confused.  What's the issue with IRQ0 on the P2020RDB?  Is it
>>>>>> used for another purpose?
>>>>> There's a problem with IRQ0 with respect to mini-PCI-E slot. I have
>>>>> Atheros wireless card plugged into it. ath9k wireless driver for
>>>>> this card uses legacy PCI-E interrupts, and I get "irq 16: nobody
>> cared"
>>>>> message when driver executes request_irq(). Vivek has come to a
>>>>> conclusion that the problem is related to incorrect IRQ0 routing
>>>>> for mini-PCI-E slot on P2020RDB.
>>>>>
>>>> I would like to understand this issue better, as I seem to be running
>>>> into something similar, and it puts my board design on hold.
>>>>
>>>> Can someone (from Freescale) explain what happens if a PCI Express
>>>> end point on the mini-PCIe slot raises a legacy interrupt, and where
>>>> this goes wrong?
>>>>
>>>>  From what document or source code file can I conclude that the PCIe
>>>> legacy interrupt is shared with IRQ0?
>>>>
>>>>
>>>> I found this:
>>>>
>>>> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
>>>> Problem:IRQ0 held low
>>>> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
>>>> See R420 in Rev D schematic.
>>>> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
>>>> See R423 in Rev D schematic.
>>>>
>>>>
>>> Hello Leon,
>>>
>>>   Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For
>> Atheros issue.
>>>   Can you please try followings, Meanwhile I will try to dig into it.
>>>
>>> http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td26802
>>> 038.html
>>>
>>> Regarding sata_sil24, Please see my e-mail on Linux-ide for correct
>> IDSEL value.
>>> Please first try IDSEL value mentioned in email on Linux-ide. Then try
>> this URL..
>>> --Prabhakar
>>>
>>> _______________________________________________
>>> Linuxppc-dev mailing list
>>> Linuxppc-dev@lists.ozlabs.org
>>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>>>
>

^ permalink raw reply

* RE: Problem with mini-PCI-E slot on P2020RDB
From: Kushwaha Prabhakar-B32579 @ 2011-04-11 11:09 UTC (permalink / raw)
  To: Felix Radensky
  Cc: Mahajan Vivek-B08308, Aggrwal Poonam-B10812, Leon Woestenberg,
	linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878, Fabian Bertholm
In-Reply-To: <4DA2BE49.9000003@embedded-sol.com>

Hi,

Yes. It wil be applicable for all revisions.=20

Regards,
Prabhakar

> -----Original Message-----
> From: Felix Radensky [mailto:felix@embedded-sol.com]
> Sent: Monday, April 11, 2011 2:10 PM
> To: Kushwaha Prabhakar-B32579
> Cc: Fabian Bertholm; Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan
> Vivek-B08308; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>=20
> Hi,
>=20
> Assuming I have all patches in place, will this problem be resolved on
> earlier board revisions (before rev D) ?
>=20
> Felix.
>=20
> On 04/11/2011 12:06 PM, Kushwaha Prabhakar-B32579 wrote:
> > Hi Fabe,
> >
> > Yes .. P1020/P1011 RDB has same issue as of P2020RDB.
> >
> > It was because of some missing patches at u-boot and Linux.
> >
> > U-boot patch : It is already present in open source. Please use latest
> > code base Linux patch : I am in process of posting in open source.
> Please make mentioned changes of IDSEL.
> >
> > --Prabhakar
> >
> >> -----Original Message-----
> >> From: Fabian Bertholm [mailto:fabeisageek@googlemail.com]
> >> Sent: Monday, April 11, 2011 1:53 PM
> >> To: Kushwaha Prabhakar-B32579
> >> Cc: Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan Vivek-B08308;
> >> Felix Radensky; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
> >> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
> >>
> >> Hello Kushwaha Prabhakar,
> >>
> >> Our impression is that there is the same issue on the P1020/P1011 RDB.
> >> Can you confirm this?
> >>
> >> Best Regards,
> >> Fabe
> >>
> >>
> >> 2011/4/8 Kushwaha Prabhakar-B32579<B32579@freescale.com>:
> >>>
> >>>> -----Original Message-----
> >>>> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
> >>>> Sent: Thursday, April 07, 2011 10:50 PM
> >>>> To: linuxppc-dev@ozlabs.org
> >>>> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
> >>>> Radensky; Kushwaha Prabhakar-B32579
> >>>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
> >>>>
> >>>> Hello,
> >>>>
> >>>> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky
> >>>> <felix@embedded-sol.com>
> >>>> wrote:
> >>>>> Kumar Gala wrote:
> >>>>>> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
> >>>>>>>> Thanks a lot. If I understand you correctly, the only way I can
> >>>>>>>> get ath9k driver to work on this board using legacy interrupts
> >>>>>>>> is to wait for a hardware fix. Right ?
> >>>>>>>>
> >>>>>>> Correct
> >>>>>> I'm confused.  What's the issue with IRQ0 on the P2020RDB?  Is it
> >>>>>> used for another purpose?
> >>>>> There's a problem with IRQ0 with respect to mini-PCI-E slot. I
> >>>>> have Atheros wireless card plugged into it. ath9k wireless driver
> >>>>> for this card uses legacy PCI-E interrupts, and I get "irq 16:
> >>>>> nobody
> >> cared"
> >>>>> message when driver executes request_irq(). Vivek has come to a
> >>>>> conclusion that the problem is related to incorrect IRQ0 routing
> >>>>> for mini-PCI-E slot on P2020RDB.
> >>>>>
> >>>> I would like to understand this issue better, as I seem to be
> >>>> running into something similar, and it puts my board design on hold.
> >>>>
> >>>> Can someone (from Freescale) explain what happens if a PCI Express
> >>>> end point on the mini-PCIe slot raises a legacy interrupt, and
> >>>> where this goes wrong?
> >>>>
> >>>>  From what document or source code file can I conclude that the
> >>>> PCIe legacy interrupt is shared with IRQ0?
> >>>>
> >>>>
> >>>> I found this:
> >>>>
> >>>> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
> >>>> Problem:IRQ0 held low
> >>>> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
> >>>> See R420 in Rev D schematic.
> >>>> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
> >>>> See R423 in Rev D schematic.
> >>>>
> >>>>
> >>> Hello Leon,
> >>>
> >>>   Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For
> >> Atheros issue.
> >>>   Can you please try followings, Meanwhile I will try to dig into it.
> >>>
> >>> http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td268
> >>> 02
> >>> 038.html
> >>>
> >>> Regarding sata_sil24, Please see my e-mail on Linux-ide for correct
> >> IDSEL value.
> >>> Please first try IDSEL value mentioned in email on Linux-ide. Then
> >>> try
> >> this URL..
> >>> --Prabhakar
> >>>
> >>> _______________________________________________
> >>> Linuxppc-dev mailing list
> >>> Linuxppc-dev@lists.ozlabs.org
> >>> https://lists.ozlabs.org/listinfo/linuxppc-dev
> >>>
> >

^ permalink raw reply

* Re: [PATCH] driver/e1000e: Fix default interrupt mode select
From: Kumar Gala @ 2011-04-11 13:11 UTC (permalink / raw)
  To: Prabhakar Kushwaha; +Cc: meet2prabhu, linuxppc-dev, Jin Qing
In-Reply-To: <1302503898-22023-1-git-send-email-prabhakar@freescale.com>


On Apr 11, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:

> From: Prabhakar <prabhakar@freescale.com>
>=20
> e1000 default interrupt mode is MSI. No matter user select MSI or
> disable MSI in kernel config.
>=20
> Signed-off-by: Jin Qing <b24347@freescale.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
> Based upon =
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branc=
h master)
>=20
> drivers/net/e1000e/param.c |    4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)

You should send this to netdev and CC the e1000e Maintainer.

- k=

^ permalink raw reply

* Re: Revert 737a3bb9416ce2a7c7a4170852473a4fcc9c67e8 ?
From: Gabriel Paubert @ 2011-04-11 13:31 UTC (permalink / raw)
  To: Michel Dänzer
  Cc: Greg KH, Uwe Kleine-König, Dave Airlie, linuxppc-dev, LKML
In-Reply-To: <1302185075.24704.143.camel@thor.local>

On Thu, Apr 07, 2011 at 04:04:35PM +0200, Michel Dänzer wrote:
> On Mit, 2011-04-06 at 22:43 +0200, Gabriel Paubert wrote: 
> > 
> > The probem is that, at least on one of my machines, the new driver
> > does not work: the system hangs (apparently solid, but it's before
> > networking starts up and I've not yet hooked up a serial console), 
> > after the "radeon: ib pool ready" message.
> 
> Does radeon.agpmode=-1 radeon.no_wb=1 help?
> 
> You might be able to get more information via netconsole if you prevent
> the radeon module from loading automatically (or load it with
> radeon.modeset=0 first) and then load it e.g. via ssh with modeset=1.

Loading the module with modeset=1 results in insmod blocked in
kernel state (not consuming CPU cycles either). The last kernel 
message is always the same (ib pool ready). This seems to be 
independent of agpmode and no_wb. The kernel messages when
loading the driver are:

kernel: [drm] radeon kernel modesetting enabled.
kernel: checking generic (c0000000 140000) vs hw (c0000000 10000000)
kernel: fb: conflicting fb hw usage radeondrmfb vs OFfb vga,Displa - removing generic driver
kernel: [drm] initializing kernel modesetting (RV530 0x1002:0x71C7).
kernel: radeon 0000:f1:00.0: Using 64-bit DMA iommu bypass
kernel: [drm] register mmio base: 0xE8000000
kernel: [drm] register mmio size: 65536
kernel: radeon 0000:f1:00.0: Invalid ROM contents
kernel: ATOM BIOS: X1650PRO
kernel: [drm] Generation 2 PCI interface, using max accessible memory
kernel: radeon 0000:f1:00.0: VRAM: 512M 0x0000000000000000 - 0x000000001FFFFFFF (512M used)
kernel: radeon 0000:f1:00.0: GTT: 512M 0x0000000020000000 - 0x000000003FFFFFFF
kernel: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
kernel: [drm] Driver supports precise vblank timestamp query.
kernel: irq: irq 9 on host /mpic mapped to virtual irq 24
kernel: u3msi: allocated virq 0x18 (hw 0x9) addr 0xf8004090
kernel: radeon 0000:f1:00.0: radeon: using MSI.
kernel: [drm] radeon: irq initialized.
kernel: [drm] Detected VRAM RAM=512M, BAR=256M
kernel: [drm] RAM width 128bits DDR
kernel: [TTM] Zone  kernel: Available graphics memory: 1002914 kiB.
kernel: [TTM] Initializing pool allocator.
kernel: [drm] radeon: 512M of VRAM memory ready
kernel: [drm] radeon: 512M of GTT memory ready.
kernel: [drm] GART: num cpu pages 131072, num gpu pages 131072
kernel: [drm] radeon: 1 quad pipes, 2 z pipes initialized.
kernel: [drm] PCIE GART of 512M enabled (table at 0x00040000).
kernel: radeon 0000:f1:00.0: WB enabled
kernel: [drm] Loading R500 Microcode
kernel: [drm] radeon: ring at 0x0000000020001000
kernel: [drm] ring test succeeded in 6 usecs
kernel: [drm] radeon: ib pool ready.


For now, with modeset=0, agpmode=-1 and no_wb=1, the driver
seems to work. But it sometimes took hours to fail, so some
more wait is needed.

	Regards,
	Gabriel

^ permalink raw reply

* Re: Problem with mini-PCI-E slot on P2020RDB
From: Felix Radensky @ 2011-04-11 13:45 UTC (permalink / raw)
  To: Kushwaha Prabhakar-B32579
  Cc: Mahajan Vivek-B08308, Aggrwal Poonam-B10812, Leon Woestenberg,
	linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878, Fabian Bertholm
In-Reply-To: <071A08F2C6A57E4E94D980ECA553F87416FC1F@039-SN1MPN1-004.039d.mgd.msft.net>

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

Hi Prabhakar,

On 04/11/2011 02:09 PM, Kushwaha Prabhakar-B32579 wrote:
> Hi,
>
> Yes. It wil be applicable for all revisions.
>
> Regards,
> Prabhakar
>

I'm sure this is applicable to all revisions, but it doesn't necessarily
makes things work. The problem I've reported back in 2009 still
exists on P2020RDB revC, even if I use the latest u-boot and kernel
and make device tree changes that you've suggested.
I've attached the boot log.

On the other hand, on P1020RDB revD with the same kernel, ath9k
driver loads fine and interrupts are arriving. However this only works
with u-boot-2010.12. If I upgrade to  u-boot-2011.03 loading ath9k
hangs the board. I'll report this separately on u-boot mailing list.

I would summarize this problem as follows. P10xx/P20xx RDB boards
prior to revD have hardware flaw. Using mini PCI-E cards that rely on
legacy interrupts is not possible on such boards. The problem was
fixed in board revision D. To use legacy interrupts one has to modify
pci-e nodes in device tree and add "interrupt-map-mask" and
"interrupt-map" properties.

Do you agree with this analysis ?

Felix.




>> -----Original Message-----
>> From: Felix Radensky [mailto:felix@embedded-sol.com]
>> Sent: Monday, April 11, 2011 2:10 PM
>> To: Kushwaha Prabhakar-B32579
>> Cc: Fabian Bertholm; Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan
>> Vivek-B08308; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>
>> Hi,
>>
>> Assuming I have all patches in place, will this problem be resolved on
>> earlier board revisions (before rev D) ?
>>
>> Felix.
>>
>> On 04/11/2011 12:06 PM, Kushwaha Prabhakar-B32579 wrote:
>>> Hi Fabe,
>>>
>>> Yes .. P1020/P1011 RDB has same issue as of P2020RDB.
>>>
>>> It was because of some missing patches at u-boot and Linux.
>>>
>>> U-boot patch : It is already present in open source. Please use latest
>>> code base Linux patch : I am in process of posting in open source.
>> Please make mentioned changes of IDSEL.
>>> --Prabhakar
>>>
>>>> -----Original Message-----
>>>> From: Fabian Bertholm [mailto:fabeisageek@googlemail.com]
>>>> Sent: Monday, April 11, 2011 1:53 PM
>>>> To: Kushwaha Prabhakar-B32579
>>>> Cc: Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan Vivek-B08308;
>>>> Felix Radensky; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
>>>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>>>
>>>> Hello Kushwaha Prabhakar,
>>>>
>>>> Our impression is that there is the same issue on the P1020/P1011 RDB.
>>>> Can you confirm this?
>>>>
>>>> Best Regards,
>>>> Fabe
>>>>
>>>>
>>>> 2011/4/8 Kushwaha Prabhakar-B32579<B32579@freescale.com>:
>>>>>> -----Original Message-----
>>>>>> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
>>>>>> Sent: Thursday, April 07, 2011 10:50 PM
>>>>>> To: linuxppc-dev@ozlabs.org
>>>>>> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
>>>>>> Radensky; Kushwaha Prabhakar-B32579
>>>>>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky
>>>>>> <felix@embedded-sol.com>
>>>>>> wrote:
>>>>>>> Kumar Gala wrote:
>>>>>>>> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
>>>>>>>>>> Thanks a lot. If I understand you correctly, the only way I can
>>>>>>>>>> get ath9k driver to work on this board using legacy interrupts
>>>>>>>>>> is to wait for a hardware fix. Right ?
>>>>>>>>>>
>>>>>>>>> Correct
>>>>>>>> I'm confused.  What's the issue with IRQ0 on the P2020RDB?  Is it
>>>>>>>> used for another purpose?
>>>>>>> There's a problem with IRQ0 with respect to mini-PCI-E slot. I
>>>>>>> have Atheros wireless card plugged into it. ath9k wireless driver
>>>>>>> for this card uses legacy PCI-E interrupts, and I get "irq 16:
>>>>>>> nobody
>>>> cared"
>>>>>>> message when driver executes request_irq(). Vivek has come to a
>>>>>>> conclusion that the problem is related to incorrect IRQ0 routing
>>>>>>> for mini-PCI-E slot on P2020RDB.
>>>>>>>
>>>>>> I would like to understand this issue better, as I seem to be
>>>>>> running into something similar, and it puts my board design on hold.
>>>>>>
>>>>>> Can someone (from Freescale) explain what happens if a PCI Express
>>>>>> end point on the mini-PCIe slot raises a legacy interrupt, and
>>>>>> where this goes wrong?
>>>>>>
>>>>>>   From what document or source code file can I conclude that the
>>>>>> PCIe legacy interrupt is shared with IRQ0?
>>>>>>
>>>>>>
>>>>>> I found this:
>>>>>>
>>>>>> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
>>>>>> Problem:IRQ0 held low
>>>>>> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
>>>>>> See R420 in Rev D schematic.
>>>>>> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
>>>>>> See R423 in Rev D schematic.
>>>>>>
>>>>>>
>>>>> Hello Leon,
>>>>>
>>>>>    Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For
>>>> Atheros issue.
>>>>>    Can you please try followings, Meanwhile I will try to dig into it.
>>>>>
>>>>> http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td268
>>>>> 02
>>>>> 038.html
>>>>>
>>>>> Regarding sata_sil24, Please see my e-mail on Linux-ide for correct
>>>> IDSEL value.
>>>>> Please first try IDSEL value mentioned in email on Linux-ide. Then
>>>>> try
>>>> this URL..
>>>>> --Prabhakar
>>>>>
>>>>> _______________________________________________
>>>>> Linuxppc-dev mailing list
>>>>> Linuxppc-dev@lists.ozlabs.org
>>>>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>>>>>
>

[-- Attachment #2: bootlog.txt --]
[-- Type: text/plain, Size: 13325 bytes --]

U-Boot 2011.03 (Apr 11 2011 - 13:57:51)

CPU0:  P2020E, Version: 1.0, (0x80ea0010)
Core:  E500, Version: 4.0, (0x80211040)
Clock Configuration:
       CPU0:1200 MHz, CPU1:1200 MHz,
       CCB:600  MHz,
       DDR:400  MHz (800 MT/s data rate) (Asynchronous), LBC:37.500 MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
Board: P2020RDB RevC
I2C:   ready
DRAM:  Configuring DDR for 800 MT/s data rate
DDR: 1 GiB (DDR2, 64-bit, CL=6, ECC off)
Flash: 16 MiB
L2:    512 KB enabled
NAND:  32 MiB
MMC:  FSL_ESDHC: 0
EEPROM: Invalid ID (ff ff ff ff)
PCIe1: Root Complex of Slot 2, x1, regs @ 0xffe0a000
  01:00.0     - 168c:002a - Network controller
PCIe1: Bus 00 - 01
PCIe2: Root Complex of Slot 1, no link, regs @ 0xffe09000
PCIe2: Bus 02 - 02
In:    serial
Out:   serial
Err:   serial
Net:   eTSEC3 is in sgmii mode.
uploading VSC7385 microcode from ef000000
eTSEC1: No support for PHY id ffffffff; assuming generic
eTSEC1, eTSEC2, eTSEC3
Hit any key to stop autoboot:  0
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 10.0.0.10; our IP address is 10.0.0.30
Filename 'p2020rdb/uImage'.
Load address: 0x1000000
Loading: #################################################################
         #################################################################
         #################################################################
         ##########
done
Bytes transferred = 2997778 (2dbe12 hex)
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 10.0.0.10; our IP address is 10.0.0.30
Filename 'p2020rdb/p2020rdb.dtb'.
Load address: 0xc00000
Loading: #
done
Bytes transferred = 11229 (2bdd hex)
WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-2.6.38.2
   Created:      2011-04-11  11:19:15 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    2997714 Bytes = 2.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00c00000
   Booting using the fdt blob at 0xc00000
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 00ffa000, end 00fffbdc ... OK
Using P2020 RDB machine description
Memory CAM mapping: 256/256/256 Mb, residual: 256Mb
Linux version 2.6.38.2 (felix@felix.lan) (gcc version 4.2.2) #1 Mon Apr 11 14:18:40 IDT 2011
bootconsole [udbg0] enabled
setup_arch: bootmem
mpc85xx_rdb_setup_arch()
Found FSL PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->0
PCI host bridge /pcie@ffe09000  ranges:
 MEM 0x00000000a0000000..0x00000000bfffffff -> 0x00000000a0000000
  IO 0x00000000ffc30000..0x00000000ffc3ffff -> 0x0000000000000000
/pcie@ffe09000: PCICSRBAR @ 0xfff00000
Found FSL PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->1
PCI host bridge /pcie@ffe0a000  ranges:
 MEM 0x00000000c0000000..0x00000000dfffffff -> 0x00000000c0000000
  IO 0x00000000ffc20000..0x00000000ffc2ffff -> 0x0000000000000000
/pcie@ffe0a000: PCICSRBAR @ 0xfff00000
MPC85xx RDB board from Freescale Semiconductor
arch: exit
Zone PFN ranges:
  DMA      0x00000000 -> 0x00030000
  Normal   empty
  HighMem  0x00030000 -> 0x00040000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00040000
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096
Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/4.2/ppc_85xxDP ip=10.0.0.30:10.0.0.10::255.0.0.0:P2020RDB:eth0:off console=ttyS0,115200 ra0
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1033304k/1048576k available (5816k kernel code, 15272k reserved, 184k data, 148k bss, 200k init)
Kernel virtual memory layout:
  * 0xfffcf000..0xfffff000  : fixmap
  * 0xffc00000..0xffe00000  : highmem PTEs
  * 0xffbda000..0xffc00000  : early ioremap
  * 0xf1000000..0xffbda000  : vmalloc & ioremap
SLUB: Genslabs=15, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC  " version 1.2 at ffe40000, max 2 CPUs
mpic: ISU size: 256, shift: 8, mask: ff
mpic: Initializing for 256 sources
clocksource: timebase mult[3555555] shift[22] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
            
PCI: Probing PCI hardware
pci 0000:00:00.0: ignoring class b20 (doesn't match header type 01)
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0001:02:00.0: ignoring class b20 (doesn't match header type 01)
pci 0001:02:00.0: PCI bridge to [bus 03-ff]
PCI: Cannot allocate resource region 0 of device 0001:03:00.0, will remap
pci 0000:00:00.0: PCI bridge to [bus 01-01]
pci 0000:00:00.0:   bridge window [io  0xffbed000-0xffbfcfff]
pci 0000:00:00.0:   bridge window [mem 0xa0000000-0xbfffffff]
pci 0000:00:00.0:   bridge window [mem pref disabled]
pci 0000:00:00.0: enabling device (0106 -> 0107)
pci 0001:03:00.0: BAR 0: assigned [mem 0xc0000000-0xc000ffff 64bit]
pci 0001:03:00.0: BAR 0: set to [mem 0xc0000000-0xc000ffff 64bit] (PCI address [0xc0000000-0xc000ffff])
pci 0001:02:00.0: PCI bridge to [bus 03-03]
pci 0001:02:00.0:   bridge window [io  0xffbdb000-0xffbeafff]
pci 0001:02:00.0:   bridge window [mem 0xc0000000-0xdfffffff]
pci 0001:02:00.0:   bridge window [mem pref disabled]
pci 0001:02:00.0: enabling device (0106 -> 0107)
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Freescale Elo / Elo Plus DMA driver
Advanced Linux Sound Architecture Driver Version 1.0.23.
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource timebase
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
of:fsl-elo-dma ffe0c300.dma: #0 (fsl,eloplus-dma-channel), irq 76
of:fsl-elo-dma ffe0c300.dma: #1 (fsl,eloplus-dma-channel), irq 77
of:fsl-elo-dma ffe0c300.dma: #2 (fsl,eloplus-dma-channel), irq 78
of:fsl-elo-dma ffe0c300.dma: #3 (fsl,eloplus-dma-channel), irq 79
of:fsl-elo-dma ffe21300.dma: #0 (fsl,eloplus-dma-channel), irq 21
of:fsl-elo-dma ffe21300.dma: #1 (fsl,eloplus-dma-channel), irq 22
of:fsl-elo-dma ffe21300.dma: #2 (fsl,eloplus-dma-channel), irq 23
of:fsl-elo-dma ffe21300.dma: #3 (fsl,eloplus-dma-channel), irq 24
audit: initializing netlink socket (disabled)
type=2000 audit(0.224:1): initialized
highmem bounce pool size: 64 pages
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NTFS driver 2.1.30 [Flags: R/O].
msgmni has been set to 1506
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Freescale DIU driver
Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0xffe04500 (irq = 42) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0xffe04600 (irq = 42) is a 16550A
Generic non-volatile memory driver v1.1
brd: module loaded
loop: module loaded
nbd: registered device at major 43
st: Version 20101219, fixed bufsize 32768, s/g segs 256
Fixed MDIO Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 00:04:9f:ec:a1:02
eth0: Running with NAPI enabled
eth0: RX BD ring size for Q[0]: 256
eth0: TX BD ring size for Q[0]: 256
eth1: Gianfar Ethernet Controller Version 1.2, 00:04:9f:ec:a1:11
eth1: Running with NAPI enabled
eth1: RX BD ring size for Q[0]: 256
eth1: TX BD ring size for Q[0]: 256
eth2: Gianfar Ethernet Controller Version 1.2, 00:04:9f:ec:a1:01
eth2: Running with NAPI enabled
eth2: RX BD ring size for Q[0]: 256
eth2: TX BD ring size for Q[0]: 256
Freescale PowerQUICC MII Bus: probed
Freescale PowerQUICC MII Bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
/soc@ffe00000/usb@22000: Invalid 'dr_mode' property, fallback to host mode
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 28, io mem 0xffe22000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
of:mpc-i2c ffe03000.i2c: timeout 1000000 us
of:mpc-i2c ffe03100.i2c: timeout 1000000 us
EDAC MC: Ver: 2.1.0 Apr 11 2011
of:talitos ffe30000.crypto: hwrng
of:talitos ffe30000.crypto: authenc-hmac-sha1-cbc-aes-talitos
of:talitos ffe30000.crypto: authenc-hmac-sha1-cbc-3des-talitos
of:talitos ffe30000.crypto: authenc-hmac-sha256-cbc-aes-talitos
of:talitos ffe30000.crypto: authenc-hmac-sha256-cbc-3des-talitos
of:talitos ffe30000.crypto: authenc-hmac-md5-cbc-aes-talitos
of:talitos ffe30000.crypto: authenc-hmac-md5-cbc-3des-talitos
of:talitos ffe30000.crypto: cbc-aes-talitos
of:talitos ffe30000.crypto: cbc-3des-talitos
of:talitos ffe30000.crypto: md5-talitos
of:talitos ffe30000.crypto: sha1-talitos
of:talitos ffe30000.crypto: sha224-talitos
of:talitos ffe30000.crypto: sha256-talitos
of:talitos ffe30000.crypto: sha384-talitos
of:talitos ffe30000.crypto: sha512-talitos
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ALSA device list:
  No soundcards found.
IPv4 over IPv4 tunneling driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ADDRCONF(NETDEV_UP): eth0: link is not ready
IP-Config: Complete:
     device=eth0, addr=10.0.0.30, mask=255.0.0.0, gw=255.255.255.255,
     host=P2020RDB, domain=, nis-domain=(none),
     bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=
PHY: 0:01 - Link is Up - 1000/Full
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing unused kernel memory: 200k init
INIT: version 2.86 booting
                Welcome to DENX Embedded Linux Environment
                Press 'I' to enter interactive startup.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Setting clock : Thu Jan  1 01:00:03 CET 1970 [  OK  ]
Building the cache [  OK  ]
Setting hostname P2020RDB:  [  OK  ]
Your system appears to have shut down uncleanly
Checking filesystems
Checking all file systems.
[  OK  ]
Mounting local filesystems:  [  OK  ]
Enabling /etc/fstab swaps:  [  OK  ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Bringing up loopback interface:  [  OK  ]
Starting system logger: [  OK  ]
Starting kernel logger: [  OK  ]
Starting rpcbind: [  OK  ]
Mounting NFS filesystems:  [  OK  ]
Mounting other filesystems:  [  OK  ]
Starting xinetd: [  OK  ]
Starting dropbear:  [  OK  ]

DENX ELDK version 4.2 build 2008-04-01
Linux 2.6.38.2 on a ppc

P2020RDB login: root
Last login: Thu Jan  1 01:00:15 on ttyS0
-bash-3.2# modprobe ath9k
irq 16: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[efff1f50] [c0007370] show_stack+0x3c/0x17c (unreliable)
[efff1f90] [c0072200] __report_bad_irq+0x38/0xcc
[efff1fb0] [c007244c] note_interrupt+0x1b8/0x228
[efff1fe0] [c0073548] handle_fasteoi_irq+0x9c/0x114
[efff1ff0] [c000cb98] call_handle_irq+0x18/0x28
[ef4adbe0] [c0005130] do_IRQ+0xa4/0x140
[ef4adc10] [c000e420] ret_from_except+0x0/0x18
--- Exception: 501 at __setup_irq+0x1a4/0x33c
    LR = __setup_irq+0x338/0x33c
[ef4adcf0] [c0071684] request_threaded_irq+0xbc/0x138
[ef4add20] [f171fcf8] ath_pci_probe+0x218/0x364 [ath9k]
[ef4adda0] [c01e0508] local_pci_probe+0x24/0x34
[ef4addb0] [c01e0798] pci_device_probe+0x84/0xc4
[ef4adde0] [c021fe04] driver_probe_device+0x150/0x1b4
[ef4ade00] [c022011c] __driver_attach+0xa4/0xa8
[ef4ade20] [c021ed38] bus_for_each_dev+0x60/0x9c
[ef4ade50] [c021fb4c] driver_attach+0x24/0x34
[ef4ade60] [c021f8d4] bus_add_driver+0x1c0/0x284
[ef4ade90] [c0220380] driver_register+0x70/0x168
[ef4adeb0] [c01e0a88] __pci_register_driver+0x4c/0xd4
[ef4aded0] [f171f998] ath_pci_init+0x28/0x38 [ath9k]
[ef4adee0] [f172804c] ath9k_init+0x4c/0xb0 [ath9k]
[ef4adef0] [c0001ef8] do_one_initcall+0x16c/0x1b8
[ef4adf20] [c006a328] sys_init_module+0xd4/0x1e4
[ef4adf40] [c000ddcc] ret_from_syscall+0x0/0x3c
--- Exception: c01 at 0xff690b0
    LR = 0x10003420
handlers:
[<f171698c>] (ath_isr+0x0/0x210 [ath9k])
Disabling IRQ #16

^ permalink raw reply

* Re: Revert 737a3bb9416ce2a7c7a4170852473a4fcc9c67e8 ?
From: Michel Dänzer @ 2011-04-11 15:32 UTC (permalink / raw)
  To: Gabriel Paubert
  Cc: Greg KH, linuxppc-dev, dri-devel, LKML, Uwe Kleine-König,
	Dave Airlie
In-Reply-To: <20110411133128.GA24344@iram.es>

[ Adding the dri-devel list ]

On Mon, 2011-04-11 at 15:31 +0200, Gabriel Paubert wrote:=20
> On Thu, Apr 07, 2011 at 04:04:35PM +0200, Michel D=C3=A4nzer wrote:
> > On Mit, 2011-04-06 at 22:43 +0200, Gabriel Paubert wrote:=20
> > >=20
> > > The probem is that, at least on one of my machines, the new driver
> > > does not work: the system hangs (apparently solid, but it's before
> > > networking starts up and I've not yet hooked up a serial console),=
=20
> > > after the "radeon: ib pool ready" message.
> >=20
> > Does radeon.agpmode=3D-1 radeon.no_wb=3D1 help?
> >=20
> > You might be able to get more information via netconsole if you prevent
> > the radeon module from loading automatically (or load it with
> > radeon.modeset=3D0 first) and then load it e.g. via ssh with modeset=3D=
1.
>=20
> Loading the module with modeset=3D1 results in insmod blocked in
> kernel state (not consuming CPU cycles either). The last kernel=20
> message is always the same (ib pool ready). This seems to be=20
> independent of agpmode and no_wb. The kernel messages when
> loading the driver are:
>=20
> kernel: [drm] radeon kernel modesetting enabled.
> kernel: checking generic (c0000000 140000) vs hw (c0000000 10000000)
> kernel: fb: conflicting fb hw usage radeondrmfb vs OFfb vga,Displa - remo=
ving generic driver
> kernel: [drm] initializing kernel modesetting (RV530 0x1002:0x71C7).
> kernel: radeon 0000:f1:00.0: Using 64-bit DMA iommu bypass
> kernel: [drm] register mmio base: 0xE8000000
> kernel: [drm] register mmio size: 65536
> kernel: radeon 0000:f1:00.0: Invalid ROM contents
> kernel: ATOM BIOS: X1650PRO
> kernel: [drm] Generation 2 PCI interface, using max accessible memory
> kernel: radeon 0000:f1:00.0: VRAM: 512M 0x0000000000000000 - 0x000000001F=
FFFFFF (512M used)
> kernel: radeon 0000:f1:00.0: GTT: 512M 0x0000000020000000 - 0x000000003FF=
FFFFF
> kernel: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
> kernel: [drm] Driver supports precise vblank timestamp query.
> kernel: irq: irq 9 on host /mpic mapped to virtual irq 24
> kernel: u3msi: allocated virq 0x18 (hw 0x9) addr 0xf8004090
> kernel: radeon 0000:f1:00.0: radeon: using MSI.

Have you ruled out any MSI related problems? I think the IRQ not working
could explain the symptoms...

> kernel: [drm] radeon: irq initialized.
> kernel: [drm] Detected VRAM RAM=3D512M, BAR=3D256M
> kernel: [drm] RAM width 128bits DDR
> kernel: [TTM] Zone  kernel: Available graphics memory: 1002914 kiB.
> kernel: [TTM] Initializing pool allocator.
> kernel: [drm] radeon: 512M of VRAM memory ready
> kernel: [drm] radeon: 512M of GTT memory ready.
> kernel: [drm] GART: num cpu pages 131072, num gpu pages 131072
> kernel: [drm] radeon: 1 quad pipes, 2 z pipes initialized.
> kernel: [drm] PCIE GART of 512M enabled (table at 0x00040000).
> kernel: radeon 0000:f1:00.0: WB enabled

Make sure this line changes to 'WB disabled' with no_wb=3D1. There's a
writeback endianness bug with modeset=3D1, see
http://lists.freedesktop.org/archives/dri-devel/2011-April/009960.html .

> kernel: [drm] Loading R500 Microcode
> kernel: [drm] radeon: ring at 0x0000000020001000
> kernel: [drm] ring test succeeded in 6 usecs
> kernel: [drm] radeon: ib pool ready.


> For now, with modeset=3D0, agpmode=3D-1 and no_wb=3D1, the driver
> seems to work.

The agpmode and no_wb options only have an effect with modeset=3D1, and
you don't seem to be using AGP anyway. :)


--=20
Earthling Michel D=C3=A4nzer           |                http://www.vmware.c=
om
Libre software enthusiast         |          Debian, X and DRI developer

^ permalink raw reply

* Re: [PATCH net-next-2.6 1/2] gianfar: Clean up implementation of RX network flow classification
From: David Miller @ 2011-04-11 20:29 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, linuxppc-dev
In-Reply-To: <1302306311.2871.56.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Sat, 09 Apr 2011 00:45:11 +0100

> This code was cribbed from niu, so gfar_set_hash_opts() begins by
> converting the ethtool flow class code into a class code for Sun
> Neptune hardware, then does the same thing again for the hardware it's
> really dealing with.  It may also return -1 (-EPERM) for some
> unhandled ethtool flow class codes.
> 
> Remove the useless code and definitions, and fix the error code.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> This isn't even compile-tested, since it can only be built for some
> PowerPC SoCs.  Could someone on ppc-dev check that this won't break the
> driver?

I'm applying this, it looks so trivial to me that I'm willing to take
the build risk :-)

Thanks.

^ permalink raw reply

* Re: [PATCH] mm: Check we have the right vma in __access_remote_vm()
From: Andrew Morton @ 2011-04-11 23:50 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: aarcange, riel, linuxppc-dev, hughd, linux-kernel, linux-mm,
	walken
In-Reply-To: <10e5cbf67c850b6ae511979bdbad1761236ad9b0.1302247435.git.michael@ellerman.id.au>

On Fri,  8 Apr 2011 17:24:01 +1000 (EST)
Michael Ellerman <michael@ellerman.id.au> wrote:

> In __access_remote_vm() we need to check that we have found the right
> vma, not the following vma, before we try to access it. Otherwise we
> might call the vma's access routine with an address which does not
> fall inside the vma.
> 

hm, mysteries.  Does this patch fix any known problem in any known
kernel, or was the problem discovered by inspection, or what?

> 
> diff --git a/mm/memory.c b/mm/memory.c
> index 9da8cab..ce999ca 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3678,7 +3678,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
>  			 */
>  #ifdef CONFIG_HAVE_IOREMAP_PROT
>  			vma = find_vma(mm, addr);
> -			if (!vma)
> +			if (!vma || vma->vm_start > addr)
>  				break;
>  			if (vma->vm_ops && vma->vm_ops->access)
>  				ret = vma->vm_ops->access(vma, addr, buf,

^ permalink raw reply

* [PATCH 2/4] crypto: caam - fix queue interface detection
From: Kim Phillips @ 2011-04-12  0:15 UTC (permalink / raw)
  To: linux-crypto, linuxppc-dev; +Cc: Steve Cornelius, Herbert Xu

The presence of a h/w Queue Interface would fail due to this
cut-n-paste snafu.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 drivers/crypto/caam/regs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
index d063a26..aee394e 100644
--- a/drivers/crypto/caam/regs.h
+++ b/drivers/crypto/caam/regs.h
@@ -131,7 +131,7 @@ struct caam_perfmon {
 	/* CAAM Hardware Instantiation Parameters		fa0-fbf */
 	u64 cha_rev;		/* CRNR - CHA Revision Number		*/
 #define CTPR_QI_SHIFT		57
-#define CTPR_QI_MASK		(0x1ull << CHA_NUM_DECONUM_SHIFT)
+#define CTPR_QI_MASK		(0x1ull << CTPR_QI_SHIFT)
 	u64 comp_parms;	/* CTPR - Compile Parameters Register	*/
 	u64 rsvd1[2];
 
-- 
1.7.4.3.dirty

^ permalink raw reply related

* [PATCH 1/4] crypto: caam - handle interrupt lines shared across rings
From: Kim Phillips @ 2011-04-12  0:15 UTC (permalink / raw)
  To: linux-crypto, linuxppc-dev; +Cc: Steve Cornelius, Herbert Xu

- add IRQF_SHARED to request_irq flags to support parts such as
the p1023 that has one IRQ line per couple of rings.

- resetting a job ring triggers an interrupt, so move request_irq
prior to jr_reset to avoid 'got IRQ but nobody cared' messages.

- disable IRQs in h/w to avoid contention between reset and
interrupt status

- delete invalid comment - if there were incomplete jobs,
module would be in use, preventing an unload.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
this, and the remaining patches in this series, tested on p1023, p3041,
p4080, and 32- and 64-bit p5020.

 drivers/crypto/caam/jr.c |   46 ++++++++++++++++++++--------------------------
 1 files changed, 20 insertions(+), 26 deletions(-)

diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index 68cb9af..340fa32 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -292,10 +292,10 @@ static int caam_reset_hw_jr(struct device *dev)
 	unsigned int timeout = 100000;
 
 	/*
-	 * FIXME: disabling IRQs here inhibits proper job completion
-	 * and error propagation
+	 * mask interrupts since we are going to poll
+	 * for reset completion status
 	 */
-	disable_irq(jrp->irq);
+	setbits32(&jrp->rregs->rconfig_lo, JRCFG_IMSK);
 
 	/* initiate flush (required prior to reset) */
 	wr_reg32(&jrp->rregs->jrcommand, JRCR_RESET);
@@ -320,7 +320,8 @@ static int caam_reset_hw_jr(struct device *dev)
 		return -EIO;
 	}
 
-	enable_irq(jrp->irq);
+	/* unmask interrupts */
+	clrbits32(&jrp->rregs->rconfig_lo, JRCFG_IMSK);
 
 	return 0;
 }
@@ -336,6 +337,21 @@ static int caam_jr_init(struct device *dev)
 
 	jrp = dev_get_drvdata(dev);
 
+	/* Connect job ring interrupt handler. */
+	for_each_possible_cpu(i)
+		tasklet_init(&jrp->irqtask[i], caam_jr_dequeue,
+			     (unsigned long)dev);
+
+	error = request_irq(jrp->irq, caam_jr_interrupt, IRQF_SHARED,
+			    "caam-jobr", dev);
+	if (error) {
+		dev_err(dev, "can't connect JobR %d interrupt (%d)\n",
+			jrp->ridx, jrp->irq);
+		irq_dispose_mapping(jrp->irq);
+		jrp->irq = 0;
+		return -EINVAL;
+	}
+
 	error = caam_reset_hw_jr(dev);
 	if (error)
 		return error;
@@ -404,28 +420,6 @@ static int caam_jr_init(struct device *dev)
 		  (JOBR_INTC_COUNT_THLD << JRCFG_ICDCT_SHIFT) |
 		  (JOBR_INTC_TIME_THLD << JRCFG_ICTT_SHIFT));
 
-	/* Connect job ring interrupt handler. */
-	for_each_possible_cpu(i)
-		tasklet_init(&jrp->irqtask[i], caam_jr_dequeue,
-			     (unsigned long)dev);
-
-	error = request_irq(jrp->irq, caam_jr_interrupt, 0,
-			    "caam-jobr", dev);
-	if (error) {
-		dev_err(dev, "can't connect JobR %d interrupt (%d)\n",
-			jrp->ridx, jrp->irq);
-		irq_dispose_mapping(jrp->irq);
-		jrp->irq = 0;
-		dma_unmap_single(dev, inpbusaddr, sizeof(u32 *) * JOBR_DEPTH,
-				 DMA_BIDIRECTIONAL);
-		dma_unmap_single(dev, outbusaddr, sizeof(u32 *) * JOBR_DEPTH,
-				 DMA_BIDIRECTIONAL);
-		kfree(jrp->inpring);
-		kfree(jrp->outring);
-		kfree(jrp->entinfo);
-		return -EINVAL;
-	}
-
 	jrp->assign = JOBR_UNASSIGNED;
 	return 0;
 }
-- 
1.7.4.3.dirty

^ permalink raw reply related

* [PATCH 4/4] crypto: caam - remove duplicate dev_err
From: Kim Phillips @ 2011-04-12  0:15 UTC (permalink / raw)
  To: linux-crypto, linuxppc-dev; +Cc: Steve Cornelius, Herbert Xu

keep the hex error value reporting version (a) to be consistent
with decrypt_done(), and (b) to keep our hardware guys happy.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 drivers/crypto/caam/caamalg.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index 8eb84d3..245cfe4 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -418,7 +418,6 @@ static void ipsec_esp_encrypt_done(struct device *jrdev, u32 *desc, u32 err,
 	if (err) {
 		char tmp[256];
 
-		dev_err(jrdev, "%s\n", caam_jr_strstatus(tmp, err));
 		dev_err(jrdev, "%08x: %s\n", err, caam_jr_strstatus(tmp, err));
 	}
 
-- 
1.7.4.3.dirty

^ permalink raw reply related

* [PATCH 3/4] crypto: caam - remove WAIT-FOR-COMPLETIONs from givencrypt descriptor
From: Kim Phillips @ 2011-04-12  0:15 UTC (permalink / raw)
  To: linux-crypto, linuxppc-dev; +Cc: Steve Cornelius, Herbert Xu

remains from descriptor debugging - not required for normal operation.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 drivers/crypto/caam/caamalg.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index 20e1215..8eb84d3 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -828,15 +828,13 @@ static int aead_authenc_givencrypt(struct aead_givcrypt_request *req)
 	append_cmd(desc, CMD_LOAD | DISABLE_AUTO_INFO_FIFO);
 
 	/* MOVE DECO Alignment -> C1 Context 16 bytes */
-	append_move(desc, MOVE_WAITCOMP | MOVE_SRC_INFIFO |
-		    MOVE_DEST_CLASS1CTX | ivsize);
+	append_move(desc, MOVE_SRC_INFIFO | MOVE_DEST_CLASS1CTX | ivsize);
 
 	/* re-enable info fifo entries */
 	append_cmd(desc, CMD_LOAD | ENABLE_AUTO_INFO_FIFO);
 
 	/* MOVE C1 Context -> OFIFO 16 bytes */
-	append_move(desc, MOVE_WAITCOMP | MOVE_SRC_CLASS1CTX |
-		    MOVE_DEST_OUTFIFO | ivsize);
+	append_move(desc, MOVE_SRC_CLASS1CTX | MOVE_DEST_OUTFIFO | ivsize);
 
 	append_fifo_store(desc, iv_dma, ivsize, FIFOST_TYPE_MESSAGE_DATA);
 
-- 
1.7.4.3.dirty

^ permalink raw reply related


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