Commit 22673b71 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'integrator-for-v3.15-2' of...

Merge tag 'integrator-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/cleanup2

Merge more Integrator multiplatform patches for v3.15 from Linus Walleij:

- Remove all dangling header files in <mach/*> from the global
  namespace and push them down into the mach-integrator folder.

- Decouple the Integrator from the plat-versatile sched_clock
  implementation.

* tag 'integrator-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  ARM: integrator: register sched_clock directly
  ARM: integrator: localize the hardware.h header
  ARM: integrator: merge platform.h to hardware.h
  ARM: integrator: localize the impd1.h header
  ARM: integrator: localize the lm.h header
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents ba0e1fa9 a79528e9
...@@ -25,13 +25,11 @@ ...@@ -25,13 +25,11 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <mach/hardware.h>
#include <mach/platform.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include "hardware.h"
#include "cm.h" #include "cm.h"
#include "common.h" #include "common.h"
......
/* /*
* This file contains the hardware definitions of the Integrator.
*
* Copyright (C) 1998-1999 ARM Limited.
*
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
...@@ -13,26 +17,28 @@ ...@@ -13,26 +17,28 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/************************************************************************** #ifndef INTEGRATOR_HARDWARE_H
* * Copyright © ARM Limited 1998. All rights reserved. #define INTEGRATOR_HARDWARE_H
* ***********************************************************************/
/* ************************************************************************
*
* Integrator address map
*
* ***********************************************************************/
#ifndef __address_h /*
#define __address_h 1 * Where in virtual memory the IO devices (timers, system controllers
* and so on)
*/
#define IO_BASE 0xF0000000 // VA of IO
#define IO_SIZE 0x0B000000 // How much?
#define IO_START INTEGRATOR_HDR_BASE // PA of IO
/* macro to get at IO space when running virtually */
#ifdef CONFIG_MMU
#define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE)
#else
#define IO_ADDRESS(x) (x)
#endif
/* ======================================================================== #define __io_address(n) ((void __iomem *)IO_ADDRESS(n))
* Integrator definitions
* ======================================================================== /*
* ------------------------------------------------------------------------
* Memory definitions
* ------------------------------------------------------------------------
* Integrator memory map * Integrator memory map
*
*/ */
#define INTEGRATOR_BOOT_ROM_LO 0x00000000 #define INTEGRATOR_BOOT_ROM_LO 0x00000000
#define INTEGRATOR_BOOT_ROM_HI 0x20000000 #define INTEGRATOR_BOOT_ROM_HI 0x20000000
...@@ -61,7 +67,6 @@ ...@@ -61,7 +67,6 @@
/* /*
* SDRAM is a SIMM therefore the size is not known. * SDRAM is a SIMM therefore the size is not known.
*
*/ */
#define INTEGRATOR_SDRAM_BASE 0x00040000 #define INTEGRATOR_SDRAM_BASE 0x00040000
...@@ -81,10 +86,8 @@ ...@@ -81,10 +86,8 @@
#define INTEGRATOR_LOGIC_MODULE2_BASE 0xE0000000 #define INTEGRATOR_LOGIC_MODULE2_BASE 0xE0000000
#define INTEGRATOR_LOGIC_MODULE3_BASE 0xF0000000 #define INTEGRATOR_LOGIC_MODULE3_BASE 0xF0000000
/* ------------------------------------------------------------------------ /*
* Integrator header card registers * Integrator header card registers
* ------------------------------------------------------------------------
*
*/ */
#define INTEGRATOR_HDR_ID_OFFSET 0x00 #define INTEGRATOR_HDR_ID_OFFSET 0x00
#define INTEGRATOR_HDR_PROC_OFFSET 0x04 #define INTEGRATOR_HDR_PROC_OFFSET 0x04
...@@ -173,16 +176,12 @@ ...@@ -173,16 +176,12 @@
#define INTEGRATOR_HDR_SDRAM_SPD_OK (1 << 5) #define INTEGRATOR_HDR_SDRAM_SPD_OK (1 << 5)
/*
/* ------------------------------------------------------------------------
* Integrator system registers * Integrator system registers
* ------------------------------------------------------------------------
*
*/ */
/* /*
* System Controller * System Controller
*
*/ */
#define INTEGRATOR_SC_ID_OFFSET 0x00 #define INTEGRATOR_SC_ID_OFFSET 0x00
#define INTEGRATOR_SC_OSC_OFFSET 0x04 #define INTEGRATOR_SC_OSC_OFFSET 0x04
...@@ -223,7 +222,6 @@ ...@@ -223,7 +222,6 @@
/* /*
* External Bus Interface * External Bus Interface
*
*/ */
#define INTEGRATOR_EBI_BASE 0x12000000 #define INTEGRATOR_EBI_BASE 0x12000000
...@@ -272,7 +270,6 @@ ...@@ -272,7 +270,6 @@
/* /*
* LED's & Switches * LED's & Switches
*
*/ */
#define INTEGRATOR_DBG_ALPHA_OFFSET 0x00 #define INTEGRATOR_DBG_ALPHA_OFFSET 0x00
#define INTEGRATOR_DBG_LEDS_OFFSET 0x04 #define INTEGRATOR_DBG_LEDS_OFFSET 0x04
...@@ -292,21 +289,15 @@ ...@@ -292,21 +289,15 @@
#define INTEGRATOR_CP_SIC_BASE 0xCA000000 /* SIC */ #define INTEGRATOR_CP_SIC_BASE 0xCA000000 /* SIC */
#define INTEGRATOR_CP_CTL_BASE 0xCB000000 /* CP system control */ #define INTEGRATOR_CP_CTL_BASE 0xCB000000 /* CP system control */
/* ------------------------------------------------------------------------
* KMI keyboard/mouse definitions
* ------------------------------------------------------------------------
*/
/* PS2 Keyboard interface */ /* PS2 Keyboard interface */
#define KMI0_BASE INTEGRATOR_KBD_BASE #define KMI0_BASE INTEGRATOR_KBD_BASE
/* PS2 Mouse interface */ /* PS2 Mouse interface */
#define KMI1_BASE INTEGRATOR_MOUSE_BASE #define KMI1_BASE INTEGRATOR_MOUSE_BASE
/* KMI definitions are now in include/asm-arm/hardware/amba_kmi.h -- rmk */ /*
/* ------------------------------------------------------------------------
* Integrator Interrupt Controllers * Integrator Interrupt Controllers
* ------------------------------------------------------------------------ *
* *
* Offsets from interrupt controller base * Offsets from interrupt controller base
* *
...@@ -317,7 +308,6 @@ ...@@ -317,7 +308,6 @@
* Core Module interrupt controller base is * Core Module interrupt controller base is
* *
* INTEGRATOR_HDR_IC * INTEGRATOR_HDR_IC
*
*/ */
#define IRQ_STATUS 0 #define IRQ_STATUS 0
#define IRQ_RAW_STATUS 0x04 #define IRQ_RAW_STATUS 0x04
...@@ -335,25 +325,8 @@ ...@@ -335,25 +325,8 @@
#define FIQ_ENABLE_CLEAR 0x2C #define FIQ_ENABLE_CLEAR 0x2C
/* ------------------------------------------------------------------------ /*
* Interrupts
* ------------------------------------------------------------------------
*
*
* Each Core Module has two interrupts controllers, one on the core module
* itself and one in the system controller on the motherboard. The
* READ_INT macro in target.s reads both interrupt controllers and returns
* a 32 bit bitmask, bits 0 to 23 are interrupts from the system controller
* and bits 24 to 31 are from the core module.
*
* The following definitions relate to the bitmask returned by READ_INT.
*
*/
/* ------------------------------------------------------------------------
* LED's * LED's
* ------------------------------------------------------------------------
*
*/ */
#define GREEN_LED 0x01 #define GREEN_LED 0x01
#define YELLOW_LED 0x02 #define YELLOW_LED 0x02
...@@ -371,7 +344,6 @@ ...@@ -371,7 +344,6 @@
* *
* Timer 0 runs at bus frequency * Timer 0 runs at bus frequency
*/ */
#define INTEGRATOR_TIMER0_BASE INTEGRATOR_CT_BASE #define INTEGRATOR_TIMER0_BASE INTEGRATOR_CT_BASE
#define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100) #define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100)
#define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200) #define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200)
...@@ -379,4 +351,4 @@ ...@@ -379,4 +351,4 @@
#define INTEGRATOR_CSR_BASE 0x10000000 #define INTEGRATOR_CSR_BASE 0x10000000
#define INTEGRATOR_CSR_SIZE 0x10000000 #define INTEGRATOR_CSR_SIZE 0x10000000
#endif #endif /* INTEGRATOR_HARDWARE_H */
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/irqchip/arm-vic.h> #include <linux/irqchip/arm-vic.h>
#include <mach/lm.h>
#include <mach/impd1.h>
#include <asm/sizes.h> #include <asm/sizes.h>
#include "lm.h"
#include "impd1.h"
static int module_id; static int module_id;
......
#define IMPD1_OSC1 0x00
#define IMPD1_OSC2 0x04
#define IMPD1_LOCK 0x08
#define IMPD1_LEDS 0x0c #define IMPD1_LEDS 0x0c
#define IMPD1_INT 0x10 #define IMPD1_INT 0x10
#define IMPD1_SW 0x14 #define IMPD1_SW 0x14
...@@ -15,4 +12,3 @@ ...@@ -15,4 +12,3 @@
struct device; struct device;
void impd1_tweak_control(struct device *dev, u32 mask, u32 val); void impd1_tweak_control(struct device *dev, u32 mask, u32 val);
/*
* arch/arm/mach-integrator/include/mach/hardware.h
*
* This file contains the hardware definitions of the Integrator.
*
* Copyright (C) 1999 ARM Limited.
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
#include <asm/sizes.h>
/*
* Where in virtual memory the IO devices (timers, system controllers
* and so on)
*/
#define IO_BASE 0xF0000000 // VA of IO
#define IO_SIZE 0x0B000000 // How much?
#define IO_START INTEGRATOR_HDR_BASE // PA of IO
/* macro to get at IO space when running virtually */
#ifdef CONFIG_MMU
#define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE)
#else
#define IO_ADDRESS(x) (x)
#endif
#define __io_address(n) ((void __iomem *)IO_ADDRESS(n))
#endif
...@@ -44,23 +44,21 @@ ...@@ -44,23 +44,21 @@
#include <linux/sched_clock.h> #include <linux/sched_clock.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <mach/hardware.h>
#include <mach/platform.h>
#include <asm/hardware/arm_timer.h> #include <asm/hardware/arm_timer.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/param.h> /* HZ */ #include <asm/param.h> /* HZ */
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <mach/lm.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "hardware.h"
#include "cm.h" #include "cm.h"
#include "common.h" #include "common.h"
#include "pci_v3.h" #include "pci_v3.h"
#include "lm.h"
/* Base address to the AP system controller */ /* Base address to the AP system controller */
void __iomem *ap_syscon_base; void __iomem *ap_syscon_base;
......
...@@ -27,22 +27,18 @@ ...@@ -27,22 +27,18 @@
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/sys_soc.h> #include <linux/sys_soc.h>
#include <linux/sched_clock.h>
#include <mach/hardware.h>
#include <mach/platform.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <mach/lm.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <plat/clcd.h> #include <plat/clcd.h>
#include <plat/sched_clock.h>
#include "hardware.h"
#include "cm.h" #include "cm.h"
#include "common.h" #include "common.h"
...@@ -229,11 +225,14 @@ static struct clcd_board clcd_data = { ...@@ -229,11 +225,14 @@ static struct clcd_board clcd_data = {
#define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28)
static u64 notrace intcp_read_sched_clock(void)
{
return readl(REFCOUNTER);
}
static void __init intcp_init_early(void) static void __init intcp_init_early(void)
{ {
#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK sched_clock_register(intcp_read_sched_clock, 32, 24000000);
versatile_sched_clock_init(REFCOUNTER, 24000000);
#endif
} }
static const struct of_device_id fpga_irq_of_match[] __initconst = { static const struct of_device_id fpga_irq_of_match[] __initconst = {
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <mach/hardware.h> #include "hardware.h"
#include <mach/platform.h>
#include "cm.h" #include "cm.h"
#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <mach/lm.h> #include "lm.h"
#define to_lm_device(d) container_of(d, struct lm_device, dev) #define to_lm_device(d) container_of(d, struct lm_device, dev)
#define to_lm_driver(d) container_of(d, struct lm_driver, drv) #define to_lm_driver(d) container_of(d, struct lm_driver, drv)
......
...@@ -34,15 +34,13 @@ ...@@ -34,15 +34,13 @@
#include <linux/of_pci.h> #include <linux/of_pci.h>
#include <video/vga.h> #include <video/vga.h>
#include <mach/hardware.h>
#include <mach/platform.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/signal.h> #include <asm/signal.h>
#include <asm/mach/pci.h> #include <asm/mach/pci.h>
#include <asm/irq_regs.h> #include <asm/irq_regs.h>
#include "pci_v3.h" #include "pci_v3.h"
#include "hardware.h"
/* /*
* Where in the memory map does PCI live? * Where in the memory map does PCI live?
......
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/platform_data/clk-integrator.h> #include <linux/platform_data/clk-integrator.h>
#include <mach/impd1.h>
#include "clk-icst.h" #include "clk-icst.h"
#define IMPD1_OSC1 0x00
#define IMPD1_OSC2 0x04
#define IMPD1_LOCK 0x08
struct impd1_clk { struct impd1_clk {
char *vco1name; char *vco1name;
struct clk *vco1clk; struct clk *vco1clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment