From 7ea23c9bcc745b1b74d1dc0fd85bc5d4d694b719 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Mon, 6 Jun 2011 13:33:11 +1000 Subject: [PATCH] --- yaml --- r: 259071 b: refs/heads/master c: f4a5437333e405e967be660430e58fc2355c62c8 h: refs/heads/master i: 259069: f7b2ce9478c7d63702a7caa971d719c995b0c8fc 259067: 59ede73699f18842fcd538af0c9b632e0eb65ab1 259063: 93356e63258fe6fe9417d080f723df7c4c84f53f 259055: fb7b98d17be51dd38d49e34f35c3e8afb4869b19 259039: c698e0ea1aad331720e38ec012647ffaebe2fd20 259007: 8838eeefb075612fd106cccedcdc39bc441ff216 258943: d7d5e59dbf2b9104d832349b72d8386bf96ac7ec 258815: 588365d2e556bb4d127fcdee0f038abc56e66bce 258559: 4c8e681f83e46d180a8446607cc44a00e6db90d4 258047: cc12fc21ea0e9e4af159d57a9799e312f230a2ee v: v3 --- [refs] | 2 +- trunk/arch/m68k/Makefile_no | 2 +- trunk/arch/m68k/platform/5206/config.c | 6 ++ trunk/arch/m68k/platform/5206e/Makefile | 18 ---- trunk/arch/m68k/platform/5206e/config.c | 127 ------------------------ trunk/arch/m68k/platform/5206e/gpio.c | 49 --------- 6 files changed, 8 insertions(+), 196 deletions(-) delete mode 100644 trunk/arch/m68k/platform/5206e/Makefile delete mode 100644 trunk/arch/m68k/platform/5206e/config.c delete mode 100644 trunk/arch/m68k/platform/5206e/gpio.c diff --git a/[refs] b/[refs] index 745db90899a5..9c5f897f05da 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 171d809df1896c1022f9778cd2788be6c255a7dc +refs/heads/master: f4a5437333e405e967be660430e58fc2355c62c8 diff --git a/trunk/arch/m68k/Makefile_no b/trunk/arch/m68k/Makefile_no index 81652ab893e1..844d3f172264 100644 --- a/trunk/arch/m68k/Makefile_no +++ b/trunk/arch/m68k/Makefile_no @@ -13,7 +13,7 @@ platform-$(CONFIG_M68EZ328) := 68EZ328 platform-$(CONFIG_M68VZ328) := 68VZ328 platform-$(CONFIG_M68360) := 68360 platform-$(CONFIG_M5206) := 5206 -platform-$(CONFIG_M5206e) := 5206e +platform-$(CONFIG_M5206e) := 5206 platform-$(CONFIG_M520x) := 520x platform-$(CONFIG_M523x) := 523x platform-$(CONFIG_M5249) := 5249 diff --git a/trunk/arch/m68k/platform/5206/config.c b/trunk/arch/m68k/platform/5206/config.c index 9c335465e66d..6fa3f800277a 100644 --- a/trunk/arch/m68k/platform/5206/config.c +++ b/trunk/arch/m68k/platform/5206/config.c @@ -98,6 +98,12 @@ void m5206_cpu_reset(void) void __init config_BSP(char *commandp, int size) { +#if defined(CONFIG_NETtel) + /* Copy command line from FLASH to local buffer... */ + memcpy(commandp, (char *) 0xf0004000, size); + commandp[size-1] = 0; +#endif /* CONFIG_NETtel */ + mach_reset = m5206_cpu_reset; m5206_timers_init(); m5206_uarts_init(); diff --git a/trunk/arch/m68k/platform/5206e/Makefile b/trunk/arch/m68k/platform/5206e/Makefile deleted file mode 100644 index b5db05625cfa..000000000000 --- a/trunk/arch/m68k/platform/5206e/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# -# Makefile for the m68knommu linux kernel. -# - -# -# If you want to play with the HW breakpoints then you will -# need to add define this, which will give you a stack backtrace -# on the console port whenever a DBG interrupt occurs. You have to -# set up you HW breakpoints to trigger a DBG interrupt: -# -# ccflags-y := -DTRAP_DBG_INTERRUPT -# asflags-y := -DTRAP_DBG_INTERRUPT -# - -asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 - -obj-y := config.o gpio.o - diff --git a/trunk/arch/m68k/platform/5206e/config.c b/trunk/arch/m68k/platform/5206e/config.c deleted file mode 100644 index 942397984c66..000000000000 --- a/trunk/arch/m68k/platform/5206e/config.c +++ /dev/null @@ -1,127 +0,0 @@ -/***************************************************************************/ - -/* - * linux/arch/m68knommu/platform/5206e/config.c - * - * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) - */ - -/***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/***************************************************************************/ - -static struct mcf_platform_uart m5206e_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = 73, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = 74, - }, - { }, -}; - -static struct platform_device m5206e_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m5206e_uart_platform, -}; - -static struct platform_device *m5206e_devices[] __initdata = { - &m5206e_uart, -}; - -/***************************************************************************/ - -static void __init m5206e_uart_init_line(int line, int irq) -{ - if (line == 0) { - writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); - writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); - mcf_mapirq2imr(irq, MCFINTC_UART0); - } else if (line == 1) { - writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); - writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); - mcf_mapirq2imr(irq, MCFINTC_UART1); - } -} - -static void __init m5206e_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m5206e_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m5206e_uart_init_line(line, m5206e_uart_platform[line].irq); -} - -/***************************************************************************/ - -static void __init m5206e_timers_init(void) -{ - /* Timer1 is always used as system timer */ - writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3, - MCF_MBAR + MCFSIM_TIMER1ICR); - mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1); - -#ifdef CONFIG_HIGHPROFILE - /* Timer2 is to be used as a high speed profile timer */ - writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3, - MCF_MBAR + MCFSIM_TIMER2ICR); - mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2); -#endif -} - -/***************************************************************************/ - -void m5206e_cpu_reset(void) -{ - local_irq_disable(); - /* Set watchdog to soft reset, and enabled */ - __raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR); - for (;;) - /* wait for watchdog to timeout */; -} - -/***************************************************************************/ - -void __init config_BSP(char *commandp, int size) -{ -#if defined(CONFIG_NETtel) - /* Copy command line from FLASH to local buffer... */ - memcpy(commandp, (char *) 0xf0004000, size); - commandp[size-1] = 0; -#endif /* CONFIG_NETtel */ - - mach_reset = m5206e_cpu_reset; - m5206e_timers_init(); - m5206e_uarts_init(); - - /* Only support the external interrupts on their primary level */ - mcf_mapirq2imr(25, MCFINTC_EINT1); - mcf_mapirq2imr(28, MCFINTC_EINT4); - mcf_mapirq2imr(31, MCFINTC_EINT7); -} - -/***************************************************************************/ - -static int __init init_BSP(void) -{ - platform_add_devices(m5206e_devices, ARRAY_SIZE(m5206e_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68k/platform/5206e/gpio.c b/trunk/arch/m68k/platform/5206e/gpio.c deleted file mode 100644 index b9ab4a120f28..000000000000 --- a/trunk/arch/m68k/platform/5206e/gpio.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Coldfire generic GPIO support - * - * (C) Copyright 2009, Steven King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. -*/ - -#include -#include - -#include -#include -#include - -static struct mcf_gpio_chip mcf_gpio_chips[] = { - { - .gpio_chip = { - .label = "PP", - .request = mcf_gpio_request, - .free = mcf_gpio_free, - .direction_input = mcf_gpio_direction_input, - .direction_output = mcf_gpio_direction_output, - .get = mcf_gpio_get_value, - .set = mcf_gpio_set_value, - .ngpio = 8, - }, - .pddr = (void __iomem *) MCFSIM_PADDR, - .podr = (void __iomem *) MCFSIM_PADAT, - .ppdr = (void __iomem *) MCFSIM_PADAT, - }, -}; - -static int __init mcf_gpio_init(void) -{ - unsigned i = 0; - while (i < ARRAY_SIZE(mcf_gpio_chips)) - (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]); - return 0; -} - -core_initcall(mcf_gpio_init);