OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [stdalone/] [dskchk/] [idedsk.h] - Blame information for rev 130

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 hellwig
/*
2
 * idedsk.h -- IDE disk definitions
3
 */
4
 
5
 
6
#ifndef _IDEDSK_H_
7
#define _IDEDSK_H_
8
 
9
 
10
#define SECTOR_SIZE     512
11
#define WPS             (SECTOR_SIZE / sizeof(unsigned int))
12
#define BLOCK_SIZE      4096
13
#define WPB             (BLOCK_SIZE / sizeof(unsigned int))
14
 
15
#define DISK_BASE       ((unsigned *) 0xF0400000)  /* disk base address */
16
#define DISK_CTRL       (DISK_BASE + 0)         /* control/status register */
17
#define DISK_CNT        (DISK_BASE + 1)         /* sector count register */
18
#define DISK_SCT        (DISK_BASE + 2)         /* disk sector register */
19
#define DISK_CAP        (DISK_BASE + 3)         /* disk capacity register */
20
#define DISK_BUFFER     ((unsigned *) 0xF0480000)  /* address of disk buffer */
21
 
22
#define DISK_CTRL_STRT  0x01    /* a 1 written here starts the disk command */
23
#define DISK_CTRL_IEN   0x02    /* enable disk interrupt */
24
#define DISK_CTRL_WRT   0x04    /* command type: 0 = read, 1 = write */
25
#define DISK_CTRL_ERR   0x08    /* 0 = ok, 1 = error; valid when DONE = 1 */
26
#define DISK_CTRL_DONE  0x10    /* 1 = disk has finished the command */
27
#define DISK_CTRL_READY 0x20    /* 1 = capacity valid, disk accepts command */
28
 
29
#define DISK_IRQ        8       /* disk interrupt number */
30
 
31
#define READY_RETRIES   1000000 /* retries to wait for disk to get ready */
32
 
33
 
34
#endif /* _IDEDSK_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.