From a8f01ccff2abf680449b2e694284ecf089b5d9be Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Thu, 27 Apr 2017 00:03:36 +0200 Subject: sunxi: i2c: Add support for DM I2C This commit adds support for DM I2C on sunxi platform. It can coexist with old style sunxi I2C driver, because it is still used in SPL and by some SoCs. Because sunxi platform doesn't yet support DM clk, reset and pinctrl driver, workaround is needed to enable clocks and set resets and pinctrls. This is done by calling i2c_init_board() in board_init(). This means that CONFIG_I2Cx_ENABLE options needs to be correctly set in order to use needed I2C controller. Commit is based on the previous patch made by Philipp Tomsich Signed-off-by: Jernej Skrabec Reviewed-by: Heiko Schocher Signed-off-by: Maxime Ripard --- arch/arm/mach-sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-sunxi/board.c') diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 4507279cc5..65b1ebd837 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -204,7 +204,9 @@ void s_init(void) clock_init(); timer_init(); gpio_init(); +#ifndef CONFIG_DM_I2C i2c_init_board(); +#endif eth_init_board(); } -- cgit