Commit 264788c8 authored by Alexandre Belloni's avatar Alexandre Belloni

pcmcia: at91_cf: remove platform data support

Board file support has been removed for at91rm9200 back in 2014, make the
CF driver DT only.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200930184804.3127757-2-alexandre.belloni@bootlin.com
parent 24c8a743
...@@ -258,6 +258,7 @@ config OMAP_CF ...@@ -258,6 +258,7 @@ config OMAP_CF
config AT91_CF config AT91_CF
tristate "AT91 CompactFlash Controller" tristate "AT91 CompactFlash Controller"
depends on PCI depends on PCI
depends on OF
depends on PCMCIA && ARCH_AT91 depends on PCMCIA && ARCH_AT91
help help
Say Y here to support the CompactFlash controller on AT91 chips. Say Y here to support the CompactFlash controller on AT91 chips.
......
...@@ -219,16 +219,18 @@ static struct pccard_operations at91_cf_ops = { ...@@ -219,16 +219,18 @@ static struct pccard_operations at91_cf_ops = {
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
#if defined(CONFIG_OF)
static const struct of_device_id at91_cf_dt_ids[] = { static const struct of_device_id at91_cf_dt_ids[] = {
{ .compatible = "atmel,at91rm9200-cf" }, { .compatible = "atmel,at91rm9200-cf" },
{ /* sentinel */ } { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(of, at91_cf_dt_ids); MODULE_DEVICE_TABLE(of, at91_cf_dt_ids);
static int at91_cf_dt_init(struct platform_device *pdev) static int at91_cf_probe(struct platform_device *pdev)
{ {
struct at91_cf_socket *cf;
struct at91_cf_data *board; struct at91_cf_data *board;
struct resource *io;
int status;
board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL); board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL);
if (!board) if (!board)
...@@ -239,33 +241,9 @@ static int at91_cf_dt_init(struct platform_device *pdev) ...@@ -239,33 +241,9 @@ static int at91_cf_dt_init(struct platform_device *pdev)
board->vcc_pin = of_get_gpio(pdev->dev.of_node, 2); board->vcc_pin = of_get_gpio(pdev->dev.of_node, 2);
board->rst_pin = of_get_gpio(pdev->dev.of_node, 3); board->rst_pin = of_get_gpio(pdev->dev.of_node, 3);
pdev->dev.platform_data = board;
mc = syscon_regmap_lookup_by_compatible("atmel,at91rm9200-sdramc"); mc = syscon_regmap_lookup_by_compatible("atmel,at91rm9200-sdramc");
if (IS_ERR(mc))
return PTR_ERR_OR_ZERO(mc); return PTR_ERR(mc);
}
#else
static int at91_cf_dt_init(struct platform_device *pdev)
{
return -ENODEV;
}
#endif
static int at91_cf_probe(struct platform_device *pdev)
{
struct at91_cf_socket *cf;
struct at91_cf_data *board = pdev->dev.platform_data;
struct resource *io;
int status;
if (!board) {
status = at91_cf_dt_init(pdev);
if (status)
return status;
board = pdev->dev.platform_data;
}
if (!gpio_is_valid(board->det_pin) || !gpio_is_valid(board->rst_pin)) if (!gpio_is_valid(board->det_pin) || !gpio_is_valid(board->rst_pin))
return -ENODEV; return -ENODEV;
...@@ -409,7 +387,7 @@ static int at91_cf_resume(struct platform_device *pdev) ...@@ -409,7 +387,7 @@ static int at91_cf_resume(struct platform_device *pdev)
static struct platform_driver at91_cf_driver = { static struct platform_driver at91_cf_driver = {
.driver = { .driver = {
.name = "at91_cf", .name = "at91_cf",
.of_match_table = of_match_ptr(at91_cf_dt_ids), .of_match_table = at91_cf_dt_ids,
}, },
.probe = at91_cf_probe, .probe = at91_cf_probe,
.remove = at91_cf_remove, .remove = at91_cf_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment