ETN I/O access to FPGA register
===============================

IMPORTANT: this (and every other driver) assumes that FPGA register size is 16
bit, so sometimes you may see magic "2 *" parts.

This driver implements char device (actually, miscdevice) interface to FPGA
registers.

There is an interface called HPS-to-FPGA, that are mapped on address range
<0xc0000000, 0xc0000000 + 0x3ffff>. FPGA exports its registers on this interface
so we can access it by simply reading/writing to the memory. While it can be
done by simply opening /dev/mem and read/write to the raw memory, we provide
more convenient interface.

etn_io requests memory range for that interface and maps it with ioremap. Though
not a full range mapped - only 0x4088 bytes.

But before that mapping etn_io initialize it - disables reset and enables
mapping on CPU memory itself - see details in init_hw_interface. 
(XXX: this was removed because we flash FPGA in U-boot)

We also map Lightweight HPS-to-FPGA interface, though we don't use it.

libfpgaio and file_operations
-----------------------------

etn_io suppose to export functions for accessing FPGA registers for any other
driver, specifically etn_net. But for now these functions are just hangs without
any usage.

Anyway, these functions know how to do I/O from "struct fpga_io" that you pass
in. "fpga_io" is part of libfpgaio - generic library for doing I/O on registers.
This library has methods like "set bit in register", "apply mask to register"
and other. That methods are reimplemented in etn_net/regs.c but must be ported
on a common base - libfpgaio. So while it all hangs there - don't pay much
attention to it.

file_operations callbacks are quite simple:

* etn_open just saves references
* etn_release does nothing
* etn_llseek moves pointer of char device
* etn_read reads from device pointer by a single bytes.
* etn_write write to device pointer by a single bytes.

IMPORTANT: etn_open/etn_release are used to lock/unlock mutex to synchronize
access from multiple clients, but this was removed because current userspace
architecture requires device to keep open.

etn_read and etn_write must be ported to libfpgaio, but libfpgaio operates on
registers, which are 2 bytes long. So this part needs some refactoring.

