Skip to contentSkip to conversation

davinci: move psc support board-->cpu

PATCH New David Brownell 1 participant 1 message Apr 18, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 davinci: move psc support board-->cpu

From: David Brownell <[email protected]>

Move DaVinci PSC support from board/* to cpu/* where it belongs. The PSC module manages clocks and resets for all DaVinci-family SoCs, and isn't at all board-specific.

---
 board/davinci/common/Makefile           |    2 
 board/davinci/common/psc.c              |  182 ------------------------------
 board/davinci/common/psc.h              |   32 -----
 board/davinci/dvevm/dvevm.c             |    1 
 board/davinci/schmoogie/schmoogie.c     |    1 
 board/davinci/sffsdr/sffsdr.c           |    1 
 board/davinci/sonata/sonata.c           |    1 
 cpu/arm926ejs/davinci/Makefile          |    2 
 cpu/arm926ejs/davinci/psc.c             |  182 ++++++++++++++++++++++++++++++
 include/asm-arm/arch-davinci/hardware.h |    8 +
 10 files changed, 192 insertions(+), 220 deletions(-)
board/davinci/common/Makefile +1 -1
@@ -29,7 +29,7 @@ endif
 
 LIB	= $(obj)lib$(VENDOR).a
 
-COBJS	:= psc.o misc.o
+COBJS	:= misc.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/davinci/common/psc.c deleted +0 -182

182 lines not on this page · raw message

board/davinci/common/psc.h deleted +0 -32
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2008 Lyrtech <www.lyrtech.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __PSC_H
-#define __PSC_H
-
-void lpsc_on(unsigned int id);
-void dsp_on(void);
-void davinci_enable_uart0(void);
-void davinci_enable_emac(void);
-void davinci_enable_i2c(void);
-void davinci_errata_workarounds(void);
-
-#endif /* __PSC_H */
board/davinci/dvevm/dvevm.c +0 -1
@@ -27,7 +27,6 @@
 #include <common.h>
 #include <i2c.h>
 #include <asm/arch/hardware.h>
-#include "../common/psc.h"
 #include "../common/misc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/davinci/schmoogie/schmoogie.c +0 -1
@@ -27,7 +27,6 @@
 #include <common.h>
 #include <i2c.h>
 #include <asm/arch/hardware.h>
-#include "../common/psc.h"
 #include "../common/misc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/davinci/sffsdr/sffsdr.c +0 -1
@@ -30,7 +30,6 @@
 #include <common.h>
 #include <i2c.h>
 #include <asm/arch/hardware.h>
-#include "../common/psc.h"
 #include "../common/misc.h"
 
 #define DAVINCI_A3CR     (0x01E00014)	/* EMIF-A CS3 config register. */
board/davinci/sonata/sonata.c +0 -1
@@ -26,7 +26,6 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
-#include "../common/psc.h"
 #include "../common/misc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
cpu/arm926ejs/davinci/Makefile +1 -1
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(SOC).a
 
-COBJS	= timer.o ether.o lxt972.o dp83848.o
+COBJS	= timer.o ether.o lxt972.o dp83848.o psc.o
 SOBJS	= reset.o
 
 ifndef CONFIG_SKIP_LOWLEVEL_INIT
cpu/arm926ejs/davinci/psc.c new file +182 -0

182 lines not on this page · raw message

include/asm-arm/arch-davinci/hardware.h +8 -0
@@ -133,6 +133,14 @@ typedef volatile unsigned int *	dv_reg_p
 #define DAVINCI_LPSC_GEM		39
 #define DAVINCI_LPSC_IMCOP		40
 
+void lpsc_on(unsigned int id);
+void dsp_on(void);
+
+void davinci_enable_uart0(void);
+void davinci_enable_emac(void);
+void davinci_enable_i2c(void);
+void davinci_errata_workarounds(void);
+
 /* Some PSC defines */
 #define PSC_CHP_SHRTSW			(0x01c40038)
 #define PSC_GBLCTL			(0x01c41010)