[U-Boot] [PATCH 2/3] BeagleBoard: Added userbutton command
Joel A Fernandes
agnel.joel at gmail.com
Fri Sep 9 19:00:42 CEST 2011
On Thu, Sep 8, 2011 at 10:10 AM, Kridner, Jason <jdk at ti.com> wrote:
>
>
> On Sep 8, 2011, at 11:03 AM, "Albert ARIBAUD" <albert.u.boot at aribaud.net> wrote:
>
>> Hi Joel,
>>
>> Le 08/09/2011 16:56, Joel A Fernandes a écrit :
>>
>>>> Also, I agree with Albert: there should be no need for a separate
>>>> userbutton command.
>>>>
>>>> Please fix and resubmit.
>>>
>>> If this patch is to be dropped, then I'm not sure why the need to resubmit?
>>
>> I gather the "resubmit" means "resubmit the patch set minus this patch and renumbered accordingly".
>
> One thing that would be necessary is to replace the default bootcmd with one that uses the gpio command and to enable the gpio command.
>
One of the difficulties with this is the GPIO value for userbutton
depends on the board rev which is what your patch does. Hardcoding
gpio values for one will break support for other boards
Without adding any additional commands, the only way I see this can be done is:
1. Use the gpio and test commands to get the board rev in omap3_beagle.h
2. Based on this, use the right gpio value to pass to another gpio
command to check userbutton state
This is quite messy IMO and is redundant because the revision
detection logic is already in the board/ file.
Another way is to add a command to the board/ file like
"get_userbutton_gpio" and use the value it returns to pass to the gpio
command but this seems to defeat the purpose of the cleanup itself.
If you think one of the above methods is acceptable, please ACK them
and I will start developing the patch.
Thanks,
Joel
More information about the U-Boot
mailing list