OSDN Git Service

nfp: read chip model from the PluDevice register
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>
Wed, 11 Sep 2019 15:21:18 +0000 (16:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Sep 2019 23:01:00 +0000 (00:01 +0100)
commit421bceb270e21b6db92988923445460c2e498888
tree5e33d143c6379d3b25a7f9813baceedd46a86ff3
parent051ba67447de1294aaacc59752a37f72091d15ed
nfp: read chip model from the PluDevice register

The PluDevice register provides the authoritative chip model/revision.

Since the model number is purely used for reporting purposes, follow
the hardware team convention of subtracting 0x10 from the PluDevice
register to obtain the chip model/revision number.

Suggested-by: Francois H. Theron <francois.theron@netronome.com>
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpplib.c