| .. | .. |
|---|
| 166 | 166 | * It's impossible all 4 fixed phase won't be able to work. |
|---|
| 167 | 167 | */ |
|---|
| 168 | 168 | for (i = 0; i < ARRAY_SIZE(degrees); i++) { |
|---|
| 169 | | - degree = degrees[i] + priv->last_degree; |
|---|
| 169 | + degree = degrees[i] + priv->last_degree + 90; |
|---|
| 170 | 170 | degree = degree % 360; |
|---|
| 171 | 171 | clk_set_phase(priv->sample_clk, degree); |
|---|
| 172 | 172 | if (!mmc_send_tuning(mmc, opcode, NULL)) |
|---|
| .. | .. |
|---|
| 174 | 174 | } |
|---|
| 175 | 175 | |
|---|
| 176 | 176 | if (i == ARRAY_SIZE(degrees)) { |
|---|
| 177 | | - dev_warn(host->dev, "All phases bad!"); |
|---|
| 177 | + dev_warn(host->dev, "V2 All phases bad!"); |
|---|
| 178 | 178 | return -EIO; |
|---|
| 179 | 179 | } |
|---|
| 180 | 180 | |
|---|
| 181 | 181 | done: |
|---|
| 182 | | - dev_info(host->dev, "Successfully tuned phase to %d\n", degrees[i]); |
|---|
| 182 | + dev_info(host->dev, "Successfully tuned phase to %d\n", degree); |
|---|
| 183 | 183 | priv->last_degree = degree; |
|---|
| 184 | 184 | return 0; |
|---|
| 185 | 185 | } |
|---|
| .. | .. |
|---|
| 208 | 208 | } |
|---|
| 209 | 209 | |
|---|
| 210 | 210 | if (priv->use_v2_tuning) { |
|---|
| 211 | | - ret = dw_mci_v2_execute_tuning(slot, opcode); |
|---|
| 212 | | - if (!ret) |
|---|
| 211 | + if (!dw_mci_v2_execute_tuning(slot, opcode)) |
|---|
| 213 | 212 | return 0; |
|---|
| 214 | 213 | /* Otherwise we continue using fine tuning */ |
|---|
| 215 | 214 | } |
|---|
| .. | .. |
|---|
| 448 | 447 | if (!pdev->dev.of_node) |
|---|
| 449 | 448 | return -ENODEV; |
|---|
| 450 | 449 | |
|---|
| 451 | | - if (!device_property_read_bool(&pdev->dev, "non-removable") && |
|---|
| 452 | | - !device_property_read_bool(&pdev->dev, "cd-gpios")) |
|---|
| 450 | + if ((!device_property_read_bool(&pdev->dev, "non-removable") && |
|---|
| 451 | + !device_property_read_bool(&pdev->dev, "cd-gpios")) || |
|---|
| 452 | + (device_property_read_bool(&pdev->dev, "no-sd") && |
|---|
| 453 | + device_property_read_bool(&pdev->dev, "no-mmc"))) |
|---|
| 453 | 454 | use_rpm = false; |
|---|
| 454 | 455 | |
|---|
| 455 | 456 | match = of_match_node(dw_mci_rockchip_match, pdev->dev.of_node); |
|---|