| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 5 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 6 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 9 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 10 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 11 | | - * more details. |
|---|
| 12 | 4 | */ |
|---|
| 13 | 5 | |
|---|
| 14 | 6 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 131 | 123 | unsigned *num_pins) |
|---|
| 132 | 124 | { |
|---|
| 133 | 125 | /* |
|---|
| 134 | | - * For the tegra-xusb pad controller groups are synonomous |
|---|
| 126 | + * For the tegra-xusb pad controller groups are synonymous |
|---|
| 135 | 127 | * with lanes/pins and there is always one lane/pin per group. |
|---|
| 136 | 128 | */ |
|---|
| 137 | 129 | *pins = &pinctrl->desc->pins[group].number; |
|---|
| .. | .. |
|---|
| 881 | 873 | { |
|---|
| 882 | 874 | struct tegra_xusb_padctl *padctl; |
|---|
| 883 | 875 | const struct of_device_id *match; |
|---|
| 884 | | - struct resource *res; |
|---|
| 885 | 876 | struct phy *phy; |
|---|
| 886 | 877 | int err; |
|---|
| 887 | 878 | |
|---|
| .. | .. |
|---|
| 893 | 884 | mutex_init(&padctl->lock); |
|---|
| 894 | 885 | padctl->dev = &pdev->dev; |
|---|
| 895 | 886 | |
|---|
| 887 | + /* |
|---|
| 888 | + * Note that we can't replace this by of_device_get_match_data() |
|---|
| 889 | + * because we need the separate matching table for this legacy code on |
|---|
| 890 | + * Tegra124. of_device_get_match_data() would attempt to use the table |
|---|
| 891 | + * from the updated driver and fail. |
|---|
| 892 | + */ |
|---|
| 896 | 893 | match = of_match_node(tegra_xusb_padctl_of_match, pdev->dev.of_node); |
|---|
| 897 | 894 | padctl->soc = match->data; |
|---|
| 898 | 895 | |
|---|
| 899 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 900 | | - padctl->regs = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 896 | + padctl->regs = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 901 | 897 | if (IS_ERR(padctl->regs)) |
|---|
| 902 | 898 | return PTR_ERR(padctl->regs); |
|---|
| 903 | 899 | |
|---|