Skip to contentSkip to conversation

Xilinx: Add generic configuration option to enable all xilinx drivers.

RFC PATCH Superseded Stephen Neuendorffer 2 participants 6 messages Feb 12, 2008 – Mar 19, 2008

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

RFC PATCH 1/1 Xilinx: Add generic configuration option to enable all xilinx drivers.

In the future, this will be used to provide similar configuration for PowerPC and Microblaze. It may also be convenient for those using Xilinx cores as peripherals for external processors, rather than explicitly having a dependance on the processor architecture.

---

Grant,

This is the patch, updated for all of the drivers that I think are in the tree. I think the problematic parts may be the ppc part, which is required for backward compatibility. If this has to wait until ppc dies, then that's fine with me, I guess.

It may also be better to clean up the Kconfig lines for Sysace and framebuffer drivers by having PPC32 or PPC4xx select XILINX_DRIVERS. My understanding is that those config options are there because of people using external PPCs with those devices in the FPGA.

Steve

---
 arch/powerpc/platforms/40x/Kconfig |    1 +
 arch/ppc/platforms/4xx/Kconfig     |    1 +
 drivers/block/Kconfig              |    2 +-
 drivers/char/Kconfig               |    2 +-
 drivers/misc/Kconfig               |   10 ++++++++++
 drivers/serial/Kconfig             |    2 +-
 drivers/spi/Kconfig                |    2 +-
 drivers/video/Kconfig              |    2 +-
 8 files changed, 17 insertions(+), 5 deletions(-)
arch/powerpc/platforms/40x/Kconfig +1 -0
index 8f6699f..03051bc 100644
@@ -110,6 +110,7 @@ config 405GPR
 
 config XILINX_VIRTEX
 	bool
+	select XILINX_DRIVERS
 
 config XILINX_VIRTEX_II_PRO
 	bool
arch/ppc/platforms/4xx/Kconfig +1 -0
index 76551b6..d7db7e4 100644
@@ -228,6 +228,7 @@ config XILINX_VIRTEX_4_FX
 
 config XILINX_VIRTEX
 	bool
+	select XILINX_DRIVERS
 
 config STB03xxx
 	bool
drivers/block/Kconfig +1 -1
index 4d0119e..0166560 100644
@@ -412,7 +412,7 @@ source "drivers/s390/block/Kconfig"
 
 config XILINX_SYSACE
 	tristate "Xilinx SystemACE support"
-	depends on 4xx
+	depends on 4xx || XILINX_DRIVERS
 	help
 	  Include support for the Xilinx SystemACE CompactFlash interface
 
drivers/char/Kconfig +1 -1
index 157ae2a..8230ad1 100644
@@ -833,7 +833,7 @@ config DTLK
 
 config XILINX_HWICAP
 	tristate "Xilinx HWICAP Support"
-	depends on XILINX_VIRTEX
+	depends on XILINX_DRIVERS
 	help
 	  This option enables support for Xilinx Internal Configuration
 	  Access Port (ICAP) driver.
drivers/misc/Kconfig +10 -0
index b5e67c0..e7b0bed 100644
@@ -233,3 +233,13 @@ config ATMEL_SSC
 	  If unsure, say N.
 
 endif # MISC_DEVICES
+endmenu
+
+
+#
+# Xilinx devices and common device driver infrastructure
+#
+
+config XILINX_DRIVERS
+  bool
+
drivers/serial/Kconfig +1 -1
index d7e1996..f922ec6 100644
@@ -757,7 +757,7 @@ config SERIAL_IMX_CONSOLE
 
 config SERIAL_UARTLITE
 	tristate "Xilinx uartlite serial port support"
-	depends on PPC32
+	depends on PPC32 || XILINX_DRIVERS
 	select SERIAL_CORE
 	help
 	  Say Y here if you want to use the Xilinx uartlite serial controller.
drivers/spi/Kconfig +1 -1
index abf0504..c66838f 100644
@@ -183,7 +183,7 @@ config SPI_TXX9
 
 config SPI_XILINX
 	tristate "Xilinx SPI controller"
-	depends on SPI_MASTER && XILINX_VIRTEX && EXPERIMENTAL
+	depends on SPI_MASTER && XILINX_DRIVERS && EXPERIMENTAL
 	select SPI_BITBANG
 	help
 	  This exposes the SPI controller IP from the Xilinx EDK.
drivers/video/Kconfig +1 -1
index 5b3dbcf..a66ff4b 100644
@@ -1871,7 +1871,7 @@ config FB_PS3_DEFAULT_SIZE_M
 
 config FB_XILINX
 	tristate "Xilinx frame buffer support"
-	depends on FB && XILINX_VIRTEX
+	depends on FB && XILINX_DRIVERS
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 1 line
1.5.3.4-dirty
#1 lore raw
Quoted 16 lines · Stephen Neuendorffer

In the future, this will be used to provide similar configuration for
PowerPC and Microblaze. It may also be convenient for those using Xilinx cores as peripherals for external processors, rather than explicitly having a dependance on the processor architecture.

---

Grant,

This is the patch, updated for all of the drivers that I think are in the tree. I think the problematic parts may be the ppc part, which is required for backward compatibility. If this has to wait until ppc dies, then that's fine with me, I guess.

Quoted 4 lines

It may also be better to clean up the Kconfig lines for Sysace and framebuffer drivers by having PPC32 or PPC4xx select XILINX_DRIVERS. My understanding is that those config options are there because of people using external PPCs with those devices in the FPGA.

Hey Steve;

I haven't forgotten about this patch, but I've been thinking about it some more and I'm coming to the conclusion that it might just be better to eliminate driver dependence on XILINX_DRIVERS and XILINX_VIRTEX entirely and instead just make each of them "depends on PPC32 || MICROBLAZE". There's no reason to restrict compiling these drivers to platforms that are known to have xilinx parts on them.

I know that in most cases they will not be used, but by relaxing the dependencies they will get compile tested on more platforms than they are now and they'll get picked up for make allyesconfigs builds. In my mind this means greater chances of compile bugs getting found and reported.

In fact, it would be nice to drop the PPC32 || MICROBLAZE dependency too; but I think the drivers are using io primitives at the moment that are not portable to x86.

Thoughts?

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#2 lore raw

Hmm... interesting points. I guess my feeling was that XILINX_DRIVERS could be a more broadly configurable option, with some of these ideas in mind. Currently, it's hidden by default, but we could easily change this to be visible by default, or selected by a broader number of architectures. I tend to think about them as a group: What if x86 *did* support the primitives needed by these drivers, then if the individual drivers depend on XILINX_DRIVERS, then the modification could be made in one spot. By your suggestion, we would have to modify each one independantly.

I do dislike the hodgepodge of different configuration dependencies (such as Sysace)... It makes sense to me to have them be uniformly available. If they are all going to be PPC32 || microblaze, then it seems to me like there should be an intermediate configuration option that expresses exactly that set.

Would you feel differently if we flipped the dependencies around, like XILINX_DRIVERS depends on PPC32 || MICROBLAZE?

Steve

-----Original Message-----
From: [email protected] on behalf of Grant Likely
Sent: Tue 3/18/2008 9:15 PM
To: Stephen Neuendorffer
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] [RFC] Xilinx: Add generic configuration option to enable all xilinx drivers.

Quoted 16 lines · Stephen Neuendorffer

In the future, this will be used to provide similar configuration for
PowerPC and Microblaze. It may also be convenient for those using Xilinx cores as peripherals for external processors, rather than explicitly having a dependance on the processor architecture.

---

Grant,

This is the patch, updated for all of the drivers that I think are in the tree. I think the problematic parts may be the ppc part, which is required for backward compatibility. If this has to wait until ppc dies, then that's fine with me, I guess.

Quoted 4 lines

It may also be better to clean up the Kconfig lines for Sysace and framebuffer drivers by having PPC32 or PPC4xx select XILINX_DRIVERS. My understanding is that those config options are there because of people using external PPCs with those devices in the FPGA.

Hey Steve;

I haven't forgotten about this patch, but I've been thinking about it some more and I'm coming to the conclusion that it might just be better to eliminate driver dependence on XILINX_DRIVERS and XILINX_VIRTEX entirely and instead just make each of them "depends on PPC32 || MICROBLAZE". There's no reason to restrict compiling these drivers to platforms that are known to have xilinx parts on them.

I know that in most cases they will not be used, but by relaxing the dependencies they will get compile tested on more platforms than they are now and they'll get picked up for make allyesconfigs builds. In my mind this means greater chances of compile bugs getting found and reported.

In fact, it would be nice to drop the PPC32 || MICROBLAZE dependency too; but I think the drivers are using io primitives at the moment that are not portable to x86.

Thoughts?

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#3 lore raw
Quoted 4 lines · Stephen Neuendorffer
Quoted 8 lines

Hmm... interesting points. I guess my feeling was that XILINX_DRIVERS could be a more broadly configurable option, with some of these ideas in mind. Currently, it's hidden by default, but we could easily change this to be visible by default, or selected by a broader number of architectures. I tend to think about them as a group: What if x86 *did* support the primitives needed by these drivers, then if the individual drivers depend on XILINX_DRIVERS, then the modification could be made in one spot. By your suggestion, we would have to modify each one independantly.

Heh; it's not *that* many drivers and it's just Kconfig stuff which is real easy to change. My preference would be to eliminate XILINX_DRIVERS entirely, but I'm not going to fight about it. :-)

Cheers,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#4 lore raw

My feeling is if the drivers should be consistently enabled or not, then we should enforce that consistency by the structure of the code.

Steve

Quoted 2 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of

Grant Likely

Quoted 4 lines

Sent: Tuesday, March 18, 2008 10:06 PM
To: Stephen Neuendorffer
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] [RFC] Xilinx: Add generic configuration option to

enable all xilinx drivers.

Quoted 8 lines

=20

Quoted 5 lines · Stephen Neuendorffer

Hmm... interesting points. I guess my feeling was that

XILINX_DRIVERS could

Quoted 1 line
Quoted 1 line

be a more broadly configurable option, with some of these ideas in

mind.

Quoted 1 line
Quoted 1 line

Currently, it's hidden by default, but we could easily change this

to be

Quoted 1 line
Quoted 1 line

visible by default, or selected by a broader number of

architectures. I

Quoted 2 lines
Quoted 2 lines

tend to think about them as a group: What if x86 *did* support the primitives needed by these drivers, then if the individual drivers

depend on

Quoted 1 line
Quoted 1 line

XILINX_DRIVERS, then the modification could be made in one spot. By

your

Quoted 12 lines
Quoted 1 line

suggestion, we would have to modify each one independantly.

=20
Heh; it's not *that* many drivers and it's just Kconfig stuff which is real easy to change. My preference would be to eliminate XILINX_DRIVERS entirely, but I'm not going to fight about it. :-) =20
Cheers,
g.
=20
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

#5 lore raw

RFC PATCH v2 1/1 Xilinx: Add generic configuration option to enable all xilinx drivers.

In reply to Grant Likely

In the future, this will be used to provide similar configuration for PowerPC and Microblaze. It may also be convenient for those using Xilinx cores as peripherals for external processors, rather than explicitly having a dependance on the processor architecture.

[V2] Updated to depend on PPC32, rather than just XILINX_VIRTEX, to let these drivers be compiled in more configurations.

---

Grant,

There is still the issue of the ppc part, which is required for backward compatibility. If this has to wait until ppc dies, then that's fine with me, I guess.

Steve

---
 drivers/block/Kconfig  |    2 +-
 drivers/char/Kconfig   |    2 +-
 drivers/misc/Kconfig   |   17 +++++++++++++++++
 drivers/serial/Kconfig |    2 +-
 drivers/spi/Kconfig    |    2 +-
 drivers/video/Kconfig  |    2 +-
 6 files changed, 22 insertions(+), 5 deletions(-)
drivers/block/Kconfig +1 -1
index 4d0119e..7f55ba4 100644
@@ -412,7 +412,7 @@ source "drivers/s390/block/Kconfig"
 
 config XILINX_SYSACE
 	tristate "Xilinx SystemACE support"
-	depends on 4xx
+	depends on XILINX_DRIVERS
 	help
 	  Include support for the Xilinx SystemACE CompactFlash interface
 
drivers/char/Kconfig +1 -1
index 157ae2a..8230ad1 100644
@@ -833,7 +833,7 @@ config DTLK
 
 config XILINX_HWICAP
 	tristate "Xilinx HWICAP Support"
-	depends on XILINX_VIRTEX
+	depends on XILINX_DRIVERS
 	help
 	  This option enables support for Xilinx Internal Configuration
 	  Access Port (ICAP) driver.
drivers/misc/Kconfig +17 -0
index b5e67c0..89f9309 100644
@@ -233,3 +233,20 @@ config ATMEL_SSC
 	  If unsure, say N.
 
 endif # MISC_DEVICES
+endmenu
+
+
+#
+# Xilinx devices and common device driver infrastructure
+#
+
+config XILINX_DRIVERS
+	bool
+	depends on PPC32
+	default y
+	---help---
+	  This option is used to enable all of the Xilinx drivers on
+	  supported architectures.  This is often useful if you have a
+	  Xilinx FPGA in a system, either using embedded processors
+	  internal to the FPGA or external processors.
+
drivers/serial/Kconfig +1 -1
index d7e1996..d4e8879 100644
@@ -757,7 +757,7 @@ config SERIAL_IMX_CONSOLE
 
 config SERIAL_UARTLITE
 	tristate "Xilinx uartlite serial port support"
-	depends on PPC32
+	depends on XILINX_DRIVERS
 	select SERIAL_CORE
 	help
 	  Say Y here if you want to use the Xilinx uartlite serial controller.
drivers/spi/Kconfig +1 -1
index abf0504..c66838f 100644
@@ -183,7 +183,7 @@ config SPI_TXX9
 
 config SPI_XILINX
 	tristate "Xilinx SPI controller"
-	depends on SPI_MASTER && XILINX_VIRTEX && EXPERIMENTAL
+	depends on SPI_MASTER && XILINX_DRIVERS && EXPERIMENTAL
 	select SPI_BITBANG
 	help
 	  This exposes the SPI controller IP from the Xilinx EDK.
drivers/video/Kconfig +1 -1
index 5b3dbcf..a66ff4b 100644
@@ -1871,7 +1871,7 @@ config FB_PS3_DEFAULT_SIZE_M
 
 config FB_XILINX
 	tristate "Xilinx frame buffer support"
-	depends on FB && XILINX_VIRTEX
+	depends on FB && XILINX_DRIVERS
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 1 line
1.5.3.4-dirty