aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9260ek.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-09-04 19:34:50 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-18 18:11:56 -0400
commita745a622434d9c3ff6505125b37fd6828ecadb87 (patch)
tree39d1c755f30a290240d58e9d3671913e5526fdf8 /arch/arm/mach-at91/board-sam9260ek.c
parentfbd03a1cbc04833a952b0d603df96e4800445979 (diff)
[ARM] 5240/1: AT91: eeproms on sam9260ek, sam9263ek
The at91sam9260 and at91sam9263 EK boards have 64 KiB I2C EEPROMs. This patch declares them in the board init code so the new at24 driver will use them. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/board-sam9260ek.c')
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index cb20e70b3b06..0a53c038b518 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -27,6 +27,7 @@
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/at73c213.h> 28#include <linux/spi/at73c213.h>
29#include <linux/clk.h> 29#include <linux/clk.h>
30#include <linux/i2c/at24.h>
30 31
31#include <mach/hardware.h> 32#include <mach/hardware.h>
32#include <asm/setup.h> 33#include <asm/setup.h>
@@ -222,6 +223,23 @@ static struct gpio_led ek_leds[] = {
222 } 223 }
223}; 224};
224 225
226/*
227 * I2C devices
228 */
229static struct at24_platform_data at24c512 = {
230 .byte_len = SZ_512K / 8,
231 .page_size = 128,
232 .flags = AT24_FLAG_ADDR16,
233};
234
235static struct i2c_board_info __initdata ek_i2c_devices[] = {
236 {
237 I2C_BOARD_INFO("24c512", 0x50),
238 .platform_data = &at24c512,
239 },
240 /* more devices can be added using expansion connectors */
241};
242
225static void __init ek_board_init(void) 243static void __init ek_board_init(void)
226{ 244{
227 /* Serial */ 245 /* Serial */
@@ -239,7 +257,7 @@ static void __init ek_board_init(void)
239 /* MMC */ 257 /* MMC */
240 at91_add_device_mmc(0, &ek_mmc_data); 258 at91_add_device_mmc(0, &ek_mmc_data);
241 /* I2C */ 259 /* I2C */
242 at91_add_device_i2c(NULL, 0); 260 at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
243 /* SSC (to AT73C213) */ 261 /* SSC (to AT73C213) */
244 at73c213_set_clk(&at73c213_data); 262 at73c213_set_clk(&at73c213_data);
245 at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); 263 at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);