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

Merge tag 'ux500-multiplatform-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/multiplatform

From Linus Walleij <linus.walleij@linaro.org>:

Ux500 multiplatform support. This tag builds upon the MFD-specific base
tag "ux500-multiplatform-mfd". This removes all <mach/*> dependencies
and makes the ux500 fully multi-platform.

* tag 'ux500-multiplatform-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
ARM: ux500: build hotplug.o for ARMv7-a
ARM: ux500: move to multiplatform
ARM: ux500: make remaining headers local
ARM: ux500: make irqs.h local to platform
ARM: ux500: get rid of <mach/[hardware|db8500-regs].h>
staging: ste_rmi4: kill platform_data hack
ARM: ux500: move mach/msp.h to <linux/platform_data/*>
clk: ux500: pass clock base adresses in init call
ARM: ux500: make debug macro stand-alone
ARM: ux500: move debugmacro to debug includes
ARM: ux500: split out prcmu initialization
mfd: db8500-prcmu: drop unused includes
ARM: ux500: move PM-related PRCMU functions to machine
mfd: db8500-prcmu: get base address from resource
mfd: prcmu: pass a base and size with the early initcall

Conflicts:
arch/arm/Kconfig

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+697 -764
-16
arch/arm/Kconfig
··· 853 853 help 854 854 Support for ST-Ericsson U300 series mobile platforms. 855 855 856 - config ARCH_U8500 857 - bool "ST-Ericsson U8500 Series" 858 - depends on MMU 859 - select ARCH_HAS_CPUFREQ 860 - select ARCH_REQUIRE_GPIOLIB 861 - select ARM_AMBA 862 - select CLKDEV_LOOKUP 863 - select CPU_V7 864 - select GENERIC_CLOCKEVENTS 865 - select HAVE_SMP 866 - select MIGHT_HAVE_CACHE_L2X0 867 - select SPARSE_IRQ 868 - help 869 - Support for ST-Ericsson's Ux500 architecture 870 - 871 - 872 856 config ARCH_DAVINCI 873 857 bool "TI DaVinci" 874 858 select ARCH_HAS_HOLES_MEMORYMODEL
+8
arch/arm/Kconfig.debug
··· 432 432 Say Y here if you want the debug print routines to direct 433 433 their output to the uart1 port on SiRFmarco devices. 434 434 435 + config DEBUG_UX500_UART 436 + depends on ARCH_U8500 437 + bool "Use Ux500 UART for low-level debug" 438 + help 439 + Say Y here if you want kernel low-level debugging support 440 + on Ux500 based platforms. 441 + 435 442 config DEBUG_VEXPRESS_UART0_DETECT 436 443 bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" 437 444 depends on ARCH_VEXPRESS && CPU_CP15_MMU ··· 627 620 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 628 621 default "debug/vt8500.S" if DEBUG_VT8500_UART0 629 622 default "debug/tegra.S" if DEBUG_TEGRA_UART 623 + default "debug/ux500.S" if DEBUG_UX500_UART 630 624 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 631 625 default "mach/debug-macro.S" 632 626
+48
arch/arm/include/debug/ux500.S
··· 1 + /* 2 + * Debugging macro include header 3 + * 4 + * Copyright (C) 2009 ST-Ericsson 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation. 9 + * 10 + */ 11 + 12 + 13 + #if CONFIG_UX500_DEBUG_UART > 2 14 + #error Invalid Ux500 debug UART 15 + #endif 16 + 17 + /* 18 + * DEBUG_LL only works if only one SOC is built in. We don't use #else below 19 + * in order to get "__UX500_UART redefined" warnings if more than one SOC is 20 + * built, so that there's some hint during the build that something is wrong. 21 + */ 22 + 23 + #ifdef CONFIG_UX500_SOC_DB8500 24 + #define U8500_UART0_PHYS_BASE (0x80120000) 25 + #define U8500_UART1_PHYS_BASE (0x80121000) 26 + #define U8500_UART2_PHYS_BASE (0x80007000) 27 + #define U8500_UART0_VIRT_BASE (0xa8120000) 28 + #define U8500_UART1_VIRT_BASE (0xa8121000) 29 + #define U8500_UART2_VIRT_BASE (0xa8007000) 30 + #define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE 31 + #define __UX500_VIRT_UART(n) U8500_UART##n##_VIRT_BASE 32 + #endif 33 + 34 + #if !defined(__UX500_PHYS_UART) || !defined(__UX500_VIRT_UART) 35 + #error Unknown SOC 36 + #endif 37 + 38 + #define UX500_PHYS_UART(n) __UX500_PHYS_UART(n) 39 + #define UX500_VIRT_UART(n) __UX500_VIRT_UART(n) 40 + #define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART) 41 + #define UART_VIRT_BASE UX500_VIRT_UART(CONFIG_UX500_DEBUG_UART) 42 + 43 + .macro addruart, rp, rv, tmp 44 + ldr \rp, =UART_PHYS_BASE @ no, physical address 45 + ldr \rv, =UART_VIRT_BASE @ yes, virtual address 46 + .endm 47 + 48 + #include <asm/hardware/debug-pl01x.S>
+14
arch/arm/mach-ux500/Kconfig
··· 1 + config ARCH_U8500 2 + bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7 3 + depends on MMU 4 + select ARCH_HAS_CPUFREQ 5 + select ARCH_REQUIRE_GPIOLIB 6 + select ARM_AMBA 7 + select CLKDEV_LOOKUP 8 + select CPU_V7 9 + select GENERIC_CLOCKEVENTS 10 + select HAVE_SMP 11 + select MIGHT_HAVE_CACHE_L2X0 12 + help 13 + Support for ST-Ericsson's Ux500 architecture 14 + 1 15 if ARCH_U8500 2 16 3 17 config UX500_SOC_COMMON
+3 -1
arch/arm/mach-ux500/Makefile
··· 3 3 # 4 4 5 5 obj-y := cpu.o devices.o devices-common.o \ 6 - id.o usb.o timer.o 6 + id.o usb.o timer.o pm.o 7 7 obj-$(CONFIG_CPU_IDLE) += cpuidle.o 8 8 obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 9 9 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o ··· 15 15 board-mop500-audio.o 16 16 obj-$(CONFIG_SMP) += platsmp.o headsmp.o 17 17 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 18 + 19 + CFLAGS_hotplug.o += -march=armv7-a
+3 -4
arch/arm/mach-ux500/board-mop500-audio.c
··· 10 10 #include <linux/platform_data/pinctrl-nomadik.h> 11 11 #include <linux/platform_data/dma-ste-dma40.h> 12 12 13 - #include <mach/devices.h> 14 - #include <mach/hardware.h> 15 - #include <mach/irqs.h> 16 - #include <mach/msp.h> 13 + #include "devices.h" 14 + #include "irqs.h" 15 + #include <linux/platform_data/asoc-ux500-msp.h> 17 16 18 17 #include "ste-dma40-db8500.h" 19 18 #include "board-mop500.h"
-2
arch/arm/mach-ux500/board-mop500-pins.c
··· 13 13 14 14 #include <asm/mach-types.h> 15 15 16 - #include <mach/hardware.h> 17 - 18 16 #include "pins-db8500.h" 19 17 #include "board-mop500.h" 20 18
+2 -2
arch/arm/mach-ux500/board-mop500-sdi.c
··· 14 14 #include <linux/platform_data/dma-ste-dma40.h> 15 15 16 16 #include <asm/mach-types.h> 17 - #include <mach/devices.h> 18 - #include <mach/hardware.h> 17 + #include "devices.h" 19 18 19 + #include "db8500-regs.h" 20 20 #include "devices-db8500.h" 21 21 #include "board-mop500.h" 22 22 #include "ste-dma40-db8500.h"
+6 -3
arch/arm/mach-ux500/board-mop500-u8500uib.c
··· 12 12 #include <linux/mfd/tc3589x.h> 13 13 #include <linux/input/matrix_keypad.h> 14 14 15 - #include <mach/irqs.h> 15 + #include "irqs.h" 16 16 17 17 #include "board-mop500.h" 18 18 19 - /* Dummy data that can be overridden by staging driver */ 20 - struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = { 19 + static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = { 20 + { 21 + I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B), 22 + .irq = NOMADIK_GPIO_TO_IRQ(84), 23 + }, 21 24 }; 22 25 23 26 /*
-1
arch/arm/mach-ux500/board-mop500-uib.c
··· 11 11 #include <linux/init.h> 12 12 #include <linux/i2c.h> 13 13 14 - #include <mach/hardware.h> 15 14 #include "board-mop500.h" 16 15 #include "id.h" 17 16
+4 -62
arch/arm/mach-ux500/board-mop500.c
··· 41 41 #include <asm/mach-types.h> 42 42 #include <asm/mach/arch.h> 43 43 44 - #include <mach/hardware.h> 45 - #include <mach/setup.h> 46 - #include <mach/devices.h> 47 - #include <mach/irqs.h> 44 + #include "setup.h" 45 + #include "devices.h" 46 + #include "irqs.h" 48 47 #include <linux/platform_data/crypto-ux500.h> 49 48 50 49 #include "ste-dma40-db8500.h" 50 + #include "db8500-regs.h" 51 51 #include "devices-db8500.h" 52 52 #include "board-mop500.h" 53 53 #include "board-mop500-regulators.h" ··· 204 204 .num_regulator = ARRAY_SIZE(ab8500_regulators), 205 205 .gpio = &ab8500_gpio_pdata, 206 206 .codec = &ab8500_codec_pdata, 207 - }; 208 - 209 - /* 210 - * Thermal Sensor 211 - */ 212 - 213 - static struct resource db8500_thsens_resources[] = { 214 - { 215 - .name = "IRQ_HOTMON_LOW", 216 - .start = IRQ_PRCMU_HOTMON_LOW, 217 - .end = IRQ_PRCMU_HOTMON_LOW, 218 - .flags = IORESOURCE_IRQ, 219 - }, 220 - { 221 - .name = "IRQ_HOTMON_HIGH", 222 - .start = IRQ_PRCMU_HOTMON_HIGH, 223 - .end = IRQ_PRCMU_HOTMON_HIGH, 224 - .flags = IORESOURCE_IRQ, 225 - }, 226 - }; 227 - 228 - static struct db8500_thsens_platform_data db8500_thsens_data = { 229 - .trip_points[0] = { 230 - .temp = 70000, 231 - .type = THERMAL_TRIP_ACTIVE, 232 - .cdev_name = { 233 - [0] = "thermal-cpufreq-0", 234 - }, 235 - }, 236 - .trip_points[1] = { 237 - .temp = 75000, 238 - .type = THERMAL_TRIP_ACTIVE, 239 - .cdev_name = { 240 - [0] = "thermal-cpufreq-0", 241 - }, 242 - }, 243 - .trip_points[2] = { 244 - .temp = 80000, 245 - .type = THERMAL_TRIP_ACTIVE, 246 - .cdev_name = { 247 - [0] = "thermal-cpufreq-0", 248 - }, 249 - }, 250 - .trip_points[3] = { 251 - .temp = 85000, 252 - .type = THERMAL_TRIP_CRITICAL, 253 - }, 254 - .num_trips = 4, 255 - }; 256 - 257 - static struct platform_device u8500_thsens_device = { 258 - .name = "db8500-thermal", 259 - .resource = db8500_thsens_resources, 260 - .num_resources = ARRAY_SIZE(db8500_thsens_resources), 261 - .dev = { 262 - .platform_data = &db8500_thsens_data, 263 - }, 264 207 }; 265 208 266 209 static struct platform_device u8500_cpufreq_cooling_device = { ··· 565 622 &snowball_key_dev, 566 623 &snowball_sbnet_dev, 567 624 &snowball_gpio_en_3v3_regulator_dev, 568 - &u8500_thsens_device, 569 625 &u8500_cpufreq_cooling_device, 570 626 }; 571 627
+2 -2
arch/arm/mach-ux500/board-mop500.h
··· 8 8 #define __BOARD_MOP500_H 9 9 10 10 /* For NOMADIK_NR_GPIO */ 11 - #include <mach/irqs.h> 12 - #include <mach/msp.h> 11 + #include "irqs.h" 12 + #include <linux/platform_data/asoc-ux500-msp.h> 13 13 #include <linux/amba/mmci.h> 14 14 15 15 /* Snowball specific GPIO assignments, this board has no GPIO expander */
+1 -1
arch/arm/mach-ux500/cache-l2x0.c
··· 9 9 10 10 #include <asm/cacheflush.h> 11 11 #include <asm/hardware/cache-l2x0.h> 12 - #include <mach/hardware.h> 13 12 13 + #include "db8500-regs.h" 14 14 #include "id.h" 15 15 16 16 static void __iomem *l2x0_base;
+4 -8
arch/arm/mach-ux500/cpu-db8500.c
··· 28 28 #include <asm/mach/map.h> 29 29 #include <asm/mach/arch.h> 30 30 31 - #include <mach/hardware.h> 32 - #include <mach/setup.h> 33 - #include <mach/devices.h> 34 - #include <mach/db8500-regs.h> 35 - #include <mach/irqs.h> 31 + #include "setup.h" 32 + #include "devices.h" 33 + #include "irqs.h" 36 34 37 35 #include "devices-db8500.h" 38 36 #include "ste-dma40-db8500.h" 39 - 37 + #include "db8500-regs.h" 40 38 #include "board-mop500.h" 41 39 #include "id.h" 42 40 ··· 92 94 iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); 93 95 else 94 96 iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); 95 - 96 - _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); 97 97 } 98 98 99 99 static struct resource db8500_pmu_resources[] = {
+21 -12
arch/arm/mach-ux500/cpu.c
··· 8 8 9 9 #include <linux/platform_device.h> 10 10 #include <linux/io.h> 11 - #include <linux/mfd/db8500-prcmu.h> 11 + #include <linux/mfd/dbx500-prcmu.h> 12 12 #include <linux/clksrc-dbx500-prcmu.h> 13 13 #include <linux/sys_soc.h> 14 14 #include <linux/err.h> ··· 20 20 #include <linux/irqchip.h> 21 21 #include <linux/irqchip/arm-gic.h> 22 22 #include <linux/platform_data/clk-ux500.h> 23 + #include <linux/platform_data/arm-ux500-pm.h> 23 24 24 25 #include <asm/mach/map.h> 25 26 26 - #include <mach/hardware.h> 27 - #include <mach/setup.h> 28 - #include <mach/devices.h> 27 + #include "setup.h" 28 + #include "devices.h" 29 29 30 30 #include "board-mop500.h" 31 + #include "db8500-regs.h" 31 32 #include "id.h" 32 - 33 - void __iomem *_PRCMU_BASE; 34 33 35 34 /* 36 35 * FIXME: Should we set up the GPIO domain here? ··· 67 68 * Init clocks here so that they are available for system timer 68 69 * initialization. 69 70 */ 70 - if (cpu_is_u8500_family() || cpu_is_u9540()) 71 - db8500_prcmu_early_init(); 72 - 73 - if (cpu_is_u8500_family() || cpu_is_u9540()) 74 - u8500_clk_init(); 75 - else if (cpu_is_u8540()) 71 + if (cpu_is_u8500_family()) { 72 + prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); 73 + ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); 74 + u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, 75 + U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, 76 + U8500_CLKRST6_BASE); 77 + } else if (cpu_is_u9540()) { 78 + prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); 79 + ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); 80 + u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, 81 + U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, 82 + U8500_CLKRST6_BASE); 83 + } else if (cpu_is_u8540()) { 84 + prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); 85 + ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); 76 86 u8540_clk_init(); 87 + } 77 88 } 78 89 79 90 void __init ux500_init_late(void)
+4 -1
arch/arm/mach-ux500/cpuidle.c
··· 16 16 #include <linux/atomic.h> 17 17 #include <linux/smp.h> 18 18 #include <linux/mfd/dbx500-prcmu.h> 19 + #include <linux/platform_data/arm-ux500-pm.h> 19 20 20 21 #include <asm/cpuidle.h> 21 22 #include <asm/proc-fns.h> 23 + 24 + #include "db8500-regs.h" 22 25 23 26 static atomic_t master = ATOMIC_INIT(0); 24 27 static DEFINE_SPINLOCK(master_lock); ··· 133 130 int ret, cpu; 134 131 struct cpuidle_device *device; 135 132 136 - /* Configure wake up reasons */ 133 + /* Configure wake up reasons */ 137 134 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | 138 135 PRCMU_WAKEUP(ABB)); 139 136
+1 -2
arch/arm/mach-ux500/devices-common.c
··· 13 13 #include <linux/platform_device.h> 14 14 #include <linux/platform_data/pinctrl-nomadik.h> 15 15 16 - #include <mach/hardware.h> 17 - #include <mach/irqs.h> 16 + #include "irqs.h" 18 17 19 18 #include "devices-common.h" 20 19
+5 -3
arch/arm/mach-ux500/devices-db8500.c
··· 15 15 #include <linux/platform_data/dma-ste-dma40.h> 16 16 #include <linux/mfd/dbx500-prcmu.h> 17 17 18 - #include <mach/hardware.h> 19 - #include <mach/setup.h> 20 - #include <mach/irqs.h> 18 + #include "setup.h" 19 + #include "irqs.h" 21 20 21 + #include "db8500-regs.h" 22 22 #include "devices-db8500.h" 23 23 #include "ste-dma40-db8500.h" 24 24 ··· 199 199 200 200 struct prcmu_pdata db8500_prcmu_pdata = { 201 201 .ab_platdata = &ab8500_platdata, 202 + .ab_irq = IRQ_DB8500_AB8500, 203 + .irq_base = IRQ_PRCMU_BASE, 202 204 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET, 203 205 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, 204 206 };
+2 -1
arch/arm/mach-ux500/devices-db8500.h
··· 9 9 #define __DEVICES_DB8500_H 10 10 11 11 #include <linux/platform_data/usb-musb-ux500.h> 12 - #include <mach/irqs.h> 12 + #include "irqs.h" 13 + #include "db8500-regs.h" 13 14 #include "devices-common.h" 14 15 15 16 struct ske_keypad_platform_data;
+3 -2
arch/arm/mach-ux500/devices.c
··· 11 11 #include <linux/io.h> 12 12 #include <linux/amba/bus.h> 13 13 14 - #include <mach/hardware.h> 15 - #include <mach/setup.h> 14 + #include "setup.h" 15 + 16 + #include "db8500-regs.h" 16 17 17 18 void __init amba_add_devices(struct amba_device *devs[], int num) 18 19 {
+1 -1
arch/arm/mach-ux500/hotplug.c
··· 15 15 #include <asm/cacheflush.h> 16 16 #include <asm/smp_plat.h> 17 17 18 - #include <mach/setup.h> 18 + #include "setup.h" 19 19 20 20 /* 21 21 * platform-specific code to shutdown a CPU
+2 -2
arch/arm/mach-ux500/id.c
··· 14 14 #include <asm/cacheflush.h> 15 15 #include <asm/mach/map.h> 16 16 17 - #include <mach/hardware.h> 18 - #include <mach/setup.h> 17 + #include "setup.h" 19 18 19 + #include "db8500-regs.h" 20 20 #include "id.h" 21 21 22 22 struct dbx500_asic_id dbx500_id;
+28
arch/arm/mach-ux500/include/mach/db8500-regs.h arch/arm/mach-ux500/db8500-regs.h
··· 170 170 /* SoC identification number information */ 171 171 #define U8500_BB_UID_BASE (U8500_BACKUPRAM1_BASE + 0xFC0) 172 172 173 + /* Offsets to specific addresses in some IP blocks for DMA */ 174 + #define MSP_TX_RX_REG_OFFSET 0 175 + #define CRYP1_RX_REG_OFFSET 0x10 176 + #define CRYP1_TX_REG_OFFSET 0x8 177 + #define HASH1_TX_REG_OFFSET 0x4 178 + 179 + /* 180 + * Macros to get at IO space when running virtually 181 + * We dont map all the peripherals, let ioremap do 182 + * this for us. We map only very basic peripherals here. 183 + */ 184 + #define U8500_IO_VIRTUAL 0xf0000000 185 + #define U8500_IO_PHYSICAL 0xa0000000 186 + /* This is where we map in the ROM to check ASIC IDs */ 187 + #define UX500_VIRT_ROM 0xf0000000 188 + 189 + /* This macro is used in assembly, so no cast */ 190 + #define IO_ADDRESS(x) \ 191 + (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) 192 + 193 + /* typesafe io address */ 194 + #define __io_address(n) IOMEM(IO_ADDRESS(n)) 195 + 196 + /* Used by some plat-nomadik code */ 197 + #define io_p2v(n) __io_address(n) 198 + 199 + #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 200 + 173 201 #endif
-39
arch/arm/mach-ux500/include/mach/debug-macro.S
··· 1 - /* 2 - * Debugging macro include header 3 - * 4 - * Copyright (C) 2009 ST-Ericsson 5 - * 6 - * This program is free software; you can redistribute it and/or modify 7 - * it under the terms of the GNU General Public License version 2 as 8 - * published by the Free Software Foundation. 9 - * 10 - */ 11 - #include <mach/hardware.h> 12 - 13 - #if CONFIG_UX500_DEBUG_UART > 2 14 - #error Invalid Ux500 debug UART 15 - #endif 16 - 17 - /* 18 - * DEBUG_LL only works if only one SOC is built in. We don't use #else below 19 - * in order to get "__UX500_UART redefined" warnings if more than one SOC is 20 - * built, so that there's some hint during the build that something is wrong. 21 - */ 22 - 23 - #ifdef CONFIG_UX500_SOC_DB8500 24 - #define __UX500_UART(n) U8500_UART##n##_BASE 25 - #endif 26 - 27 - #ifndef __UX500_UART 28 - #error Unknown SOC 29 - #endif 30 - 31 - #define UX500_UART(n) __UX500_UART(n) 32 - #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) 33 - 34 - .macro addruart, rp, rv, tmp 35 - ldr \rp, =UART_BASE @ no, physical address 36 - ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address 37 - .endm 38 - 39 - #include <asm/hardware/debug-pl01x.S>
arch/arm/mach-ux500/include/mach/devices.h arch/arm/mach-ux500/devices.h
-47
arch/arm/mach-ux500/include/mach/hardware.h
··· 1 - /* 2 - * Copyright (C) 2009 ST-Ericsson. 3 - * 4 - * U8500 hardware definitions 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - #ifndef __MACH_HARDWARE_H 11 - #define __MACH_HARDWARE_H 12 - 13 - /* 14 - * Macros to get at IO space when running virtually 15 - * We dont map all the peripherals, let ioremap do 16 - * this for us. We map only very basic peripherals here. 17 - */ 18 - #define U8500_IO_VIRTUAL 0xf0000000 19 - #define U8500_IO_PHYSICAL 0xa0000000 20 - /* This is where we map in the ROM to check ASIC IDs */ 21 - #define UX500_VIRT_ROM 0xf0000000 22 - 23 - /* This macro is used in assembly, so no cast */ 24 - #define IO_ADDRESS(x) \ 25 - (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) 26 - 27 - /* typesafe io address */ 28 - #define __io_address(n) IOMEM(IO_ADDRESS(n)) 29 - 30 - /* Used by some plat-nomadik code */ 31 - #define io_p2v(n) __io_address(n) 32 - 33 - #include <mach/db8500-regs.h> 34 - 35 - #define MSP_TX_RX_REG_OFFSET 0 36 - #define CRYP1_RX_REG_OFFSET 0x10 37 - #define CRYP1_TX_REG_OFFSET 0x8 38 - #define HASH1_TX_REG_OFFSET 0x4 39 - 40 - #ifndef __ASSEMBLY__ 41 - 42 - extern void __iomem *_PRCMU_BASE; 43 - 44 - #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 45 - 46 - #endif /* __ASSEMBLY__ */ 47 - #endif /* __MACH_HARDWARE_H */
arch/arm/mach-ux500/include/mach/irqs-board-mop500.h arch/arm/mach-ux500/irqs-board-mop500.h
-25
arch/arm/mach-ux500/include/mach/irqs-db8500.h arch/arm/mach-ux500/irqs-db8500.h
··· 109 109 110 110 /* Virtual interrupts corresponding to the PRCMU wakeups. */ 111 111 #define IRQ_PRCMU_BASE IRQ_SOC_START 112 - #define NUM_PRCMU_WAKEUPS (IRQ_PRCMU_END - IRQ_PRCMU_BASE) 113 - 114 - #define IRQ_PRCMU_RTC (IRQ_PRCMU_BASE) 115 - #define IRQ_PRCMU_RTT0 (IRQ_PRCMU_BASE + 1) 116 - #define IRQ_PRCMU_RTT1 (IRQ_PRCMU_BASE + 2) 117 - #define IRQ_PRCMU_HSI0 (IRQ_PRCMU_BASE + 3) 118 - #define IRQ_PRCMU_HSI1 (IRQ_PRCMU_BASE + 4) 119 - #define IRQ_PRCMU_CA_WAKE (IRQ_PRCMU_BASE + 5) 120 - #define IRQ_PRCMU_USB (IRQ_PRCMU_BASE + 6) 121 - #define IRQ_PRCMU_ABB (IRQ_PRCMU_BASE + 7) 122 - #define IRQ_PRCMU_ABB_FIFO (IRQ_PRCMU_BASE + 8) 123 - #define IRQ_PRCMU_ARM (IRQ_PRCMU_BASE + 9) 124 - #define IRQ_PRCMU_MODEM_SW_RESET_REQ (IRQ_PRCMU_BASE + 10) 125 - #define IRQ_PRCMU_GPIO0 (IRQ_PRCMU_BASE + 11) 126 - #define IRQ_PRCMU_GPIO1 (IRQ_PRCMU_BASE + 12) 127 - #define IRQ_PRCMU_GPIO2 (IRQ_PRCMU_BASE + 13) 128 - #define IRQ_PRCMU_GPIO3 (IRQ_PRCMU_BASE + 14) 129 - #define IRQ_PRCMU_GPIO4 (IRQ_PRCMU_BASE + 15) 130 - #define IRQ_PRCMU_GPIO5 (IRQ_PRCMU_BASE + 16) 131 - #define IRQ_PRCMU_GPIO6 (IRQ_PRCMU_BASE + 17) 132 - #define IRQ_PRCMU_GPIO7 (IRQ_PRCMU_BASE + 18) 133 - #define IRQ_PRCMU_GPIO8 (IRQ_PRCMU_BASE + 19) 134 - #define IRQ_PRCMU_CA_SLEEP (IRQ_PRCMU_BASE + 20) 135 - #define IRQ_PRCMU_HOTMON_LOW (IRQ_PRCMU_BASE + 21) 136 - #define IRQ_PRCMU_HOTMON_HIGH (IRQ_PRCMU_BASE + 22) 137 112 #define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23) 138 113 139 114 /*
+2 -4
arch/arm/mach-ux500/include/mach/irqs.h arch/arm/mach-ux500/irqs.h
··· 10 10 #ifndef ASM_ARCH_IRQS_H 11 11 #define ASM_ARCH_IRQS_H 12 12 13 - #include <mach/hardware.h> 14 - 15 13 #define IRQ_LOCALTIMER 29 16 14 #define IRQ_LOCALWDOG 30 17 15 ··· 34 36 /* This will be overridden by SoC-specific irq headers */ 35 37 #define IRQ_SOC_END IRQ_SOC_START 36 38 37 - #include <mach/irqs-db8500.h> 39 + #include "irqs-db8500.h" 38 40 39 41 #define IRQ_BOARD_START IRQ_SOC_END 40 42 /* This will be overridden by board-specific irq headers */ 41 43 #define IRQ_BOARD_END IRQ_BOARD_START 42 44 43 45 #ifdef CONFIG_MACH_MOP500 44 - #include <mach/irqs-board-mop500.h> 46 + #include "irqs-board-mop500.h" 45 47 #endif 46 48 47 49 #define UX500_NR_IRQS IRQ_BOARD_END
arch/arm/mach-ux500/include/mach/msp.h include/linux/platform_data/asoc-ux500-msp.h
arch/arm/mach-ux500/include/mach/setup.h arch/arm/mach-ux500/setup.h
-6
arch/arm/mach-ux500/include/mach/timex.h
··· 1 - #ifndef __ASM_ARCH_TIMEX_H 2 - #define __ASM_ARCH_TIMEX_H 3 - 4 - #define CLOCK_TICK_RATE 110000000 5 - 6 - #endif
-57
arch/arm/mach-ux500/include/mach/uncompress.h
··· 1 - /* 2 - * Copyright (C) 2009 ST-Ericsson 3 - * 4 - * This program is free software; you can redistribute it and/or modify 5 - * it under the terms of the GNU General Public License as published by 6 - * the Free Software Foundation; either version 2 of the License, or 7 - * (at your option) any later version. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - * 14 - * You should have received a copy of the GNU General Public License 15 - * along with this program; if not, write to the Free Software 16 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 - */ 18 - #ifndef __ASM_ARCH_UNCOMPRESS_H 19 - #define __ASM_ARCH_UNCOMPRESS_H 20 - 21 - #include <asm/setup.h> 22 - #include <asm/mach-types.h> 23 - #include <linux/io.h> 24 - #include <linux/amba/serial.h> 25 - #include <mach/hardware.h> 26 - 27 - void __iomem *ux500_uart_base; 28 - 29 - static void putc(const char c) 30 - { 31 - /* Do nothing if the UART is not enabled. */ 32 - if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1)) 33 - return; 34 - 35 - if (c == '\n') 36 - putc('\r'); 37 - 38 - while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 5)) 39 - barrier(); 40 - __raw_writeb(c, ux500_uart_base + UART01x_DR); 41 - } 42 - 43 - static void flush(void) 44 - { 45 - if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1)) 46 - return; 47 - while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 3)) 48 - barrier(); 49 - } 50 - 51 - static inline void arch_decomp_setup(void) 52 - { 53 - /* Use machine_is_foo() macro if you need to switch base someday */ 54 - ux500_uart_base = (void __iomem *)U8500_UART2_BASE; 55 - } 56 - 57 - #endif /* __ASM_ARCH_UNCOMPRESS_H */
+2 -2
arch/arm/mach-ux500/platsmp.c
··· 22 22 #include <asm/smp_plat.h> 23 23 #include <asm/smp_scu.h> 24 24 25 - #include <mach/hardware.h> 26 - #include <mach/setup.h> 25 + #include "setup.h" 27 26 27 + #include "db8500-regs.h" 28 28 #include "id.h" 29 29 30 30 /* This is called from headsmp.S to wakeup the secondary core */
+167
arch/arm/mach-ux500/pm.c
··· 1 + /* 2 + * Copyright (C) ST-Ericsson SA 2010-2013 3 + * Author: Rickard Andersson <rickard.andersson@stericsson.com> for 4 + * ST-Ericsson. 5 + * Author: Daniel Lezcano <daniel.lezcano@linaro.org> for Linaro. 6 + * License terms: GNU General Public License (GPL) version 2 7 + * 8 + */ 9 + 10 + #include <linux/kernel.h> 11 + #include <linux/irqchip/arm-gic.h> 12 + #include <linux/delay.h> 13 + #include <linux/io.h> 14 + #include <linux/platform_data/arm-ux500-pm.h> 15 + 16 + #include "db8500-regs.h" 17 + 18 + /* ARM WFI Standby signal register */ 19 + #define PRCM_ARM_WFI_STANDBY (prcmu_base + 0x130) 20 + #define PRCM_ARM_WFI_STANDBY_WFI0 0x08 21 + #define PRCM_ARM_WFI_STANDBY_WFI1 0x10 22 + #define PRCM_IOCR (prcmu_base + 0x310) 23 + #define PRCM_IOCR_IOFORCE 0x1 24 + 25 + /* Dual A9 core interrupt management unit registers */ 26 + #define PRCM_A9_MASK_REQ (prcmu_base + 0x328) 27 + #define PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ 0x1 28 + 29 + #define PRCM_A9_MASK_ACK (prcmu_base + 0x32c) 30 + #define PRCM_ARMITMSK31TO0 (prcmu_base + 0x11c) 31 + #define PRCM_ARMITMSK63TO32 (prcmu_base + 0x120) 32 + #define PRCM_ARMITMSK95TO64 (prcmu_base + 0x124) 33 + #define PRCM_ARMITMSK127TO96 (prcmu_base + 0x128) 34 + #define PRCM_POWER_STATE_VAL (prcmu_base + 0x25C) 35 + #define PRCM_ARMITVAL31TO0 (prcmu_base + 0x260) 36 + #define PRCM_ARMITVAL63TO32 (prcmu_base + 0x264) 37 + #define PRCM_ARMITVAL95TO64 (prcmu_base + 0x268) 38 + #define PRCM_ARMITVAL127TO96 (prcmu_base + 0x26C) 39 + 40 + static void __iomem *prcmu_base; 41 + 42 + /* This function decouple the gic from the prcmu */ 43 + int prcmu_gic_decouple(void) 44 + { 45 + u32 val = readl(PRCM_A9_MASK_REQ); 46 + 47 + /* Set bit 0 register value to 1 */ 48 + writel(val | PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, 49 + PRCM_A9_MASK_REQ); 50 + 51 + /* Make sure the register is updated */ 52 + readl(PRCM_A9_MASK_REQ); 53 + 54 + /* Wait a few cycles for the gic mask completion */ 55 + udelay(1); 56 + 57 + return 0; 58 + } 59 + 60 + /* This function recouple the gic with the prcmu */ 61 + int prcmu_gic_recouple(void) 62 + { 63 + u32 val = readl(PRCM_A9_MASK_REQ); 64 + 65 + /* Set bit 0 register value to 0 */ 66 + writel(val & ~PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, PRCM_A9_MASK_REQ); 67 + 68 + return 0; 69 + } 70 + 71 + #define PRCMU_GIC_NUMBER_REGS 5 72 + 73 + /* 74 + * This function checks if there are pending irq on the gic. It only 75 + * makes sense if the gic has been decoupled before with the 76 + * db8500_prcmu_gic_decouple function. Disabling an interrupt only 77 + * disables the forwarding of the interrupt to any CPU interface. It 78 + * does not prevent the interrupt from changing state, for example 79 + * becoming pending, or active and pending if it is already 80 + * active. Hence, we have to check the interrupt is pending *and* is 81 + * active. 82 + */ 83 + bool prcmu_gic_pending_irq(void) 84 + { 85 + u32 pr; /* Pending register */ 86 + u32 er; /* Enable register */ 87 + void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE); 88 + int i; 89 + 90 + /* 5 registers. STI & PPI not skipped */ 91 + for (i = 0; i < PRCMU_GIC_NUMBER_REGS; i++) { 92 + 93 + pr = readl_relaxed(dist_base + GIC_DIST_PENDING_SET + i * 4); 94 + er = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4); 95 + 96 + if (pr & er) 97 + return true; /* There is a pending interrupt */ 98 + } 99 + 100 + return false; 101 + } 102 + 103 + /* 104 + * This function checks if there are pending interrupt on the 105 + * prcmu which has been delegated to monitor the irqs with the 106 + * db8500_prcmu_copy_gic_settings function. 107 + */ 108 + bool prcmu_pending_irq(void) 109 + { 110 + u32 it, im; 111 + int i; 112 + 113 + for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) { 114 + it = readl(PRCM_ARMITVAL31TO0 + i * 4); 115 + im = readl(PRCM_ARMITMSK31TO0 + i * 4); 116 + if (it & im) 117 + return true; /* There is a pending interrupt */ 118 + } 119 + 120 + return false; 121 + } 122 + 123 + /* 124 + * This function checks if the specified cpu is in in WFI. It's usage 125 + * makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple 126 + * function. Of course passing smp_processor_id() to this function will 127 + * always return false... 128 + */ 129 + bool prcmu_is_cpu_in_wfi(int cpu) 130 + { 131 + return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : 132 + PRCM_ARM_WFI_STANDBY_WFI0; 133 + } 134 + 135 + /* 136 + * This function copies the gic SPI settings to the prcmu in order to 137 + * monitor them and abort/finish the retention/off sequence or state. 138 + */ 139 + int prcmu_copy_gic_settings(void) 140 + { 141 + u32 er; /* Enable register */ 142 + void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE); 143 + int i; 144 + 145 + /* We skip the STI and PPI */ 146 + for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) { 147 + er = readl_relaxed(dist_base + 148 + GIC_DIST_ENABLE_SET + (i + 1) * 4); 149 + writel(er, PRCM_ARMITMSK31TO0 + i * 4); 150 + } 151 + 152 + return 0; 153 + } 154 + 155 + void __init ux500_pm_init(u32 phy_base, u32 size) 156 + { 157 + prcmu_base = ioremap(phy_base, size); 158 + if (!prcmu_base) { 159 + pr_err("could not remap PRCMU for PM functions\n"); 160 + return; 161 + } 162 + /* 163 + * On watchdog reboot the GIC is in some cases decoupled. 164 + * This will make sure that the GIC is correctly configured. 165 + */ 166 + prcmu_gic_recouple(); 167 + }
+3 -3
arch/arm/mach-ux500/timer.c
··· 14 14 15 15 #include <asm/smp_twd.h> 16 16 17 - #include <mach/setup.h> 18 - #include <mach/hardware.h> 19 - #include <mach/irqs.h> 17 + #include "setup.h" 18 + #include "irqs.h" 20 19 20 + #include "db8500-regs.h" 21 21 #include "id.h" 22 22 23 23 #ifdef CONFIG_HAVE_ARM_TWD
+1 -1
arch/arm/mach-ux500/usb.c
··· 10 10 #include <linux/platform_data/usb-musb-ux500.h> 11 11 #include <linux/platform_data/dma-ste-dma40.h> 12 12 13 - #include <mach/hardware.h> 13 + #include "db8500-regs.h" 14 14 15 15 #define MUSB_DMA40_RX_CH { \ 16 16 .mode = STEDMA40_MODE_LOGICAL, \
-1
drivers/clk/ux500/clk-prcc.c
··· 13 13 #include <linux/io.h> 14 14 #include <linux/err.h> 15 15 #include <linux/types.h> 16 - #include <mach/hardware.h> 17 16 18 17 #include "clk.h" 19 18
+71 -71
drivers/clk/ux500/u8500_clk.c
··· 12 12 #include <linux/clk-provider.h> 13 13 #include <linux/mfd/dbx500-prcmu.h> 14 14 #include <linux/platform_data/clk-ux500.h> 15 - #include <mach/db8500-regs.h> 16 15 #include "clk.h" 17 16 18 - void u8500_clk_init(void) 17 + void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, 18 + u32 clkrst5_base, u32 clkrst6_base) 19 19 { 20 20 struct prcmu_fw_version *fw_version; 21 21 const char *sgaclk_parent = NULL; ··· 215 215 */ 216 216 217 217 /* PRCC P-clocks */ 218 - clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", U8500_CLKRST1_BASE, 218 + clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", clkrst1_base, 219 219 BIT(0), 0); 220 220 clk_register_clkdev(clk, "apb_pclk", "uart0"); 221 221 222 - clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", U8500_CLKRST1_BASE, 222 + clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", clkrst1_base, 223 223 BIT(1), 0); 224 224 clk_register_clkdev(clk, "apb_pclk", "uart1"); 225 225 226 - clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", U8500_CLKRST1_BASE, 226 + clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", clkrst1_base, 227 227 BIT(2), 0); 228 228 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.1"); 229 229 230 - clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", U8500_CLKRST1_BASE, 230 + clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", clkrst1_base, 231 231 BIT(3), 0); 232 232 clk_register_clkdev(clk, "apb_pclk", "msp0"); 233 233 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.0"); 234 234 235 - clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", U8500_CLKRST1_BASE, 235 + clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", clkrst1_base, 236 236 BIT(4), 0); 237 237 clk_register_clkdev(clk, "apb_pclk", "msp1"); 238 238 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.1"); 239 239 240 - clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", U8500_CLKRST1_BASE, 240 + clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", clkrst1_base, 241 241 BIT(5), 0); 242 242 clk_register_clkdev(clk, "apb_pclk", "sdi0"); 243 243 244 - clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", U8500_CLKRST1_BASE, 244 + clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", clkrst1_base, 245 245 BIT(6), 0); 246 246 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.2"); 247 247 248 - clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", U8500_CLKRST1_BASE, 248 + clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", clkrst1_base, 249 249 BIT(7), 0); 250 250 clk_register_clkdev(clk, NULL, "spi3"); 251 251 252 - clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", U8500_CLKRST1_BASE, 252 + clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", clkrst1_base, 253 253 BIT(8), 0); 254 254 clk_register_clkdev(clk, "apb_pclk", "slimbus0"); 255 255 256 - clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", U8500_CLKRST1_BASE, 256 + clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", clkrst1_base, 257 257 BIT(9), 0); 258 258 clk_register_clkdev(clk, NULL, "gpio.0"); 259 259 clk_register_clkdev(clk, NULL, "gpio.1"); 260 260 clk_register_clkdev(clk, NULL, "gpioblock0"); 261 261 262 - clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", U8500_CLKRST1_BASE, 262 + clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", clkrst1_base, 263 263 BIT(10), 0); 264 264 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.4"); 265 265 266 - clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", U8500_CLKRST1_BASE, 266 + clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", clkrst1_base, 267 267 BIT(11), 0); 268 268 clk_register_clkdev(clk, "apb_pclk", "msp3"); 269 269 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.3"); 270 270 271 - clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", U8500_CLKRST2_BASE, 271 + clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", clkrst2_base, 272 272 BIT(0), 0); 273 273 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.3"); 274 274 275 - clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", U8500_CLKRST2_BASE, 275 + clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", clkrst2_base, 276 276 BIT(1), 0); 277 277 clk_register_clkdev(clk, NULL, "spi2"); 278 278 279 - clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", U8500_CLKRST2_BASE, 279 + clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", clkrst2_base, 280 280 BIT(2), 0); 281 281 clk_register_clkdev(clk, NULL, "spi1"); 282 282 283 - clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", U8500_CLKRST2_BASE, 283 + clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", clkrst2_base, 284 284 BIT(3), 0); 285 285 clk_register_clkdev(clk, NULL, "pwl"); 286 286 287 - clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", U8500_CLKRST2_BASE, 287 + clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", clkrst2_base, 288 288 BIT(4), 0); 289 289 clk_register_clkdev(clk, "apb_pclk", "sdi4"); 290 290 291 - clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", U8500_CLKRST2_BASE, 291 + clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", clkrst2_base, 292 292 BIT(5), 0); 293 293 clk_register_clkdev(clk, "apb_pclk", "msp2"); 294 294 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.2"); 295 295 296 - clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", U8500_CLKRST2_BASE, 296 + clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", clkrst2_base, 297 297 BIT(6), 0); 298 298 clk_register_clkdev(clk, "apb_pclk", "sdi1"); 299 299 300 - clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", U8500_CLKRST2_BASE, 300 + clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", clkrst2_base, 301 301 BIT(7), 0); 302 302 clk_register_clkdev(clk, "apb_pclk", "sdi3"); 303 303 304 - clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", U8500_CLKRST2_BASE, 304 + clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", clkrst2_base, 305 305 BIT(8), 0); 306 306 clk_register_clkdev(clk, NULL, "spi0"); 307 307 308 - clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", U8500_CLKRST2_BASE, 308 + clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", clkrst2_base, 309 309 BIT(9), 0); 310 310 clk_register_clkdev(clk, "hsir_hclk", "ste_hsi.0"); 311 311 312 - clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", U8500_CLKRST2_BASE, 312 + clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", clkrst2_base, 313 313 BIT(10), 0); 314 314 clk_register_clkdev(clk, "hsit_hclk", "ste_hsi.0"); 315 315 316 - clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", U8500_CLKRST2_BASE, 316 + clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", clkrst2_base, 317 317 BIT(11), 0); 318 318 clk_register_clkdev(clk, NULL, "gpio.6"); 319 319 clk_register_clkdev(clk, NULL, "gpio.7"); 320 320 clk_register_clkdev(clk, NULL, "gpioblock1"); 321 321 322 - clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", U8500_CLKRST2_BASE, 322 + clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", clkrst2_base, 323 323 BIT(12), 0); 324 324 325 - clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", U8500_CLKRST3_BASE, 325 + clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", clkrst3_base, 326 326 BIT(0), 0); 327 327 clk_register_clkdev(clk, NULL, "fsmc"); 328 328 329 - clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", U8500_CLKRST3_BASE, 329 + clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", clkrst3_base, 330 330 BIT(1), 0); 331 331 clk_register_clkdev(clk, "apb_pclk", "ssp0"); 332 332 333 - clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", U8500_CLKRST3_BASE, 333 + clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", clkrst3_base, 334 334 BIT(2), 0); 335 335 clk_register_clkdev(clk, "apb_pclk", "ssp1"); 336 336 337 - clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", U8500_CLKRST3_BASE, 337 + clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", clkrst3_base, 338 338 BIT(3), 0); 339 339 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.0"); 340 340 341 - clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", U8500_CLKRST3_BASE, 341 + clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", clkrst3_base, 342 342 BIT(4), 0); 343 343 clk_register_clkdev(clk, "apb_pclk", "sdi2"); 344 344 345 - clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", U8500_CLKRST3_BASE, 345 + clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", clkrst3_base, 346 346 BIT(5), 0); 347 347 clk_register_clkdev(clk, "apb_pclk", "ske"); 348 348 clk_register_clkdev(clk, "apb_pclk", "nmk-ske-keypad"); 349 349 350 - clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", U8500_CLKRST3_BASE, 350 + clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", clkrst3_base, 351 351 BIT(6), 0); 352 352 clk_register_clkdev(clk, "apb_pclk", "uart2"); 353 353 354 - clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", U8500_CLKRST3_BASE, 354 + clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", clkrst3_base, 355 355 BIT(7), 0); 356 356 clk_register_clkdev(clk, "apb_pclk", "sdi5"); 357 357 358 - clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", U8500_CLKRST3_BASE, 358 + clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", clkrst3_base, 359 359 BIT(8), 0); 360 360 clk_register_clkdev(clk, NULL, "gpio.2"); 361 361 clk_register_clkdev(clk, NULL, "gpio.3"); ··· 363 363 clk_register_clkdev(clk, NULL, "gpio.5"); 364 364 clk_register_clkdev(clk, NULL, "gpioblock2"); 365 365 366 - clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", U8500_CLKRST5_BASE, 366 + clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", clkrst5_base, 367 367 BIT(0), 0); 368 368 clk_register_clkdev(clk, "usb", "musb-ux500.0"); 369 369 370 - clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", U8500_CLKRST5_BASE, 370 + clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", clkrst5_base, 371 371 BIT(1), 0); 372 372 clk_register_clkdev(clk, NULL, "gpio.8"); 373 373 clk_register_clkdev(clk, NULL, "gpioblock3"); 374 374 375 - clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", U8500_CLKRST6_BASE, 375 + clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", clkrst6_base, 376 376 BIT(0), 0); 377 377 clk_register_clkdev(clk, "apb_pclk", "rng"); 378 378 379 - clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", U8500_CLKRST6_BASE, 379 + clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", clkrst6_base, 380 380 BIT(1), 0); 381 381 clk_register_clkdev(clk, NULL, "cryp0"); 382 382 clk_register_clkdev(clk, NULL, "cryp1"); 383 383 384 - clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", U8500_CLKRST6_BASE, 384 + clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", clkrst6_base, 385 385 BIT(2), 0); 386 386 clk_register_clkdev(clk, NULL, "hash0"); 387 387 388 - clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", U8500_CLKRST6_BASE, 388 + clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", clkrst6_base, 389 389 BIT(3), 0); 390 390 clk_register_clkdev(clk, NULL, "pka"); 391 391 392 - clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", U8500_CLKRST6_BASE, 392 + clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", clkrst6_base, 393 393 BIT(4), 0); 394 394 clk_register_clkdev(clk, NULL, "hash1"); 395 395 396 - clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", U8500_CLKRST6_BASE, 396 + clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", clkrst6_base, 397 397 BIT(5), 0); 398 398 clk_register_clkdev(clk, NULL, "cfgreg"); 399 399 400 - clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", U8500_CLKRST6_BASE, 400 + clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", clkrst6_base, 401 401 BIT(6), 0); 402 402 clk_register_clkdev(clk, "apb_pclk", "mtu0"); 403 403 404 - clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", U8500_CLKRST6_BASE, 404 + clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", clkrst6_base, 405 405 BIT(7), 0); 406 406 clk_register_clkdev(clk, "apb_pclk", "mtu1"); 407 407 ··· 415 415 416 416 /* Periph1 */ 417 417 clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk", 418 - U8500_CLKRST1_BASE, BIT(0), CLK_SET_RATE_GATE); 418 + clkrst1_base, BIT(0), CLK_SET_RATE_GATE); 419 419 clk_register_clkdev(clk, NULL, "uart0"); 420 420 421 421 clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk", 422 - U8500_CLKRST1_BASE, BIT(1), CLK_SET_RATE_GATE); 422 + clkrst1_base, BIT(1), CLK_SET_RATE_GATE); 423 423 clk_register_clkdev(clk, NULL, "uart1"); 424 424 425 425 clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk", 426 - U8500_CLKRST1_BASE, BIT(2), CLK_SET_RATE_GATE); 426 + clkrst1_base, BIT(2), CLK_SET_RATE_GATE); 427 427 clk_register_clkdev(clk, NULL, "nmk-i2c.1"); 428 428 429 429 clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk", 430 - U8500_CLKRST1_BASE, BIT(3), CLK_SET_RATE_GATE); 430 + clkrst1_base, BIT(3), CLK_SET_RATE_GATE); 431 431 clk_register_clkdev(clk, NULL, "msp0"); 432 432 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.0"); 433 433 434 434 clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk", 435 - U8500_CLKRST1_BASE, BIT(4), CLK_SET_RATE_GATE); 435 + clkrst1_base, BIT(4), CLK_SET_RATE_GATE); 436 436 clk_register_clkdev(clk, NULL, "msp1"); 437 437 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.1"); 438 438 439 439 clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk", 440 - U8500_CLKRST1_BASE, BIT(5), CLK_SET_RATE_GATE); 440 + clkrst1_base, BIT(5), CLK_SET_RATE_GATE); 441 441 clk_register_clkdev(clk, NULL, "sdi0"); 442 442 443 443 clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk", 444 - U8500_CLKRST1_BASE, BIT(6), CLK_SET_RATE_GATE); 444 + clkrst1_base, BIT(6), CLK_SET_RATE_GATE); 445 445 clk_register_clkdev(clk, NULL, "nmk-i2c.2"); 446 446 447 447 clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk", 448 - U8500_CLKRST1_BASE, BIT(8), CLK_SET_RATE_GATE); 448 + clkrst1_base, BIT(8), CLK_SET_RATE_GATE); 449 449 clk_register_clkdev(clk, NULL, "slimbus0"); 450 450 451 451 clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk", 452 - U8500_CLKRST1_BASE, BIT(9), CLK_SET_RATE_GATE); 452 + clkrst1_base, BIT(9), CLK_SET_RATE_GATE); 453 453 clk_register_clkdev(clk, NULL, "nmk-i2c.4"); 454 454 455 455 clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk", 456 - U8500_CLKRST1_BASE, BIT(10), CLK_SET_RATE_GATE); 456 + clkrst1_base, BIT(10), CLK_SET_RATE_GATE); 457 457 clk_register_clkdev(clk, NULL, "msp3"); 458 458 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3"); 459 459 460 460 /* Periph2 */ 461 461 clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk", 462 - U8500_CLKRST2_BASE, BIT(0), CLK_SET_RATE_GATE); 462 + clkrst2_base, BIT(0), CLK_SET_RATE_GATE); 463 463 clk_register_clkdev(clk, NULL, "nmk-i2c.3"); 464 464 465 465 clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk", 466 - U8500_CLKRST2_BASE, BIT(2), CLK_SET_RATE_GATE); 466 + clkrst2_base, BIT(2), CLK_SET_RATE_GATE); 467 467 clk_register_clkdev(clk, NULL, "sdi4"); 468 468 469 469 clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk", 470 - U8500_CLKRST2_BASE, BIT(3), CLK_SET_RATE_GATE); 470 + clkrst2_base, BIT(3), CLK_SET_RATE_GATE); 471 471 clk_register_clkdev(clk, NULL, "msp2"); 472 472 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.2"); 473 473 474 474 clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk", 475 - U8500_CLKRST2_BASE, BIT(4), CLK_SET_RATE_GATE); 475 + clkrst2_base, BIT(4), CLK_SET_RATE_GATE); 476 476 clk_register_clkdev(clk, NULL, "sdi1"); 477 477 478 478 clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk", 479 - U8500_CLKRST2_BASE, BIT(5), CLK_SET_RATE_GATE); 479 + clkrst2_base, BIT(5), CLK_SET_RATE_GATE); 480 480 clk_register_clkdev(clk, NULL, "sdi3"); 481 481 482 482 /* Note that rate is received from parent. */ 483 483 clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk", 484 - U8500_CLKRST2_BASE, BIT(6), 484 + clkrst2_base, BIT(6), 485 485 CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); 486 486 clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk", 487 - U8500_CLKRST2_BASE, BIT(7), 487 + clkrst2_base, BIT(7), 488 488 CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); 489 489 490 490 /* Periph3 */ 491 491 clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk", 492 - U8500_CLKRST3_BASE, BIT(1), CLK_SET_RATE_GATE); 492 + clkrst3_base, BIT(1), CLK_SET_RATE_GATE); 493 493 clk_register_clkdev(clk, NULL, "ssp0"); 494 494 495 495 clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk", 496 - U8500_CLKRST3_BASE, BIT(2), CLK_SET_RATE_GATE); 496 + clkrst3_base, BIT(2), CLK_SET_RATE_GATE); 497 497 clk_register_clkdev(clk, NULL, "ssp1"); 498 498 499 499 clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk", 500 - U8500_CLKRST3_BASE, BIT(3), CLK_SET_RATE_GATE); 500 + clkrst3_base, BIT(3), CLK_SET_RATE_GATE); 501 501 clk_register_clkdev(clk, NULL, "nmk-i2c.0"); 502 502 503 503 clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk", 504 - U8500_CLKRST3_BASE, BIT(4), CLK_SET_RATE_GATE); 504 + clkrst3_base, BIT(4), CLK_SET_RATE_GATE); 505 505 clk_register_clkdev(clk, NULL, "sdi2"); 506 506 507 507 clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k", 508 - U8500_CLKRST3_BASE, BIT(5), CLK_SET_RATE_GATE); 508 + clkrst3_base, BIT(5), CLK_SET_RATE_GATE); 509 509 clk_register_clkdev(clk, NULL, "ske"); 510 510 clk_register_clkdev(clk, NULL, "nmk-ske-keypad"); 511 511 512 512 clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk", 513 - U8500_CLKRST3_BASE, BIT(6), CLK_SET_RATE_GATE); 513 + clkrst3_base, BIT(6), CLK_SET_RATE_GATE); 514 514 clk_register_clkdev(clk, NULL, "uart2"); 515 515 516 516 clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk", 517 - U8500_CLKRST3_BASE, BIT(7), CLK_SET_RATE_GATE); 517 + clkrst3_base, BIT(7), CLK_SET_RATE_GATE); 518 518 clk_register_clkdev(clk, NULL, "sdi5"); 519 519 520 520 /* Periph6 */ 521 521 clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk", 522 - U8500_CLKRST6_BASE, BIT(0), CLK_SET_RATE_GATE); 522 + clkrst6_base, BIT(0), CLK_SET_RATE_GATE); 523 523 clk_register_clkdev(clk, NULL, "rng"); 524 524 }
-3
drivers/clocksource/clksrc-dbx500-prcmu.c
··· 17 17 18 18 #include <asm/sched_clock.h> 19 19 20 - #include <mach/setup.h> 21 - #include <mach/hardware.h> 22 - 23 20 #define RATE_32K 32768 24 21 25 22 #define TIMER_MODE_CONTINOUS 0x1
-2
drivers/crypto/ux500/cryp/cryp.c
··· 12 12 #include <linux/kernel.h> 13 13 #include <linux/types.h> 14 14 15 - #include <mach/hardware.h> 16 - 17 15 #include "cryp_p.h" 18 16 #include "cryp.h" 19 17
-1
drivers/crypto/ux500/cryp/cryp_core.c
··· 32 32 #include <crypto/scatterwalk.h> 33 33 34 34 #include <linux/platform_data/crypto-ux500.h> 35 - #include <mach/hardware.h> 36 35 37 36 #include "cryp_p.h" 38 37 #include "cryp.h"
-1
drivers/crypto/ux500/hash/hash_core.c
··· 32 32 #include <crypto/algapi.h> 33 33 34 34 #include <linux/platform_data/crypto-ux500.h> 35 - #include <mach/hardware.h> 36 35 37 36 #include "hash_alg.h" 38 37
+152 -164
drivers/mfd/db8500-prcmu.c
··· 26 26 #include <linux/fs.h> 27 27 #include <linux/platform_device.h> 28 28 #include <linux/uaccess.h> 29 - #include <linux/irqchip/arm-gic.h> 30 29 #include <linux/mfd/core.h> 31 30 #include <linux/mfd/dbx500-prcmu.h> 32 31 #include <linux/mfd/abx500/ab8500.h> ··· 33 34 #include <linux/regulator/machine.h> 34 35 #include <linux/cpufreq.h> 35 36 #include <linux/platform_data/ux500_wdt.h> 36 - #include <mach/hardware.h> 37 - #include <mach/irqs.h> 38 - #include <mach/db8500-regs.h> 37 + #include <linux/platform_data/db8500_thermal.h> 39 38 #include "dbx500-prcmu-regs.h" 40 39 41 40 /* Index of different voltages to be used when accessing AVSData */ ··· 273 276 * the bits in the bit field are not. (The bits also have a tendency to move 274 277 * around, to further complicate matters.) 275 278 */ 276 - #define IRQ_INDEX(_name) ((IRQ_PRCMU_##_name) - IRQ_PRCMU_BASE) 279 + #define IRQ_INDEX(_name) ((IRQ_PRCMU_##_name)) 277 280 #define IRQ_ENTRY(_name)[IRQ_INDEX(_name)] = (WAKEUP_BIT_##_name) 281 + 282 + #define IRQ_PRCMU_RTC 0 283 + #define IRQ_PRCMU_RTT0 1 284 + #define IRQ_PRCMU_RTT1 2 285 + #define IRQ_PRCMU_HSI0 3 286 + #define IRQ_PRCMU_HSI1 4 287 + #define IRQ_PRCMU_CA_WAKE 5 288 + #define IRQ_PRCMU_USB 6 289 + #define IRQ_PRCMU_ABB 7 290 + #define IRQ_PRCMU_ABB_FIFO 8 291 + #define IRQ_PRCMU_ARM 9 292 + #define IRQ_PRCMU_MODEM_SW_RESET_REQ 10 293 + #define IRQ_PRCMU_GPIO0 11 294 + #define IRQ_PRCMU_GPIO1 12 295 + #define IRQ_PRCMU_GPIO2 13 296 + #define IRQ_PRCMU_GPIO3 14 297 + #define IRQ_PRCMU_GPIO4 15 298 + #define IRQ_PRCMU_GPIO5 16 299 + #define IRQ_PRCMU_GPIO6 17 300 + #define IRQ_PRCMU_GPIO7 18 301 + #define IRQ_PRCMU_GPIO8 19 302 + #define IRQ_PRCMU_CA_SLEEP 20 303 + #define IRQ_PRCMU_HOTMON_LOW 21 304 + #define IRQ_PRCMU_HOTMON_HIGH 22 305 + #define NUM_PRCMU_WAKEUPS 23 306 + 278 307 static u32 prcmu_irq_bit[NUM_PRCMU_WAKEUPS] = { 279 308 IRQ_ENTRY(RTC), 280 309 IRQ_ENTRY(RTT0), ··· 445 422 446 423 /* Global var to runtime determine TCDM base for v2 or v1 */ 447 424 static __iomem void *tcdm_base; 425 + static __iomem void *prcmu_base; 448 426 449 427 struct clk_mgt { 450 - void __iomem *reg; 428 + u32 offset; 451 429 u32 pllsw; 452 430 int branch; 453 431 bool clk38div; ··· 623 599 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0) 624 600 cpu_relax(); 625 601 626 - writel(PRCMU_DSI_CLOCK_SETTING, PRCM_HDMICLK_MGT); 627 - writel(PRCMU_DSI_LP_CLOCK_SETTING, PRCM_TVCLK_MGT); 628 - writel(PRCMU_DPI_CLOCK_SETTING, PRCM_LCDCLK_MGT); 602 + writel(PRCMU_DSI_CLOCK_SETTING, prcmu_base + PRCM_HDMICLK_MGT); 603 + writel(PRCMU_DSI_LP_CLOCK_SETTING, prcmu_base + PRCM_TVCLK_MGT); 604 + writel(PRCMU_DPI_CLOCK_SETTING, prcmu_base + PRCM_LCDCLK_MGT); 629 605 630 606 /* Release the HW semaphore. */ 631 607 writel(0, PRCM_SEM); ··· 637 613 638 614 u32 db8500_prcmu_read(unsigned int reg) 639 615 { 640 - return readl(_PRCMU_BASE + reg); 616 + return readl(prcmu_base + reg); 641 617 } 642 618 643 619 void db8500_prcmu_write(unsigned int reg, u32 value) ··· 645 621 unsigned long flags; 646 622 647 623 spin_lock_irqsave(&prcmu_lock, flags); 648 - writel(value, (_PRCMU_BASE + reg)); 624 + writel(value, (prcmu_base + reg)); 649 625 spin_unlock_irqrestore(&prcmu_lock, flags); 650 626 } 651 627 ··· 655 631 unsigned long flags; 656 632 657 633 spin_lock_irqsave(&prcmu_lock, flags); 658 - val = readl(_PRCMU_BASE + reg); 634 + val = readl(prcmu_base + reg); 659 635 val = ((val & ~mask) | (value & mask)); 660 - writel(val, (_PRCMU_BASE + reg)); 636 + writel(val, (prcmu_base + reg)); 661 637 spin_unlock_irqrestore(&prcmu_lock, flags); 662 638 } 663 639 ··· 817 793 return readb(tcdm_base + PRCM_ACK_MB0_AP_PWRSTTR_STATUS); 818 794 } 819 795 820 - /* This function decouple the gic from the prcmu */ 821 - int db8500_prcmu_gic_decouple(void) 822 - { 823 - u32 val = readl(PRCM_A9_MASK_REQ); 824 - 825 - /* Set bit 0 register value to 1 */ 826 - writel(val | PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, 827 - PRCM_A9_MASK_REQ); 828 - 829 - /* Make sure the register is updated */ 830 - readl(PRCM_A9_MASK_REQ); 831 - 832 - /* Wait a few cycles for the gic mask completion */ 833 - udelay(1); 834 - 835 - return 0; 836 - } 837 - 838 - /* This function recouple the gic with the prcmu */ 839 - int db8500_prcmu_gic_recouple(void) 840 - { 841 - u32 val = readl(PRCM_A9_MASK_REQ); 842 - 843 - /* Set bit 0 register value to 0 */ 844 - writel(val & ~PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, PRCM_A9_MASK_REQ); 845 - 846 - return 0; 847 - } 848 - 849 - #define PRCMU_GIC_NUMBER_REGS 5 850 - 851 - /* 852 - * This function checks if there are pending irq on the gic. It only 853 - * makes sense if the gic has been decoupled before with the 854 - * db8500_prcmu_gic_decouple function. Disabling an interrupt only 855 - * disables the forwarding of the interrupt to any CPU interface. It 856 - * does not prevent the interrupt from changing state, for example 857 - * becoming pending, or active and pending if it is already 858 - * active. Hence, we have to check the interrupt is pending *and* is 859 - * active. 860 - */ 861 - bool db8500_prcmu_gic_pending_irq(void) 862 - { 863 - u32 pr; /* Pending register */ 864 - u32 er; /* Enable register */ 865 - void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE); 866 - int i; 867 - 868 - /* 5 registers. STI & PPI not skipped */ 869 - for (i = 0; i < PRCMU_GIC_NUMBER_REGS; i++) { 870 - 871 - pr = readl_relaxed(dist_base + GIC_DIST_PENDING_SET + i * 4); 872 - er = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4); 873 - 874 - if (pr & er) 875 - return true; /* There is a pending interrupt */ 876 - } 877 - 878 - return false; 879 - } 880 - 881 - /* 882 - * This function checks if there are pending interrupt on the 883 - * prcmu which has been delegated to monitor the irqs with the 884 - * db8500_prcmu_copy_gic_settings function. 885 - */ 886 - bool db8500_prcmu_pending_irq(void) 887 - { 888 - u32 it, im; 889 - int i; 890 - 891 - for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) { 892 - it = readl(PRCM_ARMITVAL31TO0 + i * 4); 893 - im = readl(PRCM_ARMITMSK31TO0 + i * 4); 894 - if (it & im) 895 - return true; /* There is a pending interrupt */ 896 - } 897 - 898 - return false; 899 - } 900 - 901 - /* 902 - * This function checks if the specified cpu is in in WFI. It's usage 903 - * makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple 904 - * function. Of course passing smp_processor_id() to this function will 905 - * always return false... 906 - */ 907 - bool db8500_prcmu_is_cpu_in_wfi(int cpu) 908 - { 909 - return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : 910 - PRCM_ARM_WFI_STANDBY_WFI0; 911 - } 912 - 913 - /* 914 - * This function copies the gic SPI settings to the prcmu in order to 915 - * monitor them and abort/finish the retention/off sequence or state. 916 - */ 917 - int db8500_prcmu_copy_gic_settings(void) 918 - { 919 - u32 er; /* Enable register */ 920 - void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE); 921 - int i; 922 - 923 - /* We skip the STI and PPI */ 924 - for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) { 925 - er = readl_relaxed(dist_base + 926 - GIC_DIST_ENABLE_SET + (i + 1) * 4); 927 - writel(er, PRCM_ARMITMSK31TO0 + i * 4); 928 - } 929 - 930 - return 0; 931 - } 932 - 933 796 /* This function should only be called while mb0_transfer.lock is held. */ 934 797 static void config_wakeups(void) 935 798 { ··· 970 1059 /* Divide the frequency of certain clocks by 2 for APE_50_PARTLY_25_OPP. */ 971 1060 static void request_even_slower_clocks(bool enable) 972 1061 { 973 - void __iomem *clock_reg[] = { 1062 + u32 clock_reg[] = { 974 1063 PRCM_ACLK_MGT, 975 1064 PRCM_DMACLK_MGT 976 1065 }; ··· 987 1076 u32 val; 988 1077 u32 div; 989 1078 990 - val = readl(clock_reg[i]); 1079 + val = readl(prcmu_base + clock_reg[i]); 991 1080 div = (val & PRCM_CLK_MGT_CLKPLLDIV_MASK); 992 1081 if (enable) { 993 1082 if ((div <= 1) || (div > 15)) { ··· 1003 1092 } 1004 1093 val = ((val & ~PRCM_CLK_MGT_CLKPLLDIV_MASK) | 1005 1094 (div & PRCM_CLK_MGT_CLKPLLDIV_MASK)); 1006 - writel(val, clock_reg[i]); 1095 + writel(val, prcmu_base + clock_reg[i]); 1007 1096 } 1008 1097 1009 1098 unlock_and_return: ··· 1357 1446 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0) 1358 1447 cpu_relax(); 1359 1448 1360 - val = readl(clk_mgt[clock].reg); 1449 + val = readl(prcmu_base + clk_mgt[clock].offset); 1361 1450 if (enable) { 1362 1451 val |= (PRCM_CLK_MGT_CLKEN | clk_mgt[clock].pllsw); 1363 1452 } else { 1364 1453 clk_mgt[clock].pllsw = (val & PRCM_CLK_MGT_CLKPLLSW_MASK); 1365 1454 val &= ~(PRCM_CLK_MGT_CLKEN | PRCM_CLK_MGT_CLKPLLSW_MASK); 1366 1455 } 1367 - writel(val, clk_mgt[clock].reg); 1456 + writel(val, prcmu_base + clk_mgt[clock].offset); 1368 1457 1369 1458 /* Release the HW semaphore. */ 1370 1459 writel(0, PRCM_SEM); ··· 1540 1629 u32 pllsw; 1541 1630 unsigned long rate = ROOT_CLOCK_RATE; 1542 1631 1543 - val = readl(clk_mgt[clock].reg); 1632 + val = readl(prcmu_base + clk_mgt[clock].offset); 1544 1633 1545 1634 if (val & PRCM_CLK_MGT_CLK38) { 1546 1635 if (clk_mgt[clock].clk38div && (val & PRCM_CLK_MGT_CLK38DIV)) ··· 1696 1785 unsigned long src_rate; 1697 1786 long rounded_rate; 1698 1787 1699 - val = readl(clk_mgt[clock].reg); 1788 + val = readl(prcmu_base + clk_mgt[clock].offset); 1700 1789 src_rate = clock_source_rate((val | clk_mgt[clock].pllsw), 1701 1790 clk_mgt[clock].branch); 1702 1791 div = clock_divider(src_rate, rate); ··· 1844 1933 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0) 1845 1934 cpu_relax(); 1846 1935 1847 - val = readl(clk_mgt[clock].reg); 1936 + val = readl(prcmu_base + clk_mgt[clock].offset); 1848 1937 src_rate = clock_source_rate((val | clk_mgt[clock].pllsw), 1849 1938 clk_mgt[clock].branch); 1850 1939 div = clock_divider(src_rate, rate); ··· 1872 1961 val &= ~PRCM_CLK_MGT_CLKPLLDIV_MASK; 1873 1962 val |= min(div, (u32)31); 1874 1963 } 1875 - writel(val, clk_mgt[clock].reg); 1964 + writel(val, prcmu_base + clk_mgt[clock].offset); 1876 1965 1877 1966 /* Release the HW semaphore. */ 1878 1967 writel(0, PRCM_SEM); ··· 2675 2764 .xlate = irq_domain_xlate_twocell, 2676 2765 }; 2677 2766 2678 - static int db8500_irq_init(struct device_node *np) 2767 + static int db8500_irq_init(struct device_node *np, int irq_base) 2679 2768 { 2680 - int irq_base = 0; 2681 2769 int i; 2682 2770 2683 2771 /* In the device tree case, just take some IRQs */ 2684 - if (!np) 2685 - irq_base = IRQ_PRCMU_BASE; 2772 + if (np) 2773 + irq_base = 0; 2686 2774 2687 2775 db8500_irq_domain = irq_domain_add_simple( 2688 2776 np, NUM_PRCMU_WAKEUPS, irq_base, ··· 2735 2825 } 2736 2826 } 2737 2827 2738 - void __init db8500_prcmu_early_init(void) 2828 + void __init db8500_prcmu_early_init(u32 phy_base, u32 size) 2739 2829 { 2830 + /* 2831 + * This is a temporary remap to bring up the clocks. It is 2832 + * subsequently replaces with a real remap. After the merge of 2833 + * the mailbox subsystem all of this early code goes away, and the 2834 + * clock driver can probe independently. An early initcall will 2835 + * still be needed, but it can be diverted into drivers/clk/ux500. 2836 + */ 2837 + prcmu_base = ioremap(phy_base, size); 2838 + if (!prcmu_base) 2839 + pr_err("%s: ioremap() of prcmu registers failed!\n", __func__); 2840 + 2740 2841 spin_lock_init(&mb0_transfer.lock); 2741 2842 spin_lock_init(&mb0_transfer.dbb_irqs_lock); 2742 2843 mutex_init(&mb0_transfer.ac_wake_lock); ··· 3013 3092 }, 3014 3093 }; 3015 3094 3016 - static struct resource ab8500_resources[] = { 3017 - [0] = { 3018 - .start = IRQ_DB8500_AB8500, 3019 - .end = IRQ_DB8500_AB8500, 3020 - .flags = IORESOURCE_IRQ 3021 - } 3022 - }; 3023 - 3024 3095 static struct ux500_wdt_data db8500_wdt_pdata = { 3025 3096 .timeout = 600, /* 10 minutes */ 3026 3097 .has_28_bits_resolution = true, 3098 + }; 3099 + /* 3100 + * Thermal Sensor 3101 + */ 3102 + 3103 + static struct resource db8500_thsens_resources[] = { 3104 + { 3105 + .name = "IRQ_HOTMON_LOW", 3106 + .start = IRQ_PRCMU_HOTMON_LOW, 3107 + .end = IRQ_PRCMU_HOTMON_LOW, 3108 + .flags = IORESOURCE_IRQ, 3109 + }, 3110 + { 3111 + .name = "IRQ_HOTMON_HIGH", 3112 + .start = IRQ_PRCMU_HOTMON_HIGH, 3113 + .end = IRQ_PRCMU_HOTMON_HIGH, 3114 + .flags = IORESOURCE_IRQ, 3115 + }, 3116 + }; 3117 + 3118 + static struct db8500_thsens_platform_data db8500_thsens_data = { 3119 + .trip_points[0] = { 3120 + .temp = 70000, 3121 + .type = THERMAL_TRIP_ACTIVE, 3122 + .cdev_name = { 3123 + [0] = "thermal-cpufreq-0", 3124 + }, 3125 + }, 3126 + .trip_points[1] = { 3127 + .temp = 75000, 3128 + .type = THERMAL_TRIP_ACTIVE, 3129 + .cdev_name = { 3130 + [0] = "thermal-cpufreq-0", 3131 + }, 3132 + }, 3133 + .trip_points[2] = { 3134 + .temp = 80000, 3135 + .type = THERMAL_TRIP_ACTIVE, 3136 + .cdev_name = { 3137 + [0] = "thermal-cpufreq-0", 3138 + }, 3139 + }, 3140 + .trip_points[3] = { 3141 + .temp = 85000, 3142 + .type = THERMAL_TRIP_CRITICAL, 3143 + }, 3144 + .num_trips = 4, 3027 3145 }; 3028 3146 3029 3147 static struct mfd_cell db8500_prcmu_devs[] = { ··· 3085 3125 .id = -1, 3086 3126 }, 3087 3127 { 3088 - .name = "ab8500-core", 3089 - .of_compatible = "stericsson,ab8500", 3090 - .num_resources = ARRAY_SIZE(ab8500_resources), 3091 - .resources = ab8500_resources, 3092 - .id = AB8500_VERSION_AB8500, 3128 + .name = "db8500-thermal", 3129 + .num_resources = ARRAY_SIZE(db8500_thsens_resources), 3130 + .resources = db8500_thsens_resources, 3131 + .platform_data = &db8500_thsens_data, 3093 3132 }, 3094 3133 }; 3095 3134 ··· 3100 3141 } 3101 3142 } 3102 3143 3144 + static int db8500_prcmu_register_ab8500(struct device *parent, 3145 + struct ab8500_platform_data *pdata, 3146 + int irq) 3147 + { 3148 + struct resource ab8500_resource = DEFINE_RES_IRQ(irq); 3149 + struct mfd_cell ab8500_cell = { 3150 + .name = "ab8500-core", 3151 + .of_compatible = "stericsson,ab8500", 3152 + .id = AB8500_VERSION_AB8500, 3153 + .platform_data = pdata, 3154 + .pdata_size = sizeof(struct ab8500_platform_data), 3155 + .resources = &ab8500_resource, 3156 + .num_resources = 1, 3157 + }; 3158 + 3159 + return mfd_add_devices(parent, 0, &ab8500_cell, 1, NULL, 0, NULL); 3160 + } 3161 + 3103 3162 /** 3104 3163 * prcmu_fw_init - arch init call for the Linux PRCMU fw init logic 3105 3164 * ··· 3126 3149 { 3127 3150 struct device_node *np = pdev->dev.of_node; 3128 3151 struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev); 3129 - int irq = 0, err = 0, i; 3152 + int irq = 0, err = 0; 3130 3153 struct resource *res; 3131 3154 3155 + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu"); 3156 + if (!res) { 3157 + dev_err(&pdev->dev, "no prcmu memory region provided\n"); 3158 + return -ENOENT; 3159 + } 3160 + prcmu_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); 3161 + if (!prcmu_base) { 3162 + dev_err(&pdev->dev, 3163 + "failed to ioremap prcmu register memory\n"); 3164 + return -ENOENT; 3165 + } 3132 3166 init_prcm_registers(); 3133 - 3134 3167 dbx500_fw_version_init(pdev, pdata->version_offset); 3135 3168 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm"); 3136 3169 if (!res) { ··· 3167 3180 goto no_irq_return; 3168 3181 } 3169 3182 3170 - db8500_irq_init(np); 3171 - 3172 - for (i = 0; i < ARRAY_SIZE(db8500_prcmu_devs); i++) { 3173 - if (!strcmp(db8500_prcmu_devs[i].name, "ab8500-core")) { 3174 - db8500_prcmu_devs[i].platform_data = pdata->ab_platdata; 3175 - db8500_prcmu_devs[i].pdata_size = sizeof(struct ab8500_platform_data); 3176 - } 3177 - } 3183 + db8500_irq_init(np, pdata->irq_base); 3178 3184 3179 3185 prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); 3180 3186 3181 3187 db8500_prcmu_update_cpufreq(); 3182 3188 3183 3189 err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs, 3184 - ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, NULL); 3190 + ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, db8500_irq_domain); 3185 3191 if (err) { 3186 3192 pr_err("prcmu: Failed to add subdevices\n"); 3187 3193 return err; 3194 + } 3195 + 3196 + err = db8500_prcmu_register_ab8500(&pdev->dev, pdata->ab_platdata, 3197 + pdata->ab_irq); 3198 + if (err) { 3199 + mfd_remove_devices(&pdev->dev); 3200 + pr_err("prcmu: Failed to add ab8500 subdevice\n"); 3201 + goto no_irq_return; 3188 3202 } 3189 3203 3190 3204 pr_info("DB8500 PRCMU initialized\n");
+87 -113
drivers/mfd/dbx500-prcmu-regs.h
··· 13 13 #ifndef __DB8500_PRCMU_REGS_H 14 14 #define __DB8500_PRCMU_REGS_H 15 15 16 - #include <mach/hardware.h> 17 - 18 16 #define BITS(_start, _end) ((BIT(_end) - BIT(_start)) + BIT(_end)) 19 17 20 - #define PRCM_CLK_MGT(_offset) (void __iomem *)(IO_ADDRESS(U8500_PRCMU_BASE) \ 21 - + _offset) 22 - #define PRCM_ACLK_MGT PRCM_CLK_MGT(0x004) 23 - #define PRCM_SVACLK_MGT PRCM_CLK_MGT(0x008) 24 - #define PRCM_SIACLK_MGT PRCM_CLK_MGT(0x00C) 25 - #define PRCM_SGACLK_MGT PRCM_CLK_MGT(0x014) 26 - #define PRCM_UARTCLK_MGT PRCM_CLK_MGT(0x018) 27 - #define PRCM_MSP02CLK_MGT PRCM_CLK_MGT(0x01C) 28 - #define PRCM_I2CCLK_MGT PRCM_CLK_MGT(0x020) 29 - #define PRCM_SDMMCCLK_MGT PRCM_CLK_MGT(0x024) 30 - #define PRCM_SLIMCLK_MGT PRCM_CLK_MGT(0x028) 31 - #define PRCM_PER1CLK_MGT PRCM_CLK_MGT(0x02C) 32 - #define PRCM_PER2CLK_MGT PRCM_CLK_MGT(0x030) 33 - #define PRCM_PER3CLK_MGT PRCM_CLK_MGT(0x034) 34 - #define PRCM_PER5CLK_MGT PRCM_CLK_MGT(0x038) 35 - #define PRCM_PER6CLK_MGT PRCM_CLK_MGT(0x03C) 36 - #define PRCM_PER7CLK_MGT PRCM_CLK_MGT(0x040) 37 - #define PRCM_LCDCLK_MGT PRCM_CLK_MGT(0x044) 38 - #define PRCM_BMLCLK_MGT PRCM_CLK_MGT(0x04C) 39 - #define PRCM_HSITXCLK_MGT PRCM_CLK_MGT(0x050) 40 - #define PRCM_HSIRXCLK_MGT PRCM_CLK_MGT(0x054) 41 - #define PRCM_HDMICLK_MGT PRCM_CLK_MGT(0x058) 42 - #define PRCM_APEATCLK_MGT PRCM_CLK_MGT(0x05C) 43 - #define PRCM_APETRACECLK_MGT PRCM_CLK_MGT(0x060) 44 - #define PRCM_MCDECLK_MGT PRCM_CLK_MGT(0x064) 45 - #define PRCM_IPI2CCLK_MGT PRCM_CLK_MGT(0x068) 46 - #define PRCM_DSIALTCLK_MGT PRCM_CLK_MGT(0x06C) 47 - #define PRCM_DMACLK_MGT PRCM_CLK_MGT(0x074) 48 - #define PRCM_B2R2CLK_MGT PRCM_CLK_MGT(0x078) 49 - #define PRCM_TVCLK_MGT PRCM_CLK_MGT(0x07C) 50 - #define PRCM_UNIPROCLK_MGT PRCM_CLK_MGT(0x278) 51 - #define PRCM_SSPCLK_MGT PRCM_CLK_MGT(0x280) 52 - #define PRCM_RNGCLK_MGT PRCM_CLK_MGT(0x284) 53 - #define PRCM_UICCCLK_MGT PRCM_CLK_MGT(0x27C) 54 - #define PRCM_MSP1CLK_MGT PRCM_CLK_MGT(0x288) 18 + #define PRCM_ACLK_MGT (0x004) 19 + #define PRCM_SVACLK_MGT (0x008) 20 + #define PRCM_SIACLK_MGT (0x00C) 21 + #define PRCM_SGACLK_MGT (0x014) 22 + #define PRCM_UARTCLK_MGT (0x018) 23 + #define PRCM_MSP02CLK_MGT (0x01C) 24 + #define PRCM_I2CCLK_MGT (0x020) 25 + #define PRCM_SDMMCCLK_MGT (0x024) 26 + #define PRCM_SLIMCLK_MGT (0x028) 27 + #define PRCM_PER1CLK_MGT (0x02C) 28 + #define PRCM_PER2CLK_MGT (0x030) 29 + #define PRCM_PER3CLK_MGT (0x034) 30 + #define PRCM_PER5CLK_MGT (0x038) 31 + #define PRCM_PER6CLK_MGT (0x03C) 32 + #define PRCM_PER7CLK_MGT (0x040) 33 + #define PRCM_LCDCLK_MGT (0x044) 34 + #define PRCM_BMLCLK_MGT (0x04C) 35 + #define PRCM_HSITXCLK_MGT (0x050) 36 + #define PRCM_HSIRXCLK_MGT (0x054) 37 + #define PRCM_HDMICLK_MGT (0x058) 38 + #define PRCM_APEATCLK_MGT (0x05C) 39 + #define PRCM_APETRACECLK_MGT (0x060) 40 + #define PRCM_MCDECLK_MGT (0x064) 41 + #define PRCM_IPI2CCLK_MGT (0x068) 42 + #define PRCM_DSIALTCLK_MGT (0x06C) 43 + #define PRCM_DMACLK_MGT (0x074) 44 + #define PRCM_B2R2CLK_MGT (0x078) 45 + #define PRCM_TVCLK_MGT (0x07C) 46 + #define PRCM_UNIPROCLK_MGT (0x278) 47 + #define PRCM_SSPCLK_MGT (0x280) 48 + #define PRCM_RNGCLK_MGT (0x284) 49 + #define PRCM_UICCCLK_MGT (0x27C) 50 + #define PRCM_MSP1CLK_MGT (0x288) 55 51 56 - #define PRCM_ARM_PLLDIVPS (_PRCMU_BASE + 0x118) 52 + #define PRCM_ARM_PLLDIVPS (prcmu_base + 0x118) 57 53 #define PRCM_ARM_PLLDIVPS_ARM_BRM_RATE 0x3f 58 54 #define PRCM_ARM_PLLDIVPS_MAX_MASK 0xf 59 55 60 - #define PRCM_PLLARM_LOCKP (_PRCMU_BASE + 0x0a8) 56 + #define PRCM_PLLARM_LOCKP (prcmu_base + 0x0a8) 61 57 #define PRCM_PLLARM_LOCKP_PRCM_PLLARM_LOCKP3 0x2 62 58 63 - #define PRCM_ARM_CHGCLKREQ (_PRCMU_BASE + 0x114) 59 + #define PRCM_ARM_CHGCLKREQ (prcmu_base + 0x114) 64 60 #define PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ BIT(0) 65 61 #define PRCM_ARM_CHGCLKREQ_PRCM_ARM_DIVSEL BIT(16) 66 62 67 - #define PRCM_PLLARM_ENABLE (_PRCMU_BASE + 0x98) 63 + #define PRCM_PLLARM_ENABLE (prcmu_base + 0x98) 68 64 #define PRCM_PLLARM_ENABLE_PRCM_PLLARM_ENABLE 0x1 69 65 #define PRCM_PLLARM_ENABLE_PRCM_PLLARM_COUNTON 0x100 70 66 71 - #define PRCM_ARMCLKFIX_MGT (_PRCMU_BASE + 0x0) 72 - #define PRCM_A9PL_FORCE_CLKEN (_PRCMU_BASE + 0x19C) 73 - #define PRCM_A9_RESETN_CLR (_PRCMU_BASE + 0x1f4) 74 - #define PRCM_A9_RESETN_SET (_PRCMU_BASE + 0x1f0) 75 - #define PRCM_ARM_LS_CLAMP (_PRCMU_BASE + 0x30c) 76 - #define PRCM_SRAM_A9 (_PRCMU_BASE + 0x308) 67 + #define PRCM_ARMCLKFIX_MGT (prcmu_base + 0x0) 68 + #define PRCM_A9PL_FORCE_CLKEN (prcmu_base + 0x19C) 69 + #define PRCM_A9_RESETN_CLR (prcmu_base + 0x1f4) 70 + #define PRCM_A9_RESETN_SET (prcmu_base + 0x1f0) 71 + #define PRCM_ARM_LS_CLAMP (prcmu_base + 0x30c) 72 + #define PRCM_SRAM_A9 (prcmu_base + 0x308) 77 73 78 74 #define PRCM_A9PL_FORCE_CLKEN_PRCM_A9PL_FORCE_CLKEN BIT(0) 79 75 #define PRCM_A9PL_FORCE_CLKEN_PRCM_A9AXI_FORCE_CLKEN BIT(1) 80 76 81 - /* ARM WFI Standby signal register */ 82 - #define PRCM_ARM_WFI_STANDBY (_PRCMU_BASE + 0x130) 83 - #define PRCM_ARM_WFI_STANDBY_WFI0 0x08 84 - #define PRCM_ARM_WFI_STANDBY_WFI1 0x10 85 - #define PRCM_IOCR (_PRCMU_BASE + 0x310) 86 - #define PRCM_IOCR_IOFORCE 0x1 87 - 88 77 /* CPU mailbox registers */ 89 - #define PRCM_MBOX_CPU_VAL (_PRCMU_BASE + 0x0fc) 90 - #define PRCM_MBOX_CPU_SET (_PRCMU_BASE + 0x100) 91 - #define PRCM_MBOX_CPU_CLR (_PRCMU_BASE + 0x104) 78 + #define PRCM_MBOX_CPU_VAL (prcmu_base + 0x0fc) 79 + #define PRCM_MBOX_CPU_SET (prcmu_base + 0x100) 80 + #define PRCM_MBOX_CPU_CLR (prcmu_base + 0x104) 92 81 93 - /* Dual A9 core interrupt management unit registers */ 94 - #define PRCM_A9_MASK_REQ (_PRCMU_BASE + 0x328) 95 - #define PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ 0x1 96 - 97 - #define PRCM_A9_MASK_ACK (_PRCMU_BASE + 0x32c) 98 - #define PRCM_ARMITMSK31TO0 (_PRCMU_BASE + 0x11c) 99 - #define PRCM_ARMITMSK63TO32 (_PRCMU_BASE + 0x120) 100 - #define PRCM_ARMITMSK95TO64 (_PRCMU_BASE + 0x124) 101 - #define PRCM_ARMITMSK127TO96 (_PRCMU_BASE + 0x128) 102 - #define PRCM_POWER_STATE_VAL (_PRCMU_BASE + 0x25C) 103 - #define PRCM_ARMITVAL31TO0 (_PRCMU_BASE + 0x260) 104 - #define PRCM_ARMITVAL63TO32 (_PRCMU_BASE + 0x264) 105 - #define PRCM_ARMITVAL95TO64 (_PRCMU_BASE + 0x268) 106 - #define PRCM_ARMITVAL127TO96 (_PRCMU_BASE + 0x26C) 107 - 108 - #define PRCM_HOSTACCESS_REQ (_PRCMU_BASE + 0x334) 82 + #define PRCM_HOSTACCESS_REQ (prcmu_base + 0x334) 109 83 #define PRCM_HOSTACCESS_REQ_HOSTACCESS_REQ 0x1 110 84 #define PRCM_HOSTACCESS_REQ_WAKE_REQ BIT(16) 111 85 #define ARM_WAKEUP_MODEM 0x1 112 86 113 - #define PRCM_ARM_IT1_CLR (_PRCMU_BASE + 0x48C) 114 - #define PRCM_ARM_IT1_VAL (_PRCMU_BASE + 0x494) 115 - #define PRCM_HOLD_EVT (_PRCMU_BASE + 0x174) 87 + #define PRCM_ARM_IT1_CLR (prcmu_base + 0x48C) 88 + #define PRCM_ARM_IT1_VAL (prcmu_base + 0x494) 89 + #define PRCM_HOLD_EVT (prcmu_base + 0x174) 116 90 117 - #define PRCM_MOD_AWAKE_STATUS (_PRCMU_BASE + 0x4A0) 91 + #define PRCM_MOD_AWAKE_STATUS (prcmu_base + 0x4A0) 118 92 #define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_COREPD_AWAKE BIT(0) 119 93 #define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_AAPD_AWAKE BIT(1) 120 94 #define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_VMODEM_OFF_ISO BIT(2) 121 95 122 - #define PRCM_ITSTATUS0 (_PRCMU_BASE + 0x148) 123 - #define PRCM_ITSTATUS1 (_PRCMU_BASE + 0x150) 124 - #define PRCM_ITSTATUS2 (_PRCMU_BASE + 0x158) 125 - #define PRCM_ITSTATUS3 (_PRCMU_BASE + 0x160) 126 - #define PRCM_ITSTATUS4 (_PRCMU_BASE + 0x168) 127 - #define PRCM_ITSTATUS5 (_PRCMU_BASE + 0x484) 128 - #define PRCM_ITCLEAR5 (_PRCMU_BASE + 0x488) 129 - #define PRCM_ARMIT_MASKXP70_IT (_PRCMU_BASE + 0x1018) 96 + #define PRCM_ITSTATUS0 (prcmu_base + 0x148) 97 + #define PRCM_ITSTATUS1 (prcmu_base + 0x150) 98 + #define PRCM_ITSTATUS2 (prcmu_base + 0x158) 99 + #define PRCM_ITSTATUS3 (prcmu_base + 0x160) 100 + #define PRCM_ITSTATUS4 (prcmu_base + 0x168) 101 + #define PRCM_ITSTATUS5 (prcmu_base + 0x484) 102 + #define PRCM_ITCLEAR5 (prcmu_base + 0x488) 103 + #define PRCM_ARMIT_MASKXP70_IT (prcmu_base + 0x1018) 130 104 131 105 /* System reset register */ 132 - #define PRCM_APE_SOFTRST (_PRCMU_BASE + 0x228) 106 + #define PRCM_APE_SOFTRST (prcmu_base + 0x228) 133 107 134 108 /* Level shifter and clamp control registers */ 135 - #define PRCM_MMIP_LS_CLAMP_SET (_PRCMU_BASE + 0x420) 136 - #define PRCM_MMIP_LS_CLAMP_CLR (_PRCMU_BASE + 0x424) 109 + #define PRCM_MMIP_LS_CLAMP_SET (prcmu_base + 0x420) 110 + #define PRCM_MMIP_LS_CLAMP_CLR (prcmu_base + 0x424) 137 111 138 112 #define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMP BIT(11) 139 113 #define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMPI BIT(22) 140 114 141 115 /* PRCMU clock/PLL/reset registers */ 142 - #define PRCM_PLLSOC0_FREQ (_PRCMU_BASE + 0x080) 143 - #define PRCM_PLLSOC1_FREQ (_PRCMU_BASE + 0x084) 144 - #define PRCM_PLLARM_FREQ (_PRCMU_BASE + 0x088) 145 - #define PRCM_PLLDDR_FREQ (_PRCMU_BASE + 0x08C) 116 + #define PRCM_PLLSOC0_FREQ (prcmu_base + 0x080) 117 + #define PRCM_PLLSOC1_FREQ (prcmu_base + 0x084) 118 + #define PRCM_PLLARM_FREQ (prcmu_base + 0x088) 119 + #define PRCM_PLLDDR_FREQ (prcmu_base + 0x08C) 146 120 #define PRCM_PLL_FREQ_D_SHIFT 0 147 121 #define PRCM_PLL_FREQ_D_MASK BITS(0, 7) 148 122 #define PRCM_PLL_FREQ_N_SHIFT 8 ··· 126 152 #define PRCM_PLL_FREQ_SELDIV2 BIT(24) 127 153 #define PRCM_PLL_FREQ_DIV2EN BIT(25) 128 154 129 - #define PRCM_PLLDSI_FREQ (_PRCMU_BASE + 0x500) 130 - #define PRCM_PLLDSI_ENABLE (_PRCMU_BASE + 0x504) 131 - #define PRCM_PLLDSI_LOCKP (_PRCMU_BASE + 0x508) 132 - #define PRCM_DSI_PLLOUT_SEL (_PRCMU_BASE + 0x530) 133 - #define PRCM_DSITVCLK_DIV (_PRCMU_BASE + 0x52C) 134 - #define PRCM_PLLDSI_LOCKP (_PRCMU_BASE + 0x508) 135 - #define PRCM_APE_RESETN_SET (_PRCMU_BASE + 0x1E4) 136 - #define PRCM_APE_RESETN_CLR (_PRCMU_BASE + 0x1E8) 155 + #define PRCM_PLLDSI_FREQ (prcmu_base + 0x500) 156 + #define PRCM_PLLDSI_ENABLE (prcmu_base + 0x504) 157 + #define PRCM_PLLDSI_LOCKP (prcmu_base + 0x508) 158 + #define PRCM_DSI_PLLOUT_SEL (prcmu_base + 0x530) 159 + #define PRCM_DSITVCLK_DIV (prcmu_base + 0x52C) 160 + #define PRCM_PLLDSI_LOCKP (prcmu_base + 0x508) 161 + #define PRCM_APE_RESETN_SET (prcmu_base + 0x1E4) 162 + #define PRCM_APE_RESETN_CLR (prcmu_base + 0x1E8) 137 163 138 164 #define PRCM_PLLDSI_ENABLE_PRCM_PLLDSI_ENABLE BIT(0) 139 165 ··· 162 188 163 189 #define PRCM_APE_RESETN_DSIPLL_RESETN BIT(14) 164 190 165 - #define PRCM_CLKOCR (_PRCMU_BASE + 0x1CC) 191 + #define PRCM_CLKOCR (prcmu_base + 0x1CC) 166 192 #define PRCM_CLKOCR_CLKOUT0_REF_CLK (1 << 0) 167 193 #define PRCM_CLKOCR_CLKOUT0_MASK BITS(0, 13) 168 194 #define PRCM_CLKOCR_CLKOUT1_REF_CLK (1 << 16) 169 195 #define PRCM_CLKOCR_CLKOUT1_MASK BITS(16, 29) 170 196 171 197 /* ePOD and memory power signal control registers */ 172 - #define PRCM_EPOD_C_SET (_PRCMU_BASE + 0x410) 173 - #define PRCM_SRAM_LS_SLEEP (_PRCMU_BASE + 0x304) 198 + #define PRCM_EPOD_C_SET (prcmu_base + 0x410) 199 + #define PRCM_SRAM_LS_SLEEP (prcmu_base + 0x304) 174 200 175 201 /* Debug power control unit registers */ 176 - #define PRCM_POWER_STATE_SET (_PRCMU_BASE + 0x254) 202 + #define PRCM_POWER_STATE_SET (prcmu_base + 0x254) 177 203 178 204 /* Miscellaneous unit registers */ 179 - #define PRCM_DSI_SW_RESET (_PRCMU_BASE + 0x324) 180 - #define PRCM_GPIOCR (_PRCMU_BASE + 0x138) 205 + #define PRCM_DSI_SW_RESET (prcmu_base + 0x324) 206 + #define PRCM_GPIOCR (prcmu_base + 0x138) 181 207 #define PRCM_GPIOCR_DBG_STM_MOD_CMD1 0x800 182 208 #define PRCM_GPIOCR_DBG_UARTMOD_CMD0 0x1 183 209 184 210 /* PRCMU HW semaphore */ 185 - #define PRCM_SEM (_PRCMU_BASE + 0x400) 211 + #define PRCM_SEM (prcmu_base + 0x400) 186 212 #define PRCM_SEM_PRCM_SEM BIT(0) 187 213 188 - #define PRCM_TCR (_PRCMU_BASE + 0x1C8) 214 + #define PRCM_TCR (prcmu_base + 0x1C8) 189 215 #define PRCM_TCR_TENSEL_MASK BITS(0, 7) 190 216 #define PRCM_TCR_STOP_TIMERS BIT(16) 191 217 #define PRCM_TCR_DOZE_MODE BIT(17) ··· 213 239 /* GPIOCR register */ 214 240 #define PRCM_GPIOCR_SPI2_SELECT BIT(23) 215 241 216 - #define PRCM_DDR_SUBSYS_APE_MINBW (_PRCMU_BASE + 0x438) 217 - #define PRCM_CGATING_BYPASS (_PRCMU_BASE + 0x134) 242 + #define PRCM_DDR_SUBSYS_APE_MINBW (prcmu_base + 0x438) 243 + #define PRCM_CGATING_BYPASS (prcmu_base + 0x134) 218 244 #define PRCM_CGATING_BYPASS_ICN2 BIT(6) 219 245 220 246 /* Miscellaneous unit registers */ 221 - #define PRCM_RESOUTN_SET (_PRCMU_BASE + 0x214) 222 - #define PRCM_RESOUTN_CLR (_PRCMU_BASE + 0x218) 247 + #define PRCM_RESOUTN_SET (prcmu_base + 0x214) 248 + #define PRCM_RESOUTN_CLR (prcmu_base + 0x218) 223 249 224 250 /* System reset register */ 225 - #define PRCM_APE_SOFTRST (_PRCMU_BASE + 0x228) 251 + #define PRCM_APE_SOFTRST (prcmu_base + 0x228) 226 252 227 253 #endif /* __DB8500_PRCMU_REGS_H */
-1
drivers/staging/ste_rmi4/Makefile
··· 2 2 # Makefile for the RMI4 touchscreen driver. 3 3 # 4 4 obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += synaptics_i2c_rmi4.o 5 - obj-$(CONFIG_MACH_MOP500) += board-mop500-u8500uib-rmi4.o
-31
drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c
··· 1 - /* 2 - * Some platform data for the RMI4 touchscreen that will override the __weak 3 - * platform data in the Ux500 machine if this driver is activated. 4 - */ 5 - #include <linux/i2c.h> 6 - #include <linux/gpio.h> 7 - #include <linux/interrupt.h> 8 - #include <mach/irqs.h> 9 - #include "synaptics_i2c_rmi4.h" 10 - 11 - /* 12 - * Synaptics RMI4 touchscreen interface on the U8500 UIB 13 - */ 14 - 15 - /* 16 - * Descriptor structure. 17 - * Describes the number of i2c devices on the bus that speak RMI. 18 - */ 19 - static struct synaptics_rmi4_platform_data rmi4_i2c_dev_platformdata = { 20 - .irq_number = NOMADIK_GPIO_TO_IRQ(84), 21 - .irq_type = (IRQF_TRIGGER_FALLING | IRQF_SHARED), 22 - .x_flip = false, 23 - .y_flip = true, 24 - }; 25 - 26 - struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = { 27 - { 28 - I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B), 29 - .platform_data = &rmi4_i2c_dev_platformdata, 30 - }, 31 - };
+18 -13
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
··· 864 864 return 0; 865 865 } 866 866 867 + /* 868 + * Descriptor structure. 869 + * Describes the number of i2c devices on the bus that speak RMI. 870 + */ 871 + static struct synaptics_rmi4_platform_data synaptics_rmi4_platformdata = { 872 + .irq_type = (IRQF_TRIGGER_FALLING | IRQF_SHARED), 873 + .x_flip = false, 874 + .y_flip = true, 875 + }; 876 + 867 877 /** 868 878 * synaptics_rmi4_probe() - Initialze the i2c-client touchscreen driver 869 879 * @i2c: i2c client structure pointer ··· 900 890 return -EIO; 901 891 } 902 892 903 - if (!platformdata) { 904 - dev_err(&client->dev, "%s: no platform data\n", __func__); 905 - return -EINVAL; 906 - } 893 + if (!platformdata) 894 + platformdata = &synaptics_rmi4_platformdata; 907 895 908 896 /* Allocate and initialize the instance data for this client */ 909 897 rmi4_data = kcalloc(2, sizeof(struct synaptics_rmi4_data), ··· 985 977 synaptics_rmi4_i2c_block_read(rmi4_data, 986 978 rmi4_data->fn01_data_base_addr + 1, intr_status, 987 979 rmi4_data->number_of_interrupt_register); 988 - retval = request_threaded_irq(platformdata->irq_number, NULL, 980 + retval = request_threaded_irq(client->irq, NULL, 989 981 synaptics_rmi4_irq, 990 982 platformdata->irq_type, 991 983 DRIVER_NAME, rmi4_data); 992 984 if (retval) { 993 985 dev_err(&client->dev, "%s:Unable to get attn irq %d\n", 994 - __func__, platformdata->irq_number); 986 + __func__, client->irq); 995 987 goto err_query_dev; 996 988 } 997 989 ··· 1004 996 return retval; 1005 997 1006 998 err_free_irq: 1007 - free_irq(platformdata->irq_number, rmi4_data); 999 + free_irq(client->irq, rmi4_data); 1008 1000 err_query_dev: 1009 1001 regulator_disable(rmi4_data->regulator); 1010 1002 err_regulator_enable: ··· 1027 1019 static int synaptics_rmi4_remove(struct i2c_client *client) 1028 1020 { 1029 1021 struct synaptics_rmi4_data *rmi4_data = i2c_get_clientdata(client); 1030 - const struct synaptics_rmi4_platform_data *pdata = rmi4_data->board; 1031 1022 1032 1023 rmi4_data->touch_stopped = true; 1033 1024 wake_up(&rmi4_data->wait); 1034 - free_irq(pdata->irq_number, rmi4_data); 1025 + free_irq(client->irq, rmi4_data); 1035 1026 input_unregister_device(rmi4_data->input_dev); 1036 1027 regulator_disable(rmi4_data->regulator); 1037 1028 regulator_put(rmi4_data->regulator); ··· 1053 1046 int retval; 1054 1047 unsigned char intr_status; 1055 1048 struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev); 1056 - const struct synaptics_rmi4_platform_data *pdata = rmi4_data->board; 1057 1049 1058 1050 rmi4_data->touch_stopped = true; 1059 - disable_irq(pdata->irq_number); 1051 + disable_irq(rmi4_data->i2c_client->irq); 1060 1052 1061 1053 retval = synaptics_rmi4_i2c_block_read(rmi4_data, 1062 1054 rmi4_data->fn01_data_base_addr + 1, ··· 1086 1080 int retval; 1087 1081 unsigned char intr_status; 1088 1082 struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev); 1089 - const struct synaptics_rmi4_platform_data *pdata = rmi4_data->board; 1090 1083 1091 1084 regulator_enable(rmi4_data->regulator); 1092 1085 1093 - enable_irq(pdata->irq_number); 1086 + enable_irq(rmi4_data->i2c_client->irq); 1094 1087 rmi4_data->touch_stopped = false; 1095 1088 1096 1089 retval = synaptics_rmi4_i2c_block_read(rmi4_data,
-1
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h
··· 38 38 * This structure gives platform data for rmi4. 39 39 */ 40 40 struct synaptics_rmi4_platform_data { 41 - int irq_number; 42 41 int irq_type; 43 42 bool x_flip; 44 43 bool y_flip;
+2 -8
include/linux/mfd/db8500-prcmu.h
··· 489 489 490 490 #ifdef CONFIG_MFD_DB8500_PRCMU 491 491 492 - void db8500_prcmu_early_init(void); 492 + void db8500_prcmu_early_init(u32 phy_base, u32 size); 493 493 int prcmu_set_rc_a2p(enum romcode_write); 494 494 enum romcode_read prcmu_get_rc_p2a(void); 495 495 enum ap_pwrst prcmu_get_xp70_current_state(void); ··· 522 522 void db8500_prcmu_system_reset(u16 reset_code); 523 523 int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, bool keep_ap_pll); 524 524 u8 db8500_prcmu_get_power_state_result(void); 525 - int db8500_prcmu_gic_decouple(void); 526 - int db8500_prcmu_gic_recouple(void); 527 - int db8500_prcmu_copy_gic_settings(void); 528 - bool db8500_prcmu_gic_pending_irq(void); 529 - bool db8500_prcmu_pending_irq(void); 530 - bool db8500_prcmu_is_cpu_in_wfi(int cpu); 531 525 void db8500_prcmu_enable_wakeups(u32 wakeups); 532 526 int db8500_prcmu_set_epod(u16 epod_id, u8 epod_state); 533 527 int db8500_prcmu_request_clock(u8 clock, bool enable); ··· 547 553 548 554 #else /* !CONFIG_MFD_DB8500_PRCMU */ 549 555 550 - static inline void db8500_prcmu_early_init(void) {} 556 + static inline void db8500_prcmu_early_init(u32 phy_base, u32 size) {} 551 557 552 558 static inline int prcmu_set_rc_a2p(enum romcode_write code) 553 559 {
+5 -33
include/linux/mfd/dbx500-prcmu.h
··· 237 237 bool enable_set_ddr_opp; 238 238 bool enable_ape_opp_100_voltage; 239 239 struct ab8500_platform_data *ab_platdata; 240 + int ab_irq; 241 + int irq_base; 240 242 u32 version_offset; 241 243 u32 legacy_offset; 242 244 u32 adt_offset; ··· 278 276 279 277 #if defined(CONFIG_UX500_SOC_DB8500) 280 278 281 - static inline void __init prcmu_early_init(void) 279 + static inline void prcmu_early_init(u32 phy_base, u32 size) 282 280 { 283 - return db8500_prcmu_early_init(); 281 + return db8500_prcmu_early_init(phy_base, size); 284 282 } 285 283 286 284 static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk, ··· 293 291 static inline u8 prcmu_get_power_state_result(void) 294 292 { 295 293 return db8500_prcmu_get_power_state_result(); 296 - } 297 - 298 - static inline int prcmu_gic_decouple(void) 299 - { 300 - return db8500_prcmu_gic_decouple(); 301 - } 302 - 303 - static inline int prcmu_gic_recouple(void) 304 - { 305 - return db8500_prcmu_gic_recouple(); 306 - } 307 - 308 - static inline bool prcmu_gic_pending_irq(void) 309 - { 310 - return db8500_prcmu_gic_pending_irq(); 311 - } 312 - 313 - static inline bool prcmu_is_cpu_in_wfi(int cpu) 314 - { 315 - return db8500_prcmu_is_cpu_in_wfi(cpu); 316 - } 317 - 318 - static inline int prcmu_copy_gic_settings(void) 319 - { 320 - return db8500_prcmu_copy_gic_settings(); 321 - } 322 - 323 - static inline bool prcmu_pending_irq(void) 324 - { 325 - return db8500_prcmu_pending_irq(); 326 294 } 327 295 328 296 static inline int prcmu_set_epod(u16 epod_id, u8 epod_state) ··· 472 500 } 473 501 #else 474 502 475 - static inline void __init prcmu_early_init(void) {} 503 + static inline void prcmu_early_init(u32 phy_base, u32 size) {} 476 504 477 505 static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk, 478 506 bool keep_ap_pll)
+21
include/linux/platform_data/arm-ux500-pm.h
··· 1 + /* 2 + * Copyright (C) ST-Ericsson SA 2010-2013 3 + * Author: Rickard Andersson <rickard.andersson@stericsson.com> for 4 + * ST-Ericsson. 5 + * Author: Daniel Lezcano <daniel.lezcano@linaro.org> for Linaro. 6 + * License terms: GNU General Public License (GPL) version 2 7 + * 8 + */ 9 + 10 + #ifndef ARM_UX500_PM_H 11 + #define ARM_UX500_PM_H 12 + 13 + int prcmu_gic_decouple(void); 14 + int prcmu_gic_recouple(void); 15 + bool prcmu_gic_pending_irq(void); 16 + bool prcmu_pending_irq(void); 17 + bool prcmu_is_cpu_in_wfi(int cpu); 18 + int prcmu_copy_gic_settings(void); 19 + void ux500_pm_init(u32 phy_base, u32 size); 20 + 21 + #endif /* ARM_UX500_PM_H */
+2 -1
include/linux/platform_data/clk-ux500.h
··· 10 10 #ifndef __CLK_UX500_H 11 11 #define __CLK_UX500_H 12 12 13 - void u8500_clk_init(void); 13 + void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, 14 + u32 clkrst5_base, u32 clkrst6_base); 14 15 void u9540_clk_init(void); 15 16 void u8540_clk_init(void); 16 17
-2
sound/soc/ux500/mop500_ab8500.c
··· 17 17 #include <linux/io.h> 18 18 #include <linux/clk.h> 19 19 20 - #include <mach/hardware.h> 21 - 22 20 #include <sound/soc.h> 23 21 #include <sound/soc-dapm.h> 24 22 #include <sound/pcm.h>
+1 -3
sound/soc/ux500/ux500_msp_dai.c
··· 19 19 #include <linux/clk.h> 20 20 #include <linux/regulator/consumer.h> 21 21 #include <linux/mfd/dbx500-prcmu.h> 22 - 23 - #include <mach/hardware.h> 24 - #include <mach/msp.h> 22 + #include <linux/platform_data/asoc-ux500-msp.h> 25 23 26 24 #include <sound/soc.h> 27 25 #include <sound/soc-dai.h>
+1 -3
sound/soc/ux500/ux500_msp_i2s.c
··· 20 20 #include <linux/slab.h> 21 21 #include <linux/io.h> 22 22 #include <linux/of.h> 23 - 24 - #include <mach/hardware.h> 25 - #include <mach/msp.h> 23 + #include <linux/platform_data/asoc-ux500-msp.h> 26 24 27 25 #include <sound/soc.h> 28 26
-2
sound/soc/ux500/ux500_msp_i2s.h
··· 17 17 18 18 #include <linux/platform_device.h> 19 19 20 - #include <mach/msp.h> 21 - 22 20 #define MSP_INPUT_FREQ_APB 48000000 23 21 24 22 /*** Stereo mode. Used for APB data accesses as 16 bits accesses (mono),