Release 4.7 drivers/mtd/nand/bcm47xxnflash/main.c
/*
* BCM47XX NAND flash driver
*
* Copyright (C) 2012 RafaÅ MiÅecki <zajec5@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include "bcm47xxnflash.h"
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/bcma/bcma.h>
MODULE_DESCRIPTION("NAND flash driver for BCMA bus");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("RafaÅ MiÅecki");
static const char *probes[] = { "bcm47xxpart", NULL };
static int bcm47xxnflash_probe(struct platform_device *pdev)
{
struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev);
struct bcm47xxnflash *b47n;
struct mtd_info *mtd;
int err = 0;
b47n = devm_kzalloc(&pdev->dev, sizeof(*b47n), GFP_KERNEL);
if (!b47n)
return -ENOMEM;
nand_set_controller_data(&b47n->nand_chip, b47n);
mtd = nand_to_mtd(&b47n->nand_chip);
mtd->dev.parent = &pdev->dev;
b47n->cc = container_of(nflash, struct bcma_drv_cc, nflash);
if (b47n->cc->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
err = bcm47xxnflash_ops_bcm4706_init(b47n);
} else {
pr_err("Device not supported\n");
err = -ENOTSUPP;
}
if (err) {
pr_err("Initialization failed: %d\n", err);
return err;
}
platform_set_drvdata(pdev, b47n);
err = mtd_device_parse_register(mtd, probes, NULL, NULL, 0);
if (err) {
pr_err("Failed to register MTD device: %d\n", err);
return err;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rafal milecki | rafal milecki | 159 | 77.18% | 2 | 28.57% |
boris brezillon | boris brezillon | 19 | 9.22% | 2 | 28.57% |
sachin kamat | sachin kamat | 14 | 6.80% | 1 | 14.29% |
frans klaver | frans klaver | 7 | 3.40% | 1 | 14.29% |
brian norris | brian norris | 7 | 3.40% | 1 | 14.29% |
| Total | 206 | 100.00% | 7 | 100.00% |
static int bcm47xxnflash_remove(struct platform_device *pdev)
{
struct bcm47xxnflash *nflash = platform_get_drvdata(pdev);
nand_release(nand_to_mtd(&nflash->nand_chip));
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rafal milecki | rafal milecki | 27 | 77.14% | 1 | 33.33% |
brian norris | brian norris | 4 | 11.43% | 1 | 33.33% |
boris brezillon | boris brezillon | 4 | 11.43% | 1 | 33.33% |
| Total | 35 | 100.00% | 3 | 100.00% |
static struct platform_driver bcm47xxnflash_driver = {
.probe = bcm47xxnflash_probe,
.remove = bcm47xxnflash_remove,
.driver = {
.name = "bcma_nflash",
},
};
module_platform_driver(bcm47xxnflash_driver);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rafal milecki | rafal milecki | 258 | 80.62% | 3 | 30.00% |
boris brezillon | boris brezillon | 23 | 7.19% | 2 | 20.00% |
sachin kamat | sachin kamat | 16 | 5.00% | 2 | 20.00% |
brian norris | brian norris | 11 | 3.44% | 1 | 10.00% |
frans klaver | frans klaver | 7 | 2.19% | 1 | 10.00% |
hauke mehrtens | hauke mehrtens | 5 | 1.56% | 1 | 10.00% |
| Total | 320 | 100.00% | 10 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.