Skip to content

Commit

Permalink
Merge tag 'msm-dt-for-3.7' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/davidb/linux-msm into next/dt

From David Brown:

These patches migrate both the 8660 and 8960 targets on msm to be
devicetree only.  This also sets most of the frame in place necessary
to build both targets into the same image.

There's a couple of cleanups in here that are kept in this series
because they are intimately tied to the changes necessary to support
the devicetree conversions.

By Stephen Boyd
via David Brown
* tag 'msm-dt-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  ARM: msm: Remove non-DT targets from 8960
  ARM: msm: Add DT support for 8960
  ARM: msm: Move io mapping prototypes to common.h
  ARM: msm: Rename board-msm8x60 to signify its DT only status
  ARM: msm: Make 8660 a DT only target
  ARM: msm: Move 8660 to DT timer
  ARM: msm: Add DT support to msm_timer
  ARM: msm: Allow timer.c to compile on multiple targets
  ARM: msm: Don't touch GIC registers outside of GIC code
  ARM: msm: Add msm8660-surf.dts to Makefile.boot
  ARM: msm: Add handle_irq handler for 8660 DT machine

Resolved trivial context conflict in arch/arm/mach-msm/io.c and a
remove/change conflict in arch/arm/mach-msm/board-msm8x60.c.

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Sep 17, 2012
2 parents bada1c5 + 0607fa5 commit 591346c
Show file tree
Hide file tree
Showing 25 changed files with 407 additions and 497 deletions.
38 changes: 38 additions & 0 deletions Documentation/devicetree/bindings/arm/msm/timer.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
* MSM Timer

Properties:

- compatible : Should at least contain "qcom,msm-timer". More specific
properties such as "qcom,msm-gpt" and "qcom,msm-dgt" specify a general
purpose timer and a debug timer respectively.

- interrupts : Interrupt indicating a match event.

- reg : Specifies the base address of the timer registers. The second region
specifies an optional register used to configure the clock divider.

- clock-frequency : The frequency of the timer in Hz.

Optional:

- cpu-offset : per-cpu offset used when the timer is accessed without the
CPU remapping facilities. The offset is cpu-offset * cpu-nr.

Example:

timer@200a004 {
compatible = "qcom,msm-gpt", "qcom,msm-timer";
interrupts = <1 2 0x301>;
reg = <0x0200a004 0x10>;
clock-frequency = <32768>;
cpu-offset = <0x40000>;
};

timer@200a024 {
compatible = "qcom,msm-dgt", "qcom,msm-timer";
interrupts = <1 3 0x301>;
reg = <0x0200a024 0x10>,
<0x0200a034 0x4>;
clock-frequency = <6750000>;
cpu-offset = <0x40000>;
};
19 changes: 18 additions & 1 deletion arch/arm/boot/dts/msm8660-surf.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,31 @@
compatible = "qcom,msm8660-surf", "qcom,msm8660";
interrupt-parent = <&intc>;

intc: interrupt-controller@02080000 {
intc: interrupt-controller@2080000 {
compatible = "qcom,msm-8660-qgic";
interrupt-controller;
#interrupt-cells = <3>;
reg = < 0x02080000 0x1000 >,
< 0x02081000 0x1000 >;
};

timer@2000004 {
compatible = "qcom,msm-gpt", "qcom,msm-timer";
interrupts = <1 1 0x301>;
reg = <0x02000004 0x10>;
clock-frequency = <32768>;
cpu-offset = <0x40000>;
};

timer@2000024 {
compatible = "qcom,msm-dgt", "qcom,msm-timer";
interrupts = <1 0 0x301>;
reg = <0x02000024 0x10>,
<0x02000034 0x4>;
clock-frequency = <6750000>;
cpu-offset = <0x40000>;
};

serial@19c400000 {
compatible = "qcom,msm-hsuart", "qcom,msm-uart";
reg = <0x19c40000 0x1000>,
Expand Down
41 changes: 41 additions & 0 deletions arch/arm/boot/dts/msm8960-cdp.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/dts-v1/;

/include/ "skeleton.dtsi"

/ {
model = "Qualcomm MSM8960 CDP";
compatible = "qcom,msm8960-cdp", "qcom,msm8960";
interrupt-parent = <&intc>;

intc: interrupt-controller@2000000 {
compatible = "qcom,msm-qgic2";
interrupt-controller;
#interrupt-cells = <3>;
reg = < 0x02000000 0x1000 >,
< 0x02002000 0x1000 >;
};

timer@200a004 {
compatible = "qcom,msm-gpt", "qcom,msm-timer";
interrupts = <1 2 0x301>;
reg = <0x0200a004 0x10>;
clock-frequency = <32768>;
cpu-offset = <0x80000>;
};

timer@200a024 {
compatible = "qcom,msm-dgt", "qcom,msm-timer";
interrupts = <1 1 0x301>;
reg = <0x0200a024 0x10>,
<0x0200a034 0x4>;
clock-frequency = <6750000>;
cpu-offset = <0x80000>;
};

serial@19c400000 {
compatible = "qcom,msm-hsuart", "qcom,msm-uart";
reg = <0x16440000 0x1000>,
<0x16400000 0x1000>;
interrupts = <0 154 0x0>;
};
};
41 changes: 2 additions & 39 deletions arch/arm/mach-msm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,24 @@ config ARCH_QSD8X50

config ARCH_MSM8X60
bool "MSM8X60"
select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3 && !MACH_MSM8X60_SIM \
&& !MACH_MSM8X60_FFA)
select ARCH_MSM_SCORPIONMP
select ARM_GIC
select CPU_V7
select MSM_V2_TLMM
select GPIO_MSM_V2
select MSM_GPIOMUX
select MSM_SCM if SMP
select USE_OF

config ARCH_MSM8960
bool "MSM8960"
select ARCH_MSM_SCORPIONMP
select MACH_MSM8960_SIM if (!MACH_MSM8960_RUMI3)
select ARM_GIC
select CPU_V7
select MSM_V2_TLMM
select MSM_GPIOMUX
select MSM_SCM if SMP
select USE_OF

endchoice

Expand Down Expand Up @@ -112,42 +111,6 @@ config MACH_QSD8X50A_ST1_5
help
Support for the Qualcomm ST1.5.

config MACH_MSM8X60_RUMI3
depends on ARCH_MSM8X60
bool "MSM8x60 RUMI3"
help
Support for the Qualcomm MSM8x60 RUMI3 emulator.

config MACH_MSM8X60_SURF
depends on ARCH_MSM8X60
bool "MSM8x60 SURF"
help
Support for the Qualcomm MSM8x60 SURF eval board.

config MACH_MSM8X60_SIM
depends on ARCH_MSM8X60
bool "MSM8x60 Simulator"
help
Support for the Qualcomm MSM8x60 simulator.

config MACH_MSM8X60_FFA
depends on ARCH_MSM8X60
bool "MSM8x60 FFA"
help
Support for the Qualcomm MSM8x60 FFA eval board.

config MACH_MSM8960_SIM
depends on ARCH_MSM8960
bool "MSM8960 Simulator"
help
Support for the Qualcomm MSM8960 simulator.

config MACH_MSM8960_RUMI3
depends on ARCH_MSM8960
bool "MSM8960 RUMI3"
help
Support for the Qualcomm MSM8960 RUMI3 emulator.

endmenu

config MSM_SMD_PKG3
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o b
obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
obj-$(CONFIG_ARCH_MSM8X60) += board-msm8x60.o
obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o devices-msm8960.o
obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o
obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o

obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-msm/Makefile.boot
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
zreladdr-y += 0x10008000
params_phys-y := 0x10000100
initrd_phys-y := 0x10800000

dtb-$(CONFIG_ARCH_MSM8X60) += msm8660-surf.dtb
dtb-$(CONFIG_ARCH_MSM8960) += msm8960-cdp.dtb
63 changes: 63 additions & 0 deletions arch/arm/mach-msm/board-dt-8660.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>

#include <asm/mach/arch.h>
#include <asm/hardware/gic.h>

#include <mach/board.h>
#include "common.h"

static const struct of_device_id msm_dt_gic_match[] __initconst = {
{ .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
{}
};

static void __init msm8x60_init_irq(void)
{
of_irq_init(msm_dt_gic_match);
}

static void __init msm8x60_init_late(void)
{
smd_debugfs_init();
}

static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
{}
};

static void __init msm8x60_dt_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table,
msm_auxdata_lookup, NULL);
}

static const char *msm8x60_fluid_match[] __initdata = {
"qcom,msm8660-fluid",
"qcom,msm8660-surf",
NULL
};

DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
.map_io = msm_map_msm8x60_io,
.init_irq = msm8x60_init_irq,
.handle_irq = gic_handle_irq,
.init_machine = msm8x60_dt_init,
.init_late = msm8x60_init_late,
.timer = &msm_dt_timer,
.dt_compat = msm8x60_fluid_match,
MACHINE_END
49 changes: 49 additions & 0 deletions arch/arm/mach-msm/board-dt-8960.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

#include <linux/init.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>

#include <asm/hardware/gic.h>
#include <asm/mach/arch.h>

#include "common.h"

static const struct of_device_id msm_dt_gic_match[] __initconst = {
{ .compatible = "qcom,msm-qgic2", .data = gic_of_init },
{ }
};

static void __init msm_dt_init_irq(void)
{
of_irq_init(msm_dt_gic_match);
}

static void __init msm_dt_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

static const char * const msm8960_dt_match[] __initconst = {
"qcom,msm8960-cdp",
NULL
};

DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
.map_io = msm_map_msm8960_io,
.init_irq = msm_dt_init_irq,
.timer = &msm_dt_timer,
.init_machine = msm_dt_init,
.dt_compat = msm8960_dt_match,
.handle_irq = gic_handle_irq,
MACHINE_END
5 changes: 2 additions & 3 deletions arch/arm/mach-msm/board-halibut.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/mtd/partitions.h>

#include "devices.h"
#include "common.h"

static struct resource smc91x_resources[] = {
[0] = {
Expand Down Expand Up @@ -66,8 +67,6 @@ static struct platform_device *devices[] __initdata = {
&smc91x_device,
};

extern struct sys_timer msm_timer;

static void __init halibut_init_early(void)
{
arch_ioremap_caller = __msm_ioremap_caller;
Expand Down Expand Up @@ -107,5 +106,5 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
.init_irq = halibut_init_irq,
.init_machine = halibut_init,
.init_late = halibut_init_late,
.timer = &msm_timer,
.timer = &msm7x01_timer,
MACHINE_END
9 changes: 4 additions & 5 deletions arch/arm/mach-msm/board-msm7x30.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
#include "devices.h"
#include "gpiomux.h"
#include "proc_comm.h"

extern struct sys_timer msm_timer;
#include "common.h"

static void __init msm7x30_fixup(struct tag *tag, char **cmdline,
struct meminfo *mi)
Expand Down Expand Up @@ -132,7 +131,7 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
.init_late = msm7x30_init_late,
.timer = &msm_timer,
.timer = &msm7x30_timer,
MACHINE_END

MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
Expand All @@ -143,7 +142,7 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
.init_late = msm7x30_init_late,
.timer = &msm_timer,
.timer = &msm7x30_timer,
MACHINE_END

MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
Expand All @@ -154,5 +153,5 @@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
.init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init,
.init_late = msm7x30_init_late,
.timer = &msm_timer,
.timer = &msm7x30_timer,
MACHINE_END
Loading

0 comments on commit 591346c

Please sign in to comment.