Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232193 > unrolled thread
| Started by | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| First post | 2015-09-24 17:40 +0200 |
| Last post | 2015-09-24 17:50 +0200 |
| Articles | 10 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v4 0/5] Add SMP bringup support for mt65xx socs Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-09-24 17:40 +0200
[PATCH v4 2/5] devicetree: bindings: add new SMP enable method Mediatek SoC Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-09-24 17:50 +0200
Re: [PATCH v4 2/5] devicetree: bindings: add new SMP enable method Mediatek SoC Rob Herring <robherring2@gmail.com> - 2015-09-28 19:50 +0200
[PATCH v4 3/5] ARM: mediatek: add smp bringup code Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-09-24 17:50 +0200
Re: [PATCH v4 3/5] ARM: mediatek: add smp bringup code Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-26 11:40 +0200
Re: [PATCH v4 3/5] ARM: mediatek: add smp bringup code Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-10-01 15:50 +0200
[PATCH v4 5/5] ARM: dts: mt8127: enable basic SMP bringup for mt8127 Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-09-24 17:50 +0200
[PATCH v4 4/5] ARM: dts: mt8135: enable basic SMP bringup for mt8135 Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-09-24 17:50 +0200
Re: [PATCH v4 4/5] ARM: dts: mt8135: enable basic SMP bringup for mt8135 Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-09-25 07:50 +0200
[PATCH v4 1/5] ARM: mediatek: enable gpt6 on boot up to make arch timer working Yingjoe Chen <yingjoe.chen@mediatek.com> - 2015-09-24 17:50 +0200
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-09-24 17:40 +0200 |
| Subject | [PATCH v4 0/5] Add SMP bringup support for mt65xx socs |
| Message-ID | <qcgMN-7bv-1@gated-at.bofh.it> |
This series add SMP brinup support for MediaTek SoCs. This is v4 and is based on v4.3-rc1. There are similar but different SMP bringup up methods on MediaTek mt65xx and mt81xx. On MT8135 & MT8127, system boots with a trustzone firmware. Others, like MT6589, doesn't have trustzone, and run kernel directly in secure world. Patch 1 enable arch timer support. Patch 2,3 add support for cpu enable-method "mediatek,mt6589-smp" and "mediatek,mt81xx-tz-smp", which support Mediatek SMP bringup for non-TZ and TZ platform. Patch 4,5 finally enable SMP bringup for mt8135 and mt8127. Changes in v4: - rebase to v4.3-rc1 - Reserve trustzone bootinfo memory area in device tree. Changes in v3: - v3 in [1] - The first 2 patches in v2 are merged in v4.2-rc1. - Patch 3~4 in v2 are moved to another series [2] - platsmp.c changes based on Stephen's suggestion - Change cpu enable-method name to "mediatek,mt6589-smp" Changes in v2: - Fix boot issue for THUMB2 kernel. - Not enable GPT_CLK_EVT when setup to fix GPT spurious interrupt issue - Change platsmp.c according to Matthias' suggestion http://lists.infradead.org/pipermail/linux-mediatek/2015-May/000714.html v1: http://lists.infradead.org/pipermail/linux-mediatek/2015-May/000528.html [1] http://lists.infradead.org/pipermail/linux-mediatek/2015-July/001570.html [2] http://lists.infradead.org/pipermail/linux-mediatek/2015-July/001544.html Matthias Brugger (1): ARM: mediatek: enable gpt6 on boot up to make arch timer working Yingjoe Chen (4): devicetree: bindings: add new SMP enable method Mediatek SoC ARM: mediatek: add smp bringup code ARM: dts: mt8135: enable basic SMP bringup for mt8135 ARM: dts: mt8127: enable basic SMP bringup for mt8127 Documentation/devicetree/bindings/arm/cpus.txt | 2 + arch/arm/boot/dts/mt8127.dtsi | 27 +++++ arch/arm/boot/dts/mt8135.dtsi | 27 +++++ arch/arm/mach-mediatek/Makefile | 3 + arch/arm/mach-mediatek/mediatek.c | 27 +++++ arch/arm/mach-mediatek/platsmp.c | 141 +++++++++++++++++++++++++ 6 files changed, 227 insertions(+) create mode 100644 arch/arm/mach-mediatek/platsmp.c -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-09-24 17:50 +0200 |
| Subject | [PATCH v4 2/5] devicetree: bindings: add new SMP enable method Mediatek SoC |
| Message-ID | <qcgWu-7mP-15@gated-at.bofh.it> |
| In reply to | #1232193 |
This commit add new cpu enable method "mediatek,mt65xx-smp" and "mediatek,mt81xx-tz-smp". Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com> --- Documentation/devicetree/bindings/arm/cpus.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 91e6e5c..3a07a87 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -195,6 +195,8 @@ nodes to be present and contain the properties described below. "marvell,armada-380-smp" "marvell,armada-390-smp" "marvell,armada-xp-smp" + "mediatek,mt6589-smp" + "mediatek,mt81xx-tz-smp" "qcom,gcc-msm8660" "qcom,kpss-acc-v1" "qcom,kpss-acc-v2" -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robherring2@gmail.com> |
|---|---|
| Date | 2015-09-28 19:50 +0200 |
| Subject | Re: [PATCH v4 2/5] devicetree: bindings: add new SMP enable method Mediatek SoC |
| Message-ID | <qdKIP-6p5-17@gated-at.bofh.it> |
| In reply to | #1232202 |
On Thu, Sep 24, 2015 at 10:38 AM, Yingjoe Chen <yingjoe.chen@mediatek.com> wrote: > This commit add new cpu enable method "mediatek,mt65xx-smp" and > "mediatek,mt81xx-tz-smp". > > Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com> Acked-by: Rob Herring <robh@kernel.org> > --- > Documentation/devicetree/bindings/arm/cpus.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt > index 91e6e5c..3a07a87 100644 > --- a/Documentation/devicetree/bindings/arm/cpus.txt > +++ b/Documentation/devicetree/bindings/arm/cpus.txt > @@ -195,6 +195,8 @@ nodes to be present and contain the properties described below. > "marvell,armada-380-smp" > "marvell,armada-390-smp" > "marvell,armada-xp-smp" > + "mediatek,mt6589-smp" > + "mediatek,mt81xx-tz-smp" > "qcom,gcc-msm8660" > "qcom,kpss-acc-v1" > "qcom,kpss-acc-v2" > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-09-24 17:50 +0200 |
| Subject | [PATCH v4 3/5] ARM: mediatek: add smp bringup code |
| Message-ID | <qcgWu-7mP-11@gated-at.bofh.it> |
| In reply to | #1232193 |
Add support for booting secondary CPUs on mt6589, mt8127
and mt8135.
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
arch/arm/mach-mediatek/Makefile | 3 +
arch/arm/mach-mediatek/platsmp.c | 141 +++++++++++++++++++++++++++++++++++++++
2 files changed, 144 insertions(+)
create mode 100644 arch/arm/mach-mediatek/platsmp.c
diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile
index 43e619f..2116460 100644
--- a/arch/arm/mach-mediatek/Makefile
+++ b/arch/arm/mach-mediatek/Makefile
@@ -1 +1,4 @@
+ifeq ($(CONFIG_SMP),y)
+obj-$(CONFIG_ARCH_MEDIATEK) += platsmp.o
+endif
obj-$(CONFIG_ARCH_MEDIATEK) += mediatek.o
diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
new file mode 100644
index 0000000..8141f3f
--- /dev/null
+++ b/arch/arm/mach-mediatek/platsmp.c
@@ -0,0 +1,141 @@
+/*
+ * arch/arm/mach-mediatek/platsmp.c
+ *
+ * Copyright (c) 2014 Mediatek Inc.
+ * Author: Shunli Wang <shunli.wang@mediatek.com>
+ * Yingjoe Chen <yingjoe.chen@mediatek.com>
+ *
+ * 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.
+ *
+ * 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/io.h>
+#include <linux/memblock.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/string.h>
+#include <linux/threads.h>
+
+#define MTK_MAX_CPU 8
+#define MTK_SMP_REG_SIZE 0x1000
+
+struct mtk_smp_boot_info {
+ unsigned long smp_base;
+ unsigned int jump_reg;
+ unsigned int core_keys[MTK_MAX_CPU - 1];
+ unsigned int core_regs[MTK_MAX_CPU - 1];
+};
+
+static const struct mtk_smp_boot_info mtk_mt8135_tz_boot = {
+ 0x80002000, 0x3fc,
+ { 0x534c4131, 0x4c415332, 0x41534c33 },
+ { 0x3f8, 0x3f8, 0x3f8 },
+};
+
+static const struct mtk_smp_boot_info mtk_mt6589_boot = {
+ 0x10002000, 0x34,
+ { 0x534c4131, 0x4c415332, 0x41534c33 },
+ { 0x38, 0x3c, 0x40 },
+};
+
+static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = {
+ { .compatible = "mediatek,mt8135", .data = &mtk_mt8135_tz_boot },
+ { .compatible = "mediatek,mt8127", .data = &mtk_mt8135_tz_boot },
+};
+
+static const struct of_device_id mtk_smp_boot_infos[] __initconst = {
+ { .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot },
+};
+
+static void __iomem *mtk_smp_base;
+static const struct mtk_smp_boot_info *mtk_smp_info;
+
+static int mtk_boot_secondary(unsigned int cpu, struct task_struct *idle)
+{
+ if (!mtk_smp_base)
+ return -EINVAL;
+
+ if (!mtk_smp_info->core_keys[cpu-1])
+ return -EINVAL;
+
+ writel_relaxed(mtk_smp_info->core_keys[cpu-1],
+ mtk_smp_base + mtk_smp_info->core_regs[cpu-1]);
+
+ arch_send_wakeup_ipi_mask(cpumask_of(cpu));
+
+ return 0;
+}
+
+static void __init __mtk_smp_prepare_cpus(unsigned int max_cpus, int trustzone)
+{
+ int i, num;
+ const struct of_device_id *infos;
+
+ if (trustzone) {
+ num = ARRAY_SIZE(mtk_tz_smp_boot_infos);
+ infos = mtk_tz_smp_boot_infos;
+ } else {
+ num = ARRAY_SIZE(mtk_smp_boot_infos);
+ infos = mtk_smp_boot_infos;
+ }
+
+ /* Find smp boot info for this SoC */
+ for (i = 0; i < num; i++) {
+ if (of_machine_is_compatible(infos[i].compatible)) {
+ mtk_smp_info = infos[i].data;
+ break;
+ }
+ }
+
+ if (!mtk_smp_info) {
+ pr_err("%s: Device is not supported\n", __func__);
+ return;
+ }
+
+ if (trustzone) {
+ /* smp_base(trustzone-bootinfo) is reserved by device tree */
+ mtk_smp_base = phys_to_virt(mtk_smp_info->smp_base);
+ } else {
+ mtk_smp_base = ioremap(mtk_smp_info->smp_base, MTK_SMP_REG_SIZE);
+ if (!mtk_smp_base) {
+ pr_err("%s: Can't remap %lx\n", __func__,
+ mtk_smp_info->smp_base);
+ return;
+ }
+ }
+
+ /*
+ * write the address of slave startup address into the system-wide
+ * jump register
+ */
+ writel_relaxed(virt_to_phys(secondary_startup_arm),
+ mtk_smp_base + mtk_smp_info->jump_reg);
+}
+
+static void __init mtk_tz_smp_prepare_cpus(unsigned int max_cpus)
+{
+ __mtk_smp_prepare_cpus(max_cpus, 1);
+}
+
+static void __init mtk_smp_prepare_cpus(unsigned int max_cpus)
+{
+ __mtk_smp_prepare_cpus(max_cpus, 0);
+}
+
+static struct smp_operations mt81xx_tz_smp_ops __initdata = {
+ .smp_prepare_cpus = mtk_tz_smp_prepare_cpus,
+ .smp_boot_secondary = mtk_boot_secondary,
+};
+CPU_METHOD_OF_DECLARE(mt81xx_tz_smp, "mediatek,mt81xx-tz-smp", &mt81xx_tz_smp_ops);
+
+static struct smp_operations mt6589_smp_ops __initdata = {
+ .smp_prepare_cpus = mtk_smp_prepare_cpus,
+ .smp_boot_secondary = mtk_boot_secondary,
+};
+CPU_METHOD_OF_DECLARE(mt6589_smp, "mediatek,mt6589-smp", &mt6589_smp_ops);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Date | 2015-09-26 11:40 +0200 |
| Subject | Re: [PATCH v4 3/5] ARM: mediatek: add smp bringup code |
| Message-ID | <qcU7w-4qo-3@gated-at.bofh.it> |
| In reply to | #1232204 |
On Thu, Sep 24, 2015 at 11:38:58PM +0800, Yingjoe Chen wrote:
> +struct mtk_smp_boot_info {
> + unsigned long smp_base;
...
> +static const struct mtk_smp_boot_info mtk_mt8135_tz_boot = {
> + 0x80002000, 0x3fc,
...
> +static const struct mtk_smp_boot_info mtk_mt6589_boot = {
> + 0x10002000, 0x34,
...
> + if (trustzone) {
> + /* smp_base(trustzone-bootinfo) is reserved by device tree */
> + mtk_smp_base = phys_to_virt(mtk_smp_info->smp_base);
I can't say whether this is correct or not, as we've got rid of most of
the information that would allow me to make that decision.
The address passed to phys_to_virt() _must_ be one which is mapped by
the kernel as lowmem. I've no idea if the above would fall into that
category though.
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-10-01 15:50 +0200 |
| Subject | Re: [PATCH v4 3/5] ARM: mediatek: add smp bringup code |
| Message-ID | <qeMpc-66l-9@gated-at.bofh.it> |
| In reply to | #1233176 |
On Sat, 2015-09-26 at 10:38 +0100, Russell King - ARM Linux wrote:
> On Thu, Sep 24, 2015 at 11:38:58PM +0800, Yingjoe Chen wrote:
> > +struct mtk_smp_boot_info {
> > + unsigned long smp_base;
> ...
> > +static const struct mtk_smp_boot_info mtk_mt8135_tz_boot = {
> > + 0x80002000, 0x3fc,
> ...
> > +static const struct mtk_smp_boot_info mtk_mt6589_boot = {
> > + 0x10002000, 0x34,
> ...
> > + if (trustzone) {
> > + /* smp_base(trustzone-bootinfo) is reserved by device tree */
> > + mtk_smp_base = phys_to_virt(mtk_smp_info->smp_base);
>
> I can't say whether this is correct or not, as we've got rid of most of
> the information that would allow me to make that decision.
>
> The address passed to phys_to_virt() _must_ be one which is mapped by
> the kernel as lowmem. I've no idea if the above would fall into that
> category though.
>
Currently only mt8127/mt8135 trustzone firmware use this reserve
location. The reserved memory is before kernel code, so it will
definitely in lowmem.
Joe.C
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-09-24 17:50 +0200 |
| Subject | [PATCH v4 5/5] ARM: dts: mt8127: enable basic SMP bringup for mt8127 |
| Message-ID | <qcgWv-7mP-19@gated-at.bofh.it> |
| In reply to | #1232193 |
Add arch timer node to enable arch-timer support. MT8127 firmware
doesn't correctly setup arch-timer frequency and CNTVOFF, add
properties to workaround this.
This also set cpu enable-method to enable SMP.
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
arch/arm/boot/dts/mt8127.dtsi | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm/boot/dts/mt8127.dtsi b/arch/arm/boot/dts/mt8127.dtsi
index ca3402e..50652fd 100644
--- a/arch/arm/boot/dts/mt8127.dtsi
+++ b/arch/arm/boot/dts/mt8127.dtsi
@@ -23,6 +23,7 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
+ enable-method = "mediatek,mt81xx-tz-smp";
cpu@0 {
device_type = "cpu";
@@ -47,6 +48,17 @@
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ trustzone-bootinfo: trustzone-bootinfo@80002000 {
+ compatible = "mediatek,trustzone-bootinfo";
+ reg = <0 0x80002000 0 0x1000>;
+ };
+ };
+
clocks {
#address-cells = <2>;
#size-cells = <2>;
@@ -72,6 +84,21 @@
};
};
+ timer {
+ compatible = "arm,armv7-timer";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>;
+ clock-frequency = <13000000>;
+ arm,cpu-registers-not-fw-configured;
+ };
+
soc {
#address-cells = <2>;
#size-cells = <2>;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-09-24 17:50 +0200 |
| Subject | [PATCH v4 4/5] ARM: dts: mt8135: enable basic SMP bringup for mt8135 |
| Message-ID | <qcgWv-7mP-23@gated-at.bofh.it> |
| In reply to | #1232193 |
Add arch timer node to enable arch-timer support. MT8135 firmware
doesn't correctly setup arch-timer frequency and CNTVOFF, add
properties to workaround this.
This also set cpu enable-method to enable SMP.
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
arch/arm/boot/dts/mt8135.dtsi | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm/boot/dts/mt8135.dtsi b/arch/arm/boot/dts/mt8135.dtsi
index 08371db..c3c90f2 100644
--- a/arch/arm/boot/dts/mt8135.dtsi
+++ b/arch/arm/boot/dts/mt8135.dtsi
@@ -46,6 +46,7 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
+ enable-method = "mediatek,mt81xx-tz-smp";
cpu0: cpu@0 {
device_type = "cpu";
@@ -72,6 +73,17 @@
};
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ trustzone-bootinfo: trustzone-bootinfo@80002000 {
+ compatible = "mediatek,trustzone-bootinfo";
+ reg = <0 0x80002000 0 0x1000>;
+ };
+ };
+
clocks {
#address-cells = <2>;
#size-cells = <2>;
@@ -97,6 +109,21 @@
};
};
+ timer {
+ compatible = "arm,armv7-timer";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
+ IRQ_TYPE_LEVEL_LOW)>;
+ clock-frequency = <13000000>;
+ arm,cpu-registers-not-fw-configured;
+ };
+
soc {
#address-cells = <2>;
#size-cells = <2>;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-09-25 07:50 +0200 |
| Subject | Re: [PATCH v4 4/5] ARM: dts: mt8135: enable basic SMP bringup for mt8135 |
| Message-ID | <qcu3o-MY-5@gated-at.bofh.it> |
| In reply to | #1232209 |
On Thu, 2015-09-24 at 23:38 +0800, Yingjoe Chen wrote:
> Add arch timer node to enable arch-timer support. MT8135 firmware
> doesn't correctly setup arch-timer frequency and CNTVOFF, add
> properties to workaround this.
>
> This also set cpu enable-method to enable SMP.
>
> Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
> ---
> arch/arm/boot/dts/mt8135.dtsi | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm/boot/dts/mt8135.dtsi b/arch/arm/boot/dts/mt8135.dtsi
> index 08371db..c3c90f2 100644
> --- a/arch/arm/boot/dts/mt8135.dtsi
> +++ b/arch/arm/boot/dts/mt8135.dtsi
> @@ -46,6 +46,7 @@
> cpus {
> #address-cells = <1>;
> #size-cells = <0>;
> + enable-method = "mediatek,mt81xx-tz-smp";
>
> cpu0: cpu@0 {
> device_type = "cpu";
> @@ -72,6 +73,17 @@
> };
> };
>
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + trustzone-bootinfo: trustzone-bootinfo@80002000 {
Sorry, this should be
+ trustzone-bootinfo@80002000 {
I'll fix this in next version.
Joe.C
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Yingjoe Chen <yingjoe.chen@mediatek.com> |
|---|---|
| Date | 2015-09-24 17:50 +0200 |
| Subject | [PATCH v4 1/5] ARM: mediatek: enable gpt6 on boot up to make arch timer working |
| Message-ID | <qcgWv-7mP-27@gated-at.bofh.it> |
| In reply to | #1232193 |
From: Matthias Brugger <matthias.bgg@gmail.com>
We enable GTP6 which ungates the arch timer clock.
In the future this should be done in the bootloader.
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
arch/arm/mach-mediatek/mediatek.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c
index a954900..19dc738 100644
--- a/arch/arm/mach-mediatek/mediatek.c
+++ b/arch/arm/mach-mediatek/mediatek.c
@@ -16,6 +16,32 @@
*/
#include <linux/init.h>
#include <asm/mach/arch.h>
+#include <linux/of.h>
+#include <linux/clk-provider.h>
+#include <linux/clocksource.h>
+
+
+#define GPT6_CON_MT65xx 0x10008060
+#define GPT_ENABLE 0x31
+
+static void __init mediatek_timer_init(void)
+{
+ void __iomem *gpt_base;
+
+ if (of_machine_is_compatible("mediatek,mt6589") ||
+ of_machine_is_compatible("mediatek,mt8135") ||
+ of_machine_is_compatible("mediatek,mt8127")) {
+ /* turn on GPT6 which ungates arch timer clocks */
+ gpt_base = ioremap(GPT6_CON_MT65xx, 0x04);
+
+ /* enable clock and set to free-run */
+ writel(GPT_ENABLE, gpt_base);
+ iounmap(gpt_base);
+ }
+
+ of_clk_init(NULL);
+ clocksource_of_init();
+};
static const char * const mediatek_board_dt_compat[] = {
"mediatek,mt6589",
@@ -27,4 +53,5 @@ static const char * const mediatek_board_dt_compat[] = {
DT_MACHINE_START(MEDIATEK_DT, "Mediatek Cortex-A7 (Device Tree)")
.dt_compat = mediatek_board_dt_compat,
+ .init_time = mediatek_timer_init,
MACHINE_END
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web