diff options
author | Dave Liu <r63238@freescale.com> | 2008-03-26 22:49:44 +0800 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-03-26 23:38:51 +0100 |
commit | c7057b529c3c3cb9c0ac9060686a4068f1491bbe (patch) | |
tree | 8525c3cd0fabf30fe590d91cfb1902519191993b /disk | |
parent | 83c7f470a4ce94f33600f11ae85ce4dcf00aa90c (diff) | |
download | u-boot-imx-c7057b529c3c3cb9c0ac9060686a4068f1491bbe.zip u-boot-imx-c7057b529c3c3cb9c0ac9060686a4068f1491bbe.tar.gz u-boot-imx-c7057b529c3c3cb9c0ac9060686a4068f1491bbe.tar.bz2 |
ata: add the support for SATA framework
- add the SATA framework
- add the SATA command line
Signed-off-by: Dave Liu <daveliu@freescale.com>
Diffstat (limited to 'disk')
-rw-r--r-- | disk/part.c | 14 | ||||
-rw-r--r-- | disk/part_dos.c | 2 | ||||
-rw-r--r-- | disk/part_iso.c | 2 | ||||
-rw-r--r-- | disk/part_mac.c | 1 |
4 files changed, 19 insertions, 0 deletions
diff --git a/disk/part.c b/disk/part.c index 56b9427..3c71208 100644 --- a/disk/part.c +++ b/disk/part.c @@ -35,6 +35,7 @@ #endif #if (defined(CONFIG_CMD_IDE) || \ + defined(CONFIG_CMD_SATA) || \ defined(CONFIG_CMD_SCSI) || \ defined(CONFIG_CMD_USB) || \ defined(CONFIG_MMC) || \ @@ -49,6 +50,9 @@ static const struct block_drvr block_drvr[] = { #if defined(CONFIG_CMD_IDE) { .name = "ide", .get_dev = ide_get_dev, }, #endif +#if defined(CONFIG_CMD_SATA) + {.name = "sata", .get_dev = sata_get_dev, }, +#endif #if defined(CONFIG_CMD_SCSI) { .name = "scsi", .get_dev = scsi_get_dev, }, #endif @@ -87,6 +91,7 @@ block_dev_desc_t *get_dev(char* ifname, int dev) #endif #if (defined(CONFIG_CMD_IDE) || \ + defined(CONFIG_CMD_SATA) || \ defined(CONFIG_CMD_SCSI) || \ defined(CONFIG_CMD_USB) || \ defined(CONFIG_MMC) || \ @@ -116,6 +121,12 @@ void dev_print (block_dev_desc_t *dev_desc) dev_desc->vendor, dev_desc->revision, dev_desc->product); + } + if (dev_desc->if_type==IF_TYPE_SATA) { + printf ("Model: %s Firm: %s Ser#: %s\n", + dev_desc->vendor, + dev_desc->revision, + dev_desc->product); } else { printf ("Vendor: %s Prod.: %s Rev: %s\n", dev_desc->vendor, @@ -177,6 +188,7 @@ void dev_print (block_dev_desc_t *dev_desc) #endif #if (defined(CONFIG_CMD_IDE) || \ + defined(CONFIG_CMD_SATA) || \ defined(CONFIG_CMD_SCSI) || \ defined(CONFIG_CMD_USB) || \ defined(CONFIG_MMC) || \ @@ -271,6 +283,8 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc) switch (dev_desc->if_type) { case IF_TYPE_IDE: puts ("IDE"); break; + case IF_TYPE_SATA: puts ("SATA"); + break; case IF_TYPE_SCSI: puts ("SCSI"); break; case IF_TYPE_ATAPI: puts ("ATAPI"); diff --git a/disk/part_dos.c b/disk/part_dos.c index 4707f80..4d778ec 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -36,6 +36,7 @@ #include "part_dos.h" #if (defined(CONFIG_CMD_IDE) || \ + defined(CONFIG_CMD_SATA) || \ defined(CONFIG_CMD_SCSI) || \ defined(CONFIG_CMD_USB) || \ defined(CONFIG_MMC) || \ @@ -194,6 +195,7 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part info->size = le32_to_int (pt->size4); switch(dev_desc->if_type) { case IF_TYPE_IDE: + case IF_TYPE_SATA: case IF_TYPE_ATAPI: sprintf ((char *)info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num); break; diff --git a/disk/part_iso.c b/disk/part_iso.c index 06dd75e..4894630 100644 --- a/disk/part_iso.c +++ b/disk/part_iso.c @@ -27,6 +27,7 @@ #if (defined(CONFIG_CMD_IDE) || \ defined(CONFIG_CMD_SCSI) || \ + defined(CONFIG_CMD_SATA) || \ defined(CONFIG_CMD_USB) || \ defined(CONFIG_MMC) || \ defined(CONFIG_SYSTEMACE) ) && defined(CONFIG_ISO_PARTITION) @@ -157,6 +158,7 @@ int get_partition_info_iso_verb(block_dev_desc_t * dev_desc, int part_num, disk_ sprintf ((char *)info->type, "U-Boot"); switch(dev_desc->if_type) { case IF_TYPE_IDE: + case IF_TYPE_SATA: case IF_TYPE_ATAPI: sprintf ((char *)info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num); break; diff --git a/disk/part_mac.c b/disk/part_mac.c index d303a73..1922fe5 100644 --- a/disk/part_mac.c +++ b/disk/part_mac.c @@ -36,6 +36,7 @@ #if (defined(CONFIG_CMD_IDE) || \ defined(CONFIG_CMD_SCSI) || \ + defined(CONFIG_CMD_SATA) || \ defined(CONFIG_CMD_USB) || \ defined(CONFIG_MMC) || \ defined(CONFIG_SYSTEMACE) ) && defined(CONFIG_MAC_PARTITION) |