[U-Boot] [PATCH 05/25] x86: ich6-gpio: Make setup_pch_gpios() a weak function

Simon Glass sjg at chromium.org
Thu Dec 4 23:30:59 CET 2014


Hi Bin,

On 4 December 2014 at 08:00, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Define a weak verion of setup_pch_gpios() in the ich6-gpio driver and
> move the actual setup codes into the board support codes, so that the
> driver does not need to know any platform specific stuff (ie: include
> the platform specifc chipset header file).
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>  arch/x86/include/asm/arch-coreboot/gpio.h  |  3 ++
>  arch/x86/include/asm/arch-ivybridge/gpio.h |  3 ++
>  board/google/chromebook_link/link.c        | 40 +++++++++++++++++++++++
>  drivers/gpio/intel_ich6_gpio.c             | 52 +++---------------------------
>  4 files changed, 50 insertions(+), 48 deletions(-)

Can we dispense with the weak? Let's just get a link error if it is
missing. The problem is that weak functions give no signal when they
are wrong.

If your platform doesn't have it, then you could create an empty
function for now. But really we should (later) refactor this to run
off the device tree somewhere.

Regards,
Simon


More information about the U-Boot mailing list