|
@@ -421,3 +421,121 @@ static struct resource bfin_sir0_resources[] = {
|
|
|
|
|
|
static struct platform_device bfin_sir0_device = {
|
|
static struct platform_device bfin_sir0_device = {
|
|
.name = "bfin_sir",
|
|
.name = "bfin_sir",
|
|
|
|
+ .id = 0,
|
|
|
|
+ .num_resources = ARRAY_SIZE(bfin_sir0_resources),
|
|
|
|
+ .resource = bfin_sir0_resources,
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+#ifdef CONFIG_BFIN_SIR1
|
|
|
|
+static struct resource bfin_sir1_resources[] = {
|
|
|
|
+ {
|
|
|
|
+ .start = 0xFFC02000,
|
|
|
|
+ .end = 0xFFC020FF,
|
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .start = IRQ_UART1_RX,
|
|
|
|
+ .end = IRQ_UART1_RX+1,
|
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .start = CH_UART1_RX,
|
|
|
|
+ .end = CH_UART1_RX+1,
|
|
|
|
+ .flags = IORESOURCE_DMA,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device bfin_sir1_device = {
|
|
|
|
+ .name = "bfin_sir",
|
|
|
|
+ .id = 1,
|
|
|
|
+ .num_resources = ARRAY_SIZE(bfin_sir1_resources),
|
|
|
|
+ .resource = bfin_sir1_resources,
|
|
|
|
+};
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+static struct platform_device *stamp_devices[] __initdata = {
|
|
|
|
+#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
|
|
|
|
+ &bfin_pcmcia_cf_device,
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
|
|
|
|
+ &rtc_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_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
|
|
|
|
+ &bfin_fb_device,
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
|
|
+ &bfin_uart0_device,
|
|
|
|
+#endif
|
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_UART1
|
|
|
|
+ &bfin_uart1_device,
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
|
|
|
+#ifdef CONFIG_BFIN_SIR0
|
|
|
|
+ &bfin_sir0_device,
|
|
|
|
+#endif
|
|
|
|
+#ifdef CONFIG_BFIN_SIR1
|
|
|
|
+ &bfin_sir1_device,
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static int __init pnav_init(void)
|
|
|
|
+{
|
|
|
|
+ printk(KERN_INFO "%s(): registering device resources\n", __func__);
|
|
|
|
+ platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_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
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+arch_initcall(pnav_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
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+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));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+int bfin_get_ether_addr(char *addr)
|
|
|
|
+{
|
|
|
|
+ return 1;
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL(bfin_get_ether_addr);
|