/* SPDX-License-Identifier: GPL-2.0 */
/*
* Q40 master Chip Control
* RTC stuff merged for compactness.
*/
#ifndef _Q40_MASTER_H
#define _Q40_MASTER_H
#include <asm /raw_io.h>
#include <asm /kmap.h>
#define q40_master_addr 0 xff000000
#define IIRQ_REG 0 x0 /* internal IRQ reg */
#define EIRQ_REG 0 x4 /* external ... */
#define KEYCODE_REG 0 x1c /* value of received scancode */
#define DISPLAY_CONTROL_REG 0 x18
#define FRAME_CLEAR_REG 0 x24
#define LED_REG 0 x30
#define Q40_LED_ON() master_outb(1 ,LED_REG)
#define Q40_LED_OFF() master_outb(0 ,LED_REG)
#define INTERRUPT_REG IIRQ_REG /* "native" ints */
#define KEY_IRQ_ENABLE_REG 0 x08 /**/
#define KEYBOARD_UNLOCK_REG 0 x20 /* clear kb int */
#define SAMPLE_ENABLE_REG 0 x14 /* generate SAMPLE ints */
#define SAMPLE_RATE_REG 0 x2c
#define SAMPLE_CLEAR_REG 0 x28
#define SAMPLE_LOW 0 x00
#define SAMPLE_HIGH 0 x01
#define FRAME_RATE_REG 0 x38 /* generate FRAME ints at 200 HZ rate */
#if 0
#define SER_ENABLE_REG 0 x0c /* allow serial ints to be generated */
#endif
#define EXT_ENABLE_REG 0 x10 /* ... rest of the ISA ints ... */
#define master_inb(_reg_) in_8((unsigned char *)q40_master_addr+_reg_)
#define master_outb(_b_,_reg_) out_8((unsigned char *)q40_master_addr+_reg_,_b_)
/* RTC defines */
#define Q40_RTC_BASE (0 xff021ffc)
#define Q40_RTC_YEAR (*(volatile unsigned char *)(Q40_RTC_BASE+0 ))
#define Q40_RTC_MNTH (*(volatile unsigned char *)(Q40_RTC_BASE-4 ))
#define Q40_RTC_DATE (*(volatile unsigned char *)(Q40_RTC_BASE-8 ))
#define Q40_RTC_DOW (*(volatile unsigned char *)(Q40_RTC_BASE-12 ))
#define Q40_RTC_HOUR (*(volatile unsigned char *)(Q40_RTC_BASE-16 ))
#define Q40_RTC_MINS (*(volatile unsigned char *)(Q40_RTC_BASE-20 ))
#define Q40_RTC_SECS (*(volatile unsigned char *)(Q40_RTC_BASE-24 ))
#define Q40_RTC_CTRL (*(volatile unsigned char *)(Q40_RTC_BASE-28 ))
/* some control bits */
#define Q40_RTC_READ 64 /* prepare for reading */
#define Q40_RTC_WRITE 128
/* define some Q40 specific ints */
#include <asm /q40ints.h>
/* misc defs */
#define DAC_LEFT ((unsigned char *)0 xff008000)
#define DAC_RIGHT ((unsigned char *)0 xff008004)
#endif /* _Q40_MASTER_H */
Messung V0.5 in Prozent C=93 H=91 G=91
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-07)
¤
*© Formatika GbR, Deutschland