From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Move conditional compilation of MPC8XXX SPI driver to Makefile
Date: Mon, 26 May 2008 09:40:30 -0700 [thread overview]
Message-ID: <483AE7FE.6040508@gmail.com> (raw)
In-Reply-To: <20080526152602.48B9B2430A@gemini.denx.de>
Wolfgang Denk wrote:
> In message <483AD1FC.7040805@gmail.com> you wrote:
>
>> If CONFIG_MPC8XXX_SPI is defined but CONFIG_HARD_SPI is not, compilation
>> will fail, since CONFIG_HARD_SPI activates the common SPI code on
>>
>
> How would I configure a system to use CONFIG_SOFT_SPI on a MPC8XXX
> system?
>
>
That's actually pretty easy:
1. #define CONFIG_SOFT_SPI in board config
2. define bit-bang parameters in board code
3. Call spi_init() from board code
The CONFIG_HARD_SPI define doesn't actually do anything
hardware-related. The only place it's used is in lib_ppc/board.c to
initialize a SPI controller, but the code could equally-well start a
soft SPI controller. I would have used CONFIG_SPI, but that was already
taken by SPI EEPROM stuff. Maybe it's time to refactor a bit more...
>> PowerPC. I guess I figured Kconfig would eventually manage the
>> dependencies of these options, but I will put the #ifdef back in if you
>> want.
>>
>
> At the moment it seems logical to me to leave this test as it was.
>
> Best regards,
>
> Wolfgang Denk
>
>
regards,
Ben
next prev parent reply other threads:[~2008-05-26 16:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 6:31 [U-Boot-Users] [PATCH] Move conditional compilation of MPC8XXX SPI driver to Makefile Ben Warren
2008-05-26 7:54 ` Wolfgang Denk
2008-05-26 15:06 ` Ben Warren
2008-05-26 15:26 ` Wolfgang Denk
2008-05-26 16:40 ` Ben Warren [this message]
2008-05-27 7:34 ` Haavard Skinnemoen
2008-05-27 7:54 ` Wolfgang Denk
2008-05-27 8:04 ` Haavard Skinnemoen
2008-05-27 8:13 ` Wolfgang Denk
2008-05-27 8:32 ` Haavard Skinnemoen
2008-05-27 9:13 ` Wolfgang Denk
2008-05-27 14:28 ` Ben 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=483AE7FE.6040508@gmail.com \
--to=biggerbadderben@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox