We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0271420 commit 11d2ef5Copy full SHA for 11d2ef5
board/mediatek/mt7988/mt7988_rfb.c
@@ -8,12 +8,15 @@
8
#include <asm/io.h>
9
#include <linux/libfdt.h>
10
#include <fdt_support.h>
11
+#include <asm/global_data.h>
12
13
#define MT7988_BOOT_NOR 0
14
#define MT7988_BOOT_SPIM_NAND 1
15
#define MT7988_BOOT_EMMC 2
16
#define MT7988_BOOT_SNFI_NAND 3
17
18
+DECLARE_GLOBAL_DATA_PTR;
19
+
20
int board_init(void)
21
{
22
return 0;
@@ -47,9 +50,18 @@ void getBootDevice(void)
47
50
env_set("bootmedia",media);
48
51
}
49
52
53
+void getRAMSize(void)
54
+{
55
+ if (gd->ram_size > (6ULL << 30))
56
+ env_set("ram_gb", "8");
57
+ else
58
+ env_set("ram_gb", "4");
59
+}
60
61
int board_late_init(void)
62
63
getBootDevice();
64
+ getRAMSize();
65
66
67
0 commit comments