summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h')
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h100
1 files changed, 83 insertions, 17 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
index fa97939d53..b7f0679687 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
@@ -20,8 +20,57 @@
#ifndef __GEN83xx_BSP_h
#define __GEN83xx_BSP_h
+/*
+ * MPC8313E Reference Design Board
+ */
+
+#ifdef MPC8313ERDB
+
+#define HAS_UBOOT
+
+/* For U-Boot */
+#define CONFIG_MPC83XX
+#define CONFIG_HAS_ETH1
+
+#endif /* MPC8313ERDB */
+
+#include <libcpu/powerpc-utility.h>
+
#include <bsp/hwreg_vals.h>
+/*
+ * Some symbols defined in the linker command file.
+ */
+
+LINKER_SYMBOL( bsp_ram_start);
+LINKER_SYMBOL( bsp_ram_end);
+LINKER_SYMBOL( bsp_ram_size);
+
+LINKER_SYMBOL( bsp_rom_start);
+LINKER_SYMBOL( bsp_rom_end);
+LINKER_SYMBOL( bsp_rom_size);
+
+LINKER_SYMBOL( bsp_section_text_start);
+LINKER_SYMBOL( bsp_section_text_end);
+LINKER_SYMBOL( bsp_section_text_size);
+
+LINKER_SYMBOL( bsp_section_data_start);
+LINKER_SYMBOL( bsp_section_data_end);
+LINKER_SYMBOL( bsp_section_data_size);
+
+LINKER_SYMBOL( bsp_section_bss_start);
+LINKER_SYMBOL( bsp_section_bss_end);
+LINKER_SYMBOL( bsp_section_bss_size);
+
+LINKER_SYMBOL( bsp_interrupt_stack_start);
+LINKER_SYMBOL( bsp_interrupt_stack_end);
+LINKER_SYMBOL( bsp_interrupt_stack_size);
+LINKER_SYMBOL( bsp_interrupt_stack_pointer);
+
+LINKER_SYMBOL( bsp_workspace_start);
+
+LINKER_SYMBOL( IMMRBAR);
+
#ifndef ASM
#ifdef __cplusplus
@@ -35,6 +84,17 @@ extern "C" {
#include <rtems/clockdrv.h>
#include <bsp/irq.h>
#include <bsp/vectors.h>
+#include <bsp/tictac.h>
+
+#ifdef HAS_UBOOT
+
+#include <bsp/u-boot.h>
+
+extern bd_t mpc83xx_uboot_board_info;
+
+extern const size_t mpc83xx_uboot_board_info_size;
+
+#endif /* HAS_UBOOT */
/* miscellaneous stuff assumed to exist */
@@ -97,31 +157,24 @@ rtems_status_code bsp_register_spi(void);
#define UARTS_USE_TERMIOS_INT 1
/*
- * Convert decrement value to tenths of microsecnds (used by
- * shared timer driver).
- *
- * + CPU has a csb_clock bus,
- * + There are 4 bus cycles per click
- * + We return value in 1/10 microsecond units.
- * Modified following equation to integer equation to remove
- * floating point math.
- * (int) ((float)(_value) / ((XLB_CLOCK/1000000 * 0.1) / 4.0))
- */
-
-extern unsigned int BSP_bus_frequency;
-#define BSP_Convert_decrementer( _value ) \
- (int) (((_value) * 4000) / (BSP_bus_frequency/10000))
-
-/*
* Network driver configuration
*/
struct rtems_bsdnet_ifconfig;
extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
-#define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
+#ifdef MPC8313ERDB
+
+#define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec2"
+#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec1"
+
+#else /* MPC8313ERDB */
+
+#define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
+#endif /* MPC8313ERDB */
+
#if defined(MPC8349EAMDS)
/*
* i2c EEPROM device name
@@ -150,6 +203,19 @@ extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
#define RTEMS_BSP_SPI_FRAM_DEVICE_PATH "/dev/spi.fram"
#endif /* defined(HSC_CM01) */
+extern unsigned int BSP_bus_frequency;
+
+extern uint32_t bsp_clicks_per_usec;
+
+/*
+ * Convert decrementer value to tenths of microseconds (used by shared timer
+ * driver).
+ */
+#define BSP_Convert_decrementer( _value ) \
+ ((int) (((_value) * 10) / bsp_clicks_per_usec))
+
+void mpc83xx_zero_4( void *dest, size_t n);
+
#ifdef __cplusplus
}
#endif