summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/u-boot/u-boot/0005-MIPS-bootm-use-CONFIG_IS_ENABLED-everywhere.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/u-boot/u-boot/0005-MIPS-bootm-use-CONFIG_IS_ENABLED-everywhere.patch')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot/0005-MIPS-bootm-use-CONFIG_IS_ENABLED-everywhere.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot/0005-MIPS-bootm-use-CONFIG_IS_ENABLED-everywhere.patch b/meta/recipes-bsp/u-boot/u-boot/0005-MIPS-bootm-use-CONFIG_IS_ENABLED-everywhere.patch
new file mode 100644
index 0000000000..210ca4dae7
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot/0005-MIPS-bootm-use-CONFIG_IS_ENABLED-everywhere.patch
@@ -0,0 +1,93 @@
1From ebaf1eda6f3b8a339837bc0dbcbb9002d751ab75 Mon Sep 17 00:00:00 2001
2From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3Date: Sun, 1 Nov 2015 17:36:15 +0100
4Subject: [PATCH 5/6] MIPS: bootm: use CONFIG_IS_ENABLED() everywhere
5Organization: O.S. Systems Software LTDA.
6
7Upstream-Status: Backport [2016.01]
8
9Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
10Reviewed-by: Tom Rini <trini@konsulko.com>
11---
12 arch/mips/lib/bootm.c | 33 ++++++++++++++-------------------
13 1 file changed, 14 insertions(+), 19 deletions(-)
14
15diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
16index a7eddd3..eed159c 100644
17--- a/arch/mips/lib/bootm.c
18+++ b/arch/mips/lib/bootm.c
19@@ -15,12 +15,6 @@ DECLARE_GLOBAL_DATA_PTR;
20 #define LINUX_MAX_ENVS 256
21 #define LINUX_MAX_ARGS 256
22
23-#if defined(CONFIG_MALTA)
24-#define mips_boot_malta 1
25-#else
26-#define mips_boot_malta 0
27-#endif
28-
29 static int linux_argc;
30 static char **linux_argv;
31 static char *linux_argp;
32@@ -157,7 +151,7 @@ static void linux_env_set(const char *env_name, const char *env_val)
33 strcpy(linux_env_p, env_name);
34 linux_env_p += strlen(env_name);
35
36- if (mips_boot_malta) {
37+ if (CONFIG_IS_ENABLED(MALTA)) {
38 linux_env_p++;
39 linux_env[++linux_env_idx] = linux_env_p;
40 } else {
41@@ -178,14 +172,15 @@ static void linux_env_legacy(bootm_headers_t *images)
42 const char *cp;
43 ulong rd_start, rd_size;
44
45-#ifdef CONFIG_MEMSIZE_IN_BYTES
46- sprintf(env_buf, "%lu", (ulong)gd->ram_size);
47- debug("## Giving linux memsize in bytes, %lu\n", (ulong)gd->ram_size);
48-#else
49- sprintf(env_buf, "%lu", (ulong)(gd->ram_size >> 20));
50- debug("## Giving linux memsize in MB, %lu\n",
51- (ulong)(gd->ram_size >> 20));
52-#endif /* CONFIG_MEMSIZE_IN_BYTES */
53+ if (CONFIG_IS_ENABLED(MEMSIZE_IN_BYTES)) {
54+ sprintf(env_buf, "%lu", (ulong)gd->ram_size);
55+ debug("## Giving linux memsize in bytes, %lu\n",
56+ (ulong)gd->ram_size);
57+ } else {
58+ sprintf(env_buf, "%lu", (ulong)(gd->ram_size >> 20));
59+ debug("## Giving linux memsize in MB, %lu\n",
60+ (ulong)(gd->ram_size >> 20));
61+ }
62
63 rd_start = UNCACHED_SDRAM(images->initrd_start);
64 rd_size = images->initrd_end - images->initrd_start;
65@@ -214,7 +209,7 @@ static void linux_env_legacy(bootm_headers_t *images)
66 if (cp)
67 linux_env_set("eth1addr", cp);
68
69- if (mips_boot_malta) {
70+ if (CONFIG_IS_ENABLED(MALTA)) {
71 sprintf(env_buf, "%un8r", gd->baudrate);
72 linux_env_set("modetty0", env_buf);
73 }
74@@ -307,13 +302,13 @@ static void boot_jump_linux(bootm_headers_t *images)
75
76 bootstage_mark(BOOTSTAGE_ID_RUN_OS);
77
78- if (mips_boot_malta)
79+ if (CONFIG_IS_ENABLED(MALTA))
80 linux_extra = gd->ram_size;
81
82-#ifdef CONFIG_BOOTSTAGE_FDT
83+#if CONFIG_IS_ENABLED(BOOTSTAGE_FDT)
84 bootstage_fdt_add_report();
85 #endif
86-#ifdef CONFIG_BOOTSTAGE_REPORT
87+#if CONFIG_IS_ENABLED(BOOTSTAGE_REPORT)
88 bootstage_report();
89 #endif
90
91--
922.6.2
93