From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add SPI support to mx51evk board
Date: Mon, 22 Mar 2010 11:32:06 +0100 [thread overview]
Message-ID: <4BA74726.5070803@denx.de> (raw)
In-Reply-To: <4BA566A5.8040100@windriver.com>
Tom wrote:
> Stefano Babic wrote:
>> The patch adds SPI devices to the mx51evk board. Two devices
>> are supported: Atmel SPI flash and MC13892 power
>> controller.
>
> Is Atmel SPI flash already supported?
> It does not look like anything atmel is setup here
No, not yes, only in a future patch set. I must change the comment.
>
> This is dependent on the
> Added MC13892VK Power Management driver.
> These patches must be combined in a patchset.
Yes, they are. And with the changes in the SPI master (mxc_spi.c). I
will combine all three in a patchset.
>> +
>> +#define REV_ATLAS_LITE_1_0 0x8
>> +#define REV_ATLAS_LITE_1_1 0x9
>> +#define REV_ATLAS_LITE_2_0 0x10
>> +#define REV_ATLAS_LITE_2_1 0x11
>
> Move these define out of the function.
> Preferablly to an h-file
Ok
>> +
>> + slave = mc13892_spi_probe();
>
> The read / write routine bails if slave is invalid.
> It would be better to check earlier here and bail.
> As some of the logic of this function will still run and
> this would leave the hw in a bad state
You are right, I will fix it.
>> +#ifdef CONFIG_MXC_SPI
>> + setup_iomux_spi(1);
>> +#endif
>
> In board_late_init, for CONFIG_MXC_SPI, cs=0, here it is cs=1
> Is this correct?
> Please use a if-def here instead of the 0,1
> Maybe CONFIG_MC13892_SPI_PMIC_CS ?
Yes, that is correct. I will change it.
>> /*
>> + * SPI Configs
>> + * */
>
> Remove the extra '* '
Ok, thanks.
>> +
>> +#define MAX_SPI_BYTES (64 * 4)
>> +
> The patch
> 'Added MC13892VK Power Management driver.'
> Depends on this
> Move this #define's to that patch, or an earlier path in the patch set.
> These patches should be bi-sectable
Understood, I will move it.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2010-03-22 10:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 16:22 [U-Boot] [PATCH] Add SPI support to mx51evk board Stefano Babic
2010-03-21 0:21 ` Tom
2010-03-22 10:32 ` Stefano Babic [this message]
2010-05-05 21:53 ` Wolfgang Denk
2010-05-05 22:30 ` Stefano Babic
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=4BA74726.5070803@denx.de \
--to=sbabic@denx.de \
--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