Refactored common cpu specific code for 85xx/86xx into one file.
PATCH v2 1/2 Refactored common cpu specific code for 85xx/86xx into one file.
Removed same code pieces from cpu/mpc85xx/cpu.c and cpu/mpc86xx/cpu.c
and moved to cpu/mpc8xxx/cpu.c(new file)
Signed-off-by Poonam Aggrwal <[email protected]>
---
- based of u-boot version 2009.08-rc1
- Changes over v1:
Incorporated Wolfgang's comments
Makefile | 2 + cpu/mpc85xx/cpu.c | 70 +-------------------------------- cpu/mpc86xx/cpu.c | 32 +--------------- cpu/mpc8xxx/Makefile | 25 ++++++++++++ cpu/mpc8xxx/cpu.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 100 deletions(-) create mode 100644 cpu/mpc8xxx/Makefile create mode 100644 cpu/mpc8xxx/cpu.c
Makefile +2 -0
@@ -229,10 +229,12 @@ endif ifeq ($(CPU),mpc85xx) LIBS += drivers/qe/qe.a LIBS += cpu/mpc8xxx/ddr/libddr.a +LIBS += cpu/mpc8xxx/lib8xxx.a TAG_SUBDIRS += cpu/mpc8xxx endif ifeq ($(CPU),mpc86xx) LIBS += cpu/mpc8xxx/ddr/libddr.a +LIBS += cpu/mpc8xxx/lib8xxx.a TAG_SUBDIRS += cpu/mpc8xxx endif LIBS += drivers/rtc/librtc.a
cpu/mpc85xx/cpu.c +1 -69
92 lines not on this page · raw message
cpu/mpc86xx/cpu.c +1 -31
@@ -1,5 +1,5 @@/* -* Copyright 2006 Freescale Semiconductor +* Copyright 2006,2009 Freescale Semiconductor, Inc. * Jeff Brown * Srikanth Srinivasan ([email protected]) *
@@ -28,25 +28,8 @@#include <asm/cache.h> #include <asm/mmu.h> #include <mpc86xx.h> -#include <tsec.h> #include <asm/fsl_law.h> -struct cpu_type cpu_type_list [] = { -CPU_TYPE_ENTRY (8610 ,8610 ), -CPU_TYPE_ENTRY (8641 ,8641 ), -CPU_TYPE_ENTRY (8641D ,8641D ), -}; - -struct cpu_type *identify_cpu (u32 ver) -{ -int i; -for (i =0 ; i <ARRAY_SIZE (cpu_type_list); i++) -if (cpu_type_list[i].soc_ver == ver) -return &cpu_type_list[i]; - -return NULL ; -} -/* * Default board reset function */
@@ -209,16 +192,3 @@ void mpc86xx_reginfo(void)printf ("\tBR7\t0x%08X\tOR7\t0x%08X \n" ,in_be32 (&lbc->br7),in_be32 (&lbc->or7)); } - -/* -* Initializes on-chip ethernet controllers. -* to override, implement board_eth_init() -*/ -int cpu_eth_init (bd_t *bis) -{ -#if defined(CONFIG_TSEC_ENET ) -tsec_standard_init (bis); -#endif - -return 0 ; -}
cpu/mpc8xxx/Makefile new file +25 -0
@@ -0,0 +1,25 @@ +# +# Copyright 2009 Freescale Semiconductor, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# Version 2 as published by the Free Software Foundation. +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib8xxx.a + +COBJS-y += cpu.o + +SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) + +all: $(obj).depend $(LIB) + +$(LIB): $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend
cpu/mpc8xxx/cpu.c new file +106 -0
106 lines not on this page · raw message
Signature · 1 line
1.5.6.5
Kumar Gala
AppliedPATCH v2 1/2 Refactored common cpu specific code for 85xx/86xx into one file.
Quoted 15 lines · Poonam Aggrwal
Removed same code pieces from
cpu/mpc85xx/cpu.candcpu/mpc86xx/cpu.cand moved to cpu/mpc8xxx/cpu.c(new file)Signed-off-by Poonam Aggrwal <[email protected]>---
- based of u-boot version 2009.08-rc1
- Changes over v1:
Incorporated Wolfgang's commentsMakefile | 2 + cpu/mpc85xx/cpu.c | 70 +-------------------------------- cpu/mpc86xx/cpu.c | 32 +--------------- cpu/mpc8xxx/Makefile | 25 ++++++++++++ cpu/mpc8xxx/cpu.c | 106 +++++++++++++++++++++++++++++++++++++++++ +++++++++ 5 files changed, 135 insertions(+), 100 deletions(-)
Quoted 2 lines
create mode 100644 cpu/mpc8xxx/Makefile
create mode 100644cpu/mpc8xxx/cpu.c
applied to 85xx next
- k