diff mbox

[U-Boot,V2,08/11] colibri-vf: Enable SPI support

Message ID 1433148694-12898-9-git-send-email-bhuvanchandra.dv@toradex.com
State Superseded
Delegated to: Stefano Babic
Headers show

Commit Message

Bhuvanchandra DV June 1, 2015, 8:51 a.m. UTC
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 include/configs/colibri_vf.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Stefan Agner June 1, 2015, 10:32 a.m. UTC | #1
On 2015-06-01 10:51, Bhuvanchandra DV wrote:
> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
> ---
>  include/configs/colibri_vf.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
> index 195102b..3e57417 100644
> --- a/include/configs/colibri_vf.h
> +++ b/include/configs/colibri_vf.h
> @@ -272,4 +272,15 @@
>  #define CONFIG_USB_GADGET_MASS_STORAGE
>  #define CONFIG_CMD_USB_MASS_STORAGE
>  
> +/* Enable SPI support */
> +#define CONFIG_DM_SPI
> +#define CONFIG_CMD_SPI
> +#define CONFIG_FSL_DSPI
> +
> +#ifndef CONFIG_OF_CONTROL
> +#undef CONFIG_DM_SPI
> +#undef CONFIG_CMD_SPI
> +#undef CONFIG_FSL_DSPI
> +#endif
> +
>  #endif /* __CONFIG_H */

Hm, any specific reason we need to define them unconditionally first?
Couldn't we just inverse the logic and safe the undefs?

#ifdef CONFIG_OF_CONTROL
#define CONFIG_DM_SPI
#define CONFIG_CMD_SPI
#define CONFIG_FSL_DSPI
#endif

--
Stefan
Bhuvanchandra DV June 1, 2015, 12:27 p.m. UTC | #2
Hello Stefan,

On 06/01/2015 04:02 PM, Stefan Agner wrote:
> On 2015-06-01 10:51, Bhuvanchandra DV wrote:
>> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
>> ---
>>   include/configs/colibri_vf.h | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
>> index 195102b..3e57417 100644
>> --- a/include/configs/colibri_vf.h
>> +++ b/include/configs/colibri_vf.h
>> @@ -272,4 +272,15 @@
>>   #define CONFIG_USB_GADGET_MASS_STORAGE
>>   #define CONFIG_CMD_USB_MASS_STORAGE
>>
>> +/* Enable SPI support */
>> +#define CONFIG_DM_SPI
>> +#define CONFIG_CMD_SPI
>> +#define CONFIG_FSL_DSPI
>> +
>> +#ifndef CONFIG_OF_CONTROL
>> +#undef CONFIG_DM_SPI
>> +#undef CONFIG_CMD_SPI
>> +#undef CONFIG_FSL_DSPI
>> +#endif
>> +
>>   #endif /* __CONFIG_H */
>
> Hm, any specific reason we need to define them unconditionally first?
 >
> Couldn't we just inverse the logic and safe the undefs?
>
> #ifdef CONFIG_OF_CONTROL
> #define CONFIG_DM_SPI
> #define CONFIG_CMD_SPI
> #define CONFIG_FSL_DSPI
> #endif
>
Agreed to inverse the logic, as in both the above cases DSPI support is 
enabled by default when OF_CONTROL was defined. Your suggestion sounds 
good. Will update it accordingly, thanks!

> --
> Stefan
>

Best regards,
Bhuvan
diff mbox

Patch

diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 195102b..3e57417 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -272,4 +272,15 @@ 
 #define CONFIG_USB_GADGET_MASS_STORAGE
 #define CONFIG_CMD_USB_MASS_STORAGE
 
+/* Enable SPI support */
+#define CONFIG_DM_SPI
+#define CONFIG_CMD_SPI
+#define CONFIG_FSL_DSPI
+
+#ifndef CONFIG_OF_CONTROL
+#undef CONFIG_DM_SPI
+#undef CONFIG_CMD_SPI
+#undef CONFIG_FSL_DSPI
+#endif
+
 #endif /* __CONFIG_H */