2012-10-15 10:30:54 +00:00
|
|
|
#ifndef __MACH_BBU_H
|
|
|
|
#define __MACH_BBU_H
|
|
|
|
|
|
|
|
#include <bbu.h>
|
2013-07-10 07:27:06 +00:00
|
|
|
#include <errno.h>
|
2012-10-15 10:30:54 +00:00
|
|
|
|
|
|
|
struct imx_dcd_entry;
|
|
|
|
struct imx_dcd_v2_entry;
|
|
|
|
|
|
|
|
#ifdef CONFIG_BAREBOX_UPDATE
|
|
|
|
|
|
|
|
int imx51_bbu_internal_mmc_register_handler(const char *name, char *devicefile,
|
2012-11-23 10:24:04 +00:00
|
|
|
unsigned long flags, struct imx_dcd_entry *, int dcdsize,
|
|
|
|
unsigned long app_dest);
|
2012-10-15 10:30:54 +00:00
|
|
|
|
|
|
|
int imx53_bbu_internal_mmc_register_handler(const char *name, char *devicefile,
|
2012-11-23 10:24:04 +00:00
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *, int dcdsize,
|
|
|
|
unsigned long app_dest);
|
2012-10-15 10:30:54 +00:00
|
|
|
|
2012-11-29 09:24:50 +00:00
|
|
|
int imx53_bbu_internal_spi_i2c_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *dcd, int dcdsize,
|
|
|
|
unsigned long app_dest);
|
|
|
|
|
2012-10-15 10:30:54 +00:00
|
|
|
int imx53_bbu_internal_nand_register_handler(const char *name,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *, int dcdsize,
|
2012-11-23 10:24:04 +00:00
|
|
|
int partition_size, unsigned long app_dest);
|
2012-10-15 10:30:54 +00:00
|
|
|
|
2012-11-29 08:05:47 +00:00
|
|
|
int imx6_bbu_internal_mmc_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *, int dcdsize,
|
|
|
|
unsigned long app_dest);
|
|
|
|
|
2012-11-29 09:24:50 +00:00
|
|
|
int imx6_bbu_internal_spi_i2c_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *dcd, int dcdsize,
|
|
|
|
unsigned long app_dest);
|
|
|
|
|
2012-10-15 10:30:54 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
static inline int imx51_bbu_internal_mmc_register_handler(const char *name, char *devicefile,
|
2012-11-23 10:24:04 +00:00
|
|
|
unsigned long flags, struct imx_dcd_entry *dcd, int dcdsize,
|
|
|
|
unsigned long app_dest)
|
2012-10-15 10:30:54 +00:00
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int imx53_bbu_internal_mmc_register_handler(const char *name, char *devicefile,
|
2012-11-23 10:24:04 +00:00
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *dcd, int dcdsize,
|
|
|
|
unsigned long app_dest)
|
2012-10-15 10:30:54 +00:00
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
2012-11-29 09:24:50 +00:00
|
|
|
static inline int imx53_bbu_internal_spi_i2c_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *dcd, int dcdsize,
|
|
|
|
unsigned long app_dest)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
2012-10-15 10:30:54 +00:00
|
|
|
static inline int imx53_bbu_internal_nand_register_handler(const char *name,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *dcd, int dcdsize,
|
2012-11-23 10:24:04 +00:00
|
|
|
int partition_size, unsigned long app_dest)
|
2012-10-15 10:30:54 +00:00
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
2012-11-29 08:05:47 +00:00
|
|
|
static inline int imx6_bbu_internal_mmc_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *dcd, int dcdsize,
|
|
|
|
unsigned long app_dest)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
2012-11-29 09:24:50 +00:00
|
|
|
static inline int imx6_bbu_internal_spi_i2c_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags, struct imx_dcd_v2_entry *dcd, int dcdsize,
|
|
|
|
unsigned long app_dest)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
2012-10-15 10:30:54 +00:00
|
|
|
#endif
|
|
|
|
|
2013-03-11 15:13:25 +00:00
|
|
|
#if defined(CONFIG_BAREBOX_UPDATE_IMX_EXTERNAL_NAND)
|
|
|
|
int imx_bbu_external_nand_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags);
|
|
|
|
#else
|
|
|
|
static inline int imx_bbu_external_nand_register_handler(const char *name, char *devicefile,
|
|
|
|
unsigned long flags)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-10-15 10:30:54 +00:00
|
|
|
struct dcd_table {
|
|
|
|
void *data;
|
|
|
|
unsigned int size;
|
|
|
|
};
|
|
|
|
|
|
|
|
void *imx53_bbu_internal_concat_dcd_table(struct dcd_table *table, int num_entries);
|
|
|
|
|
|
|
|
#endif
|