From 7e302869e0c5261aba779e059cddcd2fbf7aedbe Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 6 Aug 2008 09:10:01 +1000 Subject: powerpc: Split-out common MSI bitmap logic into msi_bitmap.c There are now two almost identical implementations of an MSI bitmap allocator, one in mpic_msi.c and the other in fsl_msi.c. Merge them together and put the result in msi_bitmap.c. Some of the MPIC bits will remain to provide a nicer interface for the MPIC users. In the process we fix two buglets. The first is that the allocation routines, now msi_bitmap_alloc_hwirqs(), returned an unsigned result, even though they use -1 to indicate allocation failure. Although all the callers were checking correctly, it is much better for the routine to just return an int. At least until someone wants > ~2 billion MSIs. The second buglet is that the device tree reservation logic only allowed power-of-two reservations. AFAICT that didn't effect any existing code but it's nicer if we can reserve arbitrary irqs from MSI use. We also add some selftests, which exposed the two buglets and now test for them, as well as some basic sanity tests. The tests are only built when CONFIG_DEBUG_KERNEL=y. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/sysdev/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/powerpc/sysdev/Kconfig') diff --git a/arch/powerpc/sysdev/Kconfig b/arch/powerpc/sysdev/Kconfig index 72fb35b9ebc..396582835cb 100644 --- a/arch/powerpc/sysdev/Kconfig +++ b/arch/powerpc/sysdev/Kconfig @@ -6,3 +6,9 @@ config PPC4xx_PCI_EXPRESS bool depends on PCI && 4xx default n + +config PPC_MSI_BITMAP + bool + depends on PCI_MSI + default y if MPIC + default y if FSL_PCI -- cgit v1.2.3 From 1e16dfc1baa745dd89b95f6e33e4142df6218066 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 23 Sep 2008 17:35:38 +0200 Subject: powerpc: gpio driver for mpc8349/8572/8610 and compatible Structured similar to the existing QE GPIO support. Signed-off-by: Peter Korsgaard Acked-by: Anton Vorontsov Signed-off-by: Kumar Gala --- arch/powerpc/sysdev/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/powerpc/sysdev/Kconfig') diff --git a/arch/powerpc/sysdev/Kconfig b/arch/powerpc/sysdev/Kconfig index 396582835cb..d0e7bb05c3a 100644 --- a/arch/powerpc/sysdev/Kconfig +++ b/arch/powerpc/sysdev/Kconfig @@ -7,6 +7,15 @@ config PPC4xx_PCI_EXPRESS depends on PCI && 4xx default n +config MPC8xxx_GPIO + bool "MPC8xxx GPIO support" + depends on PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || PPC_85xx || PPC_86xx + select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB + help + Say Y here if you're going to use hardware that connects to the + MPC831x/834x/837x/8572/8610 GPIOs. + config PPC_MSI_BITMAP bool depends on PCI_MSI -- cgit v1.2.3 From 782f04fc0c2af3c1e92c9d561926a2056b1c72e8 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 23 Sep 2008 23:36:32 -0500 Subject: powerpc: Move 8xxx GPIO Kconfig under the platform menu The initial patch had the option at the top level which wasn't quite right. Moving under the platform options is a bit better. Signed-off-by: Kumar Gala --- arch/powerpc/sysdev/Kconfig | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch/powerpc/sysdev/Kconfig') diff --git a/arch/powerpc/sysdev/Kconfig b/arch/powerpc/sysdev/Kconfig index d0e7bb05c3a..396582835cb 100644 --- a/arch/powerpc/sysdev/Kconfig +++ b/arch/powerpc/sysdev/Kconfig @@ -7,15 +7,6 @@ config PPC4xx_PCI_EXPRESS depends on PCI && 4xx default n -config MPC8xxx_GPIO - bool "MPC8xxx GPIO support" - depends on PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || PPC_85xx || PPC_86xx - select GENERIC_GPIO - select ARCH_REQUIRE_GPIOLIB - help - Say Y here if you're going to use hardware that connects to the - MPC831x/834x/837x/8572/8610 GPIOs. - config PPC_MSI_BITMAP bool depends on PCI_MSI -- cgit v1.2.3