7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 register void *global_data
asm("r29");
28 * This typedefs have to be replaced with proper definitions from
31 typedef void cmd_tbl_t
;
33 typedef unsigned long lbaint_t
;
35 typedef struct block_dev_desc
{
36 int if_type
; /* type of the interface */
37 int dev
; /* device number */
38 unsigned char part_type
; /* partition type */
39 unsigned char target
; /* target SCSI ID */
40 unsigned char lun
; /* target LUN */
41 unsigned char type
; /* device type */
42 unsigned char removable
; /* removable device */
43 unsigned char lba48
; /* device can use 48bit addr (ATA/ATAPI v7) */
44 lbaint_t lba
; /* number of blocks */
45 unsigned long blksz
; /* block size */
46 unsigned char vendor
[40 + 1]; /* IDE model, SCSI Vendor */
47 unsigned char product
[20 + 1]; /* IDE Serial no, SCSI product */
48 unsigned char revision
[8 + 1]; /* firmware revision */
49 unsigned long (*block_read
) (int dev
,
51 lbaint_t blkcnt
, void *buffer
);
52 unsigned long (*block_write
) (int dev
,
54 lbaint_t blkcnt
, const void *buffer
);
57 /* Interface types: */
58 #define IF_TYPE_UNKNOWN 0
60 #define IF_TYPE_SCSI 2
61 #define IF_TYPE_ATAPI 3
67 #define PART_TYPE_UNKNOWN 0x00
68 #define PART_TYPE_MAC 0x01
69 #define PART_TYPE_DOS 0x02
70 #define PART_TYPE_ISO 0x03
71 #define PART_TYPE_AMIGA 0x04
74 #define DEV_TYPE_UNKNOWN 0xff /* not connected */
75 #define DEV_TYPE_HARDDISK 0x00 /* harddisk */
76 #define DEV_TYPE_TAPE 0x01 /* Tape */
77 #define DEV_TYPE_CDROM 0x05 /* CD-ROM */
78 #define DEV_TYPE_OPDISK 0x07 /* optical disk */
79 #define DEV_TYPE_NETBOOT 0x81 /* Netboot through TFTP */
81 typedef struct disk_partition
{
82 unsigned start
; /* # of first block in partition */
83 uint32_t size
; /* number of blocks in partition */
84 uint32_t blksz
; /* block size in bytes */
85 uint8_t name
[32]; /* partition name */
86 uint8_t type
[32]; /* string type description */
92 uint16_t ush_already_scanned
;
93 block_dev_desc_t ush_device
;
102 BUSTYPE_SIL_PARALLEL
,
104 BUSTYPE_SIL_4_SERIAL
,
110 #define ERROR_NO_MEMORY -1
111 #define ERROR_OLD_SLB -2
112 #define ERROR_OLD_UBOOT -3
113 #define ERROR_NO_CONFIG -4
114 #define ERROR_LOAD_ERROR -5