]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
u8500: Moving prcmu to cpu directory
authorMathieu J. Poirier <mathieu.poirier@linaro.org>
Tue, 31 Jul 2012 08:59:24 +0000 (08:59 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 1 Sep 2012 12:58:19 +0000 (14:58 +0200)
This is to allow the prcmu functions to be used by multiple
u8500-based processors.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: John Rigby <john.rigby@linaro.org>
arch/arm/cpu/armv7/u8500/Makefile
arch/arm/cpu/armv7/u8500/prcmu.c [moved from board/st-ericsson/u8500/prcmu.c with 96% similarity]
arch/arm/include/asm/arch-u8500/prcmu.h [moved from board/st-ericsson/u8500/prcmu-fw.h with 100% similarity]
board/st-ericsson/u8500/Makefile
board/st-ericsson/u8500/u8500_href.c

index 270aa40c883b4b2500b9514d86e513347a68c6b7..77accde9c56439d2ce4da4ff77b98a7d432327dd 100644 (file)
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(SOC).o
 
-COBJS  = timer.o clock.o
+COBJS  = timer.o clock.o prcmu.o
 SOBJS  = lowlevel.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
similarity index 96%
rename from board/st-ericsson/u8500/prcmu.c
rename to arch/arm/cpu/armv7/u8500/prcmu.c
index 6f9302f4ab5b4a11856b53cb1e569dfe16b9ef90..b256d27b84e7d3300687f4d9f8ce65cde6cd296d 100644 (file)
@@ -33,8 +33,7 @@
 #include <asm/types.h>
 #include <asm/io.h>
 #include <asm/errno.h>
-
-#include "prcmu-fw.h"
+#include <asm/arch/prcmu.h>
 
 /* CPU mailbox registers */
 #define PRCM_MBOX_CPU_VAL (U8500_PRCMU_BASE + 0x0fc)
@@ -54,16 +53,16 @@ static int _wait_for_req_complete(int num)
        int timeout = 1000;
 
        /* 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;
 
        /* Set an interrupt to XP70 */
        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) {
                printf("PRCMU operation timed out\n");
index 4091a428e72af1333b9f1a22dc5948d94ba2ea9e..4ea22121881196abf75a6772835bc1d4606602d5 100644 (file)
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 CFLAGS += -D__RELEASE -D__STN_8500
 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)
 OBJS   := $(addprefix $(obj),$(COBJS))
index 5f85fdcbfc30dd463e2b3d25d1fc07b47de6faa7..6e3fc87bc041113b2459756bc34af2da7c459257 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #ifdef CONFIG_MMC
-#include "prcmu-fw.h"
+#include <asm/arch/prcmu.h>
 #include "../../../drivers/mmc/arm_pl180_mmci.h"
 #endif