2 /* Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>,
3 * 1997, 1998 D. Jeff Dionne <jeff@lineo.ca>,
6 #ifndef _M68K_SHGLPORTS_H
7 #define _M68K_SHGLPORTS_H
9 #include <linux/config.h>
10 #include <linux/sched.h>
12 #ifdef CONFIG_SHGLCORE
14 extern struct semaphore porte_interlock;
16 struct SHGLCORE_PORT_QS {
18 nullqs:1, /* COM1TX */
19 sbin:1, /* PQS6 (PCS3) */
20 sbclk:1, /* PQS5 (PCS2) */
21 sbout:1, /* PQS4 (PCS1) */
22 null4:4; /* MISO, MOSI, SCLK, /SS=PCS0 */
25 #define PORT_QS ((volatile struct SHGLCORE_PORT_QS*)PORTQS_ADDR)
27 struct SHGLCORE_PORT_E {
39 #define PORT_E ((volatile struct SHGLCORE_PORT_E*)PORTE_ADDR)
41 struct SHGLCORE_PORT_F {
47 #define PORT_F ((volatile struct SHGLCORE_PORT_F*)PORTF_ADDR)
49 extern int comm_status_led, comm_error_led, alarm_led;
51 static inline void SET_COMM_STATUS_LED(int value) {
52 BYTE_REF(SHGLCORE_ACC_ADDR+0x100+0) = comm_status_led = value;
54 static inline int GET_COMM_STATUS_LED(void) {
55 return comm_status_led;
59 static inline void SET_COMM_ERROR_LED(int value) {
60 BYTE_REF(SHGLCORE_ACC_ADDR+0x100+1) = comm_error_led = value;
62 static inline int GET_COMM_ERROR_LED(void) {
63 return comm_error_led;
67 static inline void SET_ALARM_LED(int value) {
68 BYTE_REF(SHGLCORE_ACC_ADDR+0x100+2) = alarm_led = value;
70 static inline int GET_ALARM_LED(void) {
76 #endif /* _M68K_SHGLPORTS_H */