diff options
author | Tom Rini <trini@konsulko.com> | 2021-09-27 07:41:03 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-27 07:41:03 -0400 |
commit | 78c16a969f70e0b50cf6a73848082787445f49f5 (patch) | |
tree | 4673d9f09439eb6b228d337162c01e0eb86196c8 | |
parent | 76ad0246834e2c57974b3a472fdc7c5584964caa (diff) | |
parent | ccee8ea1dd90f0ccb31ed9662e064eaa814e6254 (diff) | |
download | u-boot-78c16a969f70e0b50cf6a73848082787445f49f5.zip u-boot-78c16a969f70e0b50cf6a73848082787445f49f5.tar.gz u-boot-78c16a969f70e0b50cf6a73848082787445f49f5.tar.bz2 |
Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/27Sep2021
- turris_omnia: fix leaked mtd device (Marek)
- phy: marvell: cp110: Fix SATA invert polarity (Denis)
-rw-r--r-- | board/CZ.NIC/turris_omnia/turris_omnia.c | 3 | ||||
-rw-r--r-- | drivers/phy/marvell/comphy_cp110.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index bac78af..a48e1f5 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -647,10 +647,13 @@ int ft_board_setup(void *blob, struct bd_info *bd) if (!fixup_mtd_partitions(blob, node, mtd)) goto fail; + put_mtd_device(mtd); return 0; fail: printf("Failed fixing SPI NOR partitions!\n"); + if (!IS_ERR_OR_NULL(mtd)) + put_mtd_device(mtd); return 0; } #endif diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c index 418318d..4fe2dfc 100644 --- a/drivers/phy/marvell/comphy_cp110.c +++ b/drivers/phy/marvell/comphy_cp110.c @@ -36,6 +36,10 @@ DECLARE_GLOBAL_DATA_PTR; (COMPHY_CALLER_UBOOT | ((pcie_width) << 18) | \ ((clk_src) << 17) | COMPHY_FW_FORMAT(mode, 0, speeds)) +/* Invert polarity are bits 1-0 of the mode */ +#define COMPHY_FW_SATA_FORMAT(mode, invert) \ + ((invert) | COMPHY_FW_MODE_FORMAT(mode)) + #define COMPHY_SATA_MODE 0x1 #define COMPHY_SGMII_MODE 0x2 /* SGMII 1G */ #define COMPHY_HS_SGMII_MODE 0x3 /* SGMII 2.5G */ @@ -607,7 +611,8 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg, break; case COMPHY_TYPE_SATA0: case COMPHY_TYPE_SATA1: - mode = COMPHY_FW_MODE_FORMAT(COMPHY_SATA_MODE); + mode = COMPHY_FW_SATA_FORMAT(COMPHY_SATA_MODE, + serdes_map[lane].invert); ret = comphy_sata_power_up(lane, hpipe_base_addr, comphy_base_addr, ptr_chip_cfg->cp_index, |