Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * v3020.h - Registers definition and platform data structure for the v3020 RTC.
0003  *
0004  * This file is subject to the terms and conditions of the GNU General Public
0005  * License.  See the file "COPYING" in the main directory of this archive
0006  * for more details.
0007  *
0008  * Copyright (C) 2006, 8D Technologies inc.
0009  */
0010 #ifndef __LINUX_V3020_H
0011 #define __LINUX_V3020_H
0012 
0013 /* The v3020 has only one data pin but which one
0014  * is used depends on the board. */
0015 struct v3020_platform_data {
0016     int leftshift; /* (1<<(leftshift)) & readl() */
0017 
0018     unsigned int use_gpio:1;
0019     unsigned int gpio_cs;
0020     unsigned int gpio_wr;
0021     unsigned int gpio_rd;
0022     unsigned int gpio_io;
0023 };
0024 
0025 #define V3020_STATUS_0  0x00
0026 #define V3020_STATUS_1  0x01
0027 #define V3020_SECONDS   0x02
0028 #define V3020_MINUTES   0x03
0029 #define V3020_HOURS     0x04
0030 #define V3020_MONTH_DAY 0x05
0031 #define V3020_MONTH     0x06
0032 #define V3020_YEAR      0x07
0033 #define V3020_WEEK_DAY  0x08
0034 #define V3020_WEEK      0x09
0035 
0036 #define V3020_IS_COMMAND(val) ((val)>=0x0E)
0037 
0038 #define V3020_CMD_RAM2CLOCK 0x0E
0039 #define V3020_CMD_CLOCK2RAM 0x0F
0040 
0041 #endif /* __LINUX_V3020_H */