diff options
author | Faiz Abbas <faiz_abbas@ti.com> | 2019-03-18 13:54:37 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-04-12 08:05:54 -0400 |
commit | 0229c9330d2b34141f77584de417136d5c8088fc (patch) | |
tree | e4b06518c07d0e918ba40c43ce6836d52f69699a /board/ti/am335x | |
parent | 8a616cc292cd3e31efdbbdd63a72386cef0be833 (diff) | |
download | u-boot-0229c9330d2b34141f77584de417136d5c8088fc.zip u-boot-0229c9330d2b34141f77584de417136d5c8088fc.tar.gz u-boot-0229c9330d2b34141f77584de417136d5c8088fc.tar.bz2 |
board: ti: am335x: Add platdata for cpsw in SPL
The SPL image overflows when cpsw dt nodes are added and SPL_OF_CONTROL
is enabled. Use static platdata instead to save space.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Diffstat (limited to 'board/ti/am335x')
-rw-r--r-- | board/ti/am335x/board.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index d67f94a..b811fb0 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -875,6 +875,55 @@ int board_late_init(void) } #endif +/* CPSW platdata */ +#if !CONFIG_IS_ENABLED(OF_CONTROL) +struct cpsw_slave_data slave_data[] = { + { + .slave_reg_ofs = CPSW_SLAVE0_OFFSET, + .sliver_reg_ofs = CPSW_SLIVER0_OFFSET, + .phy_addr = 0, + }, + { + .slave_reg_ofs = CPSW_SLAVE1_OFFSET, + .sliver_reg_ofs = CPSW_SLIVER1_OFFSET, + .phy_addr = 1, + }, +}; + +struct cpsw_platform_data am335_eth_data = { + .cpsw_base = CPSW_BASE, + .version = CPSW_CTRL_VERSION_2, + .bd_ram_ofs = CPSW_BD_OFFSET, + .ale_reg_ofs = CPSW_ALE_OFFSET, + .cpdma_reg_ofs = CPSW_CPDMA_OFFSET, + .mdio_div = CPSW_MDIO_DIV, + .host_port_reg_ofs = CPSW_HOST_PORT_OFFSET, + .channels = 8, + .slaves = 2, + .slave_data = slave_data, + .ale_entries = 1024, + .bd_ram_ofs = 0x2000, + .mac_control = 0x20, + .active_slave = 0, + .mdio_base = 0x4a101000, + .gmii_sel = 0x44e10650, + .phy_sel_compat = "ti,am3352-cpsw-phy-sel", + .syscon_addr = 0x44e10630, + .macid_sel_compat = "cpsw,am33xx", +}; + +struct eth_pdata cpsw_pdata = { + .iobase = 0x4a100000, + .phy_interface = 0, + .priv_pdata = &am335_eth_data, +}; + +U_BOOT_DEVICE(am335x_eth) = { + .name = "eth_cpsw", + .platdata = &cpsw_pdata, +}; +#endif + #ifndef CONFIG_DM_ETH #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \ |