From: Marc Kleine-Budde <mkl@pengutronix.de>
To: AnilKumar Ch <anilkumar@ti.com>
Cc: wg@grandegger.com, linux-can@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org, grant.likely@secretlab.ca,
anantgole@ti.com, nsekhar@ti.com
Subject: Re: [PATCH v2 1/2] can: c_can: Add device tree support to Bosch C_CAN/D_CAN controller
Date: Wed, 25 Jul 2012 15:47:52 +0200 [thread overview]
Message-ID: <500FF908.1000307@pengutronix.de> (raw)
In-Reply-To: <1343218729-16954-2-git-send-email-anilkumar@ti.com>
[-- Attachment #1: Type: text/plain, Size: 3066 bytes --]
On 07/25/2012 02:18 PM, AnilKumar Ch wrote:
> Add device tree support to C_CAN/D_CAN controller and usage details
> are added to device tree documentation. Driver was tested on AM335x
> EVM.
Does not apply to linux-can-next, as Viresh Kumar's patch "net/c_can:
remove conditional compilation of clk code" is not yet included. I
suggest to delay this patch until we have Viresh's patch in net-next.
See comment inline.
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> ---
> .../devicetree/bindings/net/can/c_can.txt | 37 +++++++++++++
> drivers/net/can/c_can/c_can.h | 5 +-
> drivers/net/can/c_can/c_can_platform.c | 57 ++++++++++++++------
> 3 files changed, 80 insertions(+), 19 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/can/c_can.txt
>
> diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt
> new file mode 100644
> index 0000000..dc4aec5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/c_can.txt
> @@ -0,0 +1,37 @@
> +Bosch C_CAN/D_CAN controller Device Tree Bindings
> +-------------------------------------------------
> +
> +Required properties:
> +- compatible : Should be "bosch,c_can" for C_CAN controllers and
> + "bosch,d_can" for D_CAN controllers.
> +- reg : physical base address and size of the C_CAN/D_CAN
> + registers map
> +- interrupts : property with a value describing the interrupt
> + number
> +- interrupt-parent : The parent interrupt controller
> +
> +Optional properties:
> +- ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the
> + instance number
> +
> +Note: "ti,hwmods" field is used to fetch the base address and irq
> +resources from TI, omap hwmod data base during device registration.
> +Future plan is to migrate hwmod data base contents into device tree
> +blob so that, all the required data will be used from device tree dts
> +file.
> +
> +Examples:
> +
> + d_can@481D0000 {
> + compatible = "bosch,d_can";
> + reg = <0x481D0000 0x1000>;
> + interrupts = <55 0x4>;
> + interrupt-parent = <&intc>;
> + };
> +
> +(or)
> +
> + d_can@481D0000 {
> + compatible = "bosch,d_can";
> + ti,hwmods = "d_can1";
> + };
> diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net/can/c_can/c_can.h
> index 01a7049..4e56baa 100644
> --- a/drivers/net/can/c_can/c_can.h
> +++ b/drivers/net/can/c_can/c_can.h
> @@ -143,8 +143,9 @@ static const u16 reg_map_d_can[] = {
> };
>
> enum c_can_dev_id {
> - C_CAN_DEVTYPE,
> - D_CAN_DEVTYPE,
> + BOSCH_C_CAN_PLATFORM,
> + BOSCH_C_CAN,
> + BOSCH_D_CAN,
Note: these symbols are used in "drivers/net/can/c_can/c_can_pci.c", too.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-07-25 13:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 12:18 [PATCH v2 0/2] Add DT support to C_CAN/D_CAN controller AnilKumar Ch
[not found] ` <1343218729-16954-1-git-send-email-anilkumar-l0cyMroinI0@public.gmane.org>
2012-07-25 12:18 ` [PATCH v2 1/2] can: c_can: Add device tree support to Bosch " AnilKumar Ch
2012-07-25 13:47 ` Marc Kleine-Budde [this message]
[not found] ` <500FF908.1000307-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-25 14:12 ` AnilKumar, Chimata
[not found] ` <331ABD5ECB02734CA317220B2BBEABC13EA037AA-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-08-02 7:59 ` Marc Kleine-Budde
[not found] ` <501A3370.5090906-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-08-02 8:51 ` AnilKumar, Chimata
2012-07-25 12:18 ` [PATCH RESEND 2/2] can: c_can: Add runtime PM " AnilKumar Ch
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=500FF908.1000307@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=anantgole@ti.com \
--cc=anilkumar@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-can@vger.kernel.org \
--cc=nsekhar@ti.com \
--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.