m68knommu: platform support for i2c devices on ColdFire SoC
These changes based on work by Steven King <sfking@fdwdc.com> to support the i2c hardware modules on ColdFire SoC family devices. This is the per SoC hardware support. Contains a common platform device setup. Each of the SoC family members tends to have some minor local setup required to initialize the module. But all ColdFire family members use the same i2c hardware module. This i2c hardware module is the same as used in the Freescale iMX ARM based family of SoC devices. Steven's original patches were based on using a new and different i2c-coldfire.c driver. But this is not neccessary as we can use the existing Linux i2c-imx.c driver with no change required to it. And this patch is now based on using the existing i2c-imx driver. This patch only contains the ColdFire platform changes. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Tested-by: Angelo Dureghello <angelo@sysam.it>
This commit is contained in:

committed by
Greg Ungerer

parent
3e5de27e94
commit
2d24b532f9
@@ -36,6 +36,7 @@ DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK);
|
||||
DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK);
|
||||
DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK);
|
||||
DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK);
|
||||
DEFINE_CLK(mcfi2c0, "imx1-i2c.0", MCF_BUSCLK);
|
||||
|
||||
struct clk *mcf_clks[] = {
|
||||
&clk_pll,
|
||||
@@ -49,6 +50,7 @@ struct clk *mcf_clks[] = {
|
||||
&clk_mcfuart2,
|
||||
&clk_mcfqspi0,
|
||||
&clk_fec0,
|
||||
&clk_mcfi2c0,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -64,6 +66,21 @@ static void __init m528x_qspi_init(void)
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static void __init m528x_i2c_init(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_I2C_IMX)
|
||||
u16 paspar;
|
||||
|
||||
/* setup Port AS Pin Assignment Register for I2C */
|
||||
/* set PASPA0 to SCL and PASPA1 to SDA */
|
||||
paspar = readw(MCFGPIO_PASPAR);
|
||||
paspar |= 0xF;
|
||||
writew(paspar, MCFGPIO_PASPAR);
|
||||
#endif /* IS_ENABLED(CONFIG_I2C_IMX) */
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static void __init m528x_uarts_init(void)
|
||||
{
|
||||
u8 port;
|
||||
@@ -127,6 +144,7 @@ void __init config_BSP(char *commandp, int size)
|
||||
m528x_uarts_init();
|
||||
m528x_fec_init();
|
||||
m528x_qspi_init();
|
||||
m528x_i2c_init();
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
Reference in New Issue
Block a user