[U-Boot] [PATCH 04/11 v2] drivers/net/vsc9953: Refractor the parser for VSC9953 commands

Joe Hershberger joe.hershberger at gmail.com
Tue Jul 7 20:18:29 CEST 2015


Hi Codrin,

On Tue, Jul 7, 2015 at 8:08 AM, Codrin Constantin Ciubotariu
<codrin.ciubotariu at freescale.com> wrote:
> Hi Joe,
>
>> -----Original Message-----
>> From: Joe Hershberger [mailto:joe.hershberger at gmail.com]
>> Sent: Wednesday, July 01, 2015 1:31 AM
>> To: Ciubotariu Codrin Constantin-B43658
>> Cc: u-boot; Joe Hershberger; Sun York-R58495
>> Subject: Re: [U-Boot] [PATCH 04/11 v2] drivers/net/vsc9953: Refractor the parser
>> for VSC9953 commands
>>
>> Hi Codrin,
>>
>> On Tue, Jun 30, 2015 at 3:57 AM, Codrin Constantin Ciubotariu
>> <codrin.ciubotariu at freescale.com> wrote:
>> > Hi Joe,
>> >
>> >> -----Original Message-----
>> >> From: Joe Hershberger [mailto:joe.hershberger at gmail.com]
>> >> Sent: Friday, June 26, 2015 1:31 AM
>> >> To: Ciubotariu Codrin Constantin-B43658
>> >> Cc: u-boot; Joe Hershberger; Sun York-R58495
>> >> Subject: Re: [U-Boot] [PATCH 04/11 v2] drivers/net/vsc9953: Refractor
>> >> the parser for VSC9953 commands
>> >>
>> >> >  static struct vsc9953_info vsc9953_l2sw = { @@ -575,6 +576,10 @@
>> >> > void vsc9953_init(bd_t *bis)  }
>> >> >
>> >> >  #ifdef CONFIG_VSC9953_CMD
>> >>
>> >> I'd like to see this moved to its own file in common... maybe
>> >> "common/cmd_ethsw.c". I'd also like to see this #define change to
>> >> something like "CONFIG_CMD_ETHSW".
>> >>
>> >> These changes don't necessarily need to be part of this series, since
>> >> it already got in as is, but if you feel motivated, I would recommend
>> >> you add a patch before this one that moves it.
>> >
>> > I could move this parser in common/do_ethsw.c and rename the define. I guess
>> this would imply that upcoming drivers for Ethernet L2 Switches could use the
>> same commands while calling their specific functions.
>>
>> That's the idea. It would be great to keep it semi-generic.
>
> I also need to create a do_ethsw.h that should contain at least struct keywords_to_function. I need this so that any driver could set its implementation in .keyword_function. Where should I put this header?

I think you should add a file simply called "include/ethsw.h"

Cheers,
-Joe


More information about the U-Boot mailing list