NTB: switchtec_ntb: Implement doorbell registers
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 3 Aug 2017 18:19:51 +0000 (12:19 -0600)
committerJon Mason <jdmason@kudzu.us>
Sun, 19 Nov 2017 01:37:12 +0000 (20:37 -0500)
commit6619bf954984e625f5ba46e810ed08054309efab
treedb348c9b943f62bc559a99a89e524d830192d4ac
parent0ee28f26f378b31e87d35ae7a33e9b50b3283c84
NTB: switchtec_ntb: Implement doorbell registers

Pretty straightforward implementation of doorbell registers.
The shift and mask were setup in an earlier patch and this just hooks
up the appropriate portion of the IDB register as the local doorbells
and the opposite portion of ODB as the peer doorbells. The DB mask is
protected by a spinlock to avoid concurrent read-modify-write accesses.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
Acked-by: Allen Hubbe <Allen.Hubbe@dell.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/mscc/ntb_hw_switchtec.c