mx25: Introduce sys_proto.h
Subsystems (3)
PATCH v5 1/3 mx25: Introduce sys_proto.h
Create a sys_proto.h for MX25 as done on other MX25 processors.
---
Changes since v4:
- Omit "extern" annotation in function prototype
Changes since v3:
- No changes. This patch was introduced in v4
arch/arm/cpu/arm926ejs/mx25/generic.c | 1 + arch/arm/include/asm/arch-mx25/imx-regs.h | 4 ---- arch/arm/include/asm/arch-mx25/sys_proto.h | 27 +++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 arch/arm/include/asm/arch-mx25/sys_proto.h
arch/arm/cpu/arm926ejs/mx25/generic.c +1 -0
@@ -31,6 +31,7 @@#ifdef CONFIG_MXC_MMC #include <asm/arch/mxcmmc.h> #endif +#include <asm/arch/sys_proto.h> /* * get the system pll clock in Hz
arch/arm/include/asm/arch-mx25/imx-regs.h +0 -4
@@ -34,10 +34,6 @@#define _IMX_REGS_H#ifndef __ASSEMBLY__ -#ifdef CONFIG_FEC_MXC -extern void mx25_fec_init_pins (void ); -extern void imx_get_mac_from_fuse (unsigned char *mac); -#endif /* Clock Control Module (CCM) registers */ struct ccm_regs {
arch/arm/include/asm/arch-mx25/sys_proto.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* (C) Copyright 2009 +* Stefano Babic, DENX Software Engineering, sbabic at denx.de. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef _SYS_PROTO_H_ +#define _SYS_PROTO_H_ + +#ifdef CONFIG_FEC_MXC +void mx25_fec_init_pins (void ); +void imx_get_mac_from_fuse (unsigned char *mac); +#endif /* CONFIG_FEC_MXC */ + +#endif /* _SYS_PROTO_H_ */
Signature · 1 line
1.7.1
PATCH v5 2/3 MX25: tx25: Avoid the usage of extern in C file
Avoid the usage of extern in C file as pointed out by checkpatch.
---
Chanegs since v4:
- No changes
Changes since v3:
- Place mx25_uart1_init_pins inside sys_proto.h
Changes since v2:
- Place the extern in the MX25 imx-regs.h instead of inside the MX27 imx-regs.h Changes since v1:
- No changes
arch/arm/include/asm/arch-mx25/sys_proto.h | 1 + board/karo/tx25/tx25.c | 2 -- 2 files changed, 1 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-mx25/sys_proto.h +1 -0
@@ -23,5 +23,6 @@void mx25_fec_init_pins (void );void imx_get_mac_from_fuse (unsigned char *mac);#endif /* CONFIG_FEC_MXC */ +void mx25_uart1_init_pins (void );#endif /* _SYS_PROTO_H_ */
board/karo/tx25/tx25.c +0 -2
@@ -141,8 +141,6 @@ void tx25_fec_init(void)int board_init () {#ifdef CONFIG_MXC_UART -extern void mx25_uart1_init_pins (void ); -mx25_uart1_init_pins ();#endif /* board id for linux */
Signature · 1 line
1.7.1
PATCH v5 3/3 MX25: Add initial support for MX25PDK
In reply to Fabio EstevamAdd the initial support for MX25PDK booting from SD card via internal boot.
---
Chanegs since v4:
- No changes
Changes since v3:
- No changes
Changes since v2:
- No changes
Changes since v1:
- Keep mx25pdk entry to boards.cfg sorted
- Removed unused defines in mx25pdk.h
- Do not use the whole RAM space for memory test
MAINTAINERS | 1 + board/freescale/mx25pdk/Makefile | 49 ++++++++++++++ board/freescale/mx25pdk/imximage.cfg | 73 +++++++++++++++++++++ board/freescale/mx25pdk/lowlevel_init.S | 21 ++++++ board/freescale/mx25pdk/mx25pdk.c | 62 ++++++++++++++++++ boards.cfg | 1 + include/configs/mx25pdk.h | 106 +++++++++++++++++++++++++++++++ 7 files changed, 313 insertions(+), 0 deletions(-) create mode 100644 board/freescale/mx25pdk/Makefile create mode 100644 board/freescale/mx25pdk/imximage.cfg create mode 100644 board/freescale/mx25pdk/lowlevel_init.S create mode 100644 board/freescale/mx25pdk/mx25pdk.c create mode 100644 include/configs/mx25pdk.h
MAINTAINERS +1 -0
@@ -645,6 +645,7 @@ Kristoffer Ericson <[email protected]> Fabio Estevam <[email protected]> + mx25pdk i.MX25 mx31pdk i.MX31 mx53ard i.MX53 mx53smd i.MX53
board/freescale/mx25pdk/Makefile new file +49 -0
49 lines not on this page · raw message
board/freescale/mx25pdk/imximage.cfg new file +73 -0
73 lines not on this page · raw message
board/freescale/mx25pdk/lowlevel_init.S new file +21 -0
@@ -0,0 +1,21 @@ +/* + * Copyright (c) 2011 Freescale Semiconductor + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +.globl lowlevel_init +lowlevel_init: + + mov pc, lr
board/freescale/mx25pdk/mx25pdk.c new file +62 -0
62 lines not on this page · raw message
boards.cfg +1 -0
@@ -162,6 +162,7 @@ rd6281a arm arm926ejs - Marvell sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood jadecpu arm arm926ejs jadecpu syteco mb86r0x +mx25pdk arm arm926ejs mx25pdk freescale mx25 mx25pdk:IMX_CONFIG=board/freescale/mx25pdk/imximage.cfg zmx25 arm arm926ejs zmx25 syteco mx25 imx27lite arm arm926ejs imx27lite logicpd mx27 magnesium arm arm926ejs imx27lite logicpd mx27
include/configs/mx25pdk.h new file +106 -0
106 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v5 3/3 MX25: Add initial support for MX25PDK
Quoted 4 lines · Fabio Estevam
Add the initial support for MX25PDK booting from SD card via internal boot.
Signed-off-by Fabio Estevam <[email protected]>---
Hi Fabio,
Quoted 20 lines
board/freescale/mx25pdk/mx25pdk.c new file +14
-0@@ -0,0 +1,62 @@ +/* +* (C) Copyright 2011 Freescale Semiconductor, Inc. +* +* Author: Fabio Estevam <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful,
board/freescale/mx25pdk/mx25pdk.c line 24
Quoted 10 lines
board/freescale/mx25pdk/mx25pdk.c new file +10
-0+* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/imx-regs.h> +#include <asm/arch/imx25-pinmux.h> +
But now you have to include sys_proto.h, right ? Else we have warnigs...
Moving imx_get_mac_from_fuse into sys_proto.h has a drawback. It generates warning compiling the fec driver:
Configuring for tx25 board...fec_mxc.c: In function 'fec_get_hwaddr':
fec_mxc.c:315: warning: implicit declaration of function 'imx_get_mac_from_fuse'
Because not all i.MX all processors have a sys_proto.h, this makes some more cleanup as thought, and it is outside the scope of your patch. I suggest you move only mx25_uart1_init_pins in sys_proto.h, and only fix the warnings appearing with the i.MX25 boards.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================