From e6f9abdab0d195fd5e0bf51599e2bbc0040c4894 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Thu, 24 Jan 2008 13:08:01 -0500 Subject: [PATCH] --- yaml --- r: 81811 b: refs/heads/master c: 4bdb0fba9e53dc263eb9601404d097dd99e60f83 h: refs/heads/master i: 81809: cc5bf880804e563aee128113be001f5adb60a80e 81807: 067288700f36fab6e5a82751fcc5ab13243cab60 v: v3 --- [refs] | 2 +- trunk/arch/m68knommu/Kconfig | 4 - trunk/arch/m68knommu/Makefile | 22 ++-- trunk/arch/m68knommu/kernel/time.c | 81 ++++++++++++++ trunk/arch/m68knommu/platform/5206/config.c | 76 ++++--------- trunk/arch/m68knommu/platform/5206e/config.c | 80 ++++---------- trunk/arch/m68knommu/platform/520x/config.c | 101 ++---------------- trunk/arch/m68knommu/platform/523x/config.c | 75 ++----------- trunk/arch/m68knommu/platform/5249/config.c | 77 ++++--------- trunk/arch/m68knommu/platform/5272/config.c | 85 ++++----------- trunk/arch/m68knommu/platform/527x/config.c | 87 ++------------- trunk/arch/m68knommu/platform/528x/config.c | 86 ++------------- trunk/arch/m68knommu/platform/5307/Makefile | 14 ++- trunk/arch/m68knommu/platform/5307/config.c | 85 +++++---------- .../platform/{coldfire => 5307}/entry.S | 0 .../platform/{coldfire => 5307}/head.S | 0 .../platform/{coldfire => 5307}/pit.c | 86 ++++++--------- .../platform/{coldfire => 5307}/timers.c | 68 +++++------- .../platform/{coldfire => 5307}/vectors.c | 0 trunk/arch/m68knommu/platform/532x/config.c | 94 +++++----------- trunk/arch/m68knommu/platform/5407/config.c | 83 +++++--------- trunk/arch/m68knommu/platform/68328/timers.c | 56 +++------- trunk/arch/m68knommu/platform/68360/config.c | 5 + .../arch/m68knommu/platform/coldfire/Makefile | 32 ------ trunk/arch/m68knommu/platform/coldfire/dma.c | 39 ------- trunk/arch/powerpc/platforms/pasemi/iommu.c | 2 +- trunk/drivers/net/dl2k.h | 4 +- trunk/drivers/net/wireless/rt2x00/rt61pci.c | 3 +- trunk/drivers/serial/68328serial.c | 2 +- trunk/drivers/serial/Kconfig | 24 ----- trunk/drivers/serial/Makefile | 1 - trunk/drivers/serial/mcf.c | 20 ++-- trunk/include/asm-m68knommu/cacheflush.h | 2 +- trunk/include/asm-m68knommu/mcfcache.h | 2 +- trunk/include/asm-m68knommu/mcfuart.h | 3 +- 35 files changed, 407 insertions(+), 994 deletions(-) rename trunk/arch/m68knommu/platform/{coldfire => 5307}/entry.S (100%) rename trunk/arch/m68knommu/platform/{coldfire => 5307}/head.S (100%) rename trunk/arch/m68knommu/platform/{coldfire => 5307}/pit.c (53%) rename trunk/arch/m68knommu/platform/{coldfire => 5307}/timers.c (77%) rename trunk/arch/m68knommu/platform/{coldfire => 5307}/vectors.c (100%) delete mode 100644 trunk/arch/m68knommu/platform/coldfire/Makefile delete mode 100644 trunk/arch/m68knommu/platform/coldfire/dma.c diff --git a/[refs] b/[refs] index be89ae6e4a7f..9d8d923e6bab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2da53b0134ad41b91556d2d2a322cc03487a1ab7 +refs/heads/master: 4bdb0fba9e53dc263eb9601404d097dd99e60f83 diff --git a/trunk/arch/m68knommu/Kconfig b/trunk/arch/m68knommu/Kconfig index bd9213749ac2..f4b582cbb567 100644 --- a/trunk/arch/m68knommu/Kconfig +++ b/trunk/arch/m68knommu/Kconfig @@ -53,10 +53,6 @@ config GENERIC_CALIBRATE_DELAY bool default y -config GENERIC_TIME - bool - default y - config TIME_LOW_RES bool default y diff --git a/trunk/arch/m68knommu/Makefile b/trunk/arch/m68knommu/Makefile index e0b5f62e395c..30aa2553693d 100644 --- a/trunk/arch/m68knommu/Makefile +++ b/trunk/arch/m68knommu/Makefile @@ -61,17 +61,17 @@ MODEL := $(model-y) # for the selected cpu. ONLY need to define this for the non-base member # of the family. # -cpuclass-$(CONFIG_M5206) := coldfire -cpuclass-$(CONFIG_M5206e) := coldfire -cpuclass-$(CONFIG_M520x) := coldfire -cpuclass-$(CONFIG_M523x) := coldfire -cpuclass-$(CONFIG_M5249) := coldfire -cpuclass-$(CONFIG_M527x) := coldfire -cpuclass-$(CONFIG_M5272) := coldfire -cpuclass-$(CONFIG_M528x) := coldfire -cpuclass-$(CONFIG_M5307) := coldfire -cpuclass-$(CONFIG_M532x) := coldfire -cpuclass-$(CONFIG_M5407) := coldfire +cpuclass-$(CONFIG_M5206) := 5307 +cpuclass-$(CONFIG_M5206e) := 5307 +cpuclass-$(CONFIG_M520x) := 5307 +cpuclass-$(CONFIG_M523x) := 5307 +cpuclass-$(CONFIG_M5249) := 5307 +cpuclass-$(CONFIG_M527x) := 5307 +cpuclass-$(CONFIG_M5272) := 5307 +cpuclass-$(CONFIG_M528x) := 5307 +cpuclass-$(CONFIG_M5307) := 5307 +cpuclass-$(CONFIG_M532x) := 5307 +cpuclass-$(CONFIG_M5407) := 5307 cpuclass-$(CONFIG_M68328) := 68328 cpuclass-$(CONFIG_M68EZ328) := 68328 cpuclass-$(CONFIG_M68VZ328) := 68328 diff --git a/trunk/arch/m68knommu/kernel/time.c b/trunk/arch/m68knommu/kernel/time.c index 89cdbcaeb45f..77e5375a2dd5 100644 --- a/trunk/arch/m68knommu/kernel/time.c +++ b/trunk/arch/m68knommu/kernel/time.c @@ -22,6 +22,7 @@ #include #include +#include #include #define TICK_SIZE (tick_nsec / 1000) @@ -65,6 +66,29 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) else last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ } +#ifdef CONFIG_HEARTBEAT + /* use power LED as a heartbeat instead -- much more useful + for debugging -- based on the version for PReP by Cort */ + /* acts like an actual heart beat -- ie thump-thump-pause... */ + if (mach_heartbeat) { + static unsigned cnt = 0, period = 0, dist = 0; + + if (cnt == 0 || cnt == dist) + mach_heartbeat( 1 ); + else if (cnt == 7 || cnt == dist+7) + mach_heartbeat( 0 ); + + if (++cnt > period) { + cnt = 0; + /* The hyperbolic function below modifies the heartbeat period + * length in dependency of the current (5min) load. It goes + * through the points f(0)=126, f(1)=86, f(5)=51, + * f(inf)->30. */ + period = ((672<= 1000000) { + usec -= 1000000; + sec++; + } + + tv->tv_sec = sec; + tv->tv_usec = usec; +} + +EXPORT_SYMBOL(do_gettimeofday); + +int do_settimeofday(struct timespec *tv) +{ + time_t wtm_sec, sec = tv->tv_sec; + long wtm_nsec, nsec = tv->tv_nsec; + + if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) + return -EINVAL; + + write_seqlock_irq(&xtime_lock); + /* + * This is revolting. We need to set the xtime.tv_usec + * correctly. However, the value in this location is + * is value at the last tick. + * Discover what correction gettimeofday + * would have done, and then undo it! + */ + nsec -= (hw_timer_offset() * 1000); + + wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); + wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); + + set_normalized_timespec(&xtime, sec, nsec); + set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); + + ntp_clear(); + write_sequnlock_irq(&xtime_lock); + clock_was_set(); + return 0; +} +EXPORT_SYMBOL(do_settimeofday); diff --git a/trunk/arch/m68knommu/platform/5206/config.c b/trunk/arch/m68knommu/platform/5206/config.c index 53a5920c2b71..b3c4dd4cc135 100644 --- a/trunk/arch/m68knommu/platform/5206/config.c +++ b/trunk/arch/m68knommu/platform/5206/config.c @@ -13,11 +13,12 @@ #include #include #include -#include +#include #include #include +#include #include -#include +#include /***************************************************************************/ @@ -25,51 +26,15 @@ void coldfire_reset(void); /***************************************************************************/ -static struct mcf_platform_uart m5206_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = 73, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = 74, - }, - { }, -}; - -static struct platform_device m5206_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m5206_uart_platform, -}; - -static struct platform_device *m5206_devices[] __initdata = { - &m5206_uart, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, + MCF_MBAR + MCFDMA_BASE1, }; -/***************************************************************************/ - -static void __init m5206_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_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); - } else if (line == 1) { - writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); - writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); - mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); - } -} - -static void __init m5206_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m5206_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m5206_uart_init_line(line, m5206_uart_platform[line].irq); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -109,21 +74,24 @@ void mcf_settimericr(unsigned int timer, unsigned int level) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +int mcf_timerirqpending(int timer) { - mcf_setimr(MCFSIM_IMR_MASKALL); - mach_reset = coldfire_reset; + unsigned int imr = 0; + + switch (timer) { + case 1: imr = MCFSIM_IMR_TIMER1; break; + case 2: imr = MCFSIM_IMR_TIMER2; break; + default: break; + } + return (mcf_getipr() & imr); } /***************************************************************************/ -static int __init init_BSP(void) +void config_BSP(char *commandp, int size) { - m5206_uarts_init(); - platform_add_devices(m5206_devices, ARRAY_SIZE(m5206_devices)); - return 0; + mcf_setimr(MCFSIM_IMR_MASKALL); + mach_reset = coldfire_reset; } -arch_initcall(init_BSP); - /***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/5206e/config.c b/trunk/arch/m68knommu/platform/5206e/config.c index a6692e958f6b..f84a4aea8cb6 100644 --- a/trunk/arch/m68knommu/platform/5206e/config.c +++ b/trunk/arch/m68knommu/platform/5206e/config.c @@ -10,9 +10,8 @@ #include #include -#include #include -#include +#include #include #include #include @@ -24,51 +23,15 @@ void coldfire_reset(void); /***************************************************************************/ -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, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, + MCF_MBAR + MCFDMA_BASE1, }; -/***************************************************************************/ - -static void __init m5206_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_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); - } else if (line == 1) { - writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); - writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); - mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); - } -} - -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); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -108,7 +71,21 @@ void mcf_settimericr(unsigned int timer, unsigned int level) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +int mcf_timerirqpending(int timer) +{ + unsigned int imr = 0; + + switch (timer) { + case 1: imr = MCFSIM_IMR_TIMER1; break; + case 2: imr = MCFSIM_IMR_TIMER2; break; + default: break; + } + return (mcf_getipr() & imr); +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) { mcf_setimr(MCFSIM_IMR_MASKALL); @@ -122,14 +99,3 @@ void __init config_BSP(char *commandp, int size) } /***************************************************************************/ - -static int __init init_BSP(void) -{ - m5206e_uarts_init(); - platform_add_devices(m5206e_devices, ARRAY_SIZE(m5206e_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/520x/config.c b/trunk/arch/m68knommu/platform/520x/config.c index 06d887cdcbfb..6edbd41261cc 100644 --- a/trunk/arch/m68knommu/platform/520x/config.c +++ b/trunk/arch/m68knommu/platform/520x/config.c @@ -5,7 +5,7 @@ * * Copyright (C) 2005, Freescale (www.freescale.com) * Copyright (C) 2005, Intec Automation (mike@steroidmicros.com) - * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) */ @@ -13,93 +13,21 @@ #include #include -#include #include -#include #include -#include -#include -#include +#include /***************************************************************************/ -void coldfire_reset(void); - -/***************************************************************************/ - -static struct mcf_platform_uart m520x_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = MCFINT_VECBASE + MCFINT_UART0, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = MCFINT_VECBASE + MCFINT_UART1, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE3, - .irq = MCFINT_VECBASE + MCFINT_UART2, - }, - { }, -}; - -static struct platform_device m520x_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m520x_uart_platform, -}; - -static struct platform_device *m520x_devices[] __initdata = { - &m520x_uart, -}; +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS]; +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ -#define INTC0 (MCF_MBAR + MCFICM_INTC0) - -static void __init m520x_uart_init_line(int line, int irq) -{ - u32 imr; - u16 par; - u8 par2; - - writeb(0x03, INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line); - - imr = readl(INTC0 + MCFINTC_IMRL); - imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1); - writel(imr, INTC0 + MCFINTC_IMRL); - - switch (line) { - case 0: - par = readw(MCF_IPSBAR + MCF_GPIO_PAR_UART); - par |= MCF_GPIO_PAR_UART_PAR_UTXD0 | - MCF_GPIO_PAR_UART_PAR_URXD0; - writew(par, MCF_IPSBAR + MCF_GPIO_PAR_UART); - break; - case 1: - par = readw(MCF_IPSBAR + MCF_GPIO_PAR_UART); - par |= MCF_GPIO_PAR_UART_PAR_UTXD1 | - MCF_GPIO_PAR_UART_PAR_URXD1; - writew(par, MCF_IPSBAR + MCF_GPIO_PAR_UART); - break; - case 2: - par2 = readb(MCF_IPSBAR + MCF_GPIO_PAR_FECI2C); - par2 &= ~0x0F; - par2 |= MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 | - MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2; - writeb(par2, MCF_IPSBAR + MCF_GPIO_PAR_FECI2C); - break; - } -} - -static void __init m520x_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m520x_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m520x_uart_init_line(line, m520x_uart_platform[line].irq); -} +void coldfire_reset(void); /***************************************************************************/ @@ -114,20 +42,9 @@ void mcf_autovector(unsigned int vec) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +void config_BSP(char *commandp, int size) { mach_reset = coldfire_reset; - m520x_uarts_init(); } /***************************************************************************/ - -static int __init init_BSP(void) -{ - platform_add_devices(m520x_devices, ARRAY_SIZE(m520x_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/523x/config.c b/trunk/arch/m68knommu/platform/523x/config.c index 13f02611ea23..e7f80c8e8636 100644 --- a/trunk/arch/m68knommu/platform/523x/config.c +++ b/trunk/arch/m68knommu/platform/523x/config.c @@ -16,11 +16,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include /***************************************************************************/ @@ -28,58 +28,14 @@ void coldfire_reset(void); /***************************************************************************/ -static struct mcf_platform_uart m523x_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = MCFINT_VECBASE + MCFINT_UART0, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = MCFINT_VECBASE + MCFINT_UART0 + 1, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE3, - .irq = MCFINT_VECBASE + MCFINT_UART0 + 2, - }, - { }, -}; - -static struct platform_device m523x_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m523x_uart_platform, -}; - -static struct platform_device *m523x_devices[] __initdata = { - &m523x_uart, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, }; -/***************************************************************************/ - -#define INTC0 (MCF_MBAR + MCFICM_INTC0) - -static void __init m523x_uart_init_line(int line, int irq) -{ - u32 imr; - - if ((line < 0) || (line > 2)) - return; - - writeb(0x30+line, (INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line)); - - imr = readl(INTC0 + MCFINTC_IMRL); - imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1); - writel(imr, INTC0 + MCFINTC_IMRL); -} - -static void __init m523x_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m523x_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m523x_uart_init_line(line, m523x_uart_platform[line].irq); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -93,26 +49,15 @@ void mcf_disableall(void) void mcf_autovector(unsigned int vec) { - /* Everything is auto-vectored on the 523x */ + /* Everything is auto-vectored on the 5272 */ } /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +void config_BSP(char *commandp, int size) { mcf_disableall(); mach_reset = coldfire_reset; - m523x_uarts_init(); } /***************************************************************************/ - -static int __init init_BSP(void) -{ - platform_add_devices(m523x_devices, ARRAY_SIZE(m523x_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/5249/config.c b/trunk/arch/m68knommu/platform/5249/config.c index d299f7b8768a..d4d39435cb15 100644 --- a/trunk/arch/m68knommu/platform/5249/config.c +++ b/trunk/arch/m68knommu/platform/5249/config.c @@ -12,11 +12,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include /***************************************************************************/ @@ -24,51 +24,17 @@ void coldfire_reset(void); /***************************************************************************/ -static struct mcf_platform_uart m5249_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = 73, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = 74, - } -}; - -static struct platform_device m5249_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m5249_uart_platform, -}; - -static struct platform_device *m5249_devices[] __initdata = { - &m5249_uart, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, + MCF_MBAR + MCFDMA_BASE1, + MCF_MBAR + MCFDMA_BASE2, + MCF_MBAR + MCFDMA_BASE3, }; -/***************************************************************************/ - -static void __init m5249_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_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); - } else if (line == 1) { - writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); - writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); - mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); - } -} - -static void __init m5249_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m5249_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m5249_uart_init_line(line, m5249_uart_platform[line].irq); -} - +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -105,21 +71,24 @@ void mcf_settimericr(unsigned int timer, unsigned int level) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +int mcf_timerirqpending(int timer) { - mcf_setimr(MCFSIM_IMR_MASKALL); - mach_reset = coldfire_reset; + unsigned int imr = 0; + + switch (timer) { + case 1: imr = MCFSIM_IMR_TIMER1; break; + case 2: imr = MCFSIM_IMR_TIMER2; break; + default: break; + } + return (mcf_getipr() & imr); } /***************************************************************************/ -static int __init init_BSP(void) +void config_BSP(char *commandp, int size) { - m5249_uarts_init(); - platform_add_devices(m5249_devices, ARRAY_SIZE(m5249_devices)); - return 0; + mcf_setimr(MCFSIM_IMR_MASKALL); + mach_reset = coldfire_reset; } -arch_initcall(init_BSP); - /***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/5272/config.c b/trunk/arch/m68knommu/platform/5272/config.c index 2aca599a1ca7..634a6375e4a5 100644 --- a/trunk/arch/m68knommu/platform/5272/config.c +++ b/trunk/arch/m68knommu/platform/5272/config.c @@ -13,11 +13,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include /***************************************************************************/ @@ -37,57 +37,14 @@ unsigned char ledbank = 0xff; /***************************************************************************/ -static struct mcf_platform_uart m5272_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = 73, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = 74, - }, - { }, -}; - -static struct platform_device m5272_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m5272_uart_platform, -}; - -static struct platform_device *m5272_devices[] __initdata = { - &m5272_uart, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, }; -/***************************************************************************/ - -static void __init m5272_uart_init_line(int line, int irq) -{ - u32 v; - - if ((line >= 0) && (line < 2)) { - v = (line) ? 0x0e000000 : 0xe0000000; - writel(v, MCF_MBAR + MCFSIM_ICR2); - - /* Enable the output lines for the serial ports */ - v = readl(MCF_MBAR + MCFSIM_PBCNT); - v = (v & ~0x000000ff) | 0x00000055; - writel(v, MCF_MBAR + MCFSIM_PBCNT); - - v = readl(MCF_MBAR + MCFSIM_PDCNT); - v = (v & ~0x000003fc) | 0x000002a8; - writel(v, MCF_MBAR + MCFSIM_PDCNT); - } -} - -static void __init m5272_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m5272_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m5272_uart_init_line(line, m5272_uart_platform[line].irq); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -123,7 +80,20 @@ void mcf_settimericr(int timer, int level) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +int mcf_timerirqpending(int timer) +{ + volatile unsigned long *icrp; + + if ((timer >= 1 ) && (timer <= 4)) { + icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); + return (*icrp & (0x8 << ((4 - timer) * 4))); + } + return 0; +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) { #if defined (CONFIG_MOD5272) volatile unsigned char *pivrp; @@ -155,14 +125,3 @@ void __init config_BSP(char *commandp, int size) } /***************************************************************************/ - -static int __init init_BSP(void) -{ - m5272_uarts_init(); - platform_add_devices(m5272_devices, ARRAY_SIZE(m5272_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/527x/config.c b/trunk/arch/m68knommu/platform/527x/config.c index 73cd1aef4a90..9cbfbc68ae4f 100644 --- a/trunk/arch/m68knommu/platform/527x/config.c +++ b/trunk/arch/m68knommu/platform/527x/config.c @@ -16,11 +16,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include /***************************************************************************/ @@ -28,72 +28,14 @@ void coldfire_reset(void); /***************************************************************************/ -static struct mcf_platform_uart m527x_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = MCFINT_VECBASE + MCFINT_UART0, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = MCFINT_VECBASE + MCFINT_UART1, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE3, - .irq = MCFINT_VECBASE + MCFINT_UART2, - }, - { }, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, }; -static struct platform_device m527x_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m527x_uart_platform, -}; - -static struct platform_device *m527x_devices[] __initdata = { - &m527x_uart, -}; - -/***************************************************************************/ - -#define INTC0 (MCF_MBAR + MCFICM_INTC0) - -static void __init m527x_uart_init_line(int line, int irq) -{ - u16 sepmask; - u32 imr; - - if ((line < 0) || (line > 2)) - return; - - /* level 6, line based priority */ - writeb(0x30+line, INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line); - - imr = readl(INTC0 + MCFINTC_IMRL); - imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1); - writel(imr, INTC0 + MCFINTC_IMRL); - - /* - * External Pin Mask Setting & Enable External Pin for Interface - */ - sepmask = readw(MCF_IPSBAR + MCF_GPIO_PAR_UART); - if (line == 0) - sepmask |= UART0_ENABLE_MASK; - else if (line == 1) - sepmask |= UART1_ENABLE_MASK; - else if (line == 2) - sepmask |= UART2_ENABLE_MASK; - writew(sepmask, MCF_IPSBAR + MCF_GPIO_PAR_UART); -} - -static void __init m527x_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m527x_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m527x_uart_init_line(line, m527x_uart_platform[line].irq); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -112,21 +54,10 @@ void mcf_autovector(unsigned int vec) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +void config_BSP(char *commandp, int size) { mcf_disableall(); mach_reset = coldfire_reset; } /***************************************************************************/ - -static int __init init_BSP(void) -{ - m527x_uarts_init(); - platform_add_devices(m527x_devices, ARRAY_SIZE(m527x_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/528x/config.c b/trunk/arch/m68knommu/platform/528x/config.c index 036e1b73d944..acbd43486d97 100644 --- a/trunk/arch/m68knommu/platform/528x/config.c +++ b/trunk/arch/m68knommu/platform/528x/config.c @@ -16,15 +16,11 @@ #include #include #include -#include -#include -#include -#include +#include #include #include #include -#include -#include +#include /***************************************************************************/ @@ -32,67 +28,14 @@ void coldfire_reset(void); /***************************************************************************/ -static struct mcf_platform_uart m528x_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = MCFINT_VECBASE + MCFINT_UART0, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = MCFINT_VECBASE + MCFINT_UART0 + 1, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE3, - .irq = MCFINT_VECBASE + MCFINT_UART0 + 2, - }, - { }, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, }; -static struct platform_device m528x_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m528x_uart_platform, -}; - -static struct platform_device *m528x_devices[] __initdata = { - &m528x_uart, -}; - -/***************************************************************************/ - -#define INTC0 (MCF_MBAR + MCFICM_INTC0) - -static void __init m528x_uart_init_line(int line, int irq) -{ - u8 port; - u32 imr; - - if ((line < 0) || (line > 2)) - return; - - /* level 6, line based priority */ - writeb(0x30+line, INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line); - - imr = readl(INTC0 + MCFINTC_IMRL); - imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1); - writel(imr, INTC0 + MCFINTC_IMRL); - - /* make sure PUAPAR is set for UART0 and UART1 */ - if (line < 2) { - port = readb(MCF_MBAR + MCF5282_GPIO_PUAPAR); - port |= (0x03 << (line * 2)); - writeb(port, MCF_MBAR + MCF5282_GPIO_PUAPAR); - } -} - -static void __init m528x_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m528x_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m528x_uart_init_line(line, m528x_uart_platform[line].irq); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -111,21 +54,10 @@ void mcf_autovector(unsigned int vec) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +void config_BSP(char *commandp, int size) { mcf_disableall(); mach_reset = coldfire_reset; } /***************************************************************************/ - -static int __init init_BSP(void) -{ - m528x_uarts_init(); - platform_add_devices(m528x_devices, ARRAY_SIZE(m528x_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/5307/Makefile b/trunk/arch/m68knommu/platform/5307/Makefile index 580fd6658d7c..5b600530c8d2 100644 --- a/trunk/arch/m68knommu/platform/5307/Makefile +++ b/trunk/arch/m68knommu/platform/5307/Makefile @@ -16,5 +16,17 @@ ifdef CONFIG_FULLDEBUG EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 endif -obj-y += config.o +obj-$(CONFIG_COLDFIRE) += entry.o vectors.o +obj-$(CONFIG_M5206) += timers.o +obj-$(CONFIG_M5206e) += timers.o +obj-$(CONFIG_M520x) += pit.o +obj-$(CONFIG_M523x) += pit.o +obj-$(CONFIG_M5249) += timers.o +obj-$(CONFIG_M527x) += pit.o +obj-$(CONFIG_M5272) += timers.o +obj-$(CONFIG_M5307) += config.o timers.o +obj-$(CONFIG_M532x) += timers.o +obj-$(CONFIG_M528x) += pit.o +obj-$(CONFIG_M5407) += timers.o +extra-y := head.o diff --git a/trunk/arch/m68knommu/platform/5307/config.c b/trunk/arch/m68knommu/platform/5307/config.c index 92dc862fa826..6040821e637d 100644 --- a/trunk/arch/m68knommu/platform/5307/config.c +++ b/trunk/arch/m68knommu/platform/5307/config.c @@ -13,11 +13,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include /***************************************************************************/ @@ -38,51 +38,17 @@ unsigned char ledbank = 0xff; /***************************************************************************/ -static struct mcf_platform_uart m5307_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = 73, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = 74, - }, - { }, -}; - -static struct platform_device m5307_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m5307_uart_platform, -}; - -static struct platform_device *m5307_devices[] __initdata = { - &m5307_uart, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, + MCF_MBAR + MCFDMA_BASE1, + MCF_MBAR + MCFDMA_BASE2, + MCF_MBAR + MCFDMA_BASE3, }; -/***************************************************************************/ - -static void __init m5307_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_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); - } else if (line == 1) { - writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); - writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); - mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); - } -} - -static void __init m5307_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m5307_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m5307_uart_init_line(line, m5307_uart_platform[line].irq); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -119,7 +85,21 @@ void mcf_settimericr(unsigned int timer, unsigned int level) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +int mcf_timerirqpending(int timer) +{ + unsigned int imr = 0; + + switch (timer) { + case 1: imr = MCFSIM_IMR_TIMER1; break; + case 2: imr = MCFSIM_IMR_TIMER2; break; + default: break; + } + return (mcf_getipr() & imr); +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) { mcf_setimr(MCFSIM_IMR_MASKALL); @@ -137,7 +117,7 @@ void __init config_BSP(char *commandp, int size) mach_reset = coldfire_reset; -#ifdef CONFIG_BDM_DISABLE +#ifdef MCF_BDM_DISABLE /* * Disable the BDM clocking. This also turns off most of the rest of * the BDM device. This is good for EMC reasons. This option is not @@ -148,14 +128,3 @@ void __init config_BSP(char *commandp, int size) } /***************************************************************************/ - -static int __init init_BSP(void) -{ - m5307_uarts_init(); - platform_add_devices(m5307_devices, ARRAY_SIZE(m5307_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/coldfire/entry.S b/trunk/arch/m68knommu/platform/5307/entry.S similarity index 100% rename from trunk/arch/m68knommu/platform/coldfire/entry.S rename to trunk/arch/m68knommu/platform/5307/entry.S diff --git a/trunk/arch/m68knommu/platform/coldfire/head.S b/trunk/arch/m68knommu/platform/5307/head.S similarity index 100% rename from trunk/arch/m68knommu/platform/coldfire/head.S rename to trunk/arch/m68knommu/platform/5307/head.S diff --git a/trunk/arch/m68knommu/platform/coldfire/pit.c b/trunk/arch/m68knommu/platform/5307/pit.c similarity index 53% rename from trunk/arch/m68knommu/platform/coldfire/pit.c rename to trunk/arch/m68knommu/platform/5307/pit.c index 4290638012e0..173b754d1cda 100644 --- a/trunk/arch/m68knommu/platform/coldfire/pit.c +++ b/trunk/arch/m68knommu/platform/5307/pit.c @@ -3,10 +3,9 @@ /* * pit.c -- Freescale ColdFire PIT timer. Currently this type of * hardware timer only exists in the Freescale ColdFire - * 5270/5271, 5282 and 5208 CPUs. No doubt newer ColdFire - * family members will probably use it too. + * 5270/5271, 5282 and other CPUs. * - * Copyright (C) 1999-2008, Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com) * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) */ @@ -18,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -30,84 +28,70 @@ /* * By default use timer1 as the system clock timer. */ -#define FREQ ((MCF_CLK / 2) / 64) #define TA(a) (MCF_IPSBAR + MCFPIT_BASE1 + (a)) -#define INTC0 (MCF_IPSBAR + MCFICM_INTC0) - -static u32 pit_cycles_per_jiffy; -static u32 pit_cnt; /***************************************************************************/ -static irqreturn_t pit_tick(int irq, void *dummy) +static irqreturn_t hw_tick(int irq, void *dummy) { - u16 pcsr; + unsigned short pcsr; /* Reset the ColdFire timer */ pcsr = __raw_readw(TA(MCFPIT_PCSR)); __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); - pit_cnt += pit_cycles_per_jiffy; return arch_timer_interrupt(irq, dummy); } /***************************************************************************/ -static struct irqaction pit_irq = { +static struct irqaction coldfire_pit_irq = { .name = "timer", .flags = IRQF_DISABLED | IRQF_TIMER, - .handler = pit_tick, + .handler = hw_tick, }; -/***************************************************************************/ - -static cycle_t pit_read_clk(void) +void hw_timer_init(void) { - unsigned long flags; - u32 cycles; - u16 pcntr; + volatile unsigned char *icrp; + volatile unsigned long *imrp; - local_irq_save(flags); - pcntr = __raw_readw(TA(MCFPIT_PCNTR)); - cycles = pit_cnt; - local_irq_restore(flags); + setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq); - return cycles + pit_cycles_per_jiffy - pcntr; -} + icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + + MCFINTC_ICR0 + MCFINT_PIT1); + *icrp = ICR_INTRCONF; -/***************************************************************************/ + imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR); + *imrp &= ~MCFPIT_IMR_IBIT; -static struct clocksource pit_clk = { - .name = "pit", - .rating = 250, - .read = pit_read_clk, - .shift = 20, - .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; + /* Set up PIT timer 1 as poll clock */ + __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); + __raw_writew(((MCF_CLK / 2) / 64) / HZ, TA(MCFPIT_PMR)); + __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW | + MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR)); +} /***************************************************************************/ -void hw_timer_init(void) +unsigned long hw_timer_offset(void) { - u32 imr; - - setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); + volatile unsigned long *ipr; + unsigned long pmr, pcntr, offset; - __raw_writeb(ICR_INTRCONF, INTC0 + MCFINTC_ICR0 + MCFINT_PIT1); - imr = __raw_readl(INTC0 + MCFPIT_IMR); - imr &= ~MCFPIT_IMR_IBIT; - __raw_writel(imr, INTC0 + MCFPIT_IMR); + ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR); - /* Set up PIT timer 1 as poll clock */ - pit_cycles_per_jiffy = FREQ / HZ; - __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); - __raw_writew(pit_cycles_per_jiffy, TA(MCFPIT_PMR)); - __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW | - MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR)); + pmr = __raw_readw(TA(MCFPIT_PMR)); + pcntr = __raw_readw(TA(MCFPIT_PCNTR)); - pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift); - clocksource_register(&pit_clk); + /* + * If we are still in the first half of the upcount and a + * timer interrupt is pending, then add on a ticks worth of time. + */ + offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; + if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT)) + offset += 1000000 / HZ; + return offset; } /***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/coldfire/timers.c b/trunk/arch/m68knommu/platform/5307/timers.c similarity index 77% rename from trunk/arch/m68knommu/platform/coldfire/timers.c rename to trunk/arch/m68knommu/platform/5307/timers.c index a60213e877ef..489dec85c859 100644 --- a/trunk/arch/m68knommu/platform/coldfire/timers.c +++ b/trunk/arch/m68knommu/platform/5307/timers.c @@ -3,7 +3,7 @@ /* * timers.c -- generic ColdFire hardware timer support. * - * Copyright (C) 1999-2008, Greg Ungerer + * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com) */ /***************************************************************************/ @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include @@ -27,7 +25,6 @@ /* * By default use timer1 as the system clock timer. */ -#define FREQ (MCF_BUSCLK / 16) #define TA(a) (MCF_MBAR + MCFTIMER_BASE1 + (a)) /* @@ -44,7 +41,7 @@ unsigned int mcf_timerlevel = 5; * Unfortunately it is a little different on each ColdFire. */ extern void mcf_settimericr(int timer, int level); -void coldfire_profile_init(void); +extern int mcf_timerirqpending(int timer); #if defined(CONFIG_M532x) #define __raw_readtrr __raw_readl @@ -54,70 +51,38 @@ void coldfire_profile_init(void); #define __raw_writetrr __raw_writew #endif -static u32 mcftmr_cycles_per_jiffy; -static u32 mcftmr_cnt; - /***************************************************************************/ -static irqreturn_t mcftmr_tick(int irq, void *dummy) +static irqreturn_t hw_tick(int irq, void *dummy) { /* Reset the ColdFire timer */ __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER)); - mcftmr_cnt += mcftmr_cycles_per_jiffy; return arch_timer_interrupt(irq, dummy); } /***************************************************************************/ -static struct irqaction mcftmr_timer_irq = { +static struct irqaction coldfire_timer_irq = { .name = "timer", .flags = IRQF_DISABLED | IRQF_TIMER, - .handler = mcftmr_tick, + .handler = hw_tick, }; /***************************************************************************/ -static cycle_t mcftmr_read_clk(void) -{ - unsigned long flags; - u32 cycles; - u16 tcn; - - local_irq_save(flags); - tcn = __raw_readw(TA(MCFTIMER_TCN)); - cycles = mcftmr_cnt; - local_irq_restore(flags); - - return cycles + tcn; -} - -/***************************************************************************/ - -static struct clocksource mcftmr_clk = { - .name = "tmr", - .rating = 250, - .read = mcftmr_read_clk, - .shift = 20, - .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - -/***************************************************************************/ +static int ticks_per_intr; void hw_timer_init(void) { - setup_irq(mcf_timervector, &mcftmr_timer_irq); + setup_irq(mcf_timervector, &coldfire_timer_irq); __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); - mcftmr_cycles_per_jiffy = FREQ / HZ; - __raw_writetrr(mcftmr_cycles_per_jiffy, TA(MCFTIMER_TRR)); + ticks_per_intr = (MCF_BUSCLK / 16) / HZ; + __raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR)); __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); - mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift); - clocksource_register(&mcftmr_clk); - mcf_settimericr(1, mcf_timerlevel); #ifdef CONFIG_HIGHPROFILE @@ -125,6 +90,21 @@ void hw_timer_init(void) #endif } +/***************************************************************************/ + +unsigned long hw_timer_offset(void) +{ + unsigned long tcn, offset; + + tcn = __raw_readw(TA(MCFTIMER_TCN)); + offset = ((tcn + 1) * (1000000 / HZ)) / ticks_per_intr; + + /* Check if we just wrapped the counters and maybe missed a tick */ + if ((offset < (1000000 / HZ / 2)) && mcf_timerirqpending(1)) + offset += 1000000 / HZ; + return offset; +} + /***************************************************************************/ #ifdef CONFIG_HIGHPROFILE /***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/coldfire/vectors.c b/trunk/arch/m68knommu/platform/5307/vectors.c similarity index 100% rename from trunk/arch/m68knommu/platform/coldfire/vectors.c rename to trunk/arch/m68knommu/platform/5307/vectors.c diff --git a/trunk/arch/m68knommu/platform/532x/config.c b/trunk/arch/m68knommu/platform/532x/config.c index 4f44b632045b..f77328b7b6db 100644 --- a/trunk/arch/m68knommu/platform/532x/config.c +++ b/trunk/arch/m68knommu/platform/532x/config.c @@ -21,11 +21,10 @@ #include #include #include -#include +#include #include #include #include -#include #include #include @@ -39,60 +38,11 @@ extern unsigned int mcf_timerlevel; /***************************************************************************/ -static struct mcf_platform_uart m532x_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = MCFINT_VECBASE + MCFINT_UART0, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = MCFINT_VECBASE + MCFINT_UART1, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE3, - .irq = MCFINT_VECBASE + MCFINT_UART2, - }, - { }, -}; - -static struct platform_device m532x_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m532x_uart_platform, -}; - -static struct platform_device *m532x_devices[] __initdata = { - &m532x_uart, -}; - -/***************************************************************************/ - -static void __init m532x_uart_init_line(int line, int irq) -{ - if (line == 0) { - MCF_INTC0_ICR26 = 0x3; - MCF_INTC0_CIMR = 26; - /* GPIO initialization */ - MCF_GPIO_PAR_UART |= 0x000F; - } else if (line == 1) { - MCF_INTC0_ICR27 = 0x3; - MCF_INTC0_CIMR = 27; - /* GPIO initialization */ - MCF_GPIO_PAR_UART |= 0x0FF0; - } else if (line == 2) { - MCF_INTC0_ICR28 = 0x3; - MCF_INTC0_CIMR = 28; - } -} - -static void __init m532x_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m532x_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m532x_uart_init_line(line, m532x_uart_platform[line].irq); -} +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { }; +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -116,7 +66,21 @@ void mcf_settimericr(unsigned int timer, unsigned int level) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +int mcf_timerirqpending(int timer) +{ + unsigned int imr = 0; + + switch (timer) { + case 1: imr = 0x1; break; + case 2: imr = 0x2; break; + default: break; + } + return (mcf_getiprh() & imr); +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) { mcf_setimr(MCFSIM_IMR_MASKALL); @@ -135,7 +99,7 @@ void __init config_BSP(char *commandp, int size) mcf_profilevector = 64+33; mach_reset = coldfire_reset; -#ifdef CONFIG_BDM_DISABLE +#ifdef MCF_BDM_DISABLE /* * Disable the BDM clocking. This also turns off most of the rest of * the BDM device. This is good for EMC reasons. This option is not @@ -145,20 +109,10 @@ void __init config_BSP(char *commandp, int size) #endif } -/***************************************************************************/ - -static int __init init_BSP(void) -{ - m532x_uarts_init(); - platform_add_devices(m532x_devices, ARRAY_SIZE(m532x_devices)); - return 0; -} - -arch_initcall(init_BSP); - /***************************************************************************/ /* Board initialization */ -/***************************************************************************/ + +/********************************************************************/ /* * PLL min/max specifications */ diff --git a/trunk/arch/m68knommu/platform/5407/config.c b/trunk/arch/m68knommu/platform/5407/config.c index 648b8b778211..2d3b62eba7ca 100644 --- a/trunk/arch/m68knommu/platform/5407/config.c +++ b/trunk/arch/m68knommu/platform/5407/config.c @@ -13,11 +13,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include /***************************************************************************/ @@ -29,51 +29,17 @@ extern unsigned int mcf_timerlevel; /***************************************************************************/ -static struct mcf_platform_uart m5407_uart_platform[] = { - { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = 73, - }, - { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = 74, - }, - { }, -}; - -static struct platform_device m5407_uart = { - .name = "mcfuart", - .id = 0, - .dev.platform_data = m5407_uart_platform, -}; - -static struct platform_device *m5407_devices[] __initdata = { - &m5407_uart, +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, + MCF_MBAR + MCFDMA_BASE1, + MCF_MBAR + MCFDMA_BASE2, + MCF_MBAR + MCFDMA_BASE3, }; -/***************************************************************************/ - -static void __init m5407_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_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); - } else if (line == 1) { - writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); - writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); - mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); - } -} - -static void __init m5407_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m5407_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m5407_uart_init_line(line, m5407_uart_platform[line].irq); -} +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ @@ -110,7 +76,21 @@ void mcf_settimericr(unsigned int timer, unsigned int level) /***************************************************************************/ -void __init config_BSP(char *commandp, int size) +int mcf_timerirqpending(int timer) +{ + unsigned int imr = 0; + + switch (timer) { + case 1: imr = MCFSIM_IMR_TIMER1; break; + case 2: imr = MCFSIM_IMR_TIMER2; break; + default: break; + } + return (mcf_getipr() & imr); +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) { mcf_setimr(MCFSIM_IMR_MASKALL); @@ -125,14 +105,3 @@ void __init config_BSP(char *commandp, int size) } /***************************************************************************/ - -static int __init init_BSP(void) -{ - m5407_uarts_init(); - platform_add_devices(m5407_devices, ARRAY_SIZE(m5407_devices)); - return 0; -} - -arch_initcall(init_BSP); - -/***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/68328/timers.c b/trunk/arch/m68knommu/platform/68328/timers.c index 9159fd05c9ac..04cbc661d4bd 100644 --- a/trunk/arch/m68knommu/platform/68328/timers.c +++ b/trunk/arch/m68knommu/platform/68328/timers.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -52,19 +51,6 @@ #define TICKS_PER_JIFFY 10 #endif -static u32 m68328_tick_cnt; - -/***************************************************************************/ - -static irqreturn_t hw_tick(int irq, void *dummy) -{ - /* Reset Timer1 */ - TSTAT &= 0; - - m68328_tick_cnt += TICKS_PER_JIFFY; - return arch_timer_interrupt(irq, dummy); -} - /***************************************************************************/ static irqreturn_t hw_tick(int irq, void *dummy) @@ -83,33 +69,6 @@ static struct irqaction m68328_timer_irq = { .handler = hw_tick, }; -/***************************************************************************/ - -static cycle_t m68328_read_clk(void) -{ - unsigned long flags; - u32 cycles; - - local_irq_save(flags); - cycles = m68328_tick_cnt + TCN; - local_irq_restore(flags); - - return cycles; -} - -/***************************************************************************/ - -static struct clocksource m68328_clk = { - .name = "timer", - .rating = 250, - .read = m68328_read_clk, - .shift = 20, - .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - -/***************************************************************************/ - void hw_timer_init(void) { /* disable timer 1 */ @@ -125,8 +84,19 @@ void hw_timer_init(void) /* Enable timer 1 */ TCTL |= TCTL_TEN; - m68328_clk.mult = clocksource_hz2mult(TICKS_PER_JIFFY*HZ, m68328_clk.shift); - clocksource_register(&m68328_clk); +} + +/***************************************************************************/ + +unsigned long hw_timer_offset(void) +{ + unsigned long ticks = TCN, offset = 0; + + /* check for pending interrupt */ + if (ticks < (TICKS_PER_JIFFY >> 1) && (ISR & (1 << TMR_IRQ_NUM))) + offset = 1000000 / HZ; + ticks = (ticks * 1000000 / HZ) / TICKS_PER_JIFFY; + return ticks + offset; } /***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/68360/config.c b/trunk/arch/m68knommu/platform/68360/config.c index ac629fa30099..2b3196af811f 100644 --- a/trunk/arch/m68knommu/platform/68360/config.c +++ b/trunk/arch/m68knommu/platform/68360/config.c @@ -103,6 +103,11 @@ void hw_timer_init(void) pquicc->timer_tgcr = tgcr_save; } +unsigned long hw_timer_offset(void) +{ + return 0; +} + void BSP_gettod (int *yearp, int *monp, int *dayp, int *hourp, int *minp, int *secp) { diff --git a/trunk/arch/m68knommu/platform/coldfire/Makefile b/trunk/arch/m68knommu/platform/coldfire/Makefile deleted file mode 100644 index e5fff297ae01..000000000000 --- a/trunk/arch/m68knommu/platform/coldfire/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# -# Makefile for the m68knommu 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: -# -# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT -# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT -# - -ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 -endif - -obj-$(CONFIG_COLDFIRE) += dma.o entry.o vectors.o -obj-$(CONFIG_M5206) += timers.o -obj-$(CONFIG_M5206e) += timers.o -obj-$(CONFIG_M520x) += pit.o -obj-$(CONFIG_M523x) += pit.o -obj-$(CONFIG_M5249) += timers.o -obj-$(CONFIG_M527x) += pit.o -obj-$(CONFIG_M5272) += timers.o -obj-$(CONFIG_M528x) += pit.o -obj-$(CONFIG_M5307) += timers.o -obj-$(CONFIG_M532x) += timers.o -obj-$(CONFIG_M5407) += timers.o - -extra-y := head.o diff --git a/trunk/arch/m68knommu/platform/coldfire/dma.c b/trunk/arch/m68knommu/platform/coldfire/dma.c deleted file mode 100644 index 2b30cf1b8f77..000000000000 --- a/trunk/arch/m68knommu/platform/coldfire/dma.c +++ /dev/null @@ -1,39 +0,0 @@ -/***************************************************************************/ - -/* - * dma.c -- Freescale ColdFire DMA support - * - * Copyright (C) 2007, Greg Ungerer (gerg@snapgear.com) - */ - -/***************************************************************************/ - -#include -#include -#include -#include -#include - -/***************************************************************************/ - -/* - * DMA channel base address table. - */ -unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { -#ifdef MCFDMA_BASE0 - MCF_MBAR + MCFDMA_BASE0, -#endif -#ifdef MCFDMA_BASE1 - MCF_MBAR + MCFDMA_BASE1, -#endif -#ifdef MCFDMA_BASE2 - MCF_MBAR + MCFDMA_BASE2, -#endif -#ifdef MCFDMA_BASE3 - MCF_MBAR + MCFDMA_BASE3, -#endif -}; - -unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; - -/***************************************************************************/ diff --git a/trunk/arch/powerpc/platforms/pasemi/iommu.c b/trunk/arch/powerpc/platforms/pasemi/iommu.c index 5803f11c77fc..c5cfd4b04a83 100644 --- a/trunk/arch/powerpc/platforms/pasemi/iommu.c +++ b/trunk/arch/powerpc/platforms/pasemi/iommu.c @@ -184,7 +184,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev) if (dev->vendor == 0x1959 && dev->device == 0xa007 && !firmware_has_feature(FW_FEATURE_LPAR)) { dev->dev.archdata.dma_ops = &dma_direct_ops; - return; + dev->dev.archdata.dma_data = 0; } #endif diff --git a/trunk/drivers/net/dl2k.h b/trunk/drivers/net/dl2k.h index 266ec8777ca8..d66c605b4075 100644 --- a/trunk/drivers/net/dl2k.h +++ b/trunk/drivers/net/dl2k.h @@ -388,8 +388,8 @@ enum _mii_mssr { MII_MSSR_CFG_RES = 0x4000, MII_MSSR_LOCAL_RCV_STATUS = 0x2000, MII_MSSR_REMOTE_RCVR = 0x1000, - MII_MSSR_LP_1000BT_FD = 0x0800, - MII_MSSR_LP_1000BT_HD = 0x0400, + MII_MSSR_LP_1000BT_HD = 0x0800, + MII_MSSR_LP_1000BT_FD = 0x0400, MII_MSSR_IDLE_ERR_COUNT = 0x00ff, }; diff --git a/trunk/drivers/net/wireless/rt2x00/rt61pci.c b/trunk/drivers/net/wireless/rt2x00/rt61pci.c index ab52f221cd71..b31f0c26c32b 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt61pci.c +++ b/trunk/drivers/net/wireless/rt2x00/rt61pci.c @@ -1736,7 +1736,8 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev) WARNING(rt2x00dev, "TX status report missed for entry %p\n", entry_done); - rt2x00lib_txdone(entry_done, TX_FAIL_OTHER, 0); + rt2x00pci_txdone(rt2x00dev, entry_done, TX_FAIL_OTHER, + 0); entry_done = rt2x00_get_data_entry_done(ring); } diff --git a/trunk/drivers/serial/68328serial.c b/trunk/drivers/serial/68328serial.c index 0d99120ab5a2..aad4012bbb30 100644 --- a/trunk/drivers/serial/68328serial.c +++ b/trunk/drivers/serial/68328serial.c @@ -1410,7 +1410,7 @@ rs68328_init(void) if (request_irq(uart_irqs[i], rs_interrupt, - IRQF_DISABLED, + IRQ_FLG_STD, "M68328_UART", NULL)) panic("Unable to attach 68328 serial interrupt\n"); } diff --git a/trunk/drivers/serial/Kconfig b/trunk/drivers/serial/Kconfig index 8a053ea21e1d..d962b74e3114 100644 --- a/trunk/drivers/serial/Kconfig +++ b/trunk/drivers/serial/Kconfig @@ -960,30 +960,6 @@ config SERIAL_COLDFIRE This driver supports the built-in serial ports of the Motorola ColdFire family of CPUs. -config SERIAL_MCF - bool "Coldfire serial support (new style driver)" - depends on COLDFIRE - select SERIAL_CORE - help - This new serial driver supports the Freescale Coldfire serial ports - using the new serial driver subsystem. - -config SERIAL_MCF_BAUDRATE - int "Default baudrate for Coldfire serial ports" - depends on SERIAL_MCF - default 19200 - help - This setting lets you define what the default baudrate is for the - ColdFire serial ports. The usual default varies from board to board, - and this setting is a way of catering for that. - -config SERIAL_MCF_CONSOLE - bool "Coldfire serial console support" - depends on SERIAL_MCF - select SERIAL_CORE_CONSOLE - help - Enable a ColdFire internal serial port to be the system console. - config SERIAL_68360_SMC bool "68360 SMC uart support" depends on M68360 diff --git a/trunk/drivers/serial/Makefile b/trunk/drivers/serial/Makefile index 2dd41b4cc8db..7eb45534778e 100644 --- a/trunk/drivers/serial/Makefile +++ b/trunk/drivers/serial/Makefile @@ -39,7 +39,6 @@ obj-$(CONFIG_SERIAL_MUX) += mux.o obj-$(CONFIG_SERIAL_68328) += 68328serial.o obj-$(CONFIG_SERIAL_68360) += 68360serial.o obj-$(CONFIG_SERIAL_COLDFIRE) += mcfserial.o -obj-$(CONFIG_SERIAL_MCF) += mcf.o obj-$(CONFIG_V850E_UART) += v850e_uart.o obj-$(CONFIG_SERIAL_PMACZILOG) += pmac_zilog.o obj-$(CONFIG_SERIAL_LH7A40X) += serial_lh7a40x.o diff --git a/trunk/drivers/serial/mcf.c b/trunk/drivers/serial/mcf.c index 051fcc2f5ba8..a7d4360ea7df 100644 --- a/trunk/drivers/serial/mcf.c +++ b/trunk/drivers/serial/mcf.c @@ -69,7 +69,7 @@ static unsigned int mcf_tx_empty(struct uart_port *port) static unsigned int mcf_get_mctrl(struct uart_port *port) { - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned long flags; unsigned int sigs; @@ -87,7 +87,7 @@ static unsigned int mcf_get_mctrl(struct uart_port *port) static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs) { - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned long flags; spin_lock_irqsave(&port->lock, flags); @@ -104,7 +104,7 @@ static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs) static void mcf_start_tx(struct uart_port *port) { - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned long flags; spin_lock_irqsave(&port->lock, flags); @@ -117,7 +117,7 @@ static void mcf_start_tx(struct uart_port *port) static void mcf_stop_tx(struct uart_port *port) { - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned long flags; spin_lock_irqsave(&port->lock, flags); @@ -130,7 +130,7 @@ static void mcf_stop_tx(struct uart_port *port) static void mcf_stop_rx(struct uart_port *port) { - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned long flags; spin_lock_irqsave(&port->lock, flags); @@ -163,7 +163,7 @@ static void mcf_enable_ms(struct uart_port *port) static int mcf_startup(struct uart_port *port) { - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned long flags; spin_lock_irqsave(&port->lock, flags); @@ -189,7 +189,7 @@ static int mcf_startup(struct uart_port *port) static void mcf_shutdown(struct uart_port *port) { - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned long flags; spin_lock_irqsave(&port->lock, flags); @@ -273,7 +273,7 @@ static void mcf_set_termios(struct uart_port *port, struct ktermios *termios, static void mcf_rx_chars(struct mcf_uart *pp) { - struct uart_port *port = &pp->port; + struct uart_port *port = (struct uart_port *) pp; unsigned char status, ch, flag; while ((status = readb(port->membase + MCFUART_USR)) & MCFUART_USR_RXREADY) { @@ -319,7 +319,7 @@ static void mcf_rx_chars(struct mcf_uart *pp) static void mcf_tx_chars(struct mcf_uart *pp) { - struct uart_port *port = &pp->port; + struct uart_port *port = (struct uart_port *) pp; struct circ_buf *xmit = &port->info->xmit; if (port->x_char) { @@ -352,7 +352,7 @@ static void mcf_tx_chars(struct mcf_uart *pp) static irqreturn_t mcf_interrupt(int irq, void *data) { struct uart_port *port = data; - struct mcf_uart *pp = container_of(port, struct mcf_uart, port); + struct mcf_uart *pp = (struct mcf_uart *) port; unsigned int isr; isr = readb(port->membase + MCFUART_UISR) & pp->imr; diff --git a/trunk/include/asm-m68knommu/cacheflush.h b/trunk/include/asm-m68knommu/cacheflush.h index 29bc0aad2ebc..163dcb1a9689 100644 --- a/trunk/include/asm-m68knommu/cacheflush.h +++ b/trunk/include/asm-m68knommu/cacheflush.h @@ -53,7 +53,7 @@ static inline void __flush_cache_all(void) #endif /* CONFIG_M5407 */ #if defined(CONFIG_M527x) || defined(CONFIG_M528x) __asm__ __volatile__ ( - "movel #0x81000200, %%d0\n\t" + "movel #0x81400100, %%d0\n\t" "movec %%d0, %%CACR\n\t" "nop\n\t" : : : "d0" ); diff --git a/trunk/include/asm-m68knommu/mcfcache.h b/trunk/include/asm-m68knommu/mcfcache.h index c042634fadaa..7b61a8a529f5 100644 --- a/trunk/include/asm-m68knommu/mcfcache.h +++ b/trunk/include/asm-m68knommu/mcfcache.h @@ -60,7 +60,7 @@ nop movel #0x0000c020, %d0 /* Set SDRAM cached only */ movec %d0, %ACR0 - movel #0x00000000, %d0 /* No other regions cached */ + movel #0xff00c000, %d0 /* Cache Flash also */ movec %d0, %ACR1 movel #0x80000200, %d0 /* Setup cache mask */ movec %d0, %CACR /* Enable cache */ diff --git a/trunk/include/asm-m68knommu/mcfuart.h b/trunk/include/asm-m68knommu/mcfuart.h index 1319a81814b1..873d0805219c 100644 --- a/trunk/include/asm-m68knommu/mcfuart.h +++ b/trunk/include/asm-m68knommu/mcfuart.h @@ -12,6 +12,7 @@ #define mcfuart_h /****************************************************************************/ + /* * Define the base address of the UARTS within the MBAR address * space. @@ -32,7 +33,7 @@ #define MCFUART_BASE2 0x240 /* Base address of UART2 */ #define MCFUART_BASE3 0x280 /* Base address of UART3 */ #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) -#if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3) +#if defined(CONFIG_NETtel) || defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) #define MCFUART_BASE1 0x200 /* Base address of UART1 */ #define MCFUART_BASE2 0x1c0 /* Base address of UART2 */ #else