[PATCH 2/3] arm: omap: timers: split omap3/4 timer into a separate header

Sascha Hauer s.hauer at pengutronix.de
Wed Dec 12 13:39:46 EST 2012


On Tue, Dec 11, 2012 at 11:59:26AM +0100, Jan Luebbe wrote:
> This prepares for adding the AM33xx timer.
> 
> Signed-off-by: Jan Luebbe <jlu at pengutronix.de>
> ---
>  arch/arm/mach-omap/include/mach/omap3-timer.h |   56 +++++++++++++++++++++++++
>  arch/arm/mach-omap/include/mach/timers.h      |   56 +++++--------------------
>  2 files changed, 67 insertions(+), 45 deletions(-)
>  create mode 100644 arch/arm/mach-omap/include/mach/omap3-timer.h
> 
> diff --git a/arch/arm/mach-omap/include/mach/omap3-timer.h b/arch/arm/mach-omap/include/mach/omap3-timer.h
> new file mode 100644
> index 0000000..e8dad9a
> --- /dev/null
> +++ b/arch/arm/mach-omap/include/mach/omap3-timer.h
> +
> +/** General Purpose timer regs offsets (32 bit regs) */
> +#define TIDR			0x0      /* r */

Defines without namespace become very painful sooner or later. You won't
be able to compile multiple versions of the timer. There is a high risk
that they conflict with other defines.

Please move these defines into the C file using it. They are used in a
single file only.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list