Re: [PATCH 1/2] ata: pata_of_platform: Allow to use 16-bit wide data transfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 01/19/2019 05:52 AM, Alexander Shiyan wrote:
> In some cases, the system bus can be configured for 16-bit mode,
> in this case using read/write functions for 32-bit values
> results in two cycles of 16 bits each, which is wrong.
> This patch adds the devicetree flag to switch the driver to
> use 16-bit mode for I/O transfers.

I assume that you plan to submit devicetree changes for platforms
that need this flag later?

> Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
> ---
>  drivers/ata/pata_of_platform.c |  6 +++++-
>  drivers/ata/pata_platform.c    | 22 ++++++++++++----------
>  include/linux/ata_platform.h   |  3 ++-
>  3 files changed, 19 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
> index 01161c1..7a0b175 100644
> --- a/drivers/ata/pata_of_platform.c
> +++ b/drivers/ata/pata_of_platform.c
> @@ -32,6 +32,7 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
>  	unsigned int reg_shift = 0;
>  	int pio_mode = 0;
>  	int pio_mask;
> +	bool use16bit;
>  
>  	ret = of_address_to_resource(dn, 0, &io_res);
>  	if (ret) {
> @@ -60,11 +61,14 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
>  		dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
>  	}
>  
> +	use16bit = of_property_read_bool(dn, "ata-generic,use16bit");

While you are at it could you also add

	Documentation/devicetree/bindings/ata/pata-of-platform.txt

and document all ata-generic bindings there?

Anyway the patch looks fine to me:

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux