]> git.baikalelectronics.ru Git - kernel.git/commit
libata: Assign OF node to the SCSI device
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 22 Feb 2020 11:20:57 +0000 (12:20 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 25 Mar 2020 16:29:35 +0000 (10:29 -0600)
commit8aa8110a0db9639c2121331517e2a636c04caffd
tree172cdb26f3c607ec321c4b4d0b420425a0f1a994
parentd4d166ed6c0a7a6bae8715af39f86326b4247600
libata: Assign OF node to the SCSI device

When we spawn a SCSI device from an ATA device in libata-scsi
the SCSI device had no relation to the device tree.

The DT binding allows us to define port nodes under a
PATA (IDE) or SATA host controller, so we can have proper device
nodes for these devices.

If OF is enabled, walk the children of the host controller node
to see if there is a valid device tree node to assign. The reg
is used to match to ID 0 for the master device and ID 1 for the
slave device.

The corresponding device tree bindings have been accepted by
the device tree maintainers.

Cc: Chris Healy <cphealy@gmail.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/libata-scsi.c