1 #include <linux/init.h>
2 #include <linux/module.h>
3 #include <linux/types.h>
4 #include <linux/string.h>
5 #include <linux/mtd/physmap.h>
6 #include <linux/kernel.h>
7 #include <linux/reboot.h>
8 #include <linux/platform_device.h>
9 #include <linux/leds.h>
10 #include <linux/etherdevice.h>
11 #include <linux/reboot.h>
12 #include <linux/time.h>
14 #include <linux/gpio.h>
15 #include <linux/leds.h>
17 #include <asm/bootinfo.h>
21 #include <ifxmips_irq.h>
24 static struct resource dwc_usb_res[] =
27 .name = "dwc3884_membase",
28 .flags = IORESOURCE_MEM,
33 .name = "dwc3884_irq",
34 .flags = IORESOURCE_IRQ,
35 .start = IFXMIPS_USB_INT,
39 static struct platform_device dwc_usb =
41 .name = "dwc3884-hcd",
42 .resource = dwc_usb_res,
43 .num_resources = ARRAY_SIZE(dwc_usb_res),
47 danube_register_usb(void)
49 platform_device_register(&dwc_usb);
53 static struct platform_device ifxmips_ebu_gpio =
55 .name = "ifxmips_ebu",
60 danube_register_ebu_gpio(struct resource *resource, u32 value)
62 ifxmips_ebu_gpio.resource = resource;
63 ifxmips_ebu_gpio.dev.platform_data = (void*)value;
64 platform_device_register(&ifxmips_ebu_gpio);
68 unsigned char ifxmips_ethaddr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
69 static struct resource danube_ethernet_resources =
71 .start = IFXMIPS_PPE32_BASE_ADDR,
72 .end = IFXMIPS_PPE32_BASE_ADDR + IFXMIPS_PPE32_SIZE - 1,
73 .flags = IORESOURCE_MEM,
76 static struct platform_device danube_ethernet =
78 .name = "ifxmips_mii0",
79 .resource = &danube_ethernet_resources,
82 .platform_data = ifxmips_ethaddr,
87 danube_register_ethernet(unsigned char *mac)
90 danube_ethernet.dev.platform_data = mac;
91 platform_device_register(&danube_ethernet);
95 extern int ifxmips_pci_external_clock;
96 extern int ifxmips_pci_req_mask;
99 danube_register_pci(int clock, int irq_mask)
101 ifxmips_pci_external_clock = clock;
103 ifxmips_pci_req_mask = irq_mask;