2012-09-09 22:05:28 +08:00
|
|
|
/*
|
|
|
|
* RouterBoot definitions
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 as published
|
|
|
|
* by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ATH79_ROUTERBOOT_H_
|
|
|
|
#define _ATH79_ROUTERBOOT_H_
|
|
|
|
|
2013-12-16 18:11:01 +08:00
|
|
|
struct rb_info {
|
|
|
|
unsigned int hard_cfg_offs;
|
|
|
|
unsigned int hard_cfg_size;
|
|
|
|
void *hard_cfg_data;
|
|
|
|
unsigned int soft_cfg_offs;
|
|
|
|
|
|
|
|
const char *board_name;
|
|
|
|
u32 hw_options;
|
|
|
|
};
|
|
|
|
|
2012-09-09 22:05:28 +08:00
|
|
|
#ifdef CONFIG_ATH79_ROUTERBOOT
|
2013-12-16 18:11:01 +08:00
|
|
|
const struct rb_info *rb_init_info(void *data, unsigned int size);
|
|
|
|
void *rb_get_wlan_data(void);
|
|
|
|
|
2012-09-09 22:05:28 +08:00
|
|
|
int routerboot_find_tag(u8 *buf, unsigned int buflen, u16 tag_id,
|
|
|
|
u8 **tag_data, u16 *tag_len);
|
2013-05-14 03:13:33 +08:00
|
|
|
int routerboot_find_magic(u8 *buf, unsigned int buflen, u32 *offset, bool hard);
|
2012-09-09 22:05:28 +08:00
|
|
|
#else
|
2013-12-16 18:11:01 +08:00
|
|
|
static inline const struct rb_info *
|
|
|
|
rb_init_info(void *data, unsigned int size)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void *rb_get_wlan_data(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2012-09-09 22:05:28 +08:00
|
|
|
static inline int
|
|
|
|
routerboot_find_tag(u8 *buf, unsigned int buflen, u16 tag_id,
|
|
|
|
u8 **tag_data, u16 *tag_len)
|
|
|
|
{
|
|
|
|
return -ENOENT;
|
|
|
|
}
|
2013-05-14 03:13:33 +08:00
|
|
|
|
|
|
|
static inline int
|
|
|
|
routerboot_find_magic(u8 *buf, unsigned int buflen, u32 *offset, bool hard)
|
|
|
|
{
|
|
|
|
return -ENOENT;
|
|
|
|
}
|
2012-09-09 22:05:28 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _ATH79_ROUTERBOOT_H_ */
|