summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_of_platform.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-07ata: Drop commas after OF match table sentinelsGeert Uytterhoeven1-1/+1
It does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. Add comments to clarify the purpose of the empty elements. Rewrap entries to a single line to have a consistent style. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Acked-by: Florian Fainelli <f.fainelli@gmail.com> [ahci_brcm] Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
2022-01-14ata: pata_of_platform: Use platform_get_irq_optional() to get the interruptLad Prabhakar1-3/+12
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq_optional(). Note the code does not set the IRQ flags as this is handled automatically for DT. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-08ata: pata_of_platform: Allow to use 16-bit wide data transferAlexander Shiyan1-1/+5
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. Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-03-06ata: constify of_device_id structuresBhumika Goyal1-1/+1
Declare of_device_id structures as const as they are either passed to the macro MODULE_DEVICE_TABLE or stored in the of_match_table field of a device_driver structure. This field is of type const, so of_device_id structures having this property can be made const too. Cross compiled the files drivers/ata/pata_macio.c and drivers/ata/pata_mpc52xx.c for powerpc architecture. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-01-24ata: pata_of_platform: using of_property_read_u32() helperKefeng Wang1-7/+2
Using better of_property_read_u32() than generic of_get_property(). Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-01-28ata: pata_platform: fix owner module reference mismatch for scsi hostAkinobu Mita1-2/+8
The owner module reference of the pata_of_platform's scsi_host is initialized to pata_platform's one, because pata_of_platform driver use a scsi_host_template defined in pata_platform. So this drivers can be unloaded even if the scsi device is being accessed. This fixes it by propagating the scsi_host_template to pata_of_platform driver. The scsi_host_template is passed through a new argument of __pata_platform_probe(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-ide@vger.kernel.org Cc: linux-scsi@vger.kernel.org
2014-10-20ata: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-08-23pata_platform: Remove useless irq_flags fieldAlexander Shiyan1-2/+0
IRQ flags can be obtained from resource structure, there are no need to use additional field in the platform_data to store these values. This patch removes this field and convert existing users of this driver to use IRQ flags from the resources. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-08-23pata_of_platform: Remove "electra-ide" quirkAlexander Shiyan1-16/+6
"electra-ide" is not used anywhere in the kernel and could be represented in devicetree in a normal way. This patch removes specific quirk for "electra-ide". Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Tejun Heo <tj@kernel.org>
2013-01-03Drivers: ata: remove __dev* attributes.Greg Kroah-Hartman1-1/+1
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Viresh Kumar <viresh.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03pata_of_platform: fix compile errorBrian Norris1-0/+1
I failed to include <linux/libata.h>, causing this error: drivers/ata/pata_of_platform.c:93: error: 'ata_platform_remove_one' undeclared here (not in a function) Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-12-03pata_of_platform: utilize common ata_platform_remove_one()Brian Norris1-6/+1
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-08pata_of_platform: remove direct dependency on OF_IRQRob Herring1-9/+6
CONFIG_OF_IRQ is not available on some platforms and using of_irq_* breaks the build. Since resources are already populated in the platform device, get the irq from there instead. Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-08SATA/PATA: convert drivers/ata/* to use module_platform_driver()Axel Lin1-11/+1
This patch converts the drivers in drivers/ata/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Viresh Kumar <viresh.kumar@st.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Sylvain Munaut <tnt@246tNt.com> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Florian Fainelli <florian@openwrt.org> Cc: Mark Miesfeld <mmiesfeld@amcc.com> Cc: Ashish Kalra <ashish.kalra@freescale.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-10pata_of_platform: Don't use NO_IRQAnton Vorontsov1-1/+1
Drivers should not use NO_IRQ; moreover, some architectures don't have it nowadays. '0' is the 'no irq' case. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-10-08ata: Make pata_of_platform.c compile again and work on non-PPC platformsPawel Moll1-2/+4
This patch adds missing #includes, makes the driver selectable on non-PPC OF-enabled platforms and fixes property value accesses to be correct in Little Endian system. Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-02-28dt: Eliminate of_platform_{,un}register_driverGrant Likely1-5/+4
Final step to eliminate of_platform_bus_type. They're all just platform drivers now. v2: fix type in pasemi_nand.c (thanks to Stephen Rothwell) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-06of/device: Replace struct of_device with struct platform_deviceGrant Likely1-2/+2
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
2010-05-22of: Remove duplicate fields from of_platform_driverGrant Likely1-2/+5
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com>
2010-05-18of: Always use 'struct device.of_node' to get device node pointer.Grant Likely1-1/+1
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-10-10powerpc: Fix no interrupt handling in pata_of_platformAnton Vorontsov1-1/+1
When no interrupt is specified the pata_of_platform fills the irq_res resource with -1, which is wrong to do for two reasons: 1. By definition, 'no irq' should be IRQ 0, not some negative integer; 2. pata_platform checks for irq_res.start > 0, but since irq_res.start is unsigned type, the check will be true for `-1'. Reported-by: Steven A. Falco <sfalco@harris.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-02-06Rename: linux/pata_platform.h to linux/ata_platform.hJeff Garzik1-1/+1
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-15[POWERPC] pasemi: Move electra-ide to pata_of_platformOlof Johansson1-5/+15
Move electra-ide glue over to the new pata_of_platform framework, and add the quirks needed to that driver. Signed-off-by: Olof Johansson <olof@lixom.net>
2008-01-15libata: pata_of_platform: OF-Platform PATA device driverAnton Vorontsov1-0/+104
This driver nicely wraps around pata_platform library functions, and provides OF platform bus bindings to the PATA devices. Also add || PPC to the PATA_PLATFORM's "depends on" Kconfig entry, needed for PA Semi Electra. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Olof Johansson <olof@lixom.net>