LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [1/4] Merge dtc and libfdt upstream source
From: David Gibson @ 2007-11-08  3:38 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20071108033241.GA11695@localhost.localdomain>

This very large patch incorporates a copy of dtc (including libfdt)
into the kernel source, in arch/powerpc/boot/dtc-src.  This patch only
imports the upstream sources verbatim, later patches are needed to
actually link it into the kernel Makefiles and use the embedded code
during the kernel build.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

---
 arch/powerpc/boot/dtc-src/Makefile.dtc             |   25 
 arch/powerpc/boot/dtc-src/checks.c                 |  460 ++++
 arch/powerpc/boot/dtc-src/data.c                   |  351 +++
 arch/powerpc/boot/dtc-src/dtc-lexer.l              |  341 +++
 arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped  | 2184 +++++++++++++++++++++
 arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped | 1925 ++++++++++++++++++
 arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped |  110 +
 arch/powerpc/boot/dtc-src/dtc-parser.y             |  304 ++
 arch/powerpc/boot/dtc-src/dtc.c                    |  240 ++
 arch/powerpc/boot/dtc-src/dtc.h                    |  253 ++
 arch/powerpc/boot/dtc-src/flattree.c               |  959 +++++++++
 arch/powerpc/boot/dtc-src/fstree.c                 |   94 
 arch/powerpc/boot/dtc-src/libfdt/Makefile.libfdt   |   14 
 arch/powerpc/boot/dtc-src/libfdt/fdt.c             |  156 +
 arch/powerpc/boot/dtc-src/libfdt/fdt.h             |   60 
 arch/powerpc/boot/dtc-src/libfdt/fdt_ro.c          |  562 +++++
 arch/powerpc/boot/dtc-src/libfdt/fdt_rw.c          |  447 ++++
 arch/powerpc/boot/dtc-src/libfdt/fdt_strerror.c    |   96 
 arch/powerpc/boot/dtc-src/libfdt/fdt_sw.c          |  258 ++
 arch/powerpc/boot/dtc-src/libfdt/fdt_wip.c         |  144 +
 arch/powerpc/boot/dtc-src/libfdt/libfdt.h          |  593 +++++
 arch/powerpc/boot/dtc-src/libfdt/libfdt_internal.h |   89 
 arch/powerpc/boot/dtc-src/livetree.c               |  350 +++
 arch/powerpc/boot/dtc-src/srcpos.c                 |  105 +
 arch/powerpc/boot/dtc-src/srcpos.h                 |   75 
 arch/powerpc/boot/dtc-src/treesource.c             |  236 ++
 arch/powerpc/boot/dtc-src/version_gen.h            |    1 
 27 files changed, 10432 insertions(+)

Much too big for the list.  Full patch at
	http://ozlabs.org/~dgibson/home/merge-dtc.patch

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [RFC] Modifying i2c-core to support alias driver names compatible with device trees
From: Jon Smirl @ 2007-11-08  5:27 UTC (permalink / raw)
  To: Jean Delvare, Grant Likely, Tjernlund, i2c, linuxppc-dev
In-Reply-To: <9e4733910711061239g22b06863rbec37fcef138c869@mail.gmail.com>

After contemplating the vast amounts of feedback I received on the
first version of this patch I reworked it to reduce it's impact. This
version can go in without changing any existing drivers in the kernel.

Currently i2c uses a driver_name/type pair to handle drivers which
support more than one device. This version leaves driver_name/type
alone and create a parallel, alternative naming scheme - aliases. When
the grand merge to remove legacy style i2c drivers happens, the
driver_name/type scheme can be removed and converted to use the alias
strings.

If we can get agreement on this patch, I'll post a new version of the
i2c-mpc.c rewrite patch.

Extend i2c-core to support lists of device tree compatible names when
matching drivers

From: Jon Smirl <jonsmirl@gmail.com>


---

 arch/powerpc/sysdev/fsl_soc.c |   46 ++++++-----------------------------------
 drivers/i2c/i2c-core.c        |   16 +++++++++++++-
 drivers/rtc/rtc-ds1307.c      |   14 ++++++++++++
 drivers/rtc/rtc-ds1374.c      |    1 +
 drivers/rtc/rtc-pcf8563.c     |    1 +
 drivers/rtc/rtc-rs5c372.c     |   18 +++++++++++++---
 include/linux/i2c.h           |   13 +++++++++---
 7 files changed, 63 insertions(+), 46 deletions(-)


diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3ace747..cb95a72 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -320,48 +320,12 @@ arch_initcall(gfar_of_init);

 #ifdef CONFIG_I2C_BOARDINFO
 #include <linux/i2c.h>
-struct i2c_driver_device {
-	char	*of_device;
-	char	*i2c_driver;
-	char	*i2c_type;
-};
-
-static struct i2c_driver_device i2c_devices[] __initdata = {
-	{"ricoh,rs5c372a", "rtc-rs5c372", "rs5c372a",},
-	{"ricoh,rs5c372b", "rtc-rs5c372", "rs5c372b",},
-	{"ricoh,rv5c386",  "rtc-rs5c372", "rv5c386",},
-	{"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",},
-	{"dallas,ds1307",  "rtc-ds1307",  "ds1307",},
-	{"dallas,ds1337",  "rtc-ds1307",  "ds1337",},
-	{"dallas,ds1338",  "rtc-ds1307",  "ds1338",},
-	{"dallas,ds1339",  "rtc-ds1307",  "ds1339",},
-	{"dallas,ds1340",  "rtc-ds1307",  "ds1340",},
-	{"stm,m41t00",     "rtc-ds1307",  "m41t00"},
-	{"dallas,ds1374",  "rtc-ds1374",  "rtc-ds1374",},
-};
-
-static int __init of_find_i2c_driver(struct device_node *node,
-				     struct i2c_board_info *info)
-{
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
-		if (!of_device_is_compatible(node, i2c_devices[i].of_device))
-			continue;
-		if (strlcpy(info->driver_name, i2c_devices[i].i2c_driver,
-			    KOBJ_NAME_LEN) >= KOBJ_NAME_LEN ||
-		    strlcpy(info->type, i2c_devices[i].i2c_type,
-			    I2C_NAME_SIZE) >= I2C_NAME_SIZE)
-			return -ENOMEM;
-		return 0;
-	}
-	return -ENODEV;
-}

 static void __init of_register_i2c_devices(struct device_node *adap_node,
 					   int bus_num)
 {
 	struct device_node *node = NULL;
+	const char *compatible;

 	while ((node = of_get_next_child(adap_node, node))) {
 		struct i2c_board_info info = {};
@@ -378,9 +342,13 @@ static void __init of_register_i2c_devices(struct
device_node *adap_node,
 		if (info.irq == NO_IRQ)
 			info.irq = -1;

-		if (of_find_i2c_driver(node, &info) < 0)
+		compatible = of_get_property(node, "compatible", &len);
+		if (!compatible) {
+			printk(KERN_WARNING "i2c-mpc.c: invalid entry, missing compatible
attribute\n");
 			continue;
-
+		}
+		strncpy(info.name, compatible, sizeof(info.name));
+		
 		info.addr = *addr;

 		i2c_register_board_info(bus_num, &info, 1);
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 1a4e8dc..8b49860 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -51,6 +51,7 @@ static int i2c_device_match(struct device *dev,
struct device_driver *drv)
 {
 	struct i2c_client	*client = to_i2c_client(dev);
 	struct i2c_driver	*driver = to_i2c_driver(drv);
+	char const **alias;

 	/* make legacy i2c drivers bypass driver model probing entirely;
 	 * such drivers scan each i2c adapter/bus themselves.
@@ -61,7 +62,20 @@ static int i2c_device_match(struct device *dev,
struct device_driver *drv)
 	/* new style drivers use the same kind of driver matching policy
 	 * as platform devices or SPI:  compare device and driver IDs.
 	 */
-	return strcmp(client->driver_name, drv->name) == 0;
+	if (strcmp(client->driver_name, drv->name) == 0)
+		return true;
+	
+	/* Match against arrary of alias device tree names. When a match
+	 * is found change the reference to point at the copy inside the
+	 * chip driver allowing the caller's string to be freed.
+ 	 */
+	alias = driver->aliases;
+	while (alias && *alias) {
+		if (strnicmp(client->driver_name, *alias, sizeof client->driver_name) == 0)
+			return true;
+		alias++;
+	}
+	return 0;	
 }

 #ifdef	CONFIG_HOTPLUG
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index db6f3f0..456b7ca 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -135,6 +135,11 @@ static inline const struct chip_desc
*find_chip(const char *s)
 	for (i = 0; i < ARRAY_SIZE(chips); i++)
 		if (strnicmp(s, chips[i].name, sizeof chips[i].name) == 0)
 			return &chips[i];
+	/* check the alias names */
+	for (i = ds_1307; i <= m41t00; i++)
+		if (strnicmp(client->driver_name, ds1307_driver.aliases[i], sizeof
client->driver_name) == 0)
+			return &chips[i];
+	
 	return NULL;
 }

@@ -442,6 +447,15 @@ static struct i2c_driver ds1307_driver = {
 		.name	= "rtc-ds1307",
 		.owner	= THIS_MODULE,
 	},
+	.aliases = (char const *[]){
+		[ds_1307] = "dallas,ds1307",
+		[ds_1337] = "dallas,ds1337",
+		[ds_1338] = "dallas,ds1338",
+		[ds_1339] = "dallas,ds1339",
+		[ds_1340] = "dallas,ds1340",
+		[m41t00] = "stm,m41t00",
+		0
+	},
 	.probe		= ds1307_probe,
 	.remove		= __devexit_p(ds1307_remove),
 };
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 45bda18..df8eca4 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -427,6 +427,7 @@ static struct i2c_driver ds1374_driver = {
 		.name = "rtc-ds1374",
 		.owner = THIS_MODULE,
 	},
+	.aliases = (char const *[]){"dallas,ds1374", 0},
 	.probe = ds1374_probe,
 	.remove = __devexit_p(ds1374_remove),
 };
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 0242d80..fa04dc5 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -266,6 +266,7 @@ static struct i2c_driver pcf8563_driver = {
 	.driver		= {
 		.name	= "pcf8563",
 	},
+	.aliases = (char const *[]){"philips,pcf8563", "epson,rtc8564", 0},
 	.id		= I2C_DRIVERID_PCF8563,
 	.attach_adapter = &pcf8563_attach,
 	.detach_client	= &pcf8563_detach,
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c
index 6b67b50..b458f5f 100644
--- a/drivers/rtc/rtc-rs5c372.c
+++ b/drivers/rtc/rtc-rs5c372.c
@@ -62,7 +62,6 @@


 enum rtc_type {
-	rtc_undef = 0,
 	rtc_rs5c372a,
 	rtc_rs5c372b,
 	rtc_rv5c386,
@@ -531,8 +530,14 @@ static int rs5c372_probe(struct i2c_client *client)
 	else if (strcmp(client->name, "rv5c387a") == 0)
 		rs5c372->type = rtc_rv5c387a;
 	else {
-		rs5c372->type = rtc_rs5c372b;
-		dev_warn(&client->dev, "assuming rs5c372b\n");
+		/* check the alias names */
+		for (rs5c372->type = rtc_rs5c372a; rs5c372->type <= rtc_rv5c387a;
rs5c372->type++)
+			if (strnicmp(client->driver_name,
rs5c372_driver.aliases[rs5c372->type], sizeof client->driver_name) ==
0)
+				break;
+		if (rs5c372->type > rtc_rv5c387a) {
+			rs5c372->type = rtc_rs5c372b;
+			dev_warn(&client->dev, "assuming rs5c372b\n");
+		}
 	}

 	/* clock may be set for am/pm or 24 hr time */
@@ -649,6 +654,13 @@ static struct i2c_driver rs5c372_driver = {
 	.driver		= {
 		.name	= "rtc-rs5c372",
 	},
+	.aliases	= (char const *[]){
+		[rtc_rs5c372a] = "ricoh,rs5c372a",
+		[rtc_rs5c372b] = "ricoh,rs5c372b",
+		[rtc_rv5c386] = "ricoh,rv5c386",
+		[rtc_rv5c387a] = "ricoh,rv5c387a",
+		0
+	},
 	.probe		= rs5c372_probe,
 	.remove		= rs5c372_remove,
 };
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 8033e6b..b952c8a 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -105,6 +105,13 @@ extern s32 i2c_smbus_write_i2c_block_data(struct
i2c_client * client,
 struct i2c_driver {
 	int id;
 	unsigned int class;
+	
+	/* Alias names for the driver. Used to support device trees on
+	 * the PowerPC architecture. Device tree names take the form of
+	 * vendor,chip. For example "epson,rtc8564". Alias is a list of
+	 * strings terminated by a zero entry.
+	 */
+	char const **aliases;	

 	/* Notifies the driver that a new bus has appeared. This routine
 	 * can be used by the driver to test if the bus meets its conditions
@@ -144,7 +151,7 @@ struct i2c_driver {
 };
 #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)

-#define I2C_NAME_SIZE	20
+#define I2C_NAME_SIZE	40

 /**
  * struct i2c_client - represent an I2C slave device
@@ -179,7 +186,7 @@ struct i2c_client {
 					/* to the client		*/
 	struct device dev;		/* the device structure		*/
 	int irq;			/* irq issued by device (or -1) */
-	char driver_name[KOBJ_NAME_LEN];
+	char driver_name[I2C_NAME_SIZE];
 	struct list_head list;
 	struct completion released;
 };
@@ -223,7 +230,7 @@ static inline void i2c_set_clientdata (struct
i2c_client *dev, void *data)
  * with the adapter already known.
  */
 struct i2c_board_info {
-	char		driver_name[KOBJ_NAME_LEN];
+	char		driver_name[I2C_NAME_SIZE];
 	char		type[I2C_NAME_SIZE];
 	unsigned short	flags;
 	unsigned short	addr;


-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply related

* [PATCH 0/6] ibm_newemac: Pending patches for review
From: Benjamin Herrenschmidt @ 2007-11-08  8:06 UTC (permalink / raw)
  To: linuxppc-dev

Here are the patches I have pending for EMAC. With those and some not
yet released patches from Hugh Blemings to port Taishan support to
arch/powerpc, I get the board booting.

There's a question about the RGMII/MDIO thingy & sequoia, somebody
who knows that board should reply.

^ permalink raw reply

* [PATCH 1/6] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support
From: Benjamin Herrenschmidt @ 2007-11-08  8:06 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>

From: Stefan Roese <sr@denx.de>

This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver.
These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <sr@denx.de>

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

--- linux.orig/drivers/net/ibm_newemac/phy.c	2007-06-15 21:45:18.000000000 +0400
+++ linux/drivers/net/ibm_newemac/phy.c	2007-06-15 20:45:15.000000000 +0400
@@ -306,8 +306,47 @@
 	.ops		= &cis8201_phy_ops
 };
 
+static struct mii_phy_def bcm5248_phy_def = {
+
+	.phy_id		= 0x0143bc00,
+	.phy_id_mask	= 0x0ffffff0,
+	.name		= "BCM5248 10/100 SMII Ethernet",
+	.ops		= &generic_phy_ops
+};
+
+static int m88e1111_init(struct mii_phy *phy)
+{
+	printk("%s: Marvell 88E1111 Ethernet\n", __FUNCTION__);
+	phy_write(phy, 0x14, 0x0ce3);
+	phy_write(phy, 0x18, 0x4101);
+	phy_write(phy, 0x09, 0x0e00);
+	phy_write(phy, 0x04, 0x01e1);
+	phy_write(phy, 0x00, 0x9140);
+	phy_write(phy, 0x00, 0x1140);
+
+	return  0;
+}
+
+static struct mii_phy_ops m88e1111_phy_ops = {
+	.init		= m88e1111_init,
+	.setup_aneg	= genmii_setup_aneg,
+	.setup_forced	= genmii_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= genmii_read_link
+};
+
+static struct mii_phy_def m88e1111_phy_def = {
+
+	.phy_id		= 0x01410CC0,
+	.phy_id_mask	= 0x0ffffff0,
+	.name		= "Marvell 88E1111 Ethernet",
+	.ops		= &m88e1111_phy_ops,
+};
+
 static struct mii_phy_def *mii_phy_table[] = {
 	&cis8201_phy_def,
+	&bcm5248_phy_def,
+	&m88e1111_phy_def,
 	&genmii_phy_def,
 	NULL
 };
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
From: Benjamin Herrenschmidt @ 2007-11-08  8:06 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>

This adds support for the ET1011c PHY as found on the taishan
board.

The code comes from the kernel distributed with the board by
AMCC and developped by DENX.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

And don't ask me about using phylib, it's in plan :-)

 drivers/net/ibm_newemac/phy.c |   37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Index: linux-work/drivers/net/ibm_newemac/phy.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/phy.c	2007-11-08 15:11:30.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/phy.c	2007-11-08 15:11:54.000000000 +1100
@@ -327,6 +327,42 @@ static int m88e1111_init(struct mii_phy 
 	return  0;
 }
 
+static int et1011c_init(struct mii_phy *phy)
+{
+        u16 reg_short;
+
+        reg_short = (u16)(phy_read(phy,0x16));
+        reg_short &= ~(0x7);
+        reg_short |= 0x6;       /* RGMII Trace Delay*/
+        phy_write(phy, 0x16, reg_short);
+
+        reg_short = (u16)(phy_read(phy, 0x17));
+        reg_short &= ~(0x40);
+        phy_write(phy, 0x17, reg_short);
+
+        phy_write(phy,0x1c,0x74f0);
+        return 0;
+}
+
+static struct mii_phy_ops et1011c_phy_ops = {
+        .init           = et1011c_init,
+        .setup_aneg     = genmii_setup_aneg,
+        .setup_forced   = genmii_setup_forced,
+        .poll_link      = genmii_poll_link,
+        .read_link      = genmii_read_link
+};
+
+static struct mii_phy_def et1011c_phy_def = {
+        .phy_id         = 0x0282f000,
+        .phy_id_mask    = 0x0fffff00,
+        .name           = "ET1011C Gigabit Ethernet",
+        .ops            = &et1011c_phy_ops
+};
+
+
+
+
+
 static struct mii_phy_ops m88e1111_phy_ops = {
 	.init		= m88e1111_init,
 	.setup_aneg	= genmii_setup_aneg,
@@ -344,6 +380,7 @@ static struct mii_phy_def m88e1111_phy_d
 };
 
 static struct mii_phy_def *mii_phy_table[] = {
+	&et1011c_phy_def,
 	&cis8201_phy_def,
 	&bcm5248_phy_def,
 	&m88e1111_phy_def,

^ permalink raw reply

* [PATCH 3/6] ibm_newemac: Fix ZMII refcounting bug
From: Benjamin Herrenschmidt @ 2007-11-08  8:06 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>

When using ZMII for MDIO only (such as 440GX with RGMII for data and ZMII for
MDIO), the ZMII code would fail to properly refcount, thus triggering a
BUG_ON().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 drivers/net/ibm_newemac/zmii.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-work/drivers/net/ibm_newemac/zmii.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/zmii.c	2007-11-08 15:45:32.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/zmii.c	2007-11-08 15:46:21.000000000 +1100
@@ -83,12 +83,14 @@ int __devinit zmii_attach(struct of_devi
 
 	ZMII_DBG(dev, "init(%d, %d)" NL, input, *mode);
 
-	if (!zmii_valid_mode(*mode))
+	if (!zmii_valid_mode(*mode)) {
 		/* Probably an EMAC connected to RGMII,
 		 * but it still may need ZMII for MDIO so
 		 * we don't fail here.
 		 */
+		dev->users++;
 		return 0;
+	}
 
 	mutex_lock(&dev->lock);
 

^ permalink raw reply

* [PATCH 4/6] ibm_newemac: Workaround reset timeout when no link
From: Benjamin Herrenschmidt @ 2007-11-08  8:06 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>

With some PHYs, when the link goes away, the EMAC reset fails due
to the loss of the RX clock I believe.

The old EMAC driver worked around that using some internal chip-specific
clock force bits that are different on various 44x implementations.

This is an attempt at doing it differently, by avoiding the reset when
there is no link, but forcing loopback mode instead. It seems to work
on my Taishan 440GX based board so far.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 drivers/net/ibm_newemac/core.c |   20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

Index: linux-work/drivers/net/ibm_newemac/core.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/core.c	2007-11-08 17:38:44.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/core.c	2007-11-08 18:03:44.000000000 +1100
@@ -464,26 +464,34 @@ static int emac_configure(struct emac_in
 {
 	struct emac_regs __iomem *p = dev->emacp;
 	struct net_device *ndev = dev->ndev;
-	int tx_size, rx_size;
+	int tx_size, rx_size, link = netif_carrier_ok(dev->ndev);
 	u32 r, mr1 = 0;
 
 	DBG(dev, "configure" NL);
 
-	if (emac_reset(dev) < 0)
+	if (!link) {
+		out_be32(&p->mr1, in_be32(&p->mr1)
+			 | EMAC_MR1_FDE | EMAC_MR1_ILE);
+		udelay(100);
+	} else if (emac_reset(dev) < 0)
 		return -ETIMEDOUT;
 
 	if (emac_has_feature(dev, EMAC_FTR_HAS_TAH))
 		tah_reset(dev->tah_dev);
 
-	DBG(dev, " duplex = %d, pause = %d, asym_pause = %d\n",
-	    dev->phy.duplex, dev->phy.pause, dev->phy.asym_pause);
+	DBG(dev, " link = %d duplex = %d, pause = %d, asym_pause = %d\n",
+	    link, dev->phy.duplex, dev->phy.pause, dev->phy.asym_pause);
 
 	/* Default fifo sizes */
 	tx_size = dev->tx_fifo_size;
 	rx_size = dev->rx_fifo_size;
 
+	/* No link, force loopback */
+	if (!link)
+		mr1 = EMAC_MR1_FDE | EMAC_MR1_ILE;
+
 	/* Check for full duplex */
-	if (dev->phy.duplex == DUPLEX_FULL)
+	else if (dev->phy.duplex == DUPLEX_FULL)
 		mr1 |= EMAC_MR1_FDE | EMAC_MR1_MWSW_001;
 
 	/* Adjust fifo sizes, mr1 and timeouts based on link speed */
@@ -1162,9 +1170,9 @@ static void emac_link_timer(struct work_
 		link_poll_interval = PHY_POLL_LINK_ON;
 	} else {
 		if (netif_carrier_ok(dev->ndev)) {
-			emac_reinitialize(dev);
 			netif_carrier_off(dev->ndev);
 			netif_tx_disable(dev->ndev);
+			emac_reinitialize(dev);
 			emac_print_link_status(dev);
 		}
 		link_poll_interval = PHY_POLL_LINK_OFF;

^ permalink raw reply

* [PATCH 5/6] ibm_newemac: Cleanup/Fix RGMII MDIO support detection
From: Benjamin Herrenschmidt @ 2007-11-08  8:07 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>

More than just "AXON" version of EMAC RGMII supports MDIO, so replace
the current test with a generic property in the device-tree that
indicates such support.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Should we set that in Sequoia DTS ?

 drivers/net/ibm_newemac/rgmii.c |   20 +++++++++++---------
 drivers/net/ibm_newemac/rgmii.h |    5 +++--
 2 files changed, 14 insertions(+), 11 deletions(-)

Index: linux-work/drivers/net/ibm_newemac/rgmii.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/rgmii.c	2007-11-08 18:46:06.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/rgmii.c	2007-11-08 18:51:00.000000000 +1100
@@ -140,7 +140,7 @@ void rgmii_get_mdio(struct of_device *of
 
 	RGMII_DBG2(dev, "get_mdio(%d)" NL, input);
 
-	if (dev->type != RGMII_AXON)
+	if (!(dev->flags & EMAC_RGMII_FLAG_HAS_MDIO))
 		return;
 
 	mutex_lock(&dev->lock);
@@ -161,7 +161,7 @@ void rgmii_put_mdio(struct of_device *of
 
 	RGMII_DBG2(dev, "put_mdio(%d)" NL, input);
 
-	if (dev->type != RGMII_AXON)
+	if (!(dev->flags & EMAC_RGMII_FLAG_HAS_MDIO))
 		return;
 
 	fer = in_be32(&p->fer);
@@ -250,11 +250,13 @@ static int __devinit rgmii_probe(struct 
 		goto err_free;
 	}
 
-	/* Check for RGMII type */
+	/* Check for RGMII flags */
+	if (of_get_property(ofdev->node, "has-mdio", NULL))
+		dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO;
+
+	/* CAB lacks the right properties, fix this up */
 	if (of_device_is_compatible(ofdev->node, "ibm,rgmii-axon"))
-		dev->type = RGMII_AXON;
-	else
-		dev->type = RGMII_STANDARD;
+		dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO;
 
 	DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n",
 	     in_be32(&dev->base->fer), in_be32(&dev->base->ssr));
@@ -263,9 +265,9 @@ static int __devinit rgmii_probe(struct 
 	out_be32(&dev->base->fer, 0);
 
 	printk(KERN_INFO
-	       "RGMII %s %s initialized\n",
-	       dev->type == RGMII_STANDARD ? "standard" : "axon",
-	       ofdev->node->full_name);
+	       "RGMII %s initialized with%s MDIO support\n",
+	       ofdev->node->full_name,
+	       (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out");
 
 	wmb();
 	dev_set_drvdata(&ofdev->dev, dev);
Index: linux-work/drivers/net/ibm_newemac/rgmii.h
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/rgmii.h	2007-11-08 18:46:06.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/rgmii.h	2007-11-08 18:47:32.000000000 +1100
@@ -35,8 +35,9 @@ struct rgmii_regs {
 struct rgmii_instance {
 	struct rgmii_regs __iomem	*base;
 
-	/* Type of RGMII bridge */
-	int				type;
+	/* RGMII bridge flags */
+	int				flags;
+#define EMAC_RGMII_FLAG_HAS_MDIO	0x00000001
 
 	/* Only one EMAC whacks us at a time */
 	struct mutex			lock;

^ permalink raw reply

* [PATCH 6/6] ibm_newemac: Cleanup/fix support for STACR register variants
From: Benjamin Herrenschmidt @ 2007-11-08  8:07 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>

There are a few variants of the STACR register that affect more than
just the "AXON" version of EMAC. Replace the current test of various
chip models with tests for generic properties in the device-tree.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 arch/powerpc/boot/dts/sequoia.dts |    4 ++++
 drivers/net/ibm_newemac/core.c    |   23 +++++++++++++----------
 drivers/net/ibm_newemac/core.h    |    6 +++---
 3 files changed, 20 insertions(+), 13 deletions(-)

Index: linux-work/arch/powerpc/boot/dts/sequoia.dts
===================================================================
--- linux-work.orig/arch/powerpc/boot/dts/sequoia.dts	2007-11-08 18:49:53.000000000 +1100
+++ linux-work/arch/powerpc/boot/dts/sequoia.dts	2007-11-08 18:49:59.000000000 +1100
@@ -273,6 +273,8 @@
 				zmii-channel = <0>;
 				rgmii-device = <&RGMII0>;
 				rgmii-channel = <0>;
+				has-inverted-stacr-oc;
+				has-new-stacr-staopc;
 			};
 
 			EMAC1: ethernet@ef600f00 {
@@ -301,6 +303,8 @@
 				zmii-channel = <1>;
 				rgmii-device = <&RGMII0>;
 				rgmii-channel = <1>;
+				has-inverted-stacr-oc;
+				has-new-stacr-staopc;
 			};
 		};
 	};
Index: linux-work/drivers/net/ibm_newemac/core.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/core.c	2007-11-08 18:49:53.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/core.c	2007-11-08 18:50:17.000000000 +1100
@@ -709,7 +709,7 @@ static int __emac_mdio_read(struct emac_
 		r = EMAC_STACR_BASE(dev->opb_bus_freq);
 	if (emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
 		r |= EMAC_STACR_OC;
-	if (emac_has_feature(dev, EMAC_FTR_HAS_AXON_STACR))
+	if (emac_has_feature(dev, EMAC_FTR_HAS_NEW_STACR))
 		r |= EMACX_STACR_STAC_READ;
 	else
 		r |= EMAC_STACR_STAC_READ;
@@ -781,7 +781,7 @@ static void __emac_mdio_write(struct ema
 		r = EMAC_STACR_BASE(dev->opb_bus_freq);
 	if (emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
 		r |= EMAC_STACR_OC;
-	if (emac_has_feature(dev, EMAC_FTR_HAS_AXON_STACR))
+	if (emac_has_feature(dev, EMAC_FTR_HAS_NEW_STACR))
 		r |= EMACX_STACR_STAC_WRITE;
 	else
 		r |= EMAC_STACR_STAC_WRITE;
@@ -2473,16 +2473,19 @@ static int __devinit emac_init_config(st
 	/* Check EMAC version */
 	if (of_device_is_compatible(np, "ibm,emac4"))
 		dev->features |= EMAC_FTR_EMAC4;
-	if (of_device_is_compatible(np, "ibm,emac-axon")
-	    || of_device_is_compatible(np, "ibm,emac-440epx"))
-		dev->features |= EMAC_FTR_HAS_AXON_STACR
-			| EMAC_FTR_STACR_OC_INVERT;
-	if (of_device_is_compatible(np, "ibm,emac-440spe"))
+
+	/* Fixup some feature bits based on the device tree */
+	if (of_get_property(np, "has-inverted-stacr-oc", NULL))
 		dev->features |= EMAC_FTR_STACR_OC_INVERT;
+	if (of_get_property(np, "has-new-stacr-staopc", NULL))
+		dev->features |= EMAC_FTR_HAS_NEW_STACR;
 
-	/* Fixup some feature bits based on the device tree and verify
-	 * we have support for them compiled in
-	 */
+	/* CAB lacks the appropriate properties */
+	if (of_device_is_compatible(np, "ibm,emac-axon"))
+		dev->features |= EMAC_FTR_HAS_NEW_STACR |
+			EMAC_FTR_STACR_OC_INVERT;
+
+	/* Enable TAH/ZMII/RGMII features as found */
 	if (dev->tah_ph != 0) {
 #ifdef CONFIG_IBM_NEW_EMAC_TAH
 		dev->features |= EMAC_FTR_HAS_TAH;
Index: linux-work/drivers/net/ibm_newemac/core.h
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/core.h	2007-11-08 18:49:53.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/core.h	2007-11-08 18:49:59.000000000 +1100
@@ -292,9 +292,9 @@ struct emac_instance {
  */
 #define EMAC_FTR_HAS_RGMII		0x00000020
 /*
- * Set if we have axon-type STACR
+ * Set if we have new type STACR with STAOPC
  */
-#define EMAC_FTR_HAS_AXON_STACR		0x00000040
+#define EMAC_FTR_HAS_NEW_STACR		0x00000040
 
 
 /* Right now, we don't quite handle the always/possible masks on the
@@ -306,7 +306,7 @@ enum {
 
 	EMAC_FTRS_POSSIBLE	=
 #ifdef CONFIG_IBM_NEW_EMAC_EMAC4
-	    EMAC_FTR_EMAC4	| EMAC_FTR_HAS_AXON_STACR	|
+	    EMAC_FTR_EMAC4	| EMAC_FTR_HAS_NEW_STACR	|
 	    EMAC_FTR_STACR_OC_INVERT	|
 #endif
 #ifdef CONFIG_IBM_NEW_EMAC_TAH

^ permalink raw reply

* Re: [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
From: Benjamin Herrenschmidt @ 2007-11-08  8:42 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200711080941.46894.sr@denx.de>


> > +static struct mii_phy_def et1011c_phy_def = {
> > +        .phy_id         = 0x0282f000,
> > +        .phy_id_mask    = 0x0fffff00,
> > +        .name           = "ET1011C Gigabit Ethernet",
> > +        .ops            = &et1011c_phy_ops
> > +};
> > +
> > +
> > +
> > +
> > +
> 
> Nitpicking: Too many empty lines for my taste.

Agreed, I though I had removed them, looks like I didn't. Will fix that
before submitting.

Thanks,
Ben.

^ permalink raw reply

* Re: [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
From: Stefan Roese @ 2007-11-08  8:41 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20071108080729.E09F7DDDFB@ozlabs.org>

On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> This adds support for the ET1011c PHY as found on the taishan
> board.
>
> The code comes from the kernel distributed with the board by
> AMCC and developped by DENX.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> And don't ask me about using phylib, it's in plan :-)
>
>  drivers/net/ibm_newemac/phy.c |   37 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>
> Index: linux-work/drivers/net/ibm_newemac/phy.c
> ===================================================================
> --- linux-work.orig/drivers/net/ibm_newemac/phy.c	2007-11-08
> 15:11:30.000000000 +1100 +++
> linux-work/drivers/net/ibm_newemac/phy.c	2007-11-08 15:11:54.000000000
> +1100 @@ -327,6 +327,42 @@ static int m88e1111_init(struct mii_phy
>  	return  0;
>  }
>
> +static int et1011c_init(struct mii_phy *phy)
> +{
> +        u16 reg_short;
> +
> +        reg_short = (u16)(phy_read(phy,0x16));
> +        reg_short &= ~(0x7);
> +        reg_short |= 0x6;       /* RGMII Trace Delay*/
> +        phy_write(phy, 0x16, reg_short);
> +
> +        reg_short = (u16)(phy_read(phy, 0x17));
> +        reg_short &= ~(0x40);
> +        phy_write(phy, 0x17, reg_short);
> +
> +        phy_write(phy,0x1c,0x74f0);
> +        return 0;
> +}
> +
> +static struct mii_phy_ops et1011c_phy_ops = {
> +        .init           = et1011c_init,
> +        .setup_aneg     = genmii_setup_aneg,
> +        .setup_forced   = genmii_setup_forced,
> +        .poll_link      = genmii_poll_link,
> +        .read_link      = genmii_read_link
> +};
> +
> +static struct mii_phy_def et1011c_phy_def = {
> +        .phy_id         = 0x0282f000,
> +        .phy_id_mask    = 0x0fffff00,
> +        .name           = "ET1011C Gigabit Ethernet",
> +        .ops            = &et1011c_phy_ops
> +};
> +
> +
> +
> +
> +

Nitpicking: Too many empty lines for my taste.

Other then that:

Acked-by: Stefan Roese <sr@denx.de>

Thanks.

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH 3/6] ibm_newemac: Fix ZMII refcounting bug
From: Stefan Roese @ 2007-11-08  8:43 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20071108080730.75261DDDFB@ozlabs.org>

On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> When using ZMII for MDIO only (such as 440GX with RGMII for data and ZMII
> for MDIO), the ZMII code would fail to properly refcount, thus triggering a
> BUG_ON().
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH 4/6] ibm_newemac: Workaround reset timeout when no link
From: Stefan Roese @ 2007-11-08  8:44 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20071108080731.2E40DDDDFC@ozlabs.org>

On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> With some PHYs, when the link goes away, the EMAC reset fails due
> to the loss of the RX clock I believe.
>
> The old EMAC driver worked around that using some internal chip-specific
> clock force bits that are different on various 44x implementations.
>
> This is an attempt at doing it differently, by avoiding the reset when
> there is no link, but forcing loopback mode instead. It seems to work
> on my Taishan 440GX based board so far.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH 5/6] ibm_newemac: Cleanup/Fix RGMII MDIO support detection
From: Stefan Roese @ 2007-11-08  9:24 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20071108080732.0C355DDE21@ozlabs.org>

On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> More than just "AXON" version of EMAC RGMII supports MDIO, so replace
> the current test with a generic property in the device-tree that
> indicates such support.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Stefan Roese <sr@denx.de>

> Should we set that in Sequoia DTS ?

I suppose yes. 440EPx support MDIO over ZMII and RGMII, but Sequoia uses RGMII 
so we should enable it.

I tested it with your patches and has-mdio set on Sequoia and it works (though 
it also works without this property in the RGMII node).

Thanks.

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH 6/6] ibm_newemac: Cleanup/fix support for STACR register variants
From: Stefan Roese @ 2007-11-08  9:38 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20071108080733.06584DDEA0@ozlabs.org>

On Thursday 08 November 2007, Benjamin Herrenschmidt wrote:
> There are a few variants of the STACR register that affect more than
> just the "AXON" version of EMAC. Replace the current test of various
> chip models with tests for generic properties in the device-tree.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

^ permalink raw reply

* RE: Bootloader & Flash
From: MingLiu @ 2007-11-08  9:43 UTC (permalink / raw)
  To: schardt; +Cc: linuxppc-embedded
In-Reply-To: <4732B492.5010604@fz-juelich.de>

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


Hi,
 > Could I store both, hw bitstream and kernel, in the xilinx platform> flash ? i think its not bit enough. I want to store the hw bitstream in> the platform flash as usual and the kernel in the additional flash.> I don't know how to store the kernel in the flash until know. This why I> try with the MTD devices.
 
You can store HW with EDK bootloader on either of the flashes. But you can only store kernel in linear flash because it is accessible through opb bus. 
> I want the root-fs on flash, but this is future :) First i try to boot> the kernel
I do not have experience to set up a file system in flash memory. What I have done is to put it in the CF card or via NFS. But I guess with MTD driver's support, it will not be difficult to do that. 
 
Good luck.
 
BR
Ming
_________________________________________________________________
手机也能上 MSN 聊天了,快来试试吧!
http://mobile.msn.com.cn/

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

^ permalink raw reply

* Re: [PATCH (2.6.25) 2/2] suspend: clean up Kconfig
From: Ralf Baechle @ 2007-11-08  9:48 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bryan Wu, linux-mips, Rafael J. Wysocki, linuxppc-dev, Paul Mundt,
	linux-pm, Guennadi Liakhovetski, Russell King
In-Reply-To: <20071107135849.207149000@sipsolutions.net>

On Wed, Nov 07, 2007 at 02:58:00PM +0100, Johannes Berg wrote:

> This cleans up the suspend Kconfig and removes the need to
> declare centrally which architectures support suspend. All
> architectures that currently support suspend are modified
> accordingly.

Acked-by: Ralf Baechle <ralf@linux-mips.org>

Cheers,

  Ralf

^ permalink raw reply

* Please pull powerpc.git merge branch
From: Paul Mackerras @ 2007-11-08  9:54 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev

Linus,

Please do

git pull \
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge

to get a bunch of bug-fixes, documentation updates and defconfig
updates for powerpc.

Thanks,
Paul.

 Documentation/powerpc/booting-without-of.txt |  275 +++++++++++++++++++++++
 arch/powerpc/boot/dts/walnut.dts             |    4 
 arch/powerpc/boot/wrapper                    |   43 ++--
 arch/powerpc/configs/pasemi_defconfig        |  308 ++++++++++++++++----------
 arch/powerpc/configs/ppc64_defconfig         |  247 +++++++++++++++------
 arch/powerpc/kernel/cputable.c               |   36 ++-
 arch/powerpc/kernel/entry_32.S               |   23 ++
 arch/powerpc/kernel/head_64.S                |    2 
 arch/powerpc/kernel/idle.c                   |    2 
 arch/powerpc/kernel/misc_32.S                |   32 ++-
 arch/powerpc/kernel/prom.c                   |   12 +
 arch/powerpc/kernel/prom_init.c              |    2 
 arch/powerpc/kernel/setup_64.c               |   19 +-
 arch/powerpc/kernel/swsusp_32.S              |    2 
 arch/powerpc/kernel/time.c                   |   10 -
 arch/powerpc/kernel/vmlinux.lds.S            |    3 
 arch/powerpc/mm/40x_mmu.c                    |   17 +
 arch/powerpc/mm/44x_mmu.c                    |    1 
 arch/powerpc/mm/fault.c                      |    2 
 arch/powerpc/mm/hash_low_64.S                |    5 
 arch/powerpc/mm/hash_utils_64.c              |    7 -
 arch/powerpc/mm/mmu_decl.h                   |    4 
 arch/powerpc/mm/slb.c                        |   35 +++
 arch/powerpc/platforms/cell/interrupt.c      |   24 +-
 arch/powerpc/platforms/cell/smp.c            |    1 
 arch/powerpc/platforms/celleb/setup.c        |    1 
 arch/powerpc/platforms/iseries/irq.h         |    4 
 arch/powerpc/platforms/iseries/setup.c       |    4 
 arch/powerpc/platforms/iseries/vio.c         |   10 +
 arch/powerpc/platforms/pseries/eeh.c         |   13 +
 arch/powerpc/platforms/pseries/eeh_driver.c  |   18 +-
 arch/powerpc/platforms/pseries/firmware.c    |    1 
 arch/powerpc/platforms/pseries/msi.c         |    6 +
 arch/powerpc/sysdev/i8259.c                  |    1 
 arch/powerpc/sysdev/mv64x60_pci.c            |   10 +
 arch/ppc/kernel/entry.S                      |   23 ++
 arch/ppc/kernel/misc.S                       |   31 ++-
 arch/ppc/mm/44x_mmu.c                        |    1 
 arch/ppc/mm/4xx_mmu.c                        |   17 +
 arch/ppc/mm/fault.c                          |    2 
 arch/ppc/mm/mmu_decl.h                       |    4 
 arch/ppc/platforms/4xx/ebony.c               |    2 
 arch/ppc/platforms/4xx/luan.c                |    7 +
 arch/ppc/platforms/4xx/ocotea.c              |    2 
 arch/ppc/platforms/4xx/taishan.c             |    2 
 arch/ppc/syslib/i8259.c                      |    1 
 arch/ppc/syslib/m8260_setup.c                |   13 +
 drivers/macintosh/windfarm_core.c            |   10 -
 drivers/serial/uartlite.c                    |   10 +
 include/asm-powerpc/pgtable-ppc32.h          |   13 +
 include/asm-powerpc/systbl.h                 |    2 
 include/asm-powerpc/time.h                   |   20 +-
 include/asm-powerpc/tlbflush.h               |   12 +
 53 files changed, 996 insertions(+), 360 deletions(-)

Alexey Dobriyan (1):
      [POWERPC] Fix sysctl table check failure on PowerMac

Aurelien Jarno (1):
      [POWERPC] i8259: Add disable method

Benjamin Herrenschmidt (5):
      [POWERPC] powerpc: Fix demotion of segments to 4K pages
      [POWERPC] 4xx: Fix 4xx flush_tlb_page()
      [POWERPC] 4xx: Deal with 44x virtually tagged icache
      [POWERPC] Fix cache line vs. block size confusion
      [POWERPC] Fix si_addr value on low level hash failures

Dale Farnsworth (1):
      [POWERPC] Fix mv643xx_pci sysfs .read and .write functions

Grant Likely (5):
      [POWERPC] bootwrapper: Allow wrapper script to execute verbosely
      [POWERPC] bootwrapper: Bail from script if any command fails
      [POWERPC] Device tree bindings for Xilinx devices
      [POWERPC] Uartlite: speed up console output
      [POWERPC] ppc405 Fix arithmatic rollover bug when memory size under 16M

Johannes Berg (2):
      [POWERPC] windfarm: Fix windfarm thread freezer interaction
      [POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC

Li Zefan (1):
      [POWERPC] ] Fix memset size error

Linas Vepstas (4):
      [POWERPC] EEH: Clean up comments
      [POWERPC] EEH: Drivers that need reset trump others
      [POWERPC] EEH: Avoid crash on null device
      [POWERPC] EEH: Make sure warning message is printed

Michael Ellerman (1):
      [POWERPC] Read back MSI message in rtas_setup_msi_irqs() so restore works

Olof Johansson (4):
      [POWERPC] Fix build break in arch/ppc/syslib/m8260_setup.c
      [POWERPC] Fix CONFIG_SMP=n build break
      [POWERPC] pasemi: Update defconfig
      [POWERPC] Refresh ppc64_defconfig and enable pasemi-related options

Patrick Mansfield (1):
      [POWERPC] Change fallocate to match unistd.h on powerpc

Paul Mackerras (1):
      [POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)

Roel Kluin (1):
      [POWERPC] allocation fix in ppc/platforms/4xx/luan.c

Scott Wood (1):
      [POWERPC] bootwrapper: Revert ps3 binary flag usage, and remove .bin suffix

Stephen Rothwell (3):
      [POWERPC] iSeries_init_IRQ non-PCI tidy
      [POWERPC] Fix link errors for allyesconfig
      [POWERPC] iSeries: Fix ref counting in vio setup

Steven A. Falco (1):
      [POWERPC] 4xx: Fix Walnut DTS interrupt property

Tony Breeds (1):
      [POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined

Valentine Barshak (1):
      [POWERPC] 4xx: Workaround for the 440EP(x)/GR(x) processors identical PVR issue.

will schmidt (2):
      [POWERPC] Include udbg.h when using udbg_printf
      [POWERPC] Fix switch_slb handling of 1T ESID values

^ permalink raw reply

* Re: [RFC] Modifying i2c-core to support alias driver names compatible with device trees
From: Andreas Schwab @ 2007-11-08 10:03 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jean Delvare, Tjernlund, linuxppc-dev, i2c
In-Reply-To: <20071108120535.769e4d73.sfr@canb.auug.org.au>

Stephen Rothwell <sfr@canb.auug.org.au> writes:

> On Tue, 6 Nov 2007 15:39:42 -0500 "Jon Smirl" <jonsmirl@gmail.com> wrote:
>>
>> It was requested to split this code out into a separate thread....
>> 
>> This code modifies the i2c-core to support lists of alias names in the
>> chip drivers.
>> For example: .aliases	= (char const
>> *[]){"ricoh,rs5c372a","ricoh,rs5c372b","ricoh,rv5c386","ricoh,rv5c387a",
>> 0},
>
> You should not need the (char const *[]) casts at all.

It's not a cast, it's a compound literal.  What it does is to create an
anonymous object, the address of which is the initializer for the
aliases pointer.  Note that the anonymous object is not const qualified.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply

* RE: ML405 gigabit ethernet with kernel 2.6.23
From: MingLiu @ 2007-11-08 10:32 UTC (permalink / raw)
  To: kentaro, linuxppc-embedded
In-Reply-To: <4732719A.20707@triumf.ca>

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


Dear Kentaro,
> -------------------------------------------------------------> "netperf -H 192.168.1.1 -t TCP_STREAM" 110 Mbps> "netperf -H 192.168.1.1 -t UDP_STREAM" 210 Mbps> -------------------------------------------------------------
Are these results the ones with or without Jumbo-frame enabled? If no, they are quite good I think. The results from Montavista probably are the ones with Jumbo-frame enabled. 
 
For anybody who has interest on this topic, I have recently an accepted paper which has part of the content on this. The link is http://web.it.kth.se/~mingliu/publications/co_design(icfpt07).pdf and in 6.2 section, I listed our measurement results. 300Mbps for TCP and 400Mbps for UDP, with Jumbo-frame enabled. Unfortunately I did not explain the details and detailed configurations on our case. So these results are only for your reference.
 
BR
Ming
_________________________________________________________________
Windows Live Spaces 中最年轻的成员!
http://miaomiaogarden2007.spaces.live.com/

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

^ permalink raw reply

* Re: [PATCH 2/6] ibm_newemac: Add ET1011c PHY support
From: Josh Boyer @ 2007-11-08 12:08 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev, Stefan Roese
In-Reply-To: <1194511344.6561.0.camel@pasglop>

On Thu, 08 Nov 2007 19:42:24 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> 
> > > +static struct mii_phy_def et1011c_phy_def = {
> > > +        .phy_id         = 0x0282f000,
> > > +        .phy_id_mask    = 0x0fffff00,
> > > +        .name           = "ET1011C Gigabit Ethernet",
> > > +        .ops            = &et1011c_phy_ops
> > > +};
> > > +
> > > +
> > > +
> > > +
> > > +
> > 
> > Nitpicking: Too many empty lines for my taste.
> 
> Agreed, I though I had removed them, looks like I didn't. Will fix that
> before submitting.

DENX is pretty good about having Signed-off-by lines in their tree...
maybe you should add the original authors as well if it's there.

josh

^ permalink raw reply

* Re: [PATCH] Register AC97 Controller Reference with the platform bus
From: Josh Boyer @ 2007-11-08 13:20 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, JOFT
In-Reply-To: <20071107161142.7901.51817.stgit@trillian.cg.shawcable.net>

On Wed, 07 Nov 2007 09:14:15 -0700
Grant Likely <grant.likely@secretlab.ca> wrote:

> From: Joachim Foerster <mls.JOFT@gmx.de>
> 
> Add AC97 platform bus registration for Xilinx Virtex platforms.
> 
> Signed-off-by: Joachim Foerster <JOFT@gmx.de>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
> Josh, can you please pick up this patch into your .24 queue.  I know it's
> arch/ppc, but it is harmless and it is required to get the AC97 device
> driver working on Virtex boards.  It's pretty much a bug fix in that regard.

Will do shortly.  I have a couple other bug fix patches I need to get
out as well.

josh

> 
> Cheers,
> g.
> 
>  arch/ppc/syslib/virtex_devices.c |   31 +++++++++++++++++++++++++++++++
>  1 files changed, 31 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
> index 96188f8..95ee313 100644
> --- a/arch/ppc/syslib/virtex_devices.c
> +++ b/arch/ppc/syslib/virtex_devices.c
> @@ -169,6 +169,29 @@
>  	}, \
>  }
> 
> +#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \
> +	.name = "ml403_ac97cr", \
> +	.id = num, \
> +	.num_resources = 3, \
> +	.resource = (struct resource[]) { \
> +		{ \
> +			.start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \
> +			.end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \
> +			.flags = IORESOURCE_MEM, \
> +		}, \
> +		{ \
> +			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
> +			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
> +			.flags = IORESOURCE_IRQ, \
> +		}, \
> +		{ \
> +			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
> +			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
> +			.flags = IORESOURCE_IRQ, \
> +		}, \
> +	}, \
> +}
> +
>  /* UART 8250 driver platform data table */
>  struct plat_serial8250_port virtex_serial_platform_data[] = {
>  #if defined(XPAR_UARTNS550_0_BASEADDR)
> @@ -303,6 +326,14 @@ struct platform_device virtex_platform_devices[] = {
>  #if defined(XPAR_TFT_3_BASEADDR)
>  	XPAR_TFT(3),
>  #endif
> +
> +	/* AC97 Controller Reference instances */
> +#if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR)
> +	XPAR_AC97_CONTROLLER_REFERENCE(0),
> +#endif
> +#if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR)
> +	XPAR_AC97_CONTROLLER_REFERENCE(1),
> +#endif
>  };
> 
>  /* Early serial support functions */
> 

^ permalink raw reply

* Re: Merge dtc
From: Jon Loeliger @ 2007-11-08 13:59 UTC (permalink / raw)
  To: Sam Ravnborg, Milton Miller, ppcdev, Paul Mackerras
In-Reply-To: <20071031024508.GB7772@localhost.localdomain>

David Gibson wrote:
>
> Ok.  I'll use this version in my next spin; except for adding one
> dependency you missed, and removing one which should never have been
> there (unneccessary #include, which I've already fixed in dtc
> upstream).
> 


I think if we embed the DTC in the kernel tree, we should
wait until it supports /dts-v1/ files first.

jdl

^ permalink raw reply

* Re: [PATCH] very similar, now in walnut_setup_arch(); arch/ppc/platforms/4xx/walnut.c
From: Josh Boyer @ 2007-11-08 14:06 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linuxppc-dev
In-Reply-To: <4732397A.8020607@tiscali.nl>

On Wed, 07 Nov 2007 23:17:30 +0100
Roel Kluin <12o3l@tiscali.nl> wrote:

> iounmap kb_data on error
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c
> index 2f97723..04d3f3f 100644
> --- a/arch/ppc/platforms/4xx/walnut.c
> +++ b/arch/ppc/platforms/4xx/walnut.c
> @@ -81,22 +81,23 @@ walnut_setup_arch(void)
>  	kb_data = ioremap(WALNUT_PS2_BASE, 8);
>  	if (!kb_data) {
>  		printk(KERN_CRIT
>  		       "walnut_setup_arch() kb_data ioremap failed\n");
>  		return;
>  	}
> 
>  	kb_cs = kb_data + 1;
> 
>  	fpga_status = ioremap(PPC40x_FPGA_BASE, 8);
>  	if (!fpga_status) {
> +		iounmap(kb_data);
>  		printk(KERN_CRIT
>  		       "walnut_setup_arch() fpga_status ioremap failed\n");
>  		return;
>  	}

kb_data and fpga_status aren't iounmapped anywhere at all in this
function.  Care to fix that up in addition to the error case?

> 
>  	fpga_enable = fpga_status + 1;
>  	fpga_polarity = fpga_status + 2;
>  	fpga_trigger = fpga_status + 3;
>  	fpga_brdc = fpga_status + 4;
> 
>  	/* split the keyboard and mouse interrupts */
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: [PATCH] another ioremap/iounmap issue in sycamore_setup_arch(); arch/ppc/platforms/4xx/sycamore.c
From: Josh Boyer @ 2007-11-08 14:08 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linuxppc-dev
In-Reply-To: <473238C2.9050402@tiscali.nl>

On Wed, 07 Nov 2007 23:14:26 +0100
Roel Kluin <12o3l@tiscali.nl> wrote:

> not yet tested
> --
> iounmap kb_data on error
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c
> index 8689f3e..c4ac63d 100644
> --- a/arch/ppc/platforms/4xx/sycamore.c
> +++ b/arch/ppc/platforms/4xx/sycamore.c
> @@ -99,22 +99,23 @@ sycamore_setup_arch(void)
>  	kb_data = ioremap(SYCAMORE_PS2_BASE, 8);
>  	if (!kb_data) {
>  		printk(KERN_CRIT
>  		       "sycamore_setup_arch() kb_data ioremap failed\n");
>  		return;
>  	}
> 
>  	kb_cs = kb_data + 1;
> 
>  	fpga_status = ioremap(PPC40x_FPGA_BASE, 8);
>  	if (!fpga_status) {
> +		iounmap(kb_data);
>  		printk(KERN_CRIT
>  		       "sycamore_setup_arch() fpga_status ioremap failed\n");
>  		return;
>  	}

Same comment as the walnut patch.  You can probably fold these two
patches into one.

josh

^ 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