2 +++ b/arch/mips/lantiq/falcon/mach-easy98020.c
4 +#include <linux/init.h>
5 +#include <linux/platform_device.h>
6 +#include <linux/leds.h>
7 +#include <linux/gpio.h>
8 +#include <linux/gpio_buttons.h>
9 +#include <linux/mtd/mtd.h>
10 +#include <linux/mtd/partitions.h>
11 +#include <linux/input.h>
12 +#include <linux/interrupt.h>
13 +#include <linux/spi/spi.h>
14 +#include <linux/spi/flash.h>
15 +#include "../machtypes.h"
18 +#include "dev-leds-gpio.h"
20 +#define EASY98020_GPIO_LED_0 9
21 +#define EASY98020_GPIO_LED_1 10
22 +#define EASY98020_GPIO_LED_2 11
23 +#define EASY98020_GPIO_LED_3 12
24 +#define EASY98020_GPIO_LED_GE0_ACT 110
25 +#define EASY98020_GPIO_LED_GE0_LINK 109
26 +#define EASY98020_GPIO_LED_GE1_ACT 106
27 +#define EASY98020_GPIO_LED_GE1_LINK 105
29 +extern unsigned char ltq_ethaddr[6];
31 +#ifdef CONFIG_MTD_PARTITIONS
32 +static struct mtd_partition easy98020_spi_partitions[] =
40 + .name = "uboot_env",
42 + .size = 0x40000, /* 2 sectors for redundant env. */
47 + .size = 0xF80000, /* map only 16 MiB */
51 +static struct flash_platform_data easy98020_spi_flash_platform_data = {
53 + .parts = easy98020_spi_partitions,
54 + .nr_parts = ARRAY_SIZE(easy98020_spi_partitions)
58 +static struct spi_board_info easy98020_spi_flash_data __initdata = {
59 + .modalias = "m25p80",
62 + .max_speed_hz = 10 * 1000 * 1000,
64 +#ifdef CONFIG_MTD_PARTITIONS
65 + .platform_data = &easy98020_spi_flash_platform_data
69 +static struct gpio_led easy98020_leds_gpio[] __initdata = {
71 + .name = "easy98020:green:0",
72 + .gpio = EASY98020_GPIO_LED_0,
75 + .name = "easy98020:green:1",
76 + .gpio = EASY98020_GPIO_LED_1,
79 + .name = "easy98020:green:2",
80 + .gpio = EASY98020_GPIO_LED_2,
83 + .name = "easy98020:green:3",
84 + .gpio = EASY98020_GPIO_LED_3,
87 + .name = "easy98020:ge0_act",
88 + .gpio = EASY98020_GPIO_LED_GE0_ACT,
91 + .name = "easy98020:ge0_link",
92 + .gpio = EASY98020_GPIO_LED_GE0_LINK,
95 + .name = "easy98020:ge1_act",
96 + .gpio = EASY98020_GPIO_LED_GE1_ACT,
99 + .name = "easy98020:ge1_link",
100 + .gpio = EASY98020_GPIO_LED_GE1_LINK,
105 +static void __init easy98020_init(void)
107 + falcon_register_asc(0);
108 + falcon_register_gpio();
109 + falcon_register_wdt();
110 + falcon_register_i2c();
111 + falcon_register_spi_flash(&easy98020_spi_flash_data);
112 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(easy98020_leds_gpio),
113 + easy98020_leds_gpio);
114 + falcon_register_crypto();
117 +MIPS_MACHINE(LANTIQ_MACH_EASY98020,
119 + "EASY98020 Eval Board",
121 --- a/arch/mips/lantiq/falcon/Kconfig
122 +++ b/arch/mips/lantiq/falcon/Kconfig
123 @@ -6,6 +6,10 @@ config LANTIQ_MACH_EASY98000
127 +config LANTIQ_MACH_EASY98020
134 --- a/arch/mips/lantiq/falcon/Makefile
135 +++ b/arch/mips/lantiq/falcon/Makefile
136 @@ -3,3 +3,4 @@ obj-y += softdog_vpe.o
137 obj-$(CONFIG_LANTIQ_MACH_EASY98000) += addon-easy98000.o
138 obj-$(CONFIG_LANTIQ_MACH_EASY98000) += mach-easy98000.o
139 obj-$(CONFIG_LANTIQ_MACH_EASY98000) += dev-leds-easy98000-cpld.o
140 +obj-$(CONFIG_LANTIQ_MACH_EASY98020) += mach-easy98020.o