mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-19 08:28:51 +09:00
![wdenk](/assets/img/avatar_default.png)
add FAT support for IDE, SCSI and USB * Patches by Gleb Natapov, 2 Sep 2003: - cleanup of POST code for unsupported architectures - MPC824x locks way0 of data cache for use as initial RAM; this patch unlocks it after relocation to RAM and invalidates the locked entries. * Patch by Gleb Natapov, 30 Aug 2003: new I2C driver for mpc107 bridge. Now works from flash. * Patch by Dave Ellis, 11 Aug 2003: - JFFS2: fix typo in common/cmd_jffs2.c - JFFS2: fix CFG_JFFS2_SORT_FRAGMENTS option - JFFS2: remove node version 0 warning - JFFS2: accept JFFS2 PADDING nodes - SXNI855T: add AM29LV800 support - SXNI855T: move environment from EEPROM to flash - SXNI855T: boot from JFFS2 in NOR or NAND flash * Patch by Bill Hargen, 11 Aug 2003: fixes for I2C on MPC8240 - fix i2c_write routine - fix iprobe command - eliminates use of global variables, plus dead code, cleanup.
119 lines
3.9 KiB
C
119 lines
3.9 KiB
C
/*
|
|
* (C) Copyright 2000, 2001
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
*
|
|
* See file CREDITS for list of people who contributed to this
|
|
* project.
|
|
*
|
|
* 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 program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
* MA 02111-1307 USA
|
|
*/
|
|
#ifndef _PART_H
|
|
#define _PART_H
|
|
|
|
|
|
typedef struct block_dev_desc {
|
|
int if_type; /* type of the interface */
|
|
int dev; /* device number */
|
|
unsigned char part_type; /* partition type */
|
|
unsigned char target; /* target SCSI ID */
|
|
unsigned char lun; /* target LUN */
|
|
unsigned char type; /* device type */
|
|
unsigned long lba; /* number of blocks */
|
|
unsigned long blksz; /* block size */
|
|
unsigned char vendor[40]; /* IDE model, SCSI Vendor */
|
|
unsigned char product[20];/* IDE Serial no, SCSI product */
|
|
unsigned char revision[8];/* firmware revision */
|
|
unsigned char removable; /* removable device */
|
|
unsigned long (*block_read)(int dev,
|
|
unsigned long start,
|
|
unsigned long blkcnt,
|
|
unsigned long *buffer);
|
|
}block_dev_desc_t;
|
|
|
|
/* Interface types: */
|
|
#define IF_TYPE_UNKNOWN 0
|
|
#define IF_TYPE_IDE 1
|
|
#define IF_TYPE_SCSI 2
|
|
#define IF_TYPE_ATAPI 3
|
|
#define IF_TYPE_USB 4
|
|
#define IF_TYPE_DOC 5
|
|
#define IF_TYPE_MMC 6
|
|
|
|
/* Part types */
|
|
#define PART_TYPE_UNKNOWN 0x00
|
|
#define PART_TYPE_MAC 0x01
|
|
#define PART_TYPE_DOS 0x02
|
|
#define PART_TYPE_ISO 0x03
|
|
#define PART_TYPE_AMIGA 0x04
|
|
|
|
/*
|
|
* Type string for U-Boot bootable partitions
|
|
*/
|
|
#define BOOT_PART_TYPE "U-Boot" /* primary boot partition type */
|
|
#define BOOT_PART_COMP "PPCBoot" /* PPCBoot compatibility type */
|
|
|
|
/* device types */
|
|
#define DEV_TYPE_UNKNOWN 0xff /* not connected */
|
|
#define DEV_TYPE_HARDDISK 0x00 /* harddisk */
|
|
#define DEV_TYPE_TAPE 0x01 /* Tape */
|
|
#define DEV_TYPE_CDROM 0x05 /* CD-ROM */
|
|
#define DEV_TYPE_OPDISK 0x07 /* optical disk */
|
|
|
|
typedef struct disk_partition {
|
|
ulong start; /* # of first block in partition */
|
|
ulong size; /* number of blocks in partition */
|
|
ulong blksz; /* block size in bytes */
|
|
uchar name[32]; /* partition name */
|
|
uchar type[32]; /* string type description */
|
|
} disk_partition_t;
|
|
|
|
/* disk/part.c */
|
|
int get_partition_info (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
|
|
void print_part (block_dev_desc_t *dev_desc);
|
|
void init_part (block_dev_desc_t *dev_desc);
|
|
void dev_print(block_dev_desc_t *dev_desc);
|
|
|
|
|
|
#ifdef CONFIG_MAC_PARTITION
|
|
/* disk/part_mac.c */
|
|
int get_partition_info_mac (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
|
|
void print_part_mac (block_dev_desc_t *dev_desc);
|
|
int test_part_mac (block_dev_desc_t *dev_desc);
|
|
#endif
|
|
|
|
#ifdef CONFIG_DOS_PARTITION
|
|
/* disk/part_dos.c */
|
|
int get_partition_info_dos (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
|
|
void print_part_dos (block_dev_desc_t *dev_desc);
|
|
int test_part_dos (block_dev_desc_t *dev_desc);
|
|
#endif
|
|
|
|
#ifdef CONFIG_ISO_PARTITION
|
|
/* disk/part_iso.c */
|
|
int get_partition_info_iso (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
|
|
void print_part_iso (block_dev_desc_t *dev_desc);
|
|
int test_part_iso (block_dev_desc_t *dev_desc);
|
|
#endif
|
|
|
|
#ifdef CONFIG_AMIGA_PARTITION
|
|
/* disk/part_amiga.c */
|
|
int get_partition_info_amiga (block_dev_desc_t * dev_desc, int part, disk_partition_t *info);
|
|
void print_part_amiga (block_dev_desc_t *dev_desc);
|
|
int test_part_amiga (block_dev_desc_t *dev_desc);
|
|
#endif
|
|
|
|
#endif /* _PART_H */
|