Skip to content

Commit a632229

Browse files
maquefelarndb
authored andcommitted
ata: pata_ep93xx: remove legacy pinctrl use
Drop legacy acquire/release since we are using pinctrl for this now. Signed-off-by: Nikita Shubin <[email protected]> Tested-by: Alexander Sverdlin <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Damien Le Moal <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent a48ac3d commit a632229

File tree

3 files changed

+6
-95
lines changed

3 files changed

+6
-95
lines changed

arch/arm/mach-ep93xx/core.c

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -779,78 +779,6 @@ void __init ep93xx_register_ide(void)
779779
platform_device_register(&ep93xx_ide_device);
780780
}
781781

782-
int ep93xx_ide_acquire_gpio(struct platform_device *pdev)
783-
{
784-
int err;
785-
int i;
786-
787-
err = gpio_request(EP93XX_GPIO_LINE_EGPIO2, dev_name(&pdev->dev));
788-
if (err)
789-
return err;
790-
err = gpio_request(EP93XX_GPIO_LINE_EGPIO15, dev_name(&pdev->dev));
791-
if (err)
792-
goto fail_egpio15;
793-
for (i = 2; i < 8; i++) {
794-
err = gpio_request(EP93XX_GPIO_LINE_E(i), dev_name(&pdev->dev));
795-
if (err)
796-
goto fail_gpio_e;
797-
}
798-
for (i = 4; i < 8; i++) {
799-
err = gpio_request(EP93XX_GPIO_LINE_G(i), dev_name(&pdev->dev));
800-
if (err)
801-
goto fail_gpio_g;
802-
}
803-
for (i = 0; i < 8; i++) {
804-
err = gpio_request(EP93XX_GPIO_LINE_H(i), dev_name(&pdev->dev));
805-
if (err)
806-
goto fail_gpio_h;
807-
}
808-
809-
/* GPIO ports E[7:2], G[7:4] and H used by IDE */
810-
ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_EONIDE |
811-
EP93XX_SYSCON_DEVCFG_GONIDE |
812-
EP93XX_SYSCON_DEVCFG_HONIDE);
813-
return 0;
814-
815-
fail_gpio_h:
816-
for (--i; i >= 0; --i)
817-
gpio_free(EP93XX_GPIO_LINE_H(i));
818-
i = 8;
819-
fail_gpio_g:
820-
for (--i; i >= 4; --i)
821-
gpio_free(EP93XX_GPIO_LINE_G(i));
822-
i = 8;
823-
fail_gpio_e:
824-
for (--i; i >= 2; --i)
825-
gpio_free(EP93XX_GPIO_LINE_E(i));
826-
gpio_free(EP93XX_GPIO_LINE_EGPIO15);
827-
fail_egpio15:
828-
gpio_free(EP93XX_GPIO_LINE_EGPIO2);
829-
return err;
830-
}
831-
EXPORT_SYMBOL(ep93xx_ide_acquire_gpio);
832-
833-
void ep93xx_ide_release_gpio(struct platform_device *pdev)
834-
{
835-
int i;
836-
837-
for (i = 2; i < 8; i++)
838-
gpio_free(EP93XX_GPIO_LINE_E(i));
839-
for (i = 4; i < 8; i++)
840-
gpio_free(EP93XX_GPIO_LINE_G(i));
841-
for (i = 0; i < 8; i++)
842-
gpio_free(EP93XX_GPIO_LINE_H(i));
843-
gpio_free(EP93XX_GPIO_LINE_EGPIO15);
844-
gpio_free(EP93XX_GPIO_LINE_EGPIO2);
845-
846-
847-
/* GPIO ports E[7:2], G[7:4] and H used by GPIO */
848-
ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_EONIDE |
849-
EP93XX_SYSCON_DEVCFG_GONIDE |
850-
EP93XX_SYSCON_DEVCFG_HONIDE);
851-
}
852-
EXPORT_SYMBOL(ep93xx_ide_release_gpio);
853-
854782
/*************************************************************************
855783
* EP93xx ADC
856784
*************************************************************************/

drivers/ata/pata_ep93xx.c

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -922,28 +922,18 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
922922
void __iomem *ide_base;
923923
int err;
924924

925-
err = ep93xx_ide_acquire_gpio(pdev);
926-
if (err)
927-
return err;
928-
929925
/* INT[3] (IRQ_EP93XX_EXT3) line connected as pull down */
930926
irq = platform_get_irq(pdev, 0);
931-
if (irq < 0) {
932-
err = irq;
933-
goto err_rel_gpio;
934-
}
927+
if (irq < 0)
928+
return irq;
935929

936930
ide_base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
937-
if (IS_ERR(ide_base)) {
938-
err = PTR_ERR(ide_base);
939-
goto err_rel_gpio;
940-
}
931+
if (IS_ERR(ide_base))
932+
return PTR_ERR(ide_base);
941933

942934
drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
943-
if (!drv_data) {
944-
err = -ENOMEM;
945-
goto err_rel_gpio;
946-
}
935+
if (!drv_data)
936+
return -ENOMEM;
947937

948938
drv_data->pdev = pdev;
949939
drv_data->ide_base = ide_base;
@@ -1002,8 +992,6 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
1002992

1003993
err_rel_dma:
1004994
ep93xx_pata_release_dma(drv_data);
1005-
err_rel_gpio:
1006-
ep93xx_ide_release_gpio(pdev);
1007995
return err;
1008996
}
1009997

@@ -1015,7 +1003,6 @@ static void ep93xx_pata_remove(struct platform_device *pdev)
10151003
ata_host_detach(host);
10161004
ep93xx_pata_release_dma(drv_data);
10171005
ep93xx_pata_clear_regs(drv_data->ide_base);
1018-
ep93xx_ide_release_gpio(pdev);
10191006
}
10201007

10211008
static const struct of_device_id ep93xx_pata_of_ids[] = {

include/linux/soc/cirrus/ep93xx.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,11 @@ struct ep93xx_regmap_adev {
3737
container_of((_adev), struct ep93xx_regmap_adev, adev)
3838

3939
#ifdef CONFIG_ARCH_EP93XX
40-
int ep93xx_ide_acquire_gpio(struct platform_device *pdev);
41-
void ep93xx_ide_release_gpio(struct platform_device *pdev);
4240
int ep93xx_i2s_acquire(void);
4341
void ep93xx_i2s_release(void);
4442
unsigned int ep93xx_chip_revision(void);
4543

4644
#else
47-
static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; }
48-
static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {}
4945
static inline int ep93xx_i2s_acquire(void) { return 0; }
5046
static inline void ep93xx_i2s_release(void) {}
5147
static inline unsigned int ep93xx_chip_revision(void) { return 0; }

0 commit comments

Comments
 (0)