Skip to content

Commit

Permalink
Added latest kernel patches and configs. My last commit, srry guys
Browse files Browse the repository at this point in the history
  • Loading branch information
peeter123 committed Jan 21, 2013
1 parent 79c5093 commit 80621f3
Show file tree
Hide file tree
Showing 31 changed files with 50,003 additions and 18 deletions.
Binary file added 3.4.3/arch/arm/boot/uImage
Binary file not shown.
2,533 changes: 2,533 additions & 0 deletions 3.4.3/arch/arm/configs/nsa310_defconfig

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions 3.4.3/arch/arm/mach-kirkwood/Kconfig
@@ -0,0 +1,147 @@
if ARCH_KIRKWOOD

menu "Marvell Kirkwood Implementations"

config MACH_DB88F6281_BP
bool "Marvell DB-88F6281-BP Development Board"
help
Say 'Y' here if you want your kernel to support the
Marvell DB-88F6281-BP Development Board.

config MACH_RD88F6192_NAS
bool "Marvell RD-88F6192-NAS Reference Board"
help
Say 'Y' here if you want your kernel to support the
Marvell RD-88F6192-NAS Reference Board.

config MACH_RD88F6281
bool "Marvell RD-88F6281 Reference Board"
help
Say 'Y' here if you want your kernel to support the
Marvell RD-88F6281 Reference Board.

config MACH_MV88F6281GTW_GE
bool "Marvell 88F6281 GTW GE Board"
help
Say 'Y' here if you want your kernel to support the
Marvell 88F6281 GTW GE Board.

config MACH_SHEEVAPLUG
bool "Marvell SheevaPlug Reference Board"
help
Say 'Y' here if you want your kernel to support the
Marvell SheevaPlug Reference Board.

config MACH_ESATA_SHEEVAPLUG
bool "Marvell eSATA SheevaPlug Reference Board"
help
Say 'Y' here if you want your kernel to support the
Marvell eSATA SheevaPlug Reference Board.

config MACH_GURUPLUG
bool "Marvell GuruPlug Reference Board"
help
Say 'Y' here if you want your kernel to support the
Marvell GuruPlug Reference Board.

config MACH_TS219
bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
help
Say 'Y' here if you want your kernel to support the
QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and
TS-219P+ Turbo NAS devices.

config MACH_TS41X
bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS"
help
Say 'Y' here if you want your kernel to support the
QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo
NAS devices.

config MACH_DOCKSTAR
bool "Seagate FreeAgent DockStar"
help
Say 'Y' here if you want your kernel to support the
Seagate FreeAgent DockStar.

config MACH_OPENRD
bool

config MACH_OPENRD_BASE
bool "Marvell OpenRD Base Board"
select MACH_OPENRD
help
Say 'Y' here if you want your kernel to support the
Marvell OpenRD Base Board.

config MACH_OPENRD_CLIENT
bool "Marvell OpenRD Client Board"
select MACH_OPENRD
help
Say 'Y' here if you want your kernel to support the
Marvell OpenRD Client Board.

config MACH_OPENRD_ULTIMATE
bool "Marvell OpenRD Ultimate Board"
select MACH_OPENRD
help
Say 'Y' here if you want your kernel to support the
Marvell OpenRD Ultimate Board.

config MACH_NETSPACE_V2
bool "LaCie Network Space v2 NAS Board"
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"
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"
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"
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
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"
help
Say 'Y' here if you want your kernel to support the
LaCie 5Big Network v2 NAS.

config MACH_T5325
bool "HP t5325 Thin Client"
help
Say 'Y' here if you want your kernel to support the
HP t5325 Thin Client.

config MACH_NSA310
bool "Zyxel NSA-310"
help
Say 'Y' here if you want your kernel to support the
Zyxel NSA-310 NAS.

config MACH_NSA320
bool "Zyxel NSA-320"
help
Say 'Y' here if you want your kernel to support the
Zyxel NSA-320 NAS.

endmenu

endif
24 changes: 24 additions & 0 deletions 3.4.3/arch/arm/mach-kirkwood/Makefile
@@ -0,0 +1,24 @@
obj-y += common.o addr-map.o irq.o pcie.o mpp.o

obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
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_GURUPLUG) += guruplug-setup.o
obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_NETSPACE_MAX_V2) += netspace_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o
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_NSA320) += nsa320-setup.o mcu.o
obj-$(CONFIG_MACH_NSA310) += nsa310-setup.o mcu.o

obj-$(CONFIG_CPU_IDLE) += cpuidle.o
125 changes: 125 additions & 0 deletions 3.4.3/arch/arm/mach-kirkwood/mcu.c
@@ -0,0 +1,125 @@
#include <linux/module.h>
#include <linux/init.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/workqueue.h>
#include <linux/timer.h>
#include <linux/syscalls.h>
#include <linux/kmod.h>
#include <linux/syscalls.h>
#include <linux/fs.h>
#include <asm/fcntl.h>
#include <asm/hardirq.h>
#include <linux/ioctl.h>
#include <linux/cdev.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <asm/io.h>
#include <linux/spinlock.h>
#include <mach/hardware.h>
#include <asm/uaccess.h>
#include <linux/syscalls.h>
#include <asm/atomic.h>
#include <linux/proc_fs.h>
#include <asm/uaccess.h>
#include <linux/kernel.h>

#include <mach/kirkwood.h>
#include <plat/gpio.h>
#include <linux/gpio.h>
#include "common.h"
#include "mpp.h"



#define MCU_DATA_PIN 14
#define MCU_CLK_PIN 16
#define MCU_ACT_PIN 17

MODULE_LICENSE("GPL v2");
#define MODULE_NAME "mcu"

unsigned long mcu_data = 0;
unsigned long mcu_counter = 0;

static struct proc_dir_entry *mcu_proc;

static int mcu_status_read_fn(char *buf, char **start, off_t offset,
int count, int *eof, void *data)
{
unsigned long len, i;

mcu_data = 0;

gpio_request(14, "MCU_DATA");
gpio_request(16, "MCU_CLK");
gpio_request(17, "MCU_ACT");

gpio_direction_output(MCU_ACT_PIN, 0);
msleep(100);
gpio_direction_input(MCU_DATA_PIN);
gpio_direction_output(MCU_CLK_PIN, 0);
udelay(100);

for(i = 0 ; i < 32 ; i++)
{
mcu_data <<= 1;
gpio_set_value(MCU_CLK_PIN,1);

mcu_data |= gpio_get_value(MCU_DATA_PIN)?0x1:0;

udelay(100);

gpio_set_value(MCU_CLK_PIN,0);

udelay(100);
}


gpio_set_value(MCU_CLK_PIN,1);
gpio_set_value(MCU_ACT_PIN,1);


gpio_free(14);
gpio_free(16);
gpio_free(17);

len = sprintf(buf, "MagicNum:%u\nRpss:%u\nTemperature:%u\n",(unsigned int)((mcu_data & 0xff000000) >> 24),
(unsigned int)((mcu_data & 0xff0000) >> 16),
(unsigned int)((mcu_data & 0xffff)));
*eof = 1;

return len;
}

static int mcu_status_write_fn(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
return 0;
}


static int __init mcu_init(void)
{

mcu_proc = create_proc_entry("mcu", 0644, NULL);
if(mcu_proc != NULL)
{
mcu_proc->read_proc = mcu_status_read_fn;
mcu_proc->write_proc = mcu_status_write_fn;
}

return 0;
}

static void __exit mcu_exit(void)
{
remove_proc_entry("mcu", NULL);

}

module_init(mcu_init);
module_exit(mcu_exit);

0 comments on commit 80621f3

Please sign in to comment.