Skip to contentSkip to conversation

AT91 drivers Kconfig cleanup

PATCH In review Nicolas Ferre 5 participants 14 messages Mar 15, 2012 – Mar 21, 2012

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

cover AT91 drivers Kconfig cleanup

This is a series which deals with AT91 drivers Kconfig entries. Its goal is to remove too restrictive dependencies on SoC names.
This will allow to add support for newer SoC seamlessly.

One question remains: should I submit those patches through dedicated sub-maintainer's git trees or can I queue the whole series in arm-soc?

Nicolas Ferre (6):
dmaengine: Kconfig: fix Atmel at_hdmac entry
mmc: Kconfig: remove choice between at91_mci and atmel-mci
mmc: atmel-mci: remove the need for CONFIG_MMC_ATMELMCI_DMA
rtc: Kconfig: remove dependency for AT91 rtc driver
Input: Kconfig: remove dependency for atmel_tsadcc driver
hwrng: Kconfig: remove dependency for atmel-rng driver

 drivers/char/hw_random/Kconfig    |    2 +-
 drivers/dma/Kconfig               |    5 ++---
 drivers/input/touchscreen/Kconfig |    4 ++--
 drivers/mmc/host/Kconfig          |   23 ++---------------------
 drivers/mmc/host/atmel-mci.c      |    2 --
 drivers/rtc/Kconfig               |    2 +-
 6 files changed, 8 insertions(+), 30 deletions(-)

Best regards,

Signature · 1 line
1.7.9
#1 lore raw

PATCH 1/6 dmaengine: Kconfig: fix Atmel at_hdmac entry

Remove SoC dependency and make it generic for every Atmel ARM AT91. That will allow to select this driver for newer chips. Keep dependency on AT91 because of the use of an header file located in include/mach directory. Modify the comment to reflect this.

---
 drivers/dma/Kconfig |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/dma/Kconfig +2 -3
index f1a2749..6d50f35 100644
@@ -91,11 +91,10 @@ config DW_DMAC
 
 config AT_HDMAC
 	tristate "Atmel AHB DMA support"
-	depends on ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+	depends on ARCH_AT91
 	select DMA_ENGINE
 	help
-	  Support the Atmel AHB DMA controller.  This can be integrated in
-	  chips such as the Atmel AT91SAM9RL.
+	  Support the Atmel AHB DMA controller.
 
 config FSL_DMA
 	tristate "Freescale Elo and Elo Plus DMA support"
Signature · 1 line
1.7.9
Acked-by on v1 1/6
#2 lore raw

Re: [PATCH 1/6] dmaengine: Kconfig: fix Atmel at_hdmac entry

Quoted 6 lines · Nicolas Ferre

Remove SoC dependency and make it generic for every Atmel ARM AT91. That will allow to select this driver for newer chips. Keep dependency on AT91 because of the use of an header file located in include/mach directory. Modify the comment to reflect this.

Quoted 22 lines
---
 drivers/dma/Kconfig |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/dma/Kconfig +2 -3
index f1a2749..6d50f35 100644
@@ -91,11 +91,10 @@ config DW_DMAC
 
 config AT_HDMAC
 	tristate "Atmel AHB DMA support"
-	depends on ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+	depends on ARCH_AT91
 	select DMA_ENGINE
 	help
-	  Support the Atmel AHB DMA controller.  This can be integrated in
-	  chips such as the Atmel AT91SAM9RL.
+	  Support the Atmel AHB DMA controller.
 
 config FSL_DMA
 	tristate "Freescale Elo and Elo Plus DMA support"
Signature · 1 line
~Vinod
#3 lore raw

PATCH 2/6 mmc: Kconfig: remove choice between at91_mci and atmel-mci

In reply to Nicolas Ferre

This choice is not so important now that atmel-mci supports every Atmel AT91 SoC except AT91RM9200. As this newer driver is better maintained choose this one to avoid confusion.

---
 drivers/mmc/host/Kconfig |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)
drivers/mmc/host/Kconfig +2 -11
index 00fcbed..455a414 100644
@@ -270,16 +270,9 @@ config MMC_AU1X
 
 	  If unsure, say N.
 
-choice
-	prompt "Atmel SD/MMC Driver"
-	depends on AVR32 || ARCH_AT91
-	default MMC_ATMELMCI if AVR32
-	help
-	  Choose which driver to use for the Atmel MCI Silicon
-
 config MMC_AT91
 	tristate "AT91 SD/MMC Card Interface support"
-	depends on ARCH_AT91
+	depends on ARCH_AT91RM9200
 	help
 	  This selects the AT91 MCI controller.
 
@@ -287,7 +280,7 @@ config MMC_AT91
 
 config MMC_ATMELMCI
 	tristate "Atmel Multimedia Card Interface support"
-	depends on AVR32 || ARCH_AT91
+	depends on AVR32 || (ARCH_AT91 && !ARCH_AT91RM9200)
 	help
 	  This selects the Atmel Multimedia Card Interface driver. If
 	  you have an AT32 (AVR32) or AT91 platform with a Multimedia
@@ -295,8 +288,6 @@ config MMC_ATMELMCI
 
 	  If unsure, say N.
 
-endchoice
-
 config MMC_ATMELMCI_DMA
 	bool "Atmel MCI DMA support"
 	depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE
Signature · 1 line
1.7.9
Acked-by on v1 2/6
#4 lore raw

Re: [PATCH 2/6] mmc: Kconfig: remove choice between at91_mci and atmel-mci

Quoted 5 lines · Nicolas Ferre

This choice is not so important now that atmel-mci supports every Atmel AT91 SoC except AT91RM9200. As this newer driver is better maintained choose this one to avoid confusion.

Thanks for this patch, it's a new step to have only one mci driver.

Regards

Ludovic

Quoted 47 lines
---
 drivers/mmc/host/Kconfig |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)
drivers/mmc/host/Kconfig +2 -11
index 00fcbed..455a414 100644
@@ -270,16 +270,9 @@ config MMC_AU1X
 
 	  If unsure, say N.
 
-choice
-	prompt "Atmel SD/MMC Driver"
-	depends on AVR32 || ARCH_AT91
-	default MMC_ATMELMCI if AVR32
-	help
-	  Choose which driver to use for the Atmel MCI Silicon
-
 config MMC_AT91
 	tristate "AT91 SD/MMC Card Interface support"
-	depends on ARCH_AT91
+	depends on ARCH_AT91RM9200
 	help
 	  This selects the AT91 MCI controller.
 
@@ -287,7 +280,7 @@ config MMC_AT91
 
 config MMC_ATMELMCI
 	tristate "Atmel Multimedia Card Interface support"
-	depends on AVR32 || ARCH_AT91
+	depends on AVR32 || (ARCH_AT91 && !ARCH_AT91RM9200)
 	help
 	  This selects the Atmel Multimedia Card Interface driver. If
 	  you have an AT32 (AVR32) or AT91 platform with a Multimedia
@@ -295,8 +288,6 @@ config MMC_ATMELMCI
 
 	  If unsure, say N.
 
-endchoice
-
 config MMC_ATMELMCI_DMA
 	bool "Atmel MCI DMA support"
 	depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE
Signature · 1 line
1.7.9
#5 lore raw

PATCH 3/6 mmc: atmel-mci: remove the need for CONFIG_MMC_ATMELMCI_DMA

In reply to Nicolas Ferre

This Kconfig option is not needed anymore, so remove it.

---
 drivers/mmc/host/Kconfig     |   10 ----------
 drivers/mmc/host/atmel-mci.c |    2 --
 2 files changed, 0 insertions(+), 12 deletions(-)
drivers/mmc/host/Kconfig +0 -10
index 455a414..a6fc44a 100644
@@ -288,16 +288,6 @@ config MMC_ATMELMCI
 
 	  If unsure, say N.
 
-config MMC_ATMELMCI_DMA
-	bool "Atmel MCI DMA support"
-	depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE
-	help
-	  Say Y here to have the Atmel MCI driver use a DMA engine to
-	  do data transfers and thus increase the throughput and
-	  reduce the CPU utilization.
-
-	  If unsure, say N.
-
 config MMC_IMX
 	tristate "Motorola i.MX Multimedia Card Interface support"
 	depends on ARCH_MX1
drivers/mmc/host/atmel-mci.c +0 -2
index e4449a5..b5693fd 100644
@@ -2164,10 +2164,8 @@ static int __exit atmci_remove(struct platform_device *pdev)
 	atmci_readl(host, ATMCI_SR);
 	clk_disable(host->mck);
 
-#ifdef CONFIG_MMC_ATMELMCI_DMA
 	if (host->dma.chan)
 		dma_release_channel(host->dma.chan);
-#endif
 
 	free_irq(platform_get_irq(pdev, 0), host);
 	iounmap(host->regs);
Signature · 1 line
1.7.9
Acked-by on v1 3/6
#6 lore raw

Re: [PATCH 3/6] mmc: atmel-mci: remove the need for CONFIG_MMC_ATMELMCI_DMA

Quoted 3 lines · Nicolas Ferre

This Kconfig option is not needed anymore, so remove it.

Thanks

Regards

Ludovic

Quoted 44 lines
---
 drivers/mmc/host/Kconfig     |   10 ----------
 drivers/mmc/host/atmel-mci.c |    2 --
 2 files changed, 0 insertions(+), 12 deletions(-)
drivers/mmc/host/Kconfig +0 -10
index 455a414..a6fc44a 100644
@@ -288,16 +288,6 @@ config MMC_ATMELMCI
 
 	  If unsure, say N.
 
-config MMC_ATMELMCI_DMA
-	bool "Atmel MCI DMA support"
-	depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE
-	help
-	  Say Y here to have the Atmel MCI driver use a DMA engine to
-	  do data transfers and thus increase the throughput and
-	  reduce the CPU utilization.
-
-	  If unsure, say N.
-
 config MMC_IMX
 	tristate "Motorola i.MX Multimedia Card Interface support"
 	depends on ARCH_MX1
drivers/mmc/host/atmel-mci.c +0 -2
index e4449a5..b5693fd 100644
@@ -2164,10 +2164,8 @@ static int __exit atmci_remove(struct platform_device *pdev)
 	atmci_readl(host, ATMCI_SR);
 	clk_disable(host->mck);
 
-#ifdef CONFIG_MMC_ATMELMCI_DMA
 	if (host->dma.chan)
 		dma_release_channel(host->dma.chan);
-#endif
 
 	free_irq(platform_get_irq(pdev, 0), host);
 	iounmap(host->regs);
Signature · 1 line
1.7.9
#7 lore raw

PATCH 4/6 rtc: Kconfig: remove dependency for AT91 rtc driver

In reply to Nicolas Ferre

This will allow to select this driver for newer SoCs. Keep dependency on AT91 because of the use of an header file located in include/mach directory.

---
 drivers/rtc/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/rtc/Kconfig +1 -1
index 3a125b8..918736e 100644
@@ -831,7 +831,7 @@ config RTC_DRV_AT32AP700X
 
 config RTC_DRV_AT91RM9200
 	tristate "AT91RM9200 or some AT91SAM9 RTC"
-	depends on ARCH_AT91RM9200 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+	depends on ARCH_AT91
 	help
 	  Driver for the internal RTC (Realtime Clock) module found on
 	  Atmel AT91RM9200's and some  AT91SAM9 chips. On AT91SAM9 chips
Signature · 1 line
1.7.9
#8 lore raw

PATCH 5/6 Input: Kconfig: remove dependency for atmel_tsadcc driver

In reply to Nicolas Ferre

This will allow to select this driver for newer SoCs. Keep dependency on AT91 because of the use of an header file located in include/mach directory.

---
 drivers/input/touchscreen/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/touchscreen/Kconfig +2 -2
index 4af2a18..3900c64 100644
@@ -432,10 +432,10 @@ config TOUCHSCREEN_TOUCHWIN
 
 config TOUCHSCREEN_ATMEL_TSADCC
 	tristate "Atmel Touchscreen Interface"
-	depends on ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+	depends on ARCH_AT91
 	help
 	  Say Y here if you have a 4-wire touchscreen connected to the
-          ADC Controller on your Atmel SoC (such as the AT91SAM9RL).
+          ADC Controller on your Atmel SoC.
 
 	  If unsure, say N.
 
Signature · 1 line
1.7.9
#9 lore raw

PATCH 6/6 hwrng: Kconfig: remove dependency for atmel-rng driver

In reply to Nicolas Ferre

This will allow to select this driver for newer SoCs. Make sure to keep dependency on HAVE_CLK to avoid breaking other machines.

---
 drivers/char/hw_random/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/hw_random/Kconfig +1 -1
index 0689bf6..b2402eb 100644
@@ -62,7 +62,7 @@ config HW_RANDOM_AMD
 
 config HW_RANDOM_ATMEL
 	tristate "Atmel Random Number Generator support"
-	depends on HW_RANDOM && ARCH_AT91SAM9G45
+	depends on HW_RANDOM && HAVE_CLK
 	default HW_RANDOM
 	---help---
 	  This driver provides kernel-side support for the Random Number
Signature · 1 line
1.7.9
Acked-by on v1 6/6
#10 lore raw

Re: [PATCH 6/6] hwrng: Kconfig: remove dependency for atmel-rng driver

Quoted 4 lines · Nicolas Ferre

This will allow to select this driver for newer SoCs. Make sure to keep dependency on HAVE_CLK to avoid breaking other machines.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#11 lore raw
In reply to Nicolas Ferre
Quoted 6 lines · Nicolas Ferre

This is a series which deals with AT91 drivers Kconfig entries. Its goal is to remove too restrictive dependencies on SoC names.
This will allow to add support for newer SoC seamlessly.

One question remains: should I submit those patches through dedicated sub-maintainer's git trees or can I queue the whole series in arm-soc?

I'm fine if you queue input piece through arm-soc.

Thanks.

Signature · 1 line
Dmitry
#12 lore raw

On 03/15/2012 05:50 PM, Dmitry Torokhov :

Quoted 9 lines · Nicolas Ferre
Quoted 6 lines

This is a series which deals with AT91 drivers Kconfig entries. Its goal is to remove too restrictive dependencies on SoC names.
This will allow to add support for newer SoC seamlessly.

One question remains: should I submit those patches through dedicated sub-maintainer's git trees or can I queue the whole series in arm-soc?

I'm fine if you queue input piece through arm-soc.

Ok, good: I have "Acknowledgement" by several maintainers: so yes, I will send this series via arm-soc.

Is this means that I can add your "Acked-by"?

Best regards,

Signature · 1 line
Nicolas Ferre
maintainer Acked-by
#13 lore raw
Quoted 10 lines · Nicolas Ferre

On 03/15/2012 05:50 PM, Dmitry Torokhov :

Quoted 9 lines · Nicolas Ferre
Quoted 7 lines

This is a series which deals with AT91 drivers Kconfig entries. Its goal is
to remove too restrictive dependencies on SoC names.
This will allow to add support for newer SoC seamlessly.

One question remains: should I submit those patches through dedicated sub-maintainer's git trees or can I queue the whole series in arm-soc?

Quoted 6 lines
Quoted 1 line

I'm fine if you queue input piece through arm-soc.

Ok, good: I have "Acknowledgement" by several maintainers: so yes, I will send this series via arm-soc.

Is this means that I can add your "Acked-by"?

Yes, please.

Thanks.

Signature · 1 line
Dmitry