diff options
-rw-r--r-- | arch/arm/dts/mt7981-emmc-rfb.dts | 5 | ||||
-rw-r--r-- | arch/arm/dts/mt7981-rfb.dts | 5 | ||||
-rw-r--r-- | arch/arm/dts/mt7981-sd-rfb.dts | 5 | ||||
-rw-r--r-- | arch/arm/dts/mt7986a-bpi-r3-sd.dts | 5 | ||||
-rw-r--r-- | arch/arm/dts/mt7986a-rfb.dts | 5 | ||||
-rw-r--r-- | arch/arm/dts/mt7986a-sd-rfb.dts | 5 | ||||
-rw-r--r-- | arch/arm/dts/mt7986b-rfb.dts | 5 | ||||
-rw-r--r-- | arch/arm/dts/mt7986b-sd-rfb.dts | 5 | ||||
-rw-r--r-- | arch/arm/mach-mediatek/mt7622/init.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-mediatek/mt7981/init.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-mediatek/mt7986/init.c | 11 | ||||
-rw-r--r-- | board/mediatek/mt7622/mt7622_rfb.c | 1 | ||||
-rw-r--r-- | include/configs/mt7622.h | 10 | ||||
-rw-r--r-- | include/configs/mt7981.h | 9 | ||||
-rw-r--r-- | include/configs/mt7986.h | 9 |
15 files changed, 68 insertions, 37 deletions
diff --git a/arch/arm/dts/mt7981-emmc-rfb.dts b/arch/arm/dts/mt7981-emmc-rfb.dts index 2b7eae99ce4..a0913c5b7c8 100644 --- a/arch/arm/dts/mt7981-emmc-rfb.dts +++ b/arch/arm/dts/mt7981-emmc-rfb.dts @@ -18,6 +18,11 @@ tick-timer = &timer0; }; + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; diff --git a/arch/arm/dts/mt7981-rfb.dts b/arch/arm/dts/mt7981-rfb.dts index 5559ace9538..1dc90ac63ff 100644 --- a/arch/arm/dts/mt7981-rfb.dts +++ b/arch/arm/dts/mt7981-rfb.dts @@ -17,6 +17,11 @@ stdout-path = &uart0; tick-timer = &timer0; }; + + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; }; &uart0 { diff --git a/arch/arm/dts/mt7981-sd-rfb.dts b/arch/arm/dts/mt7981-sd-rfb.dts index 34ac227ecf4..05f3fdb5ef1 100644 --- a/arch/arm/dts/mt7981-sd-rfb.dts +++ b/arch/arm/dts/mt7981-sd-rfb.dts @@ -18,6 +18,11 @@ tick-timer = &timer0; }; + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; diff --git a/arch/arm/dts/mt7986a-bpi-r3-sd.dts b/arch/arm/dts/mt7986a-bpi-r3-sd.dts index 4d12440fa3c..15256302b86 100644 --- a/arch/arm/dts/mt7986a-bpi-r3-sd.dts +++ b/arch/arm/dts/mt7986a-bpi-r3-sd.dts @@ -19,6 +19,11 @@ tick-timer = &timer0; }; + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x80000000>; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; diff --git a/arch/arm/dts/mt7986a-rfb.dts b/arch/arm/dts/mt7986a-rfb.dts index 80def57e1a1..dce85d82772 100644 --- a/arch/arm/dts/mt7986a-rfb.dts +++ b/arch/arm/dts/mt7986a-rfb.dts @@ -18,6 +18,11 @@ tick-timer = &timer0; }; + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; + reg_1p8v: regulator-1p8v { compatible = "regulator-fixed"; regulator-name = "fixed-1.8V"; diff --git a/arch/arm/dts/mt7986a-sd-rfb.dts b/arch/arm/dts/mt7986a-sd-rfb.dts index 5807c5d5ccb..7f32607589a 100644 --- a/arch/arm/dts/mt7986a-sd-rfb.dts +++ b/arch/arm/dts/mt7986a-sd-rfb.dts @@ -19,6 +19,11 @@ tick-timer = &timer0; }; + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; diff --git a/arch/arm/dts/mt7986b-rfb.dts b/arch/arm/dts/mt7986b-rfb.dts index 0c4e3e878fa..3349e38a900 100644 --- a/arch/arm/dts/mt7986b-rfb.dts +++ b/arch/arm/dts/mt7986b-rfb.dts @@ -18,6 +18,11 @@ tick-timer = &timer0; }; + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; diff --git a/arch/arm/dts/mt7986b-sd-rfb.dts b/arch/arm/dts/mt7986b-sd-rfb.dts index 48f9320e7ae..6c9203332bb 100644 --- a/arch/arm/dts/mt7986b-sd-rfb.dts +++ b/arch/arm/dts/mt7986b-sd-rfb.dts @@ -19,6 +19,11 @@ tick-timer = &timer0; }; + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c index e501907b535..00d3eb9ce7a 100644 --- a/arch/arm/mach-mediatek/mt7622/init.c +++ b/arch/arm/mach-mediatek/mt7622/init.c @@ -4,11 +4,15 @@ * Author: Sam Shih <sam.shih@mediatek.com> */ -#include <common.h> #include <fdtdec.h> #include <init.h> #include <asm/armv8/mmu.h> -#include <asm/cache.h> +#include <asm/system.h> +#include <asm/global_data.h> +#include <asm/u-boot.h> +#include <linux/sizes.h> + +DECLARE_GLOBAL_DATA_PTR; int print_cpuinfo(void) { @@ -20,11 +24,13 @@ int dram_init(void) { int ret; - ret = fdtdec_setup_memory_banksize(); + ret = fdtdec_setup_mem_size_base(); if (ret) return ret; - return fdtdec_setup_mem_size_base(); + gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_2G); + + return 0; } void reset_cpu(void) diff --git a/arch/arm/mach-mediatek/mt7981/init.c b/arch/arm/mach-mediatek/mt7981/init.c index 3c921d6ad5c..862f0ca4793 100644 --- a/arch/arm/mach-mediatek/mt7981/init.c +++ b/arch/arm/mach-mediatek/mt7981/init.c @@ -4,18 +4,25 @@ * Author: Sam Shih <sam.shih@mediatek.com> */ -#include <cpu_func.h> +#include <fdtdec.h> #include <init.h> #include <asm/armv8/mmu.h> #include <asm/system.h> #include <asm/global_data.h> +#include <asm/u-boot.h> #include <linux/sizes.h> DECLARE_GLOBAL_DATA_PTR; int dram_init(void) { - gd->ram_size = get_ram_size((void *)CFG_SYS_SDRAM_BASE, SZ_2G); + int ret; + + ret = fdtdec_setup_mem_size_base(); + if (ret) + return ret; + + gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_1G); return 0; } diff --git a/arch/arm/mach-mediatek/mt7986/init.c b/arch/arm/mach-mediatek/mt7986/init.c index 9d0c0cdcd08..905a3ab4e27 100644 --- a/arch/arm/mach-mediatek/mt7986/init.c +++ b/arch/arm/mach-mediatek/mt7986/init.c @@ -4,18 +4,25 @@ * Author: Sam Shih <sam.shih@mediatek.com> */ -#include <cpu_func.h> +#include <fdtdec.h> #include <init.h> #include <asm/armv8/mmu.h> #include <asm/system.h> #include <asm/global_data.h> +#include <asm/u-boot.h> #include <linux/sizes.h> DECLARE_GLOBAL_DATA_PTR; int dram_init(void) { - gd->ram_size = get_ram_size((void *)CFG_SYS_SDRAM_BASE, SZ_2G); + int ret; + + ret = fdtdec_setup_mem_size_base(); + if (ret) + return ret; + + gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_2G); return 0; } diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c index ff233e920a0..2cc73bc35dc 100644 --- a/board/mediatek/mt7622/mt7622_rfb.c +++ b/board/mediatek/mt7622/mt7622_rfb.c @@ -14,7 +14,6 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100; return 0; } diff --git a/include/configs/mt7622.h b/include/configs/mt7622.h index 65415129534..4a056954bf8 100644 --- a/include/configs/mt7622.h +++ b/include/configs/mt7622.h @@ -9,14 +9,4 @@ #ifndef __MT7622_H #define __MT7622_H -/* Uboot definition */ -#define CFG_SYS_UBOOT_BASE CONFIG_TEXT_BASE - -/* SPL -> Uboot */ -#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE -/* DRAM */ -#define CFG_SYS_SDRAM_BASE 0x40000000 - -/* Ethernet */ - #endif diff --git a/include/configs/mt7981.h b/include/configs/mt7981.h index 14c885ec55c..a6d647edc42 100644 --- a/include/configs/mt7981.h +++ b/include/configs/mt7981.h @@ -9,13 +9,4 @@ #ifndef __MT7981_H #define __MT7981_H -/* Uboot definition */ -#define CFG_SYS_UBOOT_BASE CONFIG_TEXT_BASE - -/* SPL -> Uboot */ -#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE - -/* DRAM */ -#define CFG_SYS_SDRAM_BASE 0x40000000 - #endif diff --git a/include/configs/mt7986.h b/include/configs/mt7986.h index 0c41af1fc32..090b4c6833e 100644 --- a/include/configs/mt7986.h +++ b/include/configs/mt7986.h @@ -9,13 +9,4 @@ #ifndef __MT7986_H #define __MT7986_H -/* Uboot definition */ -#define CFG_SYS_UBOOT_BASE CONFIG_TEXT_BASE - -/* SPL -> Uboot */ -#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE - -/* DRAM */ -#define CFG_SYS_SDRAM_BASE 0x40000000 - #endif |