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

m68knommu: make Coldfire 548x support more generic

The ColdFire 547x family of processors is very similar to the ColdFire
548x series. Almost all of the support for them is the same. Make the
code supporting the 548x more gneric, so it will be capable of
supporting both families.

For the most part this is a renaming excerise to make the support
code more obviously apply to both families.

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

+49 -44
+1 -1
arch/m68k/include/asm/cacheflush_no.h
··· 5 5 * (C) Copyright 2000-2004, Greg Ungerer <gerg@snapgear.com> 6 6 */ 7 7 #include <linux/mm.h> 8 - #if defined(CONFIG_M5407) || defined(CONFIG_M548x) 8 + #if defined(CONFIG_M5407) || defined(CONFIG_M54xx) 9 9 #include <asm/m54xxacr.h> 10 10 #endif 11 11
+1 -1
arch/m68k/include/asm/coldfire.h
··· 32 32 */ 33 33 #define MCF_MBAR 0x10000000 34 34 #define MCF_MBAR2 0x80000000 35 - #if defined(CONFIG_M548x) 35 + #if defined(CONFIG_M54xx) 36 36 #define MCF_IPSBAR MCF_MBAR 37 37 #elif defined(CONFIG_M520x) 38 38 #define MCF_IPSBAR 0xFC000000
+1 -1
arch/m68k/include/asm/gpio.h
··· 37 37 #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ 38 38 defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ 39 39 defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ 40 - defined(CONFIG_M532x) || defined(CONFIG_M548x) 40 + defined(CONFIG_M532x) || defined(CONFIG_M54xx) 41 41 42 42 /* These parts have GPIO organized by 8 bit ports */ 43 43
+5 -5
arch/m68k/include/asm/m548xgpt.h arch/m68k/include/asm/m54xxgpt.h
··· 1 1 /* 2 - * File: m548xgpt.h 3 - * Purpose: Register and bit definitions for the MCF548X 2 + * File: m54xxgpt.h 3 + * Purpose: Register and bit definitions for the MCF54XX 4 4 * 5 5 * Notes: 6 6 * 7 7 */ 8 8 9 - #ifndef m548xgpt_h 10 - #define m548xgpt_h 9 + #ifndef m54xxgpt_h 10 + #define m54xxgpt_h 11 11 12 12 /********************************************************************* 13 13 * ··· 85 85 86 86 /********************************************************************/ 87 87 88 - #endif /* m548xgpt_h */ 88 + #endif /* m54xxgpt_h */
+4 -4
arch/m68k/include/asm/m548xsim.h arch/m68k/include/asm/m54xxsim.h
··· 1 1 /* 2 - * m548xsim.h -- ColdFire 547x/548x System Integration Unit support. 2 + * m54xxsim.h -- ColdFire 547x/548x System Integration Unit support. 3 3 */ 4 4 5 - #ifndef m548xsim_h 6 - #define m548xsim_h 5 + #ifndef m54xxsim_h 6 + #define m54xxsim_h 7 7 8 8 #define MCFINT_VECBASE 64 9 9 ··· 52 52 #define MCF_PAR_PSC_RTS_RTS (0x30) 53 53 #define MCF_PAR_PSC_CANRX (0x40) 54 54 55 - #endif /* m548xsim_h */ 55 + #endif /* m54xxsim_h */
+1 -1
arch/m68k/include/asm/m54xxacr.h
··· 45 45 #define ICACHE_SIZE 0x4000 /* instruction - 16k */ 46 46 #define DCACHE_SIZE 0x2000 /* data - 8k */ 47 47 48 - #elif defined(CONFIG_M548x) 48 + #elif defined(CONFIG_M54xx) 49 49 50 50 #define ICACHE_SIZE 0x8000 /* instruction - 32k */ 51 51 #define DCACHE_SIZE 0x8000 /* data - 32k */
+2 -2
arch/m68k/include/asm/mcfcache.h
··· 107 107 .endm 108 108 #endif /* CONFIG_M532x */ 109 109 110 - #if defined(CONFIG_M5407) || defined(CONFIG_M548x) 110 + #if defined(CONFIG_M5407) || defined(CONFIG_M54xx) 111 111 112 112 #include <asm/m54xxacr.h> 113 113 ··· 131 131 movec %d0,%CACR 132 132 nop 133 133 .endm 134 - #endif /* CONFIG_M5407 || CONFIG_M548x */ 134 + #endif /* CONFIG_M5407 || CONFIG_M54xx */ 135 135 136 136 #if defined(CONFIG_M520x) 137 137 .macro CACHE_ENABLE
+2 -2
arch/m68k/include/asm/mcfsim.h
··· 41 41 #elif defined(CONFIG_M5407) 42 42 #include <asm/m5407sim.h> 43 43 #include <asm/mcfintc.h> 44 - #elif defined(CONFIG_M548x) 45 - #include <asm/m548xsim.h> 44 + #elif defined(CONFIG_M54xx) 45 + #include <asm/m54xxsim.h> 46 46 #endif 47 47 48 48 /****************************************************************************/
+6 -6
arch/m68k/include/asm/mcfuart.h
··· 47 47 #define MCFUART_BASE1 0xfc060000 /* Base address of UART1 */ 48 48 #define MCFUART_BASE2 0xfc064000 /* Base address of UART2 */ 49 49 #define MCFUART_BASE3 0xfc068000 /* Base address of UART3 */ 50 - #elif defined(CONFIG_M548x) 51 - #define MCFUART_BASE1 0x8600 /* on M548x */ 52 - #define MCFUART_BASE2 0x8700 /* on M548x */ 53 - #define MCFUART_BASE3 0x8800 /* on M548x */ 54 - #define MCFUART_BASE4 0x8900 /* on M548x */ 50 + #elif defined(CONFIG_M54xx) 51 + #define MCFUART_BASE1 0x8600 /* on M54xx */ 52 + #define MCFUART_BASE2 0x8700 /* on M54xx */ 53 + #define MCFUART_BASE3 0x8800 /* on M54xx */ 54 + #define MCFUART_BASE4 0x8900 /* on M54xx */ 55 55 #endif 56 56 57 57 ··· 217 217 #define MCFUART_URF_RXS 0xc0 /* Receiver status */ 218 218 #endif 219 219 220 - #if defined(CONFIG_M548x) 220 + #if defined(CONFIG_M54xx) 221 221 #define MCFUART_TXFIFOSIZE 512 222 222 #elif defined(CONFIG_M5272) 223 223 #define MCFUART_TXFIFOSIZE 25
+6 -1
arch/m68knommu/Kconfig
··· 181 181 select GENERIC_CLOCKEVENTS 182 182 default y 183 183 184 + config M54xx 185 + bool 186 + depends on M548x 187 + default y 188 + 184 189 config COLDFIRE 185 190 bool 186 - depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M548x) 191 + depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx) 187 192 select GENERIC_GPIO 188 193 select ARCH_REQUIRE_GPIOLIB 189 194 default y
+3 -3
arch/m68knommu/Makefile
··· 25 25 platform-$(CONFIG_M5307) := 5307 26 26 platform-$(CONFIG_M532x) := 532x 27 27 platform-$(CONFIG_M5407) := 5407 28 - platform-$(CONFIG_M548x) := 548x 28 + platform-$(CONFIG_M54xx) := 54xx 29 29 PLATFORM := $(platform-y) 30 30 31 31 board-$(CONFIG_PILOT) := pilot ··· 74 74 cpuclass-$(CONFIG_M5307) := coldfire 75 75 cpuclass-$(CONFIG_M532x) := coldfire 76 76 cpuclass-$(CONFIG_M5407) := coldfire 77 - cpuclass-$(CONFIG_M548x) := coldfire 77 + cpuclass-$(CONFIG_M54xx) := coldfire 78 78 cpuclass-$(CONFIG_M68328) := 68328 79 79 cpuclass-$(CONFIG_M68EZ328) := 68328 80 80 cpuclass-$(CONFIG_M68VZ328) := 68328 ··· 102 102 cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200) 103 103 cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) 104 104 cflags-$(CONFIG_M5407) := $(call cc-option,-m5407,-m5200) 105 - cflags-$(CONFIG_M548x) := $(call cc-option,-m5407,-m5200) 105 + cflags-$(CONFIG_M54xx) := $(call cc-option,-m5407,-m5200) 106 106 cflags-$(CONFIG_M68328) := -m68000 107 107 cflags-$(CONFIG_M68EZ328) := -m68000 108 108 cflags-$(CONFIG_M68VZ328) := -m68000
arch/m68knommu/platform/548x/Makefile arch/m68knommu/platform/54xx/Makefile
+16 -16
arch/m68knommu/platform/548x/config.c arch/m68knommu/platform/54xx/config.c
··· 1 1 /***************************************************************************/ 2 2 3 3 /* 4 - * linux/arch/m68knommu/platform/548x/config.c 4 + * linux/arch/m68knommu/platform/54xx/config.c 5 5 * 6 6 * Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> 7 7 */ ··· 15 15 #include <linux/io.h> 16 16 #include <asm/machdep.h> 17 17 #include <asm/coldfire.h> 18 - #include <asm/m548xsim.h> 18 + #include <asm/m54xxsim.h> 19 19 #include <asm/mcfuart.h> 20 - #include <asm/m548xgpt.h> 20 + #include <asm/m54xxgpt.h> 21 21 22 22 /***************************************************************************/ 23 23 24 - static struct mcf_platform_uart m548x_uart_platform[] = { 24 + static struct mcf_platform_uart m54xx_uart_platform[] = { 25 25 { 26 26 .mapbase = MCF_MBAR + MCFUART_BASE1, 27 27 .irq = 64 + 35, ··· 40 40 }, 41 41 }; 42 42 43 - static struct platform_device m548x_uart = { 43 + static struct platform_device m54xx_uart = { 44 44 .name = "mcfuart", 45 45 .id = 0, 46 - .dev.platform_data = m548x_uart_platform, 46 + .dev.platform_data = m54xx_uart_platform, 47 47 }; 48 48 49 - static struct platform_device *m548x_devices[] __initdata = { 50 - &m548x_uart, 49 + static struct platform_device *m54xx_devices[] __initdata = { 50 + &m54xx_uart, 51 51 }; 52 52 53 53 54 54 /***************************************************************************/ 55 55 56 - static void __init m548x_uart_init_line(int line, int irq) 56 + static void __init m54xx_uart_init_line(int line, int irq) 57 57 { 58 58 int rts_cts; 59 59 ··· 72 72 MCF_MBAR + MCF_PAR_PSC(line)); 73 73 } 74 74 75 - static void __init m548x_uarts_init(void) 75 + static void __init m54xx_uarts_init(void) 76 76 { 77 - const int nrlines = ARRAY_SIZE(m548x_uart_platform); 77 + const int nrlines = ARRAY_SIZE(m54xx_uart_platform); 78 78 int line; 79 79 80 80 for (line = 0; (line < nrlines); line++) 81 - m548x_uart_init_line(line, m548x_uart_platform[line].irq); 81 + m54xx_uart_init_line(line, m54xx_uart_platform[line].irq); 82 82 } 83 83 84 84 /***************************************************************************/ 85 85 86 - static void mcf548x_reset(void) 86 + static void mcf54xx_reset(void) 87 87 { 88 88 /* disable interrupts and enable the watchdog */ 89 89 asm("movew #0x2700, %sr\n"); ··· 97 97 98 98 void __init config_BSP(char *commandp, int size) 99 99 { 100 - mach_reset = mcf548x_reset; 101 - m548x_uarts_init(); 100 + mach_reset = mcf54xx_reset; 101 + m54xx_uarts_init(); 102 102 } 103 103 104 104 /***************************************************************************/ ··· 106 106 static int __init init_BSP(void) 107 107 { 108 108 109 - platform_add_devices(m548x_devices, ARRAY_SIZE(m548x_devices)); 109 + platform_add_devices(m54xx_devices, ARRAY_SIZE(m54xx_devices)); 110 110 return 0; 111 111 } 112 112
+1 -1
arch/m68knommu/platform/coldfire/Makefile
··· 26 26 obj-$(CONFIG_M5307) += timers.o intc.o 27 27 obj-$(CONFIG_M532x) += timers.o intc-simr.o 28 28 obj-$(CONFIG_M5407) += timers.o intc.o 29 - obj-$(CONFIG_M548x) += sltimers.o intc-2.o 29 + obj-$(CONFIG_M54xx) += sltimers.o intc-2.o 30 30 31 31 obj-y += pinmux.o gpio.o 32 32 extra-y := head.o