On Wed, 2021-12-08 at 22:43 +0100, Sander Vanheule wrote:
> To maintain compatibility with existing drivers, which require the
> soc_info struct to be available, add a downstream board file for the
> MACH_REALTEK_RTL platform.
>
> MIPS_GENERIC based platforms will iterate through the array of available
> MIPS_MACHINE-s to perform platform detection. For devicetree based
> platforms, this happens via a call to fixup_fdt. Use this call to
> perform the SoC detection, adapted from the old prom.c file.
>
> A list of supported root compatibles are provided, along with matching
> register offsets for where to find the SoC model. This offset is then
> the only one probed in place of the old detection heuristic.
>
> MIPS_GENERIC also implements its own custom get_system_type(), which can
> be customized via the system_type variable. Set this variable to ensure
> the specific SoC ID is available at runtime from /proc/cpuinfo.
>
> Co-developed-by: INAGAKI Hiroshi <[email protected]>
> Signed-off-by: INAGAKI Hiroshi <[email protected]>
> Signed-off-by: Sander Vanheule <[email protected]>
> ---
> .../arch/mips/generic/board-realtek.c | 145 ++++++++++++++++++
> ...-in-board-realtek-for-generic-kernel.patch | 9 ++
> 2 files changed, 154 insertions(+)
> create mode 100644 target/linux/realtek/files-5.10/arch/mips/generic/board-
> realtek.c
> create mode 100644 target/linux/realtek/patches-5.10/309-mips-built-in-board-
> realtek-for-generic-kernel.patch
>
> diff --git a/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
> b/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
> new file mode 100644
> index 000000000000..27fc62875e8c
> --- /dev/null
> +++ b/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
[...]
> +static __init const void* realtek_fixup_fdt(const void *fdt, const void
> *match_data)
So (of course) I forgot to run check_patch.pl before sending the patches, and
hence I
missed this small formatting issue.
--- 8< ---
--- a/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
+++ b/target/linux/realtek/files-5.10/arch/mips/generic/board-realtek.c
@@ -110,7 +110,7 @@ static __init void realtek_detect(u32 info_addr)
system_type = soc_info.name;
}
-static __init const void* realtek_fixup_fdt(const void *fdt, const void
*match_data)
+static __init const void *realtek_fixup_fdt(const void *fdt, const void
*match_data)
{
realtek_detect((u32) match_data);
--- >8 ----
Best,
Sander
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel