alsa.audio: build the bridge link lib only for linux architecture
[AROS.git] / arch / ppc-sam440 / boot / parthenope / src / uboot.h
blobb750bd1058fe0b73f9920b2390a75e0287b61f56
1 #ifndef UBOOT_H_
2 #define UBOOT_H_
4 /*
5 * $Id$
6 *
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,
20 * MA 02111-1307 USA
23 #include "support.h"
25 register void *global_data asm("r29");
27 /*
28 * This typedefs have to be replaced with proper definitions from
29 * U-Boot headers!
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,
50 unsigned long start,
51 lbaint_t blkcnt, void *buffer);
52 unsigned long (*block_write) (int dev,
53 unsigned long start,
54 lbaint_t blkcnt, const void *buffer);
55 } block_dev_desc_t;
57 /* Interface types: */
58 #define IF_TYPE_UNKNOWN 0
59 #define IF_TYPE_IDE 1
60 #define IF_TYPE_SCSI 2
61 #define IF_TYPE_ATAPI 3
62 #define IF_TYPE_USB 4
63 #define IF_TYPE_DOC 5
64 #define IF_TYPE_MMC 6
66 /* Part types */
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
73 /* device types */
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 */
87 } disk_partition_t;
89 typedef struct {
90 node_t ush_link;
91 uint16_t ush_bustype;
92 uint16_t ush_already_scanned;
93 block_dev_desc_t ush_device;
94 } *SCAN_HANDLE;
96 enum bustype {
97 BUSTYPE_VIA_ATA,
98 BUSTYPE_SCSI,
99 BUSTYPE_USB,
100 BUSTYPE_NET,
101 BUSTYPE_FLOPPY,
102 BUSTYPE_SIL_PARALLEL,
103 BUSTYPE_SIL_SERIAL,
104 BUSTYPE_SIL_4_SERIAL,
106 BUSTYPE_NONE
109 #define NO_ERROR 0
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
116 #endif /*UBOOT_H_ */