From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 8/9] tegra: add SPI SLINK driver
Date: Tue, 15 Jan 2013 09:36:29 -0700 [thread overview]
Message-ID: <50F5858D.4090608@wwwdotorg.org> (raw)
In-Reply-To: <20130115043322.GB19102@badger>
On 01/14/2013 09:33 PM, Allen Martin wrote:
> On Mon, Jan 14, 2013 at 10:49:53AM -0800, Stephen Warren wrote:
>> On 01/12/2013 09:56 AM, Simon Glass wrote:
>>> Hi,
>>>
>>> On Sat, Jan 12, 2013 at 1:07 AM, Allen Martin <amartin@nvidia.com> wrote:
>>>> Add driver for tegra SPI "SLINK" style driver. This controller is
>>>> similar to the tegra20 SPI "SFLASH" controller. The difference is
>>>> that the SLINK controller is a genernal purpose SPI controller and the
>>>> SFLASH controller is special purpose and can only talk to FLASH
>>>> devices. In addition there are potentially many instances of an SLINK
>>>> controller on tegra and only a single instance of SFLASH. Tegra20 is
>>>> currently ths only version of tegra that instantiates an SFLASH
>>>> controller.
>>>>
>>>> This driver supports basic PIO mode of operation and is configurable
>>>> (CONFIG_OF_CONTROL) to be driven off devicetree bindings. Up to 4
>>>> devices per controller may be attached, although typically only a
>>>> single chip select line is exposed from tegra per controller so in
>>>> reality this is usually limited to 1.
>>>>
>>>> To enable this driver, use CONFIG_TEGRA_SLINK
>>>> +void spi_init(void)
>>>> +{
>>>> + int node = 0, i;
>>>> + struct tegra_spi_ctrl *ctrl;
>>>
>>> blank line here
>>>
>>>> + for (i = 0; i < CONFIG_TEGRA_SLINK_CTRLS; i++) {
>>>> + ctrl = &spi_ctrls[i];
>>>> +#ifdef CONFIG_OF_CONTROL
>>>> + node = fdtdec_next_compatible(gd->fdt_blob, node,
>>>> + COMPAT_NVIDIA_TEGRA20_SLINK);
>>>> + if (!node)
>>>> + break;
>>>
>>> I think you should be using fdtdec_find_aliases_for_id() so that aliases work.
>>
>> I strongly believe we shouldn't be using aliases for enumeration, which
>> is what fdtdec_find_aliases_for_id() does, IIRC. Instead, we should
>> enumerate all the devices in the correct fashion, and then apply aliases
>> as a separate step if they exists. Hence, I believe it's not correct to
>> use fdtdec_find_aliases_for_id() anywhere.
>
> I'm a bit confused about the usage of fdt aliases in u-boot. My
> understanding of aliases is that they are intended to give drivers
> hints about device naming. Since u-boot doesn't really name devices,
> what are aliases supposed to do?
Most U-Boot command use IDs to identify devices/interfaces, e.g. in
"ext2load mmc 0:1", the "0" means MMC instance #0. The instance number
is parsed out from the end of the alias name.
next prev parent reply other threads:[~2013-01-15 16:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 9:07 [U-Boot] [PATCH v2 0/9] tegra: SPI drivers Allen Martin
2013-01-12 9:07 ` [U-Boot] [PATCH v2 1/9] tegra: fdt: sort dts files Allen Martin
2013-01-12 16:44 ` Simon Glass
2013-01-12 9:07 ` [U-Boot] [PATCH v2 2/9] tegra: fdt: add apbdma node Allen Martin
2013-01-12 9:07 ` [U-Boot] [PATCH v2 3/9] tegra20: fdt: add SPI SFLASH node Allen Martin
2013-01-14 18:44 ` Stephen Warren
2013-01-12 9:07 ` [U-Boot] [PATCH v2 4/9] tegra: spi: add fdt support to tegra SPI SFLASH driver Allen Martin
2013-01-12 9:07 ` [U-Boot] [PATCH v2 5/9] tegra30: add SBC1 to periph id mapping table Allen Martin
2013-01-12 16:57 ` Simon Glass
2013-01-12 9:07 ` [U-Boot] [PATCH v2 6/9] tegra30: fdt: add SPI SLINK nodes Allen Martin
2013-01-12 17:01 ` Simon Glass
2013-01-12 9:07 ` [U-Boot] [PATCH v2 7/9] tegra: add addresses of SPI SLINK controllers Allen Martin
2013-01-12 16:58 ` Simon Glass
2013-01-12 9:07 ` [U-Boot] [PATCH v2 8/9] tegra: add SPI SLINK driver Allen Martin
2013-01-12 16:56 ` Simon Glass
2013-01-14 18:49 ` Stephen Warren
2013-01-15 4:33 ` Allen Martin
2013-01-15 16:36 ` Stephen Warren [this message]
2013-01-22 14:06 ` Simon Glass
2013-01-15 4:27 ` Allen Martin
2013-01-22 13:56 ` Simon Glass
2013-01-12 9:07 ` [U-Boot] [PATCH v2 9/9] tegra: cardhu: config: enable SPI Allen Martin
2013-01-12 16:57 ` Simon Glass
2013-01-14 18:50 ` [U-Boot] [PATCH v2 0/9] tegra: SPI drivers Stephen Warren
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=50F5858D.4090608@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox