delete nas patches

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/genlink@2595 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2010-10-26 17:23:28 +00:00
parent 683e138902
commit 9b02de1ac5
5 changed files with 0 additions and 2889 deletions

View File

@ -1,53 +0,0 @@
#!/bin/bash
#
# Welcome to the Gentoo Mysql Storage tarball bakery.
# this Script was based on OurDelta scripts
# 2009-11-27
# Mario Fetka <mario.fetka@gmail.com>
# Peter Lieverdink <peter@openquery.com>
# Arjen Lentz <arjen@openquery.com>
#
# Exit immediately on any error
set -e
# Debug script and command lines
#set -x
BAKERY_BASE_DIR="$(dirname $(readlink -f ${0}))"
BUILD_BASE_DIR="$(pwd)/build-temp-$$"
if [ ! $# -eq 1 ]; then
echo "Usage: $0 [package dir]"
exit 1
else
UPSTREAM="${1}"
fi
echo "Going to build tarballs in ${BUILD_BASE_DIR}"
# Source the info file, so we can use its version info for the tarball.
#
. $1/mysql-storage/.$1-version
# Up a dir, rename us and then package up.
#
pushd $1
# Tar it up, but leave the quilt directory out of it
#
rm -rf ${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}
mkdir ${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}
cp -rf mysql-storage/* ${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}
tar cz -f ${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}.tar.gz \
${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}
echo "Created ${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}.tar.gz"
rm -rf ${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}
# Move out the tarball.
#
popd
mv $1/${PACKAGE_NAME}-${VERSION}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}.tar.gz .
# Cleanup
#rm -fr "${BUILD_BASE_DIR}"
# Thank you, and good night.

File diff suppressed because it is too large Load Diff

View File

@ -1,329 +0,0 @@
diff -uNr a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
--- a/arch/arm/mach-kirkwood/Kconfig 2010-08-02 00:11:14.000000000 +0200
+++ b/arch/arm/mach-kirkwood/Kconfig 2010-10-05 19:57:48.000000000 +0200
@@ -99,6 +99,12 @@
Say 'Y' here if you want your kernel to support the
LaCie 5Big Network v2 NAS.
+config MACH_LSXHL
+ bool "Buffalo LS-XHL Series"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo LS-XHL Series.
+
endmenu
endif
diff -uNr a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
--- a/arch/arm/mach-kirkwood/Makefile 2010-08-02 00:11:14.000000000 +0200
+++ b/arch/arm/mach-kirkwood/Makefile 2010-10-05 19:58:39.000000000 +0200
@@ -6,6 +6,7 @@
obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o
obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
+obj-$(CONFIG_MACH_LSXHL) += lsxhl-setup.o
obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
diff -uNr a/arch/arm/mach-kirkwood/lsxhl-setup.c b/arch/arm/mach-kirkwood/lsxhl-setup.c
--- a/arch/arm/mach-kirkwood/lsxhl-setup.c 1970-01-01 01:00:00.000000000 +0100
+++ b/arch/arm/mach-kirkwood/lsxhl-setup.c 2010-10-05 19:57:48.000000000 +0200
@@ -0,0 +1,286 @@
+/*
+ * arch/arm/mach-kirkwood/sheevaplug-setup.c
+ *
+ * Marvell SheevaPlug Reference Board 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/mv643xx_eth.h>
+#include <linux/ata_platform.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/kirkwood.h>
+#include <mach/bridge-regs.h>
+#include <plat/mvsdio.h>
+#include <plat/orion_nand.h>
+#include "common.h"
+#include "mpp.h"
+
+/* for pm */
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <asm/proc-fns.h>
+#include <mach/system.h>
+extern void setup_mm_for_reboot(char mode);
+
+
+
+#include <asm/io.h>
+#include <asm/gpio.h>
+
+extern void kirkwood_ge00_exit(void);
+extern void kirkwood_ge01_exit(void);
+
+static struct mv643xx_eth_platform_data lsxhl_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
+};
+static struct mv643xx_eth_platform_data lsxhl_ge01_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(8),
+};
+
+
+static unsigned int lsxhl_mpp_config[] __initdata = {
+ MPP0_SPI_SCn,
+ MPP1_SPI_MOSI,
+ MPP2_SPI_SCK,
+ MPP3_SPI_MISO,
+ MPP4_UART0_RXD,
+ MPP5_UART0_TXD,
+ MPP6_SYSRST_OUTn,
+ MPP7_GPO,
+ MPP8_GPIO,
+ MPP9_GPIO,
+ MPP10_GPO, /* HDD Power */
+ MPP11_GPIO, /* USB VBUS EN */
+ MPP12_SD_CLK,
+ MPP13_SD_CMD,
+ MPP14_SD_D0,
+ MPP15_SD_D1,
+ MPP16_SD_D2,
+ MPP17_SD_D3,
+ MPP18_GPO, /* FAN HIGH: on:0, off:1 */
+ MPP19_GPO, /* FAN LOW: on:0, off:1 */
+ MPP20_GE1_0,
+ MPP21_GE1_1,
+ MPP22_GE1_2,
+ MPP23_GE1_3,
+ MPP24_GE1_4,
+ MPP25_GE1_5,
+ MPP26_GE1_6,
+ MPP27_GE1_7,
+ MPP28_GPIO,
+ MPP29_GPIO,
+ MPP30_GE1_10,
+ MPP31_GE1_11,
+ MPP32_GE1_12,
+ MPP33_GE1_13,
+ MPP34_GPIO,
+ MPP35_GPIO,
+ MPP36_GPIO, /* FUNC LED */
+ MPP37_GPIO, /* ALARM LED */
+ MPP38_GPIO, /* INFO LED */
+ MPP39_GPIO, /* POWER LED */
+ MPP40_GPIO, /* FAN LOCK */
+ MPP41_GPIO, /* FUNC SW */
+ MPP42_GPIO, /* POWER SW */
+ MPP43_GPIO, /* POWER AUTO SW */
+ MPP44_GPIO,
+ MPP45_GPIO,
+ MPP46_GPIO,
+ MPP47_GPIO,
+ MPP48_GPIO, /* FUNC RED LED */
+ MPP49_GPIO, /* UART EN */
+ 0
+};
+
+static struct mv_sata_platform_data lsxhl_sata_data = {
+ .n_ports = 1,
+};
+
+static struct gpio_led lsxhl_led_pins[] = {
+ {
+ .name = "func",
+ .gpio = 36,
+ .active_low = 1,
+ },
+ {
+ .name = "alarm",
+ .gpio = 37,
+ .active_low = 1,
+ },
+ {
+ .name = "info",
+ .gpio = 38,
+ .active_low = 1,
+ },
+ {
+ .name = "power",
+ .gpio = 39,
+ .default_trigger = "default-on",
+ .active_low = 1,
+ },
+ {
+ .name = "func2",
+ .gpio = 48,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_led_platform_data lsxhl_led_data = {
+ .leds = lsxhl_led_pins,
+ .num_leds = ARRAY_SIZE(lsxhl_led_pins),
+};
+
+static struct platform_device lsxhl_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &lsxhl_led_data,
+ }
+};
+
+#if 0 /* power save in power-off mode. */
+static void lsxhl_power_off(void)
+{
+ int i=0;
+
+/* PCI Express Power Saving: NG
+ writel(0x20800087, (PCIE_VIRT_BASE | 0x1b00));
+*/
+
+/* Ethernet Power Saving */
+#define GE00_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x70000)
+#define GE01_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x74000)
+ writel(0xff00, (GE00_VIRT_BASE | 0x2680));
+ writel(0xff00, (GE01_VIRT_BASE | 0x2680));
+ writel(readl(GE00_VIRT_BASE | 0x243c) & ~0x400, GE00_VIRT_BASE | 0x243c);
+ writel(readl(GE01_VIRT_BASE | 0x243c) & ~0x400, GE01_VIRT_BASE | 0x243c);
+ writel(readl(GE00_VIRT_BASE | 0x243c) & ~0x1, GE00_VIRT_BASE | 0x243c);
+ writel(readl(GE01_VIRT_BASE | 0x243c) & ~0x1, GE01_VIRT_BASE | 0x243c);
+
+/* NG:
+ kirkwood_clock_gate(CGC_GE0 | CGC_USB0 | CGC_NAND_SPI |
+ CGC_XOR0 | CGC_SATA0 | CGC_XOR1 |
+ CGC_CRYPTO | CGC_GE1);
+*/
+/* OK: maybe
+ kirkwood_clock_gate(CGC_GE0 | CGC_USB0 |
+ CGC_XOR0 | CGC_SATA0 | CGC_XOR1 |
+ CGC_CRYPTO | CGC_GE1);
+*/
+
+/* Memory Power Management */
+ writel(0x2bff, (BRIDGE_VIRT_BASE | 0x118));
+
+ gpio_direction_output(18, 1); // Fan high off
+ gpio_direction_output(19, 1); // Fan low off
+ gpio_direction_output(11, 0); // USB Power off
+ gpio_direction_output(10, 0); // HDD Power off
+
+ gpio_direction_output(36, 1); // Func LED off
+ gpio_direction_output(37, 1); // Alarm LED off
+ gpio_direction_output(38, 1); // Info LED off
+ gpio_direction_output(39, 1); // Power LED off
+ gpio_direction_output(48, 1); // Func2 LED off
+
+ cpu_proc_fin();
+
+ local_irq_disable();
+
+ /* disable interrupts to CPU
+ writel(readl(CPU_CONTROL) | (1 << 28), CPU_CONTROL);
+ */
+
+/* Mbus-L to Mbus Bridge Interrupt Mask Register */
+ writel(BRIDGE_INT_TIMER1, BRIDGE_MASK);
+/* Main IRQ Interrupt Mask Low Register */
+ writel(2, IRQ_VIRT_BASE | 0x04);
+/* Main FIQ Interrupt Mask Low Register */
+ writel(0, IRQ_VIRT_BASE | 0x08);
+/* Endpoint Interrupt Mask Low Register */
+ writel(2, IRQ_VIRT_BASE | 0x0c);
+/* Main IRQ Interrupt Mask High Register */
+ writel(0, IRQ_VIRT_BASE | 0x14);
+/* Main FIQ Interrupt Mask High Register */
+ writel(0, IRQ_VIRT_BASE | 0x18);
+/* Endpoint Interrupt Mask High Register */
+ writel(0, IRQ_VIRT_BASE | 0x1c);
+/* CPU Timer1 Reload Register */
+ writel(20000000, TIMER_VIRT_BASE | 0x18);
+/* CPU Timers Control Register */
+ writel(readl(TIMER_VIRT_BASE) | 12, TIMER_VIRT_BASE);
+
+/* GotoPowerSave */
+ writel((readl(CLOCK_GATING_CTRL) | (1 << 11)) & ~(1 << 12),
+ CLOCK_GATING_CTRL);
+
+/* SDRAM Power Saving */
+ writel(0x7, DDR_OPERATION_BASE);
+ while(1){
+ arch_idle();
+ gpio_direction_output(38, (i++) % 25 != 0);
+ if(!gpio_get_value(42) || !gpio_get_value(43)) break;
+/* Mbus-L to Mbus Bridge Interrupt Cause Register */
+ writel(0, BRIDGE_CAUSE);
+ }
+ local_irq_enable();
+
+ setup_mm_for_reboot('h');
+ arch_reset('h', NULL);
+ mdelay(1000);
+ printk("reset failed: system halted\n");
+ while(1);
+}
+#endif
+
+static void __init lsxhl_init(void)
+{
+ /*
+ * Basic setup. Needs to be called early.
+ */
+ kirkwood_init();
+ kirkwood_mpp_conf(lsxhl_mpp_config);
+
+ kirkwood_uart0_init();
+
+ if (gpio_request(11, "USB Power Enable") != 0 ||
+ gpio_direction_output(11, 1) != 0)
+ printk(KERN_ERR "can't set up GPIO 11 (USB Power Enable)\n");
+ kirkwood_ehci_init();
+
+
+ kirkwood_ge00_init(&lsxhl_ge00_data);
+ kirkwood_ge01_init(&lsxhl_ge01_data);
+
+ kirkwood_sata_init(&lsxhl_sata_data);
+
+ kirkwood_spi_init();
+
+ platform_device_register(&lsxhl_leds);
+
+#if 0 /* power save in power-off mode. */
+ pm_power_off = lsxhl_power_off;
+#endif
+}
+
+MACHINE_START(LSXHL, "Buffalo LS-XHL Series")
+ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
+ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
+ .boot_params = 0x00000100,
+ .init_machine = lsxhl_init,
+ .map_io = kirkwood_map_io,
+ .init_irq = kirkwood_init_irq,
+ .timer = &kirkwood_timer,
+MACHINE_END
diff -uNr a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
--- a/arch/arm/tools/mach-types 2010-08-02 00:11:14.000000000 +0200
+++ b/arch/arm/tools/mach-types 2010-10-05 19:57:48.000000000 +0200
@@ -2647,7 +2647,7 @@
spear310 MACH_SPEAR310 SPEAR310 2660
spear320 MACH_SPEAR320 SPEAR320 2661
robotx MACH_ROBOTX ROBOTX 2662
-lsxhl MACH_LSXHL LSXHL 2663
+lsxhl MACH_LSXHL LSXHL 527
smartlite MACH_SMARTLITE SMARTLITE 2664
cws2 MACH_CWS2 CWS2 2665
m619 MACH_M619 M619 2666

View File

@ -1,472 +0,0 @@
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
Date: 2010-06-27
Initial Package Version: 2.6.30
Origin: http://forum.buffalo.nas-central.org/viewtopic.php?f=18&t=11631&start=30
Upstream Status: unknown
Description: add support LS Pro Duo for 2.6.34 based on the 2.6.30 patch
diff -Naur linux-2.6.34-geos_one-r1.orig/arch/arm/configs/orion5x_defconfig linux-2.6.34-geos_one-r1/arch/arm/configs/orion5x_defconfig
--- linux-2.6.34-geos_one-r1.orig/arch/arm/configs/orion5x_defconfig 2010-06-27 06:56:25.464133418 +0000
+++ linux-2.6.34-geos_one-r1/arch/arm/configs/orion5x_defconfig 2010-06-27 06:58:47.423132623 +0000
@@ -228,6 +228,7 @@
CONFIG_MACH_TERASTATION_PRO2=y
CONFIG_MACH_LINKSTATION_PRO=y
CONFIG_MACH_LINKSTATION_MINI=y
+CONFIG_MACH_LINKSTATION_PRODUO=y
CONFIG_MACH_LINKSTATION_LS_HGL=y
CONFIG_MACH_TS409=y
CONFIG_MACH_WRT350N_V2=y
diff -Naur linux-2.6.34-geos_one-r1.orig/arch/arm/mach-orion5x/Kconfig linux-2.6.34-geos_one-r1/arch/arm/mach-orion5x/Kconfig
--- linux-2.6.34-geos_one-r1.orig/arch/arm/mach-orion5x/Kconfig 2010-06-27 06:56:27.606130813 +0000
+++ linux-2.6.34-geos_one-r1/arch/arm/mach-orion5x/Kconfig 2010-06-27 06:57:40.438133825 +0000
@@ -64,6 +64,44 @@
Say 'Y' here if you want your kernel to support the
Buffalo Linkstation LS-HGL platform.
+config MACH_LINKSTATION_PRODUO
+ bool "Buffalo Linkstation Pro Duo"
+ select I2C_BOARDINFO
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo Linkstation Pro Duo platform.
+
+ LS-W1.0TGL/R1 is the general model number. There
+ is no /R3 models, as /R1 stands for RAID1.
+ There are two hardware revisions of the product.
+
+ The first revision has version 1.xx firmware, 64 MB RAM,
+ a single USB port, a power BUTTON, an Auto/Manual
+ power MODE SWITCH, and a RESET button.
+
+ The second revision has version 3.xx firmware, 128 MB RAM,
+ two USB ports, an Off/On/Auto power SWITCH, and a FUNCTION button.
+
+ choice
+ prompt "HW model"
+ depends on MACH_LINKSTATION_PRODUO
+ default MACH_LINKSTATION_PRODUO_REV1
+ default MACH_LINKSTATION_PRODUO_REV2
+
+ config MACH_LINKSTATION_PRODUO_REV1
+ bool "Revision 1"
+ help
+ The first revision has version 1.xx firmware, 64 MB RAM,
+ a single USB port, a power BUTTON, an Auto/Manual
+ power MODE SWITCH, and a RESET button.
+
+ config MACH_LINKSTATION_PRODUO_REV2
+ bool "Revision 2"
+ help
+ The second revision has version 3.xx firmware, 128 MB RAM,
+ two USB ports, an Off/On/Auto power SWITCH, and a FUNCTION button.
+ endchoice
+
config MACH_TS409
bool "QNAP TS-409"
help
diff -Naur linux-2.6.34-geos_one-r1.orig/arch/arm/mach-orion5x/Makefile linux-2.6.34-geos_one-r1/arch/arm/mach-orion5x/Makefile
--- linux-2.6.34-geos_one-r1.orig/arch/arm/mach-orion5x/Makefile 2010-06-27 06:56:27.581136017 +0000
+++ linux-2.6.34-geos_one-r1/arch/arm/mach-orion5x/Makefile 2010-06-27 07:04:02.631883167 +0000
@@ -6,6 +6,7 @@
obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
obj-$(CONFIG_MACH_LINKSTATION_MINI) += lsmini-setup.o
obj-$(CONFIG_MACH_LINKSTATION_LS_HGL) += ls_hgl-setup.o
+obj-$(CONFIG_MACH_LINKSTATION_PRODUO) += lsproduo-setup.o
obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
obj-$(CONFIG_MACH_TS209) += ts209-setup.o tsx09-common.o
obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
diff -Naur linux-2.6.34-geos_one-r1.orig/arch/arm/mach-orion5x/lsproduo-setup.c linux-2.6.34-geos_one-r1/arch/arm/mach-orion5x/lsproduo-setup.c
--- linux-2.6.34-geos_one-r1.orig/arch/arm/mach-orion5x/lsproduo-setup.c 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.34-geos_one-r1/arch/arm/mach-orion5x/lsproduo-setup.c 2010-06-27 06:57:40.441886174 +0000
@@ -0,0 +1,391 @@
+/*
+ * arch/arm/mach-orion5x/lsproduo-setup.c
+ *
+ * Source taken from arch/arm/mach-orion5x/lsmini-setup.c - kernel 2.6.30
+ * Maintainer: Manuel Bernhardt <prodigy7@gmail.com>
+ *
+ * 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/pci.h>
+#include <linux/mtd/physmap.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/leds.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/i2c.h>
+#include <linux/ata_platform.h>
+#include <asm/mach-types.h>
+#include <linux/gpio.h>
+#include <asm/mach/arch.h>
+#include "common.h"
+#include "mpp.h"
+#include "include/mach/system.h"
+#include <linux/module.h>
+#include <linux/proc_fs.h>
+#include <asm/uaccess.h>
+
+/*****************************************************************************
+ * Linkstation Pro Duo Info
+ ****************************************************************************/
+
+/*
+ * 256K NOR flash Device bus boot chip select
+ */
+
+#define LSPRODUO_NOR_BOOT_BASE 0xf4000000
+#define LSPRODUO_NOR_BOOT_SIZE SZ_256K
+
+/*****************************************************************************
+ * 256KB NOR Flash on BOOT Device
+ ****************************************************************************/
+
+static struct physmap_flash_data lsproduo_nor_flash_data = {
+ .width = 1,
+};
+
+static struct resource lsproduo_nor_flash_resource = {
+ .flags = IORESOURCE_MEM,
+ .start = LSPRODUO_NOR_BOOT_BASE,
+ .end = LSPRODUO_NOR_BOOT_BASE + LSPRODUO_NOR_BOOT_SIZE - 1,
+};
+
+static struct platform_device lsproduo_nor_flash = {
+ .name = "physmap-flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &lsproduo_nor_flash_data,
+ },
+ .num_resources = 1,
+ .resource = &lsproduo_nor_flash_resource,
+};
+
+/*****************************************************************************
+ * Ethernet
+ ****************************************************************************/
+
+static struct mv643xx_eth_platform_data lsproduo_eth_data = {
+ .phy_addr = 8,
+};
+
+/*****************************************************************************
+ * RTC 5C372a on I2C bus
+ ****************************************************************************/
+
+static struct i2c_board_info __initdata lsproduo_i2c_rtc = {
+ I2C_BOARD_INFO("rs5c372a", 0x32),
+};
+
+/*****************************************************************************
+ * LEDs attached to GPIO
+ ****************************************************************************/
+
+#define LSPRODUO_GPIO_LED_ALARM 2
+#define LSPRODUO_GPIO_LED_INFO 3
+#define LSPRODUO_GPIO_LED_PWR 0
+
+static struct gpio_led lsproduo_led_pins[] = {
+ {
+ .name = "alarm:red",
+ .gpio = LSPRODUO_GPIO_LED_ALARM,
+ .active_low = 1,
+ }, {
+ .name = "info:amber",
+ .gpio = LSPRODUO_GPIO_LED_INFO,
+ .active_low = 1,
+ }, {
+ .name = "power:amber",
+ .gpio = LSPRODUO_GPIO_LED_PWR,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_led_platform_data lsproduo_led_data = {
+ .leds = lsproduo_led_pins,
+ .num_leds = ARRAY_SIZE(lsproduo_led_pins),
+};
+
+static struct platform_device lsproduo_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &lsproduo_led_data,
+ },
+};
+
+/****************************************************************************
+ * GPIO Attached Keys
+ ****************************************************************************/
+
+#define LSPRODUO_GPIO_KEY_POWER 8
+#define LSPRODUO_GPIO_KEY_AUTOPOWER 10
+
+#define LSPRODUO_SW_POWER 0x00
+#define LSPRODUO_SW_AUTOPOWER 0x01
+
+static struct gpio_keys_button lsproduo_buttons[] = {
+ {
+ .type = EV_SW,
+ .code = LSPRODUO_SW_POWER,
+ .gpio = LSPRODUO_GPIO_KEY_POWER,
+ .desc = "Power-on Switch",
+ .active_low = 1,
+ }, {
+ .type = EV_SW,
+ .code = LSPRODUO_SW_AUTOPOWER,
+ .gpio = LSPRODUO_GPIO_KEY_AUTOPOWER,
+ .desc = "Power-auto Switch",
+ .active_low = 1,
+ },
+};
+
+static struct gpio_keys_platform_data lsproduo_button_data = {
+ .buttons = lsproduo_buttons,
+ .nbuttons = ARRAY_SIZE(lsproduo_buttons),
+};
+
+static struct platform_device lsproduo_button_device = {
+ .name = "gpio-keys",
+ .id = -1,
+ .num_resources = 0,
+ .dev = {
+ .platform_data = &lsproduo_button_data,
+ },
+};
+
+/****************************************************************************
+ * GPIO Attached Fan
+ ****************************************************************************/
+
+/* Define max char len */
+#define MAX_LEN 8
+
+#define LSPRODUO_GPIO_FAN_LOW 17
+#define LSPRODUO_GPIO_FAN_HIGH 14
+
+static struct proc_dir_entry *lsproduo_proc_dir_root, *lsproduo_proc_dir_gpio, *lsproduo_fan_proc_file;
+static char lsproduo_fan_state[MAX_LEN];
+
+static int lsproduo_fan_get(char *buf, char **start, off_t offset, int count, int *eof, void *data)
+{
+ int len;
+
+ len = snprintf(buf, count, "state: %s\n", lsproduo_fan_state);
+ return len;
+}
+
+static int lsproduo_fan_set( struct file *file, const char *buffer, unsigned long count, void *data )
+{
+ int len, ret;
+ char *ptr, tState[MAX_LEN];
+
+ if (count > MAX_LEN )
+ len = MAX_LEN;
+ else
+ len = count;
+
+ ret = copy_from_user(tState, buffer, len);
+ if(ret < 0)
+ {
+ printk(KERN_ERR "%s: Setting fan speed failed\n", "lsproduo");
+ return -EFAULT;
+ }
+
+ ptr = strrchr(tState, '\n');
+ if(ptr) *ptr = '\0';
+
+ if (strcasecmp(tState, "off") == 0)
+ {
+ printk(KERN_DEBUG "%s: set fan off\n", "lsproduo");
+ sprintf(lsproduo_fan_state, "off");
+ gpio_set_value(LSPRODUO_GPIO_FAN_LOW, 1);
+ gpio_set_value(LSPRODUO_GPIO_FAN_HIGH, 1);
+ } else if (strcasecmp(tState, "slow") == 0)
+ {
+ printk(KERN_DEBUG "%s: set fan slow\n", "lsproduo");
+ sprintf(lsproduo_fan_state, "slow");
+ gpio_set_value(LSPRODUO_GPIO_FAN_LOW, 1);
+ gpio_set_value(LSPRODUO_GPIO_FAN_HIGH, 0);
+ } else if (strcasecmp(tState, "fast") == 0)
+ {
+ printk(KERN_DEBUG "%s: set fan fast\n", "lsproduo");
+ sprintf(lsproduo_fan_state, "fast");
+ gpio_set_value(LSPRODUO_GPIO_FAN_LOW, 0);
+ gpio_set_value(LSPRODUO_GPIO_FAN_HIGH, 1);
+ } else if (strcasecmp(tState, "full") == 0)
+ {
+ printk(KERN_DEBUG "%s: set fan full\n", "lsproduo");
+ sprintf(lsproduo_fan_state, "full");
+ gpio_set_value(LSPRODUO_GPIO_FAN_LOW, 0);
+ gpio_set_value(LSPRODUO_GPIO_FAN_HIGH, 0);
+ } else
+ {
+ printk(KERN_ERR "%s: unknown fan speed given\n", "lsproduo");
+ }
+
+ lsproduo_fan_state[len] = '\0';
+
+ return len;
+}
+
+/*****************************************************************************
+ * SATA
+ ****************************************************************************/
+static struct mv_sata_platform_data lsproduo_sata_data = {
+ .n_ports = 2,
+};
+
+
+/*****************************************************************************
+ * Linkstation Pro Duo specific power off method: reboot
+ ****************************************************************************/
+/*
+ * On the Linkstation Pro Duo, the shutdown process is following:
+ * - Userland monitors key events until the power switch goes to off position
+ * - The board reboots
+ * - U-boot starts and goes into an idle mode waiting for the user
+ * to move the switch to ON position
+ */
+
+static void lsproduo_power_off(void)
+{
+ arch_reset(0, NULL);
+}
+
+
+/*****************************************************************************
+ * General Setup
+ ****************************************************************************/
+
+#define LSPRODUO_GPIO_USB_POWER 9
+#define LSPRODUO_GPIO_AUTO_POWER 10
+#define LSPRODUO_GPIO_POWER 8
+
+#define LSPRODUO_GPIO_HDD_POWER0 1
+
+#ifdef CONFIG_MACH_LINKSTATION_PRODUO_REV2
+#define LSPRODUO_GPIO_USB_POWER2 19
+#endif
+
+static struct orion5x_mpp_mode lsproduo_mpp_modes[] __initdata = {
+ { 0, MPP_GPIO }, /* LED_PWR */
+ { 1, MPP_GPIO }, /* HDD_PWR */
+ { 2, MPP_GPIO }, /* LED_ALARM */
+ { 3, MPP_GPIO }, /* LED_INFO */
+ { 4, MPP_UNUSED },
+ { 5, MPP_UNUSED },
+ { 6, MPP_GPIO }, /* FAN_LCK */
+ { 7, MPP_GPIO }, /* INIT */
+ { 8, MPP_GPIO }, /* POWER */
+ { 9, MPP_GPIO }, /* USB_PWR */
+ { 10, MPP_GPIO }, /* AUTO_POWER */
+ { 11, MPP_UNUSED }, /* LED_ETH dummy */
+ { 12, MPP_UNUSED },
+ { 13, MPP_UNUSED },
+ { 14, MPP_GPIO }, /* FAN_HIGH */
+ { 15, MPP_UNUSED },
+ { 16, MPP_UNUSED },
+ { 17, MPP_GPIO }, /* FAN_LOW */
+ { 18, MPP_UNUSED },
+#ifdef CONFIG_MACH_LINKSTATION_PRODUO_REV1
+ { 19, MPP_UNUSED },
+#endif
+#ifdef CONFIG_MACH_LINKSTATION_PRODUO_REV2
+ { 19, MPP_GPIO }, /* USB_PWR2 */
+#endif
+ { -1 },
+};
+
+static void __init lsproduo_init(void)
+{
+ /*
+ * Setup basic Orion functions. Need to be called early.
+ */
+ orion5x_init();
+
+ orion5x_mpp_conf(lsproduo_mpp_modes);
+
+ /*
+ * Configure peripherals.
+ */
+ orion5x_ehci0_init();
+ orion5x_ehci1_init();
+ orion5x_eth_init(&lsproduo_eth_data);
+ orion5x_i2c_init();
+ orion5x_sata_init(&lsproduo_sata_data);
+ orion5x_uart0_init();
+ orion5x_xor_init();
+
+ orion5x_setup_dev_boot_win(LSPRODUO_NOR_BOOT_BASE,
+ LSPRODUO_NOR_BOOT_SIZE);
+ platform_device_register(&lsproduo_nor_flash);
+
+ platform_device_register(&lsproduo_button_device);
+
+ platform_device_register(&lsproduo_leds);
+
+ i2c_register_board_info(0, &lsproduo_i2c_rtc, 1);
+
+ /* enable USB power */
+ gpio_set_value(LSPRODUO_GPIO_USB_POWER, 1);
+
+#ifdef CONFIG_MACH_LINKSTATION_PRODUO_REV2
+ gpio_set_value(LSPRODUO_GPIO_USB_POWER2, 1);
+#endif
+
+ printk(KERN_INFO "Buffalo Linkstation Pro Duo fan driver loaded\n");
+ sprintf(lsproduo_fan_state, "full");
+ gpio_set_value(LSPRODUO_GPIO_FAN_LOW, 0);
+ gpio_set_value(LSPRODUO_GPIO_FAN_HIGH, 0);
+
+ lsproduo_proc_dir_root = proc_mkdir( "linkstation", NULL );
+ lsproduo_proc_dir_gpio = proc_mkdir( "gpio", lsproduo_proc_dir_root );
+ lsproduo_fan_proc_file = create_proc_entry( "fan", S_IRUGO, lsproduo_proc_dir_gpio );
+ if( lsproduo_fan_proc_file ) {
+ lsproduo_fan_proc_file->read_proc = lsproduo_fan_get;
+ lsproduo_fan_proc_file->write_proc = lsproduo_fan_set;
+ lsproduo_fan_proc_file->data = NULL;
+ } else
+ {
+ printk(KERN_INFO "Registration of fan device failed\n");
+ }
+
+ /* register power-off method */
+ pm_power_off = lsproduo_power_off;
+
+ pr_info("%s: finished\n", __func__);
+}
+
+#ifdef CONFIG_MACH_LINKSTATION_PRODUO_REV1
+MACHINE_START(LINKSTATION_PRODUO, "Buffalo Linkstation Pro Duo - Revision 1")
+ /* Maintainer: Manuel Bernhardt <prodigy7@gmail.com> */
+ .phys_io = ORION5X_REGS_PHYS_BASE,
+ .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
+ .boot_params = 0x00000100,
+ .init_machine = lsproduo_init,
+ .map_io = orion5x_map_io,
+ .init_irq = orion5x_init_irq,
+ .timer = &orion5x_timer,
+ .fixup = tag_fixup_mem32,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_LINKSTATION_PRODUO_REV2
+MACHINE_START(LINKSTATION_PRODUO, "Buffalo Linkstation Pro Duo - Revision 2")
+ /* Maintainer: Manuel Bernhardt <prodigy7@gmail.com> */
+ .phys_io = ORION5X_REGS_PHYS_BASE,
+ .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
+ .boot_params = 0x00000100,
+ .init_machine = lsproduo_init,
+ .map_io = orion5x_map_io,
+ .init_irq = orion5x_init_irq,
+ .timer = &orion5x_timer,
+ .fixup = tag_fixup_mem32,
+MACHINE_END
+#endif
+

View File

@ -1,254 +0,0 @@
--- a/arch/arm/mach-kirkwood/include/mach/system.h 2010-02-09 20:57:19.000000000 +0800
+++ b/arch/arm/mach-kirkwood/include/mach/system.h 2010-08-03 19:01:14.000000000 +0800
@@ -9,6 +9,8 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
+#include <linux/io.h>
+#include <asm/proc-fns.h>
#include <mach/bridge-regs.h>
static inline void arch_idle(void)
--- a/arch/arm/mach-kirkwood/Kconfig 2010-02-09 20:57:19.000000000 +0800
+++ b/arch/arm/mach-kirkwood/Kconfig 2010-08-04 10:34:53.000000000 +0800
@@ -87,6 +87,12 @@
Say 'Y' here if you want your kernel to support the
HP t5325 Thin Client.
+config MACH_LSWXL
+ bool "Buffalo LS-WXL Series"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo LS-WXL Series.
+
endmenu
endif
--- a/arch/arm/mach-kirkwood/lswxl-setup.c 1970-01-01 07:30:00.000000000 +0730
+++ b/arch/arm/mach-kirkwood/lswxl-setup.c 2010-08-04 11:30:13.000000000 +0800
@@ -0,0 +1,183 @@
+/*
+ * arch/arm/mach-kirkwood/lswxl-setup.c
+ *
+ * Buffalo LS Kirkwood Series 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/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/init.h>
+#include <linux/input.h>
+#include <linux/leds.h>
+#include <linux/platform_device.h>
+#include <linux/ata_platform.h>
+#include <linux/mv643xx_eth.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include "include/mach/system.h"
+#include <mach/kirkwood.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mv643xx_eth_platform_data lswxl_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
+};
+
+static struct mv643xx_eth_platform_data lswxl_ge01_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(8),
+};
+
+static unsigned int lswxl_mpp_config[] __initdata = {
+ MPP8_GPIO, /* HDD1 Error LED */
+ MPP28_GPIO, /* HDD1 Power */
+ MPP29_GPIO, /* HDD2 Power */
+ MPP34_GPIO, /* FUNC2 LED */
+ MPP36_GPIO, /* FUNC1 LED */
+ MPP37_GPIO, /* USB Vbus Power */
+ MPP38_GPIO, /* INFO LED */
+ MPP39_GPIO, /* POWER LED */
+ MPP40_GPIO, /* FAN Status */
+ MPP41_GPIO, /* FUNC Switch */
+ MPP42_GPIO, /* POWER Switch */
+ MPP43_GPIO, /* AUTO-POWER Switch*/
+ MPP46_GPIO, /* HDD1 Error LED*/
+ MPP47_GPIO, /* FAN High */
+ MPP48_GPIO, /* FAN Low */
+ MPP49_GPIO, /* ALARM LED */
+ 0
+};
+
+static struct mv_sata_platform_data lswxl_sata_data = {
+ .n_ports = 2,
+};
+
+static struct gpio_led lswxl_led_pins[] = {
+ {
+ .name = "func1",
+ .gpio = 36,
+ .active_low = 1,
+ },
+ {
+ .name = "func2",
+ .gpio = 34,
+ .active_low = 0,
+ },
+ {
+ .name = "alarm",
+ .gpio = 49,
+ .active_low = 1,
+ },
+ {
+ .name = "info",
+ .gpio = 38,
+ .active_low = 1,
+ },
+ {
+ .name = "power",
+ .gpio = 39,
+ .default_trigger = "default-on",
+ .active_low = 0,
+ },
+ {
+ .name = "hdd1",
+ .gpio = 8,
+ .active_low = 0,
+ },
+ {
+ .name = "hdd2",
+ .gpio = 46,
+ .active_low = 0,
+ },
+};
+
+static struct gpio_led_platform_data lswxl_led_data = {
+ .leds = lswxl_led_pins,
+ .num_leds = ARRAY_SIZE(lswxl_led_pins),
+};
+
+static struct platform_device lswxl_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &lswxl_led_data,
+ }
+};
+
+#define LSWXL_GPIO_USB_VBUS_EN 37
+#define LSWXL_GPIO_KEY_FUNC 41
+
+static struct gpio_keys_button lswxl_buttons[] = {
+ {
+ .code = KEY_OPTION,
+ .gpio = LSWXL_GPIO_KEY_FUNC,
+ .desc = "Function Button",
+ .active_low = 1,
+ },
+};
+
+static struct gpio_keys_platform_data lswxl_button_data = {
+ .buttons = lswxl_buttons,
+ .nbuttons = ARRAY_SIZE(lswxl_buttons),
+};
+
+static struct platform_device lswxl_button_device = {
+ .name = "gpio-keys",
+ .id = -1,
+ .num_resources = 0,
+ .dev = {
+ .platform_data = &lswxl_button_data,
+ },
+};
+
+static void lswxl_power_off(void)
+{
+ arch_reset(0, NULL);
+}
+
+static void __init lswxl_init(void)
+{
+ /*
+ * Basic setup. Needs to be called early.
+ */
+ kirkwood_init();
+ kirkwood_mpp_conf(lswxl_mpp_config);
+
+ kirkwood_uart0_init();
+
+ if (gpio_request(LSWXL_GPIO_USB_VBUS_EN, "USB Power Enable") != 0 ||
+ gpio_direction_output(LSWXL_GPIO_USB_VBUS_EN, 1) != 0)
+ printk(KERN_ERR "can't set up USB Power Enable\n");
+ kirkwood_ehci_init();
+
+ kirkwood_ge00_init(&lswxl_ge00_data);
+ kirkwood_ge01_init(&lswxl_ge01_data);
+
+ kirkwood_sata_init(&lswxl_sata_data);
+
+ kirkwood_spi_init();
+
+ platform_device_register(&lswxl_leds);
+ platform_device_register(&lswxl_button_device);
+
+ /* register power-off method */
+ pm_power_off = lswxl_power_off;
+
+ pr_info("%s: finished\n", __func__);
+}
+
+
+
+MACHINE_START(LSWXL, "Buffalo LS-WXL")
+ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
+ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
+ .boot_params = 0x00000100,
+ .init_machine = lswxl_init,
+ .map_io = kirkwood_map_io,
+ .init_irq = kirkwood_init_irq,
+ .timer = &kirkwood_timer,
+MACHINE_END
--- a/arch/arm/mach-kirkwood/Makefile 2010-02-09 20:57:19.000000000 +0800
+++ b/arch/arm/mach-kirkwood/Makefile 2010-08-04 10:40:43.000000000 +0800
@@ -11,5 +11,6 @@
obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o
obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
obj-$(CONFIG_MACH_T5325) += t5325-setup.o
+obj-$(CONFIG_MACH_LSWXL) += lswxl-setup.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
--- a/arch/arm/tools/mach-types 2010-02-09 20:57:19.000000000 +0800
+++ b/arch/arm/tools/mach-types 2010-08-04 11:19:52.000000000 +0800
@@ -541,6 +541,7 @@
av3xx MACH_AV3XX AV3XX 525
avila MACH_AVILA AVILA 526
pxa_mpm10 MACH_PXA_MPM10 PXA_MPM10 527
+lswxl MACH_LSWXL LSWXL 527
pxa_kyanite MACH_PXA_KYANITE PXA_KYANITE 528
sgold MACH_SGOLD SGOLD 529
oscar MACH_OSCAR OSCAR 530
--- a/arch/arm/mach-kirkwood/common.c 2010-08-05 03:02:22.000000000 +0000
+++ b/arch/arm/mach-kirkwood/common.c 2010-08-05 03:02:22.000000000 +0000
@@ -32,6 +32,7 @@
#include <plat/orion_nand.h>
#include <plat/orion_wdt.h>
#include <plat/time.h>
+#include <asm/mach-types.h>
#include "common.h"
/*****************************************************************************
@@ -853,9 +854,10 @@
kirkwood_pcie_id(&dev, &rev);
- if ((dev == MV88F6281_DEV_ID && (rev == MV88F6281_REV_A0 ||
+ if (((dev == MV88F6281_DEV_ID && (rev == MV88F6281_REV_A0 ||
rev == MV88F6281_REV_A1)) ||
- (dev == MV88F6282_DEV_ID))
+ (dev == MV88F6282_DEV_ID)) &&
+ !machine_is_lswxl()) /* LS-WXL is underclocked */
return 200000000;
return 166666667;