dslinux/linux-2.6.x/drivers/ide ide-iops.c
amadeus
dslinux_amadeus at user.in-berlin.de
Sun Sep 3 22:22:29 CEST 2006
Update of /cvsroot/dslinux/dslinux/linux-2.6.x/drivers/ide
In directory antilope:/tmp/cvs-serv7204/linux-2.6.x/drivers/ide
Modified Files:
ide-iops.c
Log Message:
First "switching" CF driver for Supercard CF.
Index: ide-iops.c
===================================================================
RCS file: /cvsroot/dslinux/dslinux/linux-2.6.x/drivers/ide/ide-iops.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ide-iops.c 25 Aug 2006 10:32:47 -0000 1.8
+++ ide-iops.c 3 Sep 2006 20:22:27 -0000 1.9
@@ -30,40 +30,6 @@
#include <asm/uaccess.h>
#include <asm/io.h>
-#ifdef CONFIG_IDE_NDS_SUPERCARD
-
-#define NDS_IME (*(volatile u32*)0x04000208)
-
-#define unlock() supercard_unlock()
-#define lock() supercard_lock()
-
-void supercard_unlock( void )
-{
- NDS_IME = 0;
- *(volatile u16 *)0x09fffffe = 0xa55a ;
- *(volatile u16 *)0x09fffffe = 0xa55a ;
- *(volatile u16 *)0x09fffffe = 0x7 ;
- *(volatile u16 *)0x09fffffe = 0x7 ;
-}
-
-void supercard_lock( void )
-{
- *(volatile u16 *)0x09fffffe = 0xa55a ;
- *(volatile u16 *)0x09fffffe = 0xa55a ;
- *(volatile u16 *)0x09fffffe = 0x5 ;
- *(volatile u16 *)0x09fffffe = 0x5 ;
- NDS_IME = 1;
-}
-
-#else
-
-#define unlock() /* nothing */
-#define lock() /* nothing */
-
-#endif
-
-
-
/*
* Conventional PIO operations for ATA devices
*/
@@ -71,89 +37,67 @@
static u8 ide_inb (unsigned long port)
{
u8 val ;
- unlock() ;
val = (u8) inb(port);
- lock() ;
return val ;
}
static u16 ide_inw (unsigned long port)
{
u16 val ;
- unlock() ;
val = (u16) inw(port);
- lock() ;
return val ;
}
static void ide_insw (unsigned long port, void *addr, u32 count)
{
- unlock();
insw(port, addr, count);
- lock();
}
static u32 ide_inl (unsigned long port)
{
u32 val ;
- unlock() ;
val = (u32) inl(port);
- lock() ;
return val ;
}
static void ide_insl (unsigned long port, void *addr, u32 count)
{
- unlock();
insl(port, addr, count);
- lock();
}
static void ide_outb (u8 val, unsigned long port)
{
/* We call outw here because the GameBoyAdvance slot of the
* Nintendo DS cannot write 8bits. It can only write 16bits. */
- unlock() ;
outw(val, port);
- lock() ;
}
static void ide_outbsync (ide_drive_t *drive, u8 addr, unsigned long port)
{
/* We call outw here because the GameBoyAdvance slot of the
* Nintendo DS cannot write 8bits. It can only write 16bits. */
- unlock() ;
outw(addr, port);
- lock() ;
}
static void ide_outw (u16 val, unsigned long port)
{
- unlock();
outw(val, port);
- lock();
}
static void ide_outsw (unsigned long port, void *addr, u32 count)
{
- unlock();
outsw(port, addr, count);
- lock();
}
static void ide_outl (u32 val, unsigned long port)
{
- unlock();
outl(val, port);
- lock();
}
static void ide_outsl (unsigned long port, void *addr, u32 count)
{
- unlock();
outsl(port, addr, count);
- lock();
}
void default_hwif_iops (ide_hwif_t *hwif)
More information about the dslinux-commit
mailing list