All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Faiz Abbas <faiz_abbas@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH 5/5] arm: mach-omap2: am33xx: Add device structure for spi
Date: Tue, 8 Sep 2020 17:56:58 +0530	[thread overview]
Message-ID: <6f92e2d8-3c3c-babd-33b6-82ca88ba430e@ti.com> (raw)
In-Reply-To: <8d652ca6-fdc5-2e74-6460-75cac189cc38@ti.com>

Hi Vignesh,

On 07/09/20 5:49 pm, Vignesh Raghavendra wrote:
> Hi,
> 
> On 9/7/20 4:02 PM, Faiz Abbas wrote:
>> Hi Vignesh,
>>
>> On 07/09/20 1:48 pm, Vignesh Raghavendra wrote:
>>>
>>>
>>> On 9/7/20 12:36 PM, Faiz Abbas wrote:
>>>> Hi Lokesh,
>>>>
>>>> On 07/09/20 12:08 pm, Lokesh Vutla wrote:
>>>>>
> [...]
>>>>>>  struct omap3_spi_priv {
>>>>>>  	struct mcspi *regs;
>>>>>>  	unsigned int cs;
>>>>>> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
>>>>>> index 9c4ef369c5..db1a89ad30 100644
>>>>>> --- a/include/configs/am335x_evm.h
>>>>>> +++ b/include/configs/am335x_evm.h
>>>>>> @@ -281,6 +281,10 @@
>>>>>>  #endif
>>>>>>  
>>>>>>  /* SPI flash. */
>>>>>> +#if CONFIG_IS_ENABLED(DM_SPI)
>>>>>> +#define AM33XX_SPI_BASE		0x48030000
>>>
>>> Could this be more specific? AM33XX_SPI<instance num>_BASE?
>>
>> Isn't there only one McSPI instance in am335x?
>>
> 
> No, there are 2 SPI ports on AM335x (see arch/arm/dts/am33xx.dtsi).

I see. I'll make the change in v2.

> 
>>>
>>>>>> +#define AM33XX_SPI_OFFSET	(AM33XX_SPI_BASE + OMAP4_MCSPI_REG_OFFSET)
>>>>>
>>>>> Can we get the SPI base from DT?
>>>>>
>>>>
>>>> We are doing that in U-boot (see the ofdata_to_platdata() callback in patch 4).
>>>> We need hardcoded static platdata for SPL. Was this not clear from the commit
>>>> message?
>>>>
>>>
>>> Then why not move these defines to arch/arm/mach-omap2/am33xx/board.c as
>>> well?
>>
>> All the other base addresses used in arch/arm/mach-omap2/am33xx/board.c are included
>> from here. For example see UART platdata (struct ns16550_platdata am33xx_serial[]).
>>
> 
> UART is bad example as those #defines were added in 2012 which predate
> platdata introduction...
> 
> Besides what happens when derivative of AM335x (see
> include/configs/am335x_*.h) want to enable SPI boot? Would each such
> files need to duplicate this snippet?
> 
Ok. I'll move the base address to the board file.

Thanks,
Faiz

  reply	other threads:[~2020-09-08 12:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 11:17 [PATCH 0/5] Add spi boot support to am335x-icev2 Faiz Abbas
2020-09-02 11:18 ` [PATCH 1/5] arm: dts: am335x-icev2: Add spi node Faiz Abbas
2020-09-02 11:18 ` [PATCH 2/5] configs: Add spiboot support for am335x Faiz Abbas
2020-09-07 11:29   ` Lokesh Vutla
2020-09-02 11:18 ` [PATCH 3/5] spi: spi-uclass: Block dm_scan_fdt_dev with OF_CONTROL to prevent build failures Faiz Abbas
2020-09-07  6:39   ` Lokesh Vutla
2020-09-10 17:59   ` Jagan Teki
2020-09-02 11:18 ` [PATCH 4/5] spi: omap3_spi: Read platform data in ofdata_to_platdata() Faiz Abbas
2020-09-07 12:12   ` Vignesh Raghavendra
2020-09-07 12:13   ` Vignesh Raghavendra
2020-09-02 11:18 ` [PATCH 5/5] arm: mach-omap2: am33xx: Add device structure for spi Faiz Abbas
2020-09-07  6:38   ` Lokesh Vutla
2020-09-07  7:06     ` Faiz Abbas
2020-09-07  8:18       ` Vignesh Raghavendra
2020-09-07 10:32         ` Faiz Abbas
2020-09-07 12:19           ` Vignesh Raghavendra
2020-09-08 12:26             ` Faiz Abbas [this message]
2020-09-11  2:46 ` [PATCH 0/5] Add spi boot support to am335x-icev2 Lokesh Vutla
2020-09-11  4:37   ` Faiz Abbas

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=6f92e2d8-3c3c-babd-33b6-82ca88ba430e@ti.com \
    --to=faiz_abbas@ti.com \
    --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 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.