| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2007-05-09 07:51:49 +02:00
										 |  |  |  * include/asm-sh/snapgear.h | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Modified version of io_se.h for the snapgear-specific functions. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * May be copied or modified under the terms of the GNU General Public | 
					
						
							|  |  |  |  * License.  See linux/COPYING for more information. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * IO functions for a SnapGear | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef _ASM_SH_IO_SNAPGEAR_H
 | 
					
						
							|  |  |  | #define _ASM_SH_IO_SNAPGEAR_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-09-27 15:41:24 +09:00
										 |  |  | #define __IO_PREFIX	snapgear
 | 
					
						
							|  |  |  | #include <asm/io_generic.h>
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * We need to remember what was written to the ioport as some bits | 
					
						
							|  |  |  |  * are shared with other functions and you cannot read back what was | 
					
						
							|  |  |  |  * written :-| | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Bit        Read                   Write | 
					
						
							|  |  |  |  * ----------------------------------------------- | 
					
						
							|  |  |  |  * D0         DCD on ttySC1          power | 
					
						
							|  |  |  |  * D1         Reset Switch           heatbeat | 
					
						
							|  |  |  |  * D2         ttySC0 CTS (7100)      LAN | 
					
						
							|  |  |  |  * D3         -                      WAN | 
					
						
							|  |  |  |  * D4         ttySC0 DCD (7100)      CONSOLE | 
					
						
							|  |  |  |  * D5         -                      ONLINE | 
					
						
							|  |  |  |  * D6         -                      VPN | 
					
						
							|  |  |  |  * D7         -                      DTR on ttySC1 | 
					
						
							|  |  |  |  * D8         -                      ttySC0 RTS (7100) | 
					
						
							|  |  |  |  * D9         -                      ttySC0 DTR (7100) | 
					
						
							|  |  |  |  * D10        -                      RTC SCLK | 
					
						
							|  |  |  |  * D11        RTC DATA               RTC DATA | 
					
						
							|  |  |  |  * D12        -                      RTS RESET | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-09-27 15:41:24 +09:00
										 |  |  | #define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000)
 | 
					
						
							|  |  |  | extern unsigned short secureedge5410_ioport; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-09-27 15:41:24 +09:00
										 |  |  | #define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \
 | 
					
						
							|  |  |  | 	 (secureedge5410_ioport = \ | 
					
						
							|  |  |  | 			((secureedge5410_ioport & ~(mask)) | ((val) & (mask))))) | 
					
						
							|  |  |  | #define SECUREEDGE_READ_IOPORT() \
 | 
					
						
							|  |  |  | 	 ((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817)) | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | #endif /* _ASM_SH_IO_SNAPGEAR_H */
 |