embeddedsw/mcap/linux
Kedareswara rao Appana fff3aa2723 mcap: linux: Improve error info..
This patch updates the error information
message in the driver so that it will error out
with detailed info so that it will be clear to the users
incase of path to bitstreams is incorrect.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
2015-12-01 15:21:57 +05:30
..
Makefile mcap: linux: Update copyright 2015-07-31 16:54:55 +05:30
mcap.c mcap: linux: Options -c and -C may be confusing 2015-07-31 16:54:56 +05:30
mcap_lib.c mcap: linux: Improve error info.. 2015-12-01 15:21:57 +05:30
mcap_lib.h mcap: linux: Update copyright 2015-07-31 16:54:55 +05:30
README mcap: linux: Options -c and -C may be confusing 2015-07-31 16:54:56 +05:30

Steps to compile
################
1. Download the latest PCI Utilites source from
   https://www.kernel.org/pub/software/utils/pciutils/

   (Or) Source can be clone from the GIT repository,
	http://git.kernel.org/cgit/utils/pciutils/pciutils.git/

2. Compile the PCI Utilities by the following command,
   $pci-utils> make

3. Compile the MCAP Library by the following make command,
   $mcap-lib> make PCIUTILS_PATH=<PATH to PCI Utilities Source>

4. Compiling the MCAP library generates 'libmcap.a' and
   example elf 'mcap' built on top of generated library.

Steps to Run
############
-> Running the 'mcap.elf' with '-h' lists all the options
   that are available to communicate with the underlying
   MCAP device,
   $Linux> ./mcap -h
   Usage: mcap [options]

   Options:
	-x		Specify MCAP Device Id in hex (MANDATORY)
	-p    <file>	Program Bitstream (.bin/.bit/.rbt)
	-C    <file>	Partial Reconfiguration Clear File(.bin/.bit/.rbt)
	-r		Performs Simple Reset
	-m		Performs Module Reset
	-f		Performs Full Reset
	-D		Read Data Registers
	-d		Dump all the MCAP Registers
	-v		Verbose information of MCAP Device
	-h/H		Help
	-a <address> [type [data]]  Access Device Configuration Space
		      here type[data] - b for byte data [8 bits]
		      here type[data] - h for half word data [16 bits]
		      here type[data] - w for word data [32 bits]

   NOTE: Specifying MCAP Device Id option is mandatory for the application
   to run. For example,
   $Linux> ./mcap -x 0x8011
   Xilinx MCAP Device Found

NOTES
#####
. PCI Extended Capability Registers in Linux will only be
  accessible with privileged user access.  So, the example elf should
  be run with ROOT permissions.

. To access device configuration space, 'type' in the above syntax should
  be either b/h/w (byte/half-word/word). For example,

  -> Reading a byte
     ./mcap -x 0x8011 -a 0x354 b

  -> Writing a word
     ./mcap -x 0x8011 -a 0x354 w 0x3