[PATCH] nand: Add NAND driver for Mikrotik RB4xx series boards

Bert Vermeulen bert at biot.com
Thu Apr 23 06:35:44 PDT 2015


On 04/21/2015 04:55 PM, Andy Shevchenko wrote:

>> +static unsigned char rb4xx_nand_read_byte(struct mtd_info *mtd)
>> +{
>> +       struct nand_chip *chip = mtd->priv;
>> +       struct rb4xx_nand_info *info = chip->priv;
>> +       unsigned char data = 0;
>> +       int ret;
>> +
>> +       ret = rb4xx_cpld_read(info->spi_dev, &data, 1);
>> +       if (ret) {
>> +               pr_err("rb4xx_nand: read data failed, error %d\n", ret);
> 
> Is it possible to use dev_err() here and in other places?

Not having much luck with this... for some reason the mtd_info struct passed
in doesn't have a name on its device, and I'm not sure why. It doesn't match
the mtd_info structs created from the partitions either. Can anyone shed
some light on this?

>> +static int rb4xx_cpld_probe(struct spi_device *spi)
>> +{
>> +       struct rb4xx_cpld *cpld;
>> +       struct rb4xx_cpld_platform_data *pdata;
>> +       int ret;
>> +
>> +       pdata = dev_get_platdata(&spi->dev);
> 
> Hmm... do we have helper in SPI framework to do that?

Not that I can see.

I'll fix things according to your other comments.


-- 
Bert Vermeulen        bert at biot.com          email/xmpp



More information about the linux-mtd mailing list