From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Thomas Körper" <thomas.koerper@esd.eu>, linux-can@vger.kernel.org
Subject: Re: [PATCH v2 1/1] can: Add support for esd CAN PCIe/402 card
Date: Fri, 31 Oct 2014 19:43:08 +0100 [thread overview]
Message-ID: <5453D83C.8030707@hartkopp.net> (raw)
In-Reply-To: <1414136470-544-1-git-send-email-thomas.koerper@esd.eu>
Hi Thomas,
I saw one of your 402 cards on the plugfest last Tuesday :-)
On 24.10.2014 09:41, Thomas Körper wrote:
> drivers/net/can/esd/esd402_pci.c | 1015 ++++++++++++++++++++++++++++++++++++++
> drivers/net/can/esd/esdacc.c | 69 +++
> drivers/net/can/esd/esdacc.h | 396 +++++++++++++++
Hm - looking at esd402_pci.c there are many functions which look very generic
and should therefore be moved to esdacc.c .
E.g.
> +static void pci402_coremsg_rxtxdone(struct acc_core *core,
> + const struct acc_bmmsg_rxtxdone *msg)
> +static void pci402_coremsg_txabort(struct acc_core *core,
> + const struct acc_bmmsg_txabort *msg)
> +static void pci402_coremsg_overrun(struct acc_core *core,
> + const struct acc_bmmsg_overrun *msg)
> +static void pci402_coremsg_buserr(struct acc_core *core,
> + const struct acc_bmmsg_buserr *msg)
... etc
esd402_pci.c should mainly contain the PCI and card specific initialization stuff.
E.g. linux/drivers/net/can/sja1000/plx_pci.c is a good example what content
should be hosted in esd402_pci.c
This is something for esdacc.c too:
> +
> +/* For cards with FPGA Version < PCI402_VERSION_NEWBTR */
> +static const struct can_bittiming_const pci402_bittiming_const_old = {
> + .name = "pci402_old",
> + .tseg1_min = 1,
> + .tseg1_max = 16,
> + .tseg2_min = 1,
> + .tseg2_max = 8,
> + .sjw_max = 4,
> + .brp_min = 1,
> + .brp_max = 256,
> + .brp_inc = 1,
> +};
> +
> +static const struct can_bittiming_const pci402_bittiming_const = {
> + .name = "pci402",
> + .tseg1_min = 1,
> + .tseg1_max = 256,
> + .tseg2_min = 1,
> + .tseg2_max = 128,
> + .sjw_max = 128,
> + .brp_min = 1,
> + .brp_max = 256,
> + .brp_inc = 1,
> +};
> +
Regards,
Oliver
prev parent reply other threads:[~2014-10-31 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 7:41 [PATCH v2 1/1] can: Add support for esd CAN PCIe/402 card Thomas Körper
2014-10-31 18:43 ` Oliver Hartkopp [this message]
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=5453D83C.8030707@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=thomas.koerper@esd.eu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).