Commit 306c8bfd authored by Yuri Tikhonov's avatar Yuri Tikhonov
Browse files

RT73025. stm32f2_eth: driver implementation



Note, beside this, to make driver workable, this patch:

- changes SRAM memory distribution. Actually, we have 128K in STM (as
opposite to 64K in A2F). TBDs here: a) CONFIG_MEM_RAM_LEN is a bad
name, since this isn't length of full SRAM, but just a part of it; b)
we should control the summary length of MEM_xxx areas somehow, on a
SOC basis (i.e. A2F has 64K SRAM, STM32F2 has 128K SRAM, etc.), maybe
include/configs/cortex-m3-common.h would be the best choice; c) not
sure if we want to have *all* SRAM parts configurable, e.g. MALLOC size
may be determined automatically.

- in default configuration load files to SRAM (RAM_BUF) (as opposite
to external RAM). TBD here: make this configurable somehow.
Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
parent 4f1f120f
......@@ -24,6 +24,7 @@
*/
#include <common.h>
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR;
......@@ -73,3 +74,14 @@ int dram_init(void)
return 0;
}
#ifdef CONFIG_STM32F2_ETH
/*
* Register ethernet driver
*/
int board_eth_init(bd_t *bis)
{
return stm32f2_eth_init(bis);
}
#endif
......@@ -76,6 +76,7 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o
COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o
COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
COBJS-$(CONFIG_CORE10100) += core10100.o
COBJS-$(CONFIG_STM32F2_ETH) += stm32f2_eth.o
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
......
This diff is collapsed.
......@@ -100,9 +100,9 @@
#define CONFIG_MEM_NVM_LEN (1024 * 1024)
#define CONFIG_MEM_RAM_BASE 0x20000000
#define CONFIG_MEM_RAM_LEN (16 * 1024)
#define CONFIG_MEM_RAM_LEN (32 * 1024)
#define CONFIG_MEM_RAM_BUF_LEN (32 * 1024)
#define CONFIG_MEM_MALLOC_LEN (12 * 1024)
#define CONFIG_MEM_MALLOC_LEN (60 * 1024)
#define CONFIG_MEM_STACK_LEN (4 * 1024)
/*
......@@ -126,7 +126,7 @@
* Store env in memory only
*/
#define CONFIG_ENV_IS_NOWHERE
#define CONFIG_ENV_SIZE (8 * 1024)
#define CONFIG_ENV_SIZE (4 * 1024)
/*
* Serial console configuration
......@@ -141,6 +141,13 @@
#define CONFIG_BAUDRATE 115200
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
/*
* Ethernet
*/
#define CONFIG_NET_MULTI
#define CONFIG_STM32F2_ETH
#define CONFIG_SYS_RX_ETH_BUFFER 4 /* 4 rx buffer */
/*
* Console I/O buffer size
*/
......@@ -187,7 +194,8 @@
#undef CONFIG_CMD_IMLS
#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_MISC
#undef CONFIG_CMD_NET
#define CONFIG_CMD_PING
#define CONFIG_CMD_NET
#undef CONFIG_CMD_NFS
#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_XIMG
......@@ -216,7 +224,8 @@
* Short-cuts to some useful commands (macros)
*/
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=60000000\0" \
/* FIXME: load to external RAM */ \
"loadaddr=0x20008000\0" \
"addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off\0" \
"ethaddr=C0:B1:3C:88:88:88\0" \
"ipaddr=172.17.4.206\0" \
......
......@@ -86,6 +86,7 @@ int uli526x_initialize(bd_t *bis);
int sh_eth_initialize(bd_t *bis);
int dm9000_initialize(bd_t *bis);
int core_eth_init(bd_t *bis);
int stm32f2_eth_init(bd_t *bis);
/* Boards with PCI network controllers can call this from their board_eth_init()
* function to initialize whatever's on board.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment