* [U-Boot] [PATCH v2] common: add a prototype for mach_cpu_init()
@ 2018-03-07 14:28 Patrick Delaunay
2018-03-07 14:45 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Patrick Delaunay @ 2018-03-07 14:28 UTC (permalink / raw)
To: u-boot
avoid warning: no previous prototype for ‘mach_cpu_init’
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
Changes in v2:
- add return info for functions mach_cpu_init() and arch_cpu_init()
include/common.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/common.h b/include/common.h
index 0fe9439..57ae790 100644
--- a/include/common.h
+++ b/include/common.h
@@ -471,9 +471,23 @@ int is_core_valid (unsigned int);
* CPU- or SoC- specific init needed to continue the init sequence. See
* board_f.c for where it is called. If this is not provided, a default
* version (which does nothing) will be used.
+ *
+ * @return: 0 on success, otherwise error
*/
int arch_cpu_init(void);
+/**
+ * mach_cpu_init() - SoC/machine dependent CPU setup
+ *
+ * This is called after arch_cpu_init(). It should handle any
+ * SoC or machine specific init needed to continue the init sequence. See
+ * board_f.c for where it is called. If this is not provided, a default
+ * version (which does nothing) will be used.
+ *
+ * @return: 0 on success, otherwise error
+ */
+int mach_cpu_init(void);
+
void s_init(void);
int checkcpu (void);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] common: add a prototype for mach_cpu_init()
2018-03-07 14:28 [U-Boot] [PATCH v2] common: add a prototype for mach_cpu_init() Patrick Delaunay
@ 2018-03-07 14:45 ` Tom Rini
2018-03-08 0:57 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2018-03-07 14:45 UTC (permalink / raw)
To: u-boot
On Wed, Mar 07, 2018 at 03:28:20PM +0100, Patrick Delaunay wrote:
> avoid warning: no previous prototype for ‘mach_cpu_init’
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180307/81c6187d/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] common: add a prototype for mach_cpu_init()
2018-03-07 14:45 ` Tom Rini
@ 2018-03-08 0:57 ` Masahiro Yamada
2018-03-09 14:29 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2018-03-08 0:57 UTC (permalink / raw)
To: u-boot
2018-03-07 23:45 GMT+09:00 Tom Rini <trini@konsulko.com>:
> On Wed, Mar 07, 2018 at 03:28:20PM +0100, Patrick Delaunay wrote:
>
>> avoid warning: no previous prototype for ‘mach_cpu_init’
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
>
> Reviewed-by: Tom Rini <trini@konsulko.com>
>
> --
People tend to put all sort of misc thingy into common.h
but this is one of the ugliest parts in U-Boot.
Most of files parse <common.h> that contains
unrelated / unnecessary defines.
Please realize this madness.
I have tried to slim it down several times,
but people have added more and more. So this task never ends.
How about splitting out platform init hooks?
(<init.h> or anything suitable is OK.)
Also, I'd like to ban new additions to <common.h>
like we do for config_whitelist.txt
(for example, record the number of lines of <common.h>
then build fails if somebody increases it.)
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] common: add a prototype for mach_cpu_init()
2018-03-08 0:57 ` Masahiro Yamada
@ 2018-03-09 14:29 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2018-03-09 14:29 UTC (permalink / raw)
To: u-boot
On Thu, Mar 08, 2018 at 09:57:58AM +0900, Masahiro Yamada wrote:
> 2018-03-07 23:45 GMT+09:00 Tom Rini <trini@konsulko.com>:
> > On Wed, Mar 07, 2018 at 03:28:20PM +0100, Patrick Delaunay wrote:
> >
> >> avoid warning: no previous prototype for ‘mach_cpu_init’
> >>
> >> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> >
> > Reviewed-by: Tom Rini <trini@konsulko.com>
> >
> > --
>
>
> People tend to put all sort of misc thingy into common.h
> but this is one of the ugliest parts in U-Boot.
>
> Most of files parse <common.h> that contains
> unrelated / unnecessary defines.
> Please realize this madness.
>
> I have tried to slim it down several times,
> but people have added more and more. So this task never ends.
>
> How about splitting out platform init hooks?
> (<init.h> or anything suitable is OK.)
OK, sure, lets move these and relevant bits over to init.h, or
init_helpers.h which already exists and is in a few of the appropriate
locations already.
> Also, I'd like to ban new additions to <common.h>
> like we do for config_whitelist.txt
> (for example, record the number of lines of <common.h>
> then build fails if somebody increases it.)
Sure, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180309/c7dcf43d/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-09 14:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 14:28 [U-Boot] [PATCH v2] common: add a prototype for mach_cpu_init() Patrick Delaunay
2018-03-07 14:45 ` Tom Rini
2018-03-08 0:57 ` Masahiro Yamada
2018-03-09 14:29 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.