[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>
This commit is contained in:
parent
fbd03a1cbc
commit
a745a62243
|
@ -27,6 +27,7 @@
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/spi/at73c213.h>
|
#include <linux/spi/at73c213.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
|
#include <linux/i2c/at24.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
|
@ -222,6 +223,23 @@ static struct gpio_led ek_leds[] = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C devices
|
||||||
|
*/
|
||||||
|
static struct at24_platform_data at24c512 = {
|
||||||
|
.byte_len = SZ_512K / 8,
|
||||||
|
.page_size = 128,
|
||||||
|
.flags = AT24_FLAG_ADDR16,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct i2c_board_info __initdata ek_i2c_devices[] = {
|
||||||
|
{
|
||||||
|
I2C_BOARD_INFO("24c512", 0x50),
|
||||||
|
.platform_data = &at24c512,
|
||||||
|
},
|
||||||
|
/* more devices can be added using expansion connectors */
|
||||||
|
};
|
||||||
|
|
||||||
static void __init ek_board_init(void)
|
static void __init ek_board_init(void)
|
||||||
{
|
{
|
||||||
/* Serial */
|
/* Serial */
|
||||||
|
@ -239,7 +257,7 @@ static void __init ek_board_init(void)
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
at91_add_device_mmc(0, &ek_mmc_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(NULL, 0);
|
at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
|
||||||
/* SSC (to AT73C213) */
|
/* SSC (to AT73C213) */
|
||||||
at73c213_set_clk(&at73c213_data);
|
at73c213_set_clk(&at73c213_data);
|
||||||
at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
|
at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/spi/ads7846.h>
|
#include <linux/spi/ads7846.h>
|
||||||
|
#include <linux/i2c/at24.h>
|
||||||
#include <linux/fb.h>
|
#include <linux/fb.h>
|
||||||
#include <linux/gpio_keys.h>
|
#include <linux/gpio_keys.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
@ -202,6 +203,24 @@ static struct atmel_nand_data __initdata ek_nand_data = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C devices
|
||||||
|
*/
|
||||||
|
static struct at24_platform_data at24c512 = {
|
||||||
|
.byte_len = SZ_512K / 8,
|
||||||
|
.page_size = 128,
|
||||||
|
.flags = AT24_FLAG_ADDR16,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static struct i2c_board_info __initdata ek_i2c_devices[] = {
|
||||||
|
{
|
||||||
|
I2C_BOARD_INFO("24c512", 0x50),
|
||||||
|
.platform_data = &at24c512,
|
||||||
|
},
|
||||||
|
/* more devices can be added using expansion connectors */
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LCD Controller
|
* LCD Controller
|
||||||
*/
|
*/
|
||||||
|
@ -360,7 +379,7 @@ static void __init ek_board_init(void)
|
||||||
/* NAND */
|
/* NAND */
|
||||||
at91_add_device_nand(&ek_nand_data);
|
at91_add_device_nand(&ek_nand_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(NULL, 0);
|
at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
|
||||||
/* LCD Controller */
|
/* LCD Controller */
|
||||||
at91_add_device_lcdc(&ek_lcdc_data);
|
at91_add_device_lcdc(&ek_lcdc_data);
|
||||||
/* Push Buttons */
|
/* Push Buttons */
|
||||||
|
|
Loading…
Reference in New Issue