* [PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable
@ 2021-04-20 14:04 Thomas Bogendoerfer
2021-04-20 16:09 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Bogendoerfer @ 2021-04-20 14:04 UTC (permalink / raw)
To: Jens Axboe, linux-ide, linux-kernel
Add OF support for switching RB532 do device tree possible. By removing
the not needed asm/mach-rc32434/rb.h include the driver could be
compile tested now.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
drivers/ata/Kconfig | 2 +-
drivers/ata/pata_rb532_cf.c | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 030cb32da980..53f40f92e4eb 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -1139,7 +1139,7 @@ config PATA_QDI
config PATA_RB532
tristate "RouterBoard 532 PATA CompactFlash support"
- depends on MIKROTIK_RB532
+ depends on MIKROTIK_RB532 || COMPILE_TEST
help
This option enables support for the RouterBoard 532
PATA CompactFlash controller.
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index 479c4b29b856..93d839ab9654 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -28,8 +28,6 @@
#include <linux/libata.h>
#include <scsi/scsi_host.h>
-#include <asm/mach-rc32434/rb.h>
-
#define DRV_NAME "pata-rb532-cf"
#define DRV_VERSION "0.1.0"
#define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash"
@@ -164,11 +162,20 @@ static int rb532_pata_driver_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id pata_rb532_match[] = {
+ { .compatible = "mikrotik,rb532-pata", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, pata_rb532_match);
+#endif
+
static struct platform_driver rb532_pata_platform_driver = {
.probe = rb532_pata_driver_probe,
.remove = rb532_pata_driver_remove,
.driver = {
.name = DRV_NAME,
+ .of_match_table = of_match_ptr(pata_rb532_match),
},
};
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable
2021-04-20 14:04 [PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable Thomas Bogendoerfer
@ 2021-04-20 16:09 ` Sergei Shtylyov
2021-04-20 20:49 ` Thomas Bogendoerfer
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2021-04-20 16:09 UTC (permalink / raw)
To: Thomas Bogendoerfer, Jens Axboe, linux-ide, linux-kernel
Hello!
On 4/20/21 5:04 PM, Thomas Bogendoerfer wrote:
> Add OF support for switching RB532 do device tree possible.
I couldnb't parse that. :-)
> By removing
> the not needed asm/mach-rc32434/rb.h include the driver could be
> compile tested now.
I think it's a separte issue worth its own patch.
>
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
[...]
MBR, Segrei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable
2021-04-20 16:09 ` Sergei Shtylyov
@ 2021-04-20 20:49 ` Thomas Bogendoerfer
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2021-04-20 20:49 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Jens Axboe, linux-ide, linux-kernel
On Tue, Apr 20, 2021 at 07:09:26PM +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 4/20/21 5:04 PM, Thomas Bogendoerfer wrote:
>
> > Add OF support for switching RB532 do device tree possible.
>
> I couldnb't parse that. :-)
no wonder ;-) I'll rephrase in v2.
>
> > By removing
> > the not needed asm/mach-rc32434/rb.h include the driver could be
> > compile tested now.
>
> I think it's a separte issue worth its own patch.
Jens, do you want this in an extra patch ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-20 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 14:04 [PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable Thomas Bogendoerfer
2021-04-20 16:09 ` Sergei Shtylyov
2021-04-20 20:49 ` Thomas Bogendoerfer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.