* [RFC 1/3] Revert "mtd: bcm47xxnflash: Use module_platform_driver"
@ 2014-02-23 11:33 Rafał Miłecki
0 siblings, 0 replies; 2+ messages in thread
From: Rafał Miłecki @ 2014-02-23 11:33 UTC (permalink / raw)
To: linux-mtd; +Cc: Hauke Mehrtens, Rafał Miłecki
This reverts commit 994bbd0e91c0dfa4dcda9097b0716607aeec5470.
We're going to add support for more NAND flashes and the new ones are
not registered as platform devices. So we need our own init function.
---
drivers/mtd/nand/bcm47xxnflash/main.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c
index 1074459..52611ef 100644
--- a/drivers/mtd/nand/bcm47xxnflash/main.c
+++ b/drivers/mtd/nand/bcm47xxnflash/main.c
@@ -77,4 +77,22 @@ static struct platform_driver bcm47xxnflash_driver = {
},
};
-module_platform_driver(bcm47xxnflash_driver);
+static int __init bcm47xxnflash_init(void)
+{
+ int err;
+
+ err = platform_driver_register(&bcm47xxnflash_driver);
+ if (err)
+ pr_err("Failed to register bcm47xx nand flash driver: %d\n",
+ err);
+
+ return err;
+}
+
+static void __exit bcm47xxnflash_exit(void)
+{
+ platform_driver_unregister(&bcm47xxnflash_driver);
+}
+
+module_init(bcm47xxnflash_init);
+module_exit(bcm47xxnflash_exit);
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* [RFC 0/3] mtd: bcm47xxnflash: adding support for new NANDs
@ 2014-02-23 11:26 Rafał Miłecki
2014-02-23 11:26 ` [RFC 1/3] Revert "mtd: bcm47xxnflash: Use module_platform_driver" Rafał Miłecki
0 siblings, 1 reply; 2+ messages in thread
From: Rafał Miłecki @ 2014-02-23 11:26 UTC (permalink / raw)
To: linux-mtd; +Cc: Hauke Mehrtens, Rafał Miłecki
New Broadcom SoCs have NAND flashes attached & programmed in a totally different
way. Instead of accessing them with help of ChipCommon core, they can be used
directly.
To support them we can extend bcm47xxnflash in the way this patches implements.
However almost nothing in the code will be shared between support for old and
new devices.
How should we proceed? Implement it that way anyway? Or maybe writing a
separated driver (bcm53xxnflash?) would be a better idea?
Rafał Miłecki (3):
Revert "mtd: bcm47xxnflash: Use module_platform_driver"
mtd: bcm47xxnflash: add separated config for platform driver
mtd: bcm47xxnflash: prepare for adding BCMA driver
drivers/mtd/nand/Kconfig | 25 ++++++++---
drivers/mtd/nand/bcm47xxnflash/Makefile | 2 +-
drivers/mtd/nand/bcm47xxnflash/main.c | 80 ++++++++++++++++++++++++++++++++-
3 files changed, 100 insertions(+), 7 deletions(-)
--
1.8.4.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFC 1/3] Revert "mtd: bcm47xxnflash: Use module_platform_driver"
2014-02-23 11:26 [RFC 0/3] mtd: bcm47xxnflash: adding support for new NANDs Rafał Miłecki
@ 2014-02-23 11:26 ` Rafał Miłecki
0 siblings, 0 replies; 2+ messages in thread
From: Rafał Miłecki @ 2014-02-23 11:26 UTC (permalink / raw)
To: linux-mtd; +Cc: Hauke Mehrtens, Rafał Miłecki
This reverts commit 994bbd0e91c0dfa4dcda9097b0716607aeec5470.
We're going to add support for more NAND flashes and the new ones are
not registered as platform devices. So we need our own init function.
---
drivers/mtd/nand/bcm47xxnflash/main.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c
index 1074459..52611ef 100644
--- a/drivers/mtd/nand/bcm47xxnflash/main.c
+++ b/drivers/mtd/nand/bcm47xxnflash/main.c
@@ -77,4 +77,22 @@ static struct platform_driver bcm47xxnflash_driver = {
},
};
-module_platform_driver(bcm47xxnflash_driver);
+static int __init bcm47xxnflash_init(void)
+{
+ int err;
+
+ err = platform_driver_register(&bcm47xxnflash_driver);
+ if (err)
+ pr_err("Failed to register bcm47xx nand flash driver: %d\n",
+ err);
+
+ return err;
+}
+
+static void __exit bcm47xxnflash_exit(void)
+{
+ platform_driver_unregister(&bcm47xxnflash_driver);
+}
+
+module_init(bcm47xxnflash_init);
+module_exit(bcm47xxnflash_exit);
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-23 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 11:33 [RFC 1/3] Revert "mtd: bcm47xxnflash: Use module_platform_driver" Rafał Miłecki
-- strict thread matches above, loose matches on Subject: below --
2014-02-23 11:26 [RFC 0/3] mtd: bcm47xxnflash: adding support for new NANDs Rafał Miłecki
2014-02-23 11:26 ` [RFC 1/3] Revert "mtd: bcm47xxnflash: Use module_platform_driver" Rafał Miłecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox