|
@@ -682,3 +682,121 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
|
|
|
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
|
|
|
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
|
|
|
&bfin_sport0_uart_device,
|
|
|
+#endif
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
|
|
|
+ &bfin_sport1_uart_device,
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
|
|
|
+ &isp1362_hcd_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
|
|
|
+ &smc91x_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
|
|
+ &bfin_mii_bus,
|
|
|
+ &bfin_mac_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
|
|
|
+ &net2272_bfin_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
|
|
|
+ &bfin_spi0_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
|
|
|
+ &bfin_pata_device,
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
|
|
|
+ &cm_flash_device,
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+static int __init net2272_init(void)
|
|
|
+{
|
|
|
+#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ ret = gpio_request(GPIO_PH15, driver_name);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
+ ret = gpio_request(GPIO_PH13, "net2272");
|
|
|
+ if (ret) {
|
|
|
+ gpio_free(GPIO_PH15);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Set PH15 Low make /AMS2 work properly */
|
|
|
+ gpio_direction_output(GPIO_PH15, 0);
|
|
|
+
|
|
|
+ /* enable CLKBUF output */
|
|
|
+ bfin_write_VR_CTL(bfin_read_VR_CTL() | CLKBUFOE);
|
|
|
+
|
|
|
+ /* Reset the USB chip */
|
|
|
+ gpio_direction_output(GPIO_PH13, 0);
|
|
|
+ mdelay(2);
|
|
|
+ gpio_set_value(GPIO_PH13, 1);
|
|
|
+#endif
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int __init cm_bf537u_init(void)
|
|
|
+{
|
|
|
+ printk(KERN_INFO "%s(): registering device resources\n", __func__);
|
|
|
+ platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices));
|
|
|
+#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
|
|
|
+ spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
|
|
|
+ irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ if (net2272_init())
|
|
|
+ pr_warning("unable to configure net2272; it probably won't work\n");
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+arch_initcall(cm_bf537u_init);
|
|
|
+
|
|
|
+static struct platform_device *cm_bf537u_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(cm_bf537u_early_devices,
|
|
|
+ ARRAY_SIZE(cm_bf537u_early_devices));
|
|
|
+}
|
|
|
+
|
|
|
+int bfin_get_ether_addr(char *addr)
|
|
|
+{
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(bfin_get_ether_addr);
|