summaryrefslogtreecommitdiff
path: root/common/cmd_sata.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_sata.c')
-rw-r--r--common/cmd_sata.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/cmd_sata.c b/common/cmd_sata.c
index 79c2495..dd6f1d9 100644
--- a/common/cmd_sata.c
+++ b/common/cmd_sata.c
@@ -29,14 +29,14 @@
#include <sata.h>
int curr_device = -1;
-block_dev_desc_t sata_dev_desc[CFG_SATA_MAX_DEVICE];
+block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
int sata_initialize(void)
{
int rc;
int i;
- for (i = 0; i < CFG_SATA_MAX_DEVICE; i++) {
+ for (i = 0; i < CONFIG_SYS_SATA_MAX_DEVICE; i++) {
memset(&sata_dev_desc[i], 0, sizeof(struct block_dev_desc));
sata_dev_desc[i].if_type = IF_TYPE_SATA;
sata_dev_desc[i].dev = i;
@@ -58,7 +58,7 @@ int sata_initialize(void)
block_dev_desc_t *sata_get_dev(int dev)
{
- return (dev < CFG_SATA_MAX_DEVICE) ? &sata_dev_desc[dev] : NULL;
+ return (dev < CONFIG_SYS_SATA_MAX_DEVICE) ? &sata_dev_desc[dev] : NULL;
}
int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -74,7 +74,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (strncmp(argv[1],"inf", 3) == 0) {
int i;
putc('\n');
- for (i = 0; i < CFG_SATA_MAX_DEVICE; ++i) {
+ for (i = 0; i < CONFIG_SYS_SATA_MAX_DEVICE; ++i) {
if (sata_dev_desc[i].type == DEV_TYPE_UNKNOWN)
continue;
printf ("SATA device %d: ", i);
@@ -82,7 +82,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
return 0;
} else if (strncmp(argv[1],"dev", 3) == 0) {
- if ((curr_device < 0) || (curr_device >= CFG_SATA_MAX_DEVICE)) {
+ if ((curr_device < 0) || (curr_device >= CONFIG_SYS_SATA_MAX_DEVICE)) {
puts("\nno SATA devices available\n");
return 1;
}
@@ -92,7 +92,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
} else if (strncmp(argv[1],"part",4) == 0) {
int dev, ok;
- for (ok = 0, dev = 0; dev < CFG_SATA_MAX_DEVICE; ++dev) {
+ for (ok = 0, dev = 0; dev < CONFIG_SYS_SATA_MAX_DEVICE; ++dev) {
if (sata_dev_desc[dev].part_type != PART_TYPE_UNKNOWN) {
++ok;
if (dev)
@@ -113,7 +113,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int dev = (int)simple_strtoul(argv[2], NULL, 10);
printf("\nSATA device %d: ", dev);
- if (dev >= CFG_SATA_MAX_DEVICE) {
+ if (dev >= CONFIG_SYS_SATA_MAX_DEVICE) {
puts ("unknown device\n");
return 1;
}