All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mario Hüttel" <mario.huettel@gmx.net>
To: Franklin S Cooper Jr <fcooper@ti.com>,
	linux-can@vger.kernel.org, wg@grandegger.com, mkl@pengutronix.de,
	b29396@freescale.com, socketcan@hartkopp.net
Subject: Re: MCAN Registers Discrepancy
Date: Thu, 29 Jun 2017 16:52:51 +0200	[thread overview]
Message-ID: <b640c93b-23fe-82dc-b0ec-5c77fea64ed7@gmx.net> (raw)
In-Reply-To: <62a65051-a8f4-0bd9-238c-0e28814e4249@ti.com>


[-- Attachment #1.1: Type: text/plain, Size: 2096 bytes --]

Hello,

you are right. There are/were some incosistencies in the values.

However, the driver used them correctly. The driver version you

talk about is not entirely compatible with the user manual you provided.


I wrote some patches back in April which add support for the newer M_CAN

versions up to 3.2.X:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/net/can/m_can

These should work as intended.

Before, the driver could only handle IP versions 3.0.X.


Mario



On 06/28/2017 11:49 PM, Franklin S Cooper Jr wrote:
> Hi,
>
> When looking at the latest versions of the MCAN user manual it seems
> that there is a discrepancy between the various BTR_XX_MASK and
> BTR_XX_SHIFT values. For example BTR_TSEG2_MASK is set to 0xF and
> BTR_TSEG2_SHIFT is 4. However, based on page 21 of the latest version of
> the MCAN User Manual NTSEG2 starts at bit 0. Therefore, it should have a
> shift value of 0. Also it is a 7 bit field so its mask should be 0x7F. I
> see similar issues with FBTR_XXX_MASK values.
>
> So the original driver mentioned it was based on rev version 3.1.0 of
> the User Manual while the latest version publicly available is 3.2.12.
> Since I don't see any current users of this driver in upstream I am
> unsure if this is just a bug in the code or if the current values are
> correct for older versions of the IP.
>
> Does anyone have a copy of this older document available that they can
> share? Or at the very least verify that the current values were correct
> in older revisions of the MCAN IP? I need to make updates to the drivers
> but I want to avoid breaking things for other people.
>
> Latest version of the MCAN User Manual can be found at:
> http://www.bosch-semiconductors.de/media/automotive_electronics/pdf_2/ipmodules_3/m_can_m_ttcan_1/mcan_users_manual_v3212.pdf
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-06-29 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 21:49 MCAN Registers Discrepancy Franklin S Cooper Jr
2017-06-29 14:52 ` Mario Hüttel [this message]
2017-06-29 15:13   ` Franklin S Cooper Jr
2017-06-29 17:38 ` Oliver Hartkopp
2017-06-29 18:19   ` Franklin S Cooper Jr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b640c93b-23fe-82dc-b0ec-5c77fea64ed7@gmx.net \
    --to=mario.huettel@gmx.net \
    --cc=b29396@freescale.com \
    --cc=fcooper@ti.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.