From: Robin Holt <hidden> Date: 2011-08-10 03:06:13
With all the patches applied, my p1010rdb works for communicating between
its two can ports and also can communicate with an external PSOC. I have
done no testing beyond compile testing on an arm system as I have no
access to an arm based system.
For the first three patches in the series, I believe they are all ready
for forwarding to David S. Miller for the netdev tree. I think patch
4 is ready for submission to the PPC85xx maintainer. Patch 5 changed
from the previous post by adding a second compatible string for the
fsl,p1010_flexcan.
Thanks,
Robin Holt
From: Robin Holt <hidden> Date: 2011-08-10 03:06:17
powerpc does not have a mach-####/clock.h. When testing, I found neither
arm nor powerpc needed the mach/clock.h at all so I removed it.
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <redacted>
To: U Bhaskar-B22300 <redacted>
Cc: socketcan-core@lists.berlios.de
Cc: netdev@vger.kernel.org
Cc: PPC list <redacted>
---
drivers/net/can/flexcan.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
From: Robin Holt <hidden> Date: 2011-08-10 03:06:27
Make flexcan driver handle register reads in the appropriate endianess.
This was a basic search and replace and then define some inlines.
Signed-off-by: Robin Holt <redacted>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <redacted>
To: U Bhaskar-B22300 <redacted>
Cc: socketcan-core@lists.berlios.de
Cc: netdev@vger.kernel.org
Cc: PPC list <redacted>
---
drivers/net/can/flexcan.c | 140 ++++++++++++++++++++++++++------------------
1 files changed, 83 insertions(+), 57 deletions(-)
@@ -696,7 +721,7 @@ static int flexcan_chip_start(struct net_device *dev)*(FLEXCAN_CTRL_ERR_MSK),too.Otherwisewedon'tgetany*warningorbuspassiveinterrupts.*/-reg_ctrl=readl(®s->ctrl);+reg_ctrl=flexcan_read(®s->ctrl);reg_ctrl&=~FLEXCAN_CTRL_TSYN;reg_ctrl|=FLEXCAN_CTRL_BOFF_REC|FLEXCAN_CTRL_LBUF|FLEXCAN_CTRL_ERR_STATE|FLEXCAN_CTRL_ERR_MSK;
@@ -704,38 +729,39 @@ static int flexcan_chip_start(struct net_device *dev)/* save for later use */priv->reg_ctrl_default=reg_ctrl;dev_dbg(dev->dev.parent,"%s: writing ctrl=0x%08x",__func__,reg_ctrl);-writel(reg_ctrl,®s->ctrl);+flexcan_write(reg_ctrl,®s->ctrl);for(i=0;i<ARRAY_SIZE(regs->cantxfg);i++){-writel(0,®s->cantxfg[i].can_ctrl);-writel(0,®s->cantxfg[i].can_id);-writel(0,®s->cantxfg[i].data[0]);-writel(0,®s->cantxfg[i].data[1]);+flexcan_write(0,®s->cantxfg[i].can_ctrl);+flexcan_write(0,®s->cantxfg[i].can_id);+flexcan_write(0,®s->cantxfg[i].data[0]);+flexcan_write(0,®s->cantxfg[i].data[1]);/* put MB into rx queue */-writel(FLEXCAN_MB_CNT_CODE(0x4),®s->cantxfg[i].can_ctrl);+flexcan_write(FLEXCAN_MB_CNT_CODE(0x4),+®s->cantxfg[i].can_ctrl);}/* acceptance mask/acceptance code (accept everything) */-writel(0x0,®s->rxgmask);-writel(0x0,®s->rx14mask);-writel(0x0,®s->rx15mask);+flexcan_write(0x0,®s->rxgmask);+flexcan_write(0x0,®s->rx14mask);+flexcan_write(0x0,®s->rx15mask);flexcan_transceiver_switch(priv,1);/* synchronize with the can bus */-reg_mcr=readl(®s->mcr);+reg_mcr=flexcan_read(®s->mcr);reg_mcr&=~FLEXCAN_MCR_HALT;-writel(reg_mcr,®s->mcr);+flexcan_write(reg_mcr,®s->mcr);priv->can.state=CAN_STATE_ERROR_ACTIVE;/* enable FIFO interrupts */-writel(FLEXCAN_IFLAG_DEFAULT,®s->imask1);+flexcan_write(FLEXCAN_IFLAG_DEFAULT,®s->imask1);/* print chip status */dev_dbg(dev->dev.parent,"%s: reading mcr=0x%08x ctrl=0x%08x\n",-__func__,readl(®s->mcr),readl(®s->ctrl));+__func__,flexcan_read(®s->mcr),flexcan_read(®s->ctrl));return0;
@@ -757,12 +783,12 @@ static void flexcan_chip_stop(struct net_device *dev)u32reg;/* Disable all interrupts */-writel(0,®s->imask1);+flexcan_write(0,®s->imask1);/* Disable + halt module */-reg=readl(®s->mcr);+reg=flexcan_read(®s->mcr);reg|=FLEXCAN_MCR_MDIS|FLEXCAN_MCR_HALT;-writel(reg,®s->mcr);+flexcan_write(reg,®s->mcr);flexcan_transceiver_switch(priv,0);priv->can.state=CAN_STATE_STOPPED;
@@ -854,24 +880,24 @@ static int __devinit register_flexcandev(struct net_device *dev)/* select "bus clock", chip must be disabled */flexcan_chip_disable(priv);-reg=readl(®s->ctrl);+reg=flexcan_read(®s->ctrl);reg|=FLEXCAN_CTRL_CLK_SRC;-writel(reg,®s->ctrl);+flexcan_write(reg,®s->ctrl);flexcan_chip_enable(priv);/* set freeze, halt and activate FIFO, restrict register access */-reg=readl(®s->mcr);+reg=flexcan_read(®s->mcr);reg|=FLEXCAN_MCR_FRZ|FLEXCAN_MCR_HALT|FLEXCAN_MCR_FEN|FLEXCAN_MCR_SUPV;-writel(reg,®s->mcr);+flexcan_write(reg,®s->mcr);/**Currentlyweonlysupportnewerversionsofthiscore*featuringaRXFIFO.OldercoresfoundonsomeColdfire*derivatesarenotyetsupported.*/-reg=readl(®s->mcr);+reg=flexcan_read(®s->mcr);if(!(reg&FLEXCAN_MCR_FEN)){dev_err(dev->dev.parent,"Could not enable RX FIFO, unsupported core\n");
From: Robin Holt <hidden> Date: 2011-08-10 03:06:36
On powerpc, the OpenFirmware devices are not matched without specifying
an of_match array. Introduce that array as that is used for matching
on the Freescale P1010 processor.
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <redacted>
To: U Bhaskar-B22300 <redacted>
Cc: socketcan-core@lists.berlios.de
Cc: netdev@vger.kernel.org
Cc: PPC list <redacted>
---
drivers/net/can/flexcan.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
From: Robin Holt <hidden> Date: 2011-08-10 03:06:47
I added a simple clock source for the p1010rdb so the flexcan driver
could determine a clock frequency. The p1010 can device only has an
oscillator of system bus frequency divided by 2.
Signed-off-by: Robin Holt <redacted>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>,
Acked-by: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
arch/powerpc/platforms/85xx/Kconfig | 2 +
arch/powerpc/platforms/85xx/Makefile | 2 +
arch/powerpc/platforms/85xx/clock.c | 53 ++++++++++++++++++++++++++++++++
arch/powerpc/platforms/85xx/p1010rdb.c | 8 +++++
4 files changed, 65 insertions(+), 0 deletions(-)
create mode 100644 arch/powerpc/platforms/85xx/clock.c
From: Robin Holt <hidden> Date: 2011-08-10 03:06:55
In working with the socketcan developers, we have come to the conclusion
the Documentation...fsl-flexcan.txt device tree documentation needs to
be cleaned up. The driver does not depend upon any properties other
than the required properties so we are removing the file. Additionally,
the p1010*dts* files are not following the standard for node naming in
that they have a trailing -v1.0.
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 --------------------
arch/powerpc/boot/dts/p1010rdb.dts | 8 ---
arch/powerpc/boot/dts/p1010si.dtsi | 8 +-
3 files changed, 4 insertions(+), 73 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and interrupt-properties, you can-also specify which clock source shall be used for the controller.--CPI Clock- Can Protocol Interface Clock- This CLK_SRC bit of CTRL(control register) selects the clock source to- the CAN Protocol Interface(CPI) to be either the peripheral clock- (driven by the PLL) or the crystal oscillator clock. The selected clock- is the one fed to the prescaler to generate the Serial Clock (Sclock).- The PRESDIV field of CTRL(control register) controls a prescaler that- generates the Serial Clock (Sclock), whose period defines the- time quantum used to compose the CAN waveform.--Can Engine Clock Source- There are two sources for CAN clock- - Platform Clock It represents the bus clock- - Oscillator Clock-- Peripheral Clock (PLL)- --------------- |- --------- -------------- | |CPI Clock | Prescaler | Sclock- | |---------------->| (1.. 256) |------------>- --------- -------------- | |- -------------- ---------------------CLK_SRC- Oscillator Clock--- fsl,flexcan-clock-source : CAN Engine Clock Source.This property selects- the peripheral clock. PLL clock is fed to the- prescaler to generate the Serial Clock (Sclock).- Valid values are "oscillator" and "platform"- "oscillator": CAN engine clock source is oscillator clock.- "platform" The CAN engine clock source is the bus clock- (platform clock).--- fsl,flexcan-clock-divider : for the reference and system clock, an additional- clock divider can be specified.-- clock-frequency: frequency required to calculate the bitrate for FlexCAN.--Note:- - v1.0 of flexcan-v1.0 represent the IP block version for P1010 SOC.- - P1010 does not have oscillator as the Clock Source.So the default- Clock Source is platform clock.-Examples:-- can0@1c000 {- compatible = "fsl,flexcan-v1.0";- reg = <0x1c000 0x1000>;- interrupts = <48 0x2>;- interrupt-parent = <&mpic>;- fsl,flexcan-clock-source = "platform";- fsl,flexcan-clock-divider = <2>;- clock-frequency = <fixed by u-boot>;- };
From: Robert Schwebel <hidden> Date: 2011-08-10 08:15:41
Robin,
On Tue, Aug 09, 2011 at 10:06:04PM -0500, Robin Holt wrote:
In working with the socketcan developers, we have come to the conclusion
the Documentation...fsl-flexcan.txt device tree documentation needs to
be cleaned up. The driver does not depend upon any properties other
than the required properties so we are removing the file. Additionally,
the p1010*dts* files are not following the standard for node naming in
that they have a trailing -v1.0.
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 --------------------
arch/powerpc/boot/dts/p1010rdb.dts | 8 ---
arch/powerpc/boot/dts/p1010si.dtsi | 8 +-
3 files changed, 4 insertions(+), 73 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
I suggest that you set devicetree-discuss@lists.ozlabs.org and Grant
Likely on Cc: for this patch.
rsc
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2011-08-10 09:56:15
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted hunk
I added a simple clock source for the p1010rdb so the flexcan driver
could determine a clock frequency. The p1010 can device only has an
oscillator of system bus frequency divided by 2.
Signed-off-by: Robin Holt <redacted>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>,
Acked-by: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
arch/powerpc/platforms/85xx/Kconfig | 2 +
arch/powerpc/platforms/85xx/Makefile | 2 +
arch/powerpc/platforms/85xx/clock.c | 53 ++++++++++++++++++++++++++++++++
arch/powerpc/platforms/85xx/p1010rdb.c | 8 +++++
4 files changed, 65 insertions(+), 0 deletions(-)
create mode 100644 arch/powerpc/platforms/85xx/clock.c
From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2011-08-10 10:02:10
On 08/10/2011 05:05 AM, Robin Holt wrote:
With all the patches applied, my p1010rdb works for communicating between
its two can ports and also can communicate with an external PSOC. I have
done no testing beyond compile testing on an arm system as I have no
access to an arm based system.
For the first three patches in the series, I believe they are all ready
for forwarding to David S. Miller for the netdev tree. I think patch
4 is ready for submission to the PPC85xx maintainer. Patch 5 changed
from the previous post by adding a second compatible string for the
fsl,p1010_flexcan.
One remark for the subjects. It seems no one is using "[$subsystem]"
anymore, but rather "$subsystem:".
cheers, 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 |
From: Robin Holt <hidden> Date: 2011-08-10 10:09:22
Grant,
Do you need this patch resent with you on the Cc: list or can you pick
up the discussion from here? I am just trying to minimize noise on
the mailing lists if it is not needed.
The essence of the discussion to this point is:
1) Freescale built a board support package for a new processor and eval
board (p1010) based upon some older boards.
2) As part of that effort, they made changes as they saw fit to get it
working without submitting those changes to the community.
3) In the case of the flexcan device, that included defining a device
tree node for the integrated Controller Area Network device and set
.compatible="fsl,flexcan-v1.0". Apparently this was copied from
another device, possibly mscan.
4) In an effort to get my p1010rdb eval board working with a community
kernel, I started submitting patches for flexcan which have evolved
to the point of nearly being accepted with the exception of we need
to settle on the node's .compatible= strings and whether it should
be documented.
5) To this point, I believe the concensus has settled on
"fsl,p1010-flexcan" and "fsl,flexcan" as the compatible strings.
This leaves the most flexibility for segragating future specific
revisions of the flexcan interface if needed.
6) I failed to Cc: you or the device tree list when I submitted version
10 of the patches. I have added both to the patch header so they
will be included in the next pass.
Thanks,
Robin Holt
On Tue, Aug 09, 2011 at 10:06:04PM -0500, Robin Holt wrote:
quoted hunk
In working with the socketcan developers, we have come to the conclusion
the Documentation...fsl-flexcan.txt device tree documentation needs to
be cleaned up. The driver does not depend upon any properties other
than the required properties so we are removing the file. Additionally,
the p1010*dts* files are not following the standard for node naming in
that they have a trailing -v1.0.
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 --------------------
arch/powerpc/boot/dts/p1010rdb.dts | 8 ---
arch/powerpc/boot/dts/p1010si.dtsi | 8 +-
3 files changed, 4 insertions(+), 73 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and interrupt-properties, you can-also specify which clock source shall be used for the controller.--CPI Clock- Can Protocol Interface Clock- This CLK_SRC bit of CTRL(control register) selects the clock source to- the CAN Protocol Interface(CPI) to be either the peripheral clock- (driven by the PLL) or the crystal oscillator clock. The selected clock- is the one fed to the prescaler to generate the Serial Clock (Sclock).- The PRESDIV field of CTRL(control register) controls a prescaler that- generates the Serial Clock (Sclock), whose period defines the- time quantum used to compose the CAN waveform.--Can Engine Clock Source- There are two sources for CAN clock- - Platform Clock It represents the bus clock- - Oscillator Clock-- Peripheral Clock (PLL)- --------------- |- --------- -------------- | |CPI Clock | Prescaler | Sclock- | |---------------->| (1.. 256) |------------>- --------- -------------- | |- -------------- ---------------------CLK_SRC- Oscillator Clock--- fsl,flexcan-clock-source : CAN Engine Clock Source.This property selects- the peripheral clock. PLL clock is fed to the- prescaler to generate the Serial Clock (Sclock).- Valid values are "oscillator" and "platform"- "oscillator": CAN engine clock source is oscillator clock.- "platform" The CAN engine clock source is the bus clock- (platform clock).--- fsl,flexcan-clock-divider : for the reference and system clock, an additional- clock divider can be specified.-- clock-frequency: frequency required to calculate the bitrate for FlexCAN.--Note:- - v1.0 of flexcan-v1.0 represent the IP block version for P1010 SOC.- - P1010 does not have oscillator as the Clock Source.So the default- Clock Source is platform clock.-Examples:-- can0@1c000 {- compatible = "fsl,flexcan-v1.0";- reg = <0x1c000 0x1000>;- interrupts = <48 0x2>;- interrupt-parent = <&mpic>;- fsl,flexcan-clock-source = "platform";- fsl,flexcan-clock-divider = <2>;- clock-frequency = <fixed by u-boot>;- };
From: Robin Holt <hidden> Date: 2011-08-10 10:11:15
On Wed, Aug 10, 2011 at 12:01:58PM +0200, Marc Kleine-Budde wrote:
On 08/10/2011 05:05 AM, Robin Holt wrote:
quoted
With all the patches applied, my p1010rdb works for communicating between
its two can ports and also can communicate with an external PSOC. I have
done no testing beyond compile testing on an arm system as I have no
access to an arm based system.
For the first three patches in the series, I believe they are all ready
for forwarding to David S. Miller for the netdev tree. I think patch
4 is ready for submission to the PPC85xx maintainer. Patch 5 changed
from the previous post by adding a second compatible string for the
fsl,p1010_flexcan.
One remark for the subjects. It seems no one is using "[$subsystem]"
anymore, but rather "$subsystem:".
I will, one day, get these patches subject lines correct ;)
Did you happen to get a chance to test the patches on arm?
Thanks,
Robin
git is even picker then me: "new blank line at EOF."
please fix
That reminded me that I have slacked on using checkpatch.pl in a few
resends and it really does not like this patch at all so I will rework
the patch with its concerns. I am going to hold off on resending until
there are more substantial changes.
Thanks,
Robin
From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2011-08-10 10:24:28
On 08/10/2011 12:11 PM, Robin Holt wrote:
On Wed, Aug 10, 2011 at 12:01:58PM +0200, Marc Kleine-Budde wrote:
quoted
On 08/10/2011 05:05 AM, Robin Holt wrote:
quoted
With all the patches applied, my p1010rdb works for communicating between
its two can ports and also can communicate with an external PSOC. I have
done no testing beyond compile testing on an arm system as I have no
access to an arm based system.
For the first three patches in the series, I believe they are all ready
for forwarding to David S. Miller for the netdev tree. I think patch
4 is ready for submission to the PPC85xx maintainer. Patch 5 changed
from the previous post by adding a second compatible string for the
fsl,p1010_flexcan.
One remark for the subjects. It seems no one is using "[$subsystem]"
anymore, but rather "$subsystem:".
I will, one day, get these patches subject lines correct ;)
Did you happen to get a chance to test the patches on arm?
It's still compiling...
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 |
From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2011-08-10 11:10:09
On 08/10/2011 05:05 AM, Robin Holt wrote:
With all the patches applied, my p1010rdb works for communicating between
its two can ports and also can communicate with an external PSOC. I have
done no testing beyond compile testing on an arm system as I have no
access to an arm based system.
For the first three patches in the series, I believe they are all ready
for forwarding to David S. Miller for the netdev tree. I think patch
4 is ready for submission to the PPC85xx maintainer. Patch 5 changed
from the previous post by adding a second compatible string for the
fsl,p1010_flexcan.
This patch series is working on phytec's pcm043 (mx35) based on current
net-next. Feel free to add my Acked-by to all patches.
good work,
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 |
From: Wolfgang Grandegger <hidden> Date: 2011-08-10 13:47:52
Hi Robin,
On 08/10/2011 05:06 AM, Robin Holt wrote:
In working with the socketcan developers, we have come to the conclusion
the Documentation...fsl-flexcan.txt device tree documentation needs to
be cleaned up. The driver does not depend upon any properties other
Your first sentence could be misleading. Please just describe what the
patch does and why, something like:
"This patch cleans up the documentation of the device-tree binding for
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
than the required properties so we are removing the file. Additionally,
the p1010*dts* files are not following the standard for node naming in
that they have a trailing -v1.0.
quoted hunk
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 --------------------
arch/powerpc/boot/dts/p1010rdb.dts | 8 ---
arch/powerpc/boot/dts/p1010si.dtsi | 8 +-
3 files changed, 4 insertions(+), 73 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and interrupt-properties, you can-also specify which clock source shall be used for the controller.--CPI Clock- Can Protocol Interface Clock- This CLK_SRC bit of CTRL(control register) selects the clock source to- the CAN Protocol Interface(CPI) to be either the peripheral clock- (driven by the PLL) or the crystal oscillator clock. The selected clock- is the one fed to the prescaler to generate the Serial Clock (Sclock).- The PRESDIV field of CTRL(control register) controls a prescaler that- generates the Serial Clock (Sclock), whose period defines the- time quantum used to compose the CAN waveform.--Can Engine Clock Source- There are two sources for CAN clock- - Platform Clock It represents the bus clock- - Oscillator Clock-- Peripheral Clock (PLL)- --------------- |- --------- -------------- | |CPI Clock | Prescaler | Sclock- | |---------------->| (1.. 256) |------------>- --------- -------------- | |- -------------- ---------------------CLK_SRC- Oscillator Clock--- fsl,flexcan-clock-source : CAN Engine Clock Source.This property selects- the peripheral clock. PLL clock is fed to the- prescaler to generate the Serial Clock (Sclock).- Valid values are "oscillator" and "platform"- "oscillator": CAN engine clock source is oscillator clock.- "platform" The CAN engine clock source is the bus clock- (platform clock).--- fsl,flexcan-clock-divider : for the reference and system clock, an additional- clock divider can be specified.-- clock-frequency: frequency required to calculate the bitrate for FlexCAN.--Note:- - v1.0 of flexcan-v1.0 represent the IP block version for P1010 SOC.- - P1010 does not have oscillator as the Clock Source.So the default- Clock Source is platform clock.-Examples:-- can0@1c000 {- compatible = "fsl,flexcan-v1.0";- reg = <0x1c000 0x1000>;- interrupts = <48 0x2>;- interrupt-parent = <&mpic>;- fsl,flexcan-clock-source = "platform";- fsl,flexcan-clock-divqider = <2>;- clock-frequency = <fixed by u-boot>;- };
Do we really want to drop the documentation for that binding. I think
something like the following text would be still useful:
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
Required properties:
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
Example:
can@1c000 {
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
reg = <0x1c000 0x1000>;
interrupts = <48 0x2>;
interrupt-parent = <&mpic>;
};
-------------------------
What do you think?
From: Robin Holt <hidden> Date: 2011-08-10 14:15:53
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
Hi Robin,
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the conclusion
the Documentation...fsl-flexcan.txt device tree documentation needs to
be cleaned up. The driver does not depend upon any properties other
Your first sentence could be misleading. Please just describe what the
patch does and why, something like:
"This patch cleans up the documentation of the device-tree binding for
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
I borrowed heavily from your message. ;)
quoted
than the required properties so we are removing the file. Additionally,
the p1010*dts* files are not following the standard for node naming in
that they have a trailing -v1.0.
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 --------------------
arch/powerpc/boot/dts/p1010rdb.dts | 8 ---
arch/powerpc/boot/dts/p1010si.dtsi | 8 +-
3 files changed, 4 insertions(+), 73 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and interrupt-properties, you can-also specify which clock source shall be used for the controller.--CPI Clock- Can Protocol Interface Clock- This CLK_SRC bit of CTRL(control register) selects the clock source to- the CAN Protocol Interface(CPI) to be either the peripheral clock- (driven by the PLL) or the crystal oscillator clock. The selected clock- is the one fed to the prescaler to generate the Serial Clock (Sclock).- The PRESDIV field of CTRL(control register) controls a prescaler that- generates the Serial Clock (Sclock), whose period defines the- time quantum used to compose the CAN waveform.--Can Engine Clock Source- There are two sources for CAN clock- - Platform Clock It represents the bus clock- - Oscillator Clock-- Peripheral Clock (PLL)- --------------- |- --------- -------------- | |CPI Clock | Prescaler | Sclock- | |---------------->| (1.. 256) |------------>- --------- -------------- | |- -------------- ---------------------CLK_SRC- Oscillator Clock--- fsl,flexcan-clock-source : CAN Engine Clock Source.This property selects- the peripheral clock. PLL clock is fed to the- prescaler to generate the Serial Clock (Sclock).- Valid values are "oscillator" and "platform"- "oscillator": CAN engine clock source is oscillator clock.- "platform" The CAN engine clock source is the bus clock- (platform clock).--- fsl,flexcan-clock-divider : for the reference and system clock, an additional- clock divider can be specified.-- clock-frequency: frequency required to calculate the bitrate for FlexCAN.--Note:- - v1.0 of flexcan-v1.0 represent the IP block version for P1010 SOC.- - P1010 does not have oscillator as the Clock Source.So the default- Clock Source is platform clock.-Examples:-- can0@1c000 {- compatible = "fsl,flexcan-v1.0";- reg = <0x1c000 0x1000>;- interrupts = <48 0x2>;- interrupt-parent = <&mpic>;- fsl,flexcan-clock-source = "platform";- fsl,flexcan-clock-divqider = <2>;- clock-frequency = <fixed by u-boot>;- };
Do we really want to drop the documentation for that binding. I think
something like the following text would be still useful:
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
Required properties:
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
Example:
can@1c000 {
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
reg = <0x1c000 0x1000>;
interrupts = <48 0x2>;
interrupt-parent = <&mpic>;
};
-------------------------
Done, except the
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
line is
compatible = "fsl,flexcan", "fsl,flexcan-p1010";
From: Robin Holt <hidden> Date: 2011-08-10 14:33:08
On Tue, Aug 09, 2011 at 10:06:02PM -0500, Robin Holt wrote:
quoted hunk
On powerpc, the OpenFirmware devices are not matched without specifying
an of_match array. Introduce that array as that is used for matching
on the Freescale P1010 processor.
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <redacted>
To: U Bhaskar-B22300 <redacted>
Cc: socketcan-core@lists.berlios.de
Cc: netdev@vger.kernel.org
Cc: PPC list <redacted>
---
drivers/net/can/flexcan.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
@@ -1027,8 +1027,19 @@ static int __devexit flexcan_remove(struct platform_device *pdev)return0;}+staticstructof_device_idflexcan_of_match[]={+{+.compatible="fsl,flexcan",
Let me make sure I have this correct. At this point, we would want it
to be fsl,flexcan here. If, at some point, we find the i.MX-wonderful
has diverged from the -p1010, we would, at that point in the code, use
of_device_is_compatible to differentiate the two, correct? That would
mean we should make no change to this patch for the fsl,flexcan-p1010,
right?
Robin
From: U Bhaskar-B22300 <hidden> Date: 2011-08-10 14:36:28
-----Original Message-----
From: Robin Holt [mailto:holt@sgi.com]
Sent: Wednesday, August 10, 2011 7:46 PM
To: Wolfgang Grandegger
Cc: Robin Holt; Marc Kleine-Budde; U Bhaskar-B22300; Wood Scott-B07421;
netdev@vger.kernel.org; Kumar Gala; socketcan-core@lists.berlios.de; PPC
list
Subject: Re: [PATCH v10 5/5] [powerpc] Fix up fsl-flexcan device tree
binding.
=20
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
quoted
Hi Robin,
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the
conclusion the Documentation...fsl-flexcan.txt device tree
documentation needs to be cleaned up. The driver does not depend
upon any properties other
Your first sentence could be misleading. Please just describe what the
patch does and why, something like:
"This patch cleans up the documentation of the device-tree binding for
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
=20
I borrowed heavily from your message. ;)
=20
quoted
quoted
than the required properties so we are removing the file.
Additionally, the p1010*dts* files are not following the standard
for node naming in that they have a trailing -v1.0.
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 ----------
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and
interrupt-properties, you can -also specify which clock source shall
be used for the controller.
quoted
quoted
-
-CPI Clock- Can Protocol Interface Clock
- This CLK_SRC bit of CTRL(control register) selects the clock source
to
quoted
quoted
- the CAN Protocol Interface(CPI) to be either the peripheral clock
- (driven by the PLL) or the crystal oscillator clock. The selected
clock
quoted
quoted
- is the one fed to the prescaler to generate the Serial Clock
(Sclock).
quoted
quoted
- The PRESDIV field of CTRL(control register) controls a prescaler
that
quoted
quoted
- generates the Serial Clock (Sclock), whose period defines the
- time quantum used to compose the CAN waveform.
-
-Can Engine Clock Source
- There are two sources for CAN clock
- - Platform Clock It represents the bus clock
- - Oscillator Clock
-
- Peripheral Clock (PLL)
- --------------
- |
- --------- -------------
- | |CPI Clock | Prescaler | Sclock
- | |---------------->| (1.. 256) |------------>
- --------- -------------
- | |
- -------------- ---------------------CLK_SRC
- Oscillator Clock
-
-- fsl,flexcan-clock-source : CAN Engine Clock Source.This property
selects
quoted
quoted
- the peripheral clock. PLL clock is fed to the
- prescaler to generate the Serial Clock (Sclock).
- Valid values are "oscillator" and "platform"
- "oscillator": CAN engine clock source is
oscillator clock.
quoted
quoted
- "platform" The CAN engine clock source is the bus
clock
quoted
quoted
- (platform clock).
-
-- fsl,flexcan-clock-divider : for the reference and system clock, an
additional
quoted
quoted
- clock divider can be specified.
-- clock-frequency: frequency required to calculate the bitrate for
FlexCAN.
quoted
quoted
-
-Note:
- - v1.0 of flexcan-v1.0 represent the IP block version for P1010
SOC.
quoted
quoted
- - P1010 does not have oscillator as the Clock Source.So the default
- Clock Source is platform clock.
-Examples:
-
- can0@1c000 {
- compatible =3D "fsl,flexcan-v1.0";
- reg =3D <0x1c000 0x1000>;
- interrupts =3D <48 0x2>;
- interrupt-parent =3D <&mpic>;
- fsl,flexcan-clock-source =3D "platform";
- fsl,flexcan-clock-divqider =3D <2>;
- clock-frequency =3D <fixed by u-boot>;
- };
Do we really want to drop the documentation for that binding. I think
something like the following text would be still useful:
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
Required properties:
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
Example:
can@1c000 {
compatible =3D "fsl,p1010-flexcan", "fsl,flexcan";
reg =3D <0x1c000 0x1000>;
interrupts =3D <48 0x2>;
interrupt-parent =3D <&mpic>;
};
-------------------------
From: Kumar Gala <hidden> Date: 2011-08-10 14:45:29
On Aug 10, 2011, at 9:15 AM, Robin Holt wrote:
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
quoted
Hi Robin,
=20
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the =
conclusion
quoted
quoted
the Documentation...fsl-flexcan.txt device tree documentation needs =
to
quoted
quoted
be cleaned up. The driver does not depend upon any properties other
=20
Your first sentence could be misleading. Please just describe what =
the
quoted
patch does and why, something like:
=20
"This patch cleans up the documentation of the device-tree binding =
for
quoted
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
=20
I borrowed heavily from your message. ;)
=20
quoted
quoted
than the required properties so we are removing the file. =
Additionally,
quoted
quoted
the p1010*dts* files are not following the standard for node naming =
in
quoted
quoted
that they have a trailing -v1.0.
=20
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 =
Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
I don't understand how we can do this? What binding spec covers the =
P1010 CAN support if you remove this?
- k
From: Robin Holt <hidden> Date: 2011-08-10 15:35:44
On Wed, Aug 10, 2011 at 09:45:17AM -0500, Kumar Gala wrote:
On Aug 10, 2011, at 9:15 AM, Robin Holt wrote:
quoted
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
quoted
Hi Robin,
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the conclusion
the Documentation...fsl-flexcan.txt device tree documentation needs to
be cleaned up. The driver does not depend upon any properties other
Your first sentence could be misleading. Please just describe what the
patch does and why, something like:
"This patch cleans up the documentation of the device-tree binding for
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
I borrowed heavily from your message. ;)
quoted
quoted
than the required properties so we are removing the file. Additionally,
the p1010*dts* files are not following the standard for node naming in
that they have a trailing -v1.0.
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 --------------------
arch/powerpc/boot/dts/p1010rdb.dts | 8 ---
arch/powerpc/boot/dts/p1010si.dtsi | 8 +-
3 files changed, 4 insertions(+), 73 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
I don't understand how we can do this? What binding spec covers the P1010 CAN support if you remove this?
We have added it back in based upon an earlier comment from Wolfgang.
I will post a new version shortly.
Robin
From: Robin Holt <hidden> Date: 2011-08-10 16:00:56
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
quoted
-----Original Message-----
From: Robin Holt [mailto:holt@sgi.com]
Sent: Wednesday, August 10, 2011 7:46 PM
To: Wolfgang Grandegger
Cc: Robin Holt; Marc Kleine-Budde; U Bhaskar-B22300; Wood Scott-B07421;
netdev@vger.kernel.org; Kumar Gala; socketcan-core@lists.berlios.de; PPC
list
Subject: Re: [PATCH v10 5/5] [powerpc] Fix up fsl-flexcan device tree
binding.
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
quoted
Hi Robin,
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the
conclusion the Documentation...fsl-flexcan.txt device tree
documentation needs to be cleaned up. The driver does not depend
upon any properties other
Your first sentence could be misleading. Please just describe what the
patch does and why, something like:
"This patch cleans up the documentation of the device-tree binding for
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
I borrowed heavily from your message. ;)
quoted
quoted
than the required properties so we are removing the file.
Additionally, the p1010*dts* files are not following the standard
for node naming in that they have a trailing -v1.0.
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 ----------
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and
interrupt-properties, you can -also specify which clock source shall
be used for the controller.
quoted
quoted
-
-CPI Clock- Can Protocol Interface Clock
- This CLK_SRC bit of CTRL(control register) selects the clock source
to
quoted
quoted
- the CAN Protocol Interface(CPI) to be either the peripheral clock
- (driven by the PLL) or the crystal oscillator clock. The selected
clock
quoted
quoted
- is the one fed to the prescaler to generate the Serial Clock
(Sclock).
quoted
quoted
- The PRESDIV field of CTRL(control register) controls a prescaler
that
quoted
quoted
- generates the Serial Clock (Sclock), whose period defines the
- time quantum used to compose the CAN waveform.
-
-Can Engine Clock Source
- There are two sources for CAN clock
- - Platform Clock It represents the bus clock
- - Oscillator Clock
-
- Peripheral Clock (PLL)
- --------------
- |
- --------- -------------
- | |CPI Clock | Prescaler | Sclock
- | |---------------->| (1.. 256) |------------>
- --------- -------------
- | |
- -------------- ---------------------CLK_SRC
- Oscillator Clock
-
-- fsl,flexcan-clock-source : CAN Engine Clock Source.This property
selects
quoted
quoted
- the peripheral clock. PLL clock is fed to the
- prescaler to generate the Serial Clock (Sclock).
- Valid values are "oscillator" and "platform"
- "oscillator": CAN engine clock source is
oscillator clock.
quoted
quoted
- "platform" The CAN engine clock source is the bus
clock
quoted
quoted
- (platform clock).
-
-- fsl,flexcan-clock-divider : for the reference and system clock, an
additional
quoted
quoted
- clock divider can be specified.
-- clock-frequency: frequency required to calculate the bitrate for
FlexCAN.
quoted
quoted
-
-Note:
- - v1.0 of flexcan-v1.0 represent the IP block version for P1010
SOC.
quoted
quoted
- - P1010 does not have oscillator as the Clock Source.So the default
- Clock Source is platform clock.
-Examples:
-
- can0@1c000 {
- compatible = "fsl,flexcan-v1.0";
- reg = <0x1c000 0x1000>;
- interrupts = <48 0x2>;
- interrupt-parent = <&mpic>;
- fsl,flexcan-clock-source = "platform";
- fsl,flexcan-clock-divqider = <2>;
- clock-frequency = <fixed by u-boot>;
- };
Do we really want to drop the documentation for that binding. I think
something like the following text would be still useful:
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
Required properties:
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
Example:
can@1c000 {
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
reg = <0x1c000 0x1000>;
interrupts = <48 0x2>;
interrupt-parent = <&mpic>;
};
-------------------------
Done, except the
quoted
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
line is
compatible = "fsl,flexcan", "fsl,flexcan-p1010";
quoted
What do you think?
quoted
diff --git a/arch/powerpc/boot/dts/p1010rdb.dts
b/arch/powerpc/boot/dts/p1010rdb.dts
index 6b33b73..d6a0bb2 100644
Please also correct the node names (not using the number suffix).
So the node names should be
can@1c000 {
can@1d000 {
correct?
[Bhaskar] As there are two CAN controllers on P1010,So won't it be better
to distinguish it by can0 and can1 instead by simple "can" ?
It looks like the way to do that is to assign a label to those devices
and then associate the label with an alias. I have no idea how that
works under the hood, but it is the way other files are set up. Take a
look at arch/powerpc/boot/dts/bamboo.dts for how they define the serial
interfaces.
Grant or Wolfgang, is that the right way to handle the concern about
names or does it have no practical effect with the Linux kernel?
Thanks,
Robin
From: Kumar Gala <hidden> Date: 2011-08-10 16:53:27
On Aug 10, 2011, at 11:00 AM, Robin Holt wrote:
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
quoted
=20
=20
quoted
-----Original Message-----
From: Robin Holt [mailto:holt@sgi.com]
Sent: Wednesday, August 10, 2011 7:46 PM
To: Wolfgang Grandegger
Cc: Robin Holt; Marc Kleine-Budde; U Bhaskar-B22300; Wood =
list
Subject: Re: [PATCH v10 5/5] [powerpc] Fix up fsl-flexcan device =
tree
quoted
quoted
binding.
=20
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
quoted
Hi Robin,
=20
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the
conclusion the Documentation...fsl-flexcan.txt device tree
documentation needs to be cleaned up. The driver does not depend
upon any properties other
=20
Your first sentence could be misleading. Please just describe what =
the
quoted
quoted
quoted
patch does and why, something like:
=20
"This patch cleans up the documentation of the device-tree binding =
for
quoted
quoted
quoted
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
=20
I borrowed heavily from your message. ;)
=20
quoted
quoted
than the required properties so we are removing the file.
Additionally, the p1010*dts* files are not following the standard
for node naming in that they have a trailing -v1.0.
=20
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 =
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and
interrupt-properties, you can -also specify which clock source =
shall
quoted
quoted
be used for the controller.
quoted
quoted
-
-CPI Clock- Can Protocol Interface Clock
- This CLK_SRC bit of CTRL(control register) selects the clock =
source
quoted
quoted
to
quoted
quoted
- the CAN Protocol Interface(CPI) to be either the peripheral =
clock
quoted
quoted
quoted
quoted
- (driven by the PLL) or the crystal oscillator clock. The =
selected
quoted
quoted
clock
quoted
quoted
- is the one fed to the prescaler to generate the Serial Clock
(Sclock).
quoted
quoted
- The PRESDIV field of CTRL(control register) controls a prescaler
that
quoted
quoted
- generates the Serial Clock (Sclock), whose period defines the
- time quantum used to compose the CAN waveform.
-
-Can Engine Clock Source
- There are two sources for CAN clock
- - Platform Clock It represents the bus clock
- - Oscillator Clock
-
- Peripheral Clock (PLL)
- --------------
- |
- --------- -------------
- | |CPI Clock | Prescaler | Sclock
- | |---------------->| (1.. 256) |------------>
- --------- -------------
- | |
- -------------- ---------------------CLK_SRC
- Oscillator Clock
-
-- fsl,flexcan-clock-source : CAN Engine Clock Source.This =
property
quoted
quoted
selects
quoted
quoted
- the peripheral clock. PLL clock is fed to =
the
quoted
quoted
quoted
quoted
- prescaler to generate the Serial Clock =
(Sclock).
quoted
quoted
quoted
quoted
- Valid values are "oscillator" and =
"platform"
quoted
quoted
quoted
quoted
- "oscillator": CAN engine clock source is
oscillator clock.
quoted
quoted
- "platform" The CAN engine clock source is =
the bus
quoted
quoted
clock
quoted
quoted
- (platform clock).
-
-- fsl,flexcan-clock-divider : for the reference and system clock, =
an
quoted
quoted
additional
quoted
quoted
- clock divider can be specified.
-- clock-frequency: frequency required to calculate the bitrate =
for
quoted
quoted
FlexCAN.
quoted
quoted
-
-Note:
- - v1.0 of flexcan-v1.0 represent the IP block version for P1010
SOC.
quoted
quoted
- - P1010 does not have oscillator as the Clock Source.So the =
=20
Do we really want to drop the documentation for that binding. I =
think
quoted
quoted
quoted
something like the following text would be still useful:
=20
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
=20
Required properties:
=20
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
=20
Example:
=20
can@1c000 {
compatible =3D "fsl,p1010-flexcan", "fsl,flexcan";
reg =3D <0x1c000 0x1000>;
interrupts =3D <48 0x2>;
interrupt-parent =3D <&mpic>;
};
-------------------------
=20
Please also correct the node names (not using the number suffix).
=20
So the node names should be
can@1c000 {
can@1d000 {
correct?
=20
[Bhaskar] As there are two CAN controllers on P1010,So won't it be =
better
quoted
to distinguish it by can0 and can1 instead by simple "can" ?
=20
It looks like the way to do that is to assign a label to those devices
and then associate the label with an alias. I have no idea how that
works under the hood, but it is the way other files are set up. Take =
a
look at arch/powerpc/boot/dts/bamboo.dts for how they define the =
serial
interfaces.
=20
Grant or Wolfgang, is that the right way to handle the concern about
names or does it have no practical effect with the Linux kernel?
It has not effect. The label is just if you need to reference it via =
some other means.
- k=
From: Robin Holt <hidden> Date: 2011-08-10 17:16:02
On Wed, Aug 10, 2011 at 11:53:15AM -0500, Kumar Gala wrote:
On Aug 10, 2011, at 11:00 AM, Robin Holt wrote:
quoted
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
quoted
quoted
-----Original Message-----
From: Robin Holt [mailto:holt@sgi.com]
Sent: Wednesday, August 10, 2011 7:46 PM
To: Wolfgang Grandegger
Cc: Robin Holt; Marc Kleine-Budde; U Bhaskar-B22300; Wood Scott-B07421;
netdev@vger.kernel.org; Kumar Gala; socketcan-core@lists.berlios.de; PPC
list
Subject: Re: [PATCH v10 5/5] [powerpc] Fix up fsl-flexcan device tree
binding.
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
quoted
Hi Robin,
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the
conclusion the Documentation...fsl-flexcan.txt device tree
documentation needs to be cleaned up. The driver does not depend
upon any properties other
Your first sentence could be misleading. Please just describe what the
patch does and why, something like:
"This patch cleans up the documentation of the device-tree binding for
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
I borrowed heavily from your message. ;)
quoted
quoted
than the required properties so we are removing the file.
Additionally, the p1010*dts* files are not following the standard
for node naming in that they have a trailing -v1.0.
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 ----------
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and
interrupt-properties, you can -also specify which clock source shall
be used for the controller.
quoted
quoted
-
-CPI Clock- Can Protocol Interface Clock
- This CLK_SRC bit of CTRL(control register) selects the clock source
to
quoted
quoted
- the CAN Protocol Interface(CPI) to be either the peripheral clock
- (driven by the PLL) or the crystal oscillator clock. The selected
clock
quoted
quoted
- is the one fed to the prescaler to generate the Serial Clock
(Sclock).
quoted
quoted
- The PRESDIV field of CTRL(control register) controls a prescaler
that
quoted
quoted
- generates the Serial Clock (Sclock), whose period defines the
- time quantum used to compose the CAN waveform.
-
-Can Engine Clock Source
- There are two sources for CAN clock
- - Platform Clock It represents the bus clock
- - Oscillator Clock
-
- Peripheral Clock (PLL)
- --------------
- |
- --------- -------------
- | |CPI Clock | Prescaler | Sclock
- | |---------------->| (1.. 256) |------------>
- --------- -------------
- | |
- -------------- ---------------------CLK_SRC
- Oscillator Clock
-
-- fsl,flexcan-clock-source : CAN Engine Clock Source.This property
selects
quoted
quoted
- the peripheral clock. PLL clock is fed to the
- prescaler to generate the Serial Clock (Sclock).
- Valid values are "oscillator" and "platform"
- "oscillator": CAN engine clock source is
oscillator clock.
quoted
quoted
- "platform" The CAN engine clock source is the bus
clock
quoted
quoted
- (platform clock).
-
-- fsl,flexcan-clock-divider : for the reference and system clock, an
additional
quoted
quoted
- clock divider can be specified.
-- clock-frequency: frequency required to calculate the bitrate for
FlexCAN.
quoted
quoted
-
-Note:
- - v1.0 of flexcan-v1.0 represent the IP block version for P1010
SOC.
quoted
quoted
- - P1010 does not have oscillator as the Clock Source.So the default
- Clock Source is platform clock.
-Examples:
-
- can0@1c000 {
- compatible = "fsl,flexcan-v1.0";
- reg = <0x1c000 0x1000>;
- interrupts = <48 0x2>;
- interrupt-parent = <&mpic>;
- fsl,flexcan-clock-source = "platform";
- fsl,flexcan-clock-divqider = <2>;
- clock-frequency = <fixed by u-boot>;
- };
Do we really want to drop the documentation for that binding. I think
something like the following text would be still useful:
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
Required properties:
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
Example:
can@1c000 {
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
reg = <0x1c000 0x1000>;
interrupts = <48 0x2>;
interrupt-parent = <&mpic>;
};
-------------------------
Done, except the
quoted
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
line is
compatible = "fsl,flexcan", "fsl,flexcan-p1010";
quoted
What do you think?
quoted
diff --git a/arch/powerpc/boot/dts/p1010rdb.dts
b/arch/powerpc/boot/dts/p1010rdb.dts
index 6b33b73..d6a0bb2 100644
Please also correct the node names (not using the number suffix).
So the node names should be
can@1c000 {
can@1d000 {
correct?
[Bhaskar] As there are two CAN controllers on P1010,So won't it be better
to distinguish it by can0 and can1 instead by simple "can" ?
It looks like the way to do that is to assign a label to those devices
and then associate the label with an alias. I have no idea how that
works under the hood, but it is the way other files are set up. Take a
look at arch/powerpc/boot/dts/bamboo.dts for how they define the serial
interfaces.
Grant or Wolfgang, is that the right way to handle the concern about
names or does it have no practical effect with the Linux kernel?
It has not effect. The label is just if you need to reference it via some other means.
From: Kumar Gala <hidden> Date: 2011-08-10 17:17:57
On Aug 10, 2011, at 12:16 PM, Robin Holt wrote:
On Wed, Aug 10, 2011 at 11:53:15AM -0500, Kumar Gala wrote:
quoted
=20
On Aug 10, 2011, at 11:00 AM, Robin Holt wrote:
=20
quoted
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
quoted
=20
=20
quoted
-----Original Message-----
From: Robin Holt [mailto:holt@sgi.com]
Sent: Wednesday, August 10, 2011 7:46 PM
To: Wolfgang Grandegger
Cc: Robin Holt; Marc Kleine-Budde; U Bhaskar-B22300; Wood =
Scott-B07421;
quoted
quoted
quoted
quoted
netdev@vger.kernel.org; Kumar Gala; =
socketcan-core@lists.berlios.de; PPC
quoted
quoted
quoted
quoted
list
Subject: Re: [PATCH v10 5/5] [powerpc] Fix up fsl-flexcan device =
tree
quoted
quoted
quoted
quoted
binding.
=20
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger =
wrote:
quoted
quoted
quoted
quoted
quoted
Hi Robin,
=20
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the
conclusion the Documentation...fsl-flexcan.txt device tree
documentation needs to be cleaned up. The driver does not =
depend
quoted
quoted
quoted
quoted
quoted
quoted
upon any properties other
=20
Your first sentence could be misleading. Please just describe =
what the
quoted
quoted
quoted
quoted
quoted
patch does and why, something like:
=20
"This patch cleans up the documentation of the device-tree =
binding for
quoted
quoted
quoted
quoted
quoted
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
=20
I borrowed heavily from your message. ;)
=20
quoted
quoted
than the required properties so we are removing the file.
Additionally, the p1010*dts* files are not following the =
standard
quoted
quoted
quoted
quoted
quoted
quoted
for node naming in that they have a trailing -v1.0.
=20
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 =
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and
interrupt-properties, you can -also specify which clock source =
shall
quoted
quoted
quoted
quoted
be used for the controller.
quoted
quoted
-
-CPI Clock- Can Protocol Interface Clock
- This CLK_SRC bit of CTRL(control register) selects the =
clock source
quoted
quoted
quoted
quoted
to
quoted
quoted
- the CAN Protocol Interface(CPI) to be either the =
peripheral clock
quoted
quoted
quoted
quoted
quoted
quoted
- (driven by the PLL) or the crystal oscillator clock. The =
selected
quoted
quoted
quoted
quoted
clock
quoted
quoted
- is the one fed to the prescaler to generate the Serial =
Clock
quoted
quoted
quoted
quoted
(Sclock).
quoted
quoted
- The PRESDIV field of CTRL(control register) controls a =
prescaler
quoted
quoted
quoted
quoted
that
quoted
quoted
- generates the Serial Clock (Sclock), whose period =
defines the
quoted
quoted
quoted
quoted
quoted
quoted
- time quantum used to compose the CAN waveform.
-
-Can Engine Clock Source
- There are two sources for CAN clock
- - Platform Clock It represents the bus clock
- - Oscillator Clock
-
- Peripheral Clock (PLL)
- --------------
- |
- --------- -------------
- | |CPI Clock | Prescaler | =
=20
Do we really want to drop the documentation for that binding. I =
think
quoted
quoted
quoted
quoted
quoted
something like the following text would be still useful:
=20
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
=20
Required properties:
=20
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
=20
Example:
=20
can@1c000 {
compatible =3D "fsl,p1010-flexcan", "fsl,flexcan";
reg =3D <0x1c000 0x1000>;
interrupts =3D <48 0x2>;
interrupt-parent =3D <&mpic>;
};
-------------------------
From: Robin Holt <hidden> Date: 2011-08-10 17:20:42
On Wed, Aug 10, 2011 at 12:17:45PM -0500, Kumar Gala wrote:
On Aug 10, 2011, at 12:16 PM, Robin Holt wrote:
quoted
On Wed, Aug 10, 2011 at 11:53:15AM -0500, Kumar Gala wrote:
quoted
On Aug 10, 2011, at 11:00 AM, Robin Holt wrote:
quoted
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
quoted
quoted
-----Original Message-----
From: Robin Holt [mailto:holt@sgi.com]
Sent: Wednesday, August 10, 2011 7:46 PM
To: Wolfgang Grandegger
Cc: Robin Holt; Marc Kleine-Budde; U Bhaskar-B22300; Wood Scott-B07421;
netdev@vger.kernel.org; Kumar Gala; socketcan-core@lists.berlios.de; PPC
list
Subject: Re: [PATCH v10 5/5] [powerpc] Fix up fsl-flexcan device tree
binding.
On Wed, Aug 10, 2011 at 03:47:43PM +0200, Wolfgang Grandegger wrote:
quoted
Hi Robin,
On 08/10/2011 05:06 AM, Robin Holt wrote:
quoted
In working with the socketcan developers, we have come to the
conclusion the Documentation...fsl-flexcan.txt device tree
documentation needs to be cleaned up. The driver does not depend
upon any properties other
Your first sentence could be misleading. Please just describe what the
patch does and why, something like:
"This patch cleans up the documentation of the device-tree binding for
the Flexcan devices on Freescale's PowerPC and ARM cores. Extra
properties are not needed as the frequency of the source clock is
fixed..." and so on.
I borrowed heavily from your message. ;)
quoted
quoted
than the required properties so we are removing the file.
Additionally, the p1010*dts* files are not following the standard
for node naming in that they have a trailing -v1.0.
quoted
Signed-off-by: Robin Holt <redacted>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
To: Wolfgang Grandegger <redacted>,
To: U Bhaskar-B22300 <redacted>
To: Scott Wood <redacted>
Cc: socketcan-core@lists.berlios.de,
Cc: netdev@vger.kernel.org,
Cc: PPC list <redacted>
Cc: Kumar Gala <redacted>
---
.../devicetree/bindings/net/can/fsl-flexcan.txt | 61 ----------
@@ -1,61 +0,0 @@-CAN Device Tree Bindings--------------------------2011 Freescale Semiconductor, Inc.--fsl,flexcan-v1.0 nodes-------------------------In addition to the required compatible-, reg- and
interrupt-properties, you can -also specify which clock source shall
be used for the controller.
quoted
quoted
-
-CPI Clock- Can Protocol Interface Clock
- This CLK_SRC bit of CTRL(control register) selects the clock source
to
quoted
quoted
- the CAN Protocol Interface(CPI) to be either the peripheral clock
- (driven by the PLL) or the crystal oscillator clock. The selected
clock
quoted
quoted
- is the one fed to the prescaler to generate the Serial Clock
(Sclock).
quoted
quoted
- The PRESDIV field of CTRL(control register) controls a prescaler
that
quoted
quoted
- generates the Serial Clock (Sclock), whose period defines the
- time quantum used to compose the CAN waveform.
-
-Can Engine Clock Source
- There are two sources for CAN clock
- - Platform Clock It represents the bus clock
- - Oscillator Clock
-
- Peripheral Clock (PLL)
- --------------
- |
- --------- -------------
- | |CPI Clock | Prescaler | Sclock
- | |---------------->| (1.. 256) |------------>
- --------- -------------
- | |
- -------------- ---------------------CLK_SRC
- Oscillator Clock
-
-- fsl,flexcan-clock-source : CAN Engine Clock Source.This property
selects
quoted
quoted
- the peripheral clock. PLL clock is fed to the
- prescaler to generate the Serial Clock (Sclock).
- Valid values are "oscillator" and "platform"
- "oscillator": CAN engine clock source is
oscillator clock.
quoted
quoted
- "platform" The CAN engine clock source is the bus
clock
quoted
quoted
- (platform clock).
-
-- fsl,flexcan-clock-divider : for the reference and system clock, an
additional
quoted
quoted
- clock divider can be specified.
-- clock-frequency: frequency required to calculate the bitrate for
FlexCAN.
quoted
quoted
-
-Note:
- - v1.0 of flexcan-v1.0 represent the IP block version for P1010
SOC.
quoted
quoted
- - P1010 does not have oscillator as the Clock Source.So the default
- Clock Source is platform clock.
-Examples:
-
- can0@1c000 {
- compatible = "fsl,flexcan-v1.0";
- reg = <0x1c000 0x1000>;
- interrupts = <48 0x2>;
- interrupt-parent = <&mpic>;
- fsl,flexcan-clock-source = "platform";
- fsl,flexcan-clock-divqider = <2>;
- clock-frequency = <fixed by u-boot>;
- };
Do we really want to drop the documentation for that binding. I think
something like the following text would be still useful:
------------------------
Flexcan CAN contoller on Freescale's ARM and PowerPC processors
Required properties:
- compatible : Should be "fsl,flexcan" and optionally
"fsl,flexcan-<processor>"
- reg : Offset and length of the register set for this device
- interrupts : Interrupt tuple for this device
Example:
can@1c000 {
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
reg = <0x1c000 0x1000>;
interrupts = <48 0x2>;
interrupt-parent = <&mpic>;
};
-------------------------
Done, except the
quoted
compatible = "fsl,p1010-flexcan", "fsl,flexcan";
line is
compatible = "fsl,flexcan", "fsl,flexcan-p1010";
quoted
What do you think?
quoted
diff --git a/arch/powerpc/boot/dts/p1010rdb.dts
b/arch/powerpc/boot/dts/p1010rdb.dts
index 6b33b73..d6a0bb2 100644
Please also correct the node names (not using the number suffix).
So the node names should be
can@1c000 {
can@1d000 {
correct?
[Bhaskar] As there are two CAN controllers on P1010,So won't it be better
to distinguish it by can0 and can1 instead by simple "can" ?
It looks like the way to do that is to assign a label to those devices
and then associate the label with an alias. I have no idea how that
works under the hood, but it is the way other files are set up. Take a
look at arch/powerpc/boot/dts/bamboo.dts for how they define the serial
interfaces.
Grant or Wolfgang, is that the right way to handle the concern about
names or does it have no practical effect with the Linux kernel?
It has not effect. The label is just if you need to reference it via some other means.
Does the alias have an effect?
nope
Then how does the device number get associated with a particular device
and how is user-space ensured a consistent namespace?
Robin
From: Wolfgang Grandegger <hidden> Date: 2011-08-10 18:23:48
On 08/10/2011 06:00 PM, Robin Holt wrote:
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
...
It looks like the way to do that is to assign a label to those devices
and then associate the label with an alias. I have no idea how that
works under the hood, but it is the way other files are set up. Take a
look at arch/powerpc/boot/dts/bamboo.dts for how they define the serial
interfaces.
With a label you mean "label:" at the beginning of a node. Such labels
are translated by the device tree compiler in node handles, which can be
referenced within nodes by using <&label>, e.g.:
UIC0: interrupt-controller0 {
...
};
UIC1: interrupt-controller1 {
...
interrupt-parent = <&UIC0>;
...
};
It has nothing to do with the name of the node.
Wolfgang.
From: Scott Wood <hidden> Date: 2011-08-10 18:28:02
On 08/10/2011 01:23 PM, Wolfgang Grandegger wrote:
On 08/10/2011 06:00 PM, Robin Holt wrote:
quoted
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
...
quoted
It looks like the way to do that is to assign a label to those devices
and then associate the label with an alias. I have no idea how that
works under the hood, but it is the way other files are set up. Take a
look at arch/powerpc/boot/dts/bamboo.dts for how they define the serial
interfaces.
With a label you mean "label:" at the beginning of a node. Such labels
are translated by the device tree compiler in node handles, which can be
referenced within nodes by using <&label>, e.g.:
UIC0: interrupt-controller0 {
...
};
UIC1: interrupt-controller1 {
...
interrupt-parent = <&UIC0>;
...
};
It has nothing to do with the name of the node.
"...and then associate the label with an alias."
The alias can then be used if you want "can0" versus "can1".
Appending numbers to the node name is typically only done when there's
no unit address, and a need to disambiguate.
-Scott
From: Robin Holt <hidden> Date: 2011-08-10 18:35:28
On Wed, Aug 10, 2011 at 01:27:52PM -0500, Scott Wood wrote:
On 08/10/2011 01:23 PM, Wolfgang Grandegger wrote:
quoted
On 08/10/2011 06:00 PM, Robin Holt wrote:
quoted
On Wed, Aug 10, 2011 at 02:36:20PM +0000, U Bhaskar-B22300 wrote:
...
quoted
It looks like the way to do that is to assign a label to those devices
and then associate the label with an alias. I have no idea how that
works under the hood, but it is the way other files are set up. Take a
look at arch/powerpc/boot/dts/bamboo.dts for how they define the serial
interfaces.
With a label you mean "label:" at the beginning of a node. Such labels
are translated by the device tree compiler in node handles, which can be
referenced within nodes by using <&label>, e.g.:
UIC0: interrupt-controller0 {
...
};
UIC1: interrupt-controller1 {
...
interrupt-parent = <&UIC0>;
...
};
It has nothing to do with the name of the node.
"...and then associate the label with an alias."
The alias can then be used if you want "can0" versus "can1".
Does the alias get used by either the kernel or something else or is it
just extra detail with no purpose?
Robin