mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
core/linux => adding ZyXEL NSA320 & NSA310 support code
This commit is contained in:
parent
5b5e0ccb82
commit
04c207ffe2
4 changed files with 973 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
|||
# Maintainer: Mike Staszel <mikestaszel@plugapps.com>
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# Maintainer: Jason Plum <jplum@archlinuxarm.org>
|
||||
|
||||
buildarch=2
|
||||
|
||||
|
@ -9,7 +10,7 @@ pkgname=('linux' 'linux-headers')
|
|||
_kernelname=${pkgname#linux}
|
||||
_basekernel=3.1
|
||||
pkgver=${_basekernel}.10
|
||||
pkgrel=12
|
||||
pkgrel=13
|
||||
cryptover=1.4
|
||||
arch=('arm')
|
||||
url="http://www.kernel.org/"
|
||||
|
@ -31,14 +32,14 @@ source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.bz2
|
|||
"http://download.gna.org/cryptodev-linux/cryptodev-linux-${cryptover}.tar.gz")
|
||||
md5sums=('8d43453f8159b2332ad410b19d86a931'
|
||||
'a8e1c25a93a685ec2a1c3a808715fe9d'
|
||||
'ff2b4f86bb13436f7c83aab8d4f474a2'
|
||||
'81526d92076fb71a521ed815c609b657'
|
||||
'f5d3635da03cb45904bedd69b47133de'
|
||||
'3f64ed9d71499fe9293dc671f4e4087e'
|
||||
'29628745258df910abfb8cb24ca3ccd9'
|
||||
'c9e6e8bb0774a89f7f9bd30a13be7532'
|
||||
'55b04499a4578e586cf5a4d0b69fc5aa'
|
||||
'3f7c3e18f57e9c8f397e035ff37f82db'
|
||||
'd33c20ff56baa0e3ce17958f032beb93'
|
||||
'68f5461ee0b783c051c3615651c7524b'
|
||||
'c958c8cc09f38224b696443dba1869f1'
|
||||
'9d3c56a4b999c8bfbd4018089a62f662'
|
||||
'd00814b57448895e65fbbc800e8a58ba'
|
||||
'7b0ac1c0a88d8fbe7316db02f21666e6')
|
||||
|
|
|
@ -6826,3 +6826,965 @@ diff -urN a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/s
|
|||
#define SD8787_DEFAULT_FW_NAME "mrvl/sd8787_uapsta.bin"
|
||||
|
||||
#define BLOCK_MODE 1
|
||||
diff -rupN a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
|
||||
--- a/arch/arm/mach-kirkwood/Kconfig 2012-08-19 22:10:00.030821001 -0400
|
||||
+++ b/arch/arm/mach-kirkwood/Kconfig 2012-08-19 22:27:54.040824257 -0400
|
||||
@@ -178,6 +178,18 @@ config MACH_T5325
|
||||
Say 'Y' here if you want your kernel to support the
|
||||
HP t5325 Thin Client.
|
||||
|
||||
+config MACH_NSA310
|
||||
+ bool "ZyXEL NSA310 1-Bay Power Media Server"
|
||||
+ help
|
||||
+ Say 'Y' here if you want your kernel to support the
|
||||
+ ZyXEL NSA310.
|
||||
+
|
||||
+config MACH_NSA320
|
||||
+ bool "ZyXEL NSA320 2-Bay Power Media Server"
|
||||
+ help
|
||||
+ Say 'Y' here if you want your kernel to support the
|
||||
+ ZyXEL NSA320.
|
||||
+
|
||||
endmenu
|
||||
|
||||
endif
|
||||
diff -rupN a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
|
||||
--- a/arch/arm/mach-kirkwood/Makefile 2012-08-19 22:10:00.030821001 -0400
|
||||
+++ b/arch/arm/mach-kirkwood/Makefile 2012-08-19 22:28:17.850820490 -0400
|
||||
@@ -26,5 +26,7 @@ obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2
|
||||
obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o
|
||||
obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o
|
||||
obj-$(CONFIG_MACH_T5325) += t5325-setup.o
|
||||
+obj-$(CONFIG_MACH_NSA310) += nsa310-setup.o
|
||||
+obj-$(CONFIG_MACH_NSA320) += nsa320-setup.o
|
||||
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
||||
diff -rupN a/arch/arm/mach-kirkwood/nsa310-setup.c b/arch/arm/mach-kirkwood/nsa310-setup.c
|
||||
--- a/arch/arm/mach-kirkwood/nsa310-setup.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/arch/arm/mach-kirkwood/nsa310-setup.c 2012-08-20 00:08:42.280823844 -0400
|
||||
@@ -0,0 +1,299 @@
|
||||
+/*
|
||||
+ * arch/arm/mach-kirkwood/nsa310-setup.c
|
||||
+ *
|
||||
+ * ZyXEL NSA310 1-Bay Power Media Server 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/nand.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#include <linux/ata_platform.h>
|
||||
+#include <linux/mv643xx_eth.h>
|
||||
+#include <linux/ethtool.h> /* for SPEED_1000, DUPLEX_FULL */
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/gpio_keys.h>
|
||||
+#include <linux/leds.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/nsa3xx-hwmon.h>
|
||||
+#include <asm/mach-types.h>
|
||||
+#include <asm/mach/arch.h>
|
||||
+#include <mach/kirkwood.h>
|
||||
+#include "common.h"
|
||||
+#include "mpp.h"
|
||||
+
|
||||
+static struct mtd_partition nsa310_nand_parts[] = {
|
||||
+ {
|
||||
+ .name = "uboot",
|
||||
+ .offset = 0,
|
||||
+ .size = SZ_1M,
|
||||
+ .mask_flags = MTD_WRITEABLE
|
||||
+ }, {
|
||||
+ .name = "uboot_env",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = SZ_512K
|
||||
+ }, {
|
||||
+ .name = "key_store",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = SZ_512K
|
||||
+ }, {
|
||||
+ .name = "info",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = SZ_512K
|
||||
+ }, {
|
||||
+ .name = "etc",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 10 * SZ_1M
|
||||
+ }, {
|
||||
+ .name = "kernel_1",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 10 * SZ_1M
|
||||
+ }, {
|
||||
+ .name = "rootfs1",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 48 * SZ_1M - SZ_256K
|
||||
+ }, {
|
||||
+ .name = "kernel_2",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 10 * SZ_1M
|
||||
+ }, {
|
||||
+ .name = "rootfs2",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 48 * SZ_1M - SZ_256K
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct mv_sata_platform_data nsa310_sata_data = {
|
||||
+ .n_ports = 2,
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_button nsa310_button_pins[] = {
|
||||
+ {
|
||||
+ .code = KEY_RESTART,
|
||||
+ .gpio = 36,
|
||||
+ .desc = "Reset",
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .code = KEY_COPY,
|
||||
+ .gpio = 37,
|
||||
+ .desc = "Copy",
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .code = KEY_POWER,
|
||||
+ .gpio = 46,
|
||||
+ .desc = "Power",
|
||||
+ .active_low = 0,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_platform_data nsa310_button_data = {
|
||||
+ .buttons = nsa310_button_pins,
|
||||
+ .nbuttons = ARRAY_SIZE(nsa310_button_pins),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device nsa310_buttons = {
|
||||
+ .name = "gpio-keys",
|
||||
+ .id = -1,
|
||||
+ .num_resources = 0,
|
||||
+ .dev = {
|
||||
+ .platform_data = &nsa310_button_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led nsa310_led_pins[] = {
|
||||
+ {
|
||||
+ .name = "nsa310:green:hdd2",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 12,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:red:hdd2",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 13,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:green:usb",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 15,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:green:sys",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 28,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:orange:sys",
|
||||
+ .default_trigger = "default-on",
|
||||
+ .gpio = 29,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:green:copy",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 39,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:red:copy",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 40,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:green:hdd1",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 41,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa310:red:hdd1",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 42,
|
||||
+ .active_low = 0,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led_platform_data nsa310_led_data = {
|
||||
+ .leds = nsa310_led_pins,
|
||||
+ .num_leds = ARRAY_SIZE(nsa310_led_pins),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device nsa310_leds = {
|
||||
+ .name = "leds-gpio",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &nsa310_led_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct nsa3xx_hwmon_platform_data nsa310_hwmon_data = {
|
||||
+ /* GPIOs connected to Holtek HT46R065 MCU */
|
||||
+ .act_pin = 17,
|
||||
+ .clk_pin = 16,
|
||||
+ .data_pin = 14,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device nsa310_hwmon = {
|
||||
+ .name = "nsa3xx-hwmon",
|
||||
+ .id = -1,
|
||||
+ .num_resources = 0,
|
||||
+ .dev = {
|
||||
+ .platform_data = &nsa310_hwmon_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static unsigned int nsa310_mpp_config[] __initdata = {
|
||||
+ MPP0_NF_IO2,
|
||||
+ MPP1_NF_IO3,
|
||||
+ MPP2_NF_IO4,
|
||||
+ MPP3_NF_IO5,
|
||||
+ MPP4_NF_IO6,
|
||||
+ MPP5_NF_IO7,
|
||||
+ MPP6_SYSRST_OUTn,
|
||||
+ MPP7_GPO,
|
||||
+ MPP8_TW0_SDA, /* PCF8563 RTC chip */
|
||||
+ MPP9_TW0_SCK, /* connected to TWSI */
|
||||
+ MPP10_UART0_TXD,
|
||||
+ MPP11_UART0_RXD,
|
||||
+ MPP12_GPO, /* HDD2 LED (green) */
|
||||
+ MPP13_GPIO, /* HDD2 LED (red) */
|
||||
+ MPP14_GPIO, /* MCU DATA pin (in) */
|
||||
+ MPP15_GPIO, /* USB LED (green) */
|
||||
+ MPP16_GPIO, /* MCU CLK pin (out) */
|
||||
+ MPP17_GPIO, /* MCU ACT pin (out) */
|
||||
+ MPP18_NF_IO0,
|
||||
+ MPP19_NF_IO1,
|
||||
+ MPP20_GPIO,
|
||||
+ MPP21_GPIO, /* USB power */
|
||||
+ MPP22_GPIO,
|
||||
+ MPP23_GPIO,
|
||||
+ MPP24_GPIO,
|
||||
+ MPP25_GPIO,
|
||||
+ MPP26_GPIO,
|
||||
+ MPP27_GPIO,
|
||||
+ MPP28_GPIO, /* SYS LED (green) */
|
||||
+ MPP29_GPIO, /* SYS LED (orange) */
|
||||
+ MPP30_GPIO,
|
||||
+ MPP31_GPIO,
|
||||
+ MPP32_GPIO,
|
||||
+ MPP33_GPO,
|
||||
+ MPP34_GPIO,
|
||||
+ MPP35_GPIO,
|
||||
+ MPP36_GPIO, /* reset button */
|
||||
+ MPP37_GPIO, /* copy button */
|
||||
+ MPP38_GPIO, /* VID B0 */
|
||||
+ MPP39_GPIO, /* COPY LED (green) */
|
||||
+ MPP40_GPIO, /* COPY LED (red) */
|
||||
+ MPP41_GPIO, /* HDD1 LED (green) */
|
||||
+ MPP42_GPIO, /* HDD1 LED (red) */
|
||||
+ MPP43_GPIO, /* HTP pin */
|
||||
+ MPP44_GPIO, /* buzzer */
|
||||
+ MPP45_GPIO, /* VID B1 */
|
||||
+ MPP46_GPIO, /* power button */
|
||||
+ MPP47_GPIO, /* power resume data */
|
||||
+ MPP48_GPIO, /* power off */
|
||||
+ MPP49_GPIO, /* power resume clock */
|
||||
+ 0
|
||||
+};
|
||||
+
|
||||
+#define NSA310_GPIO_USB_POWER 21
|
||||
+#define NSA310_GPIO_POWER_OFF 48
|
||||
+
|
||||
+static void nsa310_power_off(void)
|
||||
+{
|
||||
+ gpio_set_value(NSA310_GPIO_POWER_OFF, 1);
|
||||
+}
|
||||
+
|
||||
+static int __initdata usb_power = 1; /* default "on" */
|
||||
+
|
||||
+static int __init nsa310_usb_power(char *str)
|
||||
+{
|
||||
+ usb_power = strncmp(str, "off", 3) ? 1 : 0;
|
||||
+ return 1;
|
||||
+}
|
||||
+/* Parse boot_command_line string nsa310_usb_power=on|off */
|
||||
+__setup("nsa310_usb_power=", nsa310_usb_power);
|
||||
+
|
||||
+static void __init nsa310_init(void)
|
||||
+{
|
||||
+ /*
|
||||
+ * Basic setup. Needs to be called early.
|
||||
+ */
|
||||
+ kirkwood_init();
|
||||
+ kirkwood_mpp_conf(nsa310_mpp_config);
|
||||
+
|
||||
+ kirkwood_uart0_init();
|
||||
+ kirkwood_nand_init(ARRAY_AND_SIZE(nsa310_nand_parts), 40);
|
||||
+
|
||||
+ kirkwood_i2c_init();
|
||||
+
|
||||
+ if (gpio_request(NSA310_GPIO_USB_POWER, "USB Power Enable") ||
|
||||
+ gpio_direction_output(NSA310_GPIO_USB_POWER, usb_power))
|
||||
+ pr_err("nsa310: failed to configure USB power enable GPIO)\n");
|
||||
+ gpio_free(NSA310_GPIO_USB_POWER);
|
||||
+
|
||||
+ kirkwood_ehci_init();
|
||||
+ kirkwood_sata_init(&nsa310_sata_data);
|
||||
+ platform_device_register(&nsa310_leds);
|
||||
+ platform_device_register(&nsa310_buttons);
|
||||
+ platform_device_register(&nsa310_hwmon);
|
||||
+
|
||||
+ if (gpio_request(NSA310_GPIO_POWER_OFF, "power-off") ||
|
||||
+ gpio_direction_output(NSA310_GPIO_POWER_OFF, 0))
|
||||
+ pr_err("nsa310: failed to configure power-off GPIO\n");
|
||||
+ else
|
||||
+ pm_power_off = nsa310_power_off;
|
||||
+}
|
||||
+
|
||||
+MACHINE_START(NSA310, "ZyXEL NSA310 1-Bay Power Media Server")
|
||||
+ /* Maintainer: Peter Oostewechel <peter_oostewechel@hotmail.com> */
|
||||
+ .boot_params = 0x00000100,
|
||||
+ .init_machine = nsa310_init,
|
||||
+ .map_io = kirkwood_map_io,
|
||||
+ .init_early = kirkwood_init_early,
|
||||
+ .init_irq = kirkwood_init_irq,
|
||||
+ .timer = &kirkwood_timer,
|
||||
+// .restart = kirkwood_restart,
|
||||
+MACHINE_END
|
||||
diff -rupN a/arch/arm/mach-kirkwood/nsa320-setup.c b/arch/arm/mach-kirkwood/nsa320-setup.c
|
||||
--- a/arch/arm/mach-kirkwood/nsa320-setup.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/arch/arm/mach-kirkwood/nsa320-setup.c 2012-08-20 00:08:31.320824200 -0400
|
||||
@@ -0,0 +1,308 @@
|
||||
+/*
|
||||
+ * arch/arm/mach-kirkwood/nsa320-setup.c
|
||||
+ *
|
||||
+ * ZyXEL NSA320 2-Bay Power Media Server 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/nand.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#include <linux/ata_platform.h>
|
||||
+#include <linux/mv643xx_eth.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/gpio_keys.h>
|
||||
+#include <linux/leds.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/nsa3xx-hwmon.h>
|
||||
+#include <asm/mach-types.h>
|
||||
+#include <asm/mach/arch.h>
|
||||
+#include <mach/kirkwood.h>
|
||||
+#include "common.h"
|
||||
+#include "mpp.h"
|
||||
+
|
||||
+static struct mtd_partition nsa320_nand_parts[] = {
|
||||
+ {
|
||||
+ .name = "uboot",
|
||||
+ .offset = 0,
|
||||
+ .size = SZ_1M,
|
||||
+ .mask_flags = MTD_WRITEABLE
|
||||
+ }, {
|
||||
+ .name = "uboot_env",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = SZ_512K
|
||||
+ }, {
|
||||
+ .name = "key_store",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = SZ_512K
|
||||
+ }, {
|
||||
+ .name = "info",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = SZ_512K
|
||||
+ }, {
|
||||
+ .name = "etc",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 10 * SZ_1M
|
||||
+ }, {
|
||||
+ .name = "kernel_1",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 10 * SZ_1M
|
||||
+ }, {
|
||||
+ .name = "rootfs1",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 48 * SZ_1M - SZ_256K
|
||||
+ }, {
|
||||
+ .name = "kernel_2",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 10 * SZ_1M
|
||||
+ }, {
|
||||
+ .name = "rootfs2",
|
||||
+ .offset = MTDPART_OFS_NXTBLK,
|
||||
+ .size = 48 * SZ_1M - SZ_256K
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct i2c_board_info __initdata nsa320_i2c_rtc = {
|
||||
+ I2C_BOARD_INFO("pcf8563", 0x51),
|
||||
+};
|
||||
+
|
||||
+static struct mv643xx_eth_platform_data nsa320_ge00_data = {
|
||||
+ .phy_addr = MV643XX_ETH_PHY_ADDR(1),
|
||||
+};
|
||||
+
|
||||
+static struct mv_sata_platform_data nsa320_sata_data = {
|
||||
+ .n_ports = 2,
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_button nsa320_button_pins[] = {
|
||||
+ {
|
||||
+ .code = KEY_RESTART,
|
||||
+ .gpio = 36,
|
||||
+ .desc = "Reset",
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .code = KEY_COPY,
|
||||
+ .gpio = 37,
|
||||
+ .desc = "Copy",
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .code = KEY_POWER,
|
||||
+ .gpio = 46,
|
||||
+ .desc = "Power",
|
||||
+ .active_low = 0,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_platform_data nsa320_button_data = {
|
||||
+ .buttons = nsa320_button_pins,
|
||||
+ .nbuttons = ARRAY_SIZE(nsa320_button_pins),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device nsa320_buttons = {
|
||||
+ .name = "gpio-keys",
|
||||
+ .id = -1,
|
||||
+ .num_resources = 0,
|
||||
+ .dev = {
|
||||
+ .platform_data = &nsa320_button_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led nsa320_led_pins[] = {
|
||||
+ {
|
||||
+ .name = "nsa320:green:hdd2",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 12,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:red:hdd2",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 13,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:green:usb",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 15,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:green:sys",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 28,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:orange:sys",
|
||||
+ .default_trigger = "default-on",
|
||||
+ .gpio = 29,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:green:copy",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 39,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:red:copy",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 40,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:green:hdd1",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 41,
|
||||
+ .active_low = 0,
|
||||
+ }, {
|
||||
+ .name = "nsa320:red:hdd1",
|
||||
+ .default_trigger = "default-off",
|
||||
+ .gpio = 42,
|
||||
+ .active_low = 0,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led_platform_data nsa320_led_data = {
|
||||
+ .leds = nsa320_led_pins,
|
||||
+ .num_leds = ARRAY_SIZE(nsa320_led_pins),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device nsa320_leds = {
|
||||
+ .name = "leds-gpio",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &nsa320_led_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct nsa3xx_hwmon_platform_data nsa320_hwmon_data = {
|
||||
+ /* GPIOs connected to Holtek HT46R065 MCU */
|
||||
+ .act_pin = 17,
|
||||
+ .clk_pin = 16,
|
||||
+ .data_pin = 14,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device nsa320_hwmon = {
|
||||
+ .name = "nsa3xx-hwmon",
|
||||
+ .id = -1,
|
||||
+ .num_resources = 0,
|
||||
+ .dev = {
|
||||
+ .platform_data = &nsa320_hwmon_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static unsigned int nsa320_mpp_config[] __initdata = {
|
||||
+ MPP0_NF_IO2,
|
||||
+ MPP1_NF_IO3,
|
||||
+ MPP2_NF_IO4,
|
||||
+ MPP3_NF_IO5,
|
||||
+ MPP4_NF_IO6,
|
||||
+ MPP5_NF_IO7,
|
||||
+ MPP6_SYSRST_OUTn,
|
||||
+ MPP7_GPO,
|
||||
+ MPP8_TW0_SDA, /* PCF8563 RTC chip */
|
||||
+ MPP9_TW0_SCK, /* connected to TWSI */
|
||||
+ MPP10_UART0_TXD,
|
||||
+ MPP11_UART0_RXD,
|
||||
+ MPP12_GPO, /* HDD2 LED (green) */
|
||||
+ MPP13_GPIO, /* HDD2 LED (red) */
|
||||
+ MPP14_GPIO, /* MCU DATA pin (in) */
|
||||
+ MPP15_GPIO, /* USB LED (green) */
|
||||
+ MPP16_GPIO, /* MCU CLK pin (out) */
|
||||
+ MPP17_GPIO, /* MCU ACT pin (out) */
|
||||
+ MPP18_NF_IO0,
|
||||
+ MPP19_NF_IO1,
|
||||
+ MPP20_GPIO,
|
||||
+ MPP21_GPIO, /* USB power */
|
||||
+ MPP22_GPIO,
|
||||
+ MPP23_GPIO,
|
||||
+ MPP24_GPIO,
|
||||
+ MPP25_GPIO,
|
||||
+ MPP26_GPIO,
|
||||
+ MPP27_GPIO,
|
||||
+ MPP28_GPIO, /* SYS LED (green) */
|
||||
+ MPP29_GPIO, /* SYS LED (orange) */
|
||||
+ MPP30_GPIO,
|
||||
+ MPP31_GPIO,
|
||||
+ MPP32_GPIO,
|
||||
+ MPP33_GPO,
|
||||
+ MPP34_GPIO,
|
||||
+ MPP35_GPIO,
|
||||
+ MPP36_GPIO, /* reset button */
|
||||
+ MPP37_GPIO, /* copy button */
|
||||
+ MPP38_GPIO, /* VID B0 */
|
||||
+ MPP39_GPIO, /* COPY LED (green) */
|
||||
+ MPP40_GPIO, /* COPY LED (red) */
|
||||
+ MPP41_GPIO, /* HDD1 LED (green) */
|
||||
+ MPP42_GPIO, /* HDD1 LED (red) */
|
||||
+ MPP43_GPIO, /* HTP pin */
|
||||
+ MPP44_GPIO, /* buzzer */
|
||||
+ MPP45_GPIO, /* VID B1 */
|
||||
+ MPP46_GPIO, /* power button */
|
||||
+ MPP47_GPIO, /* power resume data */
|
||||
+ MPP48_GPIO, /* power off */
|
||||
+ MPP49_GPIO, /* power resume clock */
|
||||
+ 0
|
||||
+};
|
||||
+
|
||||
+#define NSA320_GPIO_USB_POWER 21
|
||||
+#define NSA320_GPIO_POWER_OFF 48
|
||||
+
|
||||
+static void nsa320_power_off(void)
|
||||
+{
|
||||
+ gpio_set_value(NSA320_GPIO_POWER_OFF, 1);
|
||||
+}
|
||||
+
|
||||
+static int __initdata usb_power = 1; /* default "on" */
|
||||
+
|
||||
+static int __init nsa320_usb_power(char *str)
|
||||
+{
|
||||
+ usb_power = strncmp(str, "off", 3) ? 1 : 0;
|
||||
+ return 1;
|
||||
+}
|
||||
+/* Parse boot_command_line string nsa320_usb_power=on|off */
|
||||
+__setup("nsa320_usb_power=", nsa320_usb_power);
|
||||
+
|
||||
+static void __init nsa320_init(void)
|
||||
+{
|
||||
+ /*
|
||||
+ * Basic setup. Needs to be called early.
|
||||
+ */
|
||||
+ kirkwood_init();
|
||||
+ kirkwood_mpp_conf(nsa320_mpp_config);
|
||||
+
|
||||
+ kirkwood_uart0_init();
|
||||
+ kirkwood_nand_init(ARRAY_AND_SIZE(nsa320_nand_parts), 40);
|
||||
+
|
||||
+ kirkwood_i2c_init();
|
||||
+ i2c_register_board_info(0, &nsa320_i2c_rtc, 1);
|
||||
+
|
||||
+ if (gpio_request(NSA320_GPIO_USB_POWER, "USB Power Enable") ||
|
||||
+ gpio_direction_output(NSA320_GPIO_USB_POWER, usb_power))
|
||||
+ pr_err("nsa320: failed to configure USB power enable GPIO)\n");
|
||||
+ gpio_free(NSA320_GPIO_USB_POWER);
|
||||
+
|
||||
+ kirkwood_ehci_init();
|
||||
+ kirkwood_ge00_init(&nsa320_ge00_data);
|
||||
+ kirkwood_sata_init(&nsa320_sata_data);
|
||||
+ platform_device_register(&nsa320_leds);
|
||||
+ platform_device_register(&nsa320_buttons);
|
||||
+ platform_device_register(&nsa320_hwmon);
|
||||
+
|
||||
+ if (gpio_request(NSA320_GPIO_POWER_OFF, "power-off") ||
|
||||
+ gpio_direction_output(NSA320_GPIO_POWER_OFF, 0))
|
||||
+ pr_err("nsa320: failed to configure power-off GPIO\n");
|
||||
+ else
|
||||
+ pm_power_off = nsa320_power_off;
|
||||
+}
|
||||
+
|
||||
+MACHINE_START(NSA320, "ZyXEL NSA320 2-Bay Power Media Server")
|
||||
+ /* Maintainer: Peter Schildmann <linux@schildmann.info> */
|
||||
+ .boot_params = 0x00000100,
|
||||
+ .init_machine = nsa320_init,
|
||||
+ .map_io = kirkwood_map_io,
|
||||
+ .init_early = kirkwood_init_early,
|
||||
+ .init_irq = kirkwood_init_irq,
|
||||
+ .timer = &kirkwood_timer,
|
||||
+// .restart = kirkwood_restart,
|
||||
+MACHINE_END
|
||||
diff -rupN a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
|
||||
--- a/drivers/hwmon/Kconfig 2011-10-24 03:10:05.000000000 -0400
|
||||
+++ b/drivers/hwmon/Kconfig 2012-08-19 22:35:59.660852355 -0400
|
||||
@@ -1327,6 +1327,19 @@ config SENSORS_MC13783_ADC
|
||||
help
|
||||
Support for the A/D converter on MC13783 PMIC.
|
||||
|
||||
+config SENSORS_NSA3XX
|
||||
+ tristate "ZyXEL NSA3xx fan speed and temperature sensors"
|
||||
+ depends on (MACH_NSA310 || MACH_NSA320) && GENERIC_GPIO
|
||||
+ help
|
||||
+ If you say yes here you get support for hardware monitoring
|
||||
+ for the ZyXEL NSA3xx Media Servers.
|
||||
+
|
||||
+ The sensor data is taken from a Holtek HT46R065 microcontroller
|
||||
+ conncted to GPIO lines.
|
||||
+
|
||||
+ This driver can also be built as a module. If so, the module
|
||||
+ will be called nsa3xx-hwmon.
|
||||
+
|
||||
if ACPI
|
||||
|
||||
comment "ACPI drivers"
|
||||
diff -rupN a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
|
||||
--- a/drivers/hwmon/Makefile 2011-10-24 03:10:05.000000000 -0400
|
||||
+++ b/drivers/hwmon/Makefile 2012-08-19 22:37:55.510821364 -0400
|
||||
@@ -93,6 +93,7 @@ obj-$(CONFIG_SENSORS_MAX6639) += max6639
|
||||
obj-$(CONFIG_SENSORS_MAX6642) += max6642.o
|
||||
obj-$(CONFIG_SENSORS_MAX6650) += max6650.o
|
||||
obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o
|
||||
+obj-$(CONFIG_SENSORS_NSA3XX) += nsa3xx-hwmon.o
|
||||
obj-$(CONFIG_SENSORS_NTC_THERMISTOR) += ntc_thermistor.o
|
||||
obj-$(CONFIG_SENSORS_PC87360) += pc87360.o
|
||||
obj-$(CONFIG_SENSORS_PC87427) += pc87427.o
|
||||
diff -rupN a/drivers/hwmon/nsa3xx-hwmon.c b/drivers/hwmon/nsa3xx-hwmon.c
|
||||
--- a/drivers/hwmon/nsa3xx-hwmon.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/drivers/hwmon/nsa3xx-hwmon.c 2012-08-19 22:37:02.880821002 -0400
|
||||
@@ -0,0 +1,251 @@
|
||||
+/*
|
||||
+ * drivers/hwmon/nsa3xx-hwmon.c
|
||||
+ *
|
||||
+ * ZyXEL NSA3xx Media Servers
|
||||
+ * hardware monitoring
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Peter Schildmann <linux@schildmann.info>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License v2 as published by the
|
||||
+ * Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
+ * more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along with
|
||||
+ * this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/mutex.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/hwmon.h>
|
||||
+#include <linux/hwmon-sysfs.h>
|
||||
+#include <linux/nsa3xx-hwmon.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/jiffies.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <asm/delay.h>
|
||||
+
|
||||
+#define MAGIC_NUMBER 0x55
|
||||
+
|
||||
+struct nsa3xx_hwmon {
|
||||
+ struct platform_device *pdev;
|
||||
+ struct device *classdev;
|
||||
+ struct mutex update_lock; /* lock GPIO operations */
|
||||
+ unsigned long last_updated; /* jiffies */
|
||||
+ unsigned long mcu_data;
|
||||
+};
|
||||
+
|
||||
+enum nsa3xx_inputs {
|
||||
+ NSA3XX_FAN = 1,
|
||||
+ NSA3XX_TEMP = 0,
|
||||
+};
|
||||
+
|
||||
+static const char *nsa3xx_input_names[] = {
|
||||
+ [NSA3XX_FAN] = "Chassis Fan",
|
||||
+ [NSA3XX_TEMP] = "System Temperature",
|
||||
+};
|
||||
+
|
||||
+static unsigned long nsa3xx_hwmon_update(struct device *dev)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned long mcu_data;
|
||||
+ struct nsa3xx_hwmon *hwmon = dev_get_drvdata(dev);
|
||||
+ struct nsa3xx_hwmon_platform_data *pdata = hwmon->pdev->dev.platform_data;
|
||||
+
|
||||
+ mutex_lock(&hwmon->update_lock);
|
||||
+
|
||||
+ mcu_data = hwmon->mcu_data;
|
||||
+
|
||||
+ if (time_after(jiffies, hwmon->last_updated + (3 * HZ)) || mcu_data == 0) {
|
||||
+ dev_dbg(dev, "Reading MCU data\n");
|
||||
+
|
||||
+ gpio_set_value(pdata->act_pin, 0);
|
||||
+ msleep(100);
|
||||
+
|
||||
+ for (i = 31; i >= 0; i--) {
|
||||
+ gpio_set_value(pdata->clk_pin, 0);
|
||||
+ udelay(100);
|
||||
+
|
||||
+ gpio_set_value(pdata->clk_pin, 1);
|
||||
+ udelay(100);
|
||||
+
|
||||
+ mcu_data |= gpio_get_value(pdata->data_pin) ? (1 << i) : 0;
|
||||
+ }
|
||||
+
|
||||
+ gpio_set_value(pdata->act_pin, 1);
|
||||
+
|
||||
+ if ((mcu_data & 0xff000000) != (MAGIC_NUMBER << 24)) {
|
||||
+ dev_err(dev, "Failed to read MCU data\n");
|
||||
+ mcu_data = 0;
|
||||
+ }
|
||||
+
|
||||
+ hwmon->mcu_data = mcu_data;
|
||||
+ hwmon->last_updated = jiffies;
|
||||
+ }
|
||||
+
|
||||
+ mutex_unlock(&hwmon->update_lock);
|
||||
+
|
||||
+ return mcu_data;
|
||||
+}
|
||||
+
|
||||
+static ssize_t show_name(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ return sprintf(buf, "nsa3xx\n");
|
||||
+}
|
||||
+
|
||||
+static ssize_t show_label(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ int channel = to_sensor_dev_attr(attr)->index;
|
||||
+ return sprintf(buf, "%s\n", nsa3xx_input_names[channel]);
|
||||
+}
|
||||
+
|
||||
+static ssize_t show_value(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ int channel = to_sensor_dev_attr(attr)->index;
|
||||
+ unsigned long mcu_data = nsa3xx_hwmon_update(dev);
|
||||
+ unsigned long value = 0;
|
||||
+ switch(channel) {
|
||||
+ case NSA3XX_TEMP:
|
||||
+ value = (mcu_data & 0xffff) * 100;
|
||||
+ break;
|
||||
+ case NSA3XX_FAN:
|
||||
+ value = ((mcu_data & 0xff0000) >> 16) * 100;
|
||||
+ break;
|
||||
+ }
|
||||
+ return sprintf(buf, "%lu\n", value);
|
||||
+}
|
||||
+
|
||||
+static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
|
||||
+static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, show_label, NULL, NSA3XX_TEMP);
|
||||
+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_value, NULL, NSA3XX_TEMP);
|
||||
+static SENSOR_DEVICE_ATTR(fan1_label, S_IRUGO, show_label, NULL, NSA3XX_FAN);
|
||||
+static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_value, NULL, NSA3XX_FAN);
|
||||
+
|
||||
+static struct attribute *nsa3xx_attributes[] = {
|
||||
+ &dev_attr_name.attr,
|
||||
+ &sensor_dev_attr_temp1_label.dev_attr.attr,
|
||||
+ &sensor_dev_attr_temp1_input.dev_attr.attr,
|
||||
+ &sensor_dev_attr_fan1_label.dev_attr.attr,
|
||||
+ &sensor_dev_attr_fan1_input.dev_attr.attr,
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+static const struct attribute_group nsa3xx_attr_group = {
|
||||
+ .attrs = nsa3xx_attributes,
|
||||
+};
|
||||
+
|
||||
+static int nsa3xx_hwmon_request_gpios(struct nsa3xx_hwmon_platform_data *pdata)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ if ((ret = gpio_request(pdata->act_pin, "act pin")))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_request(pdata->clk_pin, "clk pin")))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_request(pdata->data_pin, "data pin")))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_direction_output(pdata->act_pin, 1)))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_direction_output(pdata->clk_pin, 1)))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_direction_input(pdata->data_pin)))
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void nsa3xx_hwmon_free_gpios(struct nsa3xx_hwmon_platform_data *pdata)
|
||||
+{
|
||||
+ gpio_free(pdata->act_pin);
|
||||
+ gpio_free(pdata->clk_pin);
|
||||
+ gpio_free(pdata->data_pin);
|
||||
+}
|
||||
+
|
||||
+static int __devinit nsa3xx_hwmon_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct nsa3xx_hwmon *hwmon;
|
||||
+ struct nsa3xx_hwmon_platform_data *pdata = pdev->dev.platform_data;
|
||||
+
|
||||
+ hwmon = kzalloc(sizeof(struct nsa3xx_hwmon), GFP_KERNEL);
|
||||
+ if (!hwmon)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ platform_set_drvdata(pdev, hwmon);
|
||||
+ hwmon->pdev = pdev;
|
||||
+ hwmon->mcu_data = 0;
|
||||
+ mutex_init(&hwmon->update_lock);
|
||||
+
|
||||
+ ret = sysfs_create_group(&pdev->dev.kobj, &nsa3xx_attr_group);
|
||||
+ if (ret)
|
||||
+ goto err;
|
||||
+
|
||||
+ hwmon->classdev = hwmon_device_register(&pdev->dev);
|
||||
+ if (IS_ERR(hwmon->classdev)) {
|
||||
+ ret = PTR_ERR(hwmon->classdev);
|
||||
+ goto err_sysfs;
|
||||
+ }
|
||||
+
|
||||
+ ret = nsa3xx_hwmon_request_gpios(pdata);
|
||||
+ if (ret)
|
||||
+ goto err_free_gpio;
|
||||
+
|
||||
+ dev_info(&pdev->dev, "initialized\n");
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_free_gpio:
|
||||
+ nsa3xx_hwmon_free_gpios(pdata);
|
||||
+ hwmon_device_unregister(hwmon->classdev);
|
||||
+err_sysfs:
|
||||
+ sysfs_remove_group(&pdev->dev.kobj, &nsa3xx_attr_group);
|
||||
+err:
|
||||
+ platform_set_drvdata(pdev, NULL);
|
||||
+ kfree(hwmon);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int __devexit nsa3xx_hwmon_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct nsa3xx_hwmon *hwmon = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ nsa3xx_hwmon_free_gpios(pdev->dev.platform_data);
|
||||
+ hwmon_device_unregister(hwmon->classdev);
|
||||
+ sysfs_remove_group(&pdev->dev.kobj, &nsa3xx_attr_group);
|
||||
+ platform_set_drvdata(pdev, NULL);
|
||||
+ kfree(hwmon);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver nsa3xx_hwmon_driver = {
|
||||
+ .probe = nsa3xx_hwmon_probe,
|
||||
+ .remove = __devexit_p(nsa3xx_hwmon_remove),
|
||||
+ .driver = {
|
||||
+ .name = "nsa3xx-hwmon",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(nsa3xx_hwmon_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Peter Schildmann <linux@schildmann.info>");
|
||||
+MODULE_DESCRIPTION("NSA3XX Hardware Monitoring");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS("platform:nsa3xx-hwmon");
|
||||
diff -rupN a/include/linux/nsa3xx-hwmon.h b/include/linux/nsa3xx-hwmon.h
|
||||
--- a/include/linux/nsa3xx-hwmon.h 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/include/linux/nsa3xx-hwmon.h 2012-08-19 22:30:03.460819876 -0400
|
||||
@@ -0,0 +1,21 @@
|
||||
+/*
|
||||
+ * include/linux/nsa3xx.hwmon.h
|
||||
+ *
|
||||
+ * Platform data structure for ZyXEL NSA3xx hwmon driver
|
||||
+ *
|
||||
+ * 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 __LINUX_NSA3XX_HWMON_H
|
||||
+#define __LINUX_NSA3XX_HWMON_H
|
||||
+
|
||||
+struct nsa3xx_hwmon_platform_data {
|
||||
+ /* GPIO pins */
|
||||
+ unsigned act_pin;
|
||||
+ unsigned clk_pin;
|
||||
+ unsigned data_pin;
|
||||
+};
|
||||
+
|
||||
+#endif /* __LINUX_NSA3XX_HWMON_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 3.1.10 Kernel Configuration
|
||||
# Linux/arm 3.1.10-13 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
|
@ -320,6 +320,8 @@ CONFIG_MACH_D2NET_V2=y
|
|||
CONFIG_MACH_NET2BIG_V2=y
|
||||
CONFIG_MACH_NET5BIG_V2=y
|
||||
CONFIG_MACH_T5325=y
|
||||
CONFIG_MACH_NSA310=y
|
||||
CONFIG_MACH_NSA320=y
|
||||
|
||||
#
|
||||
# System MMU
|
||||
|
@ -2149,6 +2151,7 @@ CONFIG_SENSORS_LM90=m
|
|||
# CONFIG_SENSORS_W83L786NG is not set
|
||||
# CONFIG_SENSORS_W83627HF is not set
|
||||
# CONFIG_SENSORS_W83627EHF is not set
|
||||
CONFIG_SENSORS_NSA3XX=m
|
||||
CONFIG_THERMAL=m
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
CONFIG_WATCHDOG=y
|
||||
|
@ -3155,7 +3158,7 @@ CONFIG_RTC_INTF_DEV=y
|
|||
# CONFIG_RTC_DRV_ISL1208 is not set
|
||||
# CONFIG_RTC_DRV_ISL12022 is not set
|
||||
# CONFIG_RTC_DRV_X1205 is not set
|
||||
# CONFIG_RTC_DRV_PCF8563 is not set
|
||||
CONFIG_RTC_DRV_PCF8563=m
|
||||
# CONFIG_RTC_DRV_PCF8583 is not set
|
||||
# CONFIG_RTC_DRV_M41T80 is not set
|
||||
# CONFIG_RTC_DRV_BQ32K is not set
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=
|
||||
KERNEL_VERSION=3.1.10-12-ARCH
|
||||
KERNEL_VERSION=3.1.10-13-ARCH
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
|
|
Loading…
Reference in a new issue