diff mbox

[7/7] EXYNOS5: Snow: Add a configuration file

Message ID 1358765559-32709-8-git-send-email-rajeshwari.s@samsung.com
State New
Headers show

Commit Message

Rajeshwari Shinde Jan. 21, 2013, 10:52 a.m. UTC
This patch adds the configuration file for Snow Board and
defines the same in boards.cfg.
The Audio codec required for SMDK5250 and Snow are different
hence they are defined in the corresponding configuration files.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
 boards.cfg                      |    1 +
 include/configs/exynos5250-dt.h |    1 -
 include/configs/smdk5250.h      |    1 +
 include/configs/snow.h          |   34 ++++++++++++++++++++++++++++++++++
 4 files changed, 36 insertions(+), 1 deletions(-)
 create mode 100644 include/configs/snow.h

Comments

Simon Glass Jan. 22, 2013, 2:58 p.m. UTC | #1
Hi Rajeshwari,

On Mon, Jan 21, 2013 at 2:52 AM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> This patch adds the configuration file for Snow Board and
> defines the same in boards.cfg.
> The Audio codec required for SMDK5250 and Snow are different
> hence they are defined in the corresponding configuration files.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
>  boards.cfg                      |    1 +
>  include/configs/exynos5250-dt.h |    1 -
>  include/configs/smdk5250.h      |    1 +
>  include/configs/snow.h          |   34 ++++++++++++++++++++++++++++++++++
>  4 files changed, 36 insertions(+), 1 deletions(-)
>  create mode 100644 include/configs/snow.h
>
> diff --git a/boards.cfg b/boards.cfg
> index e4b0d44..f247b03 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -283,6 +283,7 @@ s5p_goni                     arm         armv7       goni                samsung
>  smdkc100                     arm         armv7       smdkc100            samsung        s5pc1xx
>  origen                      arm         armv7       origen              samsung        exynos
>  s5pc210_universal            arm         armv7       universal_c210      samsung        exynos
> +snow                        arm         armv7       smdk5250            samsung        exynos
>  smdk5250                    arm         armv7       smdk5250            samsung        exynos
>  smdkv310                    arm         armv7       smdkv310            samsung        exynos
>  trats                        arm         armv7       trats               samsung        exynos
> diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
> index a01fb96..7b9c393 100644
> --- a/include/configs/exynos5250-dt.h
> +++ b/include/configs/exynos5250-dt.h
> @@ -297,7 +297,6 @@
>  #ifdef CONFIG_CMD_SOUND
>  #define CONFIG_SOUND
>  #define CONFIG_I2S
> -#define CONFIG_SOUND_WM8994
>  #endif
>
>  /* Enable devicetree support */
> diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
> index 81f83a8..b23b5bc 100644
> --- a/include/configs/smdk5250.h
> +++ b/include/configs/smdk5250.h
> @@ -30,4 +30,5 @@
>  #undef CONFIG_DEFAULT_DEVICE_TREE
>  #define CONFIG_DEFAULT_DEVICE_TREE     exynos5250-smdk5250
>
> +#define CONFIG_SOUND_WM8994
>  #endif /* __CONFIG_SMDK_H */
> diff --git a/include/configs/snow.h b/include/configs/snow.h
> new file mode 100644
> index 0000000..be38635
> --- /dev/null
> +++ b/include/configs/snow.h
> @@ -0,0 +1,34 @@
> +/*
> + * Copyright (C) 2012 Samsung Electronics
> + *
> + * Configuration settings for the SAMSUNG SMDK5250 board.
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#ifndef __CONFIG_SMDK_H
> +#define __CONFIG_SMDK_H
> +
> +#include <configs/exynos5250-dt.h>
> +
> +#undef CONFIG_DEFAULT_DEVICE_TREE
> +#define CONFIG_DEFAULT_DEVICE_TREE     exynos5250-snow
> +
> +#define CONFIG_SOUND_MAX98095

Really it would be better if they could share the same config, with
just the CONFIG_DEFAULT_DEVICE_TREE difference. Isn't there code to
select the right codec based on the FDT nodes?

Maybe I have this wrong, not sure.

> +#endif /* __CONFIG_SMDK_H */
> --
> 1.7.4.4
>

Regards,
Simon
Rajeshwari Birje Jan. 23, 2013, 10:13 a.m. UTC | #2
Hi Simon,

Thank you for comments.

On Tue, Jan 22, 2013 at 8:28 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Rajeshwari,
>
> On Mon, Jan 21, 2013 at 2:52 AM, Rajeshwari Shinde
> <rajeshwari.s@samsung.com> wrote:
>> This patch adds the configuration file for Snow Board and
>> defines the same in boards.cfg.
>> The Audio codec required for SMDK5250 and Snow are different
>> hence they are defined in the corresponding configuration files.
>>
>> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
>> ---
>>  boards.cfg                      |    1 +
>>  include/configs/exynos5250-dt.h |    1 -
>>  include/configs/smdk5250.h      |    1 +
>>  include/configs/snow.h          |   34 ++++++++++++++++++++++++++++++++++
>>  4 files changed, 36 insertions(+), 1 deletions(-)
>>  create mode 100644 include/configs/snow.h
>>
>> diff --git a/boards.cfg b/boards.cfg
>> index e4b0d44..f247b03 100644
>> --- a/boards.cfg
>> +++ b/boards.cfg
>> @@ -283,6 +283,7 @@ s5p_goni                     arm         armv7       goni                samsung
>>  smdkc100                     arm         armv7       smdkc100            samsung        s5pc1xx
>>  origen                      arm         armv7       origen              samsung        exynos
>>  s5pc210_universal            arm         armv7       universal_c210      samsung        exynos
>> +snow                        arm         armv7       smdk5250            samsung        exynos
>>  smdk5250                    arm         armv7       smdk5250            samsung        exynos
>>  smdkv310                    arm         armv7       smdkv310            samsung        exynos
>>  trats                        arm         armv7       trats               samsung        exynos
>> diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
>> index a01fb96..7b9c393 100644
>> --- a/include/configs/exynos5250-dt.h
>> +++ b/include/configs/exynos5250-dt.h
>> @@ -297,7 +297,6 @@
>>  #ifdef CONFIG_CMD_SOUND
>>  #define CONFIG_SOUND
>>  #define CONFIG_I2S
>> -#define CONFIG_SOUND_WM8994
>>  #endif
>>
>>  /* Enable devicetree support */
>> diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
>> index 81f83a8..b23b5bc 100644
>> --- a/include/configs/smdk5250.h
>> +++ b/include/configs/smdk5250.h
>> @@ -30,4 +30,5 @@
>>  #undef CONFIG_DEFAULT_DEVICE_TREE
>>  #define CONFIG_DEFAULT_DEVICE_TREE     exynos5250-smdk5250
>>
>> +#define CONFIG_SOUND_WM8994
>>  #endif /* __CONFIG_SMDK_H */
>> diff --git a/include/configs/snow.h b/include/configs/snow.h
>> new file mode 100644
>> index 0000000..be38635
>> --- /dev/null
>> +++ b/include/configs/snow.h
>> @@ -0,0 +1,34 @@
>> +/*
>> + * Copyright (C) 2012 Samsung Electronics
>> + *
>> + * Configuration settings for the SAMSUNG SMDK5250 board.
>> + *
>> + * See file CREDITS for list of people who contributed to this
>> + * project.
>> + *
>> + * This program is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License as
>> + * published by the Free Software Foundation; either version 2 of
>> + * the License, or (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program; if not, write to the Free Software
>> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
>> + * MA 02111-1307 USA
>> + */
>> +
>> +#ifndef __CONFIG_SMDK_H
>> +#define __CONFIG_SMDK_H
>> +
>> +#include <configs/exynos5250-dt.h>
>> +
>> +#undef CONFIG_DEFAULT_DEVICE_TREE
>> +#define CONFIG_DEFAULT_DEVICE_TREE     exynos5250-snow
>> +
>> +#define CONFIG_SOUND_MAX98095
>
> Really it would be better if they could share the same config, with
> just the CONFIG_DEFAULT_DEVICE_TREE difference. Isn't there code to
> select the right codec based on the FDT nodes?
>
> Maybe I have this wrong, not sure.
Actually we do decode the codec from DTS file.
But we need to define this to compile the corresponding codec file.
And I felt since the codec is different for both the boards we can add
them in the respective config file.
Also in case of Non FDT we define the values based on this codec define.
>
>> +#endif /* __CONFIG_SMDK_H */
>> --
>> 1.7.4.4
>>
>
> Regards,
> Simon
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Simon Glass Jan. 25, 2013, 9:03 p.m. UTC | #3
Hi Rajeshwari,

On Wed, Jan 23, 2013 at 11:13 PM, Rajeshwari Birje
<rajeshwari.birje@gmail.com> wrote:
> Hi Simon,
>
> Thank you for comments.
>
> On Tue, Jan 22, 2013 at 8:28 PM, Simon Glass <sjg@chromium.org> wrote:
>> Hi Rajeshwari,
>>
>> On Mon, Jan 21, 2013 at 2:52 AM, Rajeshwari Shinde
>> <rajeshwari.s@samsung.com> wrote:
>>> This patch adds the configuration file for Snow Board and
>>> defines the same in boards.cfg.
>>> The Audio codec required for SMDK5250 and Snow are different
>>> hence they are defined in the corresponding configuration files.
>>>
>>> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
>>> ---
>>>  boards.cfg                      |    1 +
>>>  include/configs/exynos5250-dt.h |    1 -
>>>  include/configs/smdk5250.h      |    1 +
>>>  include/configs/snow.h          |   34 ++++++++++++++++++++++++++++++++++
>>>  4 files changed, 36 insertions(+), 1 deletions(-)
>>>  create mode 100644 include/configs/snow.h
>>>
>>> diff --git a/boards.cfg b/boards.cfg
>>> index e4b0d44..f247b03 100644
>>> --- a/boards.cfg
>>> +++ b/boards.cfg
>>> @@ -283,6 +283,7 @@ s5p_goni                     arm         armv7       goni                samsung
>>>  smdkc100                     arm         armv7       smdkc100            samsung        s5pc1xx
>>>  origen                      arm         armv7       origen              samsung        exynos
>>>  s5pc210_universal            arm         armv7       universal_c210      samsung        exynos
>>> +snow                        arm         armv7       smdk5250            samsung        exynos
>>>  smdk5250                    arm         armv7       smdk5250            samsung        exynos
>>>  smdkv310                    arm         armv7       smdkv310            samsung        exynos
>>>  trats                        arm         armv7       trats               samsung        exynos
>>> diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
>>> index a01fb96..7b9c393 100644
>>> --- a/include/configs/exynos5250-dt.h
>>> +++ b/include/configs/exynos5250-dt.h
>>> @@ -297,7 +297,6 @@
>>>  #ifdef CONFIG_CMD_SOUND
>>>  #define CONFIG_SOUND
>>>  #define CONFIG_I2S
>>> -#define CONFIG_SOUND_WM8994
>>>  #endif
>>>
>>>  /* Enable devicetree support */
>>> diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
>>> index 81f83a8..b23b5bc 100644
>>> --- a/include/configs/smdk5250.h
>>> +++ b/include/configs/smdk5250.h
>>> @@ -30,4 +30,5 @@
>>>  #undef CONFIG_DEFAULT_DEVICE_TREE
>>>  #define CONFIG_DEFAULT_DEVICE_TREE     exynos5250-smdk5250
>>>
>>> +#define CONFIG_SOUND_WM8994
>>>  #endif /* __CONFIG_SMDK_H */
>>> diff --git a/include/configs/snow.h b/include/configs/snow.h
>>> new file mode 100644
>>> index 0000000..be38635
>>> --- /dev/null
>>> +++ b/include/configs/snow.h
>>> @@ -0,0 +1,34 @@
>>> +/*
>>> + * Copyright (C) 2012 Samsung Electronics
>>> + *
>>> + * Configuration settings for the SAMSUNG SMDK5250 board.
>>> + *
>>> + * See file CREDITS for list of people who contributed to this
>>> + * project.
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>>> + * modify it under the terms of the GNU General Public License as
>>> + * published by the Free Software Foundation; either version 2 of
>>> + * the License, or (at your option) any later version.
>>> + *
>>> + * This program is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>> + * GNU General Public License for more details.
>>> + *
>>> + * You should have received a copy of the GNU General Public License
>>> + * along with this program; if not, write to the Free Software
>>> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
>>> + * MA 02111-1307 USA
>>> + */
>>> +
>>> +#ifndef __CONFIG_SMDK_H
>>> +#define __CONFIG_SMDK_H
>>> +
>>> +#include <configs/exynos5250-dt.h>
>>> +
>>> +#undef CONFIG_DEFAULT_DEVICE_TREE
>>> +#define CONFIG_DEFAULT_DEVICE_TREE     exynos5250-snow
>>> +
>>> +#define CONFIG_SOUND_MAX98095
>>
>> Really it would be better if they could share the same config, with
>> just the CONFIG_DEFAULT_DEVICE_TREE difference. Isn't there code to
>> select the right codec based on the FDT nodes?
>>
>> Maybe I have this wrong, not sure.
> Actually we do decode the codec from DTS file.
> But we need to define this to compile the corresponding codec file.
> And I felt since the codec is different for both the boards we can add
> them in the respective config file.
> Also in case of Non FDT we define the values based on this codec define.

Well keep in mind that if we want the same U-Boot to boot on all
exynos5250 boards then we will need to define both CONFIGs in the
config file and rely on the FDT to make it work. What happens if you
define both codecs in smdk5250.h? Also note that at built time we
don't know whether we are booting on snow or smdk5250 (just as with
the kernel), and we only find out when we start.

Wasn't there a plan to have a exynos5250_dt.h config file? If so, then
perhaps that file can define both codec CONFIGs, and your new snow
file can include that instead?

Regards,
Simon

>>
>>> +#endif /* __CONFIG_SMDK_H */
>>> --
>>> 1.7.4.4
>>>
>>
>> Regards,
>> Simon
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot@lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>
> --
> Regards,
> Rajeshwari Shinde
diff mbox

Patch

diff --git a/boards.cfg b/boards.cfg
index e4b0d44..f247b03 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -283,6 +283,7 @@  s5p_goni                     arm         armv7       goni                samsung
 smdkc100                     arm         armv7       smdkc100            samsung        s5pc1xx
 origen			     arm	 armv7	     origen		 samsung	exynos
 s5pc210_universal            arm         armv7       universal_c210      samsung        exynos
+snow			     arm	 armv7	     smdk5250		 samsung	exynos
 smdk5250		     arm	 armv7	     smdk5250		 samsung	exynos
 smdkv310		     arm	 armv7	     smdkv310		 samsung	exynos
 trats                        arm         armv7       trats               samsung        exynos
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index a01fb96..7b9c393 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -297,7 +297,6 @@ 
 #ifdef CONFIG_CMD_SOUND
 #define CONFIG_SOUND
 #define CONFIG_I2S
-#define CONFIG_SOUND_WM8994
 #endif
 
 /* Enable devicetree support */
diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
index 81f83a8..b23b5bc 100644
--- a/include/configs/smdk5250.h
+++ b/include/configs/smdk5250.h
@@ -30,4 +30,5 @@ 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-smdk5250
 
+#define CONFIG_SOUND_WM8994
 #endif	/* __CONFIG_SMDK_H */
diff --git a/include/configs/snow.h b/include/configs/snow.h
new file mode 100644
index 0000000..be38635
--- /dev/null
+++ b/include/configs/snow.h
@@ -0,0 +1,34 @@ 
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Configuration settings for the SAMSUNG SMDK5250 board.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __CONFIG_SMDK_H
+#define __CONFIG_SMDK_H
+
+#include <configs/exynos5250-dt.h>
+
+#undef CONFIG_DEFAULT_DEVICE_TREE
+#define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-snow
+
+#define CONFIG_SOUND_MAX98095
+#endif	/* __CONFIG_SMDK_H */