Re: [PATCH V3 2/5] MIPS: Add board support for Loongson1B

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 17, 2011 at 05:39:05PM +0800, keguang.zhang@xxxxxxxxx wrote:

> diff --git a/arch/mips/include/asm/mach-loongson1/regs-clk.h b/arch/mips/include/asm/mach-loongson1/regs-clk.h
> new file mode 100644
> index 0000000..4f488c3
> --- /dev/null
> +++ b/arch/mips/include/asm/mach-loongson1/regs-clk.h
> @@ -0,0 +1,32 @@
> +/*
> + * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@xxxxxxxxx>
> + *
> + * Loongson1 Clock Register Definitions.
> + *
> + * 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.
> + */
> +
> +#ifndef __ASM_MACH_LOONGSON1_REGS_CLK_H
> +#define __ASM_MACH_LOONGSON1_REGS_CLK_H
> +
> +#define LS1X_CLK_REG(x)		(ioremap(LS1X_CLK_BASE + (x), 4))

Uhh...  Don't make assumptions on the MIPS implementation.  Normally
ioremap() consumes some virtual address space and memory for each
invocation.  And eventually io mappings should be freed again with
iounmap.

> +static void ls1x_halt(void)
> +{
> +	pr_notice("\n\n** You can safely turn off the power now **\n\n");

This is so Windows 95 ;-)

Please remove this message.  Messages to a user should be printed by
userspace, most likely an init script.

  Ralf



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux