|
@@ -198,9 +198,19 @@ static int aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
|
|
|
* them. This may mean that certain functions cannot be
|
|
|
* deconfigured and is the reason we re-evaluate after writing
|
|
|
* all descriptor bits.
|
|
|
+ *
|
|
|
+ * Port D and port E GPIO loopback modes are the only exception
|
|
|
+ * as those are commonly used with front-panel buttons to allow
|
|
|
+ * normal operation of the host when the BMC is powered off or
|
|
|
+ * fails to boot. Once the BMC has booted, the loopback mode
|
|
|
+ * must be disabled for the BMC to control host power-on and
|
|
|
+ * reset.
|
|
|
*/
|
|
|
- if ((desc->reg == HW_STRAP1 || desc->reg == HW_STRAP2) &&
|
|
|
- desc->ip == ASPEED_IP_SCU)
|
|
|
+ if (desc->ip == ASPEED_IP_SCU && desc->reg == HW_STRAP1 &&
|
|
|
+ !(desc->mask & (BIT(21) | BIT(22))))
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if (desc->ip == ASPEED_IP_SCU && desc->reg == HW_STRAP2)
|
|
|
continue;
|
|
|
|
|
|
ret = regmap_update_bits(maps[desc->ip], desc->reg,
|