Warp patches for 2.6.26
Subsystems (5)
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.carch/powerpc/boot/dts/warp.dtsarch/powerpc/configs/warp_defconfigarch/powerpc/platforms/44x/warp-nand.carch/powerpc/platforms/44x/warp.c
drivers/hwmon/Kconfigdrivers/hwmon/Makefiledrivers/hwmon/ad7414.c
drivers/i2c/busses/Kconfigdrivers/i2c/busses/i2c-ibm_iic.c
drivers/leds/Kconfigdrivers/leds/Makefiledrivers/leds/leds-warp.c
drivers/mmc/core/sd.cdrivers/mmc/host/Kconfigdrivers/mmc/host/Makefiledrivers/mmc/host/pikasd.c
drivers/mtd/nand/Kconfigdrivers/mtd/nand/ndfc.c
drivers/net/ibm_newemac/mal.cdrivers/net/ibm_newemac/zmii.c
drivers/scsi/Kconfig
drivers/watchdog/Kconfigdrivers/watchdog/Makefiledrivers/watchdog/pika_wdt.c
include/linux/mmc/host.hinclude/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
PATCH 1/5 Boot code
(quoted diff) +0 -0
b/arch/powerpc/boot/cuboot-warp.c index eb108a8..43d7ad9 100644
arch/powerpc/boot/cuboot-warp.c +44 -3
64 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/powerpc/boot/dts/warp.dts index b04a52e..fa070b0 100644
arch/powerpc/boot/dts/warp.dts +6 -2
@@ -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 {
PATCH 2/5] Platform code
In reply to Sean MacLennanarch/powerpc/platforms/44x/warp-nand.c +38 -13
@@ -2,7 +2,7 @@* PIKA Warp(tm) NAND flash specific routines * * Copyright (c) 2008 PIKA Technologies -* Sean MacLennan <[email protected]> +* 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);
arch/powerpc/platforms/44x/warp.c +180 -52
297 lines not on this page · raw message
PATCH 3/5 Defconfig
In reply to Sean MacLennanarch/powerpc/configs/warp_defconfig +47 -13
@@ -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
PATCH 4/5 LED driver
In reply to Sean MacLennandrivers/leds/Kconfig +6 -0
@@ -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
drivers/leds/Makefile +1 -0
@@ -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
drivers/leds/leds-warp.c new file +148 -0
148 lines not on this page · raw message
PATCH 5/5 WDT driver
In reply to Sean MacLennandrivers/watchdog/Kconfig +8 -0
@@ -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
drivers/watchdog/Makefile +1 -0
@@ -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
drivers/watchdog/pika_wdt.c new file +113 -0
113 lines not on this page · raw message
Re: [PATCH 5/5] WDT driver
Quoted 1 line · Sean MacLennan
Signed-off-by Sean MacLennan <[email protected]>
This should be sent to Wim as he maintains the watchdog drivers tree.
josh
Quoted 155 lines
drivers/watchdog/Kconfig +8
-0@@ -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_RTASdrivers/watchdog/Makefile +1
-0@@ -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.odrivers/watchdog/pika_wdt.c new file +113
-0@@ -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
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/5] LED driver
In reply to Sean MacLennanQuoted 1 line · Sean MacLennan
Signed-off-by Sean MacLennan <[email protected]>
This should be sent to Richard Purdie.
josh
Quoted 188 lines
drivers/leds/Kconfig +6
-0@@ -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_TRIGGERSdrivers/leds/Makefile +1
-0@@ -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.odrivers/leds/leds-warp.c new file +148
-0@@ -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 <[email protected]>" );_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
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.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Re: [PATCH 1/5] Boot code
In reply to Sean MacLennanQuoted 2 lines · Sean MacLennan
Signed-off-by Sean MacLennan <[email protected]>
This patch is word wrapped.
Quoted 15 lines
(quoted diff) +0
-0
b/arch/powerpc/boot/cuboot-warp.cindex eb108a8..43d7ad9 100644arch/powerpc/boot/cuboot-warp.c +1
-0@@ -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;
arch/powerpc/boot/cuboot-warp.c line 27
Quoted 10 lines
arch/powerpc/boot/cuboot-warp.c +6
-2-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
Quoted 6 lines · Stephen Rothwell
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
Quoted 4 lines · Sean MacLennan
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.
Quoted 7 lines · On Sun, 13 Apr 2008 10:44:30 +1000 "Stephen Rothwell" <[email protected]>…
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
Re: [PATCH 1/5] Boot code
In reply to Josh BoyerQuoted 5 lines · On Sat, 12 Apr 2008 19:49:43 -0500 Josh Boyer <[email protected]>…
Quoted 2 lines · Sean MacLennan
Signed-off-by Sean MacLennan <[email protected]>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.
Quoted 10 lines
Quoted 5 lines
arch/powerpc/boot/cuboot-warp.c +4
-0+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
Quoted 22 lines · Sean MacLennan
Quoted 7 lines · On Sun, 13 Apr 2008 10:44:30 +1000 "Stephen Rothwell" <[email protected]>…
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.cwas changed 15 times since I last sent a patch to linuxppc-dev.warp-nand.cwas 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.
Quoted 5 lines
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.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 4 lines · Sean MacLennan
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
Quoted 3 lines
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
In article <[email protected]> you write:
Quoted 6 lines
Quoted 3 lines
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:
Quoted 9 lines
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
Re: PATCH 2/5] Platform code
In reply to Sean MacLennanHere 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
Re: [PATCH 4/5] LED driver
In reply to Sean MacLennanQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sean" == Sean MacLennan <[email protected]> writes:
Hi,
Sean> Signed-off-by: Sean MacLennan <[email protected]> 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?
Signature · 1 line
Bye, Peter Korsgaard
Re: [PATCH 4/5] LED driver
Quoted 1 line · On Sun, 13 Apr 2008 14:28:24 +0200 Peter Korsgaard <[email protected]> wrote:
How about getting gpiolib working and use
leds-gpio.cinstead?
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
Re: [PATCH 4/5] LED driver
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sean" == Sean MacLennan <[email protected]> writes:
How about getting gpiolib working and use
leds-gpio.cinstead?
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?
Signature · 1 line
Bye, Peter Korsgaard
Re: [PATCH 4/5] LED driver
Quoted 8 lines · On Sun, 13 Apr 2008 19:34:38 +0200 Peter Korsgaard <[email protected]> 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
11Or 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
Re: [PATCH 5/5] WDT driver
In reply to Sean MacLennanQuoted 54 lines · Sean MacLennan
Signed-off-by Sean MacLennan <[email protected]>drivers/watchdog/Kconfig +8
-0@@ -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_RTASdrivers/watchdog/Makefile +1
-0@@ -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.odrivers/watchdog/pika_wdt.c new file +15
-0@@ -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>
drivers/watchdog/pika_wdt.c line 25
Quoted 10 lines
drivers/watchdog/pika_wdt.c new file +10
-0+ + +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);
Quoted 94 lines
drivers/watchdog/pika_wdt.c new file +88
-0+} + +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
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Signature · 9 lines
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
Re: [PATCH 5/5] WDT driver
Quoted 3 lines · On Mon, 14 Apr 2008 10:33:27 +0200 Laurent Pinchart…
What about
setbits32((u32 __iomem *)(pikawdt_fpga + 0x14), 0xf80);
Nice! I didn't know about that call. Thanks.
Cheers,
Sean
Re: PATCH 2/5] Platform code
In reply to Sean MacLennanQuoted 3 lines · Sean MacLennan
- * Sean MacLennan <[email protected]>
+ * 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.
Signature · 1 line
dwmw2
Quoted 5 lines · On Sat, 12 Apr 2008 20:13:16 -0700 "Dale Farnsworth" <[email protected]>…
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.
Quoted 2 lines
For example, instead of "WDT driver", as a minimum something like:
"[POWERPC] warp: Add WDT driver".
Ok, that I can do.
Cheers,
Sean
Quoted 11 lines · Sean MacLennan
Quoted 5 lines · On Sat, 12 Apr 2008 20:13:16 -0700 "Dale Farnsworth" <[email protected]>…
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.
Quoted 21 lines
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.
Quoted 8 lines
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.
Quoted 2 lines
For example, instead of "WDT driver", as a minimum something like:
"[POWERPC] warp: Add WDT driver".Ok, that I can do.
-Dale
Quoted 4 lines · On Thu, 17 Apr 2008 09:08:04 -0700 "Dale Farnsworth" <[email protected]>…
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
Re: [PATCH 4/5] LED driver
In reply to Josh BoyerQuoted 1 line · On Sat, 12 Apr 2008 19:41:30 -0500 Josh Boyer <[email protected]>…
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
Quoted 9 lines · Sean MacLennan
Quoted 4 lines · On Thu, 17 Apr 2008 09:08:04 -0700 "Dale Farnsworth" <[email protected]>…
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.
Quoted 4 lines
One last question.... would the
warp_defconfigbe 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