18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci** asm-m68k/amigahw.h -- This header defines some macros and pointers for 38c2ecf20Sopenharmony_ci** the various Amiga custom hardware registers. 48c2ecf20Sopenharmony_ci** The naming conventions used here conform to those 58c2ecf20Sopenharmony_ci** used in the Amiga Hardware Reference Manual, 3rd Edition 68c2ecf20Sopenharmony_ci** 78c2ecf20Sopenharmony_ci** Copyright 1992 by Greg Harp 88c2ecf20Sopenharmony_ci** 98c2ecf20Sopenharmony_ci** This file is subject to the terms and conditions of the GNU General Public 108c2ecf20Sopenharmony_ci** License. See the file COPYING in the main directory of this archive 118c2ecf20Sopenharmony_ci** for more details. 128c2ecf20Sopenharmony_ci** 138c2ecf20Sopenharmony_ci** Created: 9/24/92 by Greg Harp 148c2ecf20Sopenharmony_ci*/ 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#ifndef _M68K_AMIGAHW_H 178c2ecf20Sopenharmony_ci#define _M68K_AMIGAHW_H 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#include <linux/ioport.h> 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#include <asm/bootinfo-amiga.h> 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci /* 258c2ecf20Sopenharmony_ci * Chipsets 268c2ecf20Sopenharmony_ci */ 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciextern unsigned long amiga_chipset; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci /* 328c2ecf20Sopenharmony_ci * Miscellaneous 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciextern unsigned long amiga_eclock; /* 700 kHz E Peripheral Clock */ 368c2ecf20Sopenharmony_ciextern unsigned long amiga_colorclock; /* 3.5 MHz Color Clock */ 378c2ecf20Sopenharmony_ciextern unsigned long amiga_chip_size; /* Chip RAM Size (bytes) */ 388c2ecf20Sopenharmony_ciextern unsigned char amiga_vblank; /* VBLANK Frequency */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#define AMIGAHW_DECLARE(name) unsigned name : 1 428c2ecf20Sopenharmony_ci#define AMIGAHW_SET(name) (amiga_hw_present.name = 1) 438c2ecf20Sopenharmony_ci#define AMIGAHW_PRESENT(name) (amiga_hw_present.name) 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_cistruct amiga_hw_present { 468c2ecf20Sopenharmony_ci /* video hardware */ 478c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_VIDEO); /* Amiga Video */ 488c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_BLITTER); /* Amiga Blitter */ 498c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMBER_FF); /* Amber Flicker Fixer */ 508c2ecf20Sopenharmony_ci /* sound hardware */ 518c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_AUDIO); /* Amiga Audio */ 528c2ecf20Sopenharmony_ci /* disk storage interfaces */ 538c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_FLOPPY); /* Amiga Floppy */ 548c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(A3000_SCSI); /* SCSI (wd33c93, A3000 alike) */ 558c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(A4000_SCSI); /* SCSI (ncr53c710, A4000T alike) */ 568c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(A1200_IDE); /* IDE (A1200 alike) */ 578c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(A4000_IDE); /* IDE (A4000 alike) */ 588c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(CD_ROM); /* CD ROM drive */ 598c2ecf20Sopenharmony_ci /* other I/O hardware */ 608c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_KEYBOARD); /* Amiga Keyboard */ 618c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_MOUSE); /* Amiga Mouse */ 628c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_SERIAL); /* Amiga Serial */ 638c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AMI_PARALLEL); /* Amiga Parallel */ 648c2ecf20Sopenharmony_ci /* real time clocks */ 658c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(A2000_CLK); /* Hardware Clock (A2000 alike) */ 668c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(A3000_CLK); /* Hardware Clock (A3000 alike) */ 678c2ecf20Sopenharmony_ci /* supporting hardware */ 688c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(CHIP_RAM); /* Chip RAM */ 698c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(PAULA); /* Paula (8364) */ 708c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(DENISE); /* Denise (8362) */ 718c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(DENISE_HR); /* Denise (8373) */ 728c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(LISA); /* Lisa (8375) */ 738c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AGNUS_PAL); /* Normal/Fat PAL Agnus (8367/8371) */ 748c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AGNUS_NTSC); /* Normal/Fat NTSC Agnus (8361/8370) */ 758c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AGNUS_HR_PAL); /* Fat Hires PAL Agnus (8372) */ 768c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(AGNUS_HR_NTSC); /* Fat Hires NTSC Agnus (8372) */ 778c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(ALICE_PAL); /* PAL Alice (8374) */ 788c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(ALICE_NTSC); /* NTSC Alice (8374) */ 798c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(MAGIC_REKICK); /* A3000 Magic Hard Rekick */ 808c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(PCMCIA); /* PCMCIA Slot */ 818c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(ZORRO); /* Zorro AutoConfig */ 828c2ecf20Sopenharmony_ci AMIGAHW_DECLARE(ZORRO3); /* Zorro III */ 838c2ecf20Sopenharmony_ci}; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ciextern struct amiga_hw_present amiga_hw_present; 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_cistruct CUSTOM { 888c2ecf20Sopenharmony_ci unsigned short bltddat; 898c2ecf20Sopenharmony_ci unsigned short dmaconr; 908c2ecf20Sopenharmony_ci unsigned short vposr; 918c2ecf20Sopenharmony_ci unsigned short vhposr; 928c2ecf20Sopenharmony_ci unsigned short dskdatr; 938c2ecf20Sopenharmony_ci unsigned short joy0dat; 948c2ecf20Sopenharmony_ci unsigned short joy1dat; 958c2ecf20Sopenharmony_ci unsigned short clxdat; 968c2ecf20Sopenharmony_ci unsigned short adkconr; 978c2ecf20Sopenharmony_ci unsigned short pot0dat; 988c2ecf20Sopenharmony_ci unsigned short pot1dat; 998c2ecf20Sopenharmony_ci unsigned short potgor; 1008c2ecf20Sopenharmony_ci unsigned short serdatr; 1018c2ecf20Sopenharmony_ci unsigned short dskbytr; 1028c2ecf20Sopenharmony_ci unsigned short intenar; 1038c2ecf20Sopenharmony_ci unsigned short intreqr; 1048c2ecf20Sopenharmony_ci unsigned char *dskptr; 1058c2ecf20Sopenharmony_ci unsigned short dsklen; 1068c2ecf20Sopenharmony_ci unsigned short dskdat; 1078c2ecf20Sopenharmony_ci unsigned short refptr; 1088c2ecf20Sopenharmony_ci unsigned short vposw; 1098c2ecf20Sopenharmony_ci unsigned short vhposw; 1108c2ecf20Sopenharmony_ci unsigned short copcon; 1118c2ecf20Sopenharmony_ci unsigned short serdat; 1128c2ecf20Sopenharmony_ci unsigned short serper; 1138c2ecf20Sopenharmony_ci unsigned short potgo; 1148c2ecf20Sopenharmony_ci unsigned short joytest; 1158c2ecf20Sopenharmony_ci unsigned short strequ; 1168c2ecf20Sopenharmony_ci unsigned short strvbl; 1178c2ecf20Sopenharmony_ci unsigned short strhor; 1188c2ecf20Sopenharmony_ci unsigned short strlong; 1198c2ecf20Sopenharmony_ci unsigned short bltcon0; 1208c2ecf20Sopenharmony_ci unsigned short bltcon1; 1218c2ecf20Sopenharmony_ci unsigned short bltafwm; 1228c2ecf20Sopenharmony_ci unsigned short bltalwm; 1238c2ecf20Sopenharmony_ci unsigned char *bltcpt; 1248c2ecf20Sopenharmony_ci unsigned char *bltbpt; 1258c2ecf20Sopenharmony_ci unsigned char *bltapt; 1268c2ecf20Sopenharmony_ci unsigned char *bltdpt; 1278c2ecf20Sopenharmony_ci unsigned short bltsize; 1288c2ecf20Sopenharmony_ci unsigned char pad2d; 1298c2ecf20Sopenharmony_ci unsigned char bltcon0l; 1308c2ecf20Sopenharmony_ci unsigned short bltsizv; 1318c2ecf20Sopenharmony_ci unsigned short bltsizh; 1328c2ecf20Sopenharmony_ci unsigned short bltcmod; 1338c2ecf20Sopenharmony_ci unsigned short bltbmod; 1348c2ecf20Sopenharmony_ci unsigned short bltamod; 1358c2ecf20Sopenharmony_ci unsigned short bltdmod; 1368c2ecf20Sopenharmony_ci unsigned short spare2[4]; 1378c2ecf20Sopenharmony_ci unsigned short bltcdat; 1388c2ecf20Sopenharmony_ci unsigned short bltbdat; 1398c2ecf20Sopenharmony_ci unsigned short bltadat; 1408c2ecf20Sopenharmony_ci unsigned short spare3[3]; 1418c2ecf20Sopenharmony_ci unsigned short deniseid; 1428c2ecf20Sopenharmony_ci unsigned short dsksync; 1438c2ecf20Sopenharmony_ci unsigned short *cop1lc; 1448c2ecf20Sopenharmony_ci unsigned short *cop2lc; 1458c2ecf20Sopenharmony_ci unsigned short copjmp1; 1468c2ecf20Sopenharmony_ci unsigned short copjmp2; 1478c2ecf20Sopenharmony_ci unsigned short copins; 1488c2ecf20Sopenharmony_ci unsigned short diwstrt; 1498c2ecf20Sopenharmony_ci unsigned short diwstop; 1508c2ecf20Sopenharmony_ci unsigned short ddfstrt; 1518c2ecf20Sopenharmony_ci unsigned short ddfstop; 1528c2ecf20Sopenharmony_ci unsigned short dmacon; 1538c2ecf20Sopenharmony_ci unsigned short clxcon; 1548c2ecf20Sopenharmony_ci unsigned short intena; 1558c2ecf20Sopenharmony_ci unsigned short intreq; 1568c2ecf20Sopenharmony_ci unsigned short adkcon; 1578c2ecf20Sopenharmony_ci struct { 1588c2ecf20Sopenharmony_ci unsigned short *audlc; 1598c2ecf20Sopenharmony_ci unsigned short audlen; 1608c2ecf20Sopenharmony_ci unsigned short audper; 1618c2ecf20Sopenharmony_ci unsigned short audvol; 1628c2ecf20Sopenharmony_ci unsigned short auddat; 1638c2ecf20Sopenharmony_ci unsigned short audspare[2]; 1648c2ecf20Sopenharmony_ci } aud[4]; 1658c2ecf20Sopenharmony_ci unsigned char *bplpt[8]; 1668c2ecf20Sopenharmony_ci unsigned short bplcon0; 1678c2ecf20Sopenharmony_ci unsigned short bplcon1; 1688c2ecf20Sopenharmony_ci unsigned short bplcon2; 1698c2ecf20Sopenharmony_ci unsigned short bplcon3; 1708c2ecf20Sopenharmony_ci unsigned short bpl1mod; 1718c2ecf20Sopenharmony_ci unsigned short bpl2mod; 1728c2ecf20Sopenharmony_ci unsigned short bplcon4; 1738c2ecf20Sopenharmony_ci unsigned short clxcon2; 1748c2ecf20Sopenharmony_ci unsigned short bpldat[8]; 1758c2ecf20Sopenharmony_ci unsigned char *sprpt[8]; 1768c2ecf20Sopenharmony_ci struct { 1778c2ecf20Sopenharmony_ci unsigned short pos; 1788c2ecf20Sopenharmony_ci unsigned short ctl; 1798c2ecf20Sopenharmony_ci unsigned short dataa; 1808c2ecf20Sopenharmony_ci unsigned short datab; 1818c2ecf20Sopenharmony_ci } spr[8]; 1828c2ecf20Sopenharmony_ci unsigned short color[32]; 1838c2ecf20Sopenharmony_ci unsigned short htotal; 1848c2ecf20Sopenharmony_ci unsigned short hsstop; 1858c2ecf20Sopenharmony_ci unsigned short hbstrt; 1868c2ecf20Sopenharmony_ci unsigned short hbstop; 1878c2ecf20Sopenharmony_ci unsigned short vtotal; 1888c2ecf20Sopenharmony_ci unsigned short vsstop; 1898c2ecf20Sopenharmony_ci unsigned short vbstrt; 1908c2ecf20Sopenharmony_ci unsigned short vbstop; 1918c2ecf20Sopenharmony_ci unsigned short sprhstrt; 1928c2ecf20Sopenharmony_ci unsigned short sprhstop; 1938c2ecf20Sopenharmony_ci unsigned short bplhstrt; 1948c2ecf20Sopenharmony_ci unsigned short bplhstop; 1958c2ecf20Sopenharmony_ci unsigned short hhposw; 1968c2ecf20Sopenharmony_ci unsigned short hhposr; 1978c2ecf20Sopenharmony_ci unsigned short beamcon0; 1988c2ecf20Sopenharmony_ci unsigned short hsstrt; 1998c2ecf20Sopenharmony_ci unsigned short vsstrt; 2008c2ecf20Sopenharmony_ci unsigned short hcenter; 2018c2ecf20Sopenharmony_ci unsigned short diwhigh; 2028c2ecf20Sopenharmony_ci unsigned short spare4[11]; 2038c2ecf20Sopenharmony_ci unsigned short fmode; 2048c2ecf20Sopenharmony_ci}; 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ci/* 2078c2ecf20Sopenharmony_ci * DMA register bits 2088c2ecf20Sopenharmony_ci */ 2098c2ecf20Sopenharmony_ci#define DMAF_SETCLR (0x8000) 2108c2ecf20Sopenharmony_ci#define DMAF_AUD0 (0x0001) 2118c2ecf20Sopenharmony_ci#define DMAF_AUD1 (0x0002) 2128c2ecf20Sopenharmony_ci#define DMAF_AUD2 (0x0004) 2138c2ecf20Sopenharmony_ci#define DMAF_AUD3 (0x0008) 2148c2ecf20Sopenharmony_ci#define DMAF_DISK (0x0010) 2158c2ecf20Sopenharmony_ci#define DMAF_SPRITE (0x0020) 2168c2ecf20Sopenharmony_ci#define DMAF_BLITTER (0x0040) 2178c2ecf20Sopenharmony_ci#define DMAF_COPPER (0x0080) 2188c2ecf20Sopenharmony_ci#define DMAF_RASTER (0x0100) 2198c2ecf20Sopenharmony_ci#define DMAF_MASTER (0x0200) 2208c2ecf20Sopenharmony_ci#define DMAF_BLITHOG (0x0400) 2218c2ecf20Sopenharmony_ci#define DMAF_BLTNZERO (0x2000) 2228c2ecf20Sopenharmony_ci#define DMAF_BLTDONE (0x4000) 2238c2ecf20Sopenharmony_ci#define DMAF_ALL (0x01FF) 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_cistruct CIA { 2268c2ecf20Sopenharmony_ci unsigned char pra; char pad0[0xff]; 2278c2ecf20Sopenharmony_ci unsigned char prb; char pad1[0xff]; 2288c2ecf20Sopenharmony_ci unsigned char ddra; char pad2[0xff]; 2298c2ecf20Sopenharmony_ci unsigned char ddrb; char pad3[0xff]; 2308c2ecf20Sopenharmony_ci unsigned char talo; char pad4[0xff]; 2318c2ecf20Sopenharmony_ci unsigned char tahi; char pad5[0xff]; 2328c2ecf20Sopenharmony_ci unsigned char tblo; char pad6[0xff]; 2338c2ecf20Sopenharmony_ci unsigned char tbhi; char pad7[0xff]; 2348c2ecf20Sopenharmony_ci unsigned char todlo; char pad8[0xff]; 2358c2ecf20Sopenharmony_ci unsigned char todmid; char pad9[0xff]; 2368c2ecf20Sopenharmony_ci unsigned char todhi; char pada[0x1ff]; 2378c2ecf20Sopenharmony_ci unsigned char sdr; char padb[0xff]; 2388c2ecf20Sopenharmony_ci unsigned char icr; char padc[0xff]; 2398c2ecf20Sopenharmony_ci unsigned char cra; char padd[0xff]; 2408c2ecf20Sopenharmony_ci unsigned char crb; char pade[0xff]; 2418c2ecf20Sopenharmony_ci}; 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci#define zTwoBase (0x80000000) 2448c2ecf20Sopenharmony_ci#define ZTWO_PADDR(x) (((unsigned long)(x))-zTwoBase) 2458c2ecf20Sopenharmony_ci#define ZTWO_VADDR(x) ((void __iomem *)(((unsigned long)(x))+zTwoBase)) 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci#define CUSTOM_PHYSADDR (0xdff000) 2488c2ecf20Sopenharmony_ci#define amiga_custom ((*(volatile struct CUSTOM *)(zTwoBase+CUSTOM_PHYSADDR))) 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci#define CIAA_PHYSADDR (0xbfe001) 2518c2ecf20Sopenharmony_ci#define CIAB_PHYSADDR (0xbfd000) 2528c2ecf20Sopenharmony_ci#define ciaa ((*(volatile struct CIA *)(zTwoBase + CIAA_PHYSADDR))) 2538c2ecf20Sopenharmony_ci#define ciab ((*(volatile struct CIA *)(zTwoBase + CIAB_PHYSADDR))) 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci#define CHIP_PHYSADDR (0x000000) 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_civoid amiga_chip_init (void); 2588c2ecf20Sopenharmony_civoid *amiga_chip_alloc(unsigned long size, const char *name); 2598c2ecf20Sopenharmony_civoid *amiga_chip_alloc_res(unsigned long size, struct resource *res); 2608c2ecf20Sopenharmony_civoid amiga_chip_free(void *ptr); 2618c2ecf20Sopenharmony_ciunsigned long amiga_chip_avail( void ); /*MILAN*/ 2628c2ecf20Sopenharmony_ciextern volatile unsigned short amiga_audio_min_period; 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_cistatic inline void amifb_video_off(void) 2658c2ecf20Sopenharmony_ci{ 2668c2ecf20Sopenharmony_ci if (amiga_chipset == CS_ECS || amiga_chipset == CS_AGA) { 2678c2ecf20Sopenharmony_ci /* program Denise/Lisa for a higher maximum play rate */ 2688c2ecf20Sopenharmony_ci amiga_custom.htotal = 113; /* 31 kHz */ 2698c2ecf20Sopenharmony_ci amiga_custom.vtotal = 223; /* 70 Hz */ 2708c2ecf20Sopenharmony_ci amiga_custom.beamcon0 = 0x4390; /* HARDDIS, VAR{BEAM,VSY,HSY,CSY}EN */ 2718c2ecf20Sopenharmony_ci /* suspend the monitor */ 2728c2ecf20Sopenharmony_ci amiga_custom.hsstrt = amiga_custom.hsstop = 116; 2738c2ecf20Sopenharmony_ci amiga_custom.vsstrt = amiga_custom.vsstop = 226; 2748c2ecf20Sopenharmony_ci amiga_audio_min_period = 57; 2758c2ecf20Sopenharmony_ci } 2768c2ecf20Sopenharmony_ci} 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_cistruct tod3000 { 2798c2ecf20Sopenharmony_ci unsigned int :28, second2:4; /* lower digit */ 2808c2ecf20Sopenharmony_ci unsigned int :28, second1:4; /* upper digit */ 2818c2ecf20Sopenharmony_ci unsigned int :28, minute2:4; /* lower digit */ 2828c2ecf20Sopenharmony_ci unsigned int :28, minute1:4; /* upper digit */ 2838c2ecf20Sopenharmony_ci unsigned int :28, hour2:4; /* lower digit */ 2848c2ecf20Sopenharmony_ci unsigned int :28, hour1:4; /* upper digit */ 2858c2ecf20Sopenharmony_ci unsigned int :28, weekday:4; 2868c2ecf20Sopenharmony_ci unsigned int :28, day2:4; /* lower digit */ 2878c2ecf20Sopenharmony_ci unsigned int :28, day1:4; /* upper digit */ 2888c2ecf20Sopenharmony_ci unsigned int :28, month2:4; /* lower digit */ 2898c2ecf20Sopenharmony_ci unsigned int :28, month1:4; /* upper digit */ 2908c2ecf20Sopenharmony_ci unsigned int :28, year2:4; /* lower digit */ 2918c2ecf20Sopenharmony_ci unsigned int :28, year1:4; /* upper digit */ 2928c2ecf20Sopenharmony_ci unsigned int :28, cntrl1:4; /* control-byte 1 */ 2938c2ecf20Sopenharmony_ci unsigned int :28, cntrl2:4; /* control-byte 2 */ 2948c2ecf20Sopenharmony_ci unsigned int :28, cntrl3:4; /* control-byte 3 */ 2958c2ecf20Sopenharmony_ci}; 2968c2ecf20Sopenharmony_ci#define TOD3000_CNTRL1_HOLD 0 2978c2ecf20Sopenharmony_ci#define TOD3000_CNTRL1_FREE 9 2988c2ecf20Sopenharmony_ci#define tod_3000 ((*(volatile struct tod3000 *)(zTwoBase+0xDC0000))) 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_cistruct tod2000 { 3018c2ecf20Sopenharmony_ci unsigned int :28, second2:4; /* lower digit */ 3028c2ecf20Sopenharmony_ci unsigned int :28, second1:4; /* upper digit */ 3038c2ecf20Sopenharmony_ci unsigned int :28, minute2:4; /* lower digit */ 3048c2ecf20Sopenharmony_ci unsigned int :28, minute1:4; /* upper digit */ 3058c2ecf20Sopenharmony_ci unsigned int :28, hour2:4; /* lower digit */ 3068c2ecf20Sopenharmony_ci unsigned int :28, hour1:4; /* upper digit */ 3078c2ecf20Sopenharmony_ci unsigned int :28, day2:4; /* lower digit */ 3088c2ecf20Sopenharmony_ci unsigned int :28, day1:4; /* upper digit */ 3098c2ecf20Sopenharmony_ci unsigned int :28, month2:4; /* lower digit */ 3108c2ecf20Sopenharmony_ci unsigned int :28, month1:4; /* upper digit */ 3118c2ecf20Sopenharmony_ci unsigned int :28, year2:4; /* lower digit */ 3128c2ecf20Sopenharmony_ci unsigned int :28, year1:4; /* upper digit */ 3138c2ecf20Sopenharmony_ci unsigned int :28, weekday:4; 3148c2ecf20Sopenharmony_ci unsigned int :28, cntrl1:4; /* control-byte 1 */ 3158c2ecf20Sopenharmony_ci unsigned int :28, cntrl2:4; /* control-byte 2 */ 3168c2ecf20Sopenharmony_ci unsigned int :28, cntrl3:4; /* control-byte 3 */ 3178c2ecf20Sopenharmony_ci}; 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci#define TOD2000_CNTRL1_HOLD (1<<0) 3208c2ecf20Sopenharmony_ci#define TOD2000_CNTRL1_BUSY (1<<1) 3218c2ecf20Sopenharmony_ci#define TOD2000_CNTRL3_24HMODE (1<<2) 3228c2ecf20Sopenharmony_ci#define TOD2000_HOUR1_PM (1<<2) 3238c2ecf20Sopenharmony_ci#define tod_2000 ((*(volatile struct tod2000 *)(zTwoBase+0xDC0000))) 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci#endif /* _M68K_AMIGAHW_H */ 326