[U-Boot] [PATCH v1 04/19] arm: MediaTek: add basic support for MT7629 boards

Tom Rini trini at konsulko.com
Thu Oct 11 14:10:43 UTC 2018


On Tue, Oct 09, 2018 at 11:54:04AM +0800, Ryder Lee wrote:

> This adds a general board file based on MT7629 SoCs from MediaTek.
> 
> Apart from the generic parts (cpu) we add some low level init codes
> and initialize the early clocks.
> 
> Signed-off-by: Ryder Lee <ryder.lee at mediatek.com>
> Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
[snip]
> diff --git a/include/configs/mt7629.h b/include/configs/mt7629.h
> new file mode 100644
> index 0000000..e640108
> --- /dev/null
> +++ b/include/configs/mt7629.h
> @@ -0,0 +1,71 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Configuration for MediaTek MT7629 SoC
> + *
> + * Copyright (C) 2018 MediaTek Inc.
> + * Author: Ryder Lee <ryder.lee at mediatek.com>
> + */
> +
> +#ifndef __MT7629_H
> +#define __MT7629_H
> +
> +#include <linux/sizes.h>
> +
> +#include <dt-bindings/clock/mt7629-clk.h>
> +#include <dt-bindings/power/mt7629-power.h>

We don't want these two includes here.

> +#ifndef __ASSEMBLY__
> +extern unsigned long get_spl_size(void);
> +#endif

Nor should we have this here.

> +/* Machine ID */
> +#define CONFIG_MACH_TYPE		7629

Since this is for pre-DT kernels, lets drop this.

> +#define NOR_MMAP_ADDR			0x30000000
> +#define CONFIG_SYS_SPI_U_BOOT_OFFS	get_spl_size()
> +#define CONFIG_SYS_UBOOT_BASE		(NOR_MMAP_ADDR + get_spl_size())

Use the value of NOR_MMAP_ADDR directly, and we use some constant
(rounded up as needed) for SYS_SPI_U_BOOT_OFFS not a function.

And all of these comments apply to the other include/configs/ files in
the rest of the series too, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181011/73c968e8/attachment.sig>


More information about the U-Boot mailing list