diff options
author | Renaud Barbier <renaud.barbier@ge.com> | 2012-08-31 15:10:35 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-04 11:16:48 +0200 |
commit | 075209e8f3a78f5ae5e5c239ab3120db263b51c2 (patch) | |
tree | 66e2cf26bf75b66d40b46e650090a88eb23cb0d4 /arch/ppc/boards | |
parent | f8e0d6821492074183b366173588d0dda4c8a27d (diff) | |
download | barebox-075209e8f3a78f5ae5e5c239ab3120db263b51c2.tar.gz barebox-075209e8f3a78f5ae5e5c239ab3120db263b51c2.tar.xz |
ppc: p2020rdb i2c support
Support for both i2c busses on the p2020rdb board is added and the
configuration file is updated to add the I2C driver and commands.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/boards')
-rw-r--r-- | arch/ppc/boards/freescale-p2020rdb/p2020rdb.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c index b14aed9286..b9d9b0fdc8 100644 --- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c +++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c @@ -26,6 +26,7 @@ #include <driver.h> #include <ns16550.h> #include <types.h> +#include <i2c/i2c.h> #include <partition.h> #include <memory.h> #include <asm/cache.h> @@ -61,10 +62,20 @@ #define SYSCLK_50 50000000 #define SYSCLK_100 100000000 +/* I2C busses. */ +struct i2c_platform_data i2cplat = { + .bitrate = 400000, +}; + static int devices_init(void) { add_cfi_flash_device(-1, CFG_FLASH_BASE, 16 << 20, 0); + add_generic_device("i2c-fsl", 0, NULL, I2C1_BASE_ADDR, + 0x100, IORESOURCE_MEM, &i2cplat); + add_generic_device("i2c-fsl", 1, NULL, I2C2_BASE_ADDR, + 0x100, IORESOURCE_MEM, &i2cplat); + devfs_add_partition("nor0", 0xf80000, 0x80000, DEVFS_PARTITION_FIXED, "self0"); return 0; |