The superio driver is for moxa v2101, da-682, da-683, da-685, da-682a, v2616a and da-820 serials embedded computer.
It's the base driver moxa_device_dio.ko and moxa_v2100_wdt.ko.
The moxa_v2100_superio.ko should be loaded into kernel before the moxa_v2100_wdt.ko, moxa_uart_mode.ko and moxa_device_dio.ko are loaded.
this is the architecture of the super IO, watchdog, UART mode and DIO driver.


user sapce	debian watchdog daemon

		/dev/watchdog
		-----------------------------------------------------------------
kernel space	| moxa_v2100_wdt.ko  |  moxa_device_dio.ko |  moxa_uart_mode.ko  |
		-----------------------------------------------------------------
		| moxa_v2100_superio.ko                                          | 
		-----------------------------------------------------------------


1. Setting the path to your kernel source tree in Makefile.

	The KDIR is variable is used for the path of kernel source.
	If your kernel is located at another location, please set the KDIR depends on your making environment.

	KDIR:=/lib/modules/$(shell uname -r)/build

	or other location of your kernel source

	KDIR=/media/Home/work/DA-820/linux-3.2.x

	[root@localhost moxa_v2100_superio]# tar xzvf moxa_v2100_superio.tar.gz
	[root@localhost moxa_v2100_superio]# cd moxa_v2100_superio
	[root@localhost moxa_v2100_superio]# vi Makefile
	...
	#KDIR:=$(ROOTDIR)/$(LINUXDIR)
	KDIR=/lib/modules/`uname -r`/build
	...

2. Install the kernel development environment or compile the kernel before making the module.

3. Compile the driver after your kernel source has compiled.

	[root@localhost moxa_v2100_superio]# make
	Making modules moxa_v2100_superio.ko ...
	make -C /lib/modules/`uname -r`/build M=`pwd` modules
	make[1]: Entering directory `/usr/src/kernels/2.6.18-348.el5-x86_64'
	  CC [M]  /root/wdt/wdt_driver/moxa_v2100_superio/moxa_v2100_superio.o
	  Building modules, stage 2.
	  MODPOST
	  CC      /root/wdt/wdt_driver/moxa_v2100_superio/moxa_v2100_superio.mod.o
	  LD [M]  /root/wdt/wdt_driver/moxa_v2100_superio/moxa_v2100_superio.ko

4. Load the superio driver drivers.

	Load the driver manually.

	$ insmod ./moxa_v2100_superio.ko

	You can install the driver manually

	For Redhat Enterprise 5.x
	$ cp -a ./moxa_v2100_superio.ko  /lib/modules/`uname -r`/kernel/drivers/char/watchdog/

	For Ubuntu/Debian
	$ cp -a ./moxa_v2100_superio.ko  /lib/modules/`uname -r`/kernel/drivers/watchdog/

	Install the super I/O driver by Makefile
	$ make install
