|
@@ -2937,3 +2937,156 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|
|
#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
|
|
|
&bfin_tdm_pcm,
|
|
|
#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
|
|
|
+ &bfin_ac97_pcm,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
|
|
|
+ defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
|
|
|
+ &bfin_ad1836_machine,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
|
|
|
+ defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
|
|
|
+ &bfin_ad73311_machine,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE)
|
|
|
+ &bfin_ad73311_codec_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
|
|
|
+ &bfin_i2s,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
|
|
|
+ &bfin_tdm,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
|
|
|
+ &bfin_ac97,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
|
|
|
+#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \
|
|
|
+ defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
|
|
|
+ &ad5398_virt_consumer_device,
|
|
|
+#endif
|
|
|
+#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
|
|
|
+ defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
|
|
|
+ &ad5398_userspace_consumer_device,
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
|
|
|
+ &adp_switch_device,
|
|
|
+#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
|
|
|
+ defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
|
|
|
+ &adp122_userspace_consumer_device,
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_IIO_GPIO_TRIGGER) || \
|
|
|
+ defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
|
|
|
+ &iio_gpio_trigger,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \
|
|
|
+ defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE)
|
|
|
+ &bf5xx_adau1373_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \
|
|
|
+ defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
|
|
|
+ &bf5xx_adau1701_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \
|
|
|
+ defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE)
|
|
|
+ &bfin_eval_adav801_device,
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+static int __init net2272_init(void)
|
|
|
+{
|
|
|
+#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ ret = gpio_request(GPIO_PF6, "net2272");
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
+ /* Reset the USB chip */
|
|
|
+ gpio_direction_output(GPIO_PF6, 0);
|
|
|
+ mdelay(2);
|
|
|
+ gpio_set_value(GPIO_PF6, 1);
|
|
|
+#endif
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int __init stamp_init(void)
|
|
|
+{
|
|
|
+ printk(KERN_INFO "%s(): registering device resources\n", __func__);
|
|
|
+ bfin_plat_nand_init();
|
|
|
+ adf702x_mac_init();
|
|
|
+ platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
|
|
|
+ i2c_register_board_info(0, bfin_i2c_board_info,
|
|
|
+ ARRAY_SIZE(bfin_i2c_board_info));
|
|
|
+ spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
|
|
|
+
|
|
|
+ if (net2272_init())
|
|
|
+ pr_warning("unable to configure net2272; it probably won't work\n");
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+arch_initcall(stamp_init);
|
|
|
+
|
|
|
+
|
|
|
+static struct platform_device *stamp_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(stamp_early_devices,
|
|
|
+ ARRAY_SIZE(stamp_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);
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * Currently the MAC address is saved in Flash by U-Boot
|
|
|
+ */
|
|
|
+#define FLASH_MAC 0x203f0000
|
|
|
+int bfin_get_ether_addr(char *addr)
|
|
|
+{
|
|
|
+ *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC);
|
|
|
+ *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(bfin_get_ether_addr);
|