Changeset 7da3405 in rtems
- Timestamp:
- 06/20/07 21:42:00 (16 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 19b4789
- Parents:
- 18481be3
- Location:
- c/src/lib/libbsp/powerpc/gen5200
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/powerpc/gen5200/ChangeLog
r18481be3 r7da3405 1 2007-06-20 Joel Sherrill <joel.sherrill@oarcorp.com> 2 3 Add Embedded Planets EP5200 which is the same as the Freescale 4 5200Lite (a.k.a. IceCube) evaluation board. 5 * Makefile.am: Add linkcmds.ep5200. 6 Add -DMPC5200_BAPI_LIBC_HEADERS to remove some warnings in bestcomm. 7 * preinstall.am: Add linkcmds.ep5200. 8 * clock/clock.c: Correct math for prescaler/counter when bus speed 9 is high enough to require multiple passes of loop. 10 * console/console.c: Use same math for initial baud rate as when it 11 is changed via ioctl. When HAS_UBOOT is defined, initialize console 12 to the same baud as it was with U-Boot. 13 * include/bsp.h: Add EP5200 and console boot baud support. 14 * include/mpc5200.h: Spacing. 15 * startup/bspstart.c: If HAS_UBOOT and SHOW_MORE_INIT_SETTINGS are 16 both defined, dump the U-Boot BD info structure. 17 * vectors/vectors.S: ep5200 cannot use vectors segment. When loading 18 it, U-Boot freezes. Besides, U-Boot can automatically start the BSP 19 so we do not have to run from board reset. 20 * startup/linkcmds.ep5200: New file. 21 1 22 2007-04-17 Ralf Corsépius <ralf.corsepius@rtems.org> 2 23 -
c/src/lib/libbsp/powerpc/gen5200/Makefile.am
r18481be3 r7da3405 32 32 dist_project_lib_DATA += startup/linkcmds 33 33 dist_project_lib_DATA += startup/linkcmds.brs5l 34 dist_project_lib_DATA += startup/linkcmds.ep5200 34 35 dist_project_lib_DATA += startup/linkcmds.pm520 35 36 … … 52 53 bestcomm/task_api/tasksetup_bdtable.h \ 53 54 bestcomm/task_api/tasksetup_general.h 54 bestcomm_rel_CPPFLAGS = $(AM_CPPFLAGS) 55 bestcomm_rel_CPPFLAGS = $(AM_CPPFLAGS) -DMPC5200_BAPI_LIBC_HEADERS 55 56 bestcomm_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) 56 57 … … 112 113 startup_rel_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \ 113 114 ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \ 114 ../../shared/sbrk.c \115 ../../shared/sbrk.c ../shared/uboot_dump_bdinfo.c \ 115 116 ../../shared/gnatinstallhandler.c startup/cpuinit.c start/start.S 116 117 startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -
c/src/lib/libbsp/powerpc/gen5200/clock/clock.c
r18481be3 r7da3405 171 171 { 172 172 uint32_t prescaler_value = 1; 173 uint32_t counter = counter_value; 173 174 struct mpc5200_gpt *gpt = (struct mpc5200_gpt *)(&mpc5200.gpt[gpt_no]); 174 175 175 176 /* Calculate counter/prescaler value, e.g. IPB_Clock=33MHz -> Int. every 0,3 nsecs. - 130 secs.*/ 176 while((counter _value>= (1 << 16)) && (prescaler_value < (1 << 16)))177 while((counter >= (1 << 16)) && (prescaler_value < (1 << 16))) 177 178 { 178 179 prescaler_value++; 180 counter_value /= prescaler_value; 181 182 } 183 184 counter_value = (uint16_t)counter_value; 185 186 gpt->count_in = (prescaler_value << 16) + counter_value; 179 prescaler_value++; 180 counter = counter_value / prescaler_value; 181 } 182 183 counter = (uint16_t)counter; 184 185 gpt->count_in = (prescaler_value << 16) + counter; 187 186 188 187 } -
c/src/lib/libbsp/powerpc/gen5200/console/console.c
r18481be3 r7da3405 498 498 psc->tfalarm = 1; 499 499 500 baud_divider = IPB_CLOCK / (9600 * 32); 500 baud_divider = (IPB_CLOCK + GEN5200_CONSOLE_BAUD *16) / (GEN5200_CONSOLE_BAUD * 32); 501 501 502 /* 502 503 * Set upper timer counter 503 504 */ 504 505 psc->ctur = baud_divider >> 16; 505 506 506 507 507 /* -
c/src/lib/libbsp/powerpc/gen5200/include/bsp.h
r18481be3 r7da3405 91 91 #define HAS_UBOOT 92 92 93 #elif defined (ep5200) 94 /* 95 * Embedded Planet EP5200 -- should be the same as a Freescale 5200lite 96 * which is also known as the Ice Cube. In the RTEMS configuration, 97 * we load U-Boot on it instead of the default dBug. 98 */ 99 100 #define HAS_UBOOT 101 102 /* These are copied from PM520 but seem to work so OK */ 103 #define GPIOPCR_INITMASK 0x330F0F77 104 #define GPIOPCR_INITVAL 0x01050444 105 106 /* we only have PSC1 */ 107 #define GEN5200_UART_AVAIL_MASK 0x01 108 109 #define MBAR 0xF0000000 110 93 111 #else 94 112 #error "board type not defined" … … 111 129 112 130 #if defined(HAS_UBOOT) 131 /* This is the define U-Boot uses to configure which entries in the structure are valid */ 113 132 #define CONFIG_MPC5xxx 114 133 #include <u-boot.h> 134 115 135 extern bd_t *uboot_bdinfo_ptr; 116 136 extern bd_t uboot_bdinfo_copy; … … 190 210 #define SINGLE_CHAR_MODE 191 211 #define UARTS_USE_TERMIOS_INT 1 212 /* #define SHOW_MORE_INIT_SETTINGS 1 */ 192 213 193 214 /* ata modes */ … … 206 227 #endif 207 228 229 #if defined(HAS_UBOOT) 230 #define GEN5200_CONSOLE_BAUD (uboot_bdinfo_ptr->bi_baudrate) 231 #else 232 #define GEN5200_CONSOLE_BAUD 9600 233 #endif 234 208 235 /* 209 236 * Convert decrement value to tenths of microsecnds (used by -
c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h
r18481be3 r7da3405 700 700 701 701 #endif 702 702 /* 703 703 * programmable serial controller 1 (MBAR + 0x2000) 704 704 */ -
c/src/lib/libbsp/powerpc/gen5200/preinstall.am
r18481be3 r7da3405 86 86 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.brs5l 87 87 88 $(PROJECT_LIB)/linkcmds.ep5200: startup/linkcmds.ep5200 $(PROJECT_LIB)/$(dirstamp) 89 $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.ep5200 90 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.ep5200 91 88 92 $(PROJECT_LIB)/linkcmds.pm520: startup/linkcmds.pm520 $(PROJECT_LIB)/$(dirstamp) 89 93 $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.pm520 -
c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c
r18481be3 r7da3405 245 245 } 246 246 247 248 249 247 void bsp_start(void) 250 248 { … … 258 256 * store the result in global variables so that it can be used latter... 259 257 */ 260 myCpu 258 myCpu = get_ppc_cpu_type(); 261 259 myCpuRevision = get_ppc_cpu_revision(); 262 260 … … 265 263 uboot_bdinfo_ptr = &uboot_bdinfo_copy; 266 264 #endif 265 266 #if defined(HAS_UBOOT) && defined(SHOW_MORE_INIT_SETTINGS) 267 { 268 void dumpUBootBDInfo( bd_t * ); 269 dumpUBootBDInfo( uboot_bdinfo_ptr ); 270 } 271 #endif 272 267 273 cpu_init(); 268 274 -
c/src/lib/libbsp/powerpc/gen5200/vectors/vectors.S
r18481be3 r7da3405 67 67 68 68 #include <rtems/asm.h> 69 #include <bspopts.h> 69 70 #include <rtems/score/cpu.h> 70 71 #include "vectors.h" … … 198 199 rfi 199 200 201 #if !defined(ep5200) 200 202 .section .vectors,"awx",@progbits 201 203 … … 262 264 .long 0x04000400 263 265 .endr 264 266 #endif
Note: See TracChangeset
for help on using the changeset viewer.