[U-Boot] [PATCH 2/2] OMAP3: igep00x0: Add new IGEP COM PROTON.

Enric Balletbo Serra eballetbo at gmail.com
Wed Feb 6 17:19:32 CET 2013


Hi Javier,

2013/2/6 Javier Martinez Canillas <martinez.javier at gmail.com>:
> On Wed, Feb 6, 2013 at 3:42 PM, Enric Balletbo Serra
> <eballetbo at gmail.com> wrote:
>> Hi Javier,
>>
>
> Hi Enric,
>
>> Thanks for your comments.
>>
>> 2013/2/6 Javier Martinez Canillas <javier at dowhile0.org>:
>>> Hi Enric,
>>>
>>> On Wed, Feb 6, 2013 at 9:29 AM, Enric Balletbo i Serra
>>> <eballetbo at gmail.com> wrote:
>>>> From: Enric Balletbo i Serra <eballetbo at iseebcn.com>
>>>>
>>>> The IGEP COM PROTON is a new ultra compact module design with an
>>>> on-board ethernet controller.
>>>>
>>>> Signed-off-by: Enric Balletbo i Serra <eballetbo at iseebcn.com>
>>>> ---
>>>>  MAINTAINERS                    |    1 +
>>>>  board/isee/igep00x0/igep00x0.c |    3 +++
>>>>  board/isee/igep00x0/igep00x0.h |    3 +++
>>>>  boards.cfg                     |    1 +
>>>>  4 files changed, 8 insertions(+)
>>>>
>>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>>> index d3ed390..1aed6d9 100644
>>>> --- a/MAINTAINERS
>>>> +++ b/MAINTAINERS
>>>> @@ -607,6 +607,7 @@ Enric Balletbo i Serra <eballetbo at iseebcn.com>
>>>>
>>>>         igep0020        ARM ARMV7 (OMAP3xx SoC)
>>>>         igep0030        ARM ARMV7 (OMAP3xx SoC)
>>>> +       igep0032        ARM ARMV7 (OMAP3xx SoC)
>>>>
>>>>  Eric Benard <eric at eukrea.com>
>>>>
>>>> diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
>>>> index 49fcf34..93aea8b 100644
>>>> --- a/board/isee/igep00x0/igep00x0.c
>>>> +++ b/board/isee/igep00x0/igep00x0.c
>>>> @@ -68,8 +68,11 @@ void show_boot_progress(int val)
>>>>                 return;
>>>>         }
>>>>
>>>> +/* Skip in the case of IGEP0032 machine */
>>>> +#if !(CONFIG_MACH_TYPE == MACH_TYPE_IGEP0032)
>>>>         if (!gpio_request(IGEP00X0_GPIO_LED, ""))
>>>>                 gpio_direction_output(IGEP00X0_GPIO_LED, 1);
>>>> +#endif
>>>>  }
>>>>  #endif
>>>>
>>>
>>> So, this board doesn't have a GPIO LED to show it boot status?
>>>
>>
>> Yes, it has but not connected to one OMAP GPIO. There is a led to
>> indicate power and two leds connected to TWL. Maybe I could use one of
>> them but meanwhile I decided don't use these leds.
>>
>
> Agree
>
>>> If that's the case I think there is no point to call show_boot_progress().
>>> Since this function is only compiled when CONFIG_SHOW_BOOT_PROGRESS
>>> is defined. I think that a better approach is to just define it for the
>>> machines that have a boot progress GPIO LED. e.g:
>>>
>>> diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
>>> index 88eadb4..98eed0f 100644
>>> --- a/include/configs/igep00x0.h
>>> +++ b/include/configs/igep00x0.h
>>> @@ -85,8 +85,11 @@
>>>  #define CONFIG_OMAP_HSMMC              1
>>>  #define CONFIG_DOS_PARTITION           1
>>>
>>> +#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020) || \
>>> +    (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030)
>>>  /* define to enable boot progress via leds */
>>>  #define CONFIG_SHOW_BOOT_PROGRESS
>>> +#endif
>>>
>>
>> The problem is: if I disable the call to show_boot_progress in
>> igep00x0.h I'll get a compilation error in this function because
>> IGEP00X0_GPIO_LED is undeclared, so necessarily I need to protect the
>> call in igep00x0.c against this undefined reference. For that reason I
>> used the ifdef inside the show_boot_progress implementation.
>>
>
> I'm confused now, why would that happen?
>
> IGEP00X0_GPIO_LED is only used in show_boot_progress and this function
> his shielded by:
>
> #if defined(CONFIG_SHOW_BOOT_PROGRESS) && !defined(CONFIG_SPL_BUILD)
> void show_boot_progress(int val)
> {
>        if (val < 0) {
>                /* something went wrong */
>                return;
>        }
>
>        if (!gpio_request(IGEP00X0_GPIO_LED, ""))
>                gpio_direction_output(IGEP00X0_GPIO_LED, 1);
> }
> #endif
>
> Which means that this function is only build when
> CONFIG_SHOW_BOOT_PROGRESS is defined.
>
> So, I don't see why not defining CONFIG_SHOW_BOOT_PROGRESS for
> MACH_TYPE_IGEP0032
> could lead to that build error (after all IGEP00X0_GPIO_LED is not
> been used in any other place)
>

Mmmm, right you have reason, let me dive into ... :-) Maybe I did
something wrong...


>>>  /* USB */
>>>  #define CONFIG_MUSB_UDC                        1
>>>
>>>> diff --git a/board/isee/igep00x0/igep00x0.h b/board/isee/igep00x0/igep00x0.h
>>>> index dbc7cf6..f5fce9c 100644
>>>> --- a/board/isee/igep00x0/igep00x0.h
>>>> +++ b/board/isee/igep00x0/igep00x0.h
>>>> @@ -39,6 +39,9 @@ const omap3_sysinfo sysinfo = {
>>>>  #if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030)
>>>>         "IGEP COM MODULE/ELECTRON",
>>>>  #endif
>>>> +#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0032)
>>>> +       "IGEP COM PROTON",
>>>> +#endif
>>>>  #if defined(CONFIG_ENV_IS_IN_ONENAND)
>>>>         "ONENAND",
>>>>  #else
>>>> diff --git a/boards.cfg b/boards.cfg
>>>> index 691a32a..8453836 100644
>>>> --- a/boards.cfg
>>>> +++ b/boards.cfg
>>>> @@ -259,6 +259,7 @@ igep0020                     arm         armv7       igep00x0            isee
>>>>  igep0020_nand                arm         armv7       igep00x0            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND
>>>>  igep0030                     arm         armv7       igep00x0            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND
>>>>  igep0030_nand                arm         armv7       igep00x0            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND
>>>> +igep0032                     arm         armv7       igep00x0            isee           omap3          igep00x0:MACH_TYPE=MACH_TYPE_IGEP0032,BOOT_ONENAND
>>>>  am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
>>>>  mt_ventoux                   arm         armv7       mt_ventoux          teejet         omap3
>>>>  omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
>>>> --
>>>
>>>  This doesn't have a NAND version too like IGEP0020 and IGEP0030 boards?
>>>
>>
>> No, the IGEP0032 only has OneNAND.
>>
>
> Perfect, I just asked since other IGEP boards used both flash memory types.
>
>>> You said that this board has an on-board ethernet controller. Does
>>> this board use the
>>> SMC911X chip connected to the OMAP GPMC too? In that case I guess you need
>>> something like this to have CONFIG_CMD_NET enabled on
>>> board/isee/igep00x0/igep00x0.c
>>> for this board too:
>>>
>>> diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
>>> index 0e7f924..88eadb4 100644
>>> --- a/include/configs/igep00x0.h
>>> +++ b/include/configs/igep00x0.h
>>> @@ -118,7 +118,8 @@
>>>  #ifdef CONFIG_BOOT_NAND
>>>  #define CONFIG_CMD_NAND
>>>  #endif
>>> -#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020)
>>> +#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020) || \
>>> +    (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0032)
>>>  #define CONFIG_CMD_NET         /* bootp, tftpboot, rarpboot    */
>>>  #endif
>>>  #define CONFIG_CMD_DHCP
>>>
>>
>> Right, I'll add this in version 2.
>>
>
> Great
>
>> Thanks and best regards,
>>    Enric
>>
>
> Thanks a lot and best regards,
> Javier


More information about the U-Boot mailing list