summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2022-03-10 02:22:29 +0300
committerJoel Stanley <joel@jms.id.au>2022-03-16 10:19:11 +0300
commitdc58f30b3d21296240a42e9365a3140510914ded (patch)
tree2bab92f39f5186f9bbf1a306813d5807d7971308 /drivers/soc
parentdd730653d923cf68630ce3cb572f89f07a6b9e3f (diff)
downloadlinux-dc58f30b3d21296240a42e9365a3140510914ded.tar.xz
ARM: soc: aspeed: Update secure boot controller support
Pick up changes from v2: - Place files in aspeed/sbc - Check for error when creating directory - Print secure boot message even if debugfs is disabled OpenBMC-Staging-Count: 1 Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/aspeed/aspeed-sbc.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/soc/aspeed/aspeed-sbc.c b/drivers/soc/aspeed/aspeed-sbc.c
index ee466f02ae4c..be4497b418c4 100644
--- a/drivers/soc/aspeed/aspeed-sbc.c
+++ b/drivers/soc/aspeed/aspeed-sbc.c
@@ -29,7 +29,7 @@ static int __init aspeed_sbc_init(void)
{
struct device_node *np;
void __iomem *base;
- struct dentry *debugfs_root;
+ struct dentry *sbc_dir;
u32 security_status;
/* AST2600 only */
@@ -55,17 +55,19 @@ static int __init aspeed_sbc_init(void)
/* Invert the bit, as 1 is boot from SPI/eMMC */
sbe.uart_boot = !(security_status & UART_BOOT);
- debugfs_root = debugfs_create_dir("aspeed", NULL);
- debugfs_create_u8("abr_image", 0444, debugfs_root, &sbe.abr_image);
- debugfs_create_u8("low_security_key", 0444, debugfs_root, &sbe.low_security_key);
- debugfs_create_u8("otp_protected", 0444, debugfs_root, &sbe.otp_protected);
- debugfs_create_u8("uart_boot", 0444, debugfs_root, &sbe.uart_boot);
- debugfs_create_u8("secure_boot", 0444, debugfs_root, &sbe.secure_boot);
-
pr_info("AST2600 secure boot %s\n", sbe.secure_boot ? "enabled" : "disabled");
+ sbc_dir = debugfs_create_dir("sbc", arch_debugfs_dir);
+ if (IS_ERR(sbc_dir))
+ return PTR_ERR(sbc_dir);
+
+ debugfs_create_u8("abr_image", 0444, sbc_dir, &sbe.abr_image);
+ debugfs_create_u8("low_security_key", 0444, sbc_dir, &sbe.low_security_key);
+ debugfs_create_u8("otp_protected", 0444, sbc_dir, &sbe.otp_protected);
+ debugfs_create_u8("uart_boot", 0444, sbc_dir, &sbe.uart_boot);
+ debugfs_create_u8("secure_boot", 0444, sbc_dir, &sbe.secure_boot);
+
return 0;
}
-
subsys_initcall(aspeed_sbc_init);