From 0f0a0af826260a267d11a66e4b13543784bc9c56 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 27 Sep 2017 13:01:49 -0700 Subject: bcma: keep *config menu together MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use "if BCMA"/"endif" around all Kconfig symbols so that they are kept together in *config menus instead of showing up in unexpected places. Also remove "depends on BCMA" since this is handled by the "if BCMA" addition. Tested with ARCH={x86_64,MIPS} using make {n,menu,g,x}config. Signed-off-by: Randy Dunlap Cc: Rafał Miłecki Signed-off-by: Kalle Valo --- drivers/bcma/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/bcma') diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig index 54f81c554815..56ee55b66dfe 100644 --- a/drivers/bcma/Kconfig +++ b/drivers/bcma/Kconfig @@ -10,14 +10,15 @@ menuconfig BCMA Bus driver for Broadcom specific Advanced Microcontroller Bus Architecture. +if BCMA + # Support for Block-I/O. SELECT this from the driver that needs it. config BCMA_BLOCKIO bool - depends on BCMA config BCMA_HOST_PCI_POSSIBLE bool - depends on BCMA && PCI = y + depends on PCI = y default y config BCMA_HOST_PCI @@ -28,7 +29,6 @@ config BCMA_HOST_PCI config BCMA_HOST_SOC bool "Support for BCMA in a SoC" - depends on BCMA help Host interface for a Broadcom AIX bus directly mapped into the memory. This only works with the Broadcom SoCs from the @@ -38,7 +38,7 @@ config BCMA_HOST_SOC config BCMA_DRIVER_PCI bool "BCMA Broadcom PCI core driver" - depends on BCMA && PCI + depends on PCI default y help BCMA bus may have many versions of PCIe core. This driver @@ -54,13 +54,13 @@ config BCMA_DRIVER_PCI config BCMA_DRIVER_PCI_HOSTMODE bool "Driver for PCI core working in hostmode" - depends on BCMA && MIPS && BCMA_DRIVER_PCI + depends on MIPS && BCMA_DRIVER_PCI help PCI core hostmode operation (external PCI bus). config BCMA_DRIVER_MIPS bool "BCMA Broadcom MIPS core driver" - depends on BCMA && MIPS + depends on MIPS help Driver for the Broadcom MIPS core attached to Broadcom specific Advanced Microcontroller Bus. @@ -91,7 +91,6 @@ config BCMA_NFLASH config BCMA_DRIVER_GMAC_CMN bool "BCMA Broadcom GBIT MAC COMMON core driver" - depends on BCMA help Driver for the Broadcom GBIT MAC COMMON core attached to Broadcom specific Advanced Microcontroller Bus. @@ -100,7 +99,7 @@ config BCMA_DRIVER_GMAC_CMN config BCMA_DRIVER_GPIO bool "BCMA GPIO driver" - depends on BCMA && GPIOLIB + depends on GPIOLIB select GPIOLIB_IRQCHIP if BCMA_HOST_SOC help Driver to provide access to the GPIO pins of the bcma bus. @@ -109,8 +108,9 @@ config BCMA_DRIVER_GPIO config BCMA_DEBUG bool "BCMA debugging" - depends on BCMA help This turns on additional debugging messages. If unsure, say N + +endif # BCMA -- cgit v1.2.3-58-ga151 From 66cc044249603e12e1dbba347f03bdbc9f171fdf Mon Sep 17 00:00:00 2001 From: Rafał Miłecki Date: Mon, 16 Oct 2017 14:54:32 +0200 Subject: bcma: use bcma_debug and pr_cont in MIPS driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using bcma_debug gives a device-specific prefix for messages and pr_cont is a common helper for continuing a line. Signed-off-by: Rafał Miłecki Acked-By: Hauke Mehrtens Signed-off-by: Kalle Valo --- drivers/bcma/driver_mips.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/bcma') diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c index 89af807cf29c..5904ef1aa624 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c @@ -184,10 +184,11 @@ static void bcma_core_mips_print_irq(struct bcma_device *dev, unsigned int irq) { int i; static const char *irq_name[] = {"2(S)", "3", "4", "5", "6", "D", "I"}; - printk(KERN_DEBUG KBUILD_MODNAME ": core 0x%04x, irq :", dev->id.id); + + bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id); for (i = 0; i <= 6; i++) - printk(" %s%s", irq_name[i], i == irq ? "*" : " "); - printk("\n"); + pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " "); + pr_cont("\n"); } static void bcma_core_mips_dump_irq(struct bcma_bus *bus) -- cgit v1.2.3-58-ga151 From 758f7e06063a87b67c118794a3ba8931cced67c6 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 18 Oct 2017 22:45:27 -0700 Subject: bcma: Use bcma_debug and not pr_cont in MIPS driver Commit 66cc04424960 ("bcma: use bcma_debug and pr_cont in MIPS driver") converted a printk(KERN_DEBUG to bcma_debug. bcma_debug is guarded by a #define DEBUG via pr_debug. This means that the bcma_debug will generally not be emitted but any pr_cont following the bcma_debug will be emitted. Correct this by removing the uses of pr_cont by using a temporary. Signed-off-by: Joe Perches Signed-off-by: Kalle Valo --- drivers/bcma/driver_mips.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers/bcma') diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c index 5904ef1aa624..f040aba48d50 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c @@ -184,11 +184,14 @@ static void bcma_core_mips_print_irq(struct bcma_device *dev, unsigned int irq) { int i; static const char *irq_name[] = {"2(S)", "3", "4", "5", "6", "D", "I"}; + char interrupts[20]; + char *ints = interrupts; - bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id); - for (i = 0; i <= 6; i++) - pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " "); - pr_cont("\n"); + for (i = 0; i < ARRAY_SIZE(irq_name); i++) + ints += sprintf(ints, " %s%c", + irq_name[i], i == irq ? '*' : ' '); + + bcma_debug(dev->bus, "core 0x%04x, irq:%s\n", dev->id.id, interrupts); } static void bcma_core_mips_dump_irq(struct bcma_bus *bus) -- cgit v1.2.3-58-ga151