Skip to content
Snippets Groups Projects
Commit 42cb8fb6 authored by Mathieu J. Poirier's avatar Mathieu J. Poirier Committed by Albert ARIBAUD
Browse files

u8500: Moving prcmu to cpu directory


This is to allow the prcmu functions to be used by multiple
u8500-based processors.

Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarJohn Rigby <john.rigby@linaro.org>
parent 84dee301
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk ...@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(SOC).o LIB = $(obj)lib$(SOC).o
COBJS = timer.o clock.o COBJS = timer.o clock.o prcmu.o
SOBJS = lowlevel.o SOBJS = lowlevel.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
......
...@@ -33,8 +33,7 @@ ...@@ -33,8 +33,7 @@
#include <asm/types.h> #include <asm/types.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/arch/prcmu.h>
#include "prcmu-fw.h"
/* CPU mailbox registers */ /* CPU mailbox registers */
#define PRCM_MBOX_CPU_VAL (U8500_PRCMU_BASE + 0x0fc) #define PRCM_MBOX_CPU_VAL (U8500_PRCMU_BASE + 0x0fc)
...@@ -54,16 +53,16 @@ static int _wait_for_req_complete(int num) ...@@ -54,16 +53,16 @@ static int _wait_for_req_complete(int num)
int timeout = 1000; int timeout = 1000;
/* checking any already on-going transaction */ /* checking any already on-going transaction */
while ((readl(PRCM_MBOX_CPU_VAL) & (1 << num)) && timeout--) while ((readl(PRCM_MBOX_CPU_VAL) & (1 << num)) && timeout)
; timeout--;
timeout = 1000; timeout = 1000;
/* Set an interrupt to XP70 */ /* Set an interrupt to XP70 */
writel(1 << num, PRCM_MBOX_CPU_SET); writel(1 << num, PRCM_MBOX_CPU_SET);
while ((readl(PRCM_MBOX_CPU_VAL) & (1 << num)) && timeout--) while ((readl(PRCM_MBOX_CPU_VAL) & (1 << num)) && timeout)
; timeout--;
if (!timeout) { if (!timeout) {
printf("PRCMU operation timed out\n"); printf("PRCMU operation timed out\n");
......
...@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk ...@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
CFLAGS += -D__RELEASE -D__STN_8500 CFLAGS += -D__RELEASE -D__STN_8500
LIB = $(obj)lib$(BOARD).o LIB = $(obj)lib$(BOARD).o
COBJS := u8500_href.o gpio.o prcmu.o COBJS := u8500_href.o gpio.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS)) OBJS := $(addprefix $(obj),$(COBJS))
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <asm/arch/hardware.h> #include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#ifdef CONFIG_MMC #ifdef CONFIG_MMC
#include "prcmu-fw.h" #include <asm/arch/prcmu.h>
#include "../../../drivers/mmc/arm_pl180_mmci.h" #include "../../../drivers/mmc/arm_pl180_mmci.h"
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment