author | andy |
Tue, 03 Sep 2013 00:12:10 +0200 | |
changeset 0 | 9d9547a9dcc3 |
child 2 | 459c75093fd1 |
permissions | -rw-r--r-- |
0
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
1 |
--- linux-3.1.arch-orig/arch/arm/mach-kirkwood/dns320l-setup.c 1970-01-01 01:00:00.000000000 +0100 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
2 |
+++ linux-3.1/arch/arm/mach-kirkwood/dns320l-setup.c 2013-09-02 23:49:04.481512328 +0200 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
3 |
@@ -0,0 +1,295 @@ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
4 |
+/* |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
5 |
+ * arch/arm/mach-kirkwood/dns320l-setup.c |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
6 |
+ * |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
7 |
+ * D-Link DNS-320L Setup File |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
8 |
+ * |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
9 |
+ * This file is licensed under the terms of the GNU General Public |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
10 |
+ * License version 2. This program is licensed "as is" without any |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
11 |
+ * warranty of any kind, whether express or implied. |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
12 |
+ */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
13 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
14 |
+#include <linux/kernel.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
15 |
+#include <linux/init.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
16 |
+#include <linux/platform_device.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
17 |
+#include <linux/ata_platform.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
18 |
+#include <linux/mtd/partitions.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
19 |
+#include <linux/mv643xx_eth.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
20 |
+#include <linux/gpio.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
21 |
+#include <linux/leds.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
22 |
+#include <asm/mach-types.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
23 |
+#include <asm/mach/arch.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
24 |
+#include <mach/kirkwood.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
25 |
+#include "common.h" |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
26 |
+#include "mpp.h" |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
27 |
+#include <linux/sysfs.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
28 |
+#include <linux/kobject.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
29 |
+#include <linux/mtd/nand.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
30 |
+#include <linux/i2c.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
31 |
+#include <linux/gpio_keys.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
32 |
+#include <linux/gpio-fan.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
33 |
+#include <linux/input.h> |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
34 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
35 |
+#define DNSKW_GPIO_LED_POWER 26 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
36 |
+#define DNSKW_GPIO_LED_RED_R 27 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
37 |
+#define DNSKW_GPIO_LED_RED_L 28 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
38 |
+#define DNS325_GPIO_LED_RED_USB 29 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
39 |
+#define DNS320_GPIO_LED_RED_USB 35 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
40 |
+#define DNSKW_GPIO_LED_WHITE_R 20 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
41 |
+#define DNSKW_GPIO_LED_WHITE_L 21 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
42 |
+#define DNSKW_GPIO_LED_WHITE_USB 43 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
43 |
+#define DNSKW_GPIO_FAN_ALARM 44 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
44 |
+#define DNSKW_GPIO_FAN_HIGH 45 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
45 |
+#define DNSKW_GPIO_FAN_LOW 46 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
46 |
+#define DNSKW_GPIO_BTN_POWER 34 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
47 |
+#define DNSKW_GPIO_BTN_UNMOUNT 47 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
48 |
+#define DNSKW_GPIO_BTN_RESET 48 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
49 |
+#define DNSKW_GPIO_POWER 36 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
50 |
+#define DNSKW_GPIO_POWER_RECOVER 37 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
51 |
+#define DNSKW_GPIO_POWER_SATA0 39 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
52 |
+#define DNSKW_GPIO_POWER_SATA1 40 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
53 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
54 |
+static struct mtd_partition dns320l_nand_parts[] = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
55 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
56 |
+ .name = "u-boot", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
57 |
+ .offset = 0, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
58 |
+ .size = SZ_1M |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
59 |
+ }, { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
60 |
+ .name = "uImage", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
61 |
+ .offset = MTDPART_OFS_NXTBLK, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
62 |
+ .size = 5 * SZ_1M |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
63 |
+ }, { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
64 |
+ .name = "ramdisk", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
65 |
+ .offset = MTDPART_OFS_NXTBLK, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
66 |
+ .size = 5 * SZ_1M |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
67 |
+ }, { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
68 |
+ .name = "image", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
69 |
+ .offset = MTDPART_OFS_NXTBLK, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
70 |
+ .size = 100 * SZ_1M |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
71 |
+ }, { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
72 |
+ .name = "rescue firmware", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
73 |
+ .offset = MTDPART_OFS_NXTBLK, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
74 |
+ .size = 10 * SZ_1M |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
75 |
+ }, { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
76 |
+ .name = "config", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
77 |
+ .offset = MTDPART_OFS_NXTBLK, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
78 |
+ .size = 5 * SZ_1M |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
79 |
+ }, { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
80 |
+ .name = "my-dlink", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
81 |
+ .offset = MTDPART_OFS_NXTBLK, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
82 |
+ .size = 2 * SZ_1M |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
83 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
84 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
85 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
86 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
87 |
+static struct mv643xx_eth_platform_data dns320l_ge00_data = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
88 |
+ .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
89 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
90 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
91 |
+static struct mv_sata_platform_data dns320l_sata_data = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
92 |
+ .n_ports = 2, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
93 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
94 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
95 |
+static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
96 |
+{ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
97 |
+ if (gpio_request(gpio, name) == 0 && |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
98 |
+ gpio_direction_output(gpio, 0) == 0) { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
99 |
+ gpio_set_value(gpio, def); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
100 |
+ if (gpio_export(gpio, 0) != 0) |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
101 |
+ pr_err("dnskw: Failed to export GPIO %s\n", name); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
102 |
+ } else |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
103 |
+ pr_err("dnskw: Failed to register %s\n", name); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
104 |
+} |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
105 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
106 |
+/***************************************************************************** |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
107 |
+ * Buttons |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
108 |
+ ****************************************************************************/ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
109 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
110 |
+static struct gpio_keys_button dnskw_button_pins[] = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
111 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
112 |
+ .code = KEY_POWER, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
113 |
+ .gpio = DNSKW_GPIO_BTN_POWER, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
114 |
+ .desc = "Power button", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
115 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
116 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
117 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
118 |
+ .code = KEY_EJECTCD, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
119 |
+ .gpio = DNSKW_GPIO_BTN_UNMOUNT, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
120 |
+ .desc = "USB unmount button", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
121 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
122 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
123 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
124 |
+ .code = KEY_RESTART, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
125 |
+ .gpio = DNSKW_GPIO_BTN_RESET, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
126 |
+ .desc = "Reset button", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
127 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
128 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
129 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
130 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
131 |
+static struct gpio_keys_platform_data dnskw_button_data = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
132 |
+ .buttons = dnskw_button_pins, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
133 |
+ .nbuttons = ARRAY_SIZE(dnskw_button_pins), |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
134 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
135 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
136 |
+static struct platform_device dnskw_button_device = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
137 |
+ .name = "gpio-keys", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
138 |
+ .id = -1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
139 |
+ .num_resources = 0, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
140 |
+ .dev = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
141 |
+ .platform_data = &dnskw_button_data, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
142 |
+ } |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
143 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
144 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
145 |
+/***************************************************************************** |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
146 |
+ * LEDs |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
147 |
+ ****************************************************************************/ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
148 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
149 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
150 |
+#ifdef CONFIG_MACH_DNS320L |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
151 |
+static struct gpio_led dns320_led_pins[] = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
152 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
153 |
+ .name = "dns320:blue:power", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
154 |
+ .gpio = DNSKW_GPIO_LED_POWER, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
155 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
156 |
+ .default_trigger = "default-on", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
157 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
158 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
159 |
+ .name = "dns320:blue:usb", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
160 |
+ .gpio = DNSKW_GPIO_LED_WHITE_USB, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
161 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
162 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
163 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
164 |
+ .name = "dns320:orange:l_hdd", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
165 |
+ .gpio = DNSKW_GPIO_LED_RED_L, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
166 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
167 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
168 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
169 |
+ .name = "dns320:orange:r_hdd", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
170 |
+ .gpio = DNSKW_GPIO_LED_RED_R, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
171 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
172 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
173 |
+ { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
174 |
+ .name = "dns320:orange:usb", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
175 |
+ .gpio = DNS320_GPIO_LED_RED_USB, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
176 |
+ .active_low = 1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
177 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
178 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
179 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
180 |
+static struct gpio_led_platform_data dns320_led_data = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
181 |
+ .num_leds = ARRAY_SIZE(dns320_led_pins), |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
182 |
+ .leds = dns320_led_pins, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
183 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
184 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
185 |
+static struct platform_device dns320_led_device = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
186 |
+ .name = "leds-gpio", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
187 |
+ .id = -1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
188 |
+ .dev = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
189 |
+ .platform_data = &dns320_led_data, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
190 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
191 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
192 |
+#endif |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
193 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
194 |
+/***************************************************************************** |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
195 |
+ * Fan |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
196 |
+ ****************************************************************************/ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
197 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
198 |
+/* Fan: ADDA AD045HB-G73 40mm 6000rpm <at> 5v */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
199 |
+static struct gpio_fan_speed dnskw_fan_speed[] = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
200 |
+ { 0, 0 }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
201 |
+ { 3000, 1 }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
202 |
+ { 6000, 2 }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
203 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
204 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
205 |
+static unsigned dnskw_fan_pins[] = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
206 |
+ DNSKW_GPIO_FAN_LOW, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
207 |
+ DNSKW_GPIO_FAN_HIGH, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
208 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
209 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
210 |
+static struct gpio_fan_platform_data dnskw_fan_data = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
211 |
+ .num_ctrl = ARRAY_SIZE(dnskw_fan_pins), |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
212 |
+ .ctrl = dnskw_fan_pins, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
213 |
+ .num_speed = ARRAY_SIZE(dnskw_fan_speed), |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
214 |
+ .speed = dnskw_fan_speed, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
215 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
216 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
217 |
+static struct platform_device dnskw_fan_device = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
218 |
+ .name = "gpio-fan", |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
219 |
+ .id = -1, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
220 |
+ .dev = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
221 |
+ .platform_data = &dnskw_fan_data, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
222 |
+ }, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
223 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
224 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
225 |
+static unsigned int dns320l_mpp_config[] __initdata = { |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
226 |
+ MPP13_UART1_TXD, /* Custom ... */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
227 |
+ MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
228 |
+ MPP20_SATA1_ACTn, /* LED: White Right HDD */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
229 |
+ MPP21_SATA0_ACTn, /* LED: White Left HDD */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
230 |
+ MPP24_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
231 |
+ MPP25_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
232 |
+ MPP26_GPIO, /* LED: Power */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
233 |
+ MPP27_GPIO, /* LED: Red Right HDD */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
234 |
+ MPP28_GPIO, /* LED: Red Left HDD */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
235 |
+ MPP29_GPIO, /* LED: Red USB (DNS-325 only) */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
236 |
+ MPP30_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
237 |
+ MPP31_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
238 |
+ MPP32_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
239 |
+ MPP33_GPO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
240 |
+ MPP34_GPIO, /* Button: Front power */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
241 |
+ MPP35_GPIO, /* LED: Red USB (DNS-320 only) */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
242 |
+ MPP36_GPIO, /* Power: MV88F6281_DEV_ID Board */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
243 |
+ MPP37_GPIO, /* Power: Boot when power applied */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
244 |
+ MPP38_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
245 |
+ MPP39_GPIO, /* Power: SATA0 */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
246 |
+ MPP40_GPIO, /* Power: SATA1 */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
247 |
+ MPP41_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
248 |
+ MPP42_GPIO, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
249 |
+ MPP43_GPIO, /* LED: White USB */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
250 |
+ MPP44_GPIO, /* Fan: Tachometer Pin */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
251 |
+ MPP45_GPIO, /* Fan: high speed */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
252 |
+ MPP46_GPIO, /* Fan: low speed */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
253 |
+ MPP47_GPIO, /* Button: Back unmount */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
254 |
+ MPP48_GPIO, /* Button: Back reset */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
255 |
+ MPP49_GPIO, /* Pin of unused U5 (DNS-320 only) */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
256 |
+ 0 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
257 |
+}; |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
258 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
259 |
+static void dnskw_power_off(void) |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
260 |
+{ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
261 |
+ gpio_set_value(DNSKW_GPIO_POWER, 1); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
262 |
+} |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
263 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
264 |
+static void __init dns320l_init(void) |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
265 |
+{ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
266 |
+ /* |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
267 |
+ * Basic setup. Needs to be called early. |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
268 |
+ */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
269 |
+ kirkwood_init(); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
270 |
+ /* setup gpio pin select */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
271 |
+ kirkwood_mpp_conf(dns320l_mpp_config); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
272 |
+ kirkwood_uart0_init(); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
273 |
+ kirkwood_uart1_init(); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
274 |
+ kirkwood_nand_init(ARRAY_AND_SIZE(dns320l_nand_parts), 60); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
275 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
276 |
+ kirkwood_ehci_init(); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
277 |
+ kirkwood_i2c_init(); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
278 |
+ kirkwood_ge00_init(&dns320l_ge00_data); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
279 |
+ platform_device_register(&dns320_led_device); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
280 |
+ dnskw_gpio_register(DNSKW_GPIO_POWER_SATA0, "dnskw:power:sata0", 1); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
281 |
+ dnskw_gpio_register(DNSKW_GPIO_POWER_SATA1, "dnskw:power:sata1", 1); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
282 |
+ kirkwood_sata_init(&dns320l_sata_data); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
283 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
284 |
+ platform_device_register(&dnskw_button_device); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
285 |
+ platform_device_register(&dnskw_fan_device); |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
286 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
287 |
+} |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
288 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
289 |
+MACHINE_START(DNS320L, "DNS-320L") |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
290 |
+ /* Maintainer: Andreas Boehler <andreas@aboehler.at> */ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
291 |
+ .boot_params = 0x00000100, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
292 |
+ .init_machine = dns320l_init, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
293 |
+ .map_io = kirkwood_map_io, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
294 |
+ .init_early = kirkwood_init_early, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
295 |
+ .init_irq = kirkwood_init_irq, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
296 |
+ .timer = &kirkwood_timer, |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
297 |
+MACHINE_END |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
298 |
+ |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
299 |
--- linux-3.1.arch-orig/arch/arm/mach-kirkwood/Kconfig 2013-08-31 01:01:15.248534683 +0200 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
300 |
+++ linux-3.1/arch/arm/mach-kirkwood/Kconfig 2013-09-02 18:54:10.319145257 +0200 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
301 |
@@ -196,6 +196,11 @@ config MACH_NSA320 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
302 |
Say 'Y' here if you want your kernel to support the |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
303 |
ZyXEL NSA320. |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
304 |
|
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
305 |
+config MACH_DNS320L |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
306 |
+ bool "D-Link DNS-320L NAS" |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
307 |
+ help |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
308 |
+ Say 'Y' here if you want your kernel to support the |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
309 |
+ D-Link DNS-320L. |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
310 |
endmenu |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
311 |
|
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
312 |
endif |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
313 |
--- linux-3.1.arch-orig/arch/arm/mach-kirkwood/Makefile 2013-08-31 01:01:15.248534683 +0200 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
314 |
+++ linux-3.1/arch/arm/mach-kirkwood/Makefile 2013-09-02 19:59:33.482264353 +0200 |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
315 |
@@ -29,5 +29,6 @@ obj-$(CONFIG_MACH_BUBBA3) += bubba3-set |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
316 |
obj-$(CONFIG_MACH_T5325) += t5325-setup.o |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
317 |
obj-$(CONFIG_MACH_NSA310) += nsa310-setup.o |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
318 |
obj-$(CONFIG_MACH_NSA320) += nsa320-setup.o |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
319 |
+obj-$(CONFIG_MACH_DNS320L) += dns320l-setup.o |
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
320 |
|
9d9547a9dcc3
Initial DNS-320L support patch. Attention, the MPP mapping is wrong,
andy
parents:
diff
changeset
|
321 |
obj-$(CONFIG_CPU_IDLE) += cpuidle.o |