All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Arend van Spriel <arend@broadcom.com>
Cc: linux-wireless@vger.kernel.org, zajec5@gmail.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	arnd@arndb.de
Subject: Re: [PATCH 1/2] bcma: register bcma as device tree driver
Date: Sun, 14 Sep 2014 19:16:51 +0200	[thread overview]
Message-ID: <5415CD83.7000009@hauke-m.de> (raw)
In-Reply-To: <54147373.1050109@broadcom.com>

On 09/13/2014 06:40 PM, Arend van Spriel wrote:
> On 09/13/14 18:02, Hauke Mehrtens wrote:
>> On 09/13/2014 05:13 PM, Arend van Spriel wrote:
>>> On 09/13/14 15:37, Hauke Mehrtens wrote:
>>>> This driver is used by the bcm53xx ARM SoC code. Now it is possible to
>>>> give the address of the chipcommon core in device tree and bcma will
>>>> search for all the other cores.
>>>>
>>>> Signed-off-by: Hauke Mehrtens<hauke@hauke-m.de>
>>>> ---
>>>>    Documentation/devicetree/bindings/bus/bcma.txt | 41 +++++++++++++
>>>>    drivers/bcma/bcma_private.h                    | 16 +++++
>>>>    drivers/bcma/host_soc.c                        | 82
>>>> ++++++++++++++++++++++++++
>>>>    drivers/bcma/main.c                            | 10 ++++
>>>>    include/linux/bcma/bcma.h                      |  2 +
>>>>    5 files changed, 151 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/bus/bcma.txt
>>>>
>>>> This is based on wireless-testing and should go into that tree.
>>>>
>>>> changes since:
>>>> RFC:
>>>>    - reworded the irq description
>>>>    - improved the example
>>>>    - hocked into bcma_modeinit() and bcma_modexit()
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/bus/bcma.txt
>>>> b/Documentation/devicetree/bindings/bus/bcma.txt
>>>> new file mode 100644
>>>> index 0000000..17e095f
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/bus/bcma.txt
>>>> @@ -0,0 +1,41 @@
>>>> +Broadcom AIX SoC bcma bus driver
>>>
>>> Hi Hauke,
>>>
>>> First of all a typo used all over the place: AIX should be AXI.
>>
>> I will fix that.
>>
>>> The backplane in Broadcom SoC is ARM AXI with additional plugin option
>>> to make it discoverable. Indeed the IRQ info is not included, but I see
>>> no reason for specifying the register space for the cores in device-tree
>>> as that is discoverable by bcma.
>>
>> I specified the register space to make it possible to connect the device
>> tree entry with the core. After the cores are automatically discovered,
>> bcma searches for entry core found, for an device tree entry with the
>> same address space and uses the irq number from that entry. If there is
>> a core defined in device tree which is not found by bcma it will just be
>> ignored. If a core is not specified in device tree it will get
>> registered, but it will not get an IRQ.
>> This was the most stable way I came up with, I also thought about using
>> the core number, like assign the this IRQ to core number 5, but the core
>> numbers could change when we do changes to bcma.
> 
> I understand. In the example I noticed the core base address was also
> used in the entry label, ie. pcie@18002000. However, I am not sure
> whether that can be obtained by the driver. If it is possible it could
> be used to match the dt entry to a core and the register info would be
> redundant.

I could parse that out of the full name. The full name looks like this:
"/axi@18000000/ethernet@18024000", but I do not think that would be nice.

@Arnd Bergmann: is there some better way to connect an automatically
detected device with an device tree entry?

>> In the Broadcom vendor code there is a list with the IRQ numbers which
>> get assigned to a specific core type. For example there is a list with 4
>> IRQ numbers which get assigned to the first 4 Ethernet cores. This would
>> also work, but I do not know how to do this in device tree.
> 
> I am wondering about the IRQ numbers. The SoC would also have a OOB
> routing core, which controls non-axi signals between the cores. I will
> ask internally whether the irq signals are controlled by it and can be
> retrieved from it.

Thanks, It would be nice if that is possible.


WARNING: multiple messages have this Message-ID (diff)
From: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
To: Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org
Subject: Re: [PATCH 1/2] bcma: register bcma as device tree driver
Date: Sun, 14 Sep 2014 19:16:51 +0200	[thread overview]
Message-ID: <5415CD83.7000009@hauke-m.de> (raw)
In-Reply-To: <54147373.1050109-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

On 09/13/2014 06:40 PM, Arend van Spriel wrote:
> On 09/13/14 18:02, Hauke Mehrtens wrote:
>> On 09/13/2014 05:13 PM, Arend van Spriel wrote:
>>> On 09/13/14 15:37, Hauke Mehrtens wrote:
>>>> This driver is used by the bcm53xx ARM SoC code. Now it is possible to
>>>> give the address of the chipcommon core in device tree and bcma will
>>>> search for all the other cores.
>>>>
>>>> Signed-off-by: Hauke Mehrtens<hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
>>>> ---
>>>>    Documentation/devicetree/bindings/bus/bcma.txt | 41 +++++++++++++
>>>>    drivers/bcma/bcma_private.h                    | 16 +++++
>>>>    drivers/bcma/host_soc.c                        | 82
>>>> ++++++++++++++++++++++++++
>>>>    drivers/bcma/main.c                            | 10 ++++
>>>>    include/linux/bcma/bcma.h                      |  2 +
>>>>    5 files changed, 151 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/bus/bcma.txt
>>>>
>>>> This is based on wireless-testing and should go into that tree.
>>>>
>>>> changes since:
>>>> RFC:
>>>>    - reworded the irq description
>>>>    - improved the example
>>>>    - hocked into bcma_modeinit() and bcma_modexit()
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/bus/bcma.txt
>>>> b/Documentation/devicetree/bindings/bus/bcma.txt
>>>> new file mode 100644
>>>> index 0000000..17e095f
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/bus/bcma.txt
>>>> @@ -0,0 +1,41 @@
>>>> +Broadcom AIX SoC bcma bus driver
>>>
>>> Hi Hauke,
>>>
>>> First of all a typo used all over the place: AIX should be AXI.
>>
>> I will fix that.
>>
>>> The backplane in Broadcom SoC is ARM AXI with additional plugin option
>>> to make it discoverable. Indeed the IRQ info is not included, but I see
>>> no reason for specifying the register space for the cores in device-tree
>>> as that is discoverable by bcma.
>>
>> I specified the register space to make it possible to connect the device
>> tree entry with the core. After the cores are automatically discovered,
>> bcma searches for entry core found, for an device tree entry with the
>> same address space and uses the irq number from that entry. If there is
>> a core defined in device tree which is not found by bcma it will just be
>> ignored. If a core is not specified in device tree it will get
>> registered, but it will not get an IRQ.
>> This was the most stable way I came up with, I also thought about using
>> the core number, like assign the this IRQ to core number 5, but the core
>> numbers could change when we do changes to bcma.
> 
> I understand. In the example I noticed the core base address was also
> used in the entry label, ie. pcie@18002000. However, I am not sure
> whether that can be obtained by the driver. If it is possible it could
> be used to match the dt entry to a core and the register info would be
> redundant.

I could parse that out of the full name. The full name looks like this:
"/axi@18000000/ethernet@18024000", but I do not think that would be nice.

@Arnd Bergmann: is there some better way to connect an automatically
detected device with an device tree entry?

>> In the Broadcom vendor code there is a list with the IRQ numbers which
>> get assigned to a specific core type. For example there is a list with 4
>> IRQ numbers which get assigned to the first 4 Ethernet cores. This would
>> also work, but I do not know how to do this in device tree.
> 
> I am wondering about the IRQ numbers. The SoC would also have a OOB
> routing core, which controls non-axi signals between the cores. I will
> ask internally whether the irq signals are controlled by it and can be
> retrieved from it.

Thanks, It would be nice if that is possible.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: hauke@hauke-m.de (Hauke Mehrtens)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] bcma: register bcma as device tree driver
Date: Sun, 14 Sep 2014 19:16:51 +0200	[thread overview]
Message-ID: <5415CD83.7000009@hauke-m.de> (raw)
In-Reply-To: <54147373.1050109@broadcom.com>

On 09/13/2014 06:40 PM, Arend van Spriel wrote:
> On 09/13/14 18:02, Hauke Mehrtens wrote:
>> On 09/13/2014 05:13 PM, Arend van Spriel wrote:
>>> On 09/13/14 15:37, Hauke Mehrtens wrote:
>>>> This driver is used by the bcm53xx ARM SoC code. Now it is possible to
>>>> give the address of the chipcommon core in device tree and bcma will
>>>> search for all the other cores.
>>>>
>>>> Signed-off-by: Hauke Mehrtens<hauke@hauke-m.de>
>>>> ---
>>>>    Documentation/devicetree/bindings/bus/bcma.txt | 41 +++++++++++++
>>>>    drivers/bcma/bcma_private.h                    | 16 +++++
>>>>    drivers/bcma/host_soc.c                        | 82
>>>> ++++++++++++++++++++++++++
>>>>    drivers/bcma/main.c                            | 10 ++++
>>>>    include/linux/bcma/bcma.h                      |  2 +
>>>>    5 files changed, 151 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/bus/bcma.txt
>>>>
>>>> This is based on wireless-testing and should go into that tree.
>>>>
>>>> changes since:
>>>> RFC:
>>>>    - reworded the irq description
>>>>    - improved the example
>>>>    - hocked into bcma_modeinit() and bcma_modexit()
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/bus/bcma.txt
>>>> b/Documentation/devicetree/bindings/bus/bcma.txt
>>>> new file mode 100644
>>>> index 0000000..17e095f
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/bus/bcma.txt
>>>> @@ -0,0 +1,41 @@
>>>> +Broadcom AIX SoC bcma bus driver
>>>
>>> Hi Hauke,
>>>
>>> First of all a typo used all over the place: AIX should be AXI.
>>
>> I will fix that.
>>
>>> The backplane in Broadcom SoC is ARM AXI with additional plugin option
>>> to make it discoverable. Indeed the IRQ info is not included, but I see
>>> no reason for specifying the register space for the cores in device-tree
>>> as that is discoverable by bcma.
>>
>> I specified the register space to make it possible to connect the device
>> tree entry with the core. After the cores are automatically discovered,
>> bcma searches for entry core found, for an device tree entry with the
>> same address space and uses the irq number from that entry. If there is
>> a core defined in device tree which is not found by bcma it will just be
>> ignored. If a core is not specified in device tree it will get
>> registered, but it will not get an IRQ.
>> This was the most stable way I came up with, I also thought about using
>> the core number, like assign the this IRQ to core number 5, but the core
>> numbers could change when we do changes to bcma.
> 
> I understand. In the example I noticed the core base address was also
> used in the entry label, ie. pcie at 18002000. However, I am not sure
> whether that can be obtained by the driver. If it is possible it could
> be used to match the dt entry to a core and the register info would be
> redundant.

I could parse that out of the full name. The full name looks like this:
"/axi at 18000000/ethernet at 18024000", but I do not think that would be nice.

@Arnd Bergmann: is there some better way to connect an automatically
detected device with an device tree entry?

>> In the Broadcom vendor code there is a list with the IRQ numbers which
>> get assigned to a specific core type. For example there is a list with 4
>> IRQ numbers which get assigned to the first 4 Ethernet cores. This would
>> also work, but I do not know how to do this in device tree.
> 
> I am wondering about the IRQ numbers. The SoC would also have a OOB
> routing core, which controls non-axi signals between the cores. I will
> ask internally whether the irq signals are controlled by it and can be
> retrieved from it.

Thanks, It would be nice if that is possible.

  reply	other threads:[~2014-09-14 17:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-13 13:37 [PATCH 1/2] bcma: register bcma as device tree driver Hauke Mehrtens
2014-09-13 13:37 ` Hauke Mehrtens
2014-09-13 13:37 ` Hauke Mehrtens
2014-09-13 13:37 ` [PATCH 2/2] bcma: get IRQ numbers from dt Hauke Mehrtens
2014-09-13 13:37   ` Hauke Mehrtens
2014-09-13 13:37   ` Hauke Mehrtens
2014-09-13 15:13 ` [PATCH 1/2] bcma: register bcma as device tree driver Arend van Spriel
2014-09-13 15:13   ` Arend van Spriel
2014-09-13 15:13   ` Arend van Spriel
2014-09-13 16:02   ` Hauke Mehrtens
2014-09-13 16:02     ` Hauke Mehrtens
2014-09-13 16:02     ` Hauke Mehrtens
2014-09-13 16:40     ` Arend van Spriel
2014-09-13 16:40       ` Arend van Spriel
2014-09-13 16:40       ` Arend van Spriel
2014-09-14 17:16       ` Hauke Mehrtens [this message]
2014-09-14 17:16         ` Hauke Mehrtens
2014-09-14 17:16         ` Hauke Mehrtens

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=5415CD83.7000009@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=arend@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=zajec5@gmail.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.