Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] IDE/DMA for au1xxx
@ 2007-03-15 12:20 Daniel Mack
  2007-03-15 14:02 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Mack @ 2007-03-15 12:20 UTC (permalink / raw)
  To: linux-mips

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

Hi,

this makes the DMA part of Au1xxx's IDE interface compile again.

Signed-of-by: Daniel Mack <daniel@caiaq.de>



[-- Attachment #2: au1xxx-ide-dma.patch --]
[-- Type: text/plain, Size: 2116 bytes --]

diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index b2dc028..806b6d1 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -443,7 +443,6 @@ static void auide_dma_host_on(ide_drive_t *drive)
 static int auide_dma_on(ide_drive_t *drive)
 {
 	drive->using_dma = 1;
-
 	return 0;
 }
 
@@ -638,6 +637,7 @@ static int au_ide_probe(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	_auide_hwif *ahwif = &auide_hwif;
 	ide_hwif_t *hwif;
+	hw_regs_t *hw;
 	struct resource *res;
 	int ret = 0;
 
@@ -681,7 +681,7 @@ static int au_ide_probe(struct device *dev)
 	/* FIXME:  This might possibly break PCMCIA IDE devices */
 
 	hwif                            = &ide_hwifs[pdev->id];
-	hw_regs_t *hw 			= &hwif->hw;
+	hw 				= &hwif->hw;
 	hwif->irq = hw->irq             = ahwif->irq;
 	hwif->chipset                   = ide_au1xxx;
 
diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h
index e9fa252..e747814 100644
--- a/include/asm-mips/mach-au1x00/au1xxx_ide.h
+++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h
@@ -166,13 +166,13 @@ int __init auide_probe(void);
         static int auide_dma_setup(ide_drive_t *drive);
         static int auide_dma_check(ide_drive_t *drive);
         static int auide_dma_test_irq(ide_drive_t *drive);
-        static int auide_dma_host_off(ide_drive_t *drive);
-        static int auide_dma_host_on(ide_drive_t *drive);
+        static void auide_dma_host_off(ide_drive_t *drive);
+        static void auide_dma_host_on(ide_drive_t *drive);
         static int auide_dma_lostirq(ide_drive_t *drive);
         static int auide_dma_on(ide_drive_t *drive);
         static void auide_ddma_tx_callback(int irq, void *param);
         static void auide_ddma_rx_callback(int irq, void *param);
-        static int auide_dma_off_quietly(ide_drive_t *drive);
+        static void auide_dma_off_quietly(ide_drive_t *drive);
 #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */
 
 /*******************************************************************************

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

* Re: [PATCH] IDE/DMA for au1xxx
  2007-03-15 12:20 [PATCH] IDE/DMA for au1xxx Daniel Mack
@ 2007-03-15 14:02 ` Sergei Shtylyov
  2007-03-15 14:39   ` Daniel Mack
  2007-03-15 20:07   ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2007-03-15 14:02 UTC (permalink / raw)
  To: Daniel Mack; +Cc: linux-mips, linux-ide

Daniel Mack wrote:
> Hi,

> this makes the DMA part of Au1xxx's IDE interface compile again.

> Signed-of-by: Daniel Mack <daniel@caiaq.de>

> ------------------------------------------------------------------------

> diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
> index b2dc028..806b6d1 100644
> --- a/drivers/ide/mips/au1xxx-ide.c
> +++ b/drivers/ide/mips/au1xxx-ide.c
> @@ -443,7 +443,6 @@ static void auide_dma_host_on(ide_drive_t *drive)
>  static int auide_dma_on(ide_drive_t *drive)
>  {
>  	drive->using_dma = 1;
> -
>  	return 0;
>  }
>  
> @@ -638,6 +637,7 @@ static int au_ide_probe(struct device *dev)
>  	struct platform_device *pdev = to_platform_device(dev);
>  	_auide_hwif *ahwif = &auide_hwif;
>  	ide_hwif_t *hwif;
> +	hw_regs_t *hw;
>  	struct resource *res;
>  	int ret = 0;
>  
> @@ -681,7 +681,7 @@ static int au_ide_probe(struct device *dev)
>  	/* FIXME:  This might possibly break PCMCIA IDE devices */
>  
>  	hwif                            = &ide_hwifs[pdev->id];
> -	hw_regs_t *hw 			= &hwif->hw;
> +	hw 				= &hwif->hw;
>  	hwif->irq = hw->irq             = ahwif->irq;
>  	hwif->chipset                   = ide_au1xxx;

    The patch consisting of these 2 hunks has been already posted to linux-ide 
by Ralf... Your patch looks more complete though.

> diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h
> index e9fa252..e747814 100644
> --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h
> +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h
> @@ -166,13 +166,13 @@ int __init auide_probe(void);
>          static int auide_dma_setup(ide_drive_t *drive);
>          static int auide_dma_check(ide_drive_t *drive);
>          static int auide_dma_test_irq(ide_drive_t *drive);
> -        static int auide_dma_host_off(ide_drive_t *drive);
> -        static int auide_dma_host_on(ide_drive_t *drive);
> +        static void auide_dma_host_off(ide_drive_t *drive);
> +        static void auide_dma_host_on(ide_drive_t *drive);
>          static int auide_dma_lostirq(ide_drive_t *drive);
>          static int auide_dma_on(ide_drive_t *drive);
>          static void auide_ddma_tx_callback(int irq, void *param);
>          static void auide_ddma_rx_callback(int irq, void *param);
> -        static int auide_dma_off_quietly(ide_drive_t *drive);
> +        static void auide_dma_off_quietly(ide_drive_t *drive);
>  #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */

    WTF these protos are doing in include/asm-mips/ -- being purely IDE 
subsystem specific?! :-O
    Could you move them into the driver (if they are indeed necessary)?

MBR, Sergei

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

* Re: [PATCH] IDE/DMA for au1xxx
  2007-03-15 14:02 ` Sergei Shtylyov
@ 2007-03-15 14:39   ` Daniel Mack
  2007-03-15 20:07   ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Mack @ 2007-03-15 14:39 UTC (permalink / raw)
  To: linux-mips

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

On Thu, Mar 15, 2007 at 05:02:50PM +0300, Sergei Shtylyov wrote:
> >diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h 
> >b/include/asm-mips/mach-au1x00/au1xxx_ide.h
> >index e9fa252..e747814 100644
> >--- a/include/asm-mips/mach-au1x00/au1xxx_ide.h
> >+++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h
> >@@ -166,13 +166,13 @@ int __init auide_probe(void);
> >         static int auide_dma_setup(ide_drive_t *drive);
> >         static int auide_dma_check(ide_drive_t *drive);
> >         static int auide_dma_test_irq(ide_drive_t *drive);
> >-        static int auide_dma_host_off(ide_drive_t *drive);
> >-        static int auide_dma_host_on(ide_drive_t *drive);
> >+        static void auide_dma_host_off(ide_drive_t *drive);
> >+        static void auide_dma_host_on(ide_drive_t *drive);
> >         static int auide_dma_lostirq(ide_drive_t *drive);
> >         static int auide_dma_on(ide_drive_t *drive);
> >         static void auide_ddma_tx_callback(int irq, void *param);
> >         static void auide_ddma_rx_callback(int irq, void *param);
> >-        static int auide_dma_off_quietly(ide_drive_t *drive);
> >+        static void auide_dma_off_quietly(ide_drive_t *drive);
> > #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */
> 
>    WTF these protos are doing in include/asm-mips/ -- being purely IDE 
> subsystem specific?! :-O
>    Could you move them into the driver (if they are indeed necessary)?

You're right.

This patch removes the static prototypes from the au1xxx_ide.h, some of
them were not even implemented.

Signed-off-by: Daniel Mack <daniel@caiaq.de>



[-- Attachment #2: au1xxx_ide.h.patch --]
[-- Type: text/plain, Size: 2372 bytes --]

diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h
index e9fa252..8fcae21 100644
--- a/include/asm-mips/mach-au1x00/au1xxx_ide.h
+++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h
@@ -141,40 +141,6 @@ static int auide_ddma_init( _auide_hwif *auide );
 static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif);
 int __init auide_probe(void);
 
-#ifdef CONFIG_PM
-        int au1200ide_pm_callback( au1xxx_power_dev_t *dev,
-                                   au1xxx_request_t request, void *data);
-        static int au1xxxide_pm_standby( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_sleep( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_resume( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_getstatus( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_access( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_idle( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_cleanup( au1xxx_power_dev_t *dev );
-#endif
-
-
-/*
- * Multi-Word DMA + DbDMA functions
- */
-#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
-        static int auide_build_sglist(ide_drive_t *drive,  struct request *rq);
-        static int auide_build_dmatable(ide_drive_t *drive);
-        static int auide_dma_end(ide_drive_t *drive);
-        ide_startstop_t auide_dma_intr (ide_drive_t *drive);
-        static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command);
-        static int auide_dma_setup(ide_drive_t *drive);
-        static int auide_dma_check(ide_drive_t *drive);
-        static int auide_dma_test_irq(ide_drive_t *drive);
-        static int auide_dma_host_off(ide_drive_t *drive);
-        static int auide_dma_host_on(ide_drive_t *drive);
-        static int auide_dma_lostirq(ide_drive_t *drive);
-        static int auide_dma_on(ide_drive_t *drive);
-        static void auide_ddma_tx_callback(int irq, void *param);
-        static void auide_ddma_rx_callback(int irq, void *param);
-        static int auide_dma_off_quietly(ide_drive_t *drive);
-#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */
-
 /*******************************************************************************
 * PIO Mode timing calculation :                                                *
 *                                                                              *

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

* Re: [PATCH] IDE/DMA for au1xxx
  2007-03-15 14:02 ` Sergei Shtylyov
  2007-03-15 14:39   ` Daniel Mack
@ 2007-03-15 20:07   ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-03-15 20:07 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Daniel Mack, linux-mips, linux-ide


Hi,

On Thursday 15 March 2007, Sergei Shtylyov wrote:
> Daniel Mack wrote:
> > Hi,
> 
> > this makes the DMA part of Au1xxx's IDE interface compile again.
> 
> > Signed-of-by: Daniel Mack <daniel@caiaq.de>
> 
> > ------------------------------------------------------------------------
> 
> > diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
> > index b2dc028..806b6d1 100644
> > --- a/drivers/ide/mips/au1xxx-ide.c
> > +++ b/drivers/ide/mips/au1xxx-ide.c
> > @@ -443,7 +443,6 @@ static void auide_dma_host_on(ide_drive_t *drive)
> >  static int auide_dma_on(ide_drive_t *drive)
> >  {
> >  	drive->using_dma = 1;
> > -
> >  	return 0;
> >  }
> >  
> > @@ -638,6 +637,7 @@ static int au_ide_probe(struct device *dev)
> >  	struct platform_device *pdev = to_platform_device(dev);
> >  	_auide_hwif *ahwif = &auide_hwif;
> >  	ide_hwif_t *hwif;
> > +	hw_regs_t *hw;
> >  	struct resource *res;
> >  	int ret = 0;
> >  
> > @@ -681,7 +681,7 @@ static int au_ide_probe(struct device *dev)
> >  	/* FIXME:  This might possibly break PCMCIA IDE devices */
> >  
> >  	hwif                            = &ide_hwifs[pdev->id];
> > -	hw_regs_t *hw 			= &hwif->hw;
> > +	hw 				= &hwif->hw;
> >  	hwif->irq = hw->irq             = ahwif->irq;
> >  	hwif->chipset                   = ide_au1xxx;
> 
>     The patch consisting of these 2 hunks has been already posted to linux-ide 
> by Ralf... Your patch looks more complete though.

I applied Ralf's one and I would merge this one but I'm not on linux-mips ML.

Daniel, please resend the original patch to linux-ide ML.

> > diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h
> > index e9fa252..e747814 100644
> > --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h
> > +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h
> > @@ -166,13 +166,13 @@ int __init auide_probe(void);
> >          static int auide_dma_setup(ide_drive_t *drive);
> >          static int auide_dma_check(ide_drive_t *drive);
> >          static int auide_dma_test_irq(ide_drive_t *drive);
> > -        static int auide_dma_host_off(ide_drive_t *drive);
> > -        static int auide_dma_host_on(ide_drive_t *drive);
> > +        static void auide_dma_host_off(ide_drive_t *drive);
> > +        static void auide_dma_host_on(ide_drive_t *drive);
> >          static int auide_dma_lostirq(ide_drive_t *drive);
> >          static int auide_dma_on(ide_drive_t *drive);
> >          static void auide_ddma_tx_callback(int irq, void *param);
> >          static void auide_ddma_rx_callback(int irq, void *param);
> > -        static int auide_dma_off_quietly(ide_drive_t *drive);
> > +        static void auide_dma_off_quietly(ide_drive_t *drive);
> >  #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */
> 
>     WTF these protos are doing in include/asm-mips/ -- being purely IDE 
> subsystem specific?! :-O
>     Could you move them into the driver (if they are indeed necessary)?

seconded, this is a good idea

Thanks,
Bart

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

end of thread, other threads:[~2007-03-15 20:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-15 12:20 [PATCH] IDE/DMA for au1xxx Daniel Mack
2007-03-15 14:02 ` Sergei Shtylyov
2007-03-15 14:39   ` Daniel Mack
2007-03-15 20:07   ` Bartlomiej Zolnierkiewicz

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