MIPS: Loongson-3: Add RS780/SBX00 HPET support
authorHuacai Chen <chenhc@lemote.com>
Tue, 4 Nov 2014 06:15:31 +0000 (14:15 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 24 Nov 2014 06:45:02 +0000 (07:45 +0100)
commite292ccde216e571faad475e4331c188f22a28182
tree18bd2792fa52b3cd3f1aa2bc305262b75f80d8f8
parent89467e73d3881a470ce4ffdcba1d5a5ed618379a
MIPS: Loongson-3: Add RS780/SBX00 HPET support

CPUFreq driver need external timer, so add hpet at first.

In Loongson 3, only Core-0 can receive external interrupt. As a result,
timekeeping cannot absolutely use HPET timer. We use a hybrid solution:
Core-0 use HPET as its clock event device, but other cores still use
MIPS; clock source is global and doesn't need interrupt, so use HPET.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Hongliang Tao <taohl@lemote.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/8329/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/hpet.h [new file with mode: 0644]
arch/mips/loongson/Kconfig
arch/mips/loongson/common/time.c
arch/mips/loongson/loongson-3/Makefile
arch/mips/loongson/loongson-3/hpet.c [new file with mode: 0644]
arch/mips/loongson/loongson-3/irq.c