From mboxrd@z Thu Jan 1 00:00:00 1970 From: shiraz.hashim@st.com (Shiraz Hashim) Date: Fri, 3 Sep 2010 12:27:27 +0530 Subject: [PATCH 04/74] ST SPEAr13XX: Adding machine specific header files In-Reply-To: <20100902085652.GF26319@n2100.arm.linux.org.uk> References: <216f9534163c6b7ccf403df870601bf254a3964f.1283161023.git.viresh.kumar@st.com> <20100902085652.GF26319@n2100.arm.linux.org.uk> Message-ID: <4C809C57.7040609@st.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello Russel, On 9/2/2010 2:26 PM, Russell King - ARM Linux wrote: > On Mon, Aug 30, 2010 at 04:08:35PM +0530, Viresh KUMAR wrote: >> +#ifndef __MACH_GENERIC_H >> +#define __MACH_GENERIC_H >> + >> +#include >> +#include >> +#include >> +#include >> +#include > > linux/ before asm/ please. > OK, would correct it. >> +#ifndef __MACH_HARDWARE_H >> +#define __MACH_HARDWARE_H >> + >> +#include >> + >> +/* Vitual to physical translation of statically mapped space */ >> +#define IO_ADDRESS(x) (x | 0xF0000000) >> + >> +/* typesafe io address */ >> +#define __io_address(n) __io(IO_ADDRESS(n)) > > Wrong use of __io(). __io() is just a macro for asm/io.h to make use of, > and in any case should be defined in your mach/io.h file. __io is defined in plat/io.h which is included in mach/io.h. I see other machs (ux500, realview, versatile) also defining __io_address like this for typesafe access. Is it wrong ? >> diff --git a/arch/arm/mach-spear13xx/include/mach/system.h b/arch/arm/mach-spear13xx/include/mach/system.h >> new file mode 100644 >> index 0000000..6ce0819 >> --- /dev/null >> +++ b/arch/arm/mach-spear13xx/include/mach/system.h >> @@ -0,0 +1,43 @@ >> +/* >> + * arch/arm/mach-spear13xx/include/mach/system.h >> + * >> + * spear13xx Machine family specific architecture functions >> + * >> + * Copyright (C) 2010 ST Microelectronics >> + * Shiraz Hashim >> + * >> + * This file is licensed under the terms of the GNU General Public >> + * License version 2. This program is licensed "as is" without any >> + * warranty of any kind, whether express or implied. >> + */ >> + >> +#ifndef __MACH_SYSTEM_H >> +#define __MACH_SYSTEM_H >> + >> +#include >> +#include >> +#include >> + >> +static inline void arch_idle(void) >> +{ >> + /* >> + * This should do all the clock switching >> + * and wait for interrupt tricks >> + */ >> + cpu_do_idle(); >> +} >> + >> +static inline void arch_reset(char mode, const char *cmd) >> +{ >> + pr_info("Going to reboot...\n"); > > The kernel already prints a message for reboot, so this is superfluous. > . OK, would remove this. regards Shiraz