diff options
author | Roger Quadros | 2023-12-07 08:15:08 -0600 |
---|---|---|
committer | Praneeth Bajjuri | 2023-12-07 18:00:16 -0600 |
commit | d6f939a90c3192adf5c5bec1ec4fbc05ec36144e (patch) | |
tree | 60fbc185105a5a69484767b70c7a8eaaa19f6709 | |
parent | b0d717b732ee28e446baf94522b3491e590f7fbb (diff) | |
download | ti-u-boot-d6f939a90c3192adf5c5bec1ec4fbc05ec36144e.tar.gz ti-u-boot-d6f939a90c3192adf5c5bec1ec4fbc05ec36144e.tar.xz ti-u-boot-d6f939a90c3192adf5c5bec1ec4fbc05ec36144e.zip |
mtd: rawnand: omap_elm: Fix elm_init definition
The macro ELM_BASE is defined in mach/hardware.h and is
not visible at the omap_elm.h header file. Avoid using it
in omap_elm.h.
Reported-by: Hong Guan <hguan@ti.com>
Fixes: 7363cf0581a3 ("mtd: rawnand: omap_elm: u-boot driver model support")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
-rw-r--r-- | drivers/mtd/nand/raw/omap_elm.c | 4 | ||||
-rw-r--r-- | drivers/mtd/nand/raw/omap_elm.h | 6 |
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c index 35a066df41a..0e4954a0515 100644 --- a/drivers/mtd/nand/raw/omap_elm.c +++ b/drivers/mtd/nand/raw/omap_elm.c | |||
@@ -185,7 +185,6 @@ void elm_reset(void) | |||
185 | ; | 185 | ; |
186 | } | 186 | } |
187 | 187 | ||
188 | #ifdef ELM_BASE | ||
189 | /** | 188 | /** |
190 | * elm_init - Initialize ELM module | 189 | * elm_init - Initialize ELM module |
191 | * | 190 | * |
@@ -194,10 +193,11 @@ void elm_reset(void) | |||
194 | */ | 193 | */ |
195 | void elm_init(void) | 194 | void elm_init(void) |
196 | { | 195 | { |
196 | #ifdef ELM_BASE | ||
197 | elm_cfg = (struct elm *)ELM_BASE; | 197 | elm_cfg = (struct elm *)ELM_BASE; |
198 | elm_reset(); | 198 | elm_reset(); |
199 | } | ||
200 | #endif | 199 | #endif |
200 | } | ||
201 | 201 | ||
202 | #ifdef CONFIG_SYS_NAND_SELF_INIT | 202 | #ifdef CONFIG_SYS_NAND_SELF_INIT |
203 | static int elm_probe(struct udevice *dev) | 203 | static int elm_probe(struct udevice *dev) |
diff --git a/drivers/mtd/nand/raw/omap_elm.h b/drivers/mtd/nand/raw/omap_elm.h index a7f7bacb154..f3db00d55de 100644 --- a/drivers/mtd/nand/raw/omap_elm.h +++ b/drivers/mtd/nand/raw/omap_elm.h | |||
@@ -74,12 +74,6 @@ int elm_check_error(u8 *syndrome, enum bch_level bch_type, u32 *error_count, | |||
74 | u32 *error_locations); | 74 | u32 *error_locations); |
75 | int elm_config(enum bch_level level); | 75 | int elm_config(enum bch_level level); |
76 | void elm_reset(void); | 76 | void elm_reset(void); |
77 | #ifdef ELM_BASE | ||
78 | void elm_init(void); | 77 | void elm_init(void); |
79 | #else | ||
80 | static inline void elm_init(void) | ||
81 | { | ||
82 | } | ||
83 | #endif | ||
84 | #endif /* __ASSEMBLY__ */ | 78 | #endif /* __ASSEMBLY__ */ |
85 | #endif /* __ASM_ARCH_ELM_H */ | 79 | #endif /* __ASM_ARCH_ELM_H */ |