3fe8f1fadef06fe4494ad9d35f56aa50a0e03bf7
[openwrt.git] / target / linux / ifxmips / files-2.6.33 / arch / mips / ifxmips / danube / mach-easy4010.c
1 #include <linux/init.h>
2 #include <linux/platform_device.h>
3 #include <linux/leds.h>
4 #include <linux/gpio.h>
5 #include <linux/gpio_buttons.h>
6 #include <linux/mtd/mtd.h>
7 #include <linux/mtd/partitions.h>
8 #include <linux/mtd/physmap.h>
9 #include <linux/input.h>
10
11 #include <machine.h>
12 #include <ifxmips_prom.h>
13
14 #include "devices.h"
15
16 extern unsigned char ifxmips_ethaddr[6];
17
18 #ifdef CONFIG_MTD_PARTITIONS
19 static struct mtd_partition easy4010_partitions[] =
20 {
21 {
22 .name = "uboot",
23 .offset = 0x0,
24 .size = 0x40000,
25 },
26 {
27 .name = "uboot_env",
28 .offset = 0x40000,
29 .size = 0x10000,
30 },
31 {
32 .name = "kernel",
33 .offset = 0x0,
34 .size = 0x0,
35 },
36 {
37 .name = "rootfs",
38 .offset = 0x0,
39 .size = 0x0,
40 }
41 };
42 #endif
43
44 static struct physmap_flash_data easy4010_flash_data = {
45 #ifdef CONFIG_MTD_PARTITIONS
46 .nr_parts = ARRAY_SIZE(easy4010_partitions),
47 .parts = easy4010_partitions,
48 #endif
49 };
50
51 static struct gpio_led easy4010_leds[] = {
52 { .name = "ifx:green:test0", .gpio = 0,},
53 { .name = "ifx:green:test1", .gpio = 1,},
54 { .name = "ifx:green:test2", .gpio = 2,},
55 { .name = "ifx:green:test3", .gpio = 3,},
56 };
57
58 static void __init
59 easy4010_init(void)
60 {
61 ifxmips_register_gpio();
62
63 ifxmips_register_gpio_dev();
64
65 ifxmips_register_mtd(&easy4010_flash_data);
66
67 ifxmips_register_leds(easy4010_leds, ARRAY_SIZE(easy4010_leds));
68
69 ifxmips_register_wdt();
70
71 danube_register_ethernet(ifxmips_ethaddr);
72
73 danube_register_usb();
74 }
75
76 MIPS_MACHINE(IFXMIPS_MACH_EASY4010,
77 "EASY4010",
78 "Lantiq Twinpass Eval Board",
79 easy4010_init);
This page took 0.057859 seconds and 3 git commands to generate.