Module Name: src
Committed By: tnn
Date: Sat Jul 31 11:34:40 UTC 2021
Modified Files:
src/sys/arch/arm/sunxi: sunxi_platform.c
Log Message:
sunxi_platform: declare UART FIFO sizes for SoCs we support
To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/sunxi/sunxi_platform.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/sunxi/sunxi_platform.c
diff -u src/sys/arch/arm/sunxi/sunxi_platform.c:1.44 src/sys/arch/arm/sunxi/sunxi_platform.c:1.45
--- src/sys/arch/arm/sunxi/sunxi_platform.c:1.44 Fri Jul 30 12:46:46 2021
+++ src/sys/arch/arm/sunxi/sunxi_platform.c Sat Jul 31 11:34:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.44 2021/07/30 12:46:46 tnn Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.45 2021/07/31 11:34:40 tnn Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <[email protected]>
@@ -31,7 +31,7 @@
#include "opt_console.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.44 2021/07/30 12:46:46 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.45 2021/07/31 11:34:40 tnn Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -241,11 +241,23 @@ sunxi_platform_device_register(device_t
if (device_is_a(self, "com")) {
static const struct device_compatible_entry compat_data[] = {
- { .compat = "allwinner,sun7i-a20" },
+ { .compat = "allwinner,sun4i-a10", .value = 64 },
+ { .compat = "allwinner,sun5i-a13", .value = 64 },
+ { .compat = "allwinner,sun6i-a31", .value = 64 },
+ { .compat = "allwinner,sun7i-a20", .value = 64 },
+ { .compat = "allwinner,sun8i-h2-plus", .value = 64 },
+ { .compat = "allwinner,sun8i-h3", .value = 64 },
+ { .compat = "allwinner,sun8i-a83t", .value = 64 },
+ { .compat = "allwinner,sun9i-a80", .value = 64 },
+ { .compat = "allwinner,sun50i-a64", .value = 64 },
+ { .compat = "allwinner,sun50i-h5", .value = 64 },
+ { .compat = "allwinner,sun50i-h6", .value = 256 },
DEVICE_COMPAT_EOL
};
- if (of_compatible_match(OF_finddevice("/"), compat_data))
- prop_dictionary_set_uint(prop, "fifolen", 64);
+ const struct device_compatible_entry *dce =
+ of_compatible_lookup(OF_finddevice("/"), compat_data);
+ if (dce != NULL)
+ prop_dictionary_set_uint(prop, "fifolen", dce->value);
}
}