fecb494bee
Fix sparse & checkpatch warnings in OMAP2/3 PRCM & PM code. This mostly consists of: - converting pointer comparisons to integers in form similar to (ptr == 0) to the standard idiom (!ptr) - labeling a few non-static private functions as static - adding prototypes for *_init() functions in the appropriate header files, and getting rid of the corresponding open-coded extern prototypes in other C files - renaming the variable 'sclk' in mach-omap2/clock.c:omap2_get_apll_clkin to avoid shadowing an earlier declaration Clean up checkpatch issues. This mostly involves: - converting some asm/ includes to linux/ includes - cleaning up some whitespace - getting rid of braces for conditionals with single following statements Also take care of a few odds and ends, including: - getting rid of unlikely() and likely() - none of this code is particularly fast-path code, so the performance impact seems slim; and some of those likely() and unlikely() indicators are probably not as accurate as the ARM's branch predictor - removing some superfluous casts linux-omap source commit is 347df59f5d20fdf905afbc26b1328b0e28a8a01b. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
50 lines
961 B
C
50 lines
961 B
C
/*
|
|
* Copied from arch/arm/mach-sa1100/include/mach/system.h
|
|
* Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
|
|
*/
|
|
#ifndef __ASM_ARCH_SYSTEM_H
|
|
#define __ASM_ARCH_SYSTEM_H
|
|
#include <linux/clk.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
#include <mach/hardware.h>
|
|
|
|
#include <mach/prcm.h>
|
|
|
|
#ifndef CONFIG_MACH_VOICEBLUE
|
|
#define voiceblue_reset() do {} while (0)
|
|
#endif
|
|
|
|
static inline void arch_idle(void)
|
|
{
|
|
cpu_do_idle();
|
|
}
|
|
|
|
static inline void omap1_arch_reset(char mode)
|
|
{
|
|
/*
|
|
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
|
|
* "Global Software Reset Affects Traffic Controller Frequency".
|
|
*/
|
|
if (cpu_is_omap5912()) {
|
|
omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
|
|
DPLL_CTL);
|
|
omap_writew(0x8, ARM_RSTCT1);
|
|
}
|
|
|
|
if (machine_is_voiceblue())
|
|
voiceblue_reset();
|
|
else
|
|
omap_writew(1, ARM_RSTCT1);
|
|
}
|
|
|
|
static inline void arch_reset(char mode)
|
|
{
|
|
if (!cpu_class_is_omap2())
|
|
omap1_arch_reset(mode);
|
|
else
|
|
omap_prcm_arch_reset(mode);
|
|
}
|
|
|
|
#endif
|