#define POWER_DOWN_DELAY_US_MIN 10
#define POWER_DOWN_DELAY_US_MAX 11
-/* Define the assumed distance between lanes for underspecified device trees. */
-#define QMP_PHY_LEGACY_LANE_STRIDE 0x400
-
struct qmp_phy_init_tbl {
unsigned int offset;
unsigned int val;
if (cfg->pcs_usb_offset)
qphy->pcs_usb = qphy->pcs + cfg->pcs_usb_offset;
- /*
- * If this is a dual-lane PHY, then there should be registers for the
- * second lane. Some old device trees did not specify this, so fall
- * back to old legacy behavior of assuming they can be reached at an
- * offset from the first lane.
- */
if (cfg->is_dual_lane_phy) {
qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
- qphy->rx2 = devm_of_iomap(dev, np, 4, NULL);
- if (IS_ERR(qphy->tx2) || IS_ERR(qphy->rx2)) {
- dev_warn(dev,
- "Underspecified device tree, falling back to legacy register regions\n");
+ if (IS_ERR(qphy->tx2))
+ return PTR_ERR(qphy->tx2);
- /* In the old version, pcs_misc is at index 3. */
- qphy->pcs_misc = qphy->tx2;
- qphy->tx2 = qphy->tx + QMP_PHY_LEGACY_LANE_STRIDE;
- qphy->rx2 = qphy->rx + QMP_PHY_LEGACY_LANE_STRIDE;
-
- } else {
- qphy->pcs_misc = devm_of_iomap(dev, np, 5, NULL);
- }
+ qphy->rx2 = devm_of_iomap(dev, np, 4, NULL);
+ if (IS_ERR(qphy->rx2))
+ return PTR_ERR(qphy->rx2);
+ qphy->pcs_misc = devm_of_iomap(dev, np, 5, NULL);
} else {
qphy->pcs_misc = devm_of_iomap(dev, np, 3, NULL);
}