From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/6] arm: socfpga: Add Designware (DW) SPI support to config header
Date: Sat, 15 Nov 2014 15:40:10 +0100 [thread overview]
Message-ID: <201411151540.10207.marex@denx.de> (raw)
In-Reply-To: <54675687.6080702@denx.de>
On Saturday, November 15, 2014 at 02:35:03 PM, Stefan Roese wrote:
> On 14.11.2014 21:18, Marek Vasut wrote:
> > On Wednesday, November 12, 2014 at 06:53:54 PM, Pavel Machek wrote:
> >> On Fri 2014-11-07 13:50:34, Stefan Roese wrote:
> >>> Enable support for the DW master SPI controller in the config header
> >>> for the SoCFPGA. This controller can only be enabled, if DT support
> >>> is enabled.
> >>>
> >>> Signed-off-by: Stefan Roese <sr@denx.de>
> >>> Cc: Chin Liang See <clsee@altera.com>
> >>> Cc: Dinh Nguyen <dinguyen@altera.com>
> >>> Cc: Vince Bridgers <vbridger@altera.com>
> >>> Cc: Marek Vasut <marex@denx.de>
> >>> Cc: Pavel Machek <pavel@denx.de>
> >>> ---
> >>>
> >>> include/configs/socfpga_common.h | 12 ++++++++++++
> >>> 1 file changed, 12 insertions(+)
> >>>
> >>> diff --git a/include/configs/socfpga_common.h
> >>> b/include/configs/socfpga_common.h index 9fc4212..830b956 100644
> >>> --- a/include/configs/socfpga_common.h
> >>> +++ b/include/configs/socfpga_common.h
> >>> @@ -191,6 +191,18 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
> >>>
> >>> #define CONFIG_CMD_SF
> >>> #endif
> >>>
> >>> +#ifdef CONFIG_OF_CONTROL /* DW SPI is controlled via DT */
> >>> +#define CONFIG_CMD_DM
> >>> +#define CONFIG_DM
> >>> +#define CONFIG_DM_SPI
> >>> +#define CONFIG_DESIGNWARE_SPI
> >>> +#ifndef __ASSEMBLY__
> >>> +unsigned int cm_get_spi_controller_clk_hz(void);
> >>> +#define CONFIG_DW_SPI_REF_CLK cm_get_spi_controller_clk_hz()
> >>
> >> Putting prototypes into configuration file is ugly. Hiding function
> >> call into macro so that it looks like constant is evil. Is there
> >> better solution?
> >
> > The SPI driver should call this function directly. Or is there a reason
> > why such a macro is used ?
>
> Historically. I'll check it again and will implement it differently in
> the next version. Tomorrow or on Monday.
Roger. Thank you!
Best regards,
Marek Vasut
prev parent reply other threads:[~2014-11-15 14:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 12:50 [U-Boot] [PATCH 0/6] arm: socfpga: Add Designware SPI support Stefan Roese
2014-11-07 12:50 ` [U-Boot] [PATCH 1/6] arm: socfpga: Add DW master SPI clock to clock_manager.c Stefan Roese
2014-11-07 15:08 ` Marek Vasut
2014-11-12 17:41 ` Pavel Machek
2014-11-07 12:50 ` [U-Boot] [PATCH 2/6] arm: socfpga: Add socfpga_spim_enable() to reset_manager.c Stefan Roese
2014-11-12 17:42 ` Pavel Machek
2014-11-16 10:47 ` Stefan Roese
2014-11-07 12:50 ` [U-Boot] [PATCH 3/6] spi: Add designware master SPI DM driver used on SoCFPGA Stefan Roese
2014-11-07 15:12 ` Marek Vasut
2014-11-07 18:01 ` Simon Glass
2014-11-12 17:51 ` Pavel Machek
2014-11-14 20:16 ` Marek Vasut
2014-11-15 13:33 ` Stefan Roese
2014-11-15 14:40 ` Marek Vasut
2014-11-07 12:50 ` [U-Boot] [PATCH 4/6] arm: socfpga: dts: Add spi0/1 dts nodes for the Designware master SPI devices Stefan Roese
2014-11-12 17:52 ` Pavel Machek
2014-11-07 12:50 ` [U-Boot] [PATCH 5/6] arm: socfpga: dts: socrates: Add spi1/2 aliases needed DM SPI probing Stefan Roese
2014-11-12 17:52 ` Pavel Machek
2014-11-07 12:50 ` [U-Boot] [PATCH 6/6] arm: socfpga: Add Designware (DW) SPI support to config header Stefan Roese
2014-11-12 17:53 ` Pavel Machek
2014-11-14 20:18 ` Marek Vasut
2014-11-15 13:35 ` Stefan Roese
2014-11-15 14:40 ` Marek Vasut [this message]
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=201411151540.10207.marex@denx.de \
--to=marex@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 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.