[PATCH 5/6] PPC/MPC5200: re-use the IMX I2C master driver for MPC5200

Juergen Borleis jbe at pengutronix.de
Fri Jul 31 02:03:51 PDT 2015


This IP core is shared between many FSL SoCs. The MPC5200 provides this
core as well.

Signed-off-by: Juergen Borleis <jbe at pengutronix.de>
---
 arch/ppc/mach-mpc5xxx/include/mach/clock.h | 4 ++++
 drivers/i2c/busses/Kconfig                 | 9 +++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/ppc/mach-mpc5xxx/include/mach/clock.h b/arch/ppc/mach-mpc5xxx/include/mach/clock.h
index 4e1a903..b19686f 100644
--- a/arch/ppc/mach-mpc5xxx/include/mach/clock.h
+++ b/arch/ppc/mach-mpc5xxx/include/mach/clock.h
@@ -6,5 +6,9 @@ unsigned long get_cpu_clock(void);
 unsigned long get_ipb_clock(void);
 unsigned long get_pci_clock(void);
 unsigned long get_timebase_clock(void);
+static inline unsigned long fsl_get_i2c_freq(void)
+{
+	return get_ipb_clock();
+}
 
 #endif /* __ASM_ARCH_CLOCKS_H */
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 3962286..181321b 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -17,8 +17,13 @@ config I2C_AT91
 	depends on ARCH_AT91
 
 config I2C_IMX
-	bool "MPC85xx/i.MX I2C Master driver"
-	depends on (ARCH_IMX && !ARCH_IMX1) || ARCH_MPC85XX
+	bool "MPC85xx/MPC5200/i.MX I2C Master driver"
+	depends on (ARCH_IMX && !ARCH_IMX1) || ARCH_MPC85XX || ARCH_MPC5200
+	help
+	  If you say yes to this option, support will be included for many
+	  built-in I2C master controllers found in Freescale SoCs. This is true
+	  for many i.MX ARM based SoCs, for MPC85xx and MPC5200 PowerPC based
+	  SoCs.
 
 config I2C_MV64XXX
 	bool "Marvell mv64xxx I2C Controller"
-- 
2.1.4




More information about the barebox mailing list