.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * OF-platform PATA driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2007 MontaVista Software, Inc. |
---|
5 | 6 | * Anton Vorontsov <avorontsov@ru.mvista.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License (Version 2) as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #include <linux/kernel.h> |
---|
.. | .. |
---|
32 | 29 | unsigned int reg_shift = 0; |
---|
33 | 30 | int pio_mode = 0; |
---|
34 | 31 | int pio_mask; |
---|
| 32 | + bool use16bit; |
---|
35 | 33 | |
---|
36 | 34 | ret = of_address_to_resource(dn, 0, &io_res); |
---|
37 | 35 | if (ret) { |
---|
.. | .. |
---|
60 | 58 | dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n"); |
---|
61 | 59 | } |
---|
62 | 60 | |
---|
| 61 | + use16bit = of_property_read_bool(dn, "ata-generic,use16bit"); |
---|
| 62 | + |
---|
63 | 63 | pio_mask = 1 << pio_mode; |
---|
64 | 64 | pio_mask |= (1 << pio_mode) - 1; |
---|
65 | 65 | |
---|
66 | 66 | return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, irq_res, |
---|
67 | | - reg_shift, pio_mask, &pata_platform_sht); |
---|
| 67 | + reg_shift, pio_mask, &pata_platform_sht, |
---|
| 68 | + use16bit); |
---|
68 | 69 | } |
---|
69 | 70 | |
---|
70 | 71 | static const struct of_device_id pata_of_platform_match[] = { |
---|