1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2e77e65dfSangelo@sysam.it /* 3e77e65dfSangelo@sysam.it * (C) Copyright 2014 Angelo Dureghello <angelo@sysam.it> 4e77e65dfSangelo@sysam.it * 5e77e65dfSangelo@sysam.it */ 6e77e65dfSangelo@sysam.it 7e77e65dfSangelo@sysam.it #ifndef mcf5307_h 8e77e65dfSangelo@sysam.it #define mcf5307_h 9e77e65dfSangelo@sysam.it 10e77e65dfSangelo@sysam.it /* 11e77e65dfSangelo@sysam.it * Size of internal RAM (RAMBAR) 12e77e65dfSangelo@sysam.it */ 13e77e65dfSangelo@sysam.it #define INT_RAM_SIZE 4096 14e77e65dfSangelo@sysam.it 15e77e65dfSangelo@sysam.it /* Bit definitions and macros for SYPCR */ 16e77e65dfSangelo@sysam.it #define SYPCR_SWTAVAL 0x02 17e77e65dfSangelo@sysam.it #define SYPCR_SWTA 0x04 18e77e65dfSangelo@sysam.it #define SYPCR_SWT(x) ((x&0x3)<<3) 19e77e65dfSangelo@sysam.it #define SYPCR_SWP 0x20 20e77e65dfSangelo@sysam.it #define SYPCR_SWRI 0x40 21e77e65dfSangelo@sysam.it #define SYPCR_SWE 0x80 22e77e65dfSangelo@sysam.it 23e77e65dfSangelo@sysam.it /* Bit definitions and macros for CSMR */ 24e77e65dfSangelo@sysam.it #define CSMR_V 0x01 25e77e65dfSangelo@sysam.it #define CSMR_UD 0x02 26e77e65dfSangelo@sysam.it #define CSMR_UC 0x04 27e77e65dfSangelo@sysam.it #define CSMR_SD 0x08 28e77e65dfSangelo@sysam.it #define CSMR_SC 0x10 29e77e65dfSangelo@sysam.it #define CSMR_CI 0x20 30e77e65dfSangelo@sysam.it #define CSMR_AM 0x40 31e77e65dfSangelo@sysam.it #define CSMR_WP 0x100 32e77e65dfSangelo@sysam.it 33e77e65dfSangelo@sysam.it /* Bit definitions and macros for DACR (SDRAM) */ 34e77e65dfSangelo@sysam.it #define DACR_PM_CONTINUOUS 0x04 35e77e65dfSangelo@sysam.it #define DACR_IP_PRECHG_ALL 0x08 36e77e65dfSangelo@sysam.it #define DACR_PORT_SZ_32 0 37e77e65dfSangelo@sysam.it #define DACR_PORT_SZ_8 (1<<4) 38e77e65dfSangelo@sysam.it #define DACR_PORT_SZ_16 (2<<4) 39e77e65dfSangelo@sysam.it #define DACR_IMRS_INIT_CMD (1<<6) 40e77e65dfSangelo@sysam.it #define DACR_CMD_PIN(x) ((x&7)<<8) 41e77e65dfSangelo@sysam.it #define DACR_CASL(x) ((x&3)<<12) 42e77e65dfSangelo@sysam.it #define DACR_RE (1<<15) 43e77e65dfSangelo@sysam.it 44e77e65dfSangelo@sysam.it /* Bit definitions and macros for CSCR */ 45e77e65dfSangelo@sysam.it #define CSCR_BSTW 0x08 46e77e65dfSangelo@sysam.it #define CSCR_BSTR 0x10 47e77e65dfSangelo@sysam.it #define CSCR_BEM 0x20 48e77e65dfSangelo@sysam.it #define CSCR_PS(x) ((x&0x3)<<6) 49e77e65dfSangelo@sysam.it #define CSCR_AA 0x100 50e77e65dfSangelo@sysam.it #define CSCR_WS ((x&0xf)<<10) 51e77e65dfSangelo@sysam.it 52e77e65dfSangelo@sysam.it /* Bit definitions for the ICR family of registers */ 53e77e65dfSangelo@sysam.it #define MCFSIM_ICR_AUTOVEC 0x80 /* Auto-vectored intr */ 54e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL0 0x00 /* Level 0 intr */ 55e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL1 0x04 /* Level 1 intr */ 56e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL2 0x08 /* Level 2 intr */ 57e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL3 0x0c /* Level 3 intr */ 58e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL4 0x10 /* Level 4 intr */ 59e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL5 0x14 /* Level 5 intr */ 60e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL6 0x18 /* Level 6 intr */ 61e77e65dfSangelo@sysam.it #define MCFSIM_ICR_LEVEL7 0x1c /* Level 7 intr */ 62e77e65dfSangelo@sysam.it 63e77e65dfSangelo@sysam.it #define MCFSIM_ICR_PRI0 0x00 /* Priority 0 intr */ 64e77e65dfSangelo@sysam.it #define MCFSIM_ICR_PRI1 0x01 /* Priority 1 intr */ 65e77e65dfSangelo@sysam.it #define MCFSIM_ICR_PRI2 0x02 /* Priority 2 intr */ 66e77e65dfSangelo@sysam.it #define MCFSIM_ICR_PRI3 0x03 /* Priority 3 intr */ 67e77e65dfSangelo@sysam.it 68e77e65dfSangelo@sysam.it #endif /* mcf5307_h */ 69e77e65dfSangelo@sysam.it 70