[U-Boot] [PATCH v4] Export redesign

Simon Glass sjg at chromium.org
Tue Dec 9 17:04:23 CET 2014


On 8 December 2014 at 00:23, Martin Dorwig <dorwig at tetronik.com> wrote:
> this is an atempt to make the export of functions typesafe.
> I replaced the jumptable void ** by a struct (jt_funcs) with function pointers.
> The EXPORT_FUNC macro now has 3 fixed parameters and one
> variadic parameter
> The first is the name of the exported function,
> the rest of the parameters are used to format a functionpointer
> in the jumptable,
>
> the EXPORT_FUNC macros are expanded three times,
> 1. to declare the members of the struct
> 2. to initialize the structmember pointers
> 3. to call the functions in stubs.c
>
> Signed-off-by: Martin Dorwig <dorwig at tetronik.com>

Acked-by: Simon Glass <sjg at chromium.org>

Tested on Pit (ARM-based) and chromebook_link (x86).

Tested-by: Simon Glass <sjg at chromium.org>

Everything seems to build OK but for two 'exceeding area limit'
problems which I assume we can ignore.

> ---
>
> Changes in v4:
> - add forward decl. for struct spi_slave to export.h
>
> Changes in v3:
> - install_hdlr/free_hdlr must be dummy, since they do not exist
> - blackfin cpu.c must include exports.h
> - rebased to master
> - take CONFIG_DM_SPI into account
>
> Changes in v2:
> - redesign the way functions are exported to standalone applications


More information about the U-Boot mailing list