Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68knommu: move ColdFire PIT timer base addresses

The PIT hardware timer module used in some ColdFire CPU's is not always
addressed relative to an IPSBAR register. Parts like the ColdFire 5207 and
5208 have fixed peripheral addresses. So lets not define the register
addresses of the PIT relative to an IPSBAR definition. Move the base
address definitions into the per-part headers. This is a lot more consistent
since all the other peripheral base addresses are defined in the per-part
header files already.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>

+32 -20
+6
arch/m68k/include/asm/m520xsim.h
··· 134 134 #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) 135 135 136 136 /* 137 + * PIT timer module. 138 + */ 139 + #define MCFPIT_BASE1 0xFC080000 /* Base address of TIMER1 */ 140 + #define MCFPIT_BASE2 0xFC084000 /* Base address of TIMER2 */ 141 + 142 + /* 137 143 * UART module. 138 144 */ 139 145 #define MCFUART_BASE1 0x60000 /* Base address of UART1 */
+8 -1
arch/m68k/include/asm/m523xsim.h
··· 119 119 #define MCFGPIO_PCLRR_ETPU (MCF_IPSBAR + 0x10003C) 120 120 121 121 /* 122 + * PIT timer base addresses. 123 + */ 124 + #define MCFPIT_BASE1 (MCF_IPSBAR + 0x150000) 125 + #define MCFPIT_BASE2 (MCF_IPSBAR + 0x160000) 126 + #define MCFPIT_BASE3 (MCF_IPSBAR + 0x170000) 127 + #define MCFPIT_BASE4 (MCF_IPSBAR + 0x180000) 128 + 129 + /* 122 130 * EPort 123 131 */ 124 - 125 132 #define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002) 126 133 #define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004) 127 134 #define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005)
+8 -3
arch/m68k/include/asm/m527xsim.h
··· 232 232 #endif 233 233 234 234 /* 235 + * PIT timer base addresses. 236 + */ 237 + #define MCFPIT_BASE1 (MCF_IPSBAR + 0x150000) 238 + #define MCFPIT_BASE2 (MCF_IPSBAR + 0x160000) 239 + #define MCFPIT_BASE3 (MCF_IPSBAR + 0x170000) 240 + #define MCFPIT_BASE4 (MCF_IPSBAR + 0x180000) 241 + 242 + /* 235 243 * EPort 236 244 */ 237 - 238 245 #define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002) 239 246 #define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004) 240 247 #define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005) 241 - 242 - 243 248 244 249 /* 245 250 * GPIO pins setups to enable the UARTs.
+8
arch/m68k/include/asm/m528xsim.h
··· 164 164 #define MCFGPIO_PUAPAR (MCF_IPSBAR + 0x0010005C) 165 165 166 166 /* 167 + * PIT timer base addresses. 168 + */ 169 + #define MCFPIT_BASE1 (MCF_IPSBAR + 0x00150000) 170 + #define MCFPIT_BASE2 (MCF_IPSBAR + 0x00160000) 171 + #define MCFPIT_BASE3 (MCF_IPSBAR + 0x00170000) 172 + #define MCFPIT_BASE4 (MCF_IPSBAR + 0x00180000) 173 + 174 + /* 167 175 * Edge Port registers 168 176 */ 169 177 #define MCFEPORT_EPPAR (MCF_IPSBAR + 0x00130000)
+1 -15
arch/m68k/include/asm/mcfpit.h
··· 11 11 #define mcfpit_h 12 12 /****************************************************************************/ 13 13 14 - 15 14 /* 16 - * Get address specific defines for the 5270/5271, 5280/5282, and 5208. 17 - */ 18 - #if defined(CONFIG_M520x) 19 - #define MCFPIT_BASE1 0x00080000 /* Base address of TIMER1 */ 20 - #define MCFPIT_BASE2 0x00084000 /* Base address of TIMER2 */ 21 - #else 22 - #define MCFPIT_BASE1 0x00150000 /* Base address of TIMER1 */ 23 - #define MCFPIT_BASE2 0x00160000 /* Base address of TIMER2 */ 24 - #define MCFPIT_BASE3 0x00170000 /* Base address of TIMER3 */ 25 - #define MCFPIT_BASE4 0x00180000 /* Base address of TIMER4 */ 26 - #endif 27 - 28 - /* 29 - * Define the PIT timer register set addresses. 15 + * Define the PIT timer register address offsets. 30 16 */ 31 17 #define MCFPIT_PCSR 0x0 /* PIT control register */ 32 18 #define MCFPIT_PMR 0x2 /* PIT modulus register */
+1 -1
arch/m68knommu/platform/coldfire/pit.c
··· 31 31 * By default use timer1 as the system clock timer. 32 32 */ 33 33 #define FREQ ((MCF_CLK / 2) / 64) 34 - #define TA(a) (MCF_IPSBAR + MCFPIT_BASE1 + (a)) 34 + #define TA(a) (MCFPIT_BASE1 + (a)) 35 35 #define PIT_CYCLES_PER_JIFFY (FREQ / HZ) 36 36 37 37 static u32 pit_cnt;