Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5abe65e3
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5abe65e3
编写于
7月 24, 2014
作者:
J
Jason Cooper
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'mvebu/fixes' into mvebu/soc-cpuidle
上级
ba364fc7
a728b977
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
86 addition
and
34 deletion
+86
-34
Documentation/devicetree/bindings/arm/armada-38x.txt
Documentation/devicetree/bindings/arm/armada-38x.txt
+12
-2
arch/arm/boot/dts/armada-380.dtsi
arch/arm/boot/dts/armada-380.dtsi
+1
-1
arch/arm/boot/dts/armada-385-db.dts
arch/arm/boot/dts/armada-385-db.dts
+1
-1
arch/arm/boot/dts/armada-385-rd.dts
arch/arm/boot/dts/armada-385-rd.dts
+1
-1
arch/arm/boot/dts/armada-385.dtsi
arch/arm/boot/dts/armada-385.dtsi
+1
-1
arch/arm/boot/dts/armada-38x.dtsi
arch/arm/boot/dts/armada-38x.dtsi
+1
-1
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
+2
-2
arch/arm/mach-mvebu/Kconfig
arch/arm/mach-mvebu/Kconfig
+2
-0
arch/arm/mach-mvebu/Makefile
arch/arm/mach-mvebu/Makefile
+1
-1
arch/arm/mach-mvebu/board-v7.c
arch/arm/mach-mvebu/board-v7.c
+19
-10
arch/arm/mach-mvebu/coherency.c
arch/arm/mach-mvebu/coherency.c
+5
-1
arch/arm/mach-mvebu/headsmp-a9.S
arch/arm/mach-mvebu/headsmp-a9.S
+8
-1
arch/arm/mach-mvebu/pmsu.c
arch/arm/mach-mvebu/pmsu.c
+7
-12
arch/arm/mach-mvebu/pmsu_ll.S
arch/arm/mach-mvebu/pmsu_ll.S
+25
-0
未找到文件。
Documentation/devicetree/bindings/arm/armada-38x.txt
浏览文件 @
5abe65e3
...
@@ -6,5 +6,15 @@ following property:
...
@@ -6,5 +6,15 @@ following property:
Required root node property:
Required root node property:
- compatible: must contain either "marvell,armada380" or
- compatible: must contain "marvell,armada380"
"marvell,armada385" depending on the variant of the SoC being used.
In addition, boards using the Marvell Armada 385 SoC shall have the
following property before the previous one:
Required root node property:
compatible: must contain "marvell,armada385"
Example:
compatible = "marvell,a385-rd", "marvell,armada385", "marvell,armada380";
arch/arm/boot/dts/armada-380.dtsi
浏览文件 @
5abe65e3
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
/
{
/
{
model
=
"Marvell Armada 380 family SoC"
;
model
=
"Marvell Armada 380 family SoC"
;
compatible
=
"marvell,armada380"
,
"marvell,armada38x"
;
compatible
=
"marvell,armada380"
;
cpus
{
cpus
{
#
address
-
cells
=
<
1
>;
#
address
-
cells
=
<
1
>;
...
...
arch/arm/boot/dts/armada-385-db.dts
浏览文件 @
5abe65e3
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
/
{
/
{
model
=
"Marvell Armada 385 Development Board"
;
model
=
"Marvell Armada 385 Development Board"
;
compatible
=
"marvell,a385-db"
,
"marvell,armada385"
,
"marvell,armada38
x
"
;
compatible
=
"marvell,a385-db"
,
"marvell,armada385"
,
"marvell,armada38
0
"
;
chosen
{
chosen
{
bootargs
=
"console=ttyS0,115200 earlyprintk"
;
bootargs
=
"console=ttyS0,115200 earlyprintk"
;
...
...
arch/arm/boot/dts/armada-385-rd.dts
浏览文件 @
5abe65e3
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
/
{
/
{
model
=
"Marvell Armada 385 Reference Design"
;
model
=
"Marvell Armada 385 Reference Design"
;
compatible
=
"marvell,a385-rd"
,
"marvell,armada385"
,
"marvell,armada38
x
"
;
compatible
=
"marvell,a385-rd"
,
"marvell,armada385"
,
"marvell,armada38
0
"
;
chosen
{
chosen
{
bootargs
=
"console=ttyS0,115200 earlyprintk"
;
bootargs
=
"console=ttyS0,115200 earlyprintk"
;
...
...
arch/arm/boot/dts/armada-385.dtsi
浏览文件 @
5abe65e3
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
/
{
/
{
model
=
"Marvell Armada 385 family SoC"
;
model
=
"Marvell Armada 385 family SoC"
;
compatible
=
"marvell,armada385"
,
"marvell,armada38
x
"
;
compatible
=
"marvell,armada385"
,
"marvell,armada38
0
"
;
cpus
{
cpus
{
#
address
-
cells
=
<
1
>;
#
address
-
cells
=
<
1
>;
...
...
arch/arm/boot/dts/armada-38x.dtsi
浏览文件 @
5abe65e3
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
/
{
/
{
model
=
"Marvell Armada 38x family SoC"
;
model
=
"Marvell Armada 38x family SoC"
;
compatible
=
"marvell,armada38
x
"
;
compatible
=
"marvell,armada38
0
"
;
aliases
{
aliases
{
gpio0
=
&
gpio0
;
gpio0
=
&
gpio0
;
...
...
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
浏览文件 @
5abe65e3
...
@@ -105,7 +105,6 @@
...
@@ -105,7 +105,6 @@
compatible
=
"ethernet-phy-id0141.0cb0"
,
compatible
=
"ethernet-phy-id0141.0cb0"
,
"ethernet-phy-ieee802.3-c22"
;
"ethernet-phy-ieee802.3-c22"
;
reg
=
<
0
>;
reg
=
<
0
>;
phy
-
connection
-
type
=
"rgmii-id"
;
};
};
ethphy1
:
ethernet
-
phy
@
1
{
ethphy1
:
ethernet
-
phy
@
1
{
...
@@ -113,7 +112,6 @@
...
@@ -113,7 +112,6 @@
compatible
=
"ethernet-phy-id0141.0cb0"
,
compatible
=
"ethernet-phy-id0141.0cb0"
,
"ethernet-phy-ieee802.3-c22"
;
"ethernet-phy-ieee802.3-c22"
;
reg
=
<
1
>;
reg
=
<
1
>;
phy
-
connection
-
type
=
"rgmii-id"
;
};
};
};
};
...
@@ -121,6 +119,7 @@
...
@@ -121,6 +119,7 @@
status
=
"okay"
;
status
=
"okay"
;
ethernet0
-
port
@
0
{
ethernet0
-
port
@
0
{
phy
-
handle
=
<&
ethphy0
>;
phy
-
handle
=
<&
ethphy0
>;
phy
-
connection
-
type
=
"rgmii-id"
;
};
};
};
};
...
@@ -128,5 +127,6 @@
...
@@ -128,5 +127,6 @@
status
=
"okay"
;
status
=
"okay"
;
ethernet1
-
port
@
0
{
ethernet1
-
port
@
0
{
phy
-
handle
=
<&
ethphy1
>;
phy
-
handle
=
<&
ethphy1
>;
phy
-
connection
-
type
=
"rgmii-id"
;
};
};
};
};
arch/arm/mach-mvebu/Kconfig
浏览文件 @
5abe65e3
...
@@ -10,6 +10,7 @@ config ARCH_MVEBU
...
@@ -10,6 +10,7 @@ config ARCH_MVEBU
select ZONE_DMA if ARM_LPAE
select ZONE_DMA if ARM_LPAE
select ARCH_REQUIRE_GPIOLIB
select ARCH_REQUIRE_GPIOLIB
select PCI_QUIRKS if PCI
select PCI_QUIRKS if PCI
select OF_ADDRESS_PCI
if ARCH_MVEBU
if ARCH_MVEBU
...
@@ -19,6 +20,7 @@ config MACH_MVEBU_V7
...
@@ -19,6 +20,7 @@ config MACH_MVEBU_V7
bool
bool
select ARMADA_370_XP_TIMER
select ARMADA_370_XP_TIMER
select CACHE_L2X0
select CACHE_L2X0
select ARM_CPU_SUSPEND
config MACH_ARMADA_370
config MACH_ARMADA_370
bool "Marvell Armada 370 boards" if ARCH_MULTI_V7
bool "Marvell Armada 370 boards" if ARCH_MULTI_V7
...
...
arch/arm/mach-mvebu/Makefile
浏览文件 @
5abe65e3
...
@@ -7,7 +7,7 @@ CFLAGS_pmsu.o := -march=armv7-a
...
@@ -7,7 +7,7 @@ CFLAGS_pmsu.o := -march=armv7-a
obj-y
+=
system-controller.o mvebu-soc-id.o
obj-y
+=
system-controller.o mvebu-soc-id.o
ifeq
($(CONFIG_MACH_MVEBU_V7),y)
ifeq
($(CONFIG_MACH_MVEBU_V7),y)
obj-y
+=
cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o
obj-y
+=
cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o
pmsu_ll.o
obj-$(CONFIG_SMP)
+=
platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
obj-$(CONFIG_SMP)
+=
platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
endif
endif
...
...
arch/arm/mach-mvebu/board-v7.c
浏览文件 @
5abe65e3
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include <linux/mbus.h>
#include <linux/mbus.h>
#include <linux/signal.h>
#include <linux/signal.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/irqchip.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/map.h>
...
@@ -71,17 +72,23 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
...
@@ -71,17 +72,23 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
return
1
;
return
1
;
}
}
static
void
__init
mvebu_
timer_and_clk_init
(
void
)
static
void
__init
mvebu_
init_irq
(
void
)
{
{
of_clk_init
(
NULL
);
irqchip_init
();
clocksource_of_init
();
mvebu_scu_enable
();
mvebu_scu_enable
();
coherency_init
();
coherency_init
();
BUG_ON
(
mvebu_mbus_dt_init
(
coherency_available
()));
BUG_ON
(
mvebu_mbus_dt_init
(
coherency_available
()));
}
static
void
__init
external_abort_quirk
(
void
)
{
u32
dev
,
rev
;
if
(
of_machine_is_compatible
(
"marvell,armada375"
))
if
(
mvebu_get_soc_id
(
&
dev
,
&
rev
)
==
0
&&
rev
>
ARMADA_375_Z1_REV
)
hook_fault_code
(
16
+
6
,
armada_375_external_abort_wa
,
SIGBUS
,
0
,
return
;
"imprecise external abort"
);
hook_fault_code
(
16
+
6
,
armada_375_external_abort_wa
,
SIGBUS
,
0
,
"imprecise external abort"
);
}
}
static
void
__init
i2c_quirk
(
void
)
static
void
__init
i2c_quirk
(
void
)
...
@@ -178,8 +185,10 @@ static void __init mvebu_dt_init(void)
...
@@ -178,8 +185,10 @@ static void __init mvebu_dt_init(void)
{
{
if
(
of_machine_is_compatible
(
"plathome,openblocks-ax3-4"
))
if
(
of_machine_is_compatible
(
"plathome,openblocks-ax3-4"
))
i2c_quirk
();
i2c_quirk
();
if
(
of_machine_is_compatible
(
"marvell,a375-db"
))
if
(
of_machine_is_compatible
(
"marvell,a375-db"
))
{
external_abort_quirk
();
thermal_quirk
();
thermal_quirk
();
}
of_platform_populate
(
NULL
,
of_default_bus_match_table
,
NULL
,
NULL
);
of_platform_populate
(
NULL
,
of_default_bus_match_table
,
NULL
,
NULL
);
}
}
...
@@ -194,7 +203,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
...
@@ -194,7 +203,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
.
l2c_aux_mask
=
~
0
,
.
l2c_aux_mask
=
~
0
,
.
smp
=
smp_ops
(
armada_xp_smp_ops
),
.
smp
=
smp_ops
(
armada_xp_smp_ops
),
.
init_machine
=
mvebu_dt_init
,
.
init_machine
=
mvebu_dt_init
,
.
init_
time
=
mvebu_timer_and_clk_init
,
.
init_
irq
=
mvebu_init_irq
,
.
restart
=
mvebu_restart
,
.
restart
=
mvebu_restart
,
.
dt_compat
=
armada_370_xp_dt_compat
,
.
dt_compat
=
armada_370_xp_dt_compat
,
MACHINE_END
MACHINE_END
...
@@ -207,7 +216,7 @@ static const char * const armada_375_dt_compat[] = {
...
@@ -207,7 +216,7 @@ static const char * const armada_375_dt_compat[] = {
DT_MACHINE_START
(
ARMADA_375_DT
,
"Marvell Armada 375 (Device Tree)"
)
DT_MACHINE_START
(
ARMADA_375_DT
,
"Marvell Armada 375 (Device Tree)"
)
.
l2c_aux_val
=
0
,
.
l2c_aux_val
=
0
,
.
l2c_aux_mask
=
~
0
,
.
l2c_aux_mask
=
~
0
,
.
init_
time
=
mvebu_timer_and_clk_init
,
.
init_
irq
=
mvebu_init_irq
,
.
init_machine
=
mvebu_dt_init
,
.
init_machine
=
mvebu_dt_init
,
.
restart
=
mvebu_restart
,
.
restart
=
mvebu_restart
,
.
dt_compat
=
armada_375_dt_compat
,
.
dt_compat
=
armada_375_dt_compat
,
...
@@ -222,7 +231,7 @@ static const char * const armada_38x_dt_compat[] = {
...
@@ -222,7 +231,7 @@ static const char * const armada_38x_dt_compat[] = {
DT_MACHINE_START
(
ARMADA_38X_DT
,
"Marvell Armada 380/385 (Device Tree)"
)
DT_MACHINE_START
(
ARMADA_38X_DT
,
"Marvell Armada 380/385 (Device Tree)"
)
.
l2c_aux_val
=
0
,
.
l2c_aux_val
=
0
,
.
l2c_aux_mask
=
~
0
,
.
l2c_aux_mask
=
~
0
,
.
init_
time
=
mvebu_timer_and_clk_init
,
.
init_
irq
=
mvebu_init_irq
,
.
restart
=
mvebu_restart
,
.
restart
=
mvebu_restart
,
.
dt_compat
=
armada_38x_dt_compat
,
.
dt_compat
=
armada_38x_dt_compat
,
MACHINE_END
MACHINE_END
arch/arm/mach-mvebu/coherency.c
浏览文件 @
5abe65e3
...
@@ -292,6 +292,10 @@ static struct notifier_block mvebu_hwcc_nb = {
...
@@ -292,6 +292,10 @@ static struct notifier_block mvebu_hwcc_nb = {
.
notifier_call
=
mvebu_hwcc_notifier
,
.
notifier_call
=
mvebu_hwcc_notifier
,
};
};
static
struct
notifier_block
mvebu_hwcc_pci_nb
=
{
.
notifier_call
=
mvebu_hwcc_notifier
,
};
static
void
__init
armada_370_coherency_init
(
struct
device_node
*
np
)
static
void
__init
armada_370_coherency_init
(
struct
device_node
*
np
)
{
{
struct
resource
res
;
struct
resource
res
;
...
@@ -427,7 +431,7 @@ static int __init coherency_pci_init(void)
...
@@ -427,7 +431,7 @@ static int __init coherency_pci_init(void)
{
{
if
(
coherency_available
())
if
(
coherency_available
())
bus_register_notifier
(
&
pci_bus_type
,
bus_register_notifier
(
&
pci_bus_type
,
&
mvebu_hwcc_nb
);
&
mvebu_hwcc_
pci_
nb
);
return
0
;
return
0
;
}
}
...
...
arch/arm/mach-mvebu/headsmp-a9.S
浏览文件 @
5abe65e3
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#include <linux/linkage.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/init.h>
#include <asm/assembler.h>
__CPUINIT
__CPUINIT
#define CPU_RESUME_ADDR_REG 0xf10182d4
#define CPU_RESUME_ADDR_REG 0xf10182d4
...
@@ -22,13 +24,18 @@
...
@@ -22,13 +24,18 @@
.
global
armada_375_smp_cpu1_enable_code_end
.
global
armada_375_smp_cpu1_enable_code_end
armada_375_smp_cpu1_enable_code_start
:
armada_375_smp_cpu1_enable_code_start
:
ldr
r0
,
[
pc
,
#
4
]
ARM_BE8
(
setend
be
)
adr
r0
,
1
f
ldr
r0
,
[
r0
]
ldr
r1
,
[
r0
]
ldr
r1
,
[
r0
]
ARM_BE8
(
rev
r1
,
r1
)
mov
pc
,
r1
mov
pc
,
r1
1
:
.
word
CPU_RESUME_ADDR_REG
.
word
CPU_RESUME_ADDR_REG
armada_375_smp_cpu1_enable_code_end
:
armada_375_smp_cpu1_enable_code_end
:
ENTRY
(
mvebu_cortex_a9_secondary_startup
)
ENTRY
(
mvebu_cortex_a9_secondary_startup
)
ARM_BE8
(
setend
be
)
bl
v7_invalidate_l1
bl
v7_invalidate_l1
b
secondary_startup
b
secondary_startup
ENDPROC
(
mvebu_cortex_a9_secondary_startup
)
ENDPROC
(
mvebu_cortex_a9_secondary_startup
)
arch/arm/mach-mvebu/pmsu.c
浏览文件 @
5abe65e3
...
@@ -66,6 +66,8 @@ static void __iomem *pmsu_mp_base;
...
@@ -66,6 +66,8 @@ static void __iomem *pmsu_mp_base;
extern
void
ll_disable_coherency
(
void
);
extern
void
ll_disable_coherency
(
void
);
extern
void
ll_enable_coherency
(
void
);
extern
void
ll_enable_coherency
(
void
);
extern
void
armada_370_xp_cpu_resume
(
void
);
static
struct
platform_device
armada_xp_cpuidle_device
=
{
static
struct
platform_device
armada_xp_cpuidle_device
=
{
.
name
=
"cpuidle-armada-370-xp"
,
.
name
=
"cpuidle-armada-370-xp"
,
};
};
...
@@ -140,13 +142,6 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void)
...
@@ -140,13 +142,6 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void)
writel
(
reg
,
pmsu_mp_base
+
L2C_NFABRIC_PM_CTL
);
writel
(
reg
,
pmsu_mp_base
+
L2C_NFABRIC_PM_CTL
);
}
}
static
void
armada_370_xp_cpu_resume
(
void
)
{
asm
volatile
(
"bl ll_add_cpu_to_smp_group
\n\t
"
"bl ll_enable_coherency
\n\t
"
"b cpu_resume
\n\t
"
);
}
/* No locking is needed because we only access per-CPU registers */
/* No locking is needed because we only access per-CPU registers */
int
armada_370_xp_pmsu_idle_enter
(
unsigned
long
deepidle
)
int
armada_370_xp_pmsu_idle_enter
(
unsigned
long
deepidle
)
{
{
...
@@ -201,12 +196,12 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle)
...
@@ -201,12 +196,12 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle)
/* Test the CR_C bit and set it if it was cleared */
/* Test the CR_C bit and set it if it was cleared */
asm
volatile
(
asm
volatile
(
"mrc p15, 0,
%
0, c1, c0, 0
\n\t
"
"mrc p15, 0,
r
0, c1, c0, 0
\n\t
"
"tst
%
0, #(1 << 2)
\n\t
"
"tst
r
0, #(1 << 2)
\n\t
"
"orreq
%0, %
0, #(1 << 2)
\n\t
"
"orreq
r0, r
0, #(1 << 2)
\n\t
"
"mcreq p15, 0,
%
0, c1, c0, 0
\n\t
"
"mcreq p15, 0,
r
0, c1, c0, 0
\n\t
"
"isb "
"isb "
:
:
"r"
(
0
)
);
:
:
:
"r0"
);
pr_warn
(
"Failed to suspend the system
\n
"
);
pr_warn
(
"Failed to suspend the system
\n
"
);
...
...
arch/arm/mach-mvebu/pmsu_ll.S
0 → 100644
浏览文件 @
5abe65e3
/*
*
Copyright
(
C
)
2014
Marvell
*
*
Thomas
Petazzoni
<
thomas
.
petazzoni
@
free
-
electrons
.
com
>
*
Gregory
Clement
<
gregory
.
clement
@
free
-
electrons
.
com
>
*
*
This
file
is
licensed
under
the
terms
of
the
GNU
General
Public
*
License
version
2
.
This
program
is
licensed
"as is"
without
any
*
warranty
of
any
kind
,
whether
express
or
implied
.
*/
#include <linux/linkage.h>
#include <asm/assembler.h>
/*
*
This
is
the
entry
point
through
which
CPUs
exiting
cpuidle
deep
*
idle
state
are
going
.
*/
ENTRY
(
armada_370_xp_cpu_resume
)
ARM_BE8
(
setend
be
)
@
go
BE8
if
entered
LE
bl
ll_add_cpu_to_smp_group
bl
ll_enable_coherency
b
cpu_resume
ENDPROC
(
armada_370_xp_cpu_resume
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录