aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Quadros2023-12-07 08:15:08 -0600
committerPraneeth Bajjuri2023-12-07 18:00:16 -0600
commitd6f939a90c3192adf5c5bec1ec4fbc05ec36144e (patch)
tree60fbc185105a5a69484767b70c7a8eaaa19f6709
parentb0d717b732ee28e446baf94522b3491e590f7fbb (diff)
downloadti-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.c4
-rw-r--r--drivers/mtd/nand/raw/omap_elm.h6
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 */
195void elm_init(void) 194void 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
203static int elm_probe(struct udevice *dev) 203static 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);
75int elm_config(enum bch_level level); 75int elm_config(enum bch_level level);
76void elm_reset(void); 76void elm_reset(void);
77#ifdef ELM_BASE
78void elm_init(void); 77void elm_init(void);
79#else
80static 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 */