# \[PATCH\] ARM: AM33XX: clock: Add dcan clock aliases for device-tree

- Subsystems: ARM PORT, OMAP CLOCK FRAMEWORK SUPPORT, OMAP2+ SUPPORT, THE REST
- Maintainers: Russell King, Paul Walmsley, Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Linus Torvalds
- List: linux-arm-kernel
- 5 messages, 2 authors
- Page: https://ratatoskr.run/linux-arm-kernel/2012/08/3914758/t

## \[PATCH\] ARM: AM33XX: clock: Add dcan clock aliases for device-tree

- From: Vaibhav Hiremath \<hidden\>
- Date: 2012-08-27 10:06:40 
- Message: https://ratatoskr.run/linux-arm-kernel/2012/08/3914758.md

```text
Currently, the device names for the dcan module follows the
format "dcan.X", where 'X' is the dcan instance number.
On other side, driver may request for clock with/without con_id
and dev_id, and it is expected that platform should respect this
request and return the requested clock handle.

Now, when using device tree, the format of the device name created
by OF layer is different, "<reg-address>.<device-name>",
assuming that the device-tree "reg" property is specified.
This causes the look-up failure for clock node in dcan driver

To fix this add new dcan clock alias for using device-tree.

Signed-off-by: Vaibhav Hiremath <redacted>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <redacted>
Cc: Grant Likely <redacted>
Cc: Rob Herring <redacted>
---
 arch/arm/mach-omap2/clock33xx_data.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
index ae27de8..a4006b2 100644
--- a/arch/arm/mach-omap2/clock33xx_data.c
+++ b/arch/arm/mach-omap2/clock33xx_data.c
@@ -1027,7 +1027,9 @@ static struct omap_clk am33xx_clks[] = {
 	CLK(NULL,	"cefuse_fck",		&cefuse_fck,	CK_AM33XX),
 	CLK(NULL,	"clkdiv32k_ick",	&clkdiv32k_ick,	CK_AM33XX),
 	CLK(NULL,	"dcan0_fck",		&dcan0_fck,	CK_AM33XX),
+	CLK("481cc000.d_can",	NULL,		&dcan0_fck,	CK_AM33XX),
 	CLK(NULL,	"dcan1_fck",		&dcan1_fck,	CK_AM33XX),
+	CLK("481d0000.d_can",	NULL,		&dcan1_fck,	CK_AM33XX),
 	CLK(NULL,	"debugss_ick",		&debugss_ick,	CK_AM33XX),
 	CLK(NULL,	"pruss_ocp_gclk",	&pruss_ocp_gclk,	CK_AM33XX),
 	CLK("davinci-mcasp.0",  NULL,           &mcasp0_fck,    CK_AM33XX),
-- 
1.7.0.4
```

## Re: \[PATCH\] ARM: AM33XX: clock: Add dcan clock aliases for device-tree

- From: Paul Walmsley \<paul@pwsan.com\>
- Date: 2012-08-27 17:26:55 
- Message: https://ratatoskr.run/linux-arm-kernel/2012/08/3914882.md

```text
Hi

On Mon, 27 Aug 2012, Vaibhav Hiremath wrote:

> Currently, the device names for the dcan module follows the
> format "dcan.X", where 'X' is the dcan instance number.
> On other side, driver may request for clock with/without con_id
> and dev_id, and it is expected that platform should respect this
> request and return the requested clock handle.
> 
> Now, when using device tree, the format of the device name created
> by OF layer is different, "<reg-address>.<device-name>",
> assuming that the device-tree "reg" property is specified.
> This causes the look-up failure for clock node in dcan driver
> 
> To fix this add new dcan clock alias for using device-tree.

Is the dcan driver present in v3.6-rc kernels?  Doesn't look like it but 
maybe it's under an alias.


- Paul
```

## RE: \[PATCH\] ARM: AM33XX: clock: Add dcan clock aliases for device-tree

- From: Hiremath, Vaibhav \<hidden\>
- Date: 2012-08-27 18:02:53 
- Message: https://ratatoskr.run/linux-arm-kernel/2012/08/3914897.md

```text
On Mon, Aug 27, 2012 at 22:50:12, Paul Walmsley wrote:
> Hi
> 
> On Mon, 27 Aug 2012, Vaibhav Hiremath wrote:
> 
> > Currently, the device names for the dcan module follows the
> > format "dcan.X", where 'X' is the dcan instance number.
> > On other side, driver may request for clock with/without con_id
> > and dev_id, and it is expected that platform should respect this
> > request and return the requested clock handle.
> > 
> > Now, when using device tree, the format of the device name created
> > by OF layer is different, "<reg-address>.<device-name>",
> > assuming that the device-tree "reg" property is specified.
> > This causes the look-up failure for clock node in dcan driver
> > 
> > To fix this add new dcan clock alias for using device-tree.
> 
> Is the dcan driver present in v3.6-rc kernels?  

Multiple versions have been submitted already, I have validated using them.
Irrespective of this, it is independent change and required for the driver.

Thanks,
Vaibhav
```

## RE: \[PATCH\] ARM: AM33XX: clock: Add dcan clock aliases for device-tree

- From: Paul Walmsley \<paul@pwsan.com\>
- Date: 2012-08-27 18:36:47 
- Message: https://ratatoskr.run/linux-arm-kernel/2012/08/3914903.md

```text
On Mon, 27 Aug 2012, Hiremath, Vaibhav wrote:

> On Mon, Aug 27, 2012 at 22:50:12, Paul Walmsley wrote:
>
> > Is the dcan driver present in v3.6-rc kernels?  
> 
> Multiple versions have been submitted already, I have validated using them.
> Irrespective of this, it is independent change and required for the driver.

OK, will queue it for 3.7.

- Paul
```

## RE: \[PATCH\] ARM: AM33XX: clock: Add dcan clock aliases for device-tree

- From: Hiremath, Vaibhav \<hidden\>
- Date: 2012-08-27 18:38:50 
- Message: https://ratatoskr.run/linux-arm-kernel/2012/08/3914906.md

```text
On Tue, Aug 28, 2012 at 00:06:45, Paul Walmsley wrote:
> On Mon, 27 Aug 2012, Hiremath, Vaibhav wrote:
> 
> > On Mon, Aug 27, 2012 at 22:50:12, Paul Walmsley wrote:
> >
> > > Is the dcan driver present in v3.6-rc kernels?  
> > 
> > Multiple versions have been submitted already, I have validated using them.
> > Irrespective of this, it is independent change and required for the driver.
> 
> OK, will queue it for 3.7.
> 

Thanks Paul.

Thanks,
Vaibhav
```
