18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci** asm/blinken.h -- m68k blinkenlights support (currently hp300 only)
38c2ecf20Sopenharmony_ci**
48c2ecf20Sopenharmony_ci** (c) 1998 Phil Blundell <philb@gnu.org>
58c2ecf20Sopenharmony_ci**
68c2ecf20Sopenharmony_ci** This file is subject to the terms and conditions of the GNU General Public
78c2ecf20Sopenharmony_ci** License.  See the file COPYING in the main directory of this archive
88c2ecf20Sopenharmony_ci** for more details.
98c2ecf20Sopenharmony_ci**
108c2ecf20Sopenharmony_ci*/
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifndef _M68K_BLINKEN_H
138c2ecf20Sopenharmony_ci#define _M68K_BLINKEN_H
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#include <asm/setup.h>
168c2ecf20Sopenharmony_ci#include <asm/io.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#define HP300_LEDS		0xf001ffff
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciextern unsigned char hp300_ledstate;
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_cistatic __inline__ void blinken_leds(int on, int off)
238c2ecf20Sopenharmony_ci{
248c2ecf20Sopenharmony_ci	if (MACH_IS_HP300)
258c2ecf20Sopenharmony_ci	{
268c2ecf20Sopenharmony_ci		hp300_ledstate |= on;
278c2ecf20Sopenharmony_ci		hp300_ledstate &= ~off;
288c2ecf20Sopenharmony_ci		out_8(HP300_LEDS, ~hp300_ledstate);
298c2ecf20Sopenharmony_ci	}
308c2ecf20Sopenharmony_ci}
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#endif
33