mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
include/bsp.h, include/hwreg_vals.h, network/network.c:
correct some init values for HSC_CM01 boards change strategy to determine MAC address
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2008-11-18 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||||
|
|
||||||
|
* include/bsp.h, include/hwreg_vals.h, network/network.c:
|
||||||
|
correct some init values for HSC_CM01 boards
|
||||||
|
change strategy to determine MAC address
|
||||||
|
|
||||||
2008-11-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2008-11-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* console/console.c: Update for new NS16550 polled write function.
|
* console/console.c: Update for new NS16550 polled write function.
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ rtems_status_code bsp_register_spi(void);
|
|||||||
#endif
|
#endif
|
||||||
#define PRINTK_MINOR BSP_UART1_MINOR
|
#define PRINTK_MINOR BSP_UART1_MINOR
|
||||||
|
|
||||||
#if defined(MPC8249EAMDS)
|
#if defined(MPC8249EAMDS) || defined(HSC_CM01)
|
||||||
#define BSP_USE_UART2 TRUE
|
#define BSP_USE_UART2 TRUE
|
||||||
#else
|
#else
|
||||||
#define BSP_USE_UART2 FALSE
|
#define BSP_USE_UART2 FALSE
|
||||||
|
|||||||
@@ -249,7 +249,7 @@
|
|||||||
#define DDR_SDRAM_CFG_2_VAL 0x00401000
|
#define DDR_SDRAM_CFG_2_VAL 0x00401000
|
||||||
#define DDR_SDRAM_MODE_VAL 0x44521632
|
#define DDR_SDRAM_MODE_VAL 0x44521632
|
||||||
#define DDR_SDRAM_CLK_CNTL_VAL 0x01800000
|
#define DDR_SDRAM_CLK_CNTL_VAL 0x01800000
|
||||||
#define DDR_SDRAM_CFG_VAL 0x43000008
|
#define DDR_SDRAM_CFG_VAL 0x63000008
|
||||||
|
|
||||||
#define DDR_ERR_DISABLE_VAL 0x0000008D
|
#define DDR_ERR_DISABLE_VAL 0x0000008D
|
||||||
#define DDR_ERR_DISABLE_VAL2 0x00000089
|
#define DDR_ERR_DISABLE_VAL2 0x00000089
|
||||||
|
|||||||
@@ -123,9 +123,24 @@ int BSP_tsec_attach
|
|||||||
* FIXME: get the real address we need
|
* FIXME: get the real address we need
|
||||||
*/
|
*/
|
||||||
if (config->hardware_address == NULL) {
|
if (config->hardware_address == NULL) {
|
||||||
|
#if !defined(HAS_UBOOT)
|
||||||
|
static char hw_addr [M83xx_TSEC_NIFACES][6];
|
||||||
|
m83xxTSEC_Registers_t *reg_ptr;
|
||||||
|
|
||||||
#ifdef HAS_UBOOT
|
/* read MAC address from hardware register */
|
||||||
|
/* we expect it htere from the boot loader */
|
||||||
|
reg_ptr = &mpc83xx.tsec[unitNumber - 1];
|
||||||
|
config->hardware_address = hw_addr[unitNumber-1];
|
||||||
|
|
||||||
|
hw_addr[unitNumber-1][5] = (reg_ptr->macstnaddr[0] >> 24) & 0xff;
|
||||||
|
hw_addr[unitNumber-1][4] = (reg_ptr->macstnaddr[0] >> 16) & 0xff;
|
||||||
|
hw_addr[unitNumber-1][3] = (reg_ptr->macstnaddr[0] >> 8) & 0xff;
|
||||||
|
hw_addr[unitNumber-1][2] = (reg_ptr->macstnaddr[0] >> 0) & 0xff;
|
||||||
|
hw_addr[unitNumber-1][1] = (reg_ptr->macstnaddr[1] >> 24) & 0xff;
|
||||||
|
hw_addr[unitNumber-1][0] = (reg_ptr->macstnaddr[1] >> 16) & 0xff;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAS_UBOOT)
|
||||||
switch (unitNumber) {
|
switch (unitNumber) {
|
||||||
case 1:
|
case 1:
|
||||||
config->hardware_address = mpc83xx_uboot_board_info.bi_enetaddr;
|
config->hardware_address = mpc83xx_uboot_board_info.bi_enetaddr;
|
||||||
@@ -153,12 +168,6 @@ int BSP_tsec_attach
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAS_UBOOT */
|
|
||||||
|
|
||||||
char hw_addr [6] = { 0x00, 0x04, 0x9f, 0x00, 0x2f, 0xcb};
|
|
||||||
|
|
||||||
config->hardware_address = hw_addr;
|
|
||||||
|
|
||||||
#endif /* HAS_UBOOT */
|
#endif /* HAS_UBOOT */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user