* Re: [PATCH v6 05/14] ARM: davinci: da850: add con_id for the SATA clock
From: Sekhar Nori @ 2017-01-26 17:40 UTC (permalink / raw)
To: Grygorii Strashko, Bartosz Golaszewski, Kevin Hilman,
Patrick Titiano, Michael Turquette, Tejun Heo, Rob Herring,
Mark Rutland, Russell King, David Lechner
Cc: linux-ide, linux-kernel, linux-arm-kernel, devicetree
In-Reply-To: <93a3bbb3-2d9f-bc38-c7b4-5eb3325d985d@ti.com>
On Thursday 26 January 2017 10:26 PM, Grygorii Strashko wrote:
>
>
> On 01/23/2017 11:00 AM, Bartosz Golaszewski wrote:
>> The ahci-da850 SATA driver is now capable of retrieving clocks by
>> con_id. Add the connection id for the sysclk2-derived SATA clock.
>>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>> ---
>> arch/arm/mach-davinci/da850.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
>> index 1d873d1..dbf1daa 100644
>> --- a/arch/arm/mach-davinci/da850.c
>> +++ b/arch/arm/mach-davinci/da850.c
>> @@ -571,7 +571,7 @@ static struct clk_lookup da850_clks[] = {
>> CLK("spi_davinci.0", NULL, &spi0_clk),
>> CLK("spi_davinci.1", NULL, &spi1_clk),
>> CLK("vpif", NULL, &vpif_clk),
>> - CLK("ahci_da850", NULL, &sata_clk),
>> + CLK("ahci_da850", "sata", &sata_clk),
>
> I'm worry a bit - wouldn't this cause future problems with PM runtime
> (if it will be the case)?
>
> If this is functional clock - shouldn't it be "fck" to
> follow PM domain con_id list for davinci? (arch/arm/mach-davinci/pm_domain.c)
I agree with Grygorii. Calling this clock "fck" will make it easy to
convert the DA850 AHCI driver to use pm_runtime at a future date (no
mach-davinci changes should be needed).
Sorry about not spotting this earlier.
Thanks,
Sekhar
^ permalink raw reply
* Re: [PATCH 0/3] ata: add m68k/Atari Falcon PATA support
From: Finn Thain @ 2017-01-27 1:41 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Michael Schmitz, Bartlomiej Zolnierkiewicz, Tejun Heo,
linux-ide@vger.kernel.org, Linux/m68k, Linux Kernel Development,
Andreas Schwab
In-Reply-To: <CAMuHMdW9CgZNdq9rDY4EgJNXEzxSLZESqnSRHEU_Zy2u4hon1A@mail.gmail.com>
On Thu, 26 Jan 2017, Geert Uytterhoeven wrote:
> Hi Finn,
>
> On Thu, Jan 26, 2017 at 9:47 AM, Finn Thain <fthain@telegraphics.com.au>
> wrote:
> > The difficulty will be arranging for disabled FDC & IDE interrupt
> > sources during SCSI DMA, and disabled SCSI & IDE interrupt sources
> > during FDC DMA. (Not all 5380 interrupts can be disabled; no idea
> > about the IDE device or WD1772 FDC.)
>
> IDE interrupts are disabled at the device level. Unfortunately some hard
> drives (e.g. Western Digital Caviar) didn't honour the ATA disable IRQ
> bit, so they caused an interrupt deadlock if you probed for them on
> Amiga with the IDE interrupt enabled. The problem didn't show up on PC
> because they had no shared interrupts, while on A4000 the IDE interrupt
> is shared with Zorro Ethernet, which was still enabled.
>
> That was fixed (in 1995 or 1996?) by disabling the IDE interrupt at the
> IRQ controller level.
>
As I undersand it, masking these interrupts at the IRQ controller level
won't work because these interrupt sources are all logically-OR'd together
to generate the input that is to be polled during DMA. (And accessing the
individual device registers is impossible during DMA!)
Anyway, the end result is that both IDE and SCSI have the potential to
(occasionally) mess up the DMA polling during and FDC or SCSI transfer.
For SCSI, I believe that we can detect this when it happens (by checking
the sector count registers in the DMA chip) and return the SCSI command
with an error result, so that the mid-layer will retry it.
I don't know how it would be handled in the case of an FDC transfer but I
presume that a similar mechanism is available in the block layer.
--
> Gr{oetje,eeting}s,
>
> Geert
>
^ permalink raw reply
* Re: [PATCH] pata_legacy: Allow disabling of legacy PATA device probes on non-PCI systems
From: tedheadster @ 2017-01-27 3:01 UTC (permalink / raw)
To: Tejun Heo
Cc: Gwendal Grignou, One Thousand Gnomes, Greg Kroah-Hartman,
Sergei Shtylyov, IDE/ATA development list
In-Reply-To: <20170124161937.GE12281@htj.duckdns.org>
Tejun and Gwendal,
here is the patched output:
[ 39.991201] pata_legacy: unknown parameter 'ignore_ports' ignored
[ 40.046194] XXX kobject_get(pata_legacy.0): ref=3++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 40.053193] XXX kobject_get(ata1): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tport_add)
[ 40.055348] XXX kobject_get(ata1): ref=2++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 40.061192] XXX kobject_get(pata_legacy.0): ref=4++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 40.062719] XXX kobject_get(pata_legacy.0): ref=5++
(kobject_add:device_add:ata_tport_add)
[ 40.072187] XXX kobject_get(ata1): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 40.073713] XXX kobject_put(ata1): ref=4--
(ata_tport_add:ata_host_register:ata_host_activate)
[ 40.077187] XXX kobject_get(ata1): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 40.079618] XXX kobject_get(ata1): ref=4++
(kobject_add:get_device_parent:device_add)
[ 40.101187] XXX kobject_get(ata1): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.103143] XXX kobject_get(link1): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 40.108187] XXX kobject_get(link1): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.109736] XXX kobject_get(ata1): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.111386] XXX kobject_get(ata1): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 40.124186] XXX kobject_get(link1): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 40.126633] XXX kobject_put(link1): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.132182] XXX kobject_get(link1): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 40.134662] XXX kobject_get(link1): ref=4++
(kobject_add:get_device_parent:device_add)
[ 40.149183] XXX kobject_get(link1): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.151480] XXX kobject_get(dev1.0): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 40.158178] XXX kobject_get(dev1.0): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.159613] XXX kobject_get(link1): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.161235] XXX kobject_get(link1): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 40.168177] XXX kobject_get(dev1.0): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 40.170398] XXX kobject_put(dev1.0): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.176178] XXX kobject_get(dev1.0): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 40.178417] XXX kobject_get(dev1.0): ref=4++
(kobject_add:get_device_parent:device_add)
[ 40.199176] XXX kobject_get(link1): ref=8++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.201542] XXX kobject_get(dev1.1): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 40.206171] XXX kobject_get(dev1.1): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.212164] XXX kobject_get(link1): ref=9++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.213618] XXX kobject_get(link1): ref=10++
(kobject_add:device_add:ata_tlink_add)
[ 40.220168] XXX kobject_get(dev1.1): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 40.222323] XXX kobject_put(dev1.1): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 40.227163] XXX kobject_get(dev1.1): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 40.229391] XXX kobject_get(dev1.1): ref=4++
(kobject_add:get_device_parent:device_add)
[ 40.255170] scsi host0: pata_legacy
[ 40.257165] XXX kobject_get(ata1): ref=8++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 40.259517] XXX kobject_get(ata1): ref=9++
(kobject_add:device_add:scsi_add_host_with_dma)
[ 40.274162] XXX kobject_get(ata1): ref=10++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 40.302150] ata1: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14
[ 40.463135] ata1.00: ATA-4: QUANTUM FIREBALL CR8.4A, A5U.1200, max UDMA/66
[ 40.464335] ata1.00: 16514064 sectors, multi 0: LBA
[ 40.465312] ata1.00: configured for PIO
[ 40.490131] scsi 0:0:0:0: Direct-Access ATA QUANTUM
FIREBALL 1200 PQ: 0 ANSI: 5
[ 40.573144] sd 0:0:0:0: [sda] 16514064 512-byte logical blocks:
(8.46 GB/7.87 GiB)
[ 40.589111] sd 0:0:0:0: [sda] Write Protect is off
[ 40.590325] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 40.602112] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 40.607107] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 40.768078] sda: sda1 sda2 sda3 sda4
[ 40.971053] sd 0:0:0:0: [sda] Attached SCSI disk
[ 41.049044] XXX kobject_get(pata_legacy.1): ref=3++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 41.076039] XXX kobject_get(ata2): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tport_add)
[ 41.094037] XXX kobject_get(ata2): ref=2++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 41.112037] XXX kobject_get(pata_legacy.1): ref=4++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 41.114184] XXX kobject_get(pata_legacy.1): ref=5++
(kobject_add:device_add:ata_tport_add)
[ 41.172020] XXX kobject_get(ata2): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 41.174175] XXX kobject_put(ata2): ref=4--
(ata_tport_add:ata_host_register:ata_host_activate)
[ 41.198017] XXX kobject_get(ata2): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 41.212022] XXX kobject_get(ata2): ref=4++
(kobject_add:get_device_parent:device_add)
[ 41.257012] XXX kobject_get(ata2): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.270036] XXX kobject_get(link2): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 41.284089] XXX kobject_get(link2): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.291005] XXX kobject_get(ata2): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.293024] XXX kobject_get(ata2): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 41.309004] XXX kobject_get(link2): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 41.311453] XXX kobject_put(link2): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.326995] XXX kobject_get(link2): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 41.333998] XXX kobject_get(link2): ref=4++
(kobject_add:get_device_parent:device_add)
[ 41.364989] XXX kobject_get(link2): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.370994] XXX kobject_get(dev2.0): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 41.381992] XXX kobject_get(dev2.0): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.383603] XXX kobject_get(link2): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.385239] XXX kobject_get(link2): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 41.402993] XXX kobject_get(dev2.0): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 41.405381] XXX kobject_put(dev2.0): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.416984] XXX kobject_get(dev2.0): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 41.423992] XXX kobject_get(dev2.0): ref=4++
(kobject_add:get_device_parent:device_add)
[ 41.454981] XXX kobject_get(link2): ref=8++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.465976] XXX kobject_get(dev2.1): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 41.476971] XXX kobject_get(dev2.1): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.478472] XXX kobject_get(link2): ref=9++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.480093] XXX kobject_get(link2): ref=10++
(kobject_add:device_add:ata_tlink_add)
[ 41.501976] XXX kobject_get(dev2.1): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 41.504329] XXX kobject_put(dev2.1): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 41.519969] XXX kobject_get(dev2.1): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 41.527970] XXX kobject_get(dev2.1): ref=4++
(kobject_add:get_device_parent:device_add)
[ 41.569968] scsi host1: pata_legacy
[ 41.575957] XXX kobject_get(ata2): ref=8++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 41.577985] XXX kobject_get(ata2): ref=9++
(kobject_add:device_add:scsi_add_host_with_dma)
[ 41.611960] XXX kobject_get(ata2): ref=10++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 41.649951] ata2: PATA max PIO4 cmd 0x170 ctl 0x376 irq 15
[ 41.881913] XXX kobject_put(ata2): ref=11--
(device_del:scsi_remove_host:ata_host_detach)
[ 41.883945] XXX kobject_put(ata2): ref=10--
(scsi_remove_host:ata_host_detach:legacy_init [pata_legacy])
[ 41.951907] XXX kobject_put(dev2.0): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 41.953908] XXX kobject_put(dev2.0): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 41.971902] XXX kobject_put(dev2.0): ref=3-- (klist_put:klist_del:device_del)
[ 41.977899] XXX kobject_put(link2): ref=11--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 41.979885] XXX kobject_put(link2): ref=10--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 41.985899] XXX kobject_put(dev2.0): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 41.987926] XXX kobject_put(dev2.0): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 41.989276] XXX kobject_cleanup(dev2.0): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 41.991118] dev2.0: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 41.992454] dev2.0: XXX device_release: devres_release_all() done
[ 41.992853] XXX kobject_put(link2): ref=9--
(ata_tdev_release:device_release:kobject_cleanup)
[ 42.036899] XXX kobject_put(dev2.1): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 42.038501] XXX kobject_put(dev2.1): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 42.051895] XXX kobject_put(dev2.1): ref=3-- (klist_put:klist_del:device_del)
[ 42.057892] XXX kobject_put(link2): ref=8--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 42.060305] XXX kobject_put(link2): ref=7--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 42.069876] XXX kobject_put(dev2.1): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 42.071959] XXX kobject_put(dev2.1): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 42.073338] XXX kobject_cleanup(dev2.1): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 42.075102] dev2.1: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 42.076439] dev2.1: XXX device_release: devres_release_all() done
[ 42.076841] XXX kobject_put(link2): ref=6--
(ata_tdev_release:device_release:kobject_cleanup)
[ 42.125877] XXX kobject_put(link2): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 42.128309] XXX kobject_put(link2): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 42.141876] XXX kobject_put(link2): ref=3-- (klist_put:klist_del:device_del)
[ 42.147875] XXX kobject_put(ata2): ref=9--
(device_del:ata_tlink_delete:ata_tport_delete)
[ 42.149986] XXX kobject_put(ata2): ref=8--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 42.155874] XXX kobject_put(link2): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 42.158417] XXX kobject_put(link2): ref=1--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 42.160026] XXX kobject_cleanup(link2): rel=device_release
(put_device:ata_tlink_delete:ata_tport_delete)
[ 42.161461] link2: XXX device_release: drel=ata_tlink_release
trel= (null) cdrel= (null)
[ 42.163103] link2: XXX device_release: devres_release_all() done
[ 42.164063] XXX kobject_put(ata2): ref=7--
(ata_tlink_release:device_release:kobject_cleanup)
[ 42.207865] XXX kobject_put(ata2): ref=6--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 42.209822] XXX kobject_put(ata2): ref=5--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 42.216864] XXX kobject_put(ata2): ref=4-- (klist_put:klist_del:device_del)
[ 42.218177] XXX kobject_put(pata_legacy.1): ref=6--
(device_del:ata_tport_delete:ata_host_detach)
[ 42.220050] XXX kobject_put(pata_legacy.1): ref=5--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 42.229860] XXX kobject_put(ata2): ref=3--
(attribute_container_release:device_release:kobject_cleanup)
[ 42.231811] XXX kobject_put(ata2): ref=2--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 42.239860] XXX kobject_put(pata_legacy.1): ref=4--
(klist_put:klist_del:device_del)
[ 42.248860] XXX kobject_put(pata_legacy.1): ref=3--
(klist_devices_put:klist_put:klist_del)
[ 42.269858] XXX kobject_put(pata_legacy.1): ref=2--
(platform_device_unregister:legacy_init [pata_legacy]:do_one_initcall)
[ 42.320845] XXX kobject_get(pata_legacy.2): ref=3++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 42.328847] XXX kobject_get(ata3): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tport_add)
[ 42.341846] XXX kobject_get(ata3): ref=2++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 42.349845] XXX kobject_get(pata_legacy.2): ref=4++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 42.352101] XXX kobject_get(pata_legacy.2): ref=5++
(kobject_add:device_add:ata_tport_add)
[ 42.372838] XXX kobject_get(ata3): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 42.375229] XXX kobject_put(ata3): ref=4--
(ata_tport_add:ata_host_register:ata_host_activate)
[ 42.384853] XXX kobject_get(ata3): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 42.397823] XXX kobject_get(ata3): ref=4++
(kobject_add:get_device_parent:device_add)
[ 42.438832] XXX kobject_get(ata3): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.444829] XXX kobject_get(link3): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 42.453826] XXX kobject_get(link3): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.463827] XXX kobject_get(ata3): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.466036] XXX kobject_get(ata3): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 42.478824] XXX kobject_get(link3): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 42.481283] XXX kobject_put(link3): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.495823] XXX kobject_get(link3): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 42.503819] XXX kobject_get(link3): ref=4++
(kobject_add:get_device_parent:device_add)
[ 42.538815] XXX kobject_get(link3): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.545814] XXX kobject_get(dev3.0): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 42.552812] XXX kobject_get(dev3.0): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.554087] XXX kobject_get(link3): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.555430] XXX kobject_get(link3): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 42.568807] XXX kobject_get(dev3.0): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 42.570302] XXX kobject_put(dev3.0): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.585806] XXX kobject_get(dev3.0): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 42.598800] XXX kobject_get(dev3.0): ref=4++
(kobject_add:get_device_parent:device_add)
[ 42.623809] XXX kobject_get(link3): ref=8++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.639876] XXX kobject_get(dev3.1): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 42.646794] XXX kobject_get(dev3.1): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.648249] XXX kobject_get(link3): ref=9++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.649862] XXX kobject_get(link3): ref=10++
(kobject_add:device_add:ata_tlink_add)
[ 42.655797] XXX kobject_get(dev3.1): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 42.658043] XXX kobject_put(dev3.1): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 42.662792] XXX kobject_get(dev3.1): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 42.664844] XXX kobject_get(dev3.1): ref=4++
(kobject_add:get_device_parent:device_add)
[ 42.719788] scsi host2: pata_legacy
[ 42.721787] XXX kobject_get(ata3): ref=8++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 42.723406] XXX kobject_get(ata3): ref=9++
(kobject_add:device_add:scsi_add_host_with_dma)
[ 42.758793] XXX kobject_get(ata3): ref=10++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 42.790775] ata3: PATA max PIO4 cmd 0x1e8 ctl 0x3ee irq 11
[ 43.045774] XXX kobject_put(ata3): ref=11--
(device_del:scsi_remove_host:ata_host_detach)
[ 43.051965] XXX kobject_put(ata3): ref=10--
(scsi_remove_host:ata_host_detach:legacy_init [pata_legacy])
[ 43.157723] XXX kobject_put(dev3.0): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 43.160135] XXX kobject_put(dev3.0): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 43.187717] XXX kobject_put(dev3.0): ref=3-- (klist_put:klist_del:device_del)
[ 43.192724] XXX kobject_put(link3): ref=11--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 43.195158] XXX kobject_put(link3): ref=10--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 43.202721] XXX kobject_put(dev3.0): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 43.205150] XXX kobject_put(dev3.0): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 43.206846] XXX kobject_cleanup(dev3.0): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 43.208666] dev3.0: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 43.209974] dev3.0: XXX device_release: devres_release_all() done
[ 43.210942] XXX kobject_put(link3): ref=9--
(ata_tdev_release:device_release:kobject_cleanup)
[ 43.246712] XXX kobject_put(dev3.1): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 43.249147] XXX kobject_put(dev3.1): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 43.264709] XXX kobject_put(dev3.1): ref=3-- (klist_put:klist_del:device_del)
[ 43.270710] XXX kobject_put(link3): ref=8--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 43.273093] XXX kobject_put(link3): ref=7--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 43.281705] XXX kobject_put(dev3.1): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 43.283940] XXX kobject_put(dev3.1): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 43.285672] XXX kobject_cleanup(dev3.1): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 43.287247] dev3.1: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 43.288827] dev3.1: XXX device_release: devres_release_all() done
[ 43.289759] XXX kobject_put(link3): ref=6--
(ata_tdev_release:device_release:kobject_cleanup)
[ 43.332691] XXX kobject_put(link3): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 43.335064] XXX kobject_put(link3): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 43.354687] XXX kobject_put(link3): ref=3-- (klist_put:klist_del:device_del)
[ 43.359694] XXX kobject_put(ata3): ref=9--
(device_del:ata_tlink_delete:ata_tport_delete)
[ 43.362203] XXX kobject_put(ata3): ref=8--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 43.417679] XXX kobject_put(link3): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 43.419878] XXX kobject_put(link3): ref=1--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 43.421245] XXX kobject_cleanup(link3): rel=device_release
(put_device:ata_tlink_delete:ata_tport_delete)
[ 43.422985] link3: XXX device_release: drel=ata_tlink_release
trel= (null) cdrel= (null)
[ 43.424635] link3: XXX device_release: devres_release_all() done
[ 43.424635] XXX kobject_put(ata3): ref=7--
(ata_tlink_release:device_release:kobject_cleanup)
[ 43.525666] XXX kobject_put(ata3): ref=6--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 43.527976] XXX kobject_put(ata3): ref=5--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 43.570660] XXX kobject_put(ata3): ref=4-- (klist_put:klist_del:device_del)
[ 43.583663] XXX kobject_put(pata_legacy.2): ref=6--
(device_del:ata_tport_delete:ata_host_detach)
[ 43.585654] XXX kobject_put(pata_legacy.2): ref=5--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 43.611650] XXX kobject_put(ata3): ref=3--
(attribute_container_release:device_release:kobject_cleanup)
[ 43.613871] XXX kobject_put(ata3): ref=2--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 43.655645] XXX kobject_put(pata_legacy.2): ref=4--
(klist_put:klist_del:device_del)
[ 43.673641] XXX kobject_put(pata_legacy.2): ref=3--
(klist_devices_put:klist_put:klist_del)
[ 43.707640] XXX kobject_put(pata_legacy.2): ref=2--
(platform_device_unregister:legacy_init [pata_legacy]:do_one_initcall)
[ 43.829624] XXX kobject_get(pata_legacy.3): ref=3++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 43.855618] XXX kobject_get(ata4): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tport_add)
[ 43.872614] XXX kobject_get(ata4): ref=2++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 43.895613] XXX kobject_get(pata_legacy.3): ref=4++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 43.897562] XXX kobject_get(pata_legacy.3): ref=5++
(kobject_add:device_add:ata_tport_add)
[ 43.946597] XXX kobject_get(ata4): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 43.948847] XXX kobject_put(ata4): ref=4--
(ata_tport_add:ata_host_register:ata_host_activate)
[ 43.978592] XXX kobject_get(ata4): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 43.995591] XXX kobject_get(ata4): ref=4++
(kobject_add:get_device_parent:device_add)
[ 44.046587] XXX kobject_get(ata4): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.066583] XXX kobject_get(link4): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 44.081582] XXX kobject_get(link4): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.102584] XXX kobject_get(ata4): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.104839] XXX kobject_get(ata4): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 44.141572] XXX kobject_get(link4): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 44.143717] XXX kobject_put(link4): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.147579] XXX kobject_get(link4): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 44.150028] XXX kobject_get(link4): ref=4++
(kobject_add:get_device_parent:device_add)
[ 44.174566] XXX kobject_get(link4): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.176960] XXX kobject_get(dev4.0): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 44.209557] XXX kobject_get(dev4.0): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.211137] XXX kobject_get(link4): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.212782] XXX kobject_get(link4): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 44.218586] XXX kobject_get(dev4.0): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 44.220774] XXX kobject_put(dev4.0): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.236560] XXX kobject_get(dev4.0): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 44.238937] XXX kobject_get(dev4.0): ref=4++
(kobject_add:get_device_parent:device_add)
[ 44.283558] XXX kobject_get(link4): ref=8++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.340772] XXX kobject_get(dev4.1): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 44.356589] XXX kobject_get(dev4.1): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.358638] XXX kobject_get(link4): ref=9++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.359978] XXX kobject_get(link4): ref=10++
(kobject_add:device_add:ata_tlink_add)
[ 44.378534] XXX kobject_get(dev4.1): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 44.380483] XXX kobject_put(dev4.1): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 44.383529] XXX kobject_get(dev4.1): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 44.406525] XXX kobject_get(dev4.1): ref=4++
(kobject_add:get_device_parent:device_add)
[ 44.483528] scsi host3: pata_legacy
[ 44.484974] XXX kobject_get(ata4): ref=8++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 44.486951] XXX kobject_get(ata4): ref=9++
(kobject_add:device_add:scsi_add_host_with_dma)
[ 44.527514] XXX kobject_get(ata4): ref=10++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 44.597505] ata4: PATA max PIO4 cmd 0x168 ctl 0x36e irq 10
[ 44.912457] XXX kobject_put(ata4): ref=11--
(device_del:scsi_remove_host:ata_host_detach)
[ 44.914077] XXX kobject_put(ata4): ref=10--
(scsi_remove_host:ata_host_detach:legacy_init [pata_legacy])
[ 44.938489] XXX kobject_put(dev4.0): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 44.940442] XXX kobject_put(dev4.0): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 44.963444] XXX kobject_put(dev4.0): ref=3-- (klist_put:klist_del:device_del)
[ 44.968513] XXX kobject_put(link4): ref=11--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 44.970635] XXX kobject_put(link4): ref=10--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 44.977447] XXX kobject_put(dev4.0): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 44.979429] XXX kobject_put(dev4.0): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 44.980910] XXX kobject_cleanup(dev4.0): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 44.982694] dev4.0: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 44.987578] dev4.0: XXX device_release: devres_release_all() done
[ 44.988509] XXX kobject_put(link4): ref=9--
(ata_tdev_release:device_release:kobject_cleanup)
[ 45.014436] XXX kobject_put(dev4.1): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 45.017387] XXX kobject_put(dev4.1): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 45.041431] XXX kobject_put(dev4.1): ref=3-- (klist_put:klist_del:device_del)
[ 45.043705] XXX kobject_put(link4): ref=8--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 45.048956] XXX kobject_put(link4): ref=7--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 45.068485] XXX kobject_put(dev4.1): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 45.070377] XXX kobject_put(dev4.1): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 45.071744] XXX kobject_cleanup(dev4.1): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 45.073554] dev4.1: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 45.074878] dev4.1: XXX device_release: devres_release_all() done
[ 45.075833] XXX kobject_put(link4): ref=6--
(ata_tdev_release:device_release:kobject_cleanup)
[ 45.109427] XXX kobject_put(link4): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 45.115436] XXX kobject_put(link4): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 45.127424] XXX kobject_put(link4): ref=3-- (klist_put:klist_del:device_del)
[ 45.129606] XXX kobject_put(ata4): ref=9--
(device_del:ata_tlink_delete:ata_tport_delete)
[ 45.131711] XXX kobject_put(ata4): ref=8--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 45.133372] XXX kobject_put(link4): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 45.134769] XXX kobject_put(link4): ref=1--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 45.139565] XXX kobject_cleanup(link4): rel=device_release
(put_device:ata_tlink_delete:ata_tport_delete)
[ 45.141395] link4: XXX device_release: drel=ata_tlink_release
trel= (null) cdrel= (null)
[ 45.142703] link4: XXX device_release: devres_release_all() done
[ 45.143646] XXX kobject_put(ata4): ref=7--
(ata_tlink_release:device_release:kobject_cleanup)
[ 45.183419] XXX kobject_put(ata4): ref=6--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 45.185423] XXX kobject_put(ata4): ref=5--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 45.191409] XXX kobject_put(ata4): ref=4-- (klist_put:klist_del:device_del)
[ 45.194413] XXX kobject_put(pata_legacy.3): ref=6--
(device_del:ata_tport_delete:ata_host_detach)
[ 45.195905] XXX kobject_put(pata_legacy.3): ref=5--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 45.197763] XXX kobject_put(ata4): ref=3--
(attribute_container_release:device_release:kobject_cleanup)
[ 45.199619] XXX kobject_put(ata4): ref=2--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 45.201386] XXX kobject_put(pata_legacy.3): ref=4--
(klist_put:klist_del:device_del)
[ 45.203674] XXX kobject_put(pata_legacy.3): ref=3--
(klist_devices_put:klist_put:klist_del)
[ 45.229401] XXX kobject_put(pata_legacy.3): ref=2--
(platform_device_unregister:legacy_init [pata_legacy]:do_one_initcall)
[ 45.293400] genirq: Flags mismatch irq 8. 00000000
(platform[pata_legacy.4]) vs. 00000080 (rtc0)
[ 45.339394] XXX kobject_put(pata_legacy.4): ref=3--
(klist_put:klist_del:device_del)
[ 45.358483] XXX kobject_put(pata_legacy.4): ref=2--
(klist_devices_put:klist_put:klist_del)
[ 45.399372] XXX kobject_put(pata_legacy.4): ref=1--
(platform_device_unregister:legacy_init [pata_legacy]:do_one_initcall)
[ 45.401859] XXX kobject_cleanup(pata_legacy.4): rel=device_release
(put_device:platform_device_unregister:legacy_init [pata_legacy])
[ 45.403918] platform pata_legacy.4: XXX device_release:
drel=platform_device_release trel= (null) cdrel= (null)
[ 45.405670] platform pata_legacy.4: XXX device_release:
devres_release_all() done
[ 45.601350] XXX kobject_get(pata_legacy.5): ref=3++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 45.632345] XXX kobject_get(ata5): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tport_add)
[ 45.661340] XXX kobject_get(ata5): ref=2++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 45.682333] XXX kobject_get(pata_legacy.5): ref=4++
(ata_tport_add:ata_host_register:ata_host_activate)
[ 45.684390] XXX kobject_get(pata_legacy.5): ref=5++
(kobject_add:device_add:ata_tport_add)
[ 45.756331] XXX kobject_get(ata5): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 45.758629] XXX kobject_put(ata5): ref=4--
(ata_tport_add:ata_host_register:ata_host_activate)
[ 45.795316] XXX kobject_get(ata5): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 45.826312] XXX kobject_get(ata5): ref=4++
(kobject_add:get_device_parent:device_add)
[ 45.910302] XXX kobject_get(ata5): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 45.930298] XXX kobject_get(link5): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 45.952295] XXX kobject_get(link5): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 45.972294] XXX kobject_get(ata5): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 45.974244] XXX kobject_get(ata5): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 46.040282] XXX kobject_get(link5): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 46.042361] XXX kobject_put(link5): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.086272] XXX kobject_get(link5): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 46.111266] XXX kobject_get(link5): ref=4++
(kobject_add:get_device_parent:device_add)
[ 46.209257] XXX kobject_get(link5): ref=5++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.231257] XXX kobject_get(dev5.0): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 46.247255] XXX kobject_get(dev5.0): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.267250] XXX kobject_get(link5): ref=6++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.268783] XXX kobject_get(link5): ref=7++
(kobject_add:device_add:ata_tlink_add)
[ 46.325247] XXX kobject_get(dev5.0): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 46.327468] XXX kobject_put(dev5.0): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.349234] XXX kobject_get(dev5.0): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 46.364234] XXX kobject_get(dev5.0): ref=4++
(kobject_add:get_device_parent:device_add)
[ 46.414223] XXX kobject_get(link5): ref=8++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.422225] XXX kobject_get(dev5.1): ref=1++
(attribute_container_add_device:transport_setup_device:ata_tlink_add)
[ 46.435220] XXX kobject_get(dev5.1): ref=2++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.447215] XXX kobject_get(link5): ref=9++
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.448509] XXX kobject_get(link5): ref=10++
(kobject_add:device_add:ata_tlink_add)
[ 46.463231] XXX kobject_get(dev5.1): ref=3++
(klist_node_init:klist_add_tail:device_add)
[ 46.465362] XXX kobject_put(dev5.1): ref=4--
(ata_tlink_add:ata_tport_add:ata_host_register)
[ 46.481216] XXX kobject_get(dev5.1): ref=3++
(attribute_container_add_class_device:transport_add_class_device:attribute_container_device_trigger)
[ 46.494212] XXX kobject_get(dev5.1): ref=4++
(kobject_add:get_device_parent:device_add)
[ 46.566197] scsi host4: pata_legacy
[ 46.568205] XXX kobject_get(ata5): ref=8++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 46.569732] XXX kobject_get(ata5): ref=9++
(kobject_add:device_add:scsi_add_host_with_dma)
[ 46.614194] XXX kobject_get(ata5): ref=10++
(scsi_add_host_with_dma:ata_scsi_add_hosts:ata_host_register)
[ 46.649192] ata5: PATA max PIO4 cmd 0x160 ctl 0x366 irq 12
[ 46.875155] XXX kobject_put(ata5): ref=11--
(device_del:scsi_remove_host:ata_host_detach)
[ 46.877102] XXX kobject_put(ata5): ref=10--
(scsi_remove_host:ata_host_detach:legacy_init [pata_legacy])
[ 46.919145] XXX kobject_put(dev5.0): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 46.921532] XXX kobject_put(dev5.0): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 46.931148] XXX kobject_put(dev5.0): ref=3-- (klist_put:klist_del:device_del)
[ 46.934151] XXX kobject_put(link5): ref=11--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 46.935685] XXX kobject_put(link5): ref=10--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 46.937315] XXX kobject_put(dev5.0): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 46.939100] XXX kobject_put(dev5.0): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 46.940475] XXX kobject_cleanup(dev5.0): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 46.942299] dev5.0: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 46.943635] dev5.0: XXX device_release: devres_release_all() done
[ 46.944590] XXX kobject_put(link5): ref=9--
(ata_tdev_release:device_release:kobject_cleanup)
[ 46.959138] XXX kobject_put(dev5.1): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 46.961728] XXX kobject_put(dev5.1): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 46.971142] XXX kobject_put(dev5.1): ref=3-- (klist_put:klist_del:device_del)
[ 46.973304] XXX kobject_put(link5): ref=8--
(device_del:ata_tdev_delete:ata_tlink_delete)
[ 46.975117] XXX kobject_put(link5): ref=7--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 46.976474] XXX kobject_put(dev5.1): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 46.978331] XXX kobject_put(dev5.1): ref=1--
(ata_tdev_delete:ata_tlink_delete:ata_tport_delete)
[ 46.979686] XXX kobject_cleanup(dev5.1): rel=device_release
(put_device:ata_tdev_delete:ata_tlink_delete)
[ 46.981483] dev5.1: XXX device_release: drel=ata_tdev_release
trel= (null) cdrel= (null)
[ 46.983086] dev5.1: XXX device_release: devres_release_all() done
[ 46.983086] XXX kobject_put(link5): ref=6--
(ata_tdev_release:device_release:kobject_cleanup)
[ 47.000131] XXX kobject_put(link5): ref=5--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 47.002478] XXX kobject_put(link5): ref=4--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 47.012135] XXX kobject_put(link5): ref=3-- (klist_put:klist_del:device_del)
[ 47.013550] XXX kobject_put(ata5): ref=9--
(device_del:ata_tlink_delete:ata_tport_delete)
[ 47.015311] XXX kobject_put(ata5): ref=8--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 47.016612] XXX kobject_put(link5): ref=2--
(attribute_container_release:device_release:kobject_cleanup)
[ 47.018423] XXX kobject_put(link5): ref=1--
(ata_tlink_delete:ata_tport_delete:ata_host_detach)
[ 47.019754] XXX kobject_cleanup(link5): rel=device_release
(put_device:ata_tlink_delete:ata_tport_delete)
[ 47.021482] link5: XXX device_release: drel=ata_tlink_release
trel= (null) cdrel= (null)
[ 47.023082] link5: XXX device_release: devres_release_all() done
[ 47.023082] XXX kobject_put(ata5): ref=7--
(ata_tlink_release:device_release:kobject_cleanup)
[ 47.041124] XXX kobject_put(ata5): ref=6--
(kobject_cleanup:kobject_put:cleanup_glue_dir)
[ 47.043468] XXX kobject_put(ata5): ref=5--
(attribute_container_class_device_del:transport_remove_classdev:attribute_container_device_trigger)
[ 47.049130] XXX kobject_put(ata5): ref=4-- (klist_put:klist_del:device_del)
[ 47.051263] XXX kobject_put(pata_legacy.5): ref=6--
(device_del:ata_tport_delete:ata_host_detach)
[ 47.053076] XXX kobject_put(pata_legacy.5): ref=5--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 47.054603] XXX kobject_put(ata5): ref=3--
(attribute_container_release:device_release:kobject_cleanup)
[ 47.056389] XXX kobject_put(ata5): ref=2--
(ata_tport_delete:ata_host_detach:legacy_init [pata_legacy])
[ 47.059123] XXX kobject_put(pata_legacy.5): ref=4--
(klist_put:klist_del:device_del)
[ 47.061079] XXX kobject_put(pata_legacy.5): ref=3--
(klist_devices_put:klist_put:klist_del)
[ 47.073144] XXX kobject_put(pata_legacy.5): ref=2--
(platform_device_unregister:legacy_init [pata_legacy]:do_one_initcall)
^ permalink raw reply
* Re: [PATCH 0/3] ata: add m68k/Atari Falcon PATA support
From: Michael Schmitz @ 2017-01-27 4:28 UTC (permalink / raw)
To: Finn Thain
Cc: Bartlomiej Zolnierkiewicz, Tejun Heo, Geert Uytterhoeven,
linux-ide, Linux/m68k, Linux Kernel Development, Andreas Schwab
In-Reply-To: <alpine.LNX.2.00.1701261944160.23370@nippy.intranet>
Hi Finn,
Am 26.01.2017 um 21:47 schrieb Finn Thain:
>> I hadn't considered that. Can PDMA for Falcon SCSI coexist with
>> interrupt-using DMA for TT SCSI in the same driver (i.e. as runtime
>> options)?
>
> Sure, why not?
>
>> How much overhead and latency would polling for DMA completion add?
>>
>
> A polled DMA transfer should be faster than PDMA (i.e. mac_scsi, g_NCR5380
> etc). mac_scsi gets about 0.5 MBps from PDMA with sg_tablesize == 1, and I
> hope that DMA could get twice that (notwithstanding dumb hardware design).
DMA contends with the processor use of the data bus but that's true for
many DMA designs. Don't think Atari made any more dumb decisions (the
opaque DMA FIFO is probably the worst feature there but that could be
worked around at considerable expense by programming the DMA and the
SCSI bus transfer for one additional 512 byte block. Let's not go there.)
> This would imply CPU overhead that is half of that which mac_scsi incurs.
> That's the best case, but I see no reason to expect worse performance than
> PDMA gets.
But how much more overhead would we have compared to using the SCSI
interrupt to signal DMA completion?
>> atari_irq_pending(IRQ_MFP_FSCSI) should show the interrupt pending
>> condition if you want to poll for it.
>
> The difficulty will be arranging for disabled FDC & IDE interrupt sources
> during SCSI DMA, and disabled SCSI & IDE interrupt sources during FDC DMA.
> (Not all 5380 interrupts can be disabled; no idea about the IDE device or
> WD1772 FDC.)
>
> But if that is impossible, we just have to detect the short DMA that might
> result from an undesired interrupt.
I think that's infeasible - IDE interrupts could be disabled at disk
level as Geert suggests but I don't think there is a kernel API for
other drivers to do so?
At the IRQ controller level, it's all or none due to the wired-OR design
as you pointed out in the reply to Geert's mail.
>> That's actually given me another idea to pursue - if we can ensure the
>> IDE interrupt handler is always run first,
>
> There are no interrupts from the ATA driver you're testing, right? If you
> would re-introduce them, the whole polled DMA idea is moot.
The libata driver currently does disable the IDE interrupt and uses
polling, but I'd like to change that if at all possible. Sorry I didn't
make that clear.
As far as I could see during my testing, the current libata driver
coexists just fine with interrupt driven SCSI operation. I've once seen
a 'lost arbitration' message in the very first test when loading the
SCSI driver, but that's not been repeated. No problems seen otherwise.
>> If we manage to separate interrupt sharing from DMA access locking, IDE
>> would not need to take part in the locking. I'm assuming that IDE can
>> cope with spurious interrupts and won't get confused by a SCSI
>> interrupt.
>>
>
> The ATA driver will never have to cope with a spurious interrupt under my
> simplifying assumptions discussed earlier, so the spurious interrupt
> question seems to belong to some alternative approach...
I was assuming IDE could have interrupts reenabled in libata for that
discussion.
>> I think it could work both ways - polling for DMA completion or avoiding
>> to call the SCSI interrupt handler the interrupt was caused by IDE only.
>> But it's indeed time to put that to the test.
>>
>
> ... "Both ways"? I don't follow. I don't see how IDE can share the FDC and
> SCSI interrupt line without sharing the stdma.c locking scheme. What is
> the alternative approach (i.e not polled DMA) that you alude to?
Since IDE does not use the ST-DMA and does not share any registers with
ST-DMA, peeking at the IDE status register in order to decide whether
the interrupt was raised by the IDE interface won't hurt the running DMA
process (regardless of whether FDC or SCSI started it). Nor will
servicing the IDE interrupt.
If at the end of the IDE interrupt processing the interrupt status is
cleared in the IDE interface, the interrupt line should go high again
before the IDE inthandler returns.
If we can ensure that the FDC/SCSI interrupt handler runs after the IDE
handler, we can then make that handler check the interrupt line status
and bail out if there's nothing to be done. (For the sake of simplicity,
this check can be done in stdma_int() since we need to retain mutual
locking of the DMA interface by SCSI and FDC anyway.) We can ensure the
IDE interrupt is called first by using a special interrupt controller to
register separate IDE and FDC/SCSI interrupts with (I've done that to
provide distinct interrupt numbers and handlers for the timer D
interrupt that's used to poll ethernet and USB interface status on the
ROM port).
That way, we can ensure IDE interrupts do not step on the ST-DMA state,
and all that remains are premature SCSI interrupts terminating DMA
transfer (which we already face anyway).
Am I missing a potential race here? Does IDE send the next request off
to the disk from inside the interrupt handler so we could see IDE
immediately raise the next interrupt? In that case, we'd also need to
check the IDE interrupt status in the interface status register, and
bail out for another pass through the IDE/FDC/SCSI handlers until IDE is
no longer posting an interrupt...
Cheers,
Michael
^ permalink raw reply
* Re: [PATCH v6 05/14] ARM: davinci: da850: add con_id for the SATA clock
From: Bartosz Golaszewski @ 2017-01-27 9:55 UTC (permalink / raw)
To: Sekhar Nori, Rob Herring, linux-devicetree
Cc: Grygorii Strashko, Kevin Hilman, Patrick Titiano,
Michael Turquette, Tejun Heo, Mark Rutland, Russell King,
David Lechner, linux-ide-u79uwXL29TY76Z2rM5mHXA, LKML, arm-soc
In-Reply-To: <645778dd-6727-abd0-3dd9-a7e0d5aa4983-l0cyMroinI0@public.gmane.org>
2017-01-26 18:40 GMT+01:00 Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>:
> On Thursday 26 January 2017 10:26 PM, Grygorii Strashko wrote:
>>
>>
>> On 01/23/2017 11:00 AM, Bartosz Golaszewski wrote:
>>> The ahci-da850 SATA driver is now capable of retrieving clocks by
>>> con_id. Add the connection id for the sysclk2-derived SATA clock.
>>>
>>> Signed-off-by: Bartosz Golaszewski <bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>>> ---
>>> arch/arm/mach-davinci/da850.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
>>> index 1d873d1..dbf1daa 100644
>>> --- a/arch/arm/mach-davinci/da850.c
>>> +++ b/arch/arm/mach-davinci/da850.c
>>> @@ -571,7 +571,7 @@ static struct clk_lookup da850_clks[] = {
>>> CLK("spi_davinci.0", NULL, &spi0_clk),
>>> CLK("spi_davinci.1", NULL, &spi1_clk),
>>> CLK("vpif", NULL, &vpif_clk),
>>> - CLK("ahci_da850", NULL, &sata_clk),
>>> + CLK("ahci_da850", "sata", &sata_clk),
>>
>> I'm worry a bit - wouldn't this cause future problems with PM runtime
>> (if it will be the case)?
>>
>> If this is functional clock - shouldn't it be "fck" to
>> follow PM domain con_id list for davinci? (arch/arm/mach-davinci/pm_domain.c)
>
> I agree with Grygorii. Calling this clock "fck" will make it easy to
> convert the DA850 AHCI driver to use pm_runtime at a future date (no
> mach-davinci changes should be needed).
>
> Sorry about not spotting this earlier.
>
Hi Sekhar,
I'll wait with sending v7 until we get an ack from Rob for the
ahci-da850 bindings, so that we don't fall to the bottom of the review
queue again.
Thanks,
Bartosz
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v6 05/14] ARM: davinci: da850: add con_id for the SATA clock
From: Sekhar Nori @ 2017-01-27 9:58 UTC (permalink / raw)
To: Bartosz Golaszewski, Rob Herring, linux-devicetree
Cc: Mark Rutland, Grygorii Strashko, David Lechner, Kevin Hilman,
Michael Turquette, Russell King, LKML, linux-ide, Patrick Titiano,
Tejun Heo, arm-soc
In-Reply-To: <CAMpxmJXq-XZBhO3j=bHpfU2QjJ+6kiYcozS7-pVu3W4juNTVBw@mail.gmail.com>
On Friday 27 January 2017 03:25 PM, Bartosz Golaszewski wrote:
> Hi Sekhar,
>
> I'll wait with sending v7 until we get an ack from Rob for the
> ahci-da850 bindings, so that we don't fall to the bottom of the review
> queue again.
Yes, makes sense.
Regards,
Sekhar
^ permalink raw reply
* Re: [PATCH v6 01/14] devicetree: bindings: add bindings for ahci-da850
From: Rob Herring @ 2017-01-27 20:58 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Mark Rutland, Russell King, David Lechner, linux-ide,
devicetree, linux-kernel, linux-arm-kernel
In-Reply-To: <1485190856-4711-2-git-send-email-bgolaszewski@baylibre.com>
On Mon, Jan 23, 2017 at 06:00:43PM +0100, Bartosz Golaszewski wrote:
> Add DT bindings for the TI DA850 AHCI SATA controller.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
> Documentation/devicetree/bindings/ata/ahci-da850.txt | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ata/ahci-da850.txt
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Hello Linux
From: nick_c_huang @ 2017-01-28 3:02 UTC (permalink / raw)
To: linux ide
hi Linux
http://afleurdesoie.fr/request.php?fill=wd2kht2811hw
;-)
^ permalink raw reply
* [PATCH v7 00/14] ARM: da850-lcdk: add SATA support
From: Bartosz Golaszewski @ 2017-01-30 10:01 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
This series contains all the changes necessary to make SATA work on
the da850-lcdk board.
The first patch adds DT bindings for the ahci-da850 driver.
The second enables relevant modules in davinci_all_defconfig.
Patches 03/14-06/14 modify the way the clocks are handled regarding
SATA on the da850 platform. We modify the ahci driver to retrieve
the clock via con_id and model the external SATA oscillator as
a real clock.
Patches 07/14-11/14 extend the ahci-da850 driver. Add DT support,
implement workarounds necessary to make SATA work on the da850-lcdk
board and un-hardcode the external clock multiplier.
Patch 12/14 removes a no longer needed BUG_ON.
Last two patches add device tree changes required to probe the
driver.
v1 -> v2:
- dropped patch 04/10 - replaced with local changes in the
ahci-da850 driver
- added comments explaining the workaround in ahci softreset
- s/0x218000/218000 in the sata DT node label
- added patches chaning the way clocks are handled in the da850 SATA
code both in arch/ and in the ahci driver
- dropped the clock multiplier property in the DT bindings in favor
of using struct clk to pass the refclk rate to the driver
- minor tweaks in commit messages
v2 -> v3:
- dropped the clocks property from the ahci-da850 DT binding
- dropped patch 12/14 (SATA pinmux settings)
- dropped an outdated fragment from the commit message in patch 14/14
- s/get_clk()/clk_get()/
- s/connector id/connection id/
- stopped using __div64_32() after noticing that it sometimes produces
invalid results
- removed the default MPY value from ahci-da850
- registered SATA refclk for board file boot mode as well
v3 -> v4:
- added a patch removing the no longer needed BUG_ON() from
da850_register_sata()
- fixed indents
v4 -> v5:
- renamed the DT node for the SATA controller from 'ahci' to 'sata',
while keeping the label as 'sata'
- renamed the SATA node in the DT example as well
- instead of calling the refclk clock 'dummy', called it 'fixed rate'
v5 -> v6:
- specified what the required register regions are in the device
tree bindings
v6 -> v7:
- changed the connection id of the SATA functional clock to 'fck'
Bartosz Golaszewski (14):
devicetree: bindings: add bindings for ahci-da850
ARM: davinci_all_defconfig: enable SATA modules
ARM: davinci: add a clock lookup entry for the SATA clock
sata: ahci-da850: get the sata clock using a connection id
ARM: davinci: da850: add con_id for the SATA clock
ARM: davinci: da850: model the SATA refclk
sata: ahci-da850: add device tree match table
sata: ahci-da850: implement a workaround for the softreset quirk
sata: ahci: export ahci_do_hardreset() locally
sata: ahci-da850: add a workaround for controller instability
sata: ahci-da850: un-hardcode the MPY bits
ARM: davinci: remove BUG_ON() from da850_register_sata()
ARM: dts: da850: add the SATA node
ARM: dts: da850-lcdk: enable the SATA node
.../devicetree/bindings/ata/ahci-da850.txt | 18 +++
arch/arm/boot/dts/da850-lcdk.dts | 4 +
arch/arm/boot/dts/da850.dtsi | 6 +
arch/arm/configs/davinci_all_defconfig | 2 +
arch/arm/mach-davinci/da850.c | 2 +-
arch/arm/mach-davinci/da8xx-dt.c | 9 ++
arch/arm/mach-davinci/devices-da8xx.c | 30 +++-
arch/arm/mach-davinci/include/mach/da8xx.h | 1 +
drivers/ata/ahci.h | 3 +
drivers/ata/ahci_da850.c | 175 +++++++++++++++++++--
drivers/ata/libahci.c | 18 ++-
11 files changed, 243 insertions(+), 25 deletions(-)
create mode 100644 Documentation/devicetree/bindings/ata/ahci-da850.txt
--
2.9.3
^ permalink raw reply
* [PATCH v7 01/14] devicetree: bindings: add bindings for ahci-da850
From: Bartosz Golaszewski @ 2017-01-30 10:01 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
Add DT bindings for the TI DA850 AHCI SATA controller.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/ata/ahci-da850.txt | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 Documentation/devicetree/bindings/ata/ahci-da850.txt
diff --git a/Documentation/devicetree/bindings/ata/ahci-da850.txt b/Documentation/devicetree/bindings/ata/ahci-da850.txt
new file mode 100644
index 0000000..5f81934
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/ahci-da850.txt
@@ -0,0 +1,18 @@
+Device tree binding for the TI DA850 AHCI SATA Controller
+---------------------------------------------------------
+
+Required properties:
+ - compatible: must be "ti,da850-ahci"
+ - reg: physical base addresses and sizes of the two register regions
+ used by the controller: the register map as defined by the
+ AHCI 1.1 standard and the Power Down Control Register (PWRDN)
+ for enabling/disabling the SATA clock receiver
+ - interrupts: interrupt specifier (refer to the interrupt binding)
+
+Example:
+
+ sata: sata@218000 {
+ compatible = "ti,da850-ahci";
+ reg = <0x218000 0x2000>, <0x22c018 0x4>;
+ interrupts = <67>;
+ };
--
2.9.3
^ permalink raw reply related
* [PATCH v7 02/14] ARM: davinci_all_defconfig: enable SATA modules
From: Bartosz Golaszewski @ 2017-01-30 10:01 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Add the da850-ahci driver to davinci defconfig.
Signed-off-by: Bartosz Golaszewski <bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
---
arch/arm/configs/davinci_all_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index 8806754..a1b9c58 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -78,6 +78,8 @@ CONFIG_IDE=m
CONFIG_BLK_DEV_PALMCHIP_BK3710=m
CONFIG_SCSI=m
CONFIG_BLK_DEV_SD=m
+CONFIG_ATA=m
+CONFIG_AHCI_DA850=m
CONFIG_NETDEVICES=y
CONFIG_NETCONSOLE=y
CONFIG_TUN=m
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v7 03/14] ARM: davinci: add a clock lookup entry for the SATA clock
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
This entry is needed for the ahci driver to get a functional clock.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
arch/arm/mach-davinci/da8xx-dt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 9ee44da..b83e5d1 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -42,6 +42,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL),
OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),
OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL),
+ OF_DEV_AUXDATA("ti,da850-ahci", 0x01e18000, "ahci_da850", NULL),
{}
};
--
2.9.3
^ permalink raw reply related
* [PATCH v7 04/14] sata: ahci-da850: get the sata clock using a connection id
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
In preparation for using two clocks in the driver (the sysclk2-based
clock and the external REFCLK), check if we got the functional clock
after calling ahci_platform_get_resources(). If not, retry calling
clk_get() with con_id specified.
Signed-off-by: Bartosz Golaszewski <bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Acked-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/ata/ahci_da850.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
index 267a3d3..e397bab 100644
--- a/drivers/ata/ahci_da850.c
+++ b/drivers/ata/ahci_da850.c
@@ -71,12 +71,28 @@ static int ahci_da850_probe(struct platform_device *pdev)
struct ahci_host_priv *hpriv;
struct resource *res;
void __iomem *pwrdn_reg;
+ struct clk *clk;
int rc;
hpriv = ahci_platform_get_resources(pdev);
if (IS_ERR(hpriv))
return PTR_ERR(hpriv);
+ /*
+ * Internally ahci_platform_get_resources() calls clk_get(dev, NULL)
+ * when trying to obtain the functional clock. This SATA controller
+ * uses two clocks for which we specify two connection ids. If we don't
+ * have the functional clock at this point - call clk_get() again with
+ * con_id = "fck".
+ */
+ if (!hpriv->clks[0]) {
+ clk = clk_get(dev, "fck");
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
+
+ hpriv->clks[0] = clk;
+ }
+
rc = ahci_platform_enable_resources(hpriv);
if (rc)
return rc;
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v7 05/14] ARM: davinci: da850: add con_id for the SATA clock
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
The ahci-da850 SATA driver is now capable of retrieving clocks by
con_id. Add the connection id for the sysclk2-derived SATA clock.
Signed-off-by: Bartosz Golaszewski <bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
---
arch/arm/mach-davinci/da850.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 1d873d1..b2fdace 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -571,7 +571,7 @@ static struct clk_lookup da850_clks[] = {
CLK("spi_davinci.0", NULL, &spi0_clk),
CLK("spi_davinci.1", NULL, &spi1_clk),
CLK("vpif", NULL, &vpif_clk),
- CLK("ahci_da850", NULL, &sata_clk),
+ CLK("ahci_da850", "fck", &sata_clk),
CLK("davinci-rproc.0", NULL, &dsp_clk),
CLK(NULL, NULL, &ehrpwm_clk),
CLK("ehrpwm.0", "fck", &ehrpwm0_clk),
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v7 06/14] ARM: davinci: da850: model the SATA refclk
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
Register a fixed rate clock modelling the external SATA oscillator
for da850 (both DT and board file mode).
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
arch/arm/mach-davinci/da8xx-dt.c | 8 ++++++++
arch/arm/mach-davinci/devices-da8xx.c | 29 +++++++++++++++++++++++++++++
arch/arm/mach-davinci/include/mach/da8xx.h | 1 +
3 files changed, 38 insertions(+)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index b83e5d1..55342ca 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -50,6 +50,9 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
static void __init da850_init_machine(void)
{
+ /* All existing boards use 100MHz SATA refclkpn */
+ static const unsigned long sata_refclkpn = 100 * 1000 * 1000;
+
int ret;
ret = da8xx_register_usb20_phy_clk(false);
@@ -61,6 +64,11 @@ static void __init da850_init_machine(void)
pr_warn("%s: registering USB 1.1 PHY clock failed: %d",
__func__, ret);
+ ret = da850_register_sata_refclk(sata_refclkpn);
+ if (ret)
+ pr_warn("%s: registering SATA REFCLK failed: %d",
+ __func__, ret);
+
of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
davinci_pm_init();
}
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index c2457b3..cfceb32 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -24,6 +24,7 @@
#include <mach/common.h>
#include <mach/time.h>
#include <mach/da8xx.h>
+#include <mach/clock.h>
#include "cpuidle.h"
#include "sram.h"
@@ -1023,6 +1024,28 @@ int __init da8xx_register_spi_bus(int instance, unsigned num_chipselect)
}
#ifdef CONFIG_ARCH_DAVINCI_DA850
+static struct clk sata_refclk = {
+ .name = "sata_refclk",
+ .set_rate = davinci_simple_set_rate,
+};
+
+static struct clk_lookup sata_refclk_lookup =
+ CLK("ahci_da850", "refclk", &sata_refclk);
+
+int __init da850_register_sata_refclk(int rate)
+{
+ int ret;
+
+ sata_refclk.rate = rate;
+ ret = clk_register(&sata_refclk);
+ if (ret)
+ return ret;
+
+ clkdev_add(&sata_refclk_lookup);
+
+ return 0;
+}
+
static struct resource da850_sata_resources[] = {
{
.start = DA850_SATA_BASE,
@@ -1055,9 +1078,15 @@ static struct platform_device da850_sata_device = {
int __init da850_register_sata(unsigned long refclkpn)
{
+ int ret;
+
/* please see comment in drivers/ata/ahci_da850.c */
BUG_ON(refclkpn != 100 * 1000 * 1000);
+ ret = da850_register_sata_refclk(refclkpn);
+ if (ret)
+ return ret;
+
return platform_device_register(&da850_sata_device);
}
#endif
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index 85ff218..7e46422 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -95,6 +95,7 @@ int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata);
int da8xx_register_usb_refclkin(int rate);
int da8xx_register_usb20_phy_clk(bool use_usb_refclkin);
int da8xx_register_usb11_phy_clk(bool use_usb_refclkin);
+int da850_register_sata_refclk(int rate);
int da8xx_register_emac(void);
int da8xx_register_uio_pruss(void);
int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
--
2.9.3
^ permalink raw reply related
* [PATCH v7 09/14] sata: ahci: export ahci_do_hardreset() locally
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
We need a way to retrieve the information about the online state of
the link in the ahci-da850 driver.
Create a new function: ahci_do_hardreset() which is called from
ahci_hardreset() for backwards compatibility, but has an additional
argument: 'online' - which can be used to check if the link is online
after this function returns.
The new routine will be used in the ahci-da850 driver to avoid code
duplication when implementing a workaround for tha da850 SATA
controller quirk/instability.
Signed-off-by: Bartosz Golaszewski <bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Acked-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/ata/ahci.h | 3 +++
drivers/ata/libahci.c | 18 +++++++++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 0cc08f8..5db6ab2 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -398,6 +398,9 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,
int pmp, unsigned long deadline,
int (*check_ready)(struct ata_link *link));
+int ahci_do_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline, bool *online);
+
unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
int ahci_stop_engine(struct ata_port *ap);
void ahci_start_fis_rx(struct ata_port *ap);
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index ee7db31..3159f9e 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1519,8 +1519,8 @@ static int ahci_pmp_retry_softreset(struct ata_link *link, unsigned int *class,
return rc;
}
-static int ahci_hardreset(struct ata_link *link, unsigned int *class,
- unsigned long deadline)
+int ahci_do_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline, bool *online)
{
const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context);
struct ata_port *ap = link->ap;
@@ -1528,7 +1528,6 @@ static int ahci_hardreset(struct ata_link *link, unsigned int *class,
struct ahci_host_priv *hpriv = ap->host->private_data;
u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
struct ata_taskfile tf;
- bool online;
int rc;
DPRINTK("ENTER\n");
@@ -1540,17 +1539,26 @@ static int ahci_hardreset(struct ata_link *link, unsigned int *class,
tf.command = ATA_BUSY;
ata_tf_to_fis(&tf, 0, 0, d2h_fis);
- rc = sata_link_hardreset(link, timing, deadline, &online,
+ rc = sata_link_hardreset(link, timing, deadline, online,
ahci_check_ready);
hpriv->start_engine(ap);
- if (online)
+ if (*online)
*class = ahci_dev_classify(ap);
DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
return rc;
}
+EXPORT_SYMBOL_GPL(ahci_do_hardreset);
+
+static int ahci_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ bool online;
+
+ return ahci_do_hardreset(link, class, deadline, &online);
+}
static void ahci_postreset(struct ata_link *link, unsigned int *class)
{
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v7 11/14] sata: ahci-da850: un-hardcode the MPY bits
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
All platforms using this driver now register the SATA refclk. Remove
the hardcoded default value from the driver and instead read the rate
of the external clock and calculate the required MPY value from it.
Signed-off-by: Bartosz Golaszewski <bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Acked-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/ata/ahci_da850.c | 91 ++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 76 insertions(+), 15 deletions(-)
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
index d65088a..44bb795 100644
--- a/drivers/ata/ahci_da850.c
+++ b/drivers/ata/ahci_da850.c
@@ -29,17 +29,8 @@
#define SATA_PHY_TXSWING(x) ((x) << 19)
#define SATA_PHY_ENPLL(x) ((x) << 31)
-/*
- * The multiplier needed for 1.5GHz PLL output.
- *
- * NOTE: This is currently hardcoded to be suitable for 100MHz crystal
- * frequency (which is used by DA850 EVM board) and may need to be changed
- * if you would like to use this driver on some other board.
- */
-#define DA850_SATA_CLK_MULTIPLIER 7
-
static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg,
- void __iomem *ahci_base)
+ void __iomem *ahci_base, u32 mpy)
{
unsigned int val;
@@ -48,13 +39,61 @@ static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg,
val &= ~BIT(0);
writel(val, pwrdn_reg);
- val = SATA_PHY_MPY(DA850_SATA_CLK_MULTIPLIER + 1) | SATA_PHY_LOS(1) |
- SATA_PHY_RXCDR(4) | SATA_PHY_RXEQ(1) | SATA_PHY_TXSWING(3) |
- SATA_PHY_ENPLL(1);
+ val = SATA_PHY_MPY(mpy) | SATA_PHY_LOS(1) | SATA_PHY_RXCDR(4) |
+ SATA_PHY_RXEQ(1) | SATA_PHY_TXSWING(3) | SATA_PHY_ENPLL(1);
writel(val, ahci_base + SATA_P0PHYCR_REG);
}
+static u32 ahci_da850_calculate_mpy(unsigned long refclk_rate)
+{
+ u32 pll_output = 1500000000, needed;
+
+ /*
+ * We need to determine the value of the multiplier (MPY) bits.
+ * In order to include the 12.5 multiplier we need to first divide
+ * the refclk rate by ten.
+ *
+ * __div64_32() turned out to be unreliable, sometimes returning
+ * false results.
+ */
+ WARN((refclk_rate % 10) != 0, "refclk must be divisible by 10");
+ needed = pll_output / (refclk_rate / 10);
+
+ /*
+ * What we have now is (multiplier * 10).
+ *
+ * Let's determine the actual register value we need to write.
+ */
+
+ switch (needed) {
+ case 50:
+ return 0x1;
+ case 60:
+ return 0x2;
+ case 80:
+ return 0x4;
+ case 100:
+ return 0x5;
+ case 120:
+ return 0x6;
+ case 125:
+ return 0x7;
+ case 150:
+ return 0x8;
+ case 200:
+ return 0x9;
+ case 250:
+ return 0xa;
+ default:
+ /*
+ * We should have divided evenly - if not, return an invalid
+ * value.
+ */
+ return 0;
+ }
+}
+
static int ahci_da850_softreset(struct ata_link *link,
unsigned int *class, unsigned long deadline)
{
@@ -126,9 +165,10 @@ static int ahci_da850_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
- struct resource *res;
void __iomem *pwrdn_reg;
+ struct resource *res;
struct clk *clk;
+ u32 mpy;
int rc;
hpriv = ahci_platform_get_resources(pdev);
@@ -150,6 +190,27 @@ static int ahci_da850_probe(struct platform_device *pdev)
hpriv->clks[0] = clk;
}
+ /*
+ * The second clock used by ahci-da850 is the external REFCLK. If we
+ * didn't get it from ahci_platform_get_resources(), let's try to
+ * specify the con_id in clk_get().
+ */
+ if (!hpriv->clks[1]) {
+ clk = clk_get(dev, "refclk");
+ if (IS_ERR(clk)) {
+ dev_err(dev, "unable to obtain the reference clock");
+ return -ENODEV;
+ } else {
+ hpriv->clks[1] = clk;
+ }
+ }
+
+ mpy = ahci_da850_calculate_mpy(clk_get_rate(hpriv->clks[1]));
+ if (mpy == 0) {
+ dev_err(dev, "invalid REFCLK multiplier value: 0x%x", mpy);
+ return -EINVAL;
+ }
+
rc = ahci_platform_enable_resources(hpriv);
if (rc)
return rc;
@@ -162,7 +223,7 @@ static int ahci_da850_probe(struct platform_device *pdev)
if (!pwrdn_reg)
goto disable_resources;
- da850_sata_init(dev, pwrdn_reg, hpriv->mmio);
+ da850_sata_init(dev, pwrdn_reg, hpriv->mmio, mpy);
rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info,
&ahci_platform_sht);
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v7 13/14] ARM: dts: da850: add the SATA node
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Add the SATA node to the da850 device tree.
Signed-off-by: Bartosz Golaszewski <bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
---
arch/arm/boot/dts/da850.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 104155d..3b5fd41e 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -403,6 +403,12 @@
phy-names = "usb-phy";
status = "disabled";
};
+ sata: sata@218000 {
+ compatible = "ti,da850-ahci";
+ reg = <0x218000 0x2000>, <0x22c018 0x4>;
+ interrupts = <67>;
+ status = "disabled";
+ };
mdio: mdio@224000 {
compatible = "ti,davinci_mdio";
#address-cells = <1>;
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v7 07/14] sata: ahci-da850: add device tree match table
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
We're using device tree for da850-lcdk. Add the match table to allow
to probe the driver.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/ahci_da850.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
index e397bab..72126a0 100644
--- a/drivers/ata/ahci_da850.c
+++ b/drivers/ata/ahci_da850.c
@@ -121,11 +121,18 @@ static int ahci_da850_probe(struct platform_device *pdev)
static SIMPLE_DEV_PM_OPS(ahci_da850_pm_ops, ahci_platform_suspend,
ahci_platform_resume);
+static const struct of_device_id ahci_da850_of_match[] = {
+ { .compatible = "ti,da850-ahci", },
+ { },
+};
+MODULE_DEVICE_TABLE(of, ahci_da850_of_match);
+
static struct platform_driver ahci_da850_driver = {
.probe = ahci_da850_probe,
.remove = ata_platform_remove_one,
.driver = {
.name = DRV_NAME,
+ .of_match_table = ahci_da850_of_match,
.pm = &ahci_da850_pm_ops,
},
};
--
2.9.3
^ permalink raw reply related
* [PATCH v7 12/14] ARM: davinci: remove BUG_ON() from da850_register_sata()
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
The ahci driver now supports other refclk clock rates.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
arch/arm/mach-davinci/devices-da8xx.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index cfceb32..7cf529f 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -1080,9 +1080,6 @@ int __init da850_register_sata(unsigned long refclkpn)
{
int ret;
- /* please see comment in drivers/ata/ahci_da850.c */
- BUG_ON(refclkpn != 100 * 1000 * 1000);
-
ret = da850_register_sata_refclk(refclkpn);
if (ret)
return ret;
--
2.9.3
^ permalink raw reply related
* [PATCH v7 10/14] sata: ahci-da850: add a workaround for controller instability
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
We have a use case with the da850 SATA controller where at PLL0
frequency of 456MHz (needed to properly service the LCD controller)
the chip becomes unstable and the hardreset operation is ignored the
first time 50% of times.
The sata core driver already retries to resume the link because some
controllers ignore writes to the SControl register, but just retrying
the resume operation doesn't work - we need to issue he phy/wake reset
again to make it work.
Reimplement ahci_hardreset() in the driver and poke the controller a
couple times before really giving up.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/ahci_da850.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
index 84c7805..d65088a 100644
--- a/drivers/ata/ahci_da850.c
+++ b/drivers/ata/ahci_da850.c
@@ -16,7 +16,8 @@
#include <linux/ahci_platform.h>
#include "ahci.h"
-#define DRV_NAME "ahci_da850"
+#define DRV_NAME "ahci_da850"
+#define HARDRESET_RETRIES 5
/* SATA PHY Control Register offset from AHCI base */
#define SATA_P0PHYCR_REG 0x178
@@ -76,6 +77,29 @@ static int ahci_da850_softreset(struct ata_link *link,
return ret;
}
+static int ahci_da850_hardreset(struct ata_link *link,
+ unsigned int *class, unsigned long deadline)
+{
+ int ret, retry = HARDRESET_RETRIES;
+ bool online;
+
+ /*
+ * In order to correctly service the LCD controller of the da850 SoC,
+ * we increased the PLL0 frequency to 456MHz from the default 300MHz.
+ *
+ * This made the SATA controller unstable and the hardreset operation
+ * does not always succeed the first time. Before really giving up to
+ * bring up the link, retry the reset a couple times.
+ */
+ do {
+ ret = ahci_do_hardreset(link, class, deadline, &online);
+ if (online)
+ return ret;
+ } while (retry--);
+
+ return ret;
+}
+
static struct ata_port_operations ahci_da850_port_ops = {
.inherits = &ahci_platform_ops,
.softreset = ahci_da850_softreset,
@@ -83,6 +107,8 @@ static struct ata_port_operations ahci_da850_port_ops = {
* No need to override .pmp_softreset - it's only used for actual
* PMP-enabled ports.
*/
+ .hardreset = ahci_da850_hardreset,
+ .pmp_hardreset = ahci_da850_hardreset,
};
static const struct ata_port_info ahci_da850_port_info = {
--
2.9.3
^ permalink raw reply related
* [PATCH v7 08/14] sata: ahci-da850: implement a workaround for the softreset quirk
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
There's an issue with the da850 SATA controller: if port multiplier
support is compiled in, but we're connecting the drive directly to
the SATA port on the board, the drive can't be detected.
To make SATA work on the da850-lcdk board: first try to softreset
with pmp - if the operation fails with -EBUSY, retry without pmp.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/ahci_da850.c | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
index 72126a0..84c7805 100644
--- a/drivers/ata/ahci_da850.c
+++ b/drivers/ata/ahci_da850.c
@@ -54,11 +54,42 @@ static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg,
writel(val, ahci_base + SATA_P0PHYCR_REG);
}
+static int ahci_da850_softreset(struct ata_link *link,
+ unsigned int *class, unsigned long deadline)
+{
+ int pmp, ret;
+
+ pmp = sata_srst_pmp(link);
+
+ /*
+ * There's an issue with the SATA controller on da850 SoCs: if we
+ * enable Port Multiplier support, but the drive is connected directly
+ * to the board, it can't be detected. As a workaround: if PMP is
+ * enabled, we first call ahci_do_softreset() and pass it the result of
+ * sata_srst_pmp(). If this call fails, we retry with pmp = 0.
+ */
+ ret = ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
+ if (pmp && ret == -EBUSY)
+ return ahci_do_softreset(link, class, 0,
+ deadline, ahci_check_ready);
+
+ return ret;
+}
+
+static struct ata_port_operations ahci_da850_port_ops = {
+ .inherits = &ahci_platform_ops,
+ .softreset = ahci_da850_softreset,
+ /*
+ * No need to override .pmp_softreset - it's only used for actual
+ * PMP-enabled ports.
+ */
+};
+
static const struct ata_port_info ahci_da850_port_info = {
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
- .port_ops = &ahci_platform_ops,
+ .port_ops = &ahci_da850_port_ops,
};
static struct scsi_host_template ahci_platform_sht = {
--
2.9.3
^ permalink raw reply related
* [PATCH v7 14/14] ARM: dts: da850-lcdk: enable the SATA node
From: Bartosz Golaszewski @ 2017-01-30 10:02 UTC (permalink / raw)
To: Kevin Hilman, Sekhar Nori, Patrick Titiano, Michael Turquette,
Tejun Heo, Rob Herring, Mark Rutland, Russell King, David Lechner
Cc: linux-ide, devicetree, linux-kernel, linux-arm-kernel,
Bartosz Golaszewski
In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com>
Enable the SATA node for da850-lcdk. We omit the pinctrl property on
purpose - the muxed SATA pins are not hooked up to anything
SATA-related on the lcdk.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
arch/arm/boot/dts/da850-lcdk.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
index afcb482..fbeee3c 100644
--- a/arch/arm/boot/dts/da850-lcdk.dts
+++ b/arch/arm/boot/dts/da850-lcdk.dts
@@ -105,6 +105,10 @@
status = "okay";
};
+&sata {
+ status = "okay";
+};
+
&mdio {
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins>;
--
2.9.3
^ permalink raw reply related
* for-4.10-fixes branch
From: Damien Le Moal @ 2017-01-31 2:47 UTC (permalink / raw)
To: Tejun Heo, linux-ide
Tejun,
Some commits in your for-4.10-fixes branch have not yet been pulled in
Linus 4.10 tree. Is this normal ? Can we expect the fixes to go in rc7 ?
I am concerned about the request sense fix I sent. That bug is breaking
applications and still exists in rc6. Those commits really need to go in.
Best regards.
--
Damien Le Moal, Ph.D.
Sr. Manager, System Software Research Group,
Western Digital Corporation
Damien.LeMoal@wdc.com
(+81) 0466-98-3593 (ext. 513593)
1 kirihara-cho, Fujisawa,
Kanagawa, 252-0888 Japan
www.wdc.com, www.hgst.com
^ permalink raw reply
* Re: [PATCH v7 03/14] ARM: davinci: add a clock lookup entry for the SATA clock
From: Sekhar Nori @ 2017-01-31 15:09 UTC (permalink / raw)
To: Bartosz Golaszewski, Kevin Hilman, Patrick Titiano,
Michael Turquette, Tejun Heo, Rob Herring, Mark Rutland,
Russell King, David Lechner
Cc: linux-ide, linux-kernel, linux-arm-kernel, devicetree
In-Reply-To: <1485770531-6772-4-git-send-email-bgolaszewski@baylibre.com>
On Monday 30 January 2017 03:32 PM, Bartosz Golaszewski wrote:
> This entry is needed for the ahci driver to get a functional clock.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
This patch is not adding a clock lookup entry, but AUXDATA. I fixed the
subject line to:
ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for SATA
while applying.
Thanks,
Sekhar
> arch/arm/mach-davinci/da8xx-dt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
> index 9ee44da..b83e5d1 100644
> --- a/arch/arm/mach-davinci/da8xx-dt.c
> +++ b/arch/arm/mach-davinci/da8xx-dt.c
> @@ -42,6 +42,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
> OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL),
> OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),
> OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL),
> + OF_DEV_AUXDATA("ti,da850-ahci", 0x01e18000, "ahci_da850", NULL),
> {}
> };
>
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox