[U-Boot] [PATCH 03/18] sf: fix sf probe

Marek Vasut marex at denx.de
Mon Aug 4 16:09:21 CEST 2014


On Monday, August 04, 2014 at 04:02:42 PM, Tom Rini wrote:
[...]
> Eeep.  That seems very likely to be gotten incorrect by users.
> 
> Can we do something like:
> mxc_spi.c:
> __weak int board_map_spi_cs_value(int desired_cs) { return -EINVAL; }
> 
> fooboard.c:
> board_map_spi_cs_value(int desired_cs) {
>   if (desired_cs == 0)
>     return IMX_GPIO_NR(2, 30);
>   else
>     return -EINVAL;
> }
> 
> I think it'll be very bad if the user has to type 'sf probe 0:15872' or
> 'sf probe 15872' since that's a programming detail rather than saying
> bank 2, gpio 30 (which I assume is what IMX_GPIO_NR means).

I'm worried about the user scripts which depend on this original behavior. Do we 
care about compatibility there ?

Best regards,
Marek Vasut


More information about the U-Boot mailing list