aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2012-09-17 02:16:19 -0400
committerGreg Ungerer <gerg@uclinux.org>2012-09-27 09:34:00 -0400
commit6d8a1393ec700d8621858dd0f3bee2b7e821e9fc (patch)
treebf07e176fc039f44fe0d5ffdb66c75a308180858 /arch/m68k/include
parente4c2b9befe91a0e9bdbbdaf9faf4b093b35c9044 (diff)
m68knommu: use read/write IO access functions in ColdFire m532x setup code
Get rid of the use of local IO access macros and switch to using the standard read*/write* family of access functions for the ColdFire m532x setup code. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/include')
-rw-r--r--arch/m68k/include/asm/m532xsim.h104
1 files changed, 48 insertions, 56 deletions
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h
index d4092fa7e5f4..8668e47ced0e 100644
--- a/arch/m68k/include/asm/m532xsim.h
+++ b/arch/m68k/include/asm/m532xsim.h
@@ -15,10 +15,6 @@
15 15
16#include <asm/m53xxacr.h> 16#include <asm/m53xxacr.h>
17 17
18#define MCF_REG32(x) (*(volatile unsigned long *)(x))
19#define MCF_REG16(x) (*(volatile unsigned short *)(x))
20#define MCF_REG08(x) (*(volatile unsigned char *)(x))
21
22#define MCFINT_VECBASE 64 18#define MCFINT_VECBASE 64
23#define MCFINT_UART0 26 /* Interrupt number for UART0 */ 19#define MCFINT_UART0 26 /* Interrupt number for UART0 */
24#define MCFINT_UART1 27 /* Interrupt number for UART1 */ 20#define MCFINT_UART1 27 /* Interrupt number for UART1 */
@@ -38,7 +34,7 @@
38 34
39#define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI) 35#define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI)
40 36
41#define MCF_WTM_WCR MCF_REG16(0xFC098000) 37#define MCF_WTM_WCR 0xFC098000
42 38
43/* 39/*
44 * Define the 532x SIM register set addresses. 40 * Define the 532x SIM register set addresses.
@@ -181,13 +177,13 @@
181 *********************************************************************/ 177 *********************************************************************/
182 178
183/* Register read/write macros */ 179/* Register read/write macros */
184#define MCF_CCM_CCR MCF_REG16(0xFC0A0004) 180#define MCF_CCM_CCR 0xFC0A0004
185#define MCF_CCM_RCON MCF_REG16(0xFC0A0008) 181#define MCF_CCM_RCON 0xFC0A0008
186#define MCF_CCM_CIR MCF_REG16(0xFC0A000A) 182#define MCF_CCM_CIR 0xFC0A000A
187#define MCF_CCM_MISCCR MCF_REG16(0xFC0A0010) 183#define MCF_CCM_MISCCR 0xFC0A0010
188#define MCF_CCM_CDR MCF_REG16(0xFC0A0012) 184#define MCF_CCM_CDR 0xFC0A0012
189#define MCF_CCM_UHCSR MCF_REG16(0xFC0A0014) 185#define MCF_CCM_UHCSR 0xFC0A0014
190#define MCF_CCM_UOCSR MCF_REG16(0xFC0A0016) 186#define MCF_CCM_UOCSR 0xFC0A0016
191 187
192/* Bit definitions and macros for MCF_CCM_CCR */ 188/* Bit definitions and macros for MCF_CCM_CCR */
193#define MCF_CCM_CCR_RESERVED (0x0001) 189#define MCF_CCM_CCR_RESERVED (0x0001)
@@ -256,27 +252,24 @@
256 *********************************************************************/ 252 *********************************************************************/
257 253
258/* Register read/write macros */ 254/* Register read/write macros */
259#define MCF_FBCS0_CSAR MCF_REG32(0xFC008000) 255#define MCF_FBCS0_CSAR 0xFC008000
260#define MCF_FBCS0_CSMR MCF_REG32(0xFC008004) 256#define MCF_FBCS0_CSMR 0xFC008004
261#define MCF_FBCS0_CSCR MCF_REG32(0xFC008008) 257#define MCF_FBCS0_CSCR 0xFC008008
262#define MCF_FBCS1_CSAR MCF_REG32(0xFC00800C) 258#define MCF_FBCS1_CSAR 0xFC00800C
263#define MCF_FBCS1_CSMR MCF_REG32(0xFC008010) 259#define MCF_FBCS1_CSMR 0xFC008010
264#define MCF_FBCS1_CSCR MCF_REG32(0xFC008014) 260#define MCF_FBCS1_CSCR 0xFC008014
265#define MCF_FBCS2_CSAR MCF_REG32(0xFC008018) 261#define MCF_FBCS2_CSAR 0xFC008018
266#define MCF_FBCS2_CSMR MCF_REG32(0xFC00801C) 262#define MCF_FBCS2_CSMR 0xFC00801C
267#define MCF_FBCS2_CSCR MCF_REG32(0xFC008020) 263#define MCF_FBCS2_CSCR 0xFC008020
268#define MCF_FBCS3_CSAR MCF_REG32(0xFC008024) 264#define MCF_FBCS3_CSAR 0xFC008024
269#define MCF_FBCS3_CSMR MCF_REG32(0xFC008028) 265#define MCF_FBCS3_CSMR 0xFC008028
270#define MCF_FBCS3_CSCR MCF_REG32(0xFC00802C) 266#define MCF_FBCS3_CSCR 0xFC00802C
271#define MCF_FBCS4_CSAR MCF_REG32(0xFC008030) 267#define MCF_FBCS4_CSAR 0xFC008030
272#define MCF_FBCS4_CSMR MCF_REG32(0xFC008034) 268#define MCF_FBCS4_CSMR 0xFC008034
273#define MCF_FBCS4_CSCR MCF_REG32(0xFC008038) 269#define MCF_FBCS4_CSCR 0xFC008038
274#define MCF_FBCS5_CSAR MCF_REG32(0xFC00803C) 270#define MCF_FBCS5_CSAR 0xFC00803C
275#define MCF_FBCS5_CSMR MCF_REG32(0xFC008040) 271#define MCF_FBCS5_CSMR 0xFC008040
276#define MCF_FBCS5_CSCR MCF_REG32(0xFC008044) 272#define MCF_FBCS5_CSCR 0xFC008044
277#define MCF_FBCS_CSAR(x) MCF_REG32(0xFC008000+((x)*0x00C))
278#define MCF_FBCS_CSMR(x) MCF_REG32(0xFC008004+((x)*0x00C))
279#define MCF_FBCS_CSCR(x) MCF_REG32(0xFC008008+((x)*0x00C))
280 273
281/* Bit definitions and macros for MCF_FBCS_CSAR */ 274/* Bit definitions and macros for MCF_FBCS_CSAR */
282#define MCF_FBCS_CSAR_BA(x) ((x)&0xFFFF0000) 275#define MCF_FBCS_CSAR_BA(x) ((x)&0xFFFF0000)
@@ -1114,10 +1107,10 @@
1114 *********************************************************************/ 1107 *********************************************************************/
1115 1108
1116/* Register read/write macros */ 1109/* Register read/write macros */
1117#define MCF_PLL_PODR MCF_REG08(0xFC0C0000) 1110#define MCF_PLL_PODR 0xFC0C0000
1118#define MCF_PLL_PLLCR MCF_REG08(0xFC0C0004) 1111#define MCF_PLL_PLLCR 0xFC0C0004
1119#define MCF_PLL_PMDR MCF_REG08(0xFC0C0008) 1112#define MCF_PLL_PMDR 0xFC0C0008
1120#define MCF_PLL_PFDR MCF_REG08(0xFC0C000C) 1113#define MCF_PLL_PFDR 0xFC0C000C
1121 1114
1122/* Bit definitions and macros for MCF_PLL_PODR */ 1115/* Bit definitions and macros for MCF_PLL_PODR */
1123#define MCF_PLL_PODR_BUSDIV(x) (((x)&0x0F)<<0) 1116#define MCF_PLL_PODR_BUSDIV(x) (((x)&0x0F)<<0)
@@ -1140,15 +1133,15 @@
1140 *********************************************************************/ 1133 *********************************************************************/
1141 1134
1142/* Register read/write macros */ 1135/* Register read/write macros */
1143#define MCF_SCM_MPR MCF_REG32(0xFC000000) 1136#define MCF_SCM_MPR 0xFC000000
1144#define MCF_SCM_PACRA MCF_REG32(0xFC000020) 1137#define MCF_SCM_PACRA 0xFC000020
1145#define MCF_SCM_PACRB MCF_REG32(0xFC000024) 1138#define MCF_SCM_PACRB 0xFC000024
1146#define MCF_SCM_PACRC MCF_REG32(0xFC000028) 1139#define MCF_SCM_PACRC 0xFC000028
1147#define MCF_SCM_PACRD MCF_REG32(0xFC00002C) 1140#define MCF_SCM_PACRD 0xFC00002C
1148#define MCF_SCM_PACRE MCF_REG32(0xFC000040) 1141#define MCF_SCM_PACRE 0xFC000040
1149#define MCF_SCM_PACRF MCF_REG32(0xFC000044) 1142#define MCF_SCM_PACRF 0xFC000044
1150 1143
1151#define MCF_SCM_BCR MCF_REG32(0xFC040024) 1144#define MCF_SCM_BCR 0xFC040024
1152 1145
1153/********************************************************************* 1146/*********************************************************************
1154 * 1147 *
@@ -1157,17 +1150,16 @@
1157 *********************************************************************/ 1150 *********************************************************************/
1158 1151
1159/* Register read/write macros */ 1152/* Register read/write macros */
1160#define MCF_SDRAMC_SDMR MCF_REG32(0xFC0B8000) 1153#define MCF_SDRAMC_SDMR 0xFC0B8000
1161#define MCF_SDRAMC_SDCR MCF_REG32(0xFC0B8004) 1154#define MCF_SDRAMC_SDCR 0xFC0B8004
1162#define MCF_SDRAMC_SDCFG1 MCF_REG32(0xFC0B8008) 1155#define MCF_SDRAMC_SDCFG1 0xFC0B8008
1163#define MCF_SDRAMC_SDCFG2 MCF_REG32(0xFC0B800C) 1156#define MCF_SDRAMC_SDCFG2 0xFC0B800C
1164#define MCF_SDRAMC_LIMP_FIX MCF_REG32(0xFC0B8080) 1157#define MCF_SDRAMC_LIMP_FIX 0xFC0B8080
1165#define MCF_SDRAMC_SDDS MCF_REG32(0xFC0B8100) 1158#define MCF_SDRAMC_SDDS 0xFC0B8100
1166#define MCF_SDRAMC_SDCS0 MCF_REG32(0xFC0B8110) 1159#define MCF_SDRAMC_SDCS0 0xFC0B8110
1167#define MCF_SDRAMC_SDCS1 MCF_REG32(0xFC0B8114) 1160#define MCF_SDRAMC_SDCS1 0xFC0B8114
1168#define MCF_SDRAMC_SDCS2 MCF_REG32(0xFC0B8118) 1161#define MCF_SDRAMC_SDCS2 0xFC0B8118
1169#define MCF_SDRAMC_SDCS3 MCF_REG32(0xFC0B811C) 1162#define MCF_SDRAMC_SDCS3 0xFC0B811C
1170#define MCF_SDRAMC_SDCS(x) MCF_REG32(0xFC0B8110+((x)*0x004))
1171 1163
1172/* Bit definitions and macros for MCF_SDRAMC_SDMR */ 1164/* Bit definitions and macros for MCF_SDRAMC_SDMR */
1173#define MCF_SDRAMC_SDMR_CMD (0x00010000) 1165#define MCF_SDRAMC_SDMR_CMD (0x00010000)