/* The 1st I2C bus has an eeprom and a real time clock on
it.
*/
+#ifndef CONFIG_OF
+
static struct i2c_board_info i2c_devs_0[] __initdata = {
{
I2C_BOARD_INFO("24c02", 0x50),
I2C_BOARD_INFO("24c02", 0x55),
},
};
-
+#endif
#ifndef CONFIG_SPI_SPIDEV
l2x0_init(l2cache_base, 0x02060000, 0xF0F0FFFF);
#endif
+#ifndef CONFIG_OF
i2c_register_board_info(0, i2c_devs_0, ARRAY_SIZE(i2c_devs_0));
i2c_register_board_info(1, i2c_devs_1, ARRAY_SIZE(i2c_devs_1));
+#endif
#ifndef CONFIG_SPI_SPIDEV
spi_register_board_info(spi_devs,
bus-id = <0>;
input-clk = <50000000>;
i2c-clk = <100000>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ m24c02_eeprom@50 {
+ compatible = "at,24c02";
+ reg = <0x50>;
+ };
+
+ rtc8564@51 {
+ compatible = "rtc8564";
+ reg = <0x51>;
+ };
};
i2c1: i2c@e0005000 {
bus-id = <1>;
input-clk = <50000000>;
i2c-clk = <100000>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ m24c02_eeprom@55 {
+ compatible = "at,24c02";
+ reg = <0x55>;
+ };
};
gpio0: gpio@e000a000 {
#include <linux/xilinx_devices.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
+#include <linux/of_i2c.h>
/*
* Register Map
dev_err(&pdev->dev, "couldn't determine bus-id\n");
goto err_unmap ;
}
+ id->adap.dev.of_node = pdev->dev.of_node;
#else
id->adap.nr = pdev->id;
#endif
goto err_free_irq;
}
+
+#ifdef CONFIG_OF
+ of_i2c_register_devices(&id->adap);
+#endif
+
dev_info(&pdev->dev, "%d kHz mmio %08lx irq %d\n",
i2c_clk/1000, (unsigned long)r_mem->start, id->irq);