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 <s...@denx.de>
> Cc: Chin Liang See <cl...@altera.com>
> Cc: Dinh Nguyen <dingu...@altera.com>
> Cc: Vince Bridgers <vbrid...@altera.com>
> Cc: Marek Vasut <ma...@denx.de>
> Cc: Pavel Machek <pa...@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?
                                                                        Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to