Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1880434
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
8 KB
Subscribers
None
View Options
diff --git a/add_88f6702a_cpu.diff b/add_88f6702a_cpu.diff
--- a/add_88f6702a_cpu.diff
+++ b/add_88f6702a_cpu.diff
@@ -1,36 +1,36 @@
--- linux-3.1.arch-orig/arch/arm/mach-kirkwood/common.c 2011-10-24 09:10:05.000000000 +0200
+++ linux-3.1/arch/arm/mach-kirkwood/common.c 2013-09-02 19:15:48.772407684 +0200
@@ -432,6 +432,11 @@ static char * __init kirkwood_id(void)
return "MV88F6282-Rev-A0";
else
return "MV88F6282-Rev-Unsupported";
+ } else if (dev == MV88F6702_DEV_ID) {
+ if (rev == MV88F6702_REV_A1)
-+ return "MV88F67-2-Rev-A1";
++ return "MV88F6702-Rev-A1";
+ else
+ return "MV88F6702-Rev-Unsupported";
} else {
return "Device-Unknown";
}
--- linux-3.1.arch-orig/arch/arm/mach-kirkwood/mpp.c 2011-10-24 09:10:05.000000000 +0200
+++ linux-3.1/arch/arm/mach-kirkwood/mpp.c 2013-09-02 21:58:56.841873166 +0200
@@ -27,7 +27,8 @@ static unsigned int __init kirkwood_vari
if ((dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0) ||
(dev == MV88F6282_DEV_ID))
return MPP_F6281_MASK;
- if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0)
+ if ((dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0) ||
+ (dev == MV88F6702_DEV_ID))
return MPP_F6192_MASK;
if (dev == MV88F6180_DEV_ID)
return MPP_F6180_MASK;
--- linux-3.1.arch-orig/arch/arm/mach-kirkwood/include/mach/kirkwood.h 2011-10-24 09:10:05.000000000 +0200
+++ linux-3.1/arch/arm/mach-kirkwood/include/mach/kirkwood.h 2013-09-02 19:15:58.945740460 +0200
@@ -135,4 +135,7 @@
#define MV88F6282_DEV_ID 0x6282
#define MV88F6282_REV_A0 0
+
+#define MV88F6702_DEV_ID 0x6702
+#define MV88F6702_REV_A1 3
#endif
diff --git a/dns320l-setup.c b/dns320l-setup.c
--- a/dns320l-setup.c
+++ b/dns320l-setup.c
@@ -1,236 +1,258 @@
/*
* arch/arm/mach-kirkwood/dns320l-setup.c
*
* D-Link DNS-320L Setup File
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
#include <linux/mtd/partitions.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include "common.h"
#include "mpp.h"
#include <linux/sysfs.h>
#include <linux/kobject.h>
#include <linux/mtd/nand.h>
#include <linux/i2c.h>
#include <linux/gpio_keys.h>
#include <linux/gpio-fan.h>
#include <linux/input.h>
-#define DNS320L_GPIO_LED_SATA1 20
-#define DNS320L_GPIO_LED_SATA0 21
+#define DNS320L_GPIO_LED_SATA1_BLUE 20
+#define DNS320L_GPIO_LED_SATA0_BLUE 21
+#define DNS320L_GPIO_LED_SATA1_RED 22
+#define DNS320L_GPIO_LED_SATA0_RED 23
#define DNS320L_GPIO_POWER_SATA 24
#define DNS320L_GPIO_LED_USB_BLUE 25
#define DNS320L_GPIO_LED_USB_ORANGE 26
#define DNS320L_GPIO_BUTTON_USB 27
+#define DNS320L_GPIO_BUTTON_RESET 28
+#define DNS320L_GPIO_BUTTON_POWER 29
static struct mtd_partition dns320l_nand_parts[] = {
{
.name = "u-boot",
.offset = 0,
.size = SZ_1M
}, {
.name = "uImage",
.offset = MTDPART_OFS_NXTBLK,
.size = 5 * SZ_1M
}, {
.name = "ramdisk",
.offset = MTDPART_OFS_NXTBLK,
.size = 5 * SZ_1M
}, {
.name = "image",
.offset = MTDPART_OFS_NXTBLK,
.size = 100 * SZ_1M
}, {
.name = "rescue firmware",
.offset = MTDPART_OFS_NXTBLK,
.size = 10 * SZ_1M
}, {
.name = "config",
.offset = MTDPART_OFS_NXTBLK,
.size = 5 * SZ_1M
}, {
.name = "my-dlink",
.offset = MTDPART_OFS_NXTBLK,
.size = 2 * SZ_1M
},
};
static struct mv643xx_eth_platform_data dns320l_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static struct mv_sata_platform_data dns320l_sata_data = {
.n_ports = 2,
};
static void __init dns320l_gpio_register(unsigned gpio, char *name, int def)
{
if (gpio_request(gpio, name) == 0 &&
gpio_direction_output(gpio, 0) == 0) {
gpio_set_value(gpio, def);
if (gpio_export(gpio, 0) != 0)
pr_err("dns320l: Failed to export GPIO %s\n", name);
} else
pr_err("dns320l: Failed to register %s\n", name);
}
/*****************************************************************************
* Buttons
****************************************************************************/
static struct gpio_keys_button dns320l_button_pins[] = {
{
- .code = KEY_EJECTCD,
+ .code = KEY_COPY,
+ .type = EV_KEY,
.gpio = DNS320L_GPIO_BUTTON_USB,
- .desc = "USB unmount button",
+ .desc = "USB Copy button",
.active_low = 1,
- }
+ .debounce_interval = 1000,
+ },
+ { // This button does not (yet) work...
+ .code = KEY_POWER,
+ .type = EV_KEY,
+ .gpio = DNS320L_GPIO_BUTTON_POWER,
+ .desc = "Power Button",
+ .active_low = 1,
+ .debounce_interval = 1000,
+ },
+ {
+ .code = KEY_OPTION,
+ .type = EV_KEY,
+ .gpio = DNS320L_GPIO_BUTTON_RESET,
+ .desc = "Reset Button",
+ .active_low = 1,
+ .debounce_interval = 1000,
+ },
};
static struct gpio_keys_platform_data dns320l_button_data = {
.buttons = dns320l_button_pins,
.nbuttons = ARRAY_SIZE(dns320l_button_pins),
};
static struct platform_device dns320l_button_device = {
.name = "gpio-keys",
.id = -1,
- .num_resources = 0,
.dev = {
.platform_data = &dns320l_button_data,
}
};
/*****************************************************************************
* LEDs
****************************************************************************/
static struct gpio_led dns320l_led_pins[] = {
{
.name = "dns320l:blue:usb",
.gpio = DNS320L_GPIO_LED_USB_BLUE,
.default_trigger = "default-on",
},
{
.name = "dns320l:orange:usb",
.gpio = DNS320L_GPIO_LED_USB_ORANGE,
},
{
.name = "dns320l:blue:sata0",
- .gpio = DNS320L_GPIO_LED_SATA0,
+ .gpio = DNS320L_GPIO_LED_SATA0_BLUE,
.default_trigger = "ide-disk"
},
{
.name = "dns320l:blue:sata1",
- .gpio = DNS320L_GPIO_LED_SATA1,
+ .gpio = DNS320L_GPIO_LED_SATA1_BLUE,
.default_trigger = "ide-disk"
},
-// {
-// .name = "dns320l:blue:power",
-// .gpio = DNS320L_GPIO_LED_POWER,
-// },
-
+ {
+ .name = "dns320l:red:sata0",
+ .gpio = DNS320L_GPIO_LED_SATA0_RED,
+ },
+ {
+ .name = "dns320l:red:sata1",
+ .gpio = DNS320L_GPIO_LED_SATA1_RED,
+ },
};
static struct gpio_led_platform_data dns320l_led_data = {
.num_leds = ARRAY_SIZE(dns320l_led_pins),
.leds = dns320l_led_pins,
};
static struct platform_device dns320l_led_device = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &dns320l_led_data,
},
};
/*****************************************************************************
* Fan
****************************************************************************/
static unsigned int dns320l_mpp_config[] __initdata = {
MPP13_UART1_TXD,
MPP14_UART1_RXD,
- MPP16_GPIO,
- MPP17_GPIO,
- MPP18_GPO,
- MPP19_GPO,
- MPP20_GPIO, // SATA LED
- MPP21_GPIO, // SATA LED
+ MPP20_GPIO, // SATA LED BLUE
+ MPP21_GPIO, // SATA LED BLUE
+ MPP22_GPIO, // SATA LED RED
+ MPP23_GPIO, // SATA LED RED
MPP24_GPIO, // SATA Power
MPP25_GPIO, // USB LED Blue
MPP26_GPIO, // USB LED Orange
MPP27_GPIO, // Button USB Copy
- MPP28_GPIO,
- MPP29_GPIO,
+ MPP28_GPIO, // Button Reset
+ MPP29_GPIO, // Button Power
MPP30_GPIO,
MPP31_GPIO,
MPP32_GPIO,
MPP33_GPO,
MPP34_GPIO,
MPP35_GPIO,
MPP36_GPIO,
MPP37_GPIO,
MPP38_GPIO,
MPP39_GPIO,
MPP40_GPIO,
MPP41_GPIO,
MPP42_GPIO,
MPP43_GPIO,
MPP44_GPIO,
MPP45_GPIO,
MPP46_GPIO,
MPP47_GPIO,
MPP48_GPIO,
MPP49_GPIO,
0
};
static void __init dns320l_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_init();
/* setup gpio pin select */
kirkwood_mpp_conf(dns320l_mpp_config);
kirkwood_uart0_init();
kirkwood_uart1_init();
- kirkwood_nand_init(ARRAY_AND_SIZE(dns320l_nand_parts), 60);
+ kirkwood_nand_init(ARRAY_AND_SIZE(dns320l_nand_parts), 40);
kirkwood_ehci_init();
kirkwood_i2c_init();
kirkwood_ge00_init(&dns320l_ge00_data);
platform_device_register(&dns320l_led_device);
dns320l_gpio_register(DNS320L_GPIO_POWER_SATA, "dns320l:power:sata", 1);
kirkwood_sata_init(&dns320l_sata_data);
platform_device_register(&dns320l_button_device);
}
MACHINE_START(DNS320L, "DNS-320L")
/* Maintainer: Andreas Boehler <andreas@aboehler.at> */
.boot_params = 0x00000100,
.init_machine = dns320l_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer,
MACHINE_END
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jan 24, 5:11 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
532484
Default Alt Text
(8 KB)
Attached To
rDNSLINUX Linux DNS-320L
Event Timeline
Log In to Comment