Lines Matching full:sata
15 #include <sata.h>
32 static inline int write_env(struct blk_desc *sata, unsigned long size, in write_env() argument
37 blk_start = ALIGN(offset, sata->blksz) / sata->blksz; in write_env()
38 blk_cnt = ALIGN(size, sata->blksz) / sata->blksz; in write_env()
40 n = blk_dwrite(sata, blk_start, blk_cnt, buffer); in write_env()
48 struct blk_desc *sata = NULL; in env_sata_save() local
56 sata = sata_get_dev(env_sata); in env_sata_save()
57 if (sata == NULL) { in env_sata_save()
58 printf("Unknown SATA(%d) device for environment!\n", in env_sata_save()
67 printf("Writing to SATA(%d)...", env_sata); in env_sata_save()
68 if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, (u_char *)env_new)) { in env_sata_save()
78 static inline int read_env(struct blk_desc *sata, unsigned long size, in read_env() argument
83 blk_start = ALIGN(offset, sata->blksz) / sata->blksz; in read_env()
84 blk_cnt = ALIGN(size, sata->blksz) / sata->blksz; in read_env()
86 n = blk_dread(sata, blk_start, blk_cnt, buffer); in read_env()
94 struct blk_desc *sata = NULL; in env_sata_load() local
102 sata = sata_get_dev(env_sata); in env_sata_load()
103 if (sata == NULL) { in env_sata_load()
104 printf("Unknown SATA(%d) device for environment!\n", env_sata); in env_sata_load()
108 if (read_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) { in env_sata_load()
116 U_BOOT_ENV_LOCATION(sata) = {
118 ENV_NAME("SATA")