LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/7] powerpc numa: Minor debugging code changes
From: Nathan Lynch @ 2006-03-21  0:34 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nathan Lynch
In-Reply-To: <1142901225978-git-send-email-nathanl@austin.ibm.com>

Add debug statement for map_cpu_to_node; it's useful for cpu hotplug.

Clarify debug statement about not finding the numa reference points
property.

Don't print a meaningless associativity depth (-1) on non-numa systems.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>

---

 arch/powerpc/mm/numa.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

3b4f550f0a92badbec6e5784eee4da7524a75938
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index b813bad..de99e47 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -133,6 +133,8 @@ static inline void map_cpu_to_node(int c
 {
 	numa_cpu_lookup_table[cpu] = node;
 
+	dbg("adding cpu %d to node %d\n", cpu, node);
+
 	if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node])))
 		cpu_set(cpu, numa_cpumask_lookup_table[node]);
 }
@@ -246,8 +248,7 @@ static int __init find_min_common_depth(
 	if ((len >= 1) && ref_points) {
 		depth = ref_points[1];
 	} else {
-		dbg("WARNING: could not find NUMA "
-		    "associativity reference point\n");
+		dbg("NUMA: ibm,associativity-reference-points not found.\n");
 		depth = -1;
 	}
 	of_node_put(rtas_root);
@@ -385,10 +386,11 @@ static int __init parse_numa_properties(
 
 	min_common_depth = find_min_common_depth();
 
-	dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
 	if (min_common_depth < 0)
 		return min_common_depth;
 
+	dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
+
 	/*
 	 * Even though we connect cpus to numa domains later in SMP init,
 	 * we need to know the maximum node id now. This is because each
-- 
1.2.4

^ permalink raw reply related

* [PATCH 4/7] powerpc numa: Get rid of "numa domain" terminology
From: Nathan Lynch @ 2006-03-21  0:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nathan Lynch
In-Reply-To: <1142901225978-git-send-email-nathanl@austin.ibm.com>

Since we effectively treat the domain ids given to us by firmare as
logical node ids, make this explicit (basically s/numa_domain/nid/).

No functional changes, only variable and function names are modified.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>

---

 arch/powerpc/mm/numa.c |   78 ++++++++++++++++++++++++------------------------
 1 files changed, 39 insertions(+), 39 deletions(-)

9bdff379544896ca96bad4881fa614a19ddf9d21
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 1c3df1d..e511ca1 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -191,9 +191,9 @@ static int *of_get_associativity(struct 
 	return (unsigned int *)get_property(dev, "ibm,associativity", NULL);
 }
 
-static int of_node_numa_domain(struct device_node *device)
+static int of_node_to_nid(struct device_node *device)
 {
-	int numa_domain;
+	int nid;
 	unsigned int *tmp;
 
 	if (min_common_depth == -1)
@@ -201,13 +201,13 @@ static int of_node_numa_domain(struct de
 
 	tmp = of_get_associativity(device);
 	if (tmp && (tmp[0] >= min_common_depth)) {
-		numa_domain = tmp[min_common_depth];
+		nid = tmp[min_common_depth];
 	} else {
 		dbg("WARNING: no NUMA information for %s\n",
 		    device->full_name);
-		numa_domain = 0;
+		nid = 0;
 	}
-	return numa_domain;
+	return nid;
 }
 
 /*
@@ -286,7 +286,7 @@ static unsigned long __devinit read_n_ce
  */
 static int __cpuinit numa_setup_cpu(unsigned long lcpu)
 {
-	int numa_domain = 0;
+	int nid = 0;
 	struct device_node *cpu = find_cpu_node(lcpu);
 
 	if (!cpu) {
@@ -294,27 +294,27 @@ static int __cpuinit numa_setup_cpu(unsi
 		goto out;
 	}
 
-	numa_domain = of_node_numa_domain(cpu);
+	nid = of_node_to_nid(cpu);
 
-	if (numa_domain >= num_online_nodes()) {
+	if (nid >= num_online_nodes()) {
 		/*
 		 * POWER4 LPAR uses 0xffff as invalid node,
 		 * dont warn in this case.
 		 */
-		if (numa_domain != 0xffff)
+		if (nid != 0xffff)
 			printk(KERN_ERR "WARNING: cpu %ld "
 			       "maps to invalid NUMA node %d\n",
-			       lcpu, numa_domain);
-		numa_domain = 0;
+			       lcpu, nid);
+		nid = 0;
 	}
 out:
-	node_set_online(numa_domain);
+	node_set_online(nid);
 
-	map_cpu_to_node(lcpu, numa_domain);
+	map_cpu_to_node(lcpu, nid);
 
 	of_node_put(cpu);
 
-	return numa_domain;
+	return nid;
 }
 
 static int cpu_numa_callback(struct notifier_block *nfb,
@@ -399,17 +399,17 @@ static int __init parse_numa_properties(
 	 * with larger node ids. In that case we force the cpu into node 0.
 	 */
 	for_each_cpu(i) {
-		int numa_domain;
+		int nid;
 
 		cpu = find_cpu_node(i);
 
 		if (cpu) {
-			numa_domain = of_node_numa_domain(cpu);
+			nid = of_node_to_nid(cpu);
 			of_node_put(cpu);
 
-			if (numa_domain < MAX_NUMNODES &&
-			    max_domain < numa_domain)
-				max_domain = numa_domain;
+			if (nid < MAX_NUMNODES &&
+			    max_domain < nid)
+				max_domain = nid;
 		}
 	}
 
@@ -418,7 +418,7 @@ static int __init parse_numa_properties(
 	while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
 		unsigned long start;
 		unsigned long size;
-		int numa_domain;
+		int nid;
 		int ranges;
 		unsigned int *memcell_buf;
 		unsigned int len;
@@ -439,18 +439,18 @@ new_range:
 		start = read_n_cells(n_mem_addr_cells, &memcell_buf);
 		size = read_n_cells(n_mem_size_cells, &memcell_buf);
 
-		numa_domain = of_node_numa_domain(memory);
+		nid = of_node_to_nid(memory);
 
-		if (numa_domain >= MAX_NUMNODES) {
-			if (numa_domain != 0xffff)
+		if (nid >= MAX_NUMNODES) {
+			if (nid != 0xffff)
 				printk(KERN_ERR "WARNING: memory at %lx maps "
 				       "to invalid NUMA node %d\n", start,
-				       numa_domain);
-			numa_domain = 0;
+				       nid);
+			nid = 0;
 		}
 
-		if (max_domain < numa_domain)
-			max_domain = numa_domain;
+		if (max_domain < nid)
+			max_domain = nid;
 
 		if (!(size = numa_enforce_memory_limit(start, size))) {
 			if (--ranges)
@@ -459,7 +459,7 @@ new_range:
 				continue;
 		}
 
-		add_region(numa_domain, start >> PAGE_SHIFT,
+		add_region(nid, start >> PAGE_SHIFT,
 			   size >> PAGE_SHIFT);
 
 		if (--ranges)
@@ -769,10 +769,10 @@ int hot_add_scn_to_nid(unsigned long scn
 {
 	struct device_node *memory = NULL;
 	nodemask_t nodes;
-	int numa_domain = 0;
+	int nid = 0;
 
 	if (!numa_enabled || (min_common_depth < 0))
-		return numa_domain;
+		return nid;
 
 	while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
 		unsigned long start, size;
@@ -789,15 +789,15 @@ int hot_add_scn_to_nid(unsigned long scn
 ha_new_range:
 		start = read_n_cells(n_mem_addr_cells, &memcell_buf);
 		size = read_n_cells(n_mem_size_cells, &memcell_buf);
-		numa_domain = of_node_numa_domain(memory);
+		nid = of_node_to_nid(memory);
 
 		/* Domains not present at boot default to 0 */
-		if (!node_online(numa_domain))
-			numa_domain = any_online_node(NODE_MASK_ALL);
+		if (!node_online(nid))
+			nid = any_online_node(NODE_MASK_ALL);
 
 		if ((scn_addr >= start) && (scn_addr < (start + size))) {
 			of_node_put(memory);
-			goto got_numa_domain;
+			goto got_nid;
 		}
 
 		if (--ranges)		/* process all ranges in cell */
@@ -806,12 +806,12 @@ ha_new_range:
 	BUG();	/* section address should be found above */
 
 	/* Temporary code to ensure that returned node is not empty */
-got_numa_domain:
+got_nid:
 	nodes_setall(nodes);
-	while (NODE_DATA(numa_domain)->node_spanned_pages == 0) {
-		node_clear(numa_domain, nodes);
-		numa_domain = any_online_node(nodes);
+	while (NODE_DATA(nid)->node_spanned_pages == 0) {
+		node_clear(nid, nodes);
+		nid = any_online_node(nodes);
 	}
-	return numa_domain;
+	return nid;
 }
 #endif /* CONFIG_MEMORY_HOTPLUG */
-- 
1.2.4

^ permalink raw reply related

* Re: lists merged
From: Kumar Gala @ 2006-03-20 23:51 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev
In-Reply-To: <20060321104503.1b2f047b.sfr@canb.auug.org.au>

I assume you'll provide a patch to MAINTAINERS to change linuxppc64- 
dev refs to linuxppc-dev.

- kumar

On Mar 20, 2006, at 5:45 PM, Stephen Rothwell wrote:

> Hi all,
>
> Please don't post to linuxppc64-dev@ozlabs.org any more ... If you  
> get two
> of this message, then you are probably now subscribed to
> linuxppc-dev@ozlabs.org with two different addresses.
>
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* lists merged
From: Stephen Rothwell @ 2006-03-20 23:45 UTC (permalink / raw)
  To: ppc-dev

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

Hi all,

Please don't post to linuxppc64-dev@ozlabs.org any more ... If you get two
of this message, then you are probably now subscribed to
linuxppc-dev@ozlabs.org with two different addresses.

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

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

^ permalink raw reply

* merging lists
From: Stephen Rothwell @ 2006-03-20 23:34 UTC (permalink / raw)
  To: ppc64-dev; +Cc: linuxppc-dev

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

Hi all,

I am bout the merge the two mailing lists (so that only linuxppc-dev will
continue).  To do this, I will subscribe all the members of the
linuxppc64-dev lists that are not members of linuxppc-dev to the second
list.  If you are subscribed under different addresses to the two
different lists, you will start getting two copies of everything until you
unsubscribe one of your addresses.

There may be a small amount of disruption, I apologise in advance.

I will redirect the linuxppc64-dev mail addresses to the linucppc-dev ones
and the archives and patchwork will remain available at their current
addresses.

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

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

^ permalink raw reply

* Please pull from '85xx' branch of powerpc
From: Kumar Gala @ 2006-03-20 18:04 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, linux-kernel, linuxppc-embedded

Please pull from '85xx' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git

to receive the following updates:

 arch/powerpc/platforms/85xx/Makefile      |    3 
 arch/powerpc/platforms/85xx/mpc8540_ads.h |   24 -------
 arch/powerpc/platforms/85xx/mpc85xx.h     |    1 
 arch/powerpc/platforms/85xx/mpc85xx_ads.c |   67 ++++++++++++++++++++
 arch/powerpc/platforms/85xx/pci.c         |   96 ++++++++++++++++++++++++++++++
 5 files changed, 166 insertions(+), 25 deletions(-)

Andy Fleming:
      powerpc: Add PCI support for 8540 ADS to powerpc tree

diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 70e1190..ffc4139 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -1,4 +1,5 @@
 #
 # Makefile for the PowerPC 85xx linux kernel.
 #
-obj-$(CONFIG_PPC_85xx)	+= misc.o mpc85xx_ads.o
+obj-$(CONFIG_PPC_85xx)	+= misc.o pci.o
+obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h
index b3ec88c..f770cad 100644
--- a/arch/powerpc/platforms/85xx/mpc8540_ads.h
+++ b/arch/powerpc/platforms/85xx/mpc8540_ads.h
@@ -30,30 +30,6 @@
 #define PIRQC		MPC85xx_IRQ_EXT3
 #define PIRQD		MPC85xx_IRQ_EXT4
 
-#define MPC85XX_PCI1_LOWER_IO	0x00000000
-#define MPC85XX_PCI1_UPPER_IO	0x00ffffff
-
-#define MPC85XX_PCI1_LOWER_MEM	0x80000000
-#define MPC85XX_PCI1_UPPER_MEM	0x9fffffff
-
-#define MPC85XX_PCI1_IO_BASE	0xe2000000
-#define MPC85XX_PCI1_MEM_OFFSET	0x00000000
-
-#define MPC85XX_PCI1_IO_SIZE	0x01000000
-
-/* PCI config */
-#define PCI1_CFG_ADDR_OFFSET	(0x8000)
-#define PCI1_CFG_DATA_OFFSET	(0x8004)
-
-#define PCI2_CFG_ADDR_OFFSET	(0x9000)
-#define PCI2_CFG_DATA_OFFSET	(0x9004)
-
-/* Additional register for PCI-X configuration */
-#define PCIX_NEXT_CAP	0x60
-#define PCIX_CAP_ID	0x61
-#define PCIX_COMMAND	0x62
-#define PCIX_STATUS	0x64
-
 /* Offset of CPM register space */
 #define CPM_MAP_ADDR	(CCSRBAR + MPC85xx_CPM_OFFSET)
 
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
index be75abb..b44db62 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx.h
+++ b/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -15,3 +15,4 @@
  */
 
 extern void mpc85xx_restart(char *);
+extern int add_bridge(struct device_node *dev);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index ba6798d..b7821db 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -67,6 +67,62 @@ static u_char mpc85xx_ads_openpic_initse
 	0x0,			/* External 11: */
 };
 
+#ifdef CONFIG_PCI
+/*
+ * interrupt routing
+ */
+
+int
+mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	static char pci_irq_table[][4] =
+	    /*
+	     * This is little evil, but works around the fact
+	     * that revA boards have IDSEL starting at 18
+	     * and others boards (older) start at 12
+	     *
+	     *      PCI IDSEL/INTPIN->INTLINE
+	     *       A      B      C      D
+	     */
+	{
+		{PIRQA, PIRQB, PIRQC, PIRQD},	/* IDSEL 2 */
+		{PIRQD, PIRQA, PIRQB, PIRQC},
+		{PIRQC, PIRQD, PIRQA, PIRQB},
+		{PIRQB, PIRQC, PIRQD, PIRQA},	/* IDSEL 5 */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{PIRQA, PIRQB, PIRQC, PIRQD},	/* IDSEL 12 */
+		{PIRQD, PIRQA, PIRQB, PIRQC},
+		{PIRQC, PIRQD, PIRQA, PIRQB},
+		{PIRQB, PIRQC, PIRQD, PIRQA},	/* IDSEL 15 */
+		{0, 0, 0, 0},	/* -- */
+		{0, 0, 0, 0},	/* -- */
+		{PIRQA, PIRQB, PIRQC, PIRQD},	/* IDSEL 18 */
+		{PIRQD, PIRQA, PIRQB, PIRQC},
+		{PIRQC, PIRQD, PIRQA, PIRQB},
+		{PIRQB, PIRQC, PIRQD, PIRQA},	/* IDSEL 21 */
+	};
+
+	const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4;
+	return PCI_IRQ_TABLE_LOOKUP;
+}
+
+int
+mpc85xx_exclude_device(u_char bus, u_char devfn)
+{
+	if (bus == 0 && PCI_SLOT(devfn) == 0)
+		return PCIBIOS_DEVICE_NOT_FOUND;
+	else
+		return PCIBIOS_SUCCESSFUL;
+}
+
+#endif /* CONFIG_PCI */
+
+
 void __init mpc85xx_ads_pic_init(void)
 {
 	struct mpic *mpic1;
@@ -110,6 +166,7 @@ void __init mpc85xx_ads_pic_init(void)
 static void __init mpc85xx_ads_setup_arch(void)
 {
 	struct device_node *cpu;
+	struct device_node *np;
 
 	if (ppc_md.progress)
 		ppc_md.progress("mpc85xx_ads_setup_arch()", 0);
@@ -125,6 +182,16 @@ static void __init mpc85xx_ads_setup_arc
 			loops_per_jiffy = 50000000 / HZ;
 		of_node_put(cpu);
 	}
+
+#ifdef CONFIG_PCI
+	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
+		add_bridge(np);
+
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = mpc85xx_map_irq;
+	ppc_md.pci_exclude_device = mpc85xx_exclude_device;
+#endif
+
 #ifdef  CONFIG_ROOT_NFS
 	ROOT_DEV = Root_NFS;
 #else
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
new file mode 100644
index 0000000..bad2901
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -0,0 +1,96 @@
+/*
+ * FSL SoC setup code
+ *
+ * Maintained by Kumar Gala (see MAINTAINERS for contact information)
+ *
+ * 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.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/module.h>
+
+#include <asm/system.h>
+#include <asm/atomic.h>
+#include <asm/io.h>
+#include <asm/pci-bridge.h>
+#include <asm/prom.h>
+#include <sysdev/fsl_soc.h>
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define DBG(x...) printk(x)
+#else
+#define DBG(x...)
+#endif
+
+int mpc85xx_pci2_busno = 0;
+
+#ifdef CONFIG_PCI
+int __init add_bridge(struct device_node *dev)
+{
+	int len;
+	struct pci_controller *hose;
+	struct resource rsrc;
+	int *bus_range;
+	int primary = 1, has_address = 0;
+	phys_addr_t immr = get_immrbase();
+
+	DBG("Adding PCI host bridge %s\n", dev->full_name);
+
+	/* Fetch host bridge registers address */
+	has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
+
+	/* Get bus range if any */
+	bus_range = (int *) get_property(dev, "bus-range", &len);
+	if (bus_range == NULL || len < 2 * sizeof(int)) {
+		printk(KERN_WARNING "Can't get bus-range for %s, assume"
+		       " bus 0\n", dev->full_name);
+	}
+
+	hose = pcibios_alloc_controller();
+	if (!hose)
+		return -ENOMEM;
+	hose->arch_data = dev;
+	hose->set_cfg_type = 1;
+
+	hose->first_busno = bus_range ? bus_range[0] : 0;
+	hose->last_busno = bus_range ? bus_range[1] : 0xff;
+
+	/* PCI 1 */
+	if ((rsrc.start & 0xfffff) == 0x8000) {
+		setup_indirect_pci(hose, immr + 0x8000, immr + 0x8004);
+	}
+	/* PCI 2 */
+	if ((rsrc.start & 0xfffff) == 0x9000) {
+		setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004);
+		primary = 0;
+		hose->bus_offset = hose->first_busno;
+		mpc85xx_pci2_busno = hose->first_busno;
+	}
+
+	printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. "
+	       "Firmware bus number: %d->%d\n",
+		rsrc.start, hose->first_busno, hose->last_busno);
+
+	DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+		hose, hose->cfg_addr, hose->cfg_data);
+
+	/* Interpret the "ranges" property */
+	/* This also maps the I/O region and sets isa_io/mem_base */
+	pci_process_bridge_OF_ranges(hose, dev, primary);
+
+	return 0;
+}
+
+#endif

^ permalink raw reply related

* Please pull from '83xx' branch of powerpc
From: Kumar Gala @ 2006-03-20 18:03 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, linux-kernel, linuxppc-embedded

Please pull from '83xx' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git

to receive the following updates:

 arch/powerpc/platforms/83xx/misc.c    |    2 +-
 arch/ppc/platforms/83xx/mpc834x_sys.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Horst Kronstorfer:
      ppc32: Fix BCSR_SIZE for MPC834x SYS

Kumar Gala:
      powerpc: Fix mpc83xx restart bug

diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index 0eb3d99..1455bce 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -35,7 +35,7 @@ void mpc83xx_restart(char *cmd)
 	out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
 
 	/* set software hard reset */
-	out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445);
+	out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
 	for (;;) ;
 }
 
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h
index aa86c22..6727bbd 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.h
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.h
@@ -23,7 +23,7 @@
 #define VIRT_IMMRBAR		((uint)0xfe000000)
 
 #define BCSR_PHYS_ADDR		((uint)0xf8000000)
-#define BCSR_SIZE		((uint)(128 * 1024))
+#define BCSR_SIZE		((uint)(32 * 1024))
 
 #define BCSR_MISC_REG2_OFF	0x07
 #define BCSR_MISC_REG2_PORESET	0x01

^ permalink raw reply related

* RE: mpc5xxx keyboard BUG found
From: Jarno Manninen @ 2006-03-20  8:44 UTC (permalink / raw)
  To: IGOR LURI; +Cc: linuxppc-embedded
In-Reply-To: <918EB199DDDFFA42BEA2EB3A1C6021F3B9143D@correo.fagorautomation.net>

Lainaus IGOR LURI <iluri@fagorautomation.es>:

> The problem is that from aplication can't handle 0xe0 scancode 
> because mpc5xxx_translate function translates the scancode to a 
> keycode, and to the aplication arrives for example 0x0a1b5b41 (up 
> arrow) and inmediatly another 0x0a. For this efect I think 
> mpc5xxx_translate function needs to evaluate 0xe0 scancode correctly.

Hi!

I propably should have read your mail with more attention.

I'm not sure about keyboard handling on 2.6, but on 2.4 I just used 
translation function from pckeyb.c and it worked just fine.

- Jarno

> -----Mensaje original-----
> De: Jarno Manninen [mailto:jarno.manninen@tut.fi]
> Enviado el: viernes, 17 de marzo de 2006 19:50
> Para: linuxppc-embedded@ozlabs.org
> CC: IGOR LURI
> Asunto: Re: mpc5xxx keyboard BUG found
>
>
> On Friday 17 March 2006 13:38, Igor Luri wrote:
>
>> We have an MPC5200LiteB board with a Microsoft USB keyboard atached and
>> we have realized that some keys don't work properly, like up, down, lef
>> and right arrows, PageUp, PageDown etc.
>
> Hi!
>
> Actually that Microsoft keyboard is working fine. A rare exception. ,-)
> For more information see chapter 1.3 from here:
>
> http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html
>
> So basically you will have to handle those in the application level code.
>
> - Jarno
>

^ permalink raw reply

* RE: mpc5xxx keyboard BUG found
From: IGOR LURI @ 2006-03-20  8:18 UTC (permalink / raw)
  To: Jarno Manninen, linuxppc-embedded

The problem is that from aplication can't handle 0xe0 scancode because =
mpc5xxx_translate function translates the scancode to a keycode, and to =
the aplication arrives for example 0x0a1b5b41 (up arrow) and inmediatly =
another 0x0a. For this efect I think mpc5xxx_translate function needs to =
evaluate 0xe0 scancode correctly.


-----Mensaje original-----
De: Jarno Manninen [mailto:jarno.manninen@tut.fi]
Enviado el: viernes, 17 de marzo de 2006 19:50
Para: linuxppc-embedded@ozlabs.org
CC: IGOR LURI
Asunto: Re: mpc5xxx keyboard BUG found


On Friday 17 March 2006 13:38, Igor Luri wrote:

> We have an MPC5200LiteB board with a Microsoft USB keyboard atached =
and
> we have realized that some keys don't work properly, like up, down, =
lef
> and right arrows, PageUp, PageDown etc.

Hi!

Actually that Microsoft keyboard is working fine. A rare exception. ,-)
For more information see chapter 1.3 from here:

http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html

So basically you will have to handle those in the application level =
code.

- Jarno

^ permalink raw reply

* Re: Who calls my init_module when my driver is not a module?
From: Sylvain Munaut @ 2006-03-19 23:47 UTC (permalink / raw)
  To: Antonio Di Bacco; +Cc: linuxppc-embedded
In-Reply-To: <200603192141.52239.antonio.dibacco@aruba.it>

Antonio Di Bacco wrote:
> I wrote an SPI driver, I decided to link it against the kernel but I'm 
> wondering where my init_module will be called.
>
> Anyone knows?
>
> Bye,
> Antonio

>From include/linux/init.h :

/**
 * module_init() - driver initialization entry point
 * @x: function to be run at kernel boot time or module insertion
 *
 * module_init() will either be called during do_initcalls (if
 * builtin) or at module insertion time (if a module).  There can only
 * be one per module.
 */
#define module_init(x)  __initcall(x);


    Sylvain

^ permalink raw reply

* Who calls my init_module when my driver is not a module?
From: Antonio Di Bacco @ 2006-03-19 20:41 UTC (permalink / raw)
  To: linuxppc-embedded

I wrote an SPI driver, I decided to link it against the kernel but I'm 
wondering where my init_module will be called.

Anyone knows?

Bye,
Antonio.

^ permalink raw reply

* Re: Linux kernel reboot issue
From: Wolfgang Denk @ 2006-03-18  0:21 UTC (permalink / raw)
  To: jimmy liu; +Cc: linuxppc-embedded
In-Reply-To: <20060317153550.19366.qmail@web53111.mail.yahoo.com>

In message <20060317153550.19366.qmail@web53111.mail.yahoo.com> you wrote:
> Our custom board is similar as EST8260. We use Linux
> Kernel 2.4.25 from ftp://ftp.denx.de/pub/linux/. When
> we type the reboot command or shutdown -r, we got the
> following error messages. Does anybody has idea? 

Your board may be similar, but it is obviously not identical  to  the
EST8260.  You  must  port  Linux  to your hardware, not just use some
"similar" board configuration.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The idea of male and female are universal constants.
	-- Kirk, "Metamorphosis", stardate 3219.8

^ permalink raw reply

* Re: Linux kernel reboot issue
From: Jeff Angielski @ 2006-03-17 21:19 UTC (permalink / raw)
  To: jimmy liu; +Cc: linuxppc-embedded
In-Reply-To: <20060317153550.19366.qmail@web53111.mail.yahoo.com>

On Fri, 2006-03-17 at 07:35 -0800, jimmy liu wrote:
> Our custom board is similar as EST8260. We use Linux
> Kernel 2.4.25 from ftp://ftp.denx.de/pub/linux/. When
> we type the reboot command or shutdown -r, we got the
> following error messages. Does anybody has idea? 

Check your m8260_setup.c file for m8260_restart() and make sure the code
matches your flash configuration.  Specifically, the startaddr.

Other than that, did you look in your system map to check the PC against
the exception to find our which piece of code is causing this?

HTH,
Jeff Angielski
The PTR Group

> 
> The system is going down NOW !!
> Sending SIGTERM to all processeTerminated
> Sending SIGKILL to all processes.
> Please stand by while rebooting the system.
> Restarting systemsteOops: Exception in kernel mode,
> sig: 4
> NIP: FFF00100 XER: 00000000 LR: FFF00100 SP: C0EDDDF0
> REGS: c0eddd40 TRAP: 0700    Not tainted
> MSR: 00081002 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
> TASK = c0edc000[34] 'init' Last syscall: 2
> last math 00000000 last altivec 00000000
> GPR00: 00001032 C0EDDDF0 C0EDC000 001EDA88 FFF00100
> 00001002 000037D0 00000000
> GPR08: C0374060 C000C024 0000C000 00100088 0000000D
> 10064B24 00000000 00000000
> GPR16: 00000000 00000000 00000000 00000000 00009032
> 00EDDF40 00000000 C0003EA8
> GPR24: C0003C00 100034DC 7FFFFF38 00000001 7FFFFF24
> 00000000 FFF00100 00000000
> Call backtrace:
> 00000000
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply

* Re: mpc5xxx keyboard BUG found
From: Jarno Manninen @ 2006-03-17 18:50 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <441A9FC8.3020205@fagorautomation.es>

On Friday 17 March 2006 13:38, Igor Luri wrote:

> We have an MPC5200LiteB board with a Microsoft USB keyboard atached and
> we have realized that some keys don't work properly, like up, down, lef
> and right arrows, PageUp, PageDown etc.

Hi!

Actually that Microsoft keyboard is working fine. A rare exception. ,-)
For more information see chapter 1.3 from here:

http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html

So basically you will have to handle those in the application level code.

- Jarno

^ permalink raw reply

* Loopback configurations for SCC, FCC in MPC8247
From: srideep.devireddy @ 2006-03-17 16:42 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <85FE12CF7DBACF47A201840B70C4425C02F52273@CHN-SNR-MBX01.wipro.com>

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


 Hi all,

I am using MPC8247. I am using FCC0, FCC1, SCC3 and SCC4 in Ethernet mode. I want to enable local loopback in FCC and SCC. I tried in the following combinations of registers for SCC

   case ETH_LOOPBK_ENBL:
        printk("%s, ETH_LOOPBK_ENBL\n",__FUNCTION__);
                                                                                                                            

        /* ENABLE the LOOP back by setting the 24th and 25th bits
         * as 0 and 1 in GSMRL */
        cep->sccp->scc_gsmrl |= SCC_GSMRL_DIAG_LOOP;
        cpm2_immr->im_cpmux.cmx_scr &= ~CMX_CLK_MASK;
        cpm2_immr->im_cpmux.cmx_scr |= CMX_LPCLK_ROUTE;
        //cep->sccp->scc_gsmrh |= (SCC_GSMRH_CDS | SCC_GSMRH_CTSS);
                                                                                                                            

        /* Configure PSMR for enabling- Promiscuos mode, simultaneous Tx, Rx
         * and Full duplex mode */
        //cep->sccp->scc_psmr |= (SCC_PSMR_PRO | SCC_PSMR_LPB | SCC_PSMR_FDE);
        cep->sccp->scc_psmr |= (SCC_PSMR_PRO | SCC_PSMR_FDE);
        return 0;
                                                                                                                            

      case ETH_LOOPBK_DSBL:
        printk("%s, ETH_LOOPBK_DSBL\n",__FUNCTION__);
        /* Disable the LOOP back and revert back to normal operation by
         * setting the 24th and 25th bits as 0 and 0 in GSMRL */
        cep->sccp->scc_gsmrl &= ~SCC_GSMRL_DIAG_LOOP;
        cpm2_immr->im_cpmux.cmx_scr &= ~CMX_CLK_MASK;
        cpm2_immr->im_cpmux.cmx_scr |= CMX_CLK_ROUTE;

   //cep->sccp->scc_gsmrh &= ~(SCC_GSMRH_CDS | SCC_GSMRH_CTSS);
                                                                                                                            

        /* Revert PSMR settings */
//      cep->sccp->scc_psmr &= ~(SCC_PSMR_PRO | SCC_PSMR_LPB | SCC_PSMR_FDE);
        cep->sccp->scc_psmr &= ~(SCC_PSMR_PRO | SCC_PSMR_FDE);
        return 0;

Following combinations for FCC

       case ETH_LOOPBK_ENBL:
        /* Enable loop back by setting the diag bits in GFMR. Promiscus mode is
         * enabled by setting the FPSMR bit */
        cep->fccp->fcc_gfmr  |= FCC_GFMR_DIAG_LE;
        cep->fccp->fcc_fpsmr |= (FCC_PSMR_PRO | FCC_PSMR_FDE | FCC_PSMR_LPB);
        printk("%s[FCC %2d]: Local Loopback Enabled  [GFMR - 0x%08x, FPSMR - 0x%08x]\n", dev->name, cep->fip->fc_fccnum, cep->fccp->fcc_gfmr, cep->fccp->fcc_fpsmr);

        return 0;
                                                                                                                            

      case ETH_LOOPBK_DSBL:
        /* Disable loopback and promiscus mode */
        cep->fccp->fcc_gfmr  &= ~FCC_GFMR_DIAG_ALE;
        cep->fccp->fcc_fpsmr &= ~(FCC_PSMR_PRO | FCC_PSMR_FDE | FCC_PSMR_LPB);
        printk("%s[FCC %2d]: Local Loopback Disabled [GFMR - 0x%08x, FPSMR - 0x%08x]\n", dev->name, cep->fip->fc_fccnum, cep->fccp->fcc_gfmr, cep->fccp->fcc_fpsmr);

        return 0;



With the above cases the loopback is not enabling. Can any one suggest me the register configurations for eabling loopback in FCC and SCC.

Thanks in advance

srideep




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

[-- Attachment #2: Type: text/html, Size: 10353 bytes --]

^ permalink raw reply

* Linux kernel reboot issue
From: jimmy liu @ 2006-03-17 15:35 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <mailman.327.1141665606.16671.linuxppc-embedded@ozlabs.org>

Our custom board is similar as EST8260. We use Linux
Kernel 2.4.25 from ftp://ftp.denx.de/pub/linux/. When
we type the reboot command or shutdown -r, we got the
following error messages. Does anybody has idea? 

The system is going down NOW !!
Sending SIGTERM to all processeTerminated
Sending SIGKILL to all processes.
Please stand by while rebooting the system.
Restarting systemsteOops: Exception in kernel mode,
sig: 4
NIP: FFF00100 XER: 00000000 LR: FFF00100 SP: C0EDDDF0
REGS: c0eddd40 TRAP: 0700    Not tainted
MSR: 00081002 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
TASK = c0edc000[34] 'init' Last syscall: 2
last math 00000000 last altivec 00000000
GPR00: 00001032 C0EDDDF0 C0EDC000 001EDA88 FFF00100
00001002 000037D0 00000000
GPR08: C0374060 C000C024 0000C000 00100088 0000000D
10064B24 00000000 00000000
GPR16: 00000000 00000000 00000000 00000000 00009032
00EDDF40 00000000 C0003EA8
GPR24: C0003C00 100034DC 7FFFFF38 00000001 7FFFFF24
00000000 FFF00100 00000000
Call backtrace:
00000000



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply

* Re: 8xx SMC1 problem
From: Antonio Di Bacco @ 2006-03-17 15:25 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <004B1D7A5257174C9044A1B7BD0E60ED0178CC6A@ratatosk.combitechsystems.com>

I tried directly with console=3D/dev/null and then I was able to use the se=
rial=20
port from an application.

Bye,
Antonio.


On Friday 17 March 2006 07:55, Bj=F6rn =D6stby wrote:
> >From: wd@denx.de [mailto:wd@denx.de]
> >Sent: den 16 mars 2006 21:10
> >To: Bj=F6rn =D6stby
> >Cc: linuxppc-embedded@ozlabs.org
> >Subject: Re: 8xx SMC1 problem
> >
> >In message <004Bxxxxx@ratatosk.combitechsystems.com> you wrote
> >
> >> First of, I have three serial ports (SMC1, SMC2 and SCC3) and they all
> >> work  fine when the console is on SMC1. I have gadgets connected to
> >> SMC2 and SCC 3 and now I need SMC1 for yet another device. So I have
> >> undefined CONFIG_SE RIAL_CONSOLE in the kernel config and I jump out
> >> of u-boot (which have the console on SMC1) with the argument
> >> "console=3Dnone".
> >
> >And did you make sure that no other process is accessing ttyS0 ?
> >
> >> When logging in (via telnet) ttyS0 works no more (but S1 and S2 does).
> >> At r andom bootups, it is possible to open the port but it is no good
> >> for read o r write.
> >>
> >> Can anybody give me some advise on how to enable SMC1 but at the same
> >> time don't have a console on it?
> >
> >We did the same (passing console=3Dnull) in a couple of  configurations =
and
> >had  no  problems  >using SMC1 as standard serial port. Try *not*
> > undefining CONFIG_SERIAL_CONSOLE.
>
> Ahh, "console=3Dnull" worked a lot better than "console=3Dnone".
> Problem solved!
>
> >And please keep your line length < 72 characters or so.
>
> I'll see to that.
>
>
> Regards,
> Bj=F6rn =F6stby
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply

* Re: RFC: [PATCH Upated]: snd-pmac-gpio interfaces for snd-powermac
From: Johannes Berg @ 2006-03-17 12:57 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Linuxppc-dev
In-Reply-To: <1142553267.14988.39.camel@localhost.localdomain>

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

On Fri, 2006-03-17 at 10:54 +1100, Benjamin Herrenschmidt wrote:

> I think we should only use the pfuncs on k2 (ppc64) or when the macio
> node contains the include-k2-support property. At least, I +think+
> that's what darwin is doing.

According to the comments, yes :)

Been reading through their sources -- damn it's convoluted :(

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 793 bytes --]

^ permalink raw reply

* mpc5xxx keyboard BUG found
From: Igor Luri @ 2006-03-17 11:38 UTC (permalink / raw)
  To: linuxppc-embedded

We have an MPC5200LiteB board with a Microsoft USB keyboard atached and 
we have realized that some keys don't work properly, like up, down, lef 
and right arrows, PageUp, PageDown etc.

We have found that when those keys are pressed, first it sends a special 
scancode 0xe0 and then pressed key scancode.

Modifiying mpc5xxx_translate function to ignore the first scancode
 

                 // special prefix scancodes..
                  if (scancode == 0xe0 || scancode == 0xe1) {
                        return 0;
                  } 

our keyboard works well. Other cpus ignorates this special scancode or  
it evaluates.

Now, mpc5xxx_translate looks like this:

int mpc5xxx_translate(unsigned char scancode, unsigned char *keycode,
               char raw_mode)
{
    
  // special prefix scancodes..
  if (scancode == 0xe0 || scancode == 0xe1) {
        return 0;
  }  

  //0xFF is sent by a few keyboards, ignore it. 0x00 is error
  if (scancode == 0x00 || scancode == 0xff) {
    return 0;
  }
  *keycode = scancode;
  return 1;
}

^ permalink raw reply

* RE: 8xx SMC1 problem
From: Björn Östby @ 2006-03-17  6:55 UTC (permalink / raw)
  To: wd; +Cc: linuxppc-embedded

>From: wd@denx.de [mailto:wd@denx.de]
>Sent: den 16 mars 2006 21:10
>To: Bj=F6rn =D6stby
>Cc: linuxppc-embedded@ozlabs.org
>Subject: Re: 8xx SMC1 problem
>
>In message <004Bxxxxx@ratatosk.combitechsystems.com> you wrote
>>
>> First of, I have three serial ports (SMC1, SMC2 and SCC3) and they =
all
>> work  fine when the console is on SMC1. I have gadgets connected to
>> SMC2 and SCC 3 and now I need SMC1 for yet another device. So I have
>> undefined CONFIG_SE RIAL_CONSOLE in the kernel config and I jump out=20
>> of u-boot (which have the console on SMC1) with the argument
>> "console=3Dnone".
>
>And did you make sure that no other process is accessing ttyS0 ?
>
>> When logging in (via telnet) ttyS0 works no more (but S1 and S2 =
does).
>> At r andom bootups, it is possible to open the port but it is no good
>> for read o r write.
>>
>> Can anybody give me some advise on how to enable SMC1 but at the same
>> time don't have a console on it?
>
>We did the same (passing console=3Dnull) in a couple of  configurations =
and
>had  no  problems  >using SMC1 as standard serial port. Try *not* =
undefining
>CONFIG_SERIAL_CONSOLE.
>

Ahh, "console=3Dnull" worked a lot better than "console=3Dnone".=20
Problem solved!

>
>And please keep your line length < 72 characters or so.
>

I'll see to that.


Regards,
Bj=F6rn =F6stby

^ permalink raw reply

* Re: RFC: [PATCH Upated]: snd-pmac-gpio interfaces for snd-powermac
From: Benjamin Herrenschmidt @ 2006-03-16 23:54 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Linuxppc-dev
In-Reply-To: <1142445631.4670.9.camel@localhost>

On Wed, 2006-03-15 at 19:00 +0100, Johannes Berg wrote:

> Maybe there ought to be a way to disable the fallback when we're on
> newer chips? I don't grok the sound architecture well enough yet to
> tell.

I think we should only use the pfuncs on k2 (ppc64) or when the macio
node contains the include-k2-support property. At least, I +think+
that's what darwin is doing.

^ permalink raw reply

* Re: i2c-bus@0 twice?
From: Benjamin Herrenschmidt @ 2006-03-16 23:52 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linuxppc-dev
In-Reply-To: <1142447397.4670.12.camel@localhost>

On Wed, 2006-03-15 at 19:29 +0100, Johannes Berg wrote:
> johannes@quad:/proc/device-tree/ht@0,f2000000/pci@8/mac-io@7/i2c@18000$ ls
> AAPL,address       built-in     i2c-bus@0         linux,phandle
> AAPL,address-step  compatible   interrupt-parent  name
> AAPL,i2c-rate      device_type  interrupts        reg
> #address-cells     i2c-bus@0    linux,device      #size-cells
> 
> Somewhat odd that i2c-bus@0 exists twice :) Anyone have an explanation?

It's a bug in OF on these machines. We need to workaround that,
especially since only one of them contains all the useful infos

Ben

^ permalink raw reply

* Re: kernel support for the MPC5200b
From: Sylvain Munaut @ 2006-03-16 23:19 UTC (permalink / raw)
  To: Henry Quinn; +Cc: linuxppc-embedded
In-Reply-To: <20060316061222.A93517A44CC@mail.sse.co.za>

Henry Quinn wrote:
>
> Hello all
>
> I want to run the Linux kernel on a device based on the Freescale
> MPC5200b, based on the MPC603e series G2_LE core.
>
> What I don’t understand is whether support for this processor is built
> into the kernel or not, can one take a stock kernel from
>
> www.kernel.org <http://www.kernel.org/> and compile it to run on this
> processor or are there a series of patches that one needs to apply
> before the
>
> kernel will run on this processor?
>

The 5200b isn't that different from the 5200 ... most of the important
differences should be taken care of in the boot loader (some supplementary
CPU init iirc) and U-Boot takes care of that.

The major difference that needs to be taken care of in the kernel is the
PCI ID of the host bridge ... But that's trivial to take care of ...

But the dev board lite5200 and lite5200b have some differences in the
mapping of the PCI irq to the IRQ[0-3] pins and so requires some change in
the platform dependent code, but if your device is another board then
you need
to do your own platform support file any way ...


Sources for the the kernels are :
- denx.de that provides 2.4 and 2.6
- the GIT tree at http://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.git

If you decide to try the last one, please don't clone directly from
there, but :

git clone
git://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
cd linux-2.6
git pull http://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.git#ide
git pull http://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.git#bestcomm

that should give you a tree with ide & fec support that has supports for the
lite5200b and that works ... (make sure you have a console=ttyPSC0 in your
kernel command line, that's required for the 246tnt's git tree and the
kernel.org
one. For the denx ones, i think it's console=ttyS0 that's required ...)


Sylvain

^ permalink raw reply

* Re: i2c-bus@0 twice?
From: Michael Ellerman @ 2006-03-16 22:53 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1142447397.4670.12.camel@localhost>

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

On Thu, 16 Mar 2006 05:29, Johannes Berg wrote:
> johannes@quad:/proc/device-tree/ht@0,f2000000/pci@8/mac-io@7/i2c@18000$ ls
> AAPL,address       built-in     i2c-bus@0         linux,phandle
> AAPL,address-step  compatible   interrupt-parent  name
> AAPL,i2c-rate      device_type  interrupts        reg
> #address-cells     i2c-bus@0    linux,device      #size-cells
>
> Somewhat odd that i2c-bus@0 exists twice :) Anyone have an explanation?

Do you see it twice in OF also?

cheers

-- 
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

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

^ permalink raw reply

* Re: 8xx SMC1 problem
From: Wolfgang Denk @ 2006-03-16 20:10 UTC (permalink / raw)
  To: Björn Östby; +Cc: linuxppc-embedded
In-Reply-To: <004B1D7A5257174C9044A1B7BD0E60ED0178CC68@ratatosk.combitechsystems.com>

In message <004B1D7A5257174C9044A1B7BD0E60ED0178CC68@ratatosk.combitechsystems.com> you wrote:
>
> First of, I have three serial ports (SMC1, SMC2 and SCC3) and they all work
>  fine when the console is on SMC1. I have gadgets connected to SMC2 and SCC
> 3 and now I need SMC1 for yet another device. So I have undefined CONFIG_SE
> RIAL_CONSOLE in the kernel config and I jump out of u-boot (which have the
> console on SMC1) with the argument "console=none".

And did you make sure that no other process is accessing ttyS0 ?

> When logging in (via telnet) ttyS0 works no more (but S1 and S2 does). At r
> andom bootups, it is possible to open the port but it is no good for read o
> r write.
> 
> Can anybody give me some advise on how to enable SMC1 but at the same time
> don't have a console on it?

We did the same (passing console=null) in a couple of  configurations
and  had  no  problems  using SMC1 as standard serial port. Try *not*
undefining CONFIG_SERIAL_CONSOLE.

And please keep your line length < 72 characters or so.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
A committee is a life form with six or more legs and no brain.
                              -- Lazarus Long, "Time Enough For Love"

^ permalink raw reply


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