diff options
author | Gerhard Sittig <gsi@denx.de> | 2013-08-23 13:09:02 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-08-29 22:49:35 +0200 |
commit | 3a09b12e0c2ef26a0e2230606a6159d3038a1572 (patch) | |
tree | c0382dcf16c39bd5eed4dbe7878afe18373c5eea /drivers/net/can | |
parent | 7ec06da81d2b98859b558d8d551a0c4e3d9516a3 (diff) |
can: mscan: add a comment on reg to idx mapping
add a comment about the magic of deriving an MSCAN component index
from the peripheral's physical address / register offset
Cc: linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Gerhard Sittig <gsi@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/mscan/mpc5xxx_can.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index 5b0ee8ef588..bc422ba3d13 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c @@ -148,7 +148,10 @@ static u32 mpc512x_can_get_clock(struct platform_device *ofdev, goto exit_put; } - /* Determine the MSCAN device index from the physical address */ + /* Determine the MSCAN device index from the peripheral's + * physical address. Register address offsets against the + * IMMR base are: 0x1300, 0x1380, 0x2300, 0x2380 + */ pval = of_get_property(ofdev->dev.of_node, "reg", &plen); BUG_ON(!pval || plen < sizeof(*pval)); clockidx = (*pval & 0x80) ? 1 : 0; |