linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Warp patches for 2.6.26
@ 2008-04-12 17:48 Sean MacLennan
  2008-04-12 18:01 ` [PATCH 1/5] Boot code Sean MacLennan
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-12 17:48 UTC (permalink / raw)
  To: linuxppc-dev

I was going to hold off until the warp was officially released, but we
might miss the merge window. So here they are. A lot of work has been
done since 2.6.25 and I haven't been submitting patches to keep down on
the churn.

We standardized on a 4M NOR flash and a 256M NAND flash. But there is
still support for the original Rev A boards which where 64M NOR and 64M
NAND. You will see fixups for the Rev A. The Rev A is considered
obsolete and the fixups are only there for me to use good ol' Tigger.

ftp://ftp.seanm.ca/stuff/tigger.jpg

Here is the full list of files that need to be patched for a warp,
basically git diff --name-only origin/for-2.6.26:

arch/powerpc/boot/cuboot-warp.c
arch/powerpc/boot/dts/warp.dts
arch/powerpc/configs/warp_defconfig
arch/powerpc/platforms/44x/warp-nand.c
arch/powerpc/platforms/44x/warp.c

drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/ad7414.c

drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-ibm_iic.c

drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/leds-warp.c

drivers/mmc/core/sd.c
drivers/mmc/host/Kconfig
drivers/mmc/host/Makefile
drivers/mmc/host/pikasd.c

drivers/mtd/nand/Kconfig
drivers/mtd/nand/ndfc.c

drivers/net/ibm_newemac/mal.c
drivers/net/ibm_newemac/zmii.c

drivers/scsi/Kconfig

drivers/watchdog/Kconfig
drivers/watchdog/Makefile
drivers/watchdog/pika_wdt.c

include/linux/mmc/host.h
include/linux/pika.h

I will not include patches for all of them since many haven't changed
and/or are waiting for submission to the kernel. So I have broken it up
into five patches.

I will submit any other patches people are interested in.

Cheers,
   Sean

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

* [PATCH 1/5] Boot code
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
@ 2008-04-12 18:01 ` Sean MacLennan
  2008-04-13  0:49   ` Josh Boyer
  2008-04-12 18:03 ` PATCH 2/5] Platform code Sean MacLennan
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 31+ messages in thread
From: Sean MacLennan @ 2008-04-12 18:01 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>

diff --git a/arch/powerpc/boot/cuboot-warp.c
b/arch/powerpc/boot/cuboot-warp.c index eb108a8..43d7ad9 100644
--- a/arch/powerpc/boot/cuboot-warp.c
+++ b/arch/powerpc/boot/cuboot-warp.c
@@ -10,6 +10,7 @@
 #include "ops.h"
 #include "4xx.h"
 #include "cuboot.h"
+#include "stdio.h"
 
 #define TARGET_4xx
 #define TARGET_44x
@@ -17,14 +18,54 @@
 
 static bd_t bd;
 
-static void warp_fixups(void)
+static void warp_fixup_one_nor(u32 from, u32 to)
 {
-	unsigned long sysclk = 66000000;
+	void *devp;
+	char name[40];
+	u32 v[2];
+
+	sprintf(name, "/plb/opb/ebc/nor_flash@0,0/partition@%x", from);
+
+	devp = finddevice(name);
+	if (!devp)
+		return;
+
+	if (getprop(devp, "reg", v, sizeof(v)) == sizeof(v)) {
+		v[0] = to;
+		setprop(devp, "reg", v, sizeof(v));
+
+		printf("NOR 64M fixup %x -> %x\r\n", from, to);
+	}
+}
+
 
-	ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
+static void warp_fixups(void)
+{
+	ibm440ep_fixup_clocks(66000000, 11059200, 50000000);
 	ibm4xx_sdram_fixup_memsize();
 	ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
 	dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
+
+	/* Fixup for 64M flash on Rev A boards. */
+	if (bd.bi_flashsize == 0x4000000) {
+		void *devp;
+		u32 v[3];
+
+		devp = finddevice("/plb/opb/ebc/nor_flash@0,0");
+		if (!devp)
+			return;
+
+		/* Fixup the size */
+		if (getprop(devp, "reg", v, sizeof(v)) == sizeof(v)) {
+			v[2] = bd.bi_flashsize;
+			setprop(devp, "reg", v, sizeof(v));
+		}
+
+		/* Fixup parition offsets */
+		warp_fixup_one_nor(0x300000, 0x3f00000);
+		warp_fixup_one_nor(0x340000, 0x3f40000);
+		warp_fixup_one_nor(0x380000, 0x3f80000);
+	}
 }
 
 
diff --git a/arch/powerpc/boot/dts/warp.dts
b/arch/powerpc/boot/dts/warp.dts index b04a52e..fa070b0 100644
--- a/arch/powerpc/boot/dts/warp.dts
+++ b/arch/powerpc/boot/dts/warp.dts
@@ -132,40 +132,33 @@
 
 				fpga@2,0 {
 					compatible = "pika,fpga";
-			   		reg = <2 0 2200>;
+			   		reg = <2 0 1000>;
 					interrupts = <18 8>;
 					interrupt-parent = <&UIC0>;
 				};
 
+				fpga@2,4000 {
+					compatible = "pika,fpga-sd";
+					reg = <2 4000 A00>;
+				};
+
 				nor_flash@0,0 {
-					compatible = "amd,s29gl512n",
"cfi-flash";
+					compatible = "amd,s29gl032a",
"cfi-flash"; bank-width = <2>;
-					reg = <0 0 4000000>;
+					reg = <0 0 400000>;
 					#address-cells = <1>;
 					#size-cells = <1>;
-					partition@0 {
-						label = "kernel";
-						reg = <0 180000>;
-					};
-					partition@180000 {
-						label = "root";
-						reg = <180000 3480000>;
-					};
-					partition@3600000 {
-						label = "user";
-						reg = <3600000 900000>;
-					};
-					partition@3f00000 {
+					partition@300000 {
 						label = "fpga";
-						reg = <3f00000 40000>;
+						reg = <300000 40000>;
 					};
-					partition@3f40000 {
+					partition@340000 {
 						label = "env";
-						reg = <3f40000 40000>;
+						reg = <340000 40000>;
 					};
-					partition@3f80000 {
+					partition@380000 {
 						label = "u-boot";
-						reg = <3f80000 80000>;
+						reg = <380000 80000>;
 					};
 				};
 			};
@@ -186,6 +179,16 @@
 				reg = <ef600700 14>;
 				interrupt-parent = <&UIC0>;
 				interrupts = <2 4>;
+				index = <0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ad7414@4a {
+					compatible = "adi,ad7414";
+					reg = <4a>;
+					interrupts = <19 8>;
+					interrupt-parent = <&UIC0>;
+				};
 			};
 
 			GPIO0: gpio@ef600b00 {

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

* PATCH 2/5] Platform code
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
  2008-04-12 18:01 ` [PATCH 1/5] Boot code Sean MacLennan
@ 2008-04-12 18:03 ` Sean MacLennan
  2008-04-13  3:15   ` Sean MacLennan
  2008-04-14 16:00   ` David Woodhouse
  2008-04-12 18:09 ` [PATCH 3/5] Defconfig Sean MacLennan
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-12 18:03 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>

diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c
index 9150318..f70019d 100644
--- a/arch/powerpc/platforms/44x/warp-nand.c
+++ b/arch/powerpc/platforms/44x/warp-nand.c
@@ -2,7 +2,7 @@
  * PIKA Warp(tm) NAND flash specific routines
  *
  * Copyright (c) 2008 PIKA Technologies
- *   Sean MacLennan <smaclennan@pikatech.com>
+ *   Sean MacLennan <smaclennan at pikatech.com>
  */
 
 #include <linux/platform_device.h>
@@ -11,8 +11,10 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/ndfc.h>
+#include <linux/of_platform.h>
 #include <asm/machdep.h>
 
+
 #ifdef CONFIG_MTD_NAND_NDFC
 
 #define CS_NAND_0	1	/* use chip select 1 for NAND device 0 */
@@ -35,13 +37,23 @@ static struct mtd_partition nand_parts[] = {
 	{
 		.name   = "root",
 		.offset = 0x0200000,
-		.size   = 0x3400000
+		.size   = 0x3E00000
+	},
+	{
+		.name   = "persistent",
+		.offset = 0x4000000,
+		.size   = 0x4000000
 	},
 	{
-		.name   = "user",
-		.offset = 0x3600000,
-		.size   = 0x0A00000
+		.name   = "persistent1",
+		.offset = 0x8000000,
+		.size   = 0x4000000
 	},
+	{
+		.name   = "persistent2",
+		.offset = 0xC000000,
+		.size   = 0x4000000
+	}
 };
 
 struct ndfc_controller_settings warp_ndfc_settings = {
@@ -67,19 +79,15 @@ static struct platform_device warp_ndfc_device = {
 	.resource = &warp_ndfc,
 };
 
-static struct nand_ecclayout nand_oob_16 = {
-	.eccbytes = 3,
-	.eccpos = { 0, 1, 2, 3, 6, 7 },
-	.oobfree = { {.offset = 8, .length = 16} }
-};
-
+/* Do NOT set the ecclayout: let it default so it is correct for both
+ * 64M and 256M flash chips.
+ */
 static struct platform_nand_chip warp_nand_chip0 = {
 	.nr_chips = 1,
 	.chip_offset = CS_NAND_0,
 	.nr_partitions = ARRAY_SIZE(nand_parts),
 	.partitions = nand_parts,
-	.chip_delay = 50,
-	.ecclayout = &nand_oob_16,
+	.chip_delay = 20,
 	.priv = &warp_chip0_settings,
 };
 
@@ -96,6 +104,23 @@ static struct platform_device warp_nand_device = {
 
 static int warp_setup_nand_flash(void)
 {
+	struct device_node *np;
+
+	/* Try to detect a rev A based on NOR size. */
+	np = of_find_compatible_node(NULL, NULL, "cfi-flash");
+	if (np) {
+		struct property *pp;
+
+		pp = of_find_property(np, "reg", NULL);
+		if (pp && (pp->length == 12)) {
+			u32 *v = pp->value;
+			if (v[2] == 0x4000000)
+				/* Rev A = 64M NAND */
+				warp_nand_chip0.nr_partitions = 2;
+		}
+		of_node_put(np);
+	}
+
 	platform_device_register(&warp_ndfc_device);
 	platform_device_register(&warp_nand_device);
 
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
index 39cf615..6deffad 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -2,7 +2,7 @@
  * PIKA Warp(tm) board specific routines
  *
  * Copyright (c) 2008 PIKA Technologies
- *   Sean MacLennan <smaclennan@pikatech.com>
+ *   Sean MacLennan <smaclennan at pikatech.com>
  *
  * 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
@@ -12,6 +12,9 @@
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/kthread.h>
+#include <linux/i2c.h>
+#include <linux/interrupt.h>
+#include <linux/pika.h>
 
 #include <asm/machdep.h>
 #include <asm/prom.h>
@@ -27,6 +30,18 @@ static __initdata struct of_device_id warp_of_bus[] = {
 	{},
 };
 
+static __initdata struct i2c_board_info warp_i2c_info[] = {
+	{ I2C_BOARD_INFO("ad7414", 0x4a) }
+};
+
+static int __init warp_arch_init(void)
+{
+	/* This should go away once support is moved to the dts. */
+	i2c_register_board_info(0, warp_i2c_info, ARRAY_SIZE(warp_i2c_info));
+	return 0;
+}
+machine_arch_initcall(warp, warp_arch_init);
+
 static int __init warp_device_probe(void)
 {
 	of_platform_bus_probe(NULL, warp_of_bus, NULL);
@@ -52,61 +67,183 @@ define_machine(warp) {
 };
 
 
-#define LED_GREEN (0x80000000 >> 0)
-#define LED_RED   (0x80000000 >> 1)
+/* I am not sure this is the best place for this... */
+static int __init warp_post_info(void)
+{
+	struct device_node *np;
+	void __iomem *fpga;
+	u32 post1, post2;
+
+	/* Sighhhh... POST information is in the sd area. */
+	np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd");
+	if (np == NULL)
+		return -ENOENT;
+
+	fpga = of_iomap(np, 0);
+	of_node_put(np);
+	if (fpga == NULL)
+		return -ENOENT;
+
+	post1 = in_be32(fpga + 0x40);
+	post2 = in_be32(fpga + 0x44);
+
+	iounmap(fpga);
+
+	if (post1 || post2)
+		printk(KERN_INFO "Warp POST %08x %08x\n", post1, post2);
+	else
+		printk(KERN_INFO "Warp POST OK\n");
+
+	return 0;
+}
+machine_late_initcall(warp, warp_post_info);
+
+
+#ifdef CONFIG_SENSORS_AD7414
+
+static LIST_HEAD(dtm_shutdown_list);
+static void __iomem *dtm_fpga;
+
+struct dtm_shutdown {
+	struct list_head list;
+	void (*func)(void *arg);
+	void *arg;
+};
+
+
+int dtm_register_shutdown(void (*func)(void *arg), void *arg)
+{
+	struct dtm_shutdown *shutdown;
+
+	shutdown = kmalloc(sizeof(struct dtm_shutdown), GFP_KERNEL);
+	if (shutdown == NULL)
+		return -ENOMEM;
+
+	shutdown->func = func;
+	shutdown->arg = arg;
 
+	list_add(&shutdown->list, &dtm_shutdown_list);
+
+	return 0;
+}
+EXPORT_SYMBOL(dtm_register_shutdown);
 
-/* This is for the power LEDs 1 = on, 0 = off, -1 = leave alone */
-void warp_set_power_leds(int green, int red)
+int dtm_unregister_shutdown(void (*func)(void *arg), void *arg)
 {
-	static void __iomem *gpio_base = NULL;
-	unsigned leds;
-
-	if (gpio_base == NULL) {
-		struct device_node *np;
-
-		/* Power LEDS are on the second GPIO controller */
-		np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
-		if (np)
-			np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP");
-		if (np == NULL) {
-			printk(KERN_ERR __FILE__ ": Unable to find gpio\n");
-			return;
-		}
+	struct dtm_shutdown *shutdown;
 
-		gpio_base = of_iomap(np, 0);
-		of_node_put(np);
-		if (gpio_base == NULL) {
-			printk(KERN_ERR __FILE__ ": Unable to map gpio");
-			return;
+	list_for_each_entry(shutdown, &dtm_shutdown_list, list)
+		if (shutdown->func == func && shutdown->arg == arg) {
+			list_del(&shutdown->list);
+			kfree(shutdown);
+			return 0;
 		}
+
+	return -EINVAL;
+}
+EXPORT_SYMBOL(dtm_unregister_shutdown);
+
+static long wdt_keepalive(long time)
+{
+	if (dtm_fpga) {
+		unsigned reset = in_be32(dtm_fpga + 0x14);
+		out_be32(dtm_fpga + 0x14, reset);
 	}
 
-	leds = in_be32(gpio_base);
+	return 0;
+}
+
+static irqreturn_t temp_isr(int irq, void *context)
+{
+	struct dtm_shutdown *shutdown;
+
+	/* Run through the shutdown list. */
+	list_for_each_entry(shutdown, &dtm_shutdown_list, list)
+		shutdown->func(shutdown->arg);
+
+	panic_timeout = 1800;
+	panic_blink = wdt_keepalive;
+	panic("Critical Temperature Shutdown");
+	return IRQ_HANDLED;
+}
+
+static void pika_setup_critical_temp(struct i2c_client *client)
+{
+	struct device_node *np;
+	int irq, rc;
+
+	/* These registers are in 1 degree increments. */
+	i2c_smbus_write_byte_data(client, 2, 55); /* Thigh */
+	i2c_smbus_write_byte_data(client, 3, 50); /* Tlow */
 
-	switch (green) {
-	case 0: leds &= ~LED_GREEN; break;
-	case 1: leds |=  LED_GREEN; break;
+	np = of_find_compatible_node(NULL, NULL, "adi,ad7414");
+	if (np == NULL) {
+		printk(KERN_ERR __FILE__ ": Unable to find ad7414\n");
+		return;
 	}
-	switch (red) {
-	case 0: leds &= ~LED_RED; break;
-	case 1: leds |=  LED_RED; break;
+
+	irq = irq_of_parse_and_map(np, 0);
+	of_node_put(np);
+	if (irq  == NO_IRQ) {
+		printk(KERN_ERR __FILE__ ": Unable to get ad7414 irq\n");
+		return;
 	}
 
-	out_be32(gpio_base, leds);
+	rc = request_irq(irq, temp_isr, 0, "ad7414", NULL);
+	if (rc) {
+		printk(KERN_ERR __FILE__
+		       ": Unable to request ad7414 irq %d = %d\n", irq, rc);
+		return;
+	}
 }
-EXPORT_SYMBOL(warp_set_power_leds);
 
+static inline void pika_dtm_check_fan(void __iomem *fpga)
+{
+	static int fan_state;
+	u32 fan = in_be32(fpga + 0x34) & (1 << 14);
+
+	if (fan_state != fan) {
+		fan_state = fan;
+		if (fan)
+			printk(KERN_WARNING "Fan rotation error detected."
+				   " Please check hardware.\n");
+	}
+}
 
-#ifdef CONFIG_SENSORS_AD7414
 static int pika_dtm_thread(void __iomem *fpga)
 {
-	extern int ad7414_get_temp(int index);
+	struct i2c_adapter *adap;
+	struct i2c_client *client;
+
+	/* We loop in case either driver was compiled as a module and
+	 * has not been insmoded yet.
+	 */
+	while (!(adap = i2c_get_adapter(0))) {
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(HZ);
+	}
+
+	while (1) {
+		list_for_each_entry(client, &adap->clients, list)
+			if (client->addr == 0x4a)
+				goto found_it;
+
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(HZ);
+	}
+
+found_it:
+	i2c_put_adapter(adap);
+
+	pika_setup_critical_temp(client);
+
+	printk(KERN_INFO "PIKA DTM thread running.\n");
 
 	while (!kthread_should_stop()) {
-		int temp = ad7414_get_temp(0);
+		u16 temp = swab16(i2c_smbus_read_word_data(client, 0));
+		out_be32(fpga + 0x20, temp);
 
-		out_be32(fpga, temp);
+		pika_dtm_check_fan(fpga);
 
 		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(HZ);
@@ -115,37 +252,28 @@ static int pika_dtm_thread(void __iomem *fpga)
 	return 0;
 }
 
+
 static int __init pika_dtm_start(void)
 {
 	struct task_struct *dtm_thread;
 	struct device_node *np;
-	struct resource res;
-	void __iomem *fpga;
 
 	np = of_find_compatible_node(NULL, NULL, "pika,fpga");
 	if (np == NULL)
 		return -ENOENT;
 
-	/* We do not call of_iomap here since it would map in the entire
-	 * fpga space, which is over 8k.
-	 */
-	if (of_address_to_resource(np, 0, &res)) {
-		of_node_put(np);
-		return -ENOENT;
-	}
+	dtm_fpga = of_iomap(np, 0);
 	of_node_put(np);
-
-	fpga = ioremap(res.start, 0x24);
-	if (fpga == NULL)
+	if (dtm_fpga == NULL)
 		return -ENOENT;
 
-	dtm_thread = kthread_run(pika_dtm_thread, fpga + 0x20, "pika-dtm");
+	dtm_thread = kthread_run(pika_dtm_thread, dtm_fpga, "pika-dtm");
 	if (IS_ERR(dtm_thread)) {
-		iounmap(fpga);
+		iounmap(dtm_fpga);
 		return PTR_ERR(dtm_thread);
 	}
 
 	return 0;
 }
-device_initcall(pika_dtm_start);
+machine_late_initcall(warp, pika_dtm_start);
 #endif

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

* [PATCH 3/5] Defconfig
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
  2008-04-12 18:01 ` [PATCH 1/5] Boot code Sean MacLennan
  2008-04-12 18:03 ` PATCH 2/5] Platform code Sean MacLennan
@ 2008-04-12 18:09 ` Sean MacLennan
  2008-04-12 18:10 ` [PATCH 4/5] LED driver Sean MacLennan
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-12 18:09 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>

diff --git a/arch/powerpc/configs/warp_defconfig b/arch/powerpc/configs/warp_defconfig
index 2313c3e..91b9fb1 100644
--- a/arch/powerpc/configs/warp_defconfig
+++ b/arch/powerpc/configs/warp_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25-rc2
-# Fri Feb 15 21:54:43 2008
+# Linux kernel version: 2.6.25-rc6
+# Tue Apr  8 02:27:53 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -79,6 +79,7 @@ CONFIG_FAIR_GROUP_SCHED=y
 CONFIG_USER_SCHED=y
 # CONFIG_CGROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_RELAY is not set
 # CONFIG_NAMESPACES is not set
 CONFIG_BLK_DEV_INITRD=y
@@ -112,6 +113,7 @@ CONFIG_SLAB=y
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
 CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -142,7 +144,6 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
-# CONFIG_PREEMPT_RCU is not set
 
 #
 # Platform support
@@ -159,6 +160,8 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_KATMAI is not set
 # CONFIG_RAINIER is not set
 CONFIG_WARP=y
+# CONFIG_CANYONLANDS is not set
+# CONFIG_YOSEMITE is not set
 CONFIG_440EP=y
 CONFIG_IBM440EP_ERR42=y
 # CONFIG_IPIC is not set
@@ -191,7 +194,6 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
-CONFIG_RCU_TRACE=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_MATH_EMULATION is not set
@@ -224,6 +226,7 @@ CONFIG_ISA_DMA_API=y
 # Bus options
 #
 CONFIG_ZONE_DMA=y
+CONFIG_4xx_SOC=y
 # CONFIG_PCI is not set
 # CONFIG_PCI_DOMAINS is not set
 # CONFIG_PCI_SYSCALL is not set
@@ -380,7 +383,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
 # CONFIG_SSFDC is not set
-CONFIG_MTD_OOPS=m
+# CONFIG_MTD_OOPS is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -434,6 +437,7 @@ CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC_SMC=y
 # CONFIG_MTD_NAND_MUSEUM_IDS is not set
 CONFIG_MTD_NAND_IDS=y
+CONFIG_MTD_NAND_NDFC=y
 # CONFIG_MTD_NAND_DISKONCHIP is not set
 # CONFIG_MTD_NAND_NANDSIM is not set
 # CONFIG_MTD_NAND_PLATFORM is not set
@@ -493,7 +497,7 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 # CONFIG_SCSI_SCAN_ASYNC is not set
-CONFIG_SCSI_WAIT_SCAN=m
+# CONFIG_SCSI_WAIT_SCAN is not set
 
 #
 # SCSI Transports
@@ -617,6 +621,7 @@ CONFIG_I2C_BOARDINFO=y
 #
 # I2C Hardware Bus support
 #
+CONFIG_I2C_IBM_IIC=y
 # CONFIG_I2C_MPC is not set
 # CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
@@ -650,6 +655,7 @@ CONFIG_SENSORS_EEPROM=y
 # CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+CONFIG_SENSORS_AD7414=y
 # CONFIG_SENSORS_AD7418 is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
@@ -658,6 +664,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ADM9240 is not set
 # CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_F71805F is not set
@@ -698,7 +705,20 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 CONFIG_THERMAL=y
-# CONFIG_WATCHDOG is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_BOOKE_WDT is not set
+CONFIG_PIKA_WDT=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
 
 #
 # Sonics Silicon Backplane
@@ -826,14 +846,14 @@ CONFIG_USB_MON=y
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_GADGET is not set
-CONFIG_MMC=m
+CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
 # MMC/SD Card Drivers
 #
-CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK=y
 CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_SDIO_UART is not set
 
@@ -841,10 +861,23 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 # MMC/SD Host Controller Drivers
 #
 # CONFIG_MMC_WBSD is not set
+CONFIG_MMC_PIKASD=y
 # CONFIG_MEMSTICK is not set
-# CONFIG_NEW_LEDS is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_WARP=y
+
+#
+# LED Triggers
+#
+# CONFIG_LEDS_TRIGGERS is not set
 # CONFIG_EDAC is not set
 # CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
 
 #
 # Userspace I/O
@@ -896,7 +929,8 @@ CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-# CONFIG_TMPFS is not set
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 # CONFIG_CONFIGFS_FS is not set
 
@@ -1013,6 +1047,7 @@ CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+CONFIG_HAVE_LMB=y
 
 #
 # Kernel hacking
@@ -1022,7 +1057,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_FS=y
+# CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
@@ -1052,7 +1087,6 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUGGER is not set
-# CONFIG_VIRQ_DEBUG is not set
 CONFIG_BDI_SWITCH=y
 # CONFIG_PPC_EARLY_DEBUG is not set
 

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

* [PATCH 4/5] LED driver
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
                   ` (2 preceding siblings ...)
  2008-04-12 18:09 ` [PATCH 3/5] Defconfig Sean MacLennan
@ 2008-04-12 18:10 ` Sean MacLennan
  2008-04-13  0:41   ` Josh Boyer
  2008-04-13 12:28   ` Peter Korsgaard
  2008-04-12 18:11 ` [PATCH 5/5] WDT driver Sean MacLennan
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-12 18:10 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 859814f..31e1746 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -145,6 +145,12 @@ config LEDS_CLEVO_MAIL
 	  To compile this driver as a module, choose M here: the
 	  module will be called leds-clevo-mail.
 
+config LEDS_WARP
+	tristate "LED Support for the PIKA Warp LEDs"
+	depends on LEDS_CLASS && WARP
+	help
+	  This option enables support for the PIKA Warp LEDs.
+
 comment "LED Triggers"
 
 config LEDS_TRIGGERS
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index 84ced3b..eb60fb1 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_LEDS_GPIO)			+= leds-gpio.o
 obj-$(CONFIG_LEDS_CM_X270)              += leds-cm-x270.o
 obj-$(CONFIG_LEDS_CLEVO_MAIL)		+= leds-clevo-mail.o
 obj-$(CONFIG_LEDS_HP6XX)		+= leds-hp6xx.o
+obj-$(CONFIG_LEDS_WARP)			+= leds-warp.o
 
 # LED Triggers
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)	+= ledtrig-timer.o
diff --git a/drivers/leds/leds-warp.c b/drivers/leds/leds-warp.c
new file mode 100644
index 0000000..0fbe0b7
--- /dev/null
+++ b/drivers/leds/leds-warp.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2008 PIKA Technologies
+ *   Sean MacLennan <smaclennan at pikatech.com>
+ *
+ * This is just a temporary driver until the GPIO/GPIO_OF_LEDS drivers
+ * get sorted out.
+ */
+#include <linux/module.h>
+#include <linux/leds.h>
+#include <linux/of_platform.h>
+#include <asm/machdep.h>
+
+
+#define LED_GREEN (0x80000000 >> 0)
+#define LED_RED   (0x80000000 >> 1)
+
+static void __iomem *gpio_base;
+
+
+static void warp_green_set(struct led_classdev *led_cdev,
+			   enum led_brightness brightness)
+{
+	unsigned leds = in_be32(gpio_base);
+
+	if (brightness)
+		leds |=  LED_GREEN;
+	else
+		leds &= ~LED_GREEN;
+
+	out_be32(gpio_base, leds);
+}
+
+static void warp_red_set(struct led_classdev *led_cdev,
+			 enum led_brightness brightness)
+{
+	unsigned leds = in_be32(gpio_base);
+
+	if (brightness)
+		leds |=  LED_RED;
+	else
+		leds &= ~LED_RED;
+
+	out_be32(gpio_base, leds);
+}
+
+static struct led_classdev warp_green_led = {
+	.name = "warp-green",
+	.brightness_set = warp_green_set,
+};
+
+static struct led_classdev warp_red_led = {
+	.name = "warp-red",
+	.brightness_set = warp_red_set,
+};
+
+static int __devinit warp_led_probe(struct platform_device *pdev)
+{
+	struct device_node *np;
+	int rc;
+
+	/* Power LEDS are on the second GPIO controller */
+	np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
+	if (np)
+		np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP");
+	if (np == NULL) {
+		printk(KERN_ERR __FILE__ ": Unable to find gpio\n");
+		return -ENOENT;
+	}
+
+	gpio_base = of_iomap(np, 0);
+	of_node_put(np);
+	if (gpio_base == NULL) {
+		printk(KERN_ERR __FILE__ ": Unable to map gpio");
+		return -ENOMEM;
+	}
+
+	rc = led_classdev_register(&pdev->dev, &warp_green_led);
+	if (rc) {
+		iounmap(gpio_base);
+		return rc;
+	}
+
+	rc = led_classdev_register(&pdev->dev, &warp_red_led);
+	if (rc) {
+		led_classdev_unregister(&warp_green_led);
+		iounmap(gpio_base);
+		return rc;
+	}
+
+	return 0;
+}
+
+static int __devexit warp_led_remove(struct platform_device *pdev)
+{
+	led_classdev_unregister(&warp_green_led);
+	led_classdev_unregister(&warp_red_led);
+
+	iounmap(gpio_base);
+
+	return 0;
+}
+
+/* We *must* have a release. */
+static void warp_led_release(struct device *dev) {}
+
+static struct platform_driver warp_led_driver = {
+	.probe	 = warp_led_probe,
+	.remove	 = __devexit_p(warp_led_remove),
+	.driver	 = {
+		.name	= "warp-led",
+	},
+};
+
+static struct platform_device warp_led_device = {
+	.name   = "warp-led",
+	.id     = 0,
+	.dev = {
+		.release = warp_led_release,
+	},
+};
+
+static int __init warp_led_init(void)
+{
+	int rc;
+
+	rc = platform_device_register(&warp_led_device);
+	if (rc)
+		return rc;
+	rc = platform_driver_register(&warp_led_driver);
+	if (rc) {
+		platform_device_unregister(&warp_led_device);
+		return rc;
+	}
+
+	return 0;
+}
+
+static void __exit warp_led_exit(void)
+{
+	platform_driver_unregister(&warp_led_driver);
+	platform_device_unregister(&warp_led_device);
+}
+
+module_init(warp_led_init);
+module_exit(warp_led_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Sean MacLennan <smaclennan@pikatech.com>");

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

* [PATCH 5/5] WDT driver
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
                   ` (3 preceding siblings ...)
  2008-04-12 18:10 ` [PATCH 4/5] LED driver Sean MacLennan
@ 2008-04-12 18:11 ` Sean MacLennan
  2008-04-13  0:40   ` Josh Boyer
  2008-04-14  8:33   ` Laurent Pinchart
  2008-04-13  0:44 ` Warp patches for 2.6.26 Stephen Rothwell
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-12 18:11 UTC (permalink / raw)
  To: linuxppc-dev

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 254d115..e73a3ea 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -697,6 +697,14 @@ config BOOKE_WDT
 	  Please see Documentation/watchdog/watchdog-api.txt for
 	  more information.
 
+config PIKA_WDT
+	tristate "PIKA FPGA Watchdog"
+	depends on WARP
+	default y
+	help
+	 This enables the watchdog in the PIKA FPGA. Currently used on
+	 the Warp platform.
+
 # PPC64 Architecture
 
 config WATCHDOG_RTAS
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index f3fb170..09758c5 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -105,6 +105,7 @@ obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o
 obj-$(CONFIG_83xx_WDT) += mpc83xx_wdt.o
 obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o
 obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o
+obj-$(CONFIG_PIKA_WDT) += pika_wdt.o
 
 # PPC64 Architecture
 obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
new file mode 100644
index 0000000..b84ac07
--- /dev/null
+++ b/drivers/watchdog/pika_wdt.c
@@ -0,0 +1,113 @@
+/*
+ * PIKA FPGA based Watchdog Timer
+ *
+ * Copyright (c) 2008 PIKA Technologies
+ *   Sean MacLennan <smaclennan at pikatech.com>
+ */
+
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/miscdevice.h>
+#include <linux/reboot.h>
+#include <linux/uaccess.h>
+#include <linux/io.h>
+#include <linux/of_platform.h>
+#include <linux/watchdog.h>
+
+
+static void __iomem *pikawdt_fpga;
+
+
+static inline void pikawdt_ping(void)
+{
+	unsigned reset = in_be32(pikawdt_fpga + 0x14);
+	reset |= 0xf80; /* enable with max timeout - 15 seconds */
+	out_be32(pikawdt_fpga + 0x14, reset);
+}
+
+static int pikawdt_open(struct inode *inode, struct file *file)
+{
+	printk(KERN_INFO "PIKA WDT started...\n");
+
+	pikawdt_ping();
+
+	return 0;
+}
+
+static int pikawdt_release(struct inode *inode, struct file *file)
+{
+	pikawdt_ping(); /* one last time */
+	return 0;
+}
+
+static ssize_t pikawdt_write(struct file *file, const char __user *buf,
+			     size_t count, loff_t *ppos)
+{
+	pikawdt_ping();
+	return count;
+}
+
+/* We support the bare minimum to be conformant. */
+static int pikawdt_ioctl(struct inode *inode, struct file *file,
+			 unsigned int cmd, unsigned long arg)
+{
+	if (cmd == WDIOC_KEEPALIVE) {
+		pikawdt_ping();
+		return 0;
+	} else
+		return -EINVAL;
+}
+
+static const struct file_operations pikawdt_fops = {
+	.owner		= THIS_MODULE,
+	.open		= pikawdt_open,
+	.release	= pikawdt_release,
+	.write		= pikawdt_write,
+	.ioctl		= pikawdt_ioctl,
+};
+
+static struct miscdevice pikawdt_miscdev = {
+	.minor	= WATCHDOG_MINOR,
+	.name	= "watchdog",
+	.fops	= &pikawdt_fops,
+};
+
+static int __init pikawdt_init(void)
+{
+	struct device_node *np;
+	int ret;
+
+	np = of_find_compatible_node(NULL, NULL, "pika,fpga");
+	if (np == NULL) {
+		printk(KERN_ERR "pikawdt: Unable to find fpga.\n");
+		return -ENOENT;
+	}
+
+	pikawdt_fpga = of_iomap(np, 0);
+
+	of_node_put(np);
+
+	if (pikawdt_fpga == NULL) {
+		printk(KERN_ERR "pikawdt: Unable to map fpga.\n");
+		return -ENOENT;
+	}
+
+	ret = misc_register(&pikawdt_miscdev);
+	if (ret) {
+		iounmap(pikawdt_fpga);
+		printk(KERN_ERR "pikawdt: Unable to register miscdev.\n");
+		return ret;
+	}
+
+	return 0;
+}
+module_init(pikawdt_init);
+
+
+static void __exit pikawdt_exit(void)
+{
+	misc_deregister(&pikawdt_miscdev);
+
+	iounmap(pikawdt_fpga);
+}
+module_exit(pikawdt_exit);

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

* Re: [PATCH 5/5] WDT driver
  2008-04-12 18:11 ` [PATCH 5/5] WDT driver Sean MacLennan
@ 2008-04-13  0:40   ` Josh Boyer
  2008-04-14  8:33   ` Laurent Pinchart
  1 sibling, 0 replies; 31+ messages in thread
From: Josh Boyer @ 2008-04-13  0:40 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Sat, 2008-04-12 at 14:11 -0400, Sean MacLennan wrote:
> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>

This should be sent to Wim as he maintains the watchdog drivers tree.

josh
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 254d115..e73a3ea 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -697,6 +697,14 @@ config BOOKE_WDT
>  	  Please see Documentation/watchdog/watchdog-api.txt for
>  	  more information.
>  
> +config PIKA_WDT
> +	tristate "PIKA FPGA Watchdog"
> +	depends on WARP
> +	default y
> +	help
> +	 This enables the watchdog in the PIKA FPGA. Currently used on
> +	 the Warp platform.
> +
>  # PPC64 Architecture
>  
>  config WATCHDOG_RTAS
> diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
> index f3fb170..09758c5 100644
> --- a/drivers/watchdog/Makefile
> +++ b/drivers/watchdog/Makefile
> @@ -105,6 +105,7 @@ obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o
>  obj-$(CONFIG_83xx_WDT) += mpc83xx_wdt.o
>  obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o
>  obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o
> +obj-$(CONFIG_PIKA_WDT) += pika_wdt.o
>  
>  # PPC64 Architecture
>  obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o
> diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
> new file mode 100644
> index 0000000..b84ac07
> --- /dev/null
> +++ b/drivers/watchdog/pika_wdt.c
> @@ -0,0 +1,113 @@
> +/*
> + * PIKA FPGA based Watchdog Timer
> + *
> + * Copyright (c) 2008 PIKA Technologies
> + *   Sean MacLennan <smaclennan at pikatech.com>
> + */
> +
> +#include <linux/module.h>
> +#include <linux/fs.h>
> +#include <linux/miscdevice.h>
> +#include <linux/reboot.h>
> +#include <linux/uaccess.h>
> +#include <linux/io.h>
> +#include <linux/of_platform.h>
> +#include <linux/watchdog.h>
> +
> +
> +static void __iomem *pikawdt_fpga;
> +
> +
> +static inline void pikawdt_ping(void)
> +{
> +	unsigned reset = in_be32(pikawdt_fpga + 0x14);
> +	reset |= 0xf80; /* enable with max timeout - 15 seconds */
> +	out_be32(pikawdt_fpga + 0x14, reset);
> +}
> +
> +static int pikawdt_open(struct inode *inode, struct file *file)
> +{
> +	printk(KERN_INFO "PIKA WDT started...\n");
> +
> +	pikawdt_ping();
> +
> +	return 0;
> +}
> +
> +static int pikawdt_release(struct inode *inode, struct file *file)
> +{
> +	pikawdt_ping(); /* one last time */
> +	return 0;
> +}
> +
> +static ssize_t pikawdt_write(struct file *file, const char __user *buf,
> +			     size_t count, loff_t *ppos)
> +{
> +	pikawdt_ping();
> +	return count;
> +}
> +
> +/* We support the bare minimum to be conformant. */
> +static int pikawdt_ioctl(struct inode *inode, struct file *file,
> +			 unsigned int cmd, unsigned long arg)
> +{
> +	if (cmd == WDIOC_KEEPALIVE) {
> +		pikawdt_ping();
> +		return 0;
> +	} else
> +		return -EINVAL;
> +}
> +
> +static const struct file_operations pikawdt_fops = {
> +	.owner		= THIS_MODULE,
> +	.open		= pikawdt_open,
> +	.release	= pikawdt_release,
> +	.write		= pikawdt_write,
> +	.ioctl		= pikawdt_ioctl,
> +};
> +
> +static struct miscdevice pikawdt_miscdev = {
> +	.minor	= WATCHDOG_MINOR,
> +	.name	= "watchdog",
> +	.fops	= &pikawdt_fops,
> +};
> +
> +static int __init pikawdt_init(void)
> +{
> +	struct device_node *np;
> +	int ret;
> +
> +	np = of_find_compatible_node(NULL, NULL, "pika,fpga");
> +	if (np == NULL) {
> +		printk(KERN_ERR "pikawdt: Unable to find fpga.\n");
> +		return -ENOENT;
> +	}
> +
> +	pikawdt_fpga = of_iomap(np, 0);
> +
> +	of_node_put(np);
> +
> +	if (pikawdt_fpga == NULL) {
> +		printk(KERN_ERR "pikawdt: Unable to map fpga.\n");
> +		return -ENOENT;
> +	}
> +
> +	ret = misc_register(&pikawdt_miscdev);
> +	if (ret) {
> +		iounmap(pikawdt_fpga);
> +		printk(KERN_ERR "pikawdt: Unable to register miscdev.\n");
> +		return ret;
> +	}
> +
> +	return 0;
> +}
> +module_init(pikawdt_init);
> +
> +
> +static void __exit pikawdt_exit(void)
> +{
> +	misc_deregister(&pikawdt_miscdev);
> +
> +	iounmap(pikawdt_fpga);
> +}
> +module_exit(pikawdt_exit);
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

* Re: [PATCH 4/5] LED driver
  2008-04-12 18:10 ` [PATCH 4/5] LED driver Sean MacLennan
@ 2008-04-13  0:41   ` Josh Boyer
  2008-04-17 17:32     ` Sean MacLennan
  2008-04-13 12:28   ` Peter Korsgaard
  1 sibling, 1 reply; 31+ messages in thread
From: Josh Boyer @ 2008-04-13  0:41 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Sat, 2008-04-12 at 14:10 -0400, Sean MacLennan wrote:
> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>

This should be sent to Richard Purdie.

josh
> 
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 859814f..31e1746 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -145,6 +145,12 @@ config LEDS_CLEVO_MAIL
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called leds-clevo-mail.
>  
> +config LEDS_WARP
> +	tristate "LED Support for the PIKA Warp LEDs"
> +	depends on LEDS_CLASS && WARP
> +	help
> +	  This option enables support for the PIKA Warp LEDs.
> +
>  comment "LED Triggers"
>  
>  config LEDS_TRIGGERS
> diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
> index 84ced3b..eb60fb1 100644
> --- a/drivers/leds/Makefile
> +++ b/drivers/leds/Makefile
> @@ -21,6 +21,7 @@ obj-$(CONFIG_LEDS_GPIO)			+= leds-gpio.o
>  obj-$(CONFIG_LEDS_CM_X270)              += leds-cm-x270.o
>  obj-$(CONFIG_LEDS_CLEVO_MAIL)		+= leds-clevo-mail.o
>  obj-$(CONFIG_LEDS_HP6XX)		+= leds-hp6xx.o
> +obj-$(CONFIG_LEDS_WARP)			+= leds-warp.o
>  
>  # LED Triggers
>  obj-$(CONFIG_LEDS_TRIGGER_TIMER)	+= ledtrig-timer.o
> diff --git a/drivers/leds/leds-warp.c b/drivers/leds/leds-warp.c
> new file mode 100644
> index 0000000..0fbe0b7
> --- /dev/null
> +++ b/drivers/leds/leds-warp.c
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright (c) 2008 PIKA Technologies
> + *   Sean MacLennan <smaclennan at pikatech.com>
> + *
> + * This is just a temporary driver until the GPIO/GPIO_OF_LEDS drivers
> + * get sorted out.
> + */
> +#include <linux/module.h>
> +#include <linux/leds.h>
> +#include <linux/of_platform.h>
> +#include <asm/machdep.h>
> +
> +
> +#define LED_GREEN (0x80000000 >> 0)
> +#define LED_RED   (0x80000000 >> 1)
> +
> +static void __iomem *gpio_base;
> +
> +
> +static void warp_green_set(struct led_classdev *led_cdev,
> +			   enum led_brightness brightness)
> +{
> +	unsigned leds = in_be32(gpio_base);
> +
> +	if (brightness)
> +		leds |=  LED_GREEN;
> +	else
> +		leds &= ~LED_GREEN;
> +
> +	out_be32(gpio_base, leds);
> +}
> +
> +static void warp_red_set(struct led_classdev *led_cdev,
> +			 enum led_brightness brightness)
> +{
> +	unsigned leds = in_be32(gpio_base);
> +
> +	if (brightness)
> +		leds |=  LED_RED;
> +	else
> +		leds &= ~LED_RED;
> +
> +	out_be32(gpio_base, leds);
> +}
> +
> +static struct led_classdev warp_green_led = {
> +	.name = "warp-green",
> +	.brightness_set = warp_green_set,
> +};
> +
> +static struct led_classdev warp_red_led = {
> +	.name = "warp-red",
> +	.brightness_set = warp_red_set,
> +};
> +
> +static int __devinit warp_led_probe(struct platform_device *pdev)
> +{
> +	struct device_node *np;
> +	int rc;
> +
> +	/* Power LEDS are on the second GPIO controller */
> +	np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
> +	if (np)
> +		np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP");
> +	if (np == NULL) {
> +		printk(KERN_ERR __FILE__ ": Unable to find gpio\n");
> +		return -ENOENT;
> +	}
> +
> +	gpio_base = of_iomap(np, 0);
> +	of_node_put(np);
> +	if (gpio_base == NULL) {
> +		printk(KERN_ERR __FILE__ ": Unable to map gpio");
> +		return -ENOMEM;
> +	}
> +
> +	rc = led_classdev_register(&pdev->dev, &warp_green_led);
> +	if (rc) {
> +		iounmap(gpio_base);
> +		return rc;
> +	}
> +
> +	rc = led_classdev_register(&pdev->dev, &warp_red_led);
> +	if (rc) {
> +		led_classdev_unregister(&warp_green_led);
> +		iounmap(gpio_base);
> +		return rc;
> +	}
> +
> +	return 0;
> +}
> +
> +static int __devexit warp_led_remove(struct platform_device *pdev)
> +{
> +	led_classdev_unregister(&warp_green_led);
> +	led_classdev_unregister(&warp_red_led);
> +
> +	iounmap(gpio_base);
> +
> +	return 0;
> +}
> +
> +/* We *must* have a release. */
> +static void warp_led_release(struct device *dev) {}
> +
> +static struct platform_driver warp_led_driver = {
> +	.probe	 = warp_led_probe,
> +	.remove	 = __devexit_p(warp_led_remove),
> +	.driver	 = {
> +		.name	= "warp-led",
> +	},
> +};
> +
> +static struct platform_device warp_led_device = {
> +	.name   = "warp-led",
> +	.id     = 0,
> +	.dev = {
> +		.release = warp_led_release,
> +	},
> +};
> +
> +static int __init warp_led_init(void)
> +{
> +	int rc;
> +
> +	rc = platform_device_register(&warp_led_device);
> +	if (rc)
> +		return rc;
> +	rc = platform_driver_register(&warp_led_driver);
> +	if (rc) {
> +		platform_device_unregister(&warp_led_device);
> +		return rc;
> +	}
> +
> +	return 0;
> +}
> +
> +static void __exit warp_led_exit(void)
> +{
> +	platform_driver_unregister(&warp_led_driver);
> +	platform_device_unregister(&warp_led_device);
> +}
> +
> +module_init(warp_led_init);
> +module_exit(warp_led_exit);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Sean MacLennan <smaclennan@pikatech.com>");
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

* Re: Warp patches for 2.6.26
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
                   ` (4 preceding siblings ...)
  2008-04-12 18:11 ` [PATCH 5/5] WDT driver Sean MacLennan
@ 2008-04-13  0:44 ` Stephen Rothwell
  2008-04-13  0:50   ` Josh Boyer
  2008-04-13  1:55   ` Sean MacLennan
  2008-04-13  1:11 ` Paul Mackerras
  2008-04-13  2:24 ` Josh Boyer
  7 siblings, 2 replies; 31+ messages in thread
From: Stephen Rothwell @ 2008-04-13  0:44 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

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

Hi Sean,

First comment is that you need reasonable changelogs i.e. explain why you
are making changes as well as what they do.  Also the first line of each
changelog (which becomes the subject of any mail generated from git)
should be a useful and relatively unique summary.

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

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

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

* Re: [PATCH 1/5] Boot code
  2008-04-12 18:01 ` [PATCH 1/5] Boot code Sean MacLennan
@ 2008-04-13  0:49   ` Josh Boyer
  2008-04-13  2:06     ` Sean MacLennan
  0 siblings, 1 reply; 31+ messages in thread
From: Josh Boyer @ 2008-04-13  0:49 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Sat, 2008-04-12 at 14:01 -0400, Sean MacLennan wrote:
> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
> 

This patch is word wrapped.


> diff --git a/arch/powerpc/boot/cuboot-warp.c
> b/arch/powerpc/boot/cuboot-warp.c index eb108a8..43d7ad9 100644
> --- a/arch/powerpc/boot/cuboot-warp.c
> +++ b/arch/powerpc/boot/cuboot-warp.c
> @@ -10,6 +10,7 @@
>  #include "ops.h"
>  #include "4xx.h"
>  #include "cuboot.h"
> +#include "stdio.h"
>  
>  #define TARGET_4xx
>  #define TARGET_44x
> @@ -17,14 +18,54 @@
>  
>  static bd_t bd;
>  
> -static void warp_fixups(void)
> +static void warp_fixup_one_nor(u32 from, u32 to)
>  {
> -	unsigned long sysclk = 66000000;
> +	void *devp;
> +	char name[40];
> +	u32 v[2];
> +
> +	sprintf(name, "/plb/opb/ebc/nor_flash@0,0/partition@%x", from);

Unless I can't count (which could very well be the case), you have a
buffer overflow here.  The fixed string is 37 characters, and the values
you are passing in for "from" will extend the string past the 40 bytes
you have allocated for "name".

josh

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

* Re: Warp patches for 2.6.26
  2008-04-13  0:44 ` Warp patches for 2.6.26 Stephen Rothwell
@ 2008-04-13  0:50   ` Josh Boyer
  2008-04-13  1:55   ` Sean MacLennan
  1 sibling, 0 replies; 31+ messages in thread
From: Josh Boyer @ 2008-04-13  0:50 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Sean MacLennan, linuxppc-dev

On Sun, 2008-04-13 at 10:44 +1000, Stephen Rothwell wrote:
> Hi Sean,
> 
> First comment is that you need reasonable changelogs i.e. explain why you
> are making changes as well as what they do.  Also the first line of each
> changelog (which becomes the subject of any mail generated from git)
> should be a useful and relatively unique summary.

Yes, what Stephen said.

josh

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

* Re: Warp patches for 2.6.26
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
                   ` (5 preceding siblings ...)
  2008-04-13  0:44 ` Warp patches for 2.6.26 Stephen Rothwell
@ 2008-04-13  1:11 ` Paul Mackerras
  2008-04-13  2:24 ` Josh Boyer
  7 siblings, 0 replies; 31+ messages in thread
From: Paul Mackerras @ 2008-04-13  1:11 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

Sean MacLennan writes:

> I was going to hold off until the warp was officially released, but we
> might miss the merge window. So here they are. A lot of work has been
> done since 2.6.25 and I haven't been submitting patches to keep down on
> the churn.

<cracked record>
Your patches don't have any description at all.  If they are to go in
they need a decent description of what they do and why they do it they
way they do.  Putting stuff in a patch 0/5 doesn't really help since
that doesn't go into the git repository.
</cracked record>

Paul.

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

* Re: Warp patches for 2.6.26
  2008-04-13  0:44 ` Warp patches for 2.6.26 Stephen Rothwell
  2008-04-13  0:50   ` Josh Boyer
@ 2008-04-13  1:55   ` Sean MacLennan
  2008-04-13  2:09     ` Grant Likely
  1 sibling, 1 reply; 31+ messages in thread
From: Sean MacLennan @ 2008-04-13  1:55 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev

On Sun, 13 Apr 2008 10:44:30 +1000
"Stephen Rothwell" <sfr@canb.auug.org.au> wrote:

> Hi Sean,
> 
> First comment is that you need reasonable changelogs i.e. explain why
> you are making changes as well as what they do.  Also the first line
> of each changelog (which becomes the subject of any mail generated
> from git) should be a useful and relatively unique summary.
> 

These patches are an amalgamation of a lot of commits. For
example, warp.c was changed 15 times since I last sent a patch to
linuxppc-dev. warp-nand.c was probably changed even more as we kept
shifting the design.

One of the advantages of an FPGA based design is you can work around a
lot of hardware problems. A disadvantage is that it is easy to change,
so it changes a lot. And the HW guys push the specs out to after they
actually get the feature going. There is no SW input into the FPGA
design.

So these patches are basically following the changes to the FPGA and
changes to the hardware. As new functionality was added, I updated the
code.

Is there a particular way I should word this to make it a changelog?

Cheers,
   Sean

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

* Re: [PATCH 1/5] Boot code
  2008-04-13  0:49   ` Josh Boyer
@ 2008-04-13  2:06     ` Sean MacLennan
  0 siblings, 0 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-13  2:06 UTC (permalink / raw)
  To: jwboyer; +Cc: linuxppc-dev

On Sat, 12 Apr 2008 19:49:43 -0500
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:

> On Sat, 2008-04-12 at 14:01 -0400, Sean MacLennan wrote:
> > Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
> > 
> 
> This patch is word wrapped.

Yes, sorry about that. I have been trying out a new mail client and I
pasted the text wrong :( I caught it in the other patches though,
so they should be good.

> > +	char name[40];
> > +	u32 v[2];
> > +
> > +	sprintf(name, "/plb/opb/ebc/nor_flash@0,0/partition@%x",
> > from);
> 
> Unless I can't count (which could very well be the case), you have a
> buffer overflow here.  The fixed string is 37 characters, and the
> values you are passing in for "from" will extend the string past the
> 40 bytes you have allocated for "name".

No, you are right. Good catch. I will update that.

Cheers,
   Sean

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

* Re: Warp patches for 2.6.26
  2008-04-13  1:55   ` Sean MacLennan
@ 2008-04-13  2:09     ` Grant Likely
  2008-04-13  2:38       ` Sean MacLennan
  0 siblings, 1 reply; 31+ messages in thread
From: Grant Likely @ 2008-04-13  2:09 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: Stephen Rothwell, linuxppc-dev

On Sat, Apr 12, 2008 at 7:55 PM, Sean MacLennan <seanm@seanm.ca> wrote:
> On Sun, 13 Apr 2008 10:44:30 +1000
>  "Stephen Rothwell" <sfr@canb.auug.org.au> wrote:
>
>  > Hi Sean,
>  >
>  > First comment is that you need reasonable changelogs i.e. explain why
>  > you are making changes as well as what they do.  Also the first line
>  > of each changelog (which becomes the subject of any mail generated
>  > from git) should be a useful and relatively unique summary.
>  >
>
>  These patches are an amalgamation of a lot of commits. For
>  example, warp.c was changed 15 times since I last sent a patch to
>  linuxppc-dev. warp-nand.c was probably changed even more as we kept
>  shifting the design.
>
>  One of the advantages of an FPGA based design is you can work around a
>  lot of hardware problems. A disadvantage is that it is easy to change,
>  so it changes a lot. And the HW guys push the specs out to after they
>  actually get the feature going. There is no SW input into the FPGA
>  design.
>
>  So these patches are basically following the changes to the FPGA and
>  changes to the hardware. As new functionality was added, I updated the
>  code.
>
>  Is there a particular way I should word this to make it a changelog?

You can still describe what the code changes; either by itemizing all
the changes; or if it now appears to be a whole new thing, but
describing what it does /now/.  :-)

A changelog of "updates a bunch of stuff" is pretty much irrelevant in
all situations I can think of.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: Warp patches for 2.6.26
  2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
                   ` (6 preceding siblings ...)
  2008-04-13  1:11 ` Paul Mackerras
@ 2008-04-13  2:24 ` Josh Boyer
  7 siblings, 0 replies; 31+ messages in thread
From: Josh Boyer @ 2008-04-13  2:24 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Sat, 2008-04-12 at 13:48 -0400, Sean MacLennan wrote:
> I was going to hold off until the warp was officially released, but we
> might miss the merge window. So here they are. A lot of work has been
> done since 2.6.25 and I haven't been submitting patches to keep down on
> the churn.

That's fair enough.  And from what I can tell, your patches are fairly
localized to your platform.  So once they get some initial review and
fixing, I don't foresee having too much trouble getting them merged.

One thing to keep in mind though, is that the closer we get to the merge
window, the tighter I get on what new stuff I'll bring in for the next
release.  This may seem counter-intuitive, but I like to have the merge
window really be for testing out and fixing any issues that pop up
during the merge of all the various subsystem trees.  You'll also want
to add in some lead time for patch review, etc.

That's a long winded way of saying "release early, release often" I
suppose :).

josh

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

* Re: Warp patches for 2.6.26
  2008-04-13  2:09     ` Grant Likely
@ 2008-04-13  2:38       ` Sean MacLennan
  2008-04-13  3:13         ` Dale Farnsworth
  0 siblings, 1 reply; 31+ messages in thread
From: Sean MacLennan @ 2008-04-13  2:38 UTC (permalink / raw)
  To: Grant Likely; +Cc: Stephen Rothwell, linuxppc-dev

 
> A changelog of "updates a bunch of stuff" is pretty much irrelevant in
> all situations I can think of.

Ok, I hope I got everything:

Changes to match new FPGA/HW functionality.
* Switched from 64M NOR/64M NAND to 4M NOR/256M NAND.
* Moved/resized partitions to match the flash changes.
* Fixup code added for Rev A boards to handle flash changes.
* Added DTM critical temperature.
* Added DTM fan error - currently disable in FPGA.
* Added POST information.
* Removed LED function, moved to new LED driver.
* Moved ad7414 to new style I2C initialization.


Cheers,
   Sean

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

* Re: Warp patches for 2.6.26
  2008-04-13  2:38       ` Sean MacLennan
@ 2008-04-13  3:13         ` Dale Farnsworth
  2008-04-17 15:50           ` Sean MacLennan
  0 siblings, 1 reply; 31+ messages in thread
From: Dale Farnsworth @ 2008-04-13  3:13 UTC (permalink / raw)
  To: seanm; +Cc: linuxppc-dev

In article <20080412223833.27ca5f23@lappy.seanm.ca> you write:
>  
> > A changelog of "updates a bunch of stuff" is pretty much irrelevant in
> > all situations I can think of.
> 
> Ok, I hope I got everything:
> 
> Changes to match new FPGA/HW functionality.
> * Switched from 64M NOR/64M NAND to 4M NOR/256M NAND.
> * Moved/resized partitions to match the flash changes.
> * Fixup code added for Rev A boards to handle flash changes.
> * Added DTM critical temperature.
> * Added DTM fan error - currently disable in FPGA.
> * Added POST information.
> * Removed LED function, moved to new LED driver.
> * Moved ad7414 to new style I2C initialization.

Each patch needs to be standalone.  you need to add a header describing
what the patch is intended to accomplish.  Being more descriptive is
better than less.  Also, as Stephen said, make sure that the subject
of each email containing a patch is descriptive and reasonably unique
within the entire kernel.  For example, instead of "WDT driver", as a
minimum something like: "[POWERPC] warp: Add WDT driver".

-Dale

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

* Re: PATCH 2/5] Platform code
  2008-04-12 18:03 ` PATCH 2/5] Platform code Sean MacLennan
@ 2008-04-13  3:15   ` Sean MacLennan
  2008-04-14 16:00   ` David Woodhouse
  1 sibling, 0 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-13  3:15 UTC (permalink / raw)
  To: linuxppc-dev

Here is the complete warp.c. It is probably easier to read this then
the patch.

Cheers,
   Sean

/*
 * PIKA Warp(tm) board specific routines
 *
 * Copyright (c) 2008 PIKA Technologies
 *   Sean MacLennan <smaclennan at pikatech.com>
 *
 * 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/init.h>
#include <linux/of_platform.h>
#include <linux/kthread.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/pika.h>

#include <asm/machdep.h>
#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/time.h>
#include <asm/uic.h>

#include "44x.h"


static __initdata struct of_device_id warp_of_bus[] = {
	{ .compatible = "ibm,plb4", },
	{ .compatible = "ibm,opb", },
	{ .compatible = "ibm,ebc", },
	{},
};

static __initdata struct i2c_board_info warp_i2c_info[] = {
	{ I2C_BOARD_INFO("ad7414", 0x4a) }
};

static int __init warp_arch_init(void)
{
	/* This should go away once support is moved to the dts. */
	i2c_register_board_info(0, warp_i2c_info, ARRAY_SIZE(warp_i2c_info));
	return 0;
}
machine_arch_initcall(warp, warp_arch_init);

static int __init warp_device_probe(void)
{
	of_platform_bus_probe(NULL, warp_of_bus, NULL);
	return 0;
}
machine_device_initcall(warp, warp_device_probe);

static int __init warp_probe(void)
{
	unsigned long root = of_get_flat_dt_root();

	return of_flat_dt_is_compatible(root, "pika,warp");
}

define_machine(warp) {
	.name		= "Warp",
	.probe 		= warp_probe,
	.progress 	= udbg_progress,
	.init_IRQ 	= uic_init_tree,
	.get_irq 	= uic_get_irq,
	.restart	= ppc44x_reset_system,
	.calibrate_decr = generic_calibrate_decr,
};


/* I am not sure this is the best place for this... */
static int __init warp_post_info(void)
{
	struct device_node *np;
	void __iomem *fpga;
	u32 post1, post2;

	/* Sighhhh... POST information is in the sd area. */
	np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd");
	if (np == NULL)
		return -ENOENT;

	fpga = of_iomap(np, 0);
	of_node_put(np);
	if (fpga == NULL)
		return -ENOENT;

	post1 = in_be32(fpga + 0x40);
	post2 = in_be32(fpga + 0x44);

	iounmap(fpga);

	if (post1 || post2)
		printk(KERN_INFO "Warp POST %08x %08x\n", post1, post2);
	else
		printk(KERN_INFO "Warp POST OK\n");

	return 0;
}
machine_late_initcall(warp, warp_post_info);


#ifdef CONFIG_SENSORS_AD7414

static LIST_HEAD(dtm_shutdown_list);
static void __iomem *dtm_fpga;

struct dtm_shutdown {
	struct list_head list;
	void (*func)(void *arg);
	void *arg;
};


int dtm_register_shutdown(void (*func)(void *arg), void *arg)
{
	struct dtm_shutdown *shutdown;

	shutdown = kmalloc(sizeof(struct dtm_shutdown), GFP_KERNEL);
	if (shutdown == NULL)
		return -ENOMEM;

	shutdown->func = func;
	shutdown->arg = arg;

	list_add(&shutdown->list, &dtm_shutdown_list);

	return 0;
}
EXPORT_SYMBOL(dtm_register_shutdown);

int dtm_unregister_shutdown(void (*func)(void *arg), void *arg)
{
	struct dtm_shutdown *shutdown;

	list_for_each_entry(shutdown, &dtm_shutdown_list, list)
		if (shutdown->func == func && shutdown->arg == arg) {
			list_del(&shutdown->list);
			kfree(shutdown);
			return 0;
		}

	return -EINVAL;
}
EXPORT_SYMBOL(dtm_unregister_shutdown);

static long wdt_keepalive(long time)
{
	if (dtm_fpga) {
		unsigned reset = in_be32(dtm_fpga + 0x14);
		out_be32(dtm_fpga + 0x14, reset);
	}

	return 0;
}

static irqreturn_t temp_isr(int irq, void *context)
{
	struct dtm_shutdown *shutdown;

	/* Run through the shutdown list. */
	list_for_each_entry(shutdown, &dtm_shutdown_list, list)
		shutdown->func(shutdown->arg);

	panic_timeout = 1800;
	panic_blink = wdt_keepalive;
	panic("Critical Temperature Shutdown");
	return IRQ_HANDLED;
}

static void pika_setup_critical_temp(struct i2c_client *client)
{
	struct device_node *np;
	int irq, rc;

	/* These registers are in 1 degree increments. */
	i2c_smbus_write_byte_data(client, 2, 55); /* Thigh */
	i2c_smbus_write_byte_data(client, 3, 50); /* Tlow */

	np = of_find_compatible_node(NULL, NULL, "adi,ad7414");
	if (np == NULL) {
		printk(KERN_ERR __FILE__ ": Unable to find ad7414\n");
		return;
	}

	irq = irq_of_parse_and_map(np, 0);
	of_node_put(np);
	if (irq  == NO_IRQ) {
		printk(KERN_ERR __FILE__ ": Unable to get ad7414 irq\n");
		return;
	}

	rc = request_irq(irq, temp_isr, 0, "ad7414", NULL);
	if (rc) {
		printk(KERN_ERR __FILE__
		       ": Unable to request ad7414 irq %d = %d\n", irq, rc);
		return;
	}
}

static inline void pika_dtm_check_fan(void __iomem *fpga)
{
	static int fan_state;
	u32 fan = in_be32(fpga + 0x34) & (1 << 14);

	if (fan_state != fan) {
		fan_state = fan;
		if (fan)
			printk(KERN_WARNING "Fan rotation error detected."
				   " Please check hardware.\n");
	}
}

static int pika_dtm_thread(void __iomem *fpga)
{
	struct i2c_adapter *adap;
	struct i2c_client *client;

	/* We loop in case either driver was compiled as a module and
	 * has not been insmoded yet.
	 */
	while (!(adap = i2c_get_adapter(0))) {
		set_current_state(TASK_INTERRUPTIBLE);
		schedule_timeout(HZ);
	}

	while (1) {
		list_for_each_entry(client, &adap->clients, list)
			if (client->addr == 0x4a)
				goto found_it;

		set_current_state(TASK_INTERRUPTIBLE);
		schedule_timeout(HZ);
	}

found_it:
	i2c_put_adapter(adap);

	pika_setup_critical_temp(client);

	printk(KERN_INFO "PIKA DTM thread running.\n");

	while (!kthread_should_stop()) {
		u16 temp = swab16(i2c_smbus_read_word_data(client, 0));
		out_be32(fpga + 0x20, temp);

		pika_dtm_check_fan(fpga);

		set_current_state(TASK_INTERRUPTIBLE);
		schedule_timeout(HZ);
	}

	return 0;
}


static int __init pika_dtm_start(void)
{
	struct task_struct *dtm_thread;
	struct device_node *np;

	np = of_find_compatible_node(NULL, NULL, "pika,fpga");
	if (np == NULL)
		return -ENOENT;

	dtm_fpga = of_iomap(np, 0);
	of_node_put(np);
	if (dtm_fpga == NULL)
		return -ENOENT;

	dtm_thread = kthread_run(pika_dtm_thread, dtm_fpga, "pika-dtm");
	if (IS_ERR(dtm_thread)) {
		iounmap(dtm_fpga);
		return PTR_ERR(dtm_thread);
	}

	return 0;
}
machine_late_initcall(warp, pika_dtm_start);
#endif

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

* Re: [PATCH 4/5] LED driver
  2008-04-12 18:10 ` [PATCH 4/5] LED driver Sean MacLennan
  2008-04-13  0:41   ` Josh Boyer
@ 2008-04-13 12:28   ` Peter Korsgaard
  2008-04-13 16:51     ` Sean MacLennan
  1 sibling, 1 reply; 31+ messages in thread
From: Peter Korsgaard @ 2008-04-13 12:28 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

>>>>> "Sean" == Sean MacLennan <smaclennan@pikatech.com> writes:

Hi,

 Sean> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
 Sean> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
 Sean> index 859814f..31e1746 100644
 Sean> --- a/drivers/leds/Kconfig
 Sean> +++ b/drivers/leds/Kconfig
 Sean> @@ -145,6 +145,12 @@ config LEDS_CLEVO_MAIL
 Sean>  	  To compile this driver as a module, choose M here: the
 Sean>  	  module will be called leds-clevo-mail.
 
 Sean> +config LEDS_WARP
 Sean> +	tristate "LED Support for the PIKA Warp LEDs"
 Sean> +	depends on LEDS_CLASS && WARP
 Sean> +	help
 Sean> +	  This option enables support for the PIKA Warp LEDs.
 Sean> +
 Sean>  comment "LED Triggers"

How about getting gpiolib working and use leds-gpio.c instead?

-- 
Bye, Peter Korsgaard

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

* Re: [PATCH 4/5] LED driver
  2008-04-13 12:28   ` Peter Korsgaard
@ 2008-04-13 16:51     ` Sean MacLennan
  2008-04-13 17:34       ` Peter Korsgaard
  0 siblings, 1 reply; 31+ messages in thread
From: Sean MacLennan @ 2008-04-13 16:51 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linuxppc-dev

On Sun, 13 Apr 2008 14:28:24 +0200
Peter Korsgaard <jacmet@sunsite.dk> wrote:

> How about getting gpiolib working and use leds-gpio.c instead?

Actually, I was going to just ask about that... how close is leds-gpio
to being working, and will it be in 2.6.26?

Cheers,
   Sean

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

* Re: [PATCH 4/5] LED driver
  2008-04-13 16:51     ` Sean MacLennan
@ 2008-04-13 17:34       ` Peter Korsgaard
  2008-04-13 17:51         ` Sean MacLennan
  0 siblings, 1 reply; 31+ messages in thread
From: Peter Korsgaard @ 2008-04-13 17:34 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

>>>>> "Sean" == Sean MacLennan <smaclennan@pikatech.com> writes:

 >> How about getting gpiolib working and use leds-gpio.c instead?

 Sean> Actually, I was going to just ask about that... how close is leds-gpio
 Sean> to being working, and will it be in 2.6.26?

I haven't actually used leds-gpio, but it looks so simple that I
cannot imagine it not working. There also seems to be quite some
platforms using it, E.G:

% git grep '"leds-gpio"' arch|wc -l
11

Or are you referring to the status of gpiolib support on powerpc?

-- 
Bye, Peter Korsgaard

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

* Re: [PATCH 4/5] LED driver
  2008-04-13 17:34       ` Peter Korsgaard
@ 2008-04-13 17:51         ` Sean MacLennan
  0 siblings, 0 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-13 17:51 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linuxppc-dev

On Sun, 13 Apr 2008 19:34:38 +0200
Peter Korsgaard <jacmet@sunsite.dk> wrote:

> I haven't actually used leds-gpio, but it looks so simple that I
> cannot imagine it not working. There also seems to be quite some
> platforms using it, E.G:
> 
> % git grep '"leds-gpio"' arch|wc -l
> 11
> 
> Or are you referring to the status of gpiolib support on powerpc?

Correct. It looks like the gpiolib will go in for 2.6.26 but not ppc44x
support. Which means I wouldn't be able to get warp support in for this
release.

Cheers,
   Sean

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

* Re: [PATCH 5/5] WDT driver
  2008-04-12 18:11 ` [PATCH 5/5] WDT driver Sean MacLennan
  2008-04-13  0:40   ` Josh Boyer
@ 2008-04-14  8:33   ` Laurent Pinchart
  2008-04-14 15:40     ` Sean MacLennan
  1 sibling, 1 reply; 31+ messages in thread
From: Laurent Pinchart @ 2008-04-14  8:33 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Sean MacLennan

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

On Saturday 12 April 2008 20:11, Sean MacLennan wrote:
> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 254d115..e73a3ea 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -697,6 +697,14 @@ config BOOKE_WDT
>  	  Please see Documentation/watchdog/watchdog-api.txt for
>  	  more information.
>  
> +config PIKA_WDT
> +	tristate "PIKA FPGA Watchdog"
> +	depends on WARP
> +	default y
> +	help
> +	 This enables the watchdog in the PIKA FPGA. Currently used on
> +	 the Warp platform.
> +
>  # PPC64 Architecture
>  
>  config WATCHDOG_RTAS
> diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
> index f3fb170..09758c5 100644
> --- a/drivers/watchdog/Makefile
> +++ b/drivers/watchdog/Makefile
> @@ -105,6 +105,7 @@ obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o
>  obj-$(CONFIG_83xx_WDT) += mpc83xx_wdt.o
>  obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o
>  obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o
> +obj-$(CONFIG_PIKA_WDT) += pika_wdt.o
>  
>  # PPC64 Architecture
>  obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o
> diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
> new file mode 100644
> index 0000000..b84ac07
> --- /dev/null
> +++ b/drivers/watchdog/pika_wdt.c
> @@ -0,0 +1,113 @@
> +/*
> + * PIKA FPGA based Watchdog Timer
> + *
> + * Copyright (c) 2008 PIKA Technologies
> + *   Sean MacLennan <smaclennan at pikatech.com>
> + */
> +
> +#include <linux/module.h>
> +#include <linux/fs.h>
> +#include <linux/miscdevice.h>
> +#include <linux/reboot.h>
> +#include <linux/uaccess.h>
> +#include <linux/io.h>
> +#include <linux/of_platform.h>
> +#include <linux/watchdog.h>
> +
> +
> +static void __iomem *pikawdt_fpga;
> +
> +
> +static inline void pikawdt_ping(void)
> +{
> +	unsigned reset = in_be32(pikawdt_fpga + 0x14);
> +	reset |= 0xf80; /* enable with max timeout - 15 seconds */
> +	out_be32(pikawdt_fpga + 0x14, reset);

What about

setbits32((u32 __iomem *)(pikawdt_fpga + 0x14), 0xf80);

> +}
> +
> +static int pikawdt_open(struct inode *inode, struct file *file)
> +{
> +	printk(KERN_INFO "PIKA WDT started...\n");
> +
> +	pikawdt_ping();
> +
> +	return 0;
> +}
> +
> +static int pikawdt_release(struct inode *inode, struct file *file)
> +{
> +	pikawdt_ping(); /* one last time */
> +	return 0;
> +}
> +
> +static ssize_t pikawdt_write(struct file *file, const char __user *buf,
> +			     size_t count, loff_t *ppos)
> +{
> +	pikawdt_ping();
> +	return count;
> +}
> +
> +/* We support the bare minimum to be conformant. */
> +static int pikawdt_ioctl(struct inode *inode, struct file *file,
> +			 unsigned int cmd, unsigned long arg)
> +{
> +	if (cmd == WDIOC_KEEPALIVE) {
> +		pikawdt_ping();
> +		return 0;
> +	} else
> +		return -EINVAL;
> +}
> +
> +static const struct file_operations pikawdt_fops = {
> +	.owner		= THIS_MODULE,
> +	.open		= pikawdt_open,
> +	.release	= pikawdt_release,
> +	.write		= pikawdt_write,
> +	.ioctl		= pikawdt_ioctl,
> +};
> +
> +static struct miscdevice pikawdt_miscdev = {
> +	.minor	= WATCHDOG_MINOR,
> +	.name	= "watchdog",
> +	.fops	= &pikawdt_fops,
> +};
> +
> +static int __init pikawdt_init(void)
> +{
> +	struct device_node *np;
> +	int ret;
> +
> +	np = of_find_compatible_node(NULL, NULL, "pika,fpga");
> +	if (np == NULL) {
> +		printk(KERN_ERR "pikawdt: Unable to find fpga.\n");
> +		return -ENOENT;
> +	}
> +
> +	pikawdt_fpga = of_iomap(np, 0);
> +
> +	of_node_put(np);
> +
> +	if (pikawdt_fpga == NULL) {
> +		printk(KERN_ERR "pikawdt: Unable to map fpga.\n");
> +		return -ENOENT;
> +	}
> +
> +	ret = misc_register(&pikawdt_miscdev);
> +	if (ret) {
> +		iounmap(pikawdt_fpga);
> +		printk(KERN_ERR "pikawdt: Unable to register miscdev.\n");
> +		return ret;
> +	}
> +
> +	return 0;
> +}
> +module_init(pikawdt_init);
> +
> +
> +static void __exit pikawdt_exit(void)
> +{
> +	misc_deregister(&pikawdt_miscdev);
> +
> +	iounmap(pikawdt_fpga);
> +}
> +module_exit(pikawdt_exit);
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 
> 

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

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

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

* Re: [PATCH 5/5] WDT driver
  2008-04-14  8:33   ` Laurent Pinchart
@ 2008-04-14 15:40     ` Sean MacLennan
  0 siblings, 0 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-14 15:40 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linuxppc-dev

On Mon, 14 Apr 2008 10:33:27 +0200
Laurent Pinchart <laurentp@cse-semaphore.com> wrote:

> What about
> 
> setbits32((u32 __iomem *)(pikawdt_fpga + 0x14), 0xf80);

Nice! I didn't know about that call. Thanks.

Cheers,
  Sean

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

* Re: PATCH 2/5] Platform code
  2008-04-12 18:03 ` PATCH 2/5] Platform code Sean MacLennan
  2008-04-13  3:15   ` Sean MacLennan
@ 2008-04-14 16:00   ` David Woodhouse
  1 sibling, 0 replies; 31+ messages in thread
From: David Woodhouse @ 2008-04-14 16:00 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Sat, 2008-04-12 at 14:03 -0400, Sean MacLennan wrote:
> 
> - *   Sean MacLennan <smaclennan@pikatech.com>
> + *   Sean MacLennan <smaclennan at pikatech.com>

Please don't do this. Anywhere. Ever.

The spambots are quite capable of undoing it, and have been for years.
The only people you inconvenience are real people trying to contact you.

-- 
dwmw2

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

* Re: Warp patches for 2.6.26
  2008-04-13  3:13         ` Dale Farnsworth
@ 2008-04-17 15:50           ` Sean MacLennan
  2008-04-17 16:08             ` Dale Farnsworth
  0 siblings, 1 reply; 31+ messages in thread
From: Sean MacLennan @ 2008-04-17 15:50 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev

On Sat, 12 Apr 2008 20:13:16 -0700
"Dale Farnsworth" <dale@farnsworth.org> wrote:

> Each patch needs to be standalone.  you need to add a header
> describing what the patch is intended to accomplish.  Being more
> descriptive is better than less.  Also, as Stephen said, make sure
> that the subject of each email containing a patch is descriptive and
> reasonably unique within the entire kernel.

Splitting up the patches would be very error prone. I would have to
basically do all the editing by hand.

I also think I am not being clear enough. Basically what is currently
in the mainline is platform code for a Rev A board with minimal FPGA
functionality, since that is what we had at the time.

These patches, I should probably merge them into one patch, bring the
platform code up to a Rev B board with a more complete FPGA load. (I
say more complete because FPGA loads are never complete ;)

These patches only affect the Warp. Ignoring the LED and WDT patches,
you have to have all the changes to get a working Rev B. You can't just
put in the DTM changes or just put in the NAND changes.

I listed 8 changes, but three are for NAND, and four are for DTM. I
could compress them down:

Updated platform code to support Rev B boards.
  * Switched from 64M NOR/64M NAND to 4M NOR/256M NAND.
  * Fully functional DTM.
  * Added POST information.
  * Removed LED function, moved to new LED driver.

Now, the POST function and the removed LED function could be separate
patches I guess, but it hardly seems worth it. The LED function was
never used except in temporary debug code.

> For example, instead of "WDT driver", as a minimum something like:
> "[POWERPC] warp: Add WDT driver".

Ok, that I can do.

Cheers,
   Sean

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

* Re: Warp patches for 2.6.26
  2008-04-17 15:50           ` Sean MacLennan
@ 2008-04-17 16:08             ` Dale Farnsworth
  2008-04-17 17:26               ` Sean MacLennan
  0 siblings, 1 reply; 31+ messages in thread
From: Dale Farnsworth @ 2008-04-17 16:08 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Thu, Apr 17, 2008 at 11:50:45AM -0400, Sean MacLennan wrote:
> On Sat, 12 Apr 2008 20:13:16 -0700
> "Dale Farnsworth" <dale@farnsworth.org> wrote:
> 
> > Each patch needs to be standalone.  you need to add a header
> > describing what the patch is intended to accomplish.  Being more
> > descriptive is better than less.  Also, as Stephen said, make sure
> > that the subject of each email containing a patch is descriptive and
> > reasonably unique within the entire kernel.
> 
> Splitting up the patches would be very error prone. I would have to
> basically do all the editing by hand.

I didn't suggest splitting the patches or further modification of the
patches themselves.  What I found lacking were the patch descriptions.
You need to describe in each patch (commit) commentary exactly what
the patch is intended to accomplish, and the rationale behind it.

> I also think I am not being clear enough. Basically what is currently
> in the mainline is platform code for a Rev A board with minimal FPGA
> functionality, since that is what we had at the time.
> 
> These patches, I should probably merge them into one patch, bring the
> platform code up to a Rev B board with a more complete FPGA load. (I
> say more complete because FPGA loads are never complete ;)
> 
> These patches only affect the Warp. Ignoring the LED and WDT patches,
> you have to have all the changes to get a working Rev B. You can't just
> put in the DTM changes or just put in the NAND changes.
> 
> I listed 8 changes, but three are for NAND, and four are for DTM. I
> could compress them down:
> 
> Updated platform code to support Rev B boards.
>   * Switched from 64M NOR/64M NAND to 4M NOR/256M NAND.
>   * Fully functional DTM.
>   * Added POST information.
>   * Removed LED function, moved to new LED driver.
> 
> Now, the POST function and the removed LED function could be separate
> patches I guess, but it hardly seems worth it. The LED function was
> never used except in temporary debug code.
> 
> > For example, instead of "WDT driver", as a minimum something like:
> > "[POWERPC] warp: Add WDT driver".
> 
> Ok, that I can do.

-Dale

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

* Re: Warp patches for 2.6.26
  2008-04-17 16:08             ` Dale Farnsworth
@ 2008-04-17 17:26               ` Sean MacLennan
  2008-04-17 18:11                 ` Dale Farnsworth
  0 siblings, 1 reply; 31+ messages in thread
From: Sean MacLennan @ 2008-04-17 17:26 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev

On Thu, 17 Apr 2008 09:08:04 -0700
"Dale Farnsworth" <dale@farnsworth.org> wrote:

> I didn't suggest splitting the patches or further modification of the
> patches themselves.  What I found lacking were the patch descriptions.
> You need to describe in each patch (commit) commentary exactly what
> the patch is intended to accomplish, and the rationale behind it.

Ok, that makes more sense to me. Sorry that I read that wrong :(

One last question.... would the warp_defconfig be considered part of
the platform code? I think one of the problems was I split up the
patches when really they all go together (again ignoring led and wdt).
But I am not sure if the defconfig really goes with the platform code.

Cheers,
  Sean

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

* Re: [PATCH 4/5] LED driver
  2008-04-13  0:41   ` Josh Boyer
@ 2008-04-17 17:32     ` Sean MacLennan
  0 siblings, 0 replies; 31+ messages in thread
From: Sean MacLennan @ 2008-04-17 17:32 UTC (permalink / raw)
  To: jwboyer; +Cc: linuxppc-dev

On Sat, 12 Apr 2008 19:41:30 -0500
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:

> This should be sent to Richard Purdie.

I spoke with Richard and we agreed that, since the GPIO library will
make this driver obsolete, it is not worth committing this driver for,
hopefully, only one release.

If anybody sees any problems with this driver, I am still interested in
feedback since this driver will be used in the short term.

Cheers,
  Sean

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

* Re: Warp patches for 2.6.26
  2008-04-17 17:26               ` Sean MacLennan
@ 2008-04-17 18:11                 ` Dale Farnsworth
  0 siblings, 0 replies; 31+ messages in thread
From: Dale Farnsworth @ 2008-04-17 18:11 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev

On Thu, Apr 17, 2008 at 01:26:23PM -0400, Sean MacLennan wrote:
> On Thu, 17 Apr 2008 09:08:04 -0700
> "Dale Farnsworth" <dale@farnsworth.org> wrote:
> 
> > I didn't suggest splitting the patches or further modification of the
> > patches themselves.  What I found lacking were the patch descriptions.
> > You need to describe in each patch (commit) commentary exactly what
> > the patch is intended to accomplish, and the rationale behind it.
> 
> Ok, that makes more sense to me. Sorry that I read that wrong :(

No problem.

> One last question.... would the warp_defconfig be considered part of
> the platform code? I think one of the problems was I split up the
> patches when really they all go together (again ignoring led and wdt).
> But I am not sure if the defconfig really goes with the platform code.

I would suggest adding the defconfig as the last patch of the "platform
code" series.  (A separate patch just containing the added defconfig.)

-Dale

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

end of thread, other threads:[~2008-04-17 18:12 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-12 17:48 Warp patches for 2.6.26 Sean MacLennan
2008-04-12 18:01 ` [PATCH 1/5] Boot code Sean MacLennan
2008-04-13  0:49   ` Josh Boyer
2008-04-13  2:06     ` Sean MacLennan
2008-04-12 18:03 ` PATCH 2/5] Platform code Sean MacLennan
2008-04-13  3:15   ` Sean MacLennan
2008-04-14 16:00   ` David Woodhouse
2008-04-12 18:09 ` [PATCH 3/5] Defconfig Sean MacLennan
2008-04-12 18:10 ` [PATCH 4/5] LED driver Sean MacLennan
2008-04-13  0:41   ` Josh Boyer
2008-04-17 17:32     ` Sean MacLennan
2008-04-13 12:28   ` Peter Korsgaard
2008-04-13 16:51     ` Sean MacLennan
2008-04-13 17:34       ` Peter Korsgaard
2008-04-13 17:51         ` Sean MacLennan
2008-04-12 18:11 ` [PATCH 5/5] WDT driver Sean MacLennan
2008-04-13  0:40   ` Josh Boyer
2008-04-14  8:33   ` Laurent Pinchart
2008-04-14 15:40     ` Sean MacLennan
2008-04-13  0:44 ` Warp patches for 2.6.26 Stephen Rothwell
2008-04-13  0:50   ` Josh Boyer
2008-04-13  1:55   ` Sean MacLennan
2008-04-13  2:09     ` Grant Likely
2008-04-13  2:38       ` Sean MacLennan
2008-04-13  3:13         ` Dale Farnsworth
2008-04-17 15:50           ` Sean MacLennan
2008-04-17 16:08             ` Dale Farnsworth
2008-04-17 17:26               ` Sean MacLennan
2008-04-17 18:11                 ` Dale Farnsworth
2008-04-13  1:11 ` Paul Mackerras
2008-04-13  2:24 ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).