Nut/OS  4.10.3
API Reference
at91_ecc.h
Go to the documentation of this file.
00001 #ifndef _ARCH_ARM_AT91_ECC_H_
00002 #define _ARCH_ARM_AT91_ECC_H_
00003 
00004 /*
00005  * Copyright (C) 2010 by egnite GmbH
00006  *
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  *
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  * 3. Neither the name of the copyright holders nor the names of
00019  *    contributors may be used to endorse or promote products derived
00020  *    from this software without specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00025  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00026  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00027  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00028  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00029  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00030  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00031  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00032  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00033  * SUCH DAMAGE.
00034  *
00035  * For additional information see http://www.ethernut.de/
00036  */
00037 
00051 
00054 #define ECC_CR_OFF              0x00000000  
00055 #define ECC_CR      (ECC_BASE + ECC_CR_OFF) 
00056 #define ECC_RST                 0x00000001  
00057 #define ECC_SRST                0x00000002  
00059 
00060 
00062 #define ECC_MR_OFF              0x00000004  
00063 #define ECC_MR      (ECC_BASE + ECC_MR_OFF) 
00064 #define ECC_PAGESIZE            0x00000003  
00065 #define ECC_PAGESIZE_528        0x00000000  
00066 #define ECC_PAGESIZE_1056       0x00000001  
00067 #define ECC_PAGESIZE_2112       0x00000002  
00068 #define ECC_PAGESIZE_4224       0x00000003  
00069 #define ECC_TYPECORREC          0x00000030  
00070 #define ECC_TYPECORREC_0        0x00000000  
00071 #define ECC_TYPECORREC_1        0x00000010  
00072 #define ECC_TYPECORREC_2        0x00000020  
00074 
00075 
00077 #define ECC_SR1_OFF             0x00000008  
00078 #define ECC_SR1    (ECC_BASE + ECC_SR1_OFF) 
00079 #define ECC_SR2_OFF             0x00000014  
00080 #define ECC_SR2    (ECC_BASE + ECC_SR2_OFF) 
00081 #define ECC_RECERR(i)       (1 << (i * 4))  
00082 #define ECC_ECCERR(i)       (2 << (i * 4))  
00083 #define ECC_MULERR(i)       (4 << (i * 4))  
00085 
00086 
00088 #define ECC_PR0_OFF             0x0000000C  
00089 #define ECC_PR0    (ECC_BASE + ECC_PR0_OFF) 
00090 #define ECC_PR1_OFF             0x00000010  
00091 #define ECC_PR1    (ECC_BASE + ECC_PR1_OFF) 
00092 #define ECC_PR(i)  (ECC_BASE + 0x18 + (((i) - 2) * 4)) 
00093 #define ECC_BITADDR0            0x0000000F  
00094 #define ECC_BITADDR0_LSB                0   
00095 #define ECC_BITADDR             0x00000007  
00096 #define ECC_BITADDR_LSB                 0   
00097 #define ECC_WORDADDR0           0x0000FFF0  
00098 #define ECC_WORDADDR0_LSB               4   
00099 #define ECC_WORDADDR            0x0000FFF8  
00100 #define ECC_WORDADDR_LSB                3   
00101 #define ECC_NPARITY1            0x0000FFFF  
00102 #define ECC_NPARITY1_LSB                0   
00103 #define ECC_NPARITY             0x00FFF000  
00104 #define ECC_NPARITY_LSB                12   
00106 
00107 
00110 #define ECC_VR_OFF              0x000000FC // (ECC_VR)  ECC Version register
00111 #define ECC_VR          (ECC_BASE + ECC_VR_OFF) // (ECC) ECC version register
00112 
00115 #endif