common: env: support sata device
PATCH v2 1/1 common: env: support sata device
Introduce env support for sata device.
1. Implement write_env/read_env/env_relocate_spec/saveenv/sata_get_env_dev
2. If want to enable this feature, define CONFIG_ENV_IS_IN_SATA, and define CONFIG_SYS_SATA_ENV_DEV or implement your own sata_get_ev_dev.
---
V2:
Add error msg when ENV REDUND, since not supported now. Discard ent_ptr
Use blk_dread/blk_dwrite
cmd/nvedit.c | 3 +- common/Makefile | 1 + common/env_sata.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 common/env_sata.c
cmd/nvedit.c +2 -1
@@ -49,12 +49,13 @@ DECLARE_GLOBAL_DATA_PTR; !defined (CONFIG_ENV_IS_IN_NAND ) && \ !defined (CONFIG_ENV_IS_IN_NVRAM ) && \ !defined (CONFIG_ENV_IS_IN_ONENAND ) && \ + !defined (CONFIG_ENV_IS_IN_SATA ) && \ !defined (CONFIG_ENV_IS_IN_SPI_FLASH ) && \ !defined (CONFIG_ENV_IS_IN_REMOTE ) && \ !defined (CONFIG_ENV_IS_IN_UBI ) && \ !defined(CONFIG_ENV_IS_NOWHERE)# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\ -SPI_FLASH|NVRAM|MMC|FAT|EXT4|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE +SATA|SPI_FLASH|NVRAM|MMC|FAT|EXT4|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE#endif /*
common/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_ENV_IS_IN_EXT4) += env_ext4.o obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o +obj-$(CONFIG_ENV_IS_IN_SATA) += env_sata.o obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
common/env_sata.c new file +129 -0
129 lines not on this page · raw message
Signature · 1 line
2.6.2
PATCH v2 1/1 common: env: support sata device
Quoted 4 lines · Peng Fan
Introduce env support for sata device.
1. Implement write_env/read_env/env_relocate_spec/saveenv/sata_get_env_dev
2. If want to enable this feature, defineCONFIG_ENV_IS_IN_SATA, and defineCONFIG_SYS_SATA_ENV_DEVor implement your ownsata_get_ev_dev.
[snip]
common/env_sata.c line 107
Quoted 3 lines
common/env_sata.c new file +3
-0+void env_relocate_spec (void ) +{ +#if !defined(ENV_IS_EMBEDDED )
Forgot about this test here too, thanks.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160401/1437f1fe/attachment.sig>