svn path=/dists/trunk/linux-2.6/; revision=15745
This commit is contained in:
Martin Michlmayr 2010-05-18 14:16:02 +00:00
parent 5fe23d24ed
commit d9e1f44a0f
3 changed files with 0 additions and 232 deletions

View File

@ -1,94 +0,0 @@
From: Laurie Bradshaw <bradshaw.laurie@googlemail.com>
Date: Wed, 10 Feb 2010 16:10:43 +0000 (+0000)
Subject: [ARM] orion5x: D-link DNS-323 revision A1 power LED
X-Git-Url: http://git.marvell.com/?p=orion.git;a=commitdiff_plain;h=b2a731aa5cbca7e0252da75e16de7ae5feb1313a
[ARM] orion5x: D-link DNS-323 revision A1 power LED
This patch fixes the power LED on DNS-323 revision A1, and adds timer
support for (hopefully) both A1 and B1 revisions.
Power LED on revision A1 is active low and also requires GPIO 4 to be
low to work.
Tested on my DNS-323 revision A1.
I have set the default trigger to timer as that replicates the
behaviour of the original firmware, userspace can change the trigger
at the end of the boot process providing a useful indication that
booting has completed.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
---
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 8f159db..421b82f 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -34,7 +34,8 @@
#define DNS323_GPIO_LED_RIGHT_AMBER 1
#define DNS323_GPIO_LED_LEFT_AMBER 2
#define DNS323_GPIO_SYSTEM_UP 3
-#define DNS323_GPIO_LED_POWER 5
+#define DNS323_GPIO_LED_POWER1 4
+#define DNS323_GPIO_LED_POWER2 5
#define DNS323_GPIO_OVERTEMP 6
#define DNS323_GPIO_RTC 7
#define DNS323_GPIO_POWER_OFF 8
@@ -237,11 +238,31 @@ error_fail:
* GPIO LEDs (simple - doesn't use hardware blinking support)
*/
+#define ORION_BLINK_HALF_PERIOD 100 /* ms */
+
+static int dns323_gpio_blink_set(unsigned gpio,
+ unsigned long *delay_on, unsigned long *delay_off)
+{
+ static int value = 0;
+
+ if (!*delay_on && !*delay_off)
+ *delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;
+
+ if (ORION_BLINK_HALF_PERIOD == *delay_on
+ && ORION_BLINK_HALF_PERIOD == *delay_off) {
+ value = !value;
+ orion_gpio_set_blink(gpio, value);
+ return 0;
+ }
+
+ return -EINVAL;
+}
+
static struct gpio_led dns323_leds[] = {
{
.name = "power:blue",
- .gpio = DNS323_GPIO_LED_POWER,
- .default_state = LEDS_GPIO_DEFSTATE_ON,
+ .gpio = DNS323_GPIO_LED_POWER2,
+ .default_trigger = "default-on",
}, {
.name = "right:amber",
.gpio = DNS323_GPIO_LED_RIGHT_AMBER,
@@ -256,6 +277,7 @@ static struct gpio_led dns323_leds[] = {
static struct gpio_led_platform_data dns323_led_data = {
.num_leds = ARRAY_SIZE(dns323_leds),
.leds = dns323_leds,
+ .gpio_blink_set = dns323_gpio_blink_set,
};
static struct platform_device dns323_gpio_leds = {
@@ -412,6 +434,14 @@ static void __init dns323_init(void)
orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
platform_device_register(&dns323_nor_flash);
+ /* The 5181 power LED is active low and requires
+ * DNS323_GPIO_LED_POWER1 to also be low.
+ */
+ if (dns323_dev_id() == MV88F5181_DEV_ID) {
+ dns323_leds[0].active_low = 1;
+ gpio_direction_output(DNS323_GPIO_LED_POWER1, 0);
+ }
+
platform_device_register(&dns323_gpio_leds);
platform_device_register(&dns323_button_device);

View File

@ -1,135 +0,0 @@
--- a/arch/arm/mach-kirkwood/Kconfig 2009-09-25 19:49:01.000000000 +0000
+++ b/arch/arm/mach-kirkwood/Kconfig 2009-09-25 19:50:08.000000000 +0000
@@ -52,6 +52,12 @@
Say 'Y' here if you want your kernel to support the
Marvell OpenRD Base Board.
+config MACH_OPENRD_CLIENT
+ bool "Marvell OpenRD Client Board"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell OpenRD Client Board.
+
config MACH_NETSPACE_V2
bool "LaCie Network Space v2 NAS Board"
help
--- a/arch/arm/mach-kirkwood/Makefile 2009-09-25 19:49:07.000000000 +0000
+++ b/arch/arm/mach-kirkwood/Makefile 2009-09-25 19:49:29.000000000 +0000
@@ -8,6 +8,7 @@
obj-$(CONFIG_MACH_TS219) += ts219-setup.o
obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o
+obj-$(CONFIG_MACH_OPENRD_CLIENT) += openrd_client-setup.o
obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
--- /dev/null 2008-06-15 07:07:41.000000000 +0000
+++ b/arch/arm/mach-kirkwood/openrd_client-setup.c 2009-09-25 19:52:36.000000000 +0000
@@ -0,0 +1,107 @@
+/*
+ * arch/arm/mach-kirkwood/openrd_client-setup.c
+ *
+ * Marvell OpenRD Base Client Setup
+ *
+ * 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/mtd/partitions.h>
+#include <linux/ata_platform.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/gpio.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/kirkwood.h>
+#include <plat/mvsdio.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mtd_partition openrd_client_nand_parts[] = {
+ {
+ .name = "u-boot",
+ .offset = 0,
+ .size = SZ_1M
+ }, {
+ .name = "uImage",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = SZ_4M
+ }, {
+ .name = "root",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL
+ },
+};
+
+static struct mv643xx_eth_platform_data openrd_client_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(8),
+};
+
+static struct mv643xx_eth_platform_data openrd_client_ge01_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(24),
+};
+
+static struct mv_sata_platform_data openrd_client_sata_data = {
+ .n_ports = 2,
+};
+
+static struct mvsdio_platform_data openrd_client_mvsdio_data = {
+ .gpio_card_detect = 29, /* MPP29 used as SD card detect */
+};
+
+static unsigned int openrd_client_mpp_config[] __initdata = {
+ MPP29_GPIO,
+ 0
+};
+
+static void __init openrd_client_init(void)
+{
+ /*
+ * Basic setup. Needs to be called early.
+ */
+ kirkwood_init();
+ kirkwood_mpp_conf(openrd_client_mpp_config);
+
+ kirkwood_uart0_init();
+ kirkwood_uart1_init();
+ kirkwood_nand_init(ARRAY_AND_SIZE(openrd_client_nand_parts), 25);
+
+ kirkwood_ehci_init();
+
+ /* initialize gbe0 and gbe1 */
+ kirkwood_ge00_init(&openrd_client_ge00_data);
+ kirkwood_ge01_init(&openrd_client_ge01_data);
+
+ kirkwood_sata_init(&openrd_client_sata_data);
+ kirkwood_sdio_init(&openrd_client_mvsdio_data);
+
+ kirkwood_i2c_init();
+}
+
+static int __init openrd_client_pci_init(void)
+{
+if (machine_is_openrd_client())
+ kirkwood_pcie_init();
+
+ return 0;
+}
+subsys_initcall(openrd_client_pci_init);
+
+
+
+
+MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
+ /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */
+ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
+ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
+ .boot_params = 0x00000100,
+ .init_machine = openrd_client_init,
+ .map_io = kirkwood_map_io,
+ .init_irq = kirkwood_init_irq,
+ .timer = &kirkwood_timer,
+MACHINE_END

View File

@ -33,14 +33,11 @@
+ bugfix/powerpc/lpar-console.patch
#+ bugfix/all/wireless-regulatory-default-EU.patch
#+ features/arm/compression-add-lzma.patch
#+ features/arm/openrd-client.patch
+ features/all/i915-autoload-without-CONFIG_DRM_I915_KMS.patch
+ debian/sysrq-mask.patch
#+ features/arm/dns323-rev-a1-powerled.patch
+ debian/arch-sh4-fix-uimage-build.patch
+ features/all/phylib-Support-phy-module-autoloading.patch