Commit 5b5e17a1 authored by Miquel Raynal's avatar Miquel Raynal Committed by Eduardo Valentin

thermal: armada: dissociate a380 and cp110 ->init() hooks

Until now, Armada 380 and CP110 could share the same ->init() function
because their use was identical.

Prepare the support of multi-sensors support and overheat interrupt
feature by separating the initialization paths before they actually
diverge.
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 8b4c2712
...@@ -200,6 +200,12 @@ static void armada_ap806_init(struct platform_device *pdev, ...@@ -200,6 +200,12 @@ static void armada_ap806_init(struct platform_device *pdev,
armada_wait_sensor_validity(priv); armada_wait_sensor_validity(priv);
} }
static void armada_cp110_init(struct platform_device *pdev,
struct armada_thermal_priv *priv)
{
armada380_init(pdev, priv);
}
static bool armada_is_valid(struct armada_thermal_priv *priv) static bool armada_is_valid(struct armada_thermal_priv *priv)
{ {
u32 reg = readl_relaxed(priv->status); u32 reg = readl_relaxed(priv->status);
...@@ -306,7 +312,7 @@ static const struct armada_thermal_data armada_ap806_data = { ...@@ -306,7 +312,7 @@ static const struct armada_thermal_data armada_ap806_data = {
static const struct armada_thermal_data armada_cp110_data = { static const struct armada_thermal_data armada_cp110_data = {
.is_valid = armada_is_valid, .is_valid = armada_is_valid,
.init = armada380_init, .init = armada_cp110_init,
.is_valid_bit = BIT(10), .is_valid_bit = BIT(10),
.temp_shift = 0, .temp_shift = 0,
.temp_mask = 0x3ff, .temp_mask = 0x3ff,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment