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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-m68knommu/] [elia.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/****************************************************************************/
2
 
3
/*
4
 *      elia.h -- Moreton Bay eLIA platform support.
5
 *
6
 *      (C) Copyright 1999-2000, Moreton Bay (www.moreton.com.au)
7
 */
8
 
9
/****************************************************************************/
10
#ifndef elia_h
11
#define elia_h
12
/****************************************************************************/
13
 
14
#include <linux/config.h>
15
#include <asm/coldfire.h>
16
 
17
#ifdef CONFIG_eLIA
18
 
19
/*
20
 *      The eLIA board has 2 programmable LEDs. We use one as the
21
 *      alive indicator, the other is user configurable.
22
 *      The serial port DTR and DCD lines are also on the Parallel I/O
23
 *      as well, so define those too.
24
 */
25
#define eLIA_LEDDIAG            0x2000
26
#define eLIA_USER               0x1000
27
 
28
#define eLIA_DCD1               0x0001
29
#define eLIA_DCD0               0x0002
30
#define eLIA_DTR1               0x0004
31
#define eLIA_DTR0               0x0008
32
 
33
#define eLIA_PCIRESET           0x0020
34
 
35
 
36
/*
37
 *      User space routines for back door access to the LEDs :-)
38
 *      This is a complete and utter bastard hack... But quick...
39
 *      The "on" pattern turns on some LEDs permanently. The "off"
40
 *      pattern turns some LEDs off permantly. The "flash" pattern
41
 *      will flash a particular LED pattern.
42
 */
43
#define LEDON(x)        *((unsigned char *) 0x3fe) |= (x)
44
#define LEDOFF(x)       *((unsigned char *) 0x3fe) &= ~(x)
45
#define LEDFLASH(x)     *((unsigned char *) 0x3ff) = (x)
46
 
47
#define GETLED()        *((unsigned char *) 0x3fe)
48
#define GETFLASH()      *((unsigned char *) 0x3ff)
49
 
50
 
51
/*
52
 *      Kernel macros to set and unset the LEDs.
53
 */
54
#ifndef __ASSEMBLY__
55
extern unsigned short   ppdata;
56
#endif /* __ASSEMBLY__ */
57
 
58
/*
59
 *      The following macros set and unset the LEDS.
60
 */
61
#define setledpp(x)                                                     \
62
        *((volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT)) =      \
63
                (ppdata &= ~(x))
64
 
65
#define unsetledpp(x)                                                   \
66
        *((volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT)) =      \
67
                (ppdata |= (x))
68
 
69
 
70
/*
71
 *      Panic setup for eLIA. There may be no console so it may be
72
 *      difficult to tell if the kernel has paniced or not. So this little
73
 *      macro will turn on all the LEDS - for a visual indicator of panic.
74
 */
75
#define nettel_panic()          { cli(); setledpp(0x3000); }
76
 
77
#endif  /* CONFIG_eLIA */
78
 
79
/****************************************************************************/
80
#endif  /* elia_h */

powered by: WebSVN 2.1.0

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