diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-02 09:03:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-02 09:03:55 -0700 |
commit | a7726350e06401929eac0aa0677a5467106565fc (patch) | |
tree | e189513e5014bdfccd73a3af731a6b57733743fa /arch/arm/mach-h720x/cpu-h7202.c | |
parent | Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc (diff) | |
parent | Merge branch 'fixes' into next/cleanup (diff) | |
download | linux-dev-a7726350e06401929eac0aa0677a5467106565fc.tar.xz linux-dev-a7726350e06401929eac0aa0677a5467106565fc.zip |
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanup from Olof Johansson:
"Here is a collection of cleanup patches. Among the pieces that stand
out are:
- The deletion of h720x platforms
- Split of at91 non-dt platforms to their own Kconfig file to keep
them separate
- General cleanups and refactoring of i.MX and MXS platforms
- Some restructuring of clock tables for OMAP
- Convertion of PMC driver for Tegra to dt-only
- Some renames of sunxi -> sun4i (Allwinner A10)
- ... plus a bunch of other stuff that I haven't mentioned"
* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (119 commits)
ARM: i.MX: remove unused ARCH_* configs
ARM i.MX53: remove platform ahci support
ARM: sunxi: Rework the restart code
irqchip: sunxi: Rename sunxi to sun4i
irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
clocksource: sunxi: Rename sunxi to sun4i
clocksource: sunxi: make use of CLKSRC_OF
clocksource: sunxi: Cleanup the timer code
ARM: at91: remove trailing semicolon from macros
ARM: at91/setup: fix trivial typos
ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
ARM: EXYNOS: change the name of USB ohci header
ARM: SAMSUNG: Remove unnecessary code for dma
ARM: S3C24XX: Remove unused GPIO drive strength register definitions
ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method
ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
...
Diffstat (limited to 'arch/arm/mach-h720x/cpu-h7202.c')
-rw-r--r-- | arch/arm/mach-h720x/cpu-h7202.c | 225 |
1 files changed, 0 insertions, 225 deletions
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c deleted file mode 100644 index e2ae7e898f9d..000000000000 --- a/arch/arm/mach-h720x/cpu-h7202.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * linux/arch/arm/mach-h720x/cpu-h7202.c - * - * Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de> - * 2003 Robert Schwebel <r.schwebel@pengutronix.de> - * 2004 Sascha Hauer <s.hauer@pengutronix.de> - * - * processor specific stuff for the Hynix h7202 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ - -#include <linux/init.h> -#include <linux/interrupt.h> -#include <linux/module.h> -#include <asm/types.h> -#include <mach/hardware.h> -#include <asm/irq.h> -#include <mach/irqs.h> -#include <asm/mach/irq.h> -#include <asm/mach/time.h> -#include <linux/device.h> -#include <linux/serial_8250.h> -#include "common.h" - -static struct resource h7202ps2_resources[] = { - [0] = { - .start = 0x8002c000, - .end = 0x8002c040, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_PS2, - .end = IRQ_PS2, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device h7202ps2_device = { - .name = "h7202ps2", - .id = -1, - .num_resources = ARRAY_SIZE(h7202ps2_resources), - .resource = h7202ps2_resources, -}; - -static struct plat_serial8250_port serial_platform_data[] = { - { - .membase = (void*)SERIAL0_VIRT, - .mapbase = SERIAL0_BASE, - .irq = IRQ_UART0, - .uartclk = 2*1843200, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, - { - .membase = (void*)SERIAL1_VIRT, - .mapbase = SERIAL1_BASE, - .irq = IRQ_UART1, - .uartclk = 2*1843200, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, -#ifdef CONFIG_H7202_SERIAL23 - { - .membase = (void*)SERIAL2_VIRT, - .mapbase = SERIAL2_BASE, - .irq = IRQ_UART2, - .uartclk = 2*1843200, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, - { - .membase = (void*)SERIAL3_VIRT, - .mapbase = SERIAL3_BASE, - .irq = IRQ_UART3, - .uartclk = 2*1843200, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, -#endif - { }, -}; - -static struct platform_device serial_device = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = serial_platform_data, - }, -}; - -static struct platform_device *devices[] __initdata = { - &h7202ps2_device, - &serial_device, -}; - -/* Although we have two interrupt lines for the timers, we only have one - * status register which clears all pending timer interrupts on reading. So - * we have to handle all timer interrupts in one place. - */ -static void -h7202_timerx_demux_handler(unsigned int irq_unused, struct irq_desc *desc) -{ - unsigned int mask, irq; - - mask = CPU_REG (TIMER_VIRT, TIMER_TOPSTAT); - - if ( mask & TSTAT_T0INT ) { - timer_tick(); - if( mask == TSTAT_T0INT ) - return; - } - - mask >>= 1; - irq = IRQ_TIMER1; - while (mask) { - if (mask & 1) - generic_handle_irq(irq); - irq++; - mask >>= 1; - } -} - -/* - * Timer interrupt handler - */ -static irqreturn_t -h7202_timer_interrupt(int irq, void *dev_id) -{ - h7202_timerx_demux_handler(0, NULL); - return IRQ_HANDLED; -} - -/* - * mask multiplexed timer IRQs - */ -static void inline __mask_timerx_irq(unsigned int irq) -{ - unsigned int bit; - bit = 2 << ((irq == IRQ_TIMER64B) ? 4 : (irq - IRQ_TIMER1)); - CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) &= ~bit; -} - -static void inline mask_timerx_irq(struct irq_data *d) -{ - __mask_timerx_irq(d->irq); -} - -/* - * unmask multiplexed timer IRQs - */ -static void inline unmask_timerx_irq(struct irq_data *d) -{ - unsigned int bit; - bit = 2 << ((d->irq == IRQ_TIMER64B) ? 4 : (d->irq - IRQ_TIMER1)); - CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) |= bit; -} - -static struct irq_chip h7202_timerx_chip = { - .irq_ack = mask_timerx_irq, - .irq_mask = mask_timerx_irq, - .irq_unmask = unmask_timerx_irq, -}; - -static struct irqaction h7202_timer_irq = { - .name = "h7202 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, - .handler = h7202_timer_interrupt, -}; - -/* - * Setup TIMER0 as system timer - */ -void __init h7202_timer_init(void) -{ - arch_gettimeoffset = h720x_gettimeoffset; - - CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; - CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; - CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; - CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) = ENABLE_TM0_INTR | TIMER_ENABLE_BIT; - - setup_irq(IRQ_TIMER0, &h7202_timer_irq); -} - -void __init h7202_init_irq (void) -{ - int irq; - - CPU_REG (GPIO_E_VIRT, GPIO_MASK) = 0x0; - - for (irq = IRQ_TIMER1; - irq < IRQ_CHAINED_TIMERX(NR_TIMERX_IRQS); irq++) { - __mask_timerx_irq(irq); - irq_set_chip_and_handler(irq, &h7202_timerx_chip, - handle_edge_irq); - set_irq_flags(irq, IRQF_VALID ); - } - irq_set_chained_handler(IRQ_TIMERX, h7202_timerx_demux_handler); - - h720x_init_irq(); -} - -void __init init_hw_h7202(void) -{ - /* Enable clocks */ - CPU_REG (PMU_BASE, PMU_PLL_CTRL) |= PLL_2_EN | PLL_1_EN | PLL_3_MUTE; - - CPU_REG (SERIAL0_VIRT, SERIAL_ENABLE) = SERIAL_ENABLE_EN; - CPU_REG (SERIAL1_VIRT, SERIAL_ENABLE) = SERIAL_ENABLE_EN; -#ifdef CONFIG_H7202_SERIAL23 - CPU_REG (SERIAL2_VIRT, SERIAL_ENABLE) = SERIAL_ENABLE_EN; - CPU_REG (SERIAL3_VIRT, SERIAL_ENABLE) = SERIAL_ENABLE_EN; - CPU_IO (GPIO_AMULSEL) = AMULSEL_USIN2 | AMULSEL_USOUT2 | - AMULSEL_USIN3 | AMULSEL_USOUT3; -#endif - (void) platform_add_devices(devices, ARRAY_SIZE(devices)); -} |