Re: [RFC][PATCH 05/10] mxc: Add board support for the i.MX51babbage board

From: Russell King - ARM Linux
Date: Thu Dec 10 2009 - 05:32:21 EST


On Fri, Dec 04, 2009 at 04:47:05AM +0200, Amit Kucheria wrote:
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <mach/common.h>
> +#include <mach/hardware.h>
> +#include <asm/irq.h>
> +#include <asm/setup.h>
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach/time.h>
> +#include <mach/memory.h>

No one should be including mach/memory.h. Please remove it and find a
better include to use. (mach/memory.h exists to provide asm/memory.h
with the platform specific bits it needs, so maybe asm/memory.h is
what you want here).

> +#define SPIN_DELAY 1000000 /* in nanoseconds */

That's 1ms.

> + /* Wait for lock */
> + getnstimeofday(&nstimeofday);
> + while (!(__raw_readl(pllbase + MXC_PLL_DP_CTL) & MXC_PLL_DP_CTL_LRF)) {
> + getnstimeofday(&curtime);

I doubt getnstimeofday is particularly light-weight, so I'm not sure
what you're gaining over a loop based around udelay() and counting the
iterations.

> + if (curtime.tv_nsec - nstimeofday.tv_nsec > SPIN_DELAY)
> + panic("pll relock failed\n");

Is a panic really justified?

> diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c
> new file mode 100644
> index 0000000..b258917
> --- /dev/null
> +++ b/arch/arm/mach-mx5/mm.c
> @@ -0,0 +1,86 @@
> +/*
> + * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
> + *
> + * The code contained herein is licensed under the GNU General Public
> + * License. You may obtain a copy of the GNU General Public License
> + * Version 2 or later at the following locations:
> + *
> + * http://www.opensource.org/licenses/gpl-license.html
> + * http://www.gnu.org/copyleft/gpl.html
> + *
> + * Create static mapping between physical to virtual memory.
> + */
> +
> +#include <linux/mm.h>
> +#include <linux/init.h>
> +#include <mach/hardware.h>
> +#include <asm/pgtable.h>

I don't see anything needing asm/pgtable.h in here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/