[PATCH 37/62] Remove unused pxa255/pmc, update csb337 and gumstix BSPs

Joel Sherrill joel.sherrill at oarcorp.com
Wed Oct 15 20:00:27 UTC 2014


---
 c/src/lib/libbsp/arm/gumstix/Makefile.am |   3 +-
 c/src/lib/libcpu/arm/Makefile.am         |   6 --
 c/src/lib/libcpu/arm/pxa255/pmc/pmc.c    | 126 -------------------------------
 3 files changed, 1 insertion(+), 134 deletions(-)
 delete mode 100644 c/src/lib/libcpu/arm/pxa255/pmc/pmc.c

diff --git a/c/src/lib/libbsp/arm/gumstix/Makefile.am b/c/src/lib/libbsp/arm/gumstix/Makefile.am
index cca6948..66d5eaa 100644
--- a/c/src/lib/libbsp/arm/gumstix/Makefile.am
+++ b/c/src/lib/libbsp/arm/gumstix/Makefile.am
@@ -73,8 +73,7 @@ libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/ffuart.rel \
-    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel \
-    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/pmc.rel
+    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel
 
 if ON_SKYEYE
 if HAS_NETWORKING
diff --git a/c/src/lib/libcpu/arm/Makefile.am b/c/src/lib/libcpu/arm/Makefile.am
index e488c45..83fe0d5 100644
--- a/c/src/lib/libcpu/arm/Makefile.am
+++ b/c/src/lib/libcpu/arm/Makefile.am
@@ -46,12 +46,6 @@ pxa255_ffuart_rel_SOURCES = pxa255/ffuart/ffuart.c
 pxa255_ffuart_rel_CPPFLAGS = $(AM_CPPFLAGS)
 pxa255_ffuart_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
 
-## pxa255/pmc
-noinst_PROGRAMS += pxa255/pmc.rel
-pxa255_pmc_rel_SOURCES = pxa255/pmc/pmc.c
-pxa255_pmc_rel_CPPFLAGS = $(AM_CPPFLAGS)
-pxa255_pmc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
 ## pxa255/interrupt
 include_bsp_HEADERS += pxa255/irq/irq.h
 noinst_PROGRAMS += pxa255/irq.rel
diff --git a/c/src/lib/libcpu/arm/pxa255/pmc/pmc.c b/c/src/lib/libcpu/arm/pxa255/pmc/pmc.c
deleted file mode 100644
index 8e42fa6..0000000
--- a/c/src/lib/libcpu/arm/pxa255/pmc/pmc.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *  By Yang Xi <hiyangxi at gmail.com>.
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems.h>
-#include <bsp.h>
-#include <pxa255.h>
-
-unsigned int xscale_read_pmc(int reg)
-{
-  unsigned int val = 0;
-  switch(reg){
-  case PMC_PMNC:
-    __asm__ volatile("mrc p14,0,%0,c0,c1,0\n":"=r"(val):);
-    break;
-  case PMC_CCNT:
-    __asm__ volatile("mrc p14,0,%0,c1,c1,0\n":"=r"(val):);
-    break;
-  case PMC_INTEN:
-    __asm__ volatile("mrc p14,0,%0,c4,c1,0\n":"=r"(val):);
-    break;
-  case PMC_FLAG:
-    __asm__ volatile("mrc p14,0,%0,c5,c1,0\n":"=r"(val):);
-    break;
-  case PMC_EVTSEL:
-    __asm__ volatile("mrc p14,0,%0,c8,c1,0\n":"=r"(val):);
-    break;
-  case PMC_PMN0:
-    __asm__ volatile("mrc p14,0,%0,c0,c2,0\n":"=r"(val):);
-    break;
-  case PMC_PMN1:
-    __asm__ volatile("mrc p14,0,%0,c1,c2,0\n":"=r"(val):);
-    break;
-  case PMC_PMN2:
-    __asm__ volatile("mrc p14,0,%0,c2,c2,0\n":"=r"(val):);
-    break;
-  case PMC_PMN3:
-    __asm__ volatile("mrc p14,0,%0,c3,c2,0\n":"=r"(val):);
-    break;
-  default:
-    val = 0;
-    break;
-  }
-  return val;
-}
-
-void xscale_write_pmc(int reg, unsigned int val)
-{
-  switch(reg){
-  case PMC_PMNC:
-    __asm__ volatile("mcr p14,0,%0,c0,c1,0\n"::"r"(val));
-    break;
-  case PMC_CCNT:
-    __asm__ volatile("mcr p14,0,%0,c1,c1,0\n"::"r"(val));
-    break;
-  case PMC_INTEN:
-    __asm__ volatile("mcr p14,0,%0,c4,c1,0\n"::"r"(val));
-    break;
-  case PMC_FLAG:
-    __asm__ volatile("mcr p14,0,%0,c5,c1,0\n"::"r"(val));
-    break;
-  case PMC_EVTSEL:
-    __asm__ volatile("mcr p14,0,%0,c8,c1,0\n"::"r"(val));
-    break;
-  case PMC_PMN0:
-    __asm__ volatile("mcr p14,0,%0,c0,c2,0\n"::"r"(val));
-    break;
-  case PMC_PMN1:
-    __asm__ volatile("mcr p14,0,%0,c1,c2,0\n"::"r"(val));
-    break;
-  case PMC_PMN2:
-    __asm__ volatile("mcr p14,0,%0,c2,c2,0\n"::"r"(val));
-    break;
-  case PMC_PMN3:
-    __asm__ volatile("mcr p14,0,%0,c3,c2,0\n"::"r"(val));
-    break;
-  default:
-    break;
-  }
-}
-
-void xscale_pmc_enable_pmc(void)
-{
-  unsigned int val;
-  val = xscale_read_pmc(PMC_PMNC);
-  val = (val | PMC_PMNC_E)&(~PMC_PMNC_PCD);
-  xscale_write_pmc(PMC_PMNC,val);
-}
-void xscale_pmc_disable_pmc(void)
-{
-  unsigned int val;
-  val = xscale_read_pmc(PMC_PMNC);
-  val = val & (~PMC_PMNC_E);
-  xscale_write_pmc(PMC_PMNC,val);
-}
-
-void xscale_pmc_reset_pmc(void)
-{
-  unsigned int val;
-  val = xscale_read_pmc(PMC_PMNC);
-  val = val | PMC_PMNC_PCR;
-  xscale_write_pmc(PMC_PMNC,val);
-}
-
-void xscale_pmc_reset_ccnt(void)
-{
-  unsigned int val;
-  val = xscale_read_pmc(PMC_PMNC);
-  val = val | PMC_PMNC_CCR;
-  xscale_write_pmc(PMC_PMNC,val);
-}
-
-void xscale_pmc_setevent(int reg, unsigned char evt)
-{
-  unsigned int val;
-  val = xscale_read_pmc(PMC_EVTSEL);
-  if((reg >= PMC_PMN0) && (reg <= PMC_PMN3)){
-    val &= ~(0xff<<(reg-PMC_PMN0)*8);
-    val |= evt << (reg-PMC_PMN0)*8;
-    xscale_write_pmc(PMC_EVTSEL,val);
-  }
-}
-- 
1.9.3




More information about the devel mailing list