From 544acb07ecebc096c9449e675481ba280311fb0b Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Fri, 23 Oct 2015 17:53:19 +0000 Subject: arm: mvebu: a38x: Remove unsupported topologies A lot of extra configuration information was left over in the Marvell serdes and DDR3 initialization code for boards that U-boot does not support. Remove this extra config information, and the concept of fixing up board topologies with information loaded from an EEPROM. If this needs to be done, it should be handled in the board file, not in core code. Signed-off-by: Kevin Smith Acked-by: Stefan Roese Cc: Dirk Eibach Cc: Luka Perkov --- board/Marvell/db-88f6820-gp/db-88f6820-gp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'board') diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c index 84ca55c..384d002 100644 --- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c +++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c @@ -13,6 +13,7 @@ #include #include "../drivers/ddr/marvell/a38x/ddr3_a38x_topology.h" +#include <../serdes/a38x/high_speed_env_spec.h> DECLARE_GLOBAL_DATA_PTR; @@ -55,6 +56,21 @@ static struct marvell_io_exp io_exp[] = { { 0x21, 3, 0xC0 } /* Output Data, register#1 */ }; +static struct serdes_map board_serdes_map[] = { + {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0}, + {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0}, + {SATA1, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0}, + {SATA3, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0}, + {SATA2, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0}, + {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0} +}; + +int hws_board_topology_load(struct serdes_map *serdes_map_array) +{ + memcpy(serdes_map_array, board_serdes_map, sizeof(board_serdes_map)); + return 0; +} + /* * Define the DDR layout / topology here in the board file. This will * be used by the DDR3 init code in the SPL U-Boot version to configure -- cgit v1.1 From 490753ace38c436f05b02a827bfe9b0ace44990a Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Fri, 23 Oct 2015 17:53:19 +0000 Subject: arm: mvebu: a38x: serdes specification cleanup Instead of allocating space in the driver for the serdes specification table, just allow the board file to set a pointer to it. Also, allow the board to only specify the lanes that are used instead of including unused lanes. Signed-off-by: Kevin Smith Acked-by: Stefan Roese Cc: Dirk Eibach Cc: Luka Perkov --- board/Marvell/db-88f6820-gp/db-88f6820-gp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c index 384d002..e700781 100644 --- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c +++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c @@ -65,9 +65,10 @@ static struct serdes_map board_serdes_map[] = { {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0} }; -int hws_board_topology_load(struct serdes_map *serdes_map_array) +int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) { - memcpy(serdes_map_array, board_serdes_map, sizeof(board_serdes_map)); + *serdes_map_array = board_serdes_map; + *count = ARRAY_SIZE(board_serdes_map); return 0; } -- cgit v1.1