From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH v2] spi: Kill spi_chipsel table and introduce spi_setup()
Date: Tue, 05 Feb 2008 11:51:56 -0500 [thread overview]
Message-ID: <47A8942C.4010506@gmail.com> (raw)
In-Reply-To: <1202214493-11719-1-git-send-email-hskinnemoen@atmel.com>
Haavard Skinnemoen wrote:
> No need to add an extra layer of indirection and externals all over
> the place. Just let the board code define two functions,
> spi_cs_activate() and spi_cs_deactivate, and use them to do any
> board-specific magic with the chipselects.
>
> Not all drivers may need those extra functions however. If that's the
> case, the board code may just leave them out (assuming they know what
> the driver needs) or rely on the linker to strip them out (assuming
> --gc-sections is being used.)
>
> Also introduce a new function, spi_setup(), which must be called to
> initialize communications parameters for a given slave. This function
> will also check if the given chipselect id is valid. The driver may
> call spi_cs_is_valid(), which is defined by the board code if
> necessary, to verify that a given chipselect id is valid on the
> current board.
>
> Changed in v2:
> - Convert the mpc8xxx_spi driver and the mpc8349emds board to the
> new API.
>
> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
> ---
> I haven't tested if the boards affected by this patch still work, or
> even build, so use with care. I'd very much like some feedback on
> whether this API change is a good thing or not though.
>
Thanks Haavard! I'll try this out on the MPC8349EMDS some time today or
tonight.
regards,
Ben
next prev parent reply other threads:[~2008-02-05 16:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 12:28 [U-Boot-Users] [PATCH v2] spi: Kill spi_chipsel table and introduce spi_setup() Haavard Skinnemoen
2008-02-05 12:53 ` Joakim Tjernlund
2008-02-05 16:51 ` Ben Warren [this message]
2008-02-06 4:34 ` Mike Frysinger
2008-02-06 9:50 ` Haavard Skinnemoen
2008-02-06 13:45 ` Mike Frysinger
2008-02-06 15:18 ` Ben Warren
2008-02-06 15:39 ` Haavard Skinnemoen
2008-02-06 15:57 ` Mike Frysinger
2008-02-06 16:22 ` Ben Warren
2008-02-06 16:58 ` Ulf Samuelsson
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=47A8942C.4010506@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 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.