hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/ata/pata_of_platform.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * OF-platform PATA driver
34 *
45 * Copyright (c) 2007 MontaVista Software, Inc.
56 * 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.
107 */
118
129 #include <linux/kernel.h>
....@@ -32,6 +29,7 @@
3229 unsigned int reg_shift = 0;
3330 int pio_mode = 0;
3431 int pio_mask;
32
+ bool use16bit;
3533
3634 ret = of_address_to_resource(dn, 0, &io_res);
3735 if (ret) {
....@@ -60,11 +58,14 @@
6058 dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
6159 }
6260
61
+ use16bit = of_property_read_bool(dn, "ata-generic,use16bit");
62
+
6363 pio_mask = 1 << pio_mode;
6464 pio_mask |= (1 << pio_mode) - 1;
6565
6666 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);
6869 }
6970
7071 static const struct of_device_id pata_of_platform_match[] = {