On 05/20/2016 08:54 PM, Simon Glass wrote:
> Hi Vignesh,
> 
> On 19 May 2016 at 23:01, Vignesh R <vigne...@ti.com> wrote:
>>
>> Convert davinci_spi driver so that it complies with SPI DM framework.
>>
>> Signed-off-by: Vignesh R <vigne...@ti.com>
>> Reviewed-by: Tom Rini <tr...@konsulko.com>
>> ---
>>
>> v5: correct error message.
>>
>> v4: Check error returned by dev_map_physmem().
>>
>> v3: No changes
>>
>> v2: Add comments to struct davinci_spi_slave members.
>>     Use dev_map_physmem() added by previous patch.
>>
>>  drivers/spi/davinci_spi.c | 329 
>> +++++++++++++++++++++++++++++++++-------------
>>  1 file changed, 240 insertions(+), 89 deletions(-)
> 
> Sorry I missed something below.
> [snip]
> 
>> +static int davinci_ofdata_to_platadata(struct udevice *bus)
>> +{
>> +       struct davinci_spi_slave *ds = dev_get_priv(bus);
>> +       const void *blob = gd->fdt_blob;
>> +       int node = bus->of_offset;
>> +
>> +       ds->regs = dev_map_physmem(bus, sizeof(struct davinci_spi_regs));
>> +       if (!ds->regs) {
>> +               printf("%s: could not map device address\n", __func__);
>> +               return -ENODEV;
> 
> -EINVAL
> 
> We use -ENODEV to say there is no device. Here, we have a device but
> the configuration is wrong.

Ok, I posted in v6 with above change.


-- 
Regards
Vignesh
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to