Skip to content

Commit

Permalink
Merge tag 'ux500-multiplatform-asoc' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Arnd Bergmann committed Apr 9, 2013
2 parents 835f9c3 + f6f1bda commit 9bc128e
Show file tree
Hide file tree
Showing 57 changed files with 699 additions and 766 deletions.
16 changes: 0 additions & 16 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -853,22 +853,6 @@ config ARCH_U300
help
Support for ST-Ericsson U300 series mobile platforms.

config ARCH_U8500
bool "ST-Ericsson U8500 Series"
depends on MMU
select ARCH_HAS_CPUFREQ
select ARCH_REQUIRE_GPIOLIB
select ARM_AMBA
select CLKDEV_LOOKUP
select CPU_V7
select GENERIC_CLOCKEVENTS
select HAVE_SMP
select MIGHT_HAVE_CACHE_L2X0
select SPARSE_IRQ
help
Support for ST-Ericsson's Ux500 architecture


config ARCH_DAVINCI
bool "TI DaVinci"
select ARCH_HAS_HOLES_MEMORYMODEL
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,13 @@ choice
Say Y here if you want the debug print routines to direct
their output to the uart1 port on SiRFmarco devices.

config DEBUG_UX500_UART
depends on ARCH_U8500
bool "Use Ux500 UART for low-level debug"
help
Say Y here if you want kernel low-level debugging support
on Ux500 based platforms.

config DEBUG_VEXPRESS_UART0_DETECT
bool "Autodetect UART0 on Versatile Express Cortex-A core tiles"
depends on ARCH_VEXPRESS && CPU_CP15_MMU
Expand Down Expand Up @@ -620,6 +627,7 @@ config DEBUG_LL_INCLUDE
DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
default "debug/vt8500.S" if DEBUG_VT8500_UART0
default "debug/tegra.S" if DEBUG_TEGRA_UART
default "debug/ux500.S" if DEBUG_UX500_UART
default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
default "mach/debug-macro.S"

Expand Down
48 changes: 48 additions & 0 deletions arch/arm/include/debug/ux500.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Debugging macro include header
*
* Copyright (C) 2009 ST-Ericsson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/


#if CONFIG_UX500_DEBUG_UART > 2
#error Invalid Ux500 debug UART
#endif

/*
* DEBUG_LL only works if only one SOC is built in. We don't use #else below
* in order to get "__UX500_UART redefined" warnings if more than one SOC is
* built, so that there's some hint during the build that something is wrong.
*/

#ifdef CONFIG_UX500_SOC_DB8500
#define U8500_UART0_PHYS_BASE (0x80120000)
#define U8500_UART1_PHYS_BASE (0x80121000)
#define U8500_UART2_PHYS_BASE (0x80007000)
#define U8500_UART0_VIRT_BASE (0xa8120000)
#define U8500_UART1_VIRT_BASE (0xa8121000)
#define U8500_UART2_VIRT_BASE (0xa8007000)
#define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE
#define __UX500_VIRT_UART(n) U8500_UART##n##_VIRT_BASE
#endif

#if !defined(__UX500_PHYS_UART) || !defined(__UX500_VIRT_UART)
#error Unknown SOC
#endif

#define UX500_PHYS_UART(n) __UX500_PHYS_UART(n)
#define UX500_VIRT_UART(n) __UX500_VIRT_UART(n)
#define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART)
#define UART_VIRT_BASE UX500_VIRT_UART(CONFIG_UX500_DEBUG_UART)

.macro addruart, rp, rv, tmp
ldr \rp, =UART_PHYS_BASE @ no, physical address
ldr \rv, =UART_VIRT_BASE @ yes, virtual address
.endm

#include <asm/hardware/debug-pl01x.S>
14 changes: 14 additions & 0 deletions arch/arm/mach-ux500/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
config ARCH_U8500
bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7
depends on MMU
select ARCH_HAS_CPUFREQ
select ARCH_REQUIRE_GPIOLIB
select ARM_AMBA
select CLKDEV_LOOKUP
select CPU_V7
select GENERIC_CLOCKEVENTS
select HAVE_SMP
select MIGHT_HAVE_CACHE_L2X0
help
Support for ST-Ericsson's Ux500 architecture

if ARCH_U8500

config UX500_SOC_COMMON
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-ux500/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

obj-y := cpu.o devices.o devices-common.o \
id.o usb.o timer.o
id.o usb.o timer.o pm.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
Expand All @@ -15,3 +15,5 @@ obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
board-mop500-audio.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o

CFLAGS_hotplug.o += -march=armv7-a
7 changes: 3 additions & 4 deletions arch/arm/mach-ux500/board-mop500-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
#include <linux/platform_data/pinctrl-nomadik.h>
#include <linux/platform_data/dma-ste-dma40.h>

#include <mach/devices.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/msp.h>
#include "devices.h"
#include "irqs.h"
#include <linux/platform_data/asoc-ux500-msp.h>

#include "ste-dma40-db8500.h"
#include "board-mop500.h"
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-ux500/board-mop500-pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

#include <asm/mach-types.h>

#include <mach/hardware.h>

#include "pins-db8500.h"
#include "board-mop500.h"

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-ux500/board-mop500-sdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include <linux/platform_data/dma-ste-dma40.h>

#include <asm/mach-types.h>
#include <mach/devices.h>
#include <mach/hardware.h>
#include "devices.h"

#include "db8500-regs.h"
#include "devices-db8500.h"
#include "board-mop500.h"
#include "ste-dma40-db8500.h"
Expand Down
9 changes: 6 additions & 3 deletions arch/arm/mach-ux500/board-mop500-u8500uib.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
#include <linux/mfd/tc3589x.h>
#include <linux/input/matrix_keypad.h>

#include <mach/irqs.h>
#include "irqs.h"

#include "board-mop500.h"

/* Dummy data that can be overridden by staging driver */
struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = {
static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
{
I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
.irq = NOMADIK_GPIO_TO_IRQ(84),
},
};

/*
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-ux500/board-mop500-uib.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <linux/init.h>
#include <linux/i2c.h>

#include <mach/hardware.h>
#include "board-mop500.h"
#include "id.h"

Expand Down
66 changes: 4 additions & 62 deletions arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>

#include <mach/hardware.h>
#include <mach/setup.h>
#include <mach/devices.h>
#include <mach/irqs.h>
#include "setup.h"
#include "devices.h"
#include "irqs.h"
#include <linux/platform_data/crypto-ux500.h>

#include "ste-dma40-db8500.h"
#include "db8500-regs.h"
#include "devices-db8500.h"
#include "board-mop500.h"
#include "board-mop500-regulators.h"
Expand Down Expand Up @@ -206,63 +206,6 @@ struct ab8500_platform_data ab8500_platdata = {
.codec = &ab8500_codec_pdata,
};

/*
* Thermal Sensor
*/

static struct resource db8500_thsens_resources[] = {
{
.name = "IRQ_HOTMON_LOW",
.start = IRQ_PRCMU_HOTMON_LOW,
.end = IRQ_PRCMU_HOTMON_LOW,
.flags = IORESOURCE_IRQ,
},
{
.name = "IRQ_HOTMON_HIGH",
.start = IRQ_PRCMU_HOTMON_HIGH,
.end = IRQ_PRCMU_HOTMON_HIGH,
.flags = IORESOURCE_IRQ,
},
};

static struct db8500_thsens_platform_data db8500_thsens_data = {
.trip_points[0] = {
.temp = 70000,
.type = THERMAL_TRIP_ACTIVE,
.cdev_name = {
[0] = "thermal-cpufreq-0",
},
},
.trip_points[1] = {
.temp = 75000,
.type = THERMAL_TRIP_ACTIVE,
.cdev_name = {
[0] = "thermal-cpufreq-0",
},
},
.trip_points[2] = {
.temp = 80000,
.type = THERMAL_TRIP_ACTIVE,
.cdev_name = {
[0] = "thermal-cpufreq-0",
},
},
.trip_points[3] = {
.temp = 85000,
.type = THERMAL_TRIP_CRITICAL,
},
.num_trips = 4,
};

static struct platform_device u8500_thsens_device = {
.name = "db8500-thermal",
.resource = db8500_thsens_resources,
.num_resources = ARRAY_SIZE(db8500_thsens_resources),
.dev = {
.platform_data = &db8500_thsens_data,
},
};

static struct platform_device u8500_cpufreq_cooling_device = {
.name = "db8500-cpufreq-cooling",
};
Expand Down Expand Up @@ -622,7 +565,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
&snowball_key_dev,
&snowball_sbnet_dev,
&snowball_gpio_en_3v3_regulator_dev,
&u8500_thsens_device,
&u8500_cpufreq_cooling_device,
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-ux500/board-mop500.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#define __BOARD_MOP500_H

/* For NOMADIK_NR_GPIO */
#include <mach/irqs.h>
#include <mach/msp.h>
#include "irqs.h"
#include <linux/platform_data/asoc-ux500-msp.h>
#include <linux/amba/mmci.h>

/* Snowball specific GPIO assignments, this board has no GPIO expander */
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ux500/cache-l2x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include <asm/cacheflush.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/hardware.h>

#include "db8500-regs.h"
#include "id.h"

static void __iomem *l2x0_base;
Expand Down
12 changes: 4 additions & 8 deletions arch/arm/mach-ux500/cpu-db8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@
#include <asm/mach/map.h>
#include <asm/mach/arch.h>

#include <mach/hardware.h>
#include <mach/setup.h>
#include <mach/devices.h>
#include <mach/db8500-regs.h>
#include <mach/irqs.h>
#include "setup.h"
#include "devices.h"
#include "irqs.h"

#include "devices-db8500.h"
#include "ste-dma40-db8500.h"

#include "db8500-regs.h"
#include "board-mop500.h"
#include "id.h"

Expand Down Expand Up @@ -94,8 +92,6 @@ void __init u8500_map_io(void)
iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc));
else
iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));

_PRCMU_BASE = __io_address(U8500_PRCMU_BASE);
}

static struct resource db8500_pmu_resources[] = {
Expand Down
33 changes: 21 additions & 12 deletions arch/arm/mach-ux500/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/mfd/db8500-prcmu.h>
#include <linux/mfd/dbx500-prcmu.h>
#include <linux/clksrc-dbx500-prcmu.h>
#include <linux/sys_soc.h>
#include <linux/err.h>
Expand All @@ -20,18 +20,17 @@
#include <linux/irqchip.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-ux500.h>
#include <linux/platform_data/arm-ux500-pm.h>

#include <asm/mach/map.h>

#include <mach/hardware.h>
#include <mach/setup.h>
#include <mach/devices.h>
#include "setup.h"
#include "devices.h"

#include "board-mop500.h"
#include "db8500-regs.h"
#include "id.h"

void __iomem *_PRCMU_BASE;

/*
* FIXME: Should we set up the GPIO domain here?
*
Expand Down Expand Up @@ -68,13 +67,23 @@ void __init ux500_init_irq(void)
* Init clocks here so that they are available for system timer
* initialization.
*/
if (cpu_is_u8500_family() || cpu_is_u9540())
db8500_prcmu_early_init();

if (cpu_is_u8500_family() || cpu_is_u9540())
u8500_clk_init();
else if (cpu_is_u8540())
if (cpu_is_u8500_family()) {
prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
U8500_CLKRST6_BASE);
} else if (cpu_is_u9540()) {
prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
U8500_CLKRST6_BASE);
} else if (cpu_is_u8540()) {
prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
u8540_clk_init();
}
}

void __init ux500_init_late(void)
Expand Down
Loading

0 comments on commit 9bc128e

Please sign in to comment.