From: <bal...@us...> - 2007-03-19 23:33:07
|
Revision: 925 http://svn.sourceforge.net/hackndev/?rev=925&view=rev Author: balrog-kun Date: 2007-03-19 16:14:21 -0700 (Mon, 19 Mar 2007) Log Message: ----------- LD: convert palmld_ide to platform_device (this is 2007!) Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 20:19:05 UTC (rev 924) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 23:14:21 UTC (rev 925) @@ -14,7 +14,7 @@ #include <asm/arch/pxa-regs.h> #include <asm/arch/palmld-gpio.h> -static int palmld_ide_probe(struct device *dev) +static int palmld_ide_probe(struct platform_device *dev) { hw_regs_t hw; int *hd = NULL; @@ -43,14 +43,14 @@ return -ENODEV; } - dev_set_drvdata(dev, hd); + platform_set_drvdata(dev, hd); return 0; } -static int palmld_ide_remove(struct device *dev) +static int palmld_ide_remove(struct platform_device *dev) { - int *hd = dev_get_drvdata(dev); + int *hd = platform_get_drvdata(dev); if(hd) { ide_unregister(*hd); @@ -62,9 +62,11 @@ return 0; } -static struct device_driver palmld_ide_driver = { - .name = "palmld-ide", - .bus = &platform_bus_type, +static struct platform_driver palmld_ide_driver = { + .driver = { + .name = "palmld-ide", + .owner = THIS_MODULE, + }, .probe = palmld_ide_probe, .remove = palmld_ide_remove, .suspend= NULL, @@ -73,12 +75,12 @@ static int __init palmld_ide_init(void) { - return driver_register(&palmld_ide_driver); + return platform_driver_register(&palmld_ide_driver); } static void __exit palmld_ide_exit(void) { - driver_unregister(&palmld_ide_driver); + platform_driver_unregister(&palmld_ide_driver); } module_init(palmld_ide_init); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-03-19 23:33:07
|
Revision: 926 http://svn.sourceforge.net/hackndev/?rev=926&view=rev Author: balrog-kun Date: 2007-03-19 16:27:48 -0700 (Mon, 19 Mar 2007) Log Message: ----------- LD: palmld_ide: initialise hw.dev properly Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 23:14:21 UTC (rev 925) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 23:27:48 UTC (rev 926) @@ -30,6 +30,7 @@ } ide_std_init_ports(&hw, PALMLD_IDE_VIRT + 0x10, PALMLD_IDE_VIRT + 0xe); + hw.dev = &dev->dev; hw.irq = IRQ_GPIO_PALMLD_IDE_IRQ; set_irq_type(hw.irq, IRQT_RISING); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-03-19 23:47:38
|
Revision: 927 http://svn.sourceforge.net/hackndev/?rev=927&view=rev Author: balrog-kun Date: 2007-03-19 16:47:26 -0700 (Mon, 19 Mar 2007) Log Message: ----------- LD: palmld_ide: retabify. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 23:27:48 UTC (rev 926) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 23:47:26 UTC (rev 927) @@ -17,30 +17,31 @@ static int palmld_ide_probe(struct platform_device *dev) { hw_regs_t hw; - int *hd = NULL; - - if(!machine_is_xscale_palmld()) return -ENODEV; + int *hd = NULL; - memset(&hw, 0, sizeof(hw)); + if (!machine_is_xscale_palmld()) + return -ENODEV; - if(!GET_PALMLD_GPIO(IDE_PWEN)) { - printk(KERN_INFO "palmld_ide_probe: enabling HDD power\n"); - SET_PALMLD_GPIO(IDE_PWEN, 1); - msleep(300); // fixme: should wait for a ready condition instead of just delaying - } + if (!GET_PALMLD_GPIO(IDE_PWEN)) { + printk(KERN_INFO "palmld_ide_probe: enabling HDD power\n"); + SET_PALMLD_GPIO(IDE_PWEN, 1); + /* fixme: should wait for a ready condition instead + * of just delaying */ + msleep(300); + } - ide_std_init_ports(&hw, PALMLD_IDE_VIRT + 0x10, PALMLD_IDE_VIRT + 0xe); + ide_std_init_ports(&hw, PALMLD_IDE_VIRT + 0x10, PALMLD_IDE_VIRT + 0xe); hw.dev = &dev->dev; - hw.irq = IRQ_GPIO_PALMLD_IDE_IRQ; - set_irq_type(hw.irq, IRQT_RISING); + hw.irq = IRQ_GPIO_PALMLD_IDE_IRQ; + set_irq_type(hw.irq, IRQT_RISING); hd = kmalloc(sizeof(int), GFP_KERNEL); - *hd = ide_register_hw(&hw, NULL); + *hd = ide_register_hw(&hw, NULL); if(*hd == -1) { - printk(KERN_ERR "palmld_ide_probe: unable to register ide hw\n"); + printk(KERN_ERR "palmld_ide_probe: " + "unable to register ide hw\n"); kfree(hd); - hd = NULL; return -ENODEV; } @@ -53,11 +54,11 @@ { int *hd = platform_get_drvdata(dev); - if(hd) { + if (hd) { ide_unregister(*hd); } - // conserve battery where we can + /* conserve battery where we can */ SET_PALMLD_GPIO(IDE_PWEN, 0); return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-03-20 16:43:22
|
Revision: 930 http://svn.sourceforge.net/hackndev/?rev=930&view=rev Author: marex_z71 Date: 2007-03-20 09:43:17 -0700 (Tue, 20 Mar 2007) Log Message: ----------- PalmLD: removing root device while suspended _IS_ a bad idea Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-20 16:40:22 UTC (rev 929) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-20 16:43:17 UTC (rev 930) @@ -68,14 +68,12 @@ static int palmld_ide_suspend(struct platform_device *dev, pm_message_t state) { printk("palmld_ide_suspend: going zzz\n"); - palmld_ide_remove(dev); return 0; } static int palmld_ide_resume(struct platform_device *dev) { printk("palmld_ide_resume: resuming\n"); - palmld_ide_probe(dev); return 0; } #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-05-02 12:41:58
|
Revision: 968 http://svn.sourceforge.net/hackndev/?rev=968&view=rev Author: bobofdoom Date: 2007-05-02 05:41:55 -0700 (Wed, 02 May 2007) Log Message: ----------- ld: Fixed small error in suspend and resume macros when PM is disabled. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-05-01 18:16:08 UTC (rev 967) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-05-02 12:41:55 UTC (rev 968) @@ -77,8 +77,8 @@ return 0; } #else -#define palmld_suspend NULL -#define palmld_resume NULL +#define palmld_ide_suspend NULL +#define palmld_ide_resume NULL #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |