|
@@ -799,3 +799,72 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|
|
|
|
|
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
|
|
|
&bfin_i2s,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
|
|
|
+ &bfin_tdm,
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+static int __init ad7160eval_init(void)
|
|
|
+{
|
|
|
+ printk(KERN_INFO "%s(): registering device resources\n", __func__);
|
|
|
+ i2c_register_board_info(0, bfin_i2c_board_info,
|
|
|
+ ARRAY_SIZE(bfin_i2c_board_info));
|
|
|
+ platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
|
|
|
+ spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+arch_initcall(ad7160eval_init);
|
|
|
+
|
|
|
+static struct platform_device *ad7160eval_early_devices[] __initdata = {
|
|
|
+#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
|
+ &bfin_uart0_device,
|
|
|
+#endif
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_UART1
|
|
|
+ &bfin_uart1_device,
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
|
|
|
+ &bfin_sport0_uart_device,
|
|
|
+#endif
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
|
|
|
+ &bfin_sport1_uart_device,
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+void __init native_machine_early_platform_add_devices(void)
|
|
|
+{
|
|
|
+ printk(KERN_INFO "register early platform devices\n");
|
|
|
+ early_platform_add_devices(ad7160eval_early_devices,
|
|
|
+ ARRAY_SIZE(ad7160eval_early_devices));
|
|
|
+}
|
|
|
+
|
|
|
+void native_machine_restart(char *cmd)
|
|
|
+{
|
|
|
+ /* workaround reboot hang when booting from SPI */
|
|
|
+ if ((bfin_read_SYSCR() & 0x7) == 0x3)
|
|
|
+ bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
|
|
|
+}
|
|
|
+
|
|
|
+int bfin_get_ether_addr(char *addr)
|
|
|
+{
|
|
|
+ /* the MAC is stored in OTP memory page 0xDF */
|
|
|
+ u32 ret;
|
|
|
+ u64 otp_mac;
|
|
|
+ u32 (*otp_read)(u32 page, u32 flags, u64 *page_content) = (void *)0xEF00001A;
|
|
|
+
|
|
|
+ ret = otp_read(0xDF, 0x00, &otp_mac);
|
|
|
+ if (!(ret & 0x1)) {
|
|
|
+ char *otp_mac_p = (char *)&otp_mac;
|
|
|
+ for (ret = 0; ret < 6; ++ret)
|
|
|
+ addr[ret] = otp_mac_p[5 - ret];
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(bfin_get_ether_addr);
|