OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [arch-sa1100/] [system3.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 * linux/include/asm-arm/arch-sa1100/system3.h
3
 *
4
 * Copyright (C) 2001 Stefan Eletzhofer <stefan.eletzhofer@eletztrick.de>
5
 *
6
 * $Id: system3.h,v 1.1.1.1 2004-04-15 03:00:10 phoenix Exp $
7
 *
8
 * This program is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License version 2 as
10
 * published by the Free Software Foundation.
11
 *
12
 * $Log: not supported by cvs2svn $
13
 * Revision 1.2.4.2  2001/12/04 14:58:50  seletz
14
 * - removed neponset hack
15
 * - removed irq definitions (now in irqs.h)
16
 *
17
 * Revision 1.2.4.1  2001/12/04 12:51:18  seletz
18
 * - re-added from linux_2_4_8_ac12_rmk1_np1_pt1
19
 *
20
 * Revision 1.2.2.2  2001/11/16 13:58:43  seletz
21
 * - simplified cpld register access
22
 *
23
 * Revision 1.2.2.1  2001/10/15 16:17:20  seletz
24
 * - first revision
25
 *
26
 *
27
 */
28
 
29
#ifndef __ASM_ARCH_HARDWARE_H
30
#error "include <asm/hardware.h> instead"
31
#endif
32
 
33
/* System 3 LCD */
34
#define SYS3LCD                 SKPEN0
35
#define SYS3LCDBACKL    SKPEN1
36
#define SYS3LCDBRIGHT   SKPWM0
37
#define SYS3LCDCONTR    SKPWM1
38
 
39
#define PT_CPLD_BASE            (0x10000000)
40
#define PT_SMC_BASE                     (0x18000000)
41
#define PT_SA1111_BASE          (0x40000000)
42
 
43
#define Ptcpld_p2v( x ) ((x) - PT_CPLD_BASE + 0xf3000000)
44
#define Ptcpld_v2p( x ) ((x) - 0xf3000000 + PT_CPLD_BASE)
45
 
46
#define _PT_SYSID       ( PT_CPLD_BASE + 0x00 )
47
#define _PT_IRQSR       ( PT_CPLD_BASE + 0x24 )
48
#define _PT_CTRL0       ( PT_CPLD_BASE + 0x90 )
49
#define _PT_CTRL1       ( PT_CPLD_BASE + 0xA0 )
50
#define _PT_CTRL2       ( PT_CPLD_BASE + 0xB0 )
51
 
52
#define PT_SYSID        (*((volatile u_char *)Ptcpld_p2v( _PT_SYSID )))
53
#define PT_IRQSR        (*((volatile u_char *)Ptcpld_p2v( _PT_IRQSR )))
54
#define PT_CTRL0        (*((volatile u_char *)Ptcpld_p2v( _PT_CTRL0 )))
55
#define PT_CTRL1        (*((volatile u_char *)Ptcpld_p2v( _PT_CTRL1 )))
56
#define PT_CTRL2        (*((volatile u_char *)Ptcpld_p2v( _PT_CTRL2 )))
57
 
58
#define PTCTRL0_set( x )        PT_CTRL0 |= (x)
59
#define PTCTRL1_set( x )        PT_CTRL1 |= (x)
60
#define PTCTRL2_set( x )        PT_CTRL2 |= (x)
61
#define PTCTRL0_clear( x )      PT_CTRL0 &= ~(x)
62
#define PTCTRL1_clear( x )      PT_CTRL1 &= ~(x)
63
#define PTCTRL2_clear( x )      PT_CTRL2 &= ~(x)
64
 
65
/* System ID register */
66
 
67
/* IRQ Source Register */
68
#define PT_IRQ_LAN              ( 1<<0 )
69
#define PT_IRQ_X                ( 1<<1 )
70
#define PT_IRQ_SA1111   ( 1<<2 )
71
#define PT_IRQ_RS1              ( 1<<3 )
72
#define PT_IRQ_RS1_RING ( 1<<4 )
73
#define PT_IRQ_RS1_DCD  ( 1<<5 )
74
#define PT_IRQ_RS1_DSR  ( 1<<6 )
75
#define PT_IRQ_RS2              ( 1<<7 )
76
 
77
/* FIXME */
78
#define PT_IRQ_USAR             ( 1<<1 )
79
 
80
/* CTRL 0 */
81
#define PT_CTRL0_USBSLAVE       ( 1<<0 )
82
#define PT_CTRL0_USBHOST        ( 1<<1 )
83
#define PT_CTRL0_LCD_BL         ( 1<<2 )
84
#define PT_CTRL0_LAN_EN         ( 1<<3 )        /* active low */
85
#define PT_CTRL0_IRDA_M(x)      ( (((u_char)x)&0x03)<<4 )
86
#define PT_CTRL0_IRDA_M0        ( 1<<4 )
87
#define PT_CTRL0_IRDA_M1        ( 1<<5 )
88
#define PT_CTRL0_IRDA_FSEL      ( 1<<6 )
89
#define PT_CTRL0_LCD_EN         ( 1<<7 )
90
 
91
#define PT_CTRL0_INIT   ( PT_CTRL0_USBSLAVE | PT_CTRL0_USBHOST | \
92
                                                PT_CTRL0_LCD_BL | PT_CTRL0_LAN_EN | PT_CTRL0_LCD_EN )
93
 
94
/* CTRL 1 */
95
#define PT_CTRL1_RS3_MUX(x) ( (((u_char)x)&0x03)<<0 )
96
#define PT_CTRL1_RS3_MUX0       ( 1<<0 )
97
#define PT_CTRL1_RS3_MUX1       ( 1<<1 )
98
#define PT_CTRL1_RS3_RST        ( 1<<2 )
99
#define PT_CTRL1_RS3_RS485_TERM ( 1<<4 )
100
#define PT_CTRL1_X                      ( 1<<4 )
101
#define PT_CTRL1_PCMCIA_A0VPP   ( 1<<6 )
102
#define PT_CTRL1_PCMCIA_A1VPP   ( 1<<7 )
103
 
104
#define PT_RS3_MUX_ALIRS        ( 0 )
105
#define PT_RS3_MUX_IDATA        ( 1 )
106
#define PT_RS3_MUX_RADIO        ( 2 )
107
#define PT_RS3_MUX_RS485        ( 3 )
108
 
109
/* CTRL 2 */
110
#define PT_CTRL2_RS1_RTS        ( 1<<0 )
111
#define PT_CTRL2_RS1_DTR        ( 1<<1 )

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.