Changeset 7046cdd in rtems
- Timestamp:
- 10/28/99 16:01:41 (23 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b502b0d1
- Parents:
- e90c5a1e
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/cpu/sh/rtems/score/sh.h
re90c5a1e r7046cdd 149 149 #define CPU_swap_u16( value ) sh_swap_u16( value ) 150 150 151 /*152 * Simple spin delay in microsecond units for device drivers.153 * This is very dependent on the clock speed of the target.154 *155 * Since we don't have a real time clock, this is a very rough156 * approximation, assuming that each cycle of the delay loop takes157 * approx. 4 machine cycles.158 *159 * e.g.: MHZ = 20 => 5e-8 secs per instruction160 * => 4 * 5e-8 secs per delay loop161 */162 163 #define sh_delay( microseconds ) \164 { register unsigned int _delay = (microseconds) * (MHZ / 4 ); \165 asm volatile ( \166 "0: add #-1,%0\n \167 nop\n \168 cmp/pl %0\n \169 bt 0b\170 nop" \171 :: "r" (_delay) ); \172 }173 174 #define CPU_delay( microseconds ) sh_delay( microseconds )175 176 151 extern unsigned int sh_set_irq_priority( 177 152 unsigned int irq, -
c/src/lib/libbsp/sh/gensh1/include/bsp.h
re90c5a1e r7046cdd 69 69 70 70 /* Constants */ 71 #ifndef MHZ 72 #error Missing MHZ 73 #endif 71 74 72 #define MHZ 20 75 /* 76 * Simple spin delay in microsecond units for device drivers. 77 * This is very dependent on the clock speed of the target. 78 * 79 * Since we don't have a real time clock, this is a very rough 80 * approximation, assuming that each cycle of the delay loop takes 81 * approx. 4 machine cycles. 82 * 83 * e.g.: MHZ = 20 => 5e-8 secs per instruction 84 * => 4 * 5e-8 secs per delay loop 85 */ 86 87 #define delay( microseconds ) \ 88 { register unsigned int _delay = (microseconds) * (MHZ / 4 ); \ 89 asm volatile ( \ 90 "0: add #-1,%0\n \ 91 nop\n \ 92 cmp/pl %0\n \ 93 bt 0b\ 94 nop" \ 95 :: "r" (_delay) ); \ 96 } 97 98 /* 99 * For backward compatibility only. 100 * Do not rely on them being present in future 101 */ 102 #define CPU_delay( microseconds ) delay( microseconds ) 103 #define sh_deley( microseconds ) delay( microseconds ) 73 104 74 105 /* -
c/src/lib/libbsp/sh/gensh1/startup/Makefile.in
re90c5a1e r7046cdd 48 48 49 49 DEFINES += 50 CPPFLAGS += 50 CPPFLAGS += $(BSP_CPPFLAGS) 51 51 CFLAGS += 52 52 -
c/src/lib/libcpu/sh/sh7032/clock/Makefile.in
re90c5a1e r7046cdd 41 41 42 42 DEFINES += 43 CPPFLAGS += 43 CPPFLAGS += -DMHZ=$(MHZ) 44 44 CFLAGS += $(CFLAGS_OS_V) 45 45 -
c/src/lib/libcpu/sh/sh7032/timer/Makefile.in
re90c5a1e r7046cdd 41 41 42 42 DEFINES += 43 CPPFLAGS += 43 CPPFLAGS += -DMHZ=$(MHZ) 44 44 CFLAGS += 45 45 -
cpukit/score/cpu/sh/rtems/score/sh.h
re90c5a1e r7046cdd 149 149 #define CPU_swap_u16( value ) sh_swap_u16( value ) 150 150 151 /*152 * Simple spin delay in microsecond units for device drivers.153 * This is very dependent on the clock speed of the target.154 *155 * Since we don't have a real time clock, this is a very rough156 * approximation, assuming that each cycle of the delay loop takes157 * approx. 4 machine cycles.158 *159 * e.g.: MHZ = 20 => 5e-8 secs per instruction160 * => 4 * 5e-8 secs per delay loop161 */162 163 #define sh_delay( microseconds ) \164 { register unsigned int _delay = (microseconds) * (MHZ / 4 ); \165 asm volatile ( \166 "0: add #-1,%0\n \167 nop\n \168 cmp/pl %0\n \169 bt 0b\170 nop" \171 :: "r" (_delay) ); \172 }173 174 #define CPU_delay( microseconds ) sh_delay( microseconds )175 176 151 extern unsigned int sh_set_irq_priority( 177 152 unsigned int irq, -
make/custom/gensh1.cfg
re90c5a1e r7046cdd 9 9 # 10 10 11 MHZ :=2011 MHZ=20 12 12 13 13 include $(RTEMS_ROOT)/make/custom/default.cfg … … 19 19 RTEMS_BSP_FAMILY=gensh1 20 20 21 # BSP specific preprocessor flags. 22 # These should only be used in BSP dependent directories. 23 BSP_CPPFLAGS=-DMHZ=$(MHZ) 24 21 25 # 22 26 # This contains the compiler options necessary to select the CPU model 23 27 # and (hopefully) optimize for it. 24 28 # 25 CPU_CFLAGS=-m1 29 # HACK: We have to append BSP_CPPFLAGS to CPU_CFLAGS, because 30 # per BSP and per CPU CPPFLAGS are not (yet?) supported 31 CPU_CFLAGS=-m1 $(BSP_CPPFLAGS) 32 # CPU_CFLAGS=-m1 26 33 27 34 # debug flags: typically none, but we use -O1 as it produces better code … … 31 38 # -O4 is ok for RTEMS 32 39 CFLAGS_OPTIMIZE_V = -O4 40 41 CPPFLAGS+=$(BSP_CPPFLAGS) 33 42 34 43 # This section makes the target dependent options file.
Note: See TracChangeset
for help on using the changeset viewer.