Skip to contentSkip to conversation

Kirkwood: add LaCie d2 Network v2 support

PATCH New Simon Guinot 1 participant 2 messages Sep 19, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Kirkwood: add LaCie d2 Network v2 support

From: Simon Guinot <[email protected]>

---
 arch/arm/mach-kirkwood/Kconfig          |    6 +
 arch/arm/mach-kirkwood/Makefile         |    1 +
 arch/arm/mach-kirkwood/d2net_v2-setup.c |  323 +++++++++++++++++++++++++++++++
 drivers/leds/Kconfig                    |    2 +-
 4 files changed, 331 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-kirkwood/d2net_v2-setup.c
arch/arm/mach-kirkwood/Kconfig +6 -0
index 3d5d66e..3410633 100644
@@ -106,6 +106,12 @@ config MACH_NETSPACE_MAX_V2
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie Network Space Max v2 NAS.
 
+config MACH_D2NET_V2
+	bool "LaCie d2 Network v2 NAS Board"
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  LaCie d2 Network v2 NAS.
+
 config MACH_NET2BIG_V2
 	bool "LaCie 2Big Network v2 NAS Board"
 	help
arch/arm/mach-kirkwood/Makefile +1 -0
index e690f76..81d4f1b 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_MACH_OPENRD)		+= openrd-setup.o
 obj-$(CONFIG_MACH_NETSPACE_V2)		+= netspace_v2-setup.o
 obj-$(CONFIG_MACH_INETSPACE_V2)		+= netspace_v2-setup.o
 obj-$(CONFIG_MACH_NETSPACE_MAX_V2)	+= netspace_v2-setup.o
+obj-$(CONFIG_MACH_D2NET_V2)		+= d2net_v2-setup.o
 obj-$(CONFIG_MACH_NET2BIG_V2)		+= netxbig_v2-setup.o
 obj-$(CONFIG_MACH_NET5BIG_V2)		+= netxbig_v2-setup.o
 obj-$(CONFIG_MACH_T5325)		+= t5325-setup.o
arch/arm/mach-kirkwood/d2net_v2-setup.c new file +323 -0

323 lines not on this page · raw message

drivers/leds/Kconfig +1 -1
index e411262..4206ee0 100644
@@ -304,7 +304,7 @@ config LEDS_MC13783
 
 config LEDS_NS2
 	tristate "LED support for Network Space v2 GPIO LEDs"
-	depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || MACH_NETSPACE_MAX_V2
+	depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || MACH_NETSPACE_MAX_V2 || D2NET_V2
 	default y
 	help
 	  This option enable support for the dual-GPIO LED found on the
Signature · 1 line
1.6.3.1
#1 lore raw

PATCH 2/2 Kirkwood: remove duplicated code in LaCie setup files

From: Simon Guinot <[email protected]>

---
 arch/arm/mach-kirkwood/Kconfig             |   11 +++
 arch/arm/mach-kirkwood/Makefile            |    1 +
 arch/arm/mach-kirkwood/d2net_v2-setup.c    |  102 +---------------------
 arch/arm/mach-kirkwood/lacie_v2-common.c   |  127 ++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/lacie_v2-common.h   |   18 ++++
 arch/arm/mach-kirkwood/netspace_v2-setup.c |  122 ++------------------------
 arch/arm/mach-kirkwood/netxbig_v2-setup.c  |  119 ++------------------------
 7 files changed, 181 insertions(+), 319 deletions(-)
 create mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.c
 create mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.h
arch/arm/mach-kirkwood/Kconfig +11 -0
index 3410633..ce21806 100644
@@ -90,40 +90,51 @@ config MACH_OPENRD_ULTIMATE
 
 config MACH_NETSPACE_V2
 	bool "LaCie Network Space v2 NAS Board"
+	select LACIE_V2_COMMON
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie Network Space v2 NAS.
 
 config MACH_INETSPACE_V2
 	bool "LaCie Internet Space v2 NAS Board"
+	select LACIE_V2_COMMON
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie Internet Space v2 NAS.
 
 config MACH_NETSPACE_MAX_V2
 	bool "LaCie Network Space Max v2 NAS Board"
+	select LACIE_V2_COMMON
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie Network Space Max v2 NAS.
 
 config MACH_D2NET_V2
 	bool "LaCie d2 Network v2 NAS Board"
+	select LACIE_V2_COMMON
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie d2 Network v2 NAS.
 
 config MACH_NET2BIG_V2
 	bool "LaCie 2Big Network v2 NAS Board"
+	select LACIE_V2_COMMON
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie 2Big Network v2 NAS.
 
 config MACH_NET5BIG_V2
 	bool "LaCie 5Big Network v2 NAS Board"
+	select LACIE_V2_COMMON
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie 5Big Network v2 NAS.
 
+config LACIE_V2_COMMON
+        bool
+        help
+          Common machine code for LaCie v2 Boards.
+
 config MACH_T5325
 	bool "HP t5325 Thin Client"
 	help
arch/arm/mach-kirkwood/Makefile +1 -0
index 81d4f1b..452ebc5 100644
@@ -17,6 +17,7 @@ obj-$(CONFIG_MACH_NETSPACE_MAX_V2)	+= netspace_v2-setup.o
 obj-$(CONFIG_MACH_D2NET_V2)		+= d2net_v2-setup.o
 obj-$(CONFIG_MACH_NET2BIG_V2)		+= netxbig_v2-setup.o
 obj-$(CONFIG_MACH_NET5BIG_V2)		+= netxbig_v2-setup.o
+obj-$(CONFIG_LACIE_V2_COMMON)		+= lacie_v2-common.o
 obj-$(CONFIG_MACH_T5325)		+= t5325-setup.o
 
 obj-$(CONFIG_CPU_IDLE)			+= cpuidle.o
arch/arm/mach-kirkwood/d2net_v2-setup.c +5 -97

153 lines not on this page · raw message

arch/arm/mach-kirkwood/lacie_v2-common.c new file +127 -0

127 lines not on this page · raw message

arch/arm/mach-kirkwood/lacie_v2-common.h new file +18 -0
new file mode 100644
index 0000000..af52131
@@ -0,0 +1,18 @@
+/*
+ * arch/arm/mach-kirkwood/lacie_v2-common.h
+ *
+ * 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.
+ */
+
+#ifndef __ARCH_KIRKWOOD_LACIE_V2_COMMON_H
+#define __ARCH_KIRKWOOD_LACIE_V2_COMMON_H
+
+void lacie_v2_register_flash(void);
+void lacie_v2_register_i2c_devices(void);
+void lacie_v2_hdd_power_init(int hdd_num);
+
+extern struct sys_timer lacie_v2_timer;
+
+#endif
arch/arm/mach-kirkwood/netspace_v2-setup.c +10 -112

186 lines not on this page · raw message

arch/arm/mach-kirkwood/netxbig_v2-setup.c +9 -110

177 lines not on this page · raw message

Signature · 1 line
1.6.3.1