
Hi Simon,
On Fri, Dec 5, 2014 at 6:30 AM, Simon Glass sjg@chromium.org wrote:
Hi Bin,
On 4 December 2014 at 08:00, Bin Meng bmeng.cn@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@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.
Sure, will do in v2.
Regards, Bin