2010-04-26 21:40:16 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
2010-10-22 12:28:43 +00:00
|
|
|
* $Id$
|
2010-04-26 21:40:16 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Marcin Bukat
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef ATA_TARGET_H
|
|
|
|
#define ATA_TARGET_H
|
|
|
|
|
2010-05-11 11:35:58 +00:00
|
|
|
#define ATA_OPTIMIZED_READING
|
2010-05-10 13:24:44 +00:00
|
|
|
#define ATA_OPTIMIZED_WRITING
|
2010-04-26 21:40:16 +00:00
|
|
|
|
|
|
|
#define ATA_IOBASE 0x20000000
|
|
|
|
#define ATA_DATA (*((volatile unsigned short*)(ATA_IOBASE + 0x20)))
|
|
|
|
#define ATA_CONTROL (*((volatile unsigned short*)(ATA_IOBASE + 0x1c)))
|
|
|
|
|
|
|
|
#define ATA_ERROR (*((volatile unsigned short*)(ATA_IOBASE + 0x22)))
|
|
|
|
#define ATA_NSECTOR (*((volatile unsigned short*)(ATA_IOBASE + 0x24)))
|
|
|
|
#define ATA_SECTOR (*((volatile unsigned short*)(ATA_IOBASE + 0x26)))
|
|
|
|
#define ATA_LCYL (*((volatile unsigned short*)(ATA_IOBASE + 0x28)))
|
|
|
|
#define ATA_HCYL (*((volatile unsigned short*)(ATA_IOBASE + 0x2a)))
|
|
|
|
#define ATA_SELECT (*((volatile unsigned short*)(ATA_IOBASE + 0x2c)))
|
|
|
|
#define ATA_COMMAND (*((volatile unsigned short*)(ATA_IOBASE + 0x2e)))
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|