Patchwork [U-Boot,2/3] nand: Add common functions to linux/mtd/nand.h

login
register
mail settings
Submitter Simon Schwarz
Date Oct. 16, 2011, 10:50 a.m.
Message ID <1318762212-6763-3-git-send-email-simonschwarzcor@gmail.com>
Download mbox | patch
Permalink /patch/120027/
State Superseded
Headers show

Comments

Simon Schwarz - Oct. 16, 2011, 10:50 a.m.
Functions often used in SPL are now part of linux/mtd/nand.h.

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
Cc: scottwood@freescale.com
Cc: s-paulraj@ti.com
Cc: albert.u.boot@aribaud.net
---
Changes V2:
CHG moved function definiton from nand.h to linux/mtd/nand.h because of:
	http://article.gmane.org/gmane.comp.boot-loaders.u-boot/110219
---
 include/linux/mtd/nand.h |    7 +++++++
 include/nand.h           |    3 ---
 2 files changed, 7 insertions(+), 3 deletions(-)
Scott Wood - Oct. 28, 2011, 8:46 p.m.
On 10/16/2011 05:50 AM, Simon Schwarz wrote:
> Functions often used in SPL are now part of linux/mtd/nand.h.
> 
> Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
> Cc: scottwood@freescale.com
> Cc: s-paulraj@ti.com
> Cc: albert.u.boot@aribaud.net
> ---
> Changes V2:
> CHG moved function definiton from nand.h to linux/mtd/nand.h because of:
> 	http://article.gmane.org/gmane.comp.boot-loaders.u-boot/110219
> ---
>  include/linux/mtd/nand.h |    7 +++++++
>  include/nand.h           |    3 ---
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index 987a2ec..2419c6c 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -624,3 +624,10 @@ struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
>  }
>  
>  #endif /* __LINUX_MTD_NAND_H */
> +
> +/* Standard NAND functions from nand_base.c */
> +void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len);
> +void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len);
> +void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len);
> +void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len);
> +uint8_t nand_read_byte(struct mtd_info *mtd);

These need to go before the #endif.

-Scott

Patch

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 987a2ec..2419c6c 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -624,3 +624,10 @@  struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
 }
 
 #endif /* __LINUX_MTD_NAND_H */
+
+/* Standard NAND functions from nand_base.c */
+void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len);
+void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len);
+void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len);
+void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len);
+uint8_t nand_read_byte(struct mtd_info *mtd);
diff --git a/include/nand.h b/include/nand.h
index b4140794..d444ddc 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -135,9 +135,6 @@  int nand_get_lock_status(nand_info_t *meminfo, loff_t offset);
 int nand_spl_load_image(uint32_t offs, unsigned int size, void *dst);
 void nand_deselect(void);
 
-void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len);
-void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len);
-
 #ifdef CONFIG_SYS_NAND_SELECT_DEVICE
 void board_nand_select_device(struct nand_chip *nand, int chip);
 #endif