From: haojian.zhuang@linaro.org (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v11 5/6] ARM: hi3xxx: add smp support
Date: Wed, 13 Nov 2013 07:39:32 +0800 [thread overview]
Message-ID: <5282BC34.8010008@linaro.org> (raw)
In-Reply-To: <87txfhmdi3.fsf@linaro.org>
On 11/13/2013 07:00 AM, Kevin Hilman wrote:
> Haojian Zhuang <haojian.zhuang@linaro.org> writes:
>
>> On 7 November 2013 18:30, Dinh Nguyen <dinh.linux@gmail.com> wrote:
>>> On 11/7/13 2:41 AM, Haojian Zhuang wrote:
>>>> From: Zhangfei Gao <zhangfei.gao@linaro.org>
>>>>
>>>> Enable SMP support on hi3xxx platform
>>>>
>>>> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
>>>> Tested-by: Zhang Mingjun <zhang.mingjun@linaro.org>
>>>> Tested-by: Li Xin <li.xin@linaro.org>
>>>> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
>>>> ---
>>>> .../bindings/arm/hisilicon/hisilicon.txt | 30 ++++++--
>>>> arch/arm/boot/dts/hi3620.dtsi | 38 ++++++++++
>>>> arch/arm/mach-hi3xxx/Kconfig | 3 +
>>>> arch/arm/mach-hi3xxx/Makefile | 1 +
>>>> arch/arm/mach-hi3xxx/core.h | 11 +++
>>>> arch/arm/mach-hi3xxx/hi3xxx.c | 34 +++++++++
>>>> arch/arm/mach-hi3xxx/platsmp.c | 84 ++++++++++++++++++++++
>>>> 7 files changed, 197 insertions(+), 4 deletions(-)
>>>> create mode 100644 arch/arm/mach-hi3xxx/core.h
>>>> create mode 100644 arch/arm/mach-hi3xxx/platsmp.c
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
>>>> index 3be60c8..8c7a465 100644
>>>> --- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
>>>> +++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
>>>> @@ -1,10 +1,32 @@
>>>> Hisilicon Platforms Device Tree Bindings
>>>> ----------------------------------------------------
>>>>
>>>> -Hi3716 Development Board
>>>> -Required root node properties:
>>>> - - compatible = "hisilicon,hi3716-dkb";
>>>> -
>>>> Hi4511 Board
>>>> Required root node properties:
>>>> - compatible = "hisilicon,hi3620-hi4511";
>>>> +
>>>> +Hisilicon system controller
>>>> +
>>>> +Required properties:
>>>> +- compatible : "hisilicon,sysctrl"
>>>> +- reg : Register address and size
>>>> +
>>>> +Optional properties:
>>>> +- smp-offset : offset in sysctrl for notifying slave cpu booting
>>>> + cpu 1, reg;
>>>> + cpu 2, reg + 0x4;
>>>> + cpu 3, reg + 0x8;
>>>> + If reg value is not zero, cpun exit wfi and go
>>>> +- resume-offset : offset in sysctrl for notifying cpu0 when resume
>>>> +- reboot-offset : offset in sysctrl for system reboot
>>>> +
>>>> +Example:
>>>> +
>>>> + /* for Hi3620 */
>>>> + sysctrl: system-controller at fc802000 {
>>>> + compatible = "hisilicon,sysctrl";
>>>> + reg = <0xfc802000 0x1000>;
>>>> + smp-offset = <0x31c>;
>>>> + resume-offset = <0x308>;
>>>> + reboot-offset = <0x4>;
>>>> + };
>>>> diff --git a/arch/arm/boot/dts/hi3620.dtsi b/arch/arm/boot/dts/hi3620.dtsi
>>>> index b9d8679..e311937 100644
>>>> --- a/arch/arm/boot/dts/hi3620.dtsi
>>>> +++ b/arch/arm/boot/dts/hi3620.dtsi
>>>> @@ -39,6 +39,27 @@
>>>> reg = <0x0>;
>>>> next-level-cache = <&L2>;
>>>> };
>>>> +
>>>> + cpu at 1 {
>>>> + compatible = "arm,cortex-a9";
>>>> + device_type = "cpu";
>>>> + reg = <1>;
>>>> + next-level-cache = <&L2>;
>>>> + };
>>>> +
>>>> + cpu at 2 {
>>>> + compatible = "arm,cortex-a9";
>>>> + device_type = "cpu";
>>>> + reg = <2>;
>>>> + next-level-cache = <&L2>;
>>>> + };
>>>> +
>>>> + cpu at 3 {
>>>> + compatible = "arm,cortex-a9";
>>>> + device_type = "cpu";
>>>> + reg = <3>;
>>>> + next-level-cache = <&L2>;
>>>> + };
>>>> };
>>>>
>>>> amba {
>>>> @@ -65,6 +86,17 @@
>>>> reg = <0x1000 0x1000>, <0x100 0x100>;
>>>> };
>>>>
>>>> + sysctrl: system-controller at 802000 {
>>>> + compatible = "hisilicon,sysctrl";
>>>> + reg = <0x802000 0x1000>;
>>>> + #address-cells = <1>;
>>>> + #size-cells = <0>;
>>>> +
>>>> + smp-offset = <0x31c>;
>>>> + resume-offset = <0x308>;
>>>> + reboot-offset = <0x4>;
>>>> + };
>>>> +
>>>> dual_timer0: dual_timer at 800000 {
>>>> compatible = "arm,sp804", "arm,primecell";
>>>> reg = <0x800000 0x1000>;
>>>> @@ -115,6 +147,12 @@
>>>> status = "disabled";
>>>> };
>>>>
>>>> + timer5: timer at 600 {
>>>> + compatible = "arm,cortex-a9-twd-timer";
>>>> + reg = <0x600 0x20>;
>>>> + interrupts = <1 13 0xf01>;
>>>> + };
>>> Do you have a clocks node for this timer?
>> As I mentioned in the 0th patch, clock binding are totally removed
>> in this patch. And clock driver will be append in another patch set.
> Still, won't this timer still need a dummy fixed-rate clock until the
> real clocks are in place? Otherwise it seems twd_get_clock() is going
> to fail.
>
> Kevin
sp804 is working. twd_get_clock() fails but it could calculate rate.
I tested on my platform. With this dummy fixed-rate clock, it could
work.
Regards
Haojian
next prev parent reply other threads:[~2013-11-12 23:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 8:41 [PATCH v11 0/6] enable hi3xxx SoC Haojian Zhuang
2013-11-07 8:41 ` [PATCH v11 1/6] ARM: hi3xxx: add board support with device tree Haojian Zhuang
2013-11-07 9:50 ` Dinh Nguyen
2013-11-12 8:42 ` Haojian Zhuang
2013-11-07 8:41 ` [PATCH v11 2/6] ARM: dts: enable hi4511 " Haojian Zhuang
2013-11-07 8:41 ` [PATCH v11 3/6] ARM: config: enable hi3xxx in multi_v7_defconfig Haojian Zhuang
2013-11-07 8:41 ` [PATCH v11 4/6] ARM: config: add defconfig for Hi3xxx Haojian Zhuang
2013-11-07 8:41 ` [PATCH v11 5/6] ARM: hi3xxx: add smp support Haojian Zhuang
2013-11-07 10:30 ` Dinh Nguyen
2013-11-12 8:49 ` Haojian Zhuang
2013-11-12 23:00 ` Kevin Hilman
2013-11-12 23:39 ` Haojian Zhuang [this message]
2013-11-25 4:00 ` Olof Johansson
2013-11-25 4:57 ` Haojian Zhuang
2013-11-12 22:53 ` Kevin Hilman
2013-11-12 23:40 ` Haojian Zhuang
2013-11-07 8:41 ` [PATCH v11 6/6] ARM: hi3xxx: add hotplug support Haojian Zhuang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5282BC34.8010008@linaro.org \
--to=haojian.zhuang@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).