Skip to content

Commit

Permalink
ARM: OMAP1: CGRM: fix omap1_get_reset_sources() return type
Browse files Browse the repository at this point in the history
An older version of the patch "ARM: OMAP1: create read_reset_sources()
function (for initial use by watchdog)" was sent upstream, which used
the wrong return type for the omap1_get_reset_sources() function.
Fix it to return a u32, which is what the WDTIMER platform_data
function pointer read_reset_sources() expects.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
  • Loading branch information
Paul Walmsley committed Oct 30, 2012
1 parent 7fc54fd commit 508c0d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ extern int ocpi_enable(void);
static inline int ocpi_enable(void) { return 0; }
#endif

extern int omap1_get_reset_sources(void);
extern u32 omap1_get_reset_sources(void);

#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
7 changes: 4 additions & 3 deletions arch/arm/mach-omap1/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <mach/hardware.h>

#include "iomap.h"
#include "common.h"

/* ARM_SYSST bit shifts related to SoC reset sources */
Expand Down Expand Up @@ -43,12 +44,12 @@ void omap1_restart(char mode, const char *cmd)
* Returns bits that represent the last reset source for the SoC. The
* format is standardized across OMAPs for use by the OMAP watchdog.
*/
int omap1_get_reset_sources(void)
u32 omap1_get_reset_sources(void)
{
int ret = 0;
u32 ret = 0;
u16 rs;

rs = __raw_readw(ARM_SYSST);
rs = __raw_readw(OMAP1_IO_ADDRESS(ARM_SYSST));

if (rs & (1 << ARM_SYSST_POR_SHIFT))
ret |= 1 << OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT;
Expand Down

0 comments on commit 508c0d4

Please sign in to comment.