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

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: Olof Johansson <olof@lixom.net>

+61 -145
+1 -3
arch/arm/mach-integrator/core.c
··· 25 25 #include <linux/of.h> 26 26 #include <linux/of_address.h> 27 27 28 - #include <mach/hardware.h> 29 - #include <mach/platform.h> 30 - 31 28 #include <asm/mach-types.h> 32 29 #include <asm/mach/time.h> 33 30 #include <asm/pgtable.h> 34 31 32 + #include "hardware.h" 35 33 #include "cm.h" 36 34 #include "common.h" 37 35
+2 -2
arch/arm/mach-integrator/impd1.c
··· 25 25 #include <linux/slab.h> 26 26 #include <linux/irqchip/arm-vic.h> 27 27 28 - #include <mach/lm.h> 29 - #include <mach/impd1.h> 30 28 #include <asm/sizes.h> 29 + #include "lm.h" 30 + #include "impd1.h" 31 31 32 32 static int module_id; 33 33
-45
arch/arm/mach-integrator/include/mach/hardware.h
··· 1 - /* 2 - * arch/arm/mach-integrator/include/mach/hardware.h 3 - * 4 - * This file contains the hardware definitions of the Integrator. 5 - * 6 - * Copyright (C) 1999 ARM Limited. 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License as published by 10 - * the Free Software Foundation; either version 2 of the License, or 11 - * (at your option) any later version. 12 - * 13 - * This program is distributed in the hope that it will be useful, 14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 - * GNU General Public License for more details. 17 - * 18 - * You should have received a copy of the GNU General Public License 19 - * along with this program; if not, write to the Free Software 20 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 - */ 22 - #ifndef __ASM_ARCH_HARDWARE_H 23 - #define __ASM_ARCH_HARDWARE_H 24 - 25 - #include <asm/sizes.h> 26 - 27 - /* 28 - * Where in virtual memory the IO devices (timers, system controllers 29 - * and so on) 30 - */ 31 - #define IO_BASE 0xF0000000 // VA of IO 32 - #define IO_SIZE 0x0B000000 // How much? 33 - #define IO_START INTEGRATOR_HDR_BASE // PA of IO 34 - 35 - /* macro to get at IO space when running virtually */ 36 - #ifdef CONFIG_MMU 37 - #define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE) 38 - #else 39 - #define IO_ADDRESS(x) (x) 40 - #endif 41 - 42 - #define __io_address(n) ((void __iomem *)IO_ADDRESS(n)) 43 - 44 - #endif 45 -
-4
arch/arm/mach-integrator/include/mach/impd1.h arch/arm/mach-integrator/impd1.h
··· 1 - #define IMPD1_OSC1 0x00 2 - #define IMPD1_OSC2 0x04 3 - #define IMPD1_LOCK 0x08 4 1 #define IMPD1_LEDS 0x0c 5 2 #define IMPD1_INT 0x10 6 3 #define IMPD1_SW 0x14 ··· 12 15 struct device; 13 16 14 17 void impd1_tweak_control(struct device *dev, u32 mask, u32 val); 15 -
arch/arm/mach-integrator/include/mach/lm.h arch/arm/mach-integrator/lm.h
+41 -69
arch/arm/mach-integrator/include/mach/platform.h arch/arm/mach-integrator/hardware.h
··· 1 1 /* 2 + * This file contains the hardware definitions of the Integrator. 3 + * 4 + * Copyright (C) 1998-1999 ARM Limited. 5 + * 2 6 * This program is free software; you can redistribute it and/or modify 3 7 * it under the terms of the GNU General Public License as published by 4 8 * the Free Software Foundation; either version 2 of the License, or ··· 17 13 * along with this program; if not, write to the Free Software 18 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 15 */ 20 - /************************************************************************** 21 - * * Copyright © ARM Limited 1998. All rights reserved. 22 - * ***********************************************************************/ 23 - /* ************************************************************************ 24 - * 25 - * Integrator address map 26 - * 27 - * ***********************************************************************/ 16 + #ifndef INTEGRATOR_HARDWARE_H 17 + #define INTEGRATOR_HARDWARE_H 28 18 29 - #ifndef __address_h 30 - #define __address_h 1 19 + /* 20 + * Where in virtual memory the IO devices (timers, system controllers 21 + * and so on) 22 + */ 23 + #define IO_BASE 0xF0000000 // VA of IO 24 + #define IO_SIZE 0x0B000000 // How much? 25 + #define IO_START INTEGRATOR_HDR_BASE // PA of IO 31 26 32 - /* ======================================================================== 33 - * Integrator definitions 34 - * ======================================================================== 35 - * ------------------------------------------------------------------------ 36 - * Memory definitions 37 - * ------------------------------------------------------------------------ 27 + /* macro to get at IO space when running virtually */ 28 + #ifdef CONFIG_MMU 29 + #define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE) 30 + #else 31 + #define IO_ADDRESS(x) (x) 32 + #endif 33 + 34 + #define __io_address(n) ((void __iomem *)IO_ADDRESS(n)) 35 + 36 + /* 38 37 * Integrator memory map 39 - * 40 38 */ 41 39 #define INTEGRATOR_BOOT_ROM_LO 0x00000000 42 40 #define INTEGRATOR_BOOT_ROM_HI 0x20000000 ··· 46 40 #define INTEGRATOR_BOOT_ROM_SIZE SZ_512K 47 41 48 42 /* 49 - * New Core Modules have different amounts of SSRAM, the amount of SSRAM 50 - * fitted can be found in HDR_STAT. 43 + * New Core Modules have different amounts of SSRAM, the amount of SSRAM 44 + * fitted can be found in HDR_STAT. 51 45 * 52 - * The symbol INTEGRATOR_SSRAM_SIZE is kept, however this now refers to 53 - * the minimum amount of SSRAM fitted on any core module. 46 + * The symbol INTEGRATOR_SSRAM_SIZE is kept, however this now refers to 47 + * the minimum amount of SSRAM fitted on any core module. 54 48 * 55 - * New Core Modules also alias the SSRAM. 49 + * New Core Modules also alias the SSRAM. 56 50 * 57 51 */ 58 52 #define INTEGRATOR_SSRAM_BASE 0x00000000 ··· 67 61 68 62 /* 69 63 * SDRAM is a SIMM therefore the size is not known. 70 - * 71 64 */ 72 65 #define INTEGRATOR_SDRAM_BASE 0x00040000 73 66 ··· 86 81 #define INTEGRATOR_LOGIC_MODULE2_BASE 0xE0000000 87 82 #define INTEGRATOR_LOGIC_MODULE3_BASE 0xF0000000 88 83 89 - /* ------------------------------------------------------------------------ 90 - * Integrator header card registers 91 - * ------------------------------------------------------------------------ 92 - * 84 + /* 85 + * Integrator header card registers 93 86 */ 94 87 #define INTEGRATOR_HDR_ID_OFFSET 0x00 95 88 #define INTEGRATOR_HDR_PROC_OFFSET 0x04 ··· 176 173 177 174 #define INTEGRATOR_HDR_SDRAM_SPD_OK (1 << 5) 178 175 179 - 180 - /* ------------------------------------------------------------------------ 181 - * Integrator system registers 182 - * ------------------------------------------------------------------------ 183 - * 176 + /* 177 + * Integrator system registers 184 178 */ 185 179 186 180 /* 187 181 * System Controller 188 - * 189 182 */ 190 183 #define INTEGRATOR_SC_ID_OFFSET 0x00 191 184 #define INTEGRATOR_SC_OSC_OFFSET 0x04 ··· 222 223 223 224 /* 224 225 * External Bus Interface 225 - * 226 226 */ 227 227 #define INTEGRATOR_EBI_BASE 0x12000000 228 228 ··· 270 272 271 273 /* 272 274 * LED's & Switches 273 - * 274 275 */ 275 276 #define INTEGRATOR_DBG_ALPHA_OFFSET 0x00 276 277 #define INTEGRATOR_DBG_LEDS_OFFSET 0x04 ··· 289 292 #define INTEGRATOR_CP_SIC_BASE 0xCA000000 /* SIC */ 290 293 #define INTEGRATOR_CP_CTL_BASE 0xCB000000 /* CP system control */ 291 294 292 - /* ------------------------------------------------------------------------ 293 - * KMI keyboard/mouse definitions 294 - * ------------------------------------------------------------------------ 295 - */ 296 295 /* PS2 Keyboard interface */ 297 296 #define KMI0_BASE INTEGRATOR_KBD_BASE 298 297 299 298 /* PS2 Mouse interface */ 300 299 #define KMI1_BASE INTEGRATOR_MOUSE_BASE 301 300 302 - /* KMI definitions are now in include/asm-arm/hardware/amba_kmi.h -- rmk */ 303 - 304 - /* ------------------------------------------------------------------------ 305 - * Integrator Interrupt Controllers 306 - * ------------------------------------------------------------------------ 301 + /* 302 + * Integrator Interrupt Controllers 307 303 * 308 - * Offsets from interrupt controller base 309 304 * 310 - * System Controller interrupt controller base is 305 + * Offsets from interrupt controller base 306 + * 307 + * System Controller interrupt controller base is 311 308 * 312 309 * INTEGRATOR_IC_BASE + (header_number << 6) 313 310 * 314 - * Core Module interrupt controller base is 311 + * Core Module interrupt controller base is 315 312 * 316 313 * INTEGRATOR_HDR_IC 317 - * 318 314 */ 319 315 #define IRQ_STATUS 0 320 316 #define IRQ_RAW_STATUS 0x04 ··· 325 335 #define FIQ_ENABLE_CLEAR 0x2C 326 336 327 337 328 - /* ------------------------------------------------------------------------ 329 - * Interrupts 330 - * ------------------------------------------------------------------------ 331 - * 332 - * 333 - * Each Core Module has two interrupts controllers, one on the core module 334 - * itself and one in the system controller on the motherboard. The 335 - * READ_INT macro in target.s reads both interrupt controllers and returns 336 - * a 32 bit bitmask, bits 0 to 23 are interrupts from the system controller 337 - * and bits 24 to 31 are from the core module. 338 - * 339 - * The following definitions relate to the bitmask returned by READ_INT. 340 - * 341 - */ 342 - 343 - /* ------------------------------------------------------------------------ 344 - * LED's 345 - * ------------------------------------------------------------------------ 346 - * 338 + /* 339 + * LED's 347 340 */ 348 341 #define GREEN_LED 0x01 349 342 #define YELLOW_LED 0x02 ··· 344 371 * 345 372 * Timer 0 runs at bus frequency 346 373 */ 347 - 348 374 #define INTEGRATOR_TIMER0_BASE INTEGRATOR_CT_BASE 349 375 #define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100) 350 376 #define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200) ··· 351 379 #define INTEGRATOR_CSR_BASE 0x10000000 352 380 #define INTEGRATOR_CSR_SIZE 0x10000000 353 381 354 - #endif 382 + #endif /* INTEGRATOR_HARDWARE_H */
+2 -4
arch/arm/mach-integrator/integrator_ap.c
··· 44 44 #include <linux/sched_clock.h> 45 45 #include <linux/clk-provider.h> 46 46 47 - #include <mach/hardware.h> 48 - #include <mach/platform.h> 49 47 #include <asm/hardware/arm_timer.h> 50 48 #include <asm/setup.h> 51 49 #include <asm/param.h> /* HZ */ 52 50 #include <asm/mach-types.h> 53 - 54 - #include <mach/lm.h> 55 51 56 52 #include <asm/mach/arch.h> 57 53 #include <asm/mach/irq.h> 58 54 #include <asm/mach/map.h> 59 55 #include <asm/mach/time.h> 60 56 57 + #include "hardware.h" 61 58 #include "cm.h" 62 59 #include "common.h" 63 60 #include "pci_v3.h" 61 + #include "lm.h" 64 62 65 63 /* Base address to the AP system controller */ 66 64 void __iomem *ap_syscon_base;
+8 -9
arch/arm/mach-integrator/integrator_cp.c
··· 27 27 #include <linux/of_address.h> 28 28 #include <linux/of_platform.h> 29 29 #include <linux/sys_soc.h> 30 + #include <linux/sched_clock.h> 30 31 31 - #include <mach/hardware.h> 32 - #include <mach/platform.h> 33 32 #include <asm/setup.h> 34 33 #include <asm/mach-types.h> 35 - 36 - #include <mach/lm.h> 37 - 38 34 #include <asm/mach/arch.h> 39 35 #include <asm/mach/irq.h> 40 36 #include <asm/mach/map.h> 41 37 #include <asm/mach/time.h> 42 38 43 39 #include <plat/clcd.h> 44 - #include <plat/sched_clock.h> 45 40 41 + #include "hardware.h" 46 42 #include "cm.h" 47 43 #include "common.h" 48 44 ··· 225 229 226 230 #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) 227 231 232 + static u64 notrace intcp_read_sched_clock(void) 233 + { 234 + return readl(REFCOUNTER); 235 + } 236 + 228 237 static void __init intcp_init_early(void) 229 238 { 230 - #ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK 231 - versatile_sched_clock_init(REFCOUNTER, 24000000); 232 - #endif 239 + sched_clock_register(intcp_read_sched_clock, 32, 24000000); 233 240 } 234 241 235 242 static const struct of_device_id fpga_irq_of_match[] __initconst = {
+1 -3
arch/arm/mach-integrator/leds.c
··· 11 11 #include <linux/slab.h> 12 12 #include <linux/leds.h> 13 13 14 - #include <mach/hardware.h> 15 - #include <mach/platform.h> 16 - 14 + #include "hardware.h" 17 15 #include "cm.h" 18 16 19 17 #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
+1 -1
arch/arm/mach-integrator/lm.c
··· 12 12 #include <linux/device.h> 13 13 #include <linux/slab.h> 14 14 15 - #include <mach/lm.h> 15 + #include "lm.h" 16 16 17 17 #define to_lm_device(d) container_of(d, struct lm_device, dev) 18 18 #define to_lm_driver(d) container_of(d, struct lm_driver, drv)
+1 -3
arch/arm/mach-integrator/pci_v3.c
··· 34 34 #include <linux/of_pci.h> 35 35 #include <video/vga.h> 36 36 37 - #include <mach/hardware.h> 38 - #include <mach/platform.h> 39 - 40 37 #include <asm/mach/map.h> 41 38 #include <asm/signal.h> 42 39 #include <asm/mach/pci.h> 43 40 #include <asm/irq_regs.h> 44 41 45 42 #include "pci_v3.h" 43 + #include "hardware.h" 46 44 47 45 /* 48 46 * Where in the memory map does PCI live?
+4 -2
drivers/clk/versatile/clk-impd1.c
··· 13 13 #include <linux/io.h> 14 14 #include <linux/platform_data/clk-integrator.h> 15 15 16 - #include <mach/impd1.h> 17 - 18 16 #include "clk-icst.h" 17 + 18 + #define IMPD1_OSC1 0x00 19 + #define IMPD1_OSC2 0x04 20 + #define IMPD1_LOCK 0x08 19 21 20 22 struct impd1_clk { 21 23 char *vco1name;