Path: blob/master/arch/m68k/include/asm/apollohw.h
10820 views
/* apollohw.h : some structures to access apollo HW */12#ifndef _ASMm68k_APOLLOHW_H_3#define _ASMm68k_APOLLOHW_H_45#include <linux/types.h>67/*8apollo models9*/1011extern u_long apollo_model;1213#define APOLLO_UNKNOWN (0)14#define APOLLO_DN3000 (1)15#define APOLLO_DN3010 (2)16#define APOLLO_DN3500 (3)17#define APOLLO_DN4000 (4)18#define APOLLO_DN4500 (5)1920/*21see scn2681 data sheet for more info.22member names are read_write.23*/2425#define DECLARE_2681_FIELD(x) unsigned char x; unsigned char dummy##x2627struct SCN2681 {2829DECLARE_2681_FIELD(mra);30DECLARE_2681_FIELD(sra_csra);31DECLARE_2681_FIELD(BRGtest_cra);32DECLARE_2681_FIELD(rhra_thra);33DECLARE_2681_FIELD(ipcr_acr);34DECLARE_2681_FIELD(isr_imr);35DECLARE_2681_FIELD(ctu_ctur);36DECLARE_2681_FIELD(ctl_ctlr);37DECLARE_2681_FIELD(mrb);38DECLARE_2681_FIELD(srb_csrb);39DECLARE_2681_FIELD(tst_crb);40DECLARE_2681_FIELD(rhrb_thrb);41DECLARE_2681_FIELD(reserved);42DECLARE_2681_FIELD(ip_opcr);43DECLARE_2681_FIELD(startCnt_setOutBit);44DECLARE_2681_FIELD(stopCnt_resetOutBit);4546};4748#if 049struct mc146818 {5051unsigned int second1:4, second2:4, alarm_second1:4, alarm_second2:4,52minute1:4, minute2:4, alarm_minute1:4, alarm_minute2:4;53unsigned int hours1:4, hours2:4, alarm_hours1:4, alarm_hours2:4,54day_of_week1:4, day_of_week2:4, day_of_month1:4, day_of_month2:4;55unsigned int month1:4, month2:4, year1:4, year2:4, :16;5657};58#endif5960struct mc146818 {61unsigned char second, alarm_second;62unsigned char minute, alarm_minute;63unsigned char hours, alarm_hours;64unsigned char day_of_week, day_of_month;65unsigned char month, year;66};676869#define IO_BASE 0x800000007071extern u_long sio01_physaddr;72extern u_long sio23_physaddr;73extern u_long rtc_physaddr;74extern u_long pica_physaddr;75extern u_long picb_physaddr;76extern u_long cpuctrl_physaddr;77extern u_long timer_physaddr;7879#define SAU7_SIO01_PHYSADDR 0x1040080#define SAU7_SIO23_PHYSADDR 0x1050081#define SAU7_RTC_PHYSADDR 0x1090082#define SAU7_PICA 0x1100083#define SAU7_PICB 0x1110084#define SAU7_CPUCTRL 0x1010085#define SAU7_TIMER 0x0108008687#define SAU8_SIO01_PHYSADDR 0x840088#define SAU8_RTC_PHYSADDR 0x890089#define SAU8_PICA 0x940090#define SAU8_PICB 0x950091#define SAU8_CPUCTRL 0x810092#define SAU8_TIMER 0x88009394#define sio01 ((*(volatile struct SCN2681 *)(IO_BASE + sio01_physaddr)))95#define sio23 ((*(volatile struct SCN2681 *)(IO_BASE + sio23_physaddr)))96#define rtc (((volatile struct mc146818 *)(IO_BASE + rtc_physaddr)))97#define cpuctrl (*(volatile unsigned int *)(IO_BASE + cpuctrl_physaddr))98#define pica (IO_BASE + pica_physaddr)99#define picb (IO_BASE + picb_physaddr)100#define timer (IO_BASE + timer_physaddr)101#define addr_xlat_map ((unsigned short *)(IO_BASE + 0x17000))102103#define isaIO2mem(x) (((((x) & 0x3f8) << 7) | (((x) & 0xfc00) >> 6) | ((x) & 0x7)) + 0x40000 + IO_BASE)104105#define IRQ_APOLLO IRQ_USER106107#endif108109110