149148020SSam Ravnborg /****************************************************************************/ 249148020SSam Ravnborg 349148020SSam Ravnborg /* 449148020SSam Ravnborg * m5407sim.h -- ColdFire 5407 System Integration Module support. 549148020SSam Ravnborg * 649148020SSam Ravnborg * (C) Copyright 2000, Lineo (www.lineo.com) 749148020SSam Ravnborg * (C) Copyright 1999, Moreton Bay Ventures Pty Ltd. 849148020SSam Ravnborg * 949148020SSam Ravnborg * Modified by David W. Miller for the MCF5307 Eval Board. 1049148020SSam Ravnborg */ 1149148020SSam Ravnborg 1249148020SSam Ravnborg /****************************************************************************/ 1349148020SSam Ravnborg #ifndef m5407sim_h 1449148020SSam Ravnborg #define m5407sim_h 1549148020SSam Ravnborg /****************************************************************************/ 1649148020SSam Ravnborg 177fc82b65SGreg Ungerer #define CPU_NAME "COLDFIRE(m5407)" 18733f31b7SGreg Ungerer #define CPU_INSTR_PER_JIFFY 3 197fc82b65SGreg Ungerer 203d461401SGreg Ungerer #include <asm/m54xxacr.h> 213d461401SGreg Ungerer 2249148020SSam Ravnborg /* 2349148020SSam Ravnborg * Define the 5407 SIM register set addresses. 2449148020SSam Ravnborg */ 2549148020SSam Ravnborg #define MCFSIM_RSR 0x00 /* Reset Status reg (r/w) */ 2649148020SSam Ravnborg #define MCFSIM_SYPCR 0x01 /* System Protection reg (r/w)*/ 2749148020SSam Ravnborg #define MCFSIM_SWIVR 0x02 /* SW Watchdog intr reg (r/w) */ 2849148020SSam Ravnborg #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ 2949148020SSam Ravnborg #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ 3049148020SSam Ravnborg #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ 3149148020SSam Ravnborg #define MCFSIM_PLLCR 0x08 /* PLL Controll Reg*/ 3249148020SSam Ravnborg #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ 3349148020SSam Ravnborg #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ 3449148020SSam Ravnborg #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ 3549148020SSam Ravnborg #define MCFSIM_AVR 0x4b /* Autovector Ctrl reg (r/w) */ 3649148020SSam Ravnborg #define MCFSIM_ICR0 0x4c /* Intr Ctrl reg 0 (r/w) */ 3749148020SSam Ravnborg #define MCFSIM_ICR1 0x4d /* Intr Ctrl reg 1 (r/w) */ 3849148020SSam Ravnborg #define MCFSIM_ICR2 0x4e /* Intr Ctrl reg 2 (r/w) */ 3949148020SSam Ravnborg #define MCFSIM_ICR3 0x4f /* Intr Ctrl reg 3 (r/w) */ 4049148020SSam Ravnborg #define MCFSIM_ICR4 0x50 /* Intr Ctrl reg 4 (r/w) */ 4149148020SSam Ravnborg #define MCFSIM_ICR5 0x51 /* Intr Ctrl reg 5 (r/w) */ 4249148020SSam Ravnborg #define MCFSIM_ICR6 0x52 /* Intr Ctrl reg 6 (r/w) */ 4349148020SSam Ravnborg #define MCFSIM_ICR7 0x53 /* Intr Ctrl reg 7 (r/w) */ 4449148020SSam Ravnborg #define MCFSIM_ICR8 0x54 /* Intr Ctrl reg 8 (r/w) */ 4549148020SSam Ravnborg #define MCFSIM_ICR9 0x55 /* Intr Ctrl reg 9 (r/w) */ 4649148020SSam Ravnborg #define MCFSIM_ICR10 0x56 /* Intr Ctrl reg 10 (r/w) */ 4749148020SSam Ravnborg #define MCFSIM_ICR11 0x57 /* Intr Ctrl reg 11 (r/w) */ 4849148020SSam Ravnborg 4949148020SSam Ravnborg #define MCFSIM_CSAR0 0x80 /* CS 0 Address 0 reg (r/w) */ 5049148020SSam Ravnborg #define MCFSIM_CSMR0 0x84 /* CS 0 Mask 0 reg (r/w) */ 5149148020SSam Ravnborg #define MCFSIM_CSCR0 0x8a /* CS 0 Control reg (r/w) */ 5249148020SSam Ravnborg #define MCFSIM_CSAR1 0x8c /* CS 1 Address reg (r/w) */ 5349148020SSam Ravnborg #define MCFSIM_CSMR1 0x90 /* CS 1 Mask reg (r/w) */ 5449148020SSam Ravnborg #define MCFSIM_CSCR1 0x96 /* CS 1 Control reg (r/w) */ 5549148020SSam Ravnborg 5649148020SSam Ravnborg #define MCFSIM_CSAR2 0x98 /* CS 2 Address reg (r/w) */ 5749148020SSam Ravnborg #define MCFSIM_CSMR2 0x9c /* CS 2 Mask reg (r/w) */ 5849148020SSam Ravnborg #define MCFSIM_CSCR2 0xa2 /* CS 2 Control reg (r/w) */ 5949148020SSam Ravnborg #define MCFSIM_CSAR3 0xa4 /* CS 3 Address reg (r/w) */ 6049148020SSam Ravnborg #define MCFSIM_CSMR3 0xa8 /* CS 3 Mask reg (r/w) */ 6149148020SSam Ravnborg #define MCFSIM_CSCR3 0xae /* CS 3 Control reg (r/w) */ 6249148020SSam Ravnborg #define MCFSIM_CSAR4 0xb0 /* CS 4 Address reg (r/w) */ 6349148020SSam Ravnborg #define MCFSIM_CSMR4 0xb4 /* CS 4 Mask reg (r/w) */ 6449148020SSam Ravnborg #define MCFSIM_CSCR4 0xba /* CS 4 Control reg (r/w) */ 6549148020SSam Ravnborg #define MCFSIM_CSAR5 0xbc /* CS 5 Address reg (r/w) */ 6649148020SSam Ravnborg #define MCFSIM_CSMR5 0xc0 /* CS 5 Mask reg (r/w) */ 6749148020SSam Ravnborg #define MCFSIM_CSCR5 0xc6 /* CS 5 Control reg (r/w) */ 6849148020SSam Ravnborg #define MCFSIM_CSAR6 0xc8 /* CS 6 Address reg (r/w) */ 6949148020SSam Ravnborg #define MCFSIM_CSMR6 0xcc /* CS 6 Mask reg (r/w) */ 7049148020SSam Ravnborg #define MCFSIM_CSCR6 0xd2 /* CS 6 Control reg (r/w) */ 7149148020SSam Ravnborg #define MCFSIM_CSAR7 0xd4 /* CS 7 Address reg (r/w) */ 7249148020SSam Ravnborg #define MCFSIM_CSMR7 0xd8 /* CS 7 Mask reg (r/w) */ 7349148020SSam Ravnborg #define MCFSIM_CSCR7 0xde /* CS 7 Control reg (r/w) */ 7449148020SSam Ravnborg 7549148020SSam Ravnborg #define MCFSIM_DCR 0x100 /* DRAM Control reg (r/w) */ 7649148020SSam Ravnborg #define MCFSIM_DACR0 0x108 /* DRAM 0 Addr and Ctrl (r/w) */ 7749148020SSam Ravnborg #define MCFSIM_DMR0 0x10c /* DRAM 0 Mask reg (r/w) */ 7849148020SSam Ravnborg #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ 7949148020SSam Ravnborg #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ 8049148020SSam Ravnborg 81*58f0ac98SGreg Ungerer /* 82*58f0ac98SGreg Ungerer * Timer module. 83*58f0ac98SGreg Ungerer */ 84*58f0ac98SGreg Ungerer #define MCFTIMER_BASE1 (MCF_MBAR + 0x140) /* Base of TIMER1 */ 85*58f0ac98SGreg Ungerer #define MCFTIMER_BASE2 (MCF_MBAR + 0x180) /* Base of TIMER2 */ 86*58f0ac98SGreg Ungerer 8757015421SGreg Ungerer #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ 8857015421SGreg Ungerer #define MCFUART_BASE2 0x200 /* Base address of UART2 */ 8957015421SGreg Ungerer 90dca7cf33Ssfking@fdwdc.com #define MCFSIM_PADDR (MCF_MBAR + 0x244) 91dca7cf33Ssfking@fdwdc.com #define MCFSIM_PADAT (MCF_MBAR + 0x248) 9249148020SSam Ravnborg 93dca7cf33Ssfking@fdwdc.com /* 94babc08b7SGreg Ungerer * DMA unit base addresses. 95babc08b7SGreg Ungerer */ 96babc08b7SGreg Ungerer #define MCFDMA_BASE0 (MCF_MBAR + 0x300) /* Base address DMA 0 */ 97babc08b7SGreg Ungerer #define MCFDMA_BASE1 (MCF_MBAR + 0x340) /* Base address DMA 1 */ 98babc08b7SGreg Ungerer #define MCFDMA_BASE2 (MCF_MBAR + 0x380) /* Base address DMA 2 */ 99babc08b7SGreg Ungerer #define MCFDMA_BASE3 (MCF_MBAR + 0x3C0) /* Base address DMA 3 */ 100babc08b7SGreg Ungerer 101babc08b7SGreg Ungerer /* 102dca7cf33Ssfking@fdwdc.com * Generic GPIO support 103dca7cf33Ssfking@fdwdc.com */ 104dca7cf33Ssfking@fdwdc.com #define MCFGPIO_PIN_MAX 16 105dca7cf33Ssfking@fdwdc.com #define MCFGPIO_IRQ_MAX -1 106dca7cf33Ssfking@fdwdc.com #define MCFGPIO_IRQ_VECBASE -1 10749148020SSam Ravnborg 10849148020SSam Ravnborg /* 10949148020SSam Ravnborg * Some symbol defines for the above... 11049148020SSam Ravnborg */ 11149148020SSam Ravnborg #define MCFSIM_SWDICR MCFSIM_ICR0 /* Watchdog timer ICR */ 11249148020SSam Ravnborg #define MCFSIM_TIMER1ICR MCFSIM_ICR1 /* Timer 1 ICR */ 11349148020SSam Ravnborg #define MCFSIM_TIMER2ICR MCFSIM_ICR2 /* Timer 2 ICR */ 11449148020SSam Ravnborg #define MCFSIM_UART1ICR MCFSIM_ICR4 /* UART 1 ICR */ 11549148020SSam Ravnborg #define MCFSIM_UART2ICR MCFSIM_ICR5 /* UART 2 ICR */ 11649148020SSam Ravnborg #define MCFSIM_DMA0ICR MCFSIM_ICR6 /* DMA 0 ICR */ 11749148020SSam Ravnborg #define MCFSIM_DMA1ICR MCFSIM_ICR7 /* DMA 1 ICR */ 11849148020SSam Ravnborg #define MCFSIM_DMA2ICR MCFSIM_ICR8 /* DMA 2 ICR */ 11949148020SSam Ravnborg #define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ 12049148020SSam Ravnborg 12149148020SSam Ravnborg /* 12249148020SSam Ravnborg * Some symbol defines for the Parallel Port Pin Assignment Register 12349148020SSam Ravnborg */ 12449148020SSam Ravnborg #define MCFSIM_PAR_DREQ0 0x40 /* Set to select DREQ0 input */ 12549148020SSam Ravnborg /* Clear to select par I/O */ 12649148020SSam Ravnborg #define MCFSIM_PAR_DREQ1 0x20 /* Select DREQ1 input */ 12749148020SSam Ravnborg /* Clear to select par I/O */ 12849148020SSam Ravnborg 12949148020SSam Ravnborg /* 13049148020SSam Ravnborg * Defines for the IRQPAR Register 13149148020SSam Ravnborg */ 13249148020SSam Ravnborg #define IRQ5_LEVEL4 0x80 13349148020SSam Ravnborg #define IRQ3_LEVEL6 0x40 13449148020SSam Ravnborg #define IRQ1_LEVEL2 0x20 13549148020SSam Ravnborg 13604b75b10SGreg Ungerer /* 13704b75b10SGreg Ungerer * Define system peripheral IRQ usage. 13804b75b10SGreg Ungerer */ 13904b75b10SGreg Ungerer #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 14004b75b10SGreg Ungerer #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 14149148020SSam Ravnborg 14249148020SSam Ravnborg /****************************************************************************/ 14349148020SSam Ravnborg #endif /* m5407sim_h */ 144