From 42cb8fb6cb2c869229b0158e3c86c50fb242d6aa Mon Sep 17 00:00:00 2001 From: "Mathieu J. Poirier" Date: Tue, 31 Jul 2012 08:59:24 +0000 Subject: [PATCH] u8500: Moving prcmu to cpu directory This is to allow the prcmu functions to be used by multiple u8500-based processors. Signed-off-by: Mathieu Poirier Signed-off-by: John Rigby --- arch/arm/cpu/armv7/u8500/Makefile | 2 +- .../st-ericsson => arch/arm/cpu/armv7}/u8500/prcmu.c | 11 +++++------ .../arm/include/asm/arch-u8500/prcmu.h | 0 board/st-ericsson/u8500/Makefile | 2 +- board/st-ericsson/u8500/u8500_href.c | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) rename {board/st-ericsson => arch/arm/cpu/armv7}/u8500/prcmu.c (96%) rename board/st-ericsson/u8500/prcmu-fw.h => arch/arm/include/asm/arch-u8500/prcmu.h (100%) diff --git a/arch/arm/cpu/armv7/u8500/Makefile b/arch/arm/cpu/armv7/u8500/Makefile index 270aa40c88..77accde9c5 100644 --- a/arch/arm/cpu/armv7/u8500/Makefile +++ b/arch/arm/cpu/armv7/u8500/Makefile @@ -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) diff --git a/board/st-ericsson/u8500/prcmu.c b/arch/arm/cpu/armv7/u8500/prcmu.c similarity index 96% rename from board/st-ericsson/u8500/prcmu.c rename to arch/arm/cpu/armv7/u8500/prcmu.c index 6f9302f4ab..b256d27b84 100644 --- a/board/st-ericsson/u8500/prcmu.c +++ b/arch/arm/cpu/armv7/u8500/prcmu.c @@ -33,8 +33,7 @@ #include #include #include - -#include "prcmu-fw.h" +#include /* 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"); diff --git a/board/st-ericsson/u8500/prcmu-fw.h b/arch/arm/include/asm/arch-u8500/prcmu.h similarity index 100% rename from board/st-ericsson/u8500/prcmu-fw.h rename to arch/arm/include/asm/arch-u8500/prcmu.h diff --git a/board/st-ericsson/u8500/Makefile b/board/st-ericsson/u8500/Makefile index 4091a428e7..4ea2212188 100644 --- a/board/st-ericsson/u8500/Makefile +++ b/board/st-ericsson/u8500/Makefile @@ -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)) diff --git a/board/st-ericsson/u8500/u8500_href.c b/board/st-ericsson/u8500/u8500_href.c index 5f85fdcbfc..6e3fc87bc0 100644 --- a/board/st-ericsson/u8500/u8500_href.c +++ b/board/st-ericsson/u8500/u8500_href.c @@ -27,7 +27,7 @@ #include #include #ifdef CONFIG_MMC -#include "prcmu-fw.h" +#include #include "../../../drivers/mmc/arm_pl180_mmci.h" #endif -- 2.39.5