powerpc/qe: Move cmxgcr_lock definition from the ucc.c into the qe.c
PATCH 1/1 powerpc/qe: Move cmxgcr_lock definition from the ucc.c into the qe.c
With this patch we can compile the qe_lib/usb.c without the UCC support (that is, without UCC_GETH and/or SERIAL_QE).
Fixes following link error (CONFIG_SMP should be =y to trigger this):
arch/powerpc/sysdev/built-in.o: In function `qe_usb_clock_set':
(.text+0x3cae): undefined reference to `cmxgcr_lock'
make: *** [.tmp_vmlinux1] Error 1
While at it, also add missing spinlock.h includes.
---
This is for powerpc-next since nobody enables QE_USB yet.
arch/powerpc/sysdev/qe_lib/qe.c | 3 +++ arch/powerpc/sysdev/qe_lib/ucc.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-)
arch/powerpc/sysdev/qe_lib/qe.c +3 -0
@@ -19,6 +19,7 @@#include <linux/kernel.h> #include <linux/param.h> #include <linux/string.h> +#include <linux/spinlock.h> #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/bootmem.h>
@@ -38,6 +39,8 @@ static void qe_snums_init(void);static int qe_sdma_init (void );static DEFINE_SPINLOCK (qe_lock); +DEFINE_SPINLOCK (cmxgcr_lock); +EXPORT_SYMBOL (cmxgcr_lock);/* QE snum state */ enum qe_snum_state {
arch/powerpc/sysdev/qe_lib/ucc.c +1 -3
@@ -18,6 +18,7 @@#include <linux/errno.h> #include <linux/slab.h> #include <linux/stddef.h> +#include <linux/spinlock.h> #include <linux/module.h> #include <asm/irq.h>
@@ -26,9 +27,6 @@#include <asm/qe.h> #include <asm/ucc.h> -DEFINE_SPINLOCK (cmxgcr_lock); -EXPORT_SYMBOL (cmxgcr_lock); -int ucc_set_qe_mux_mii_mng (unsigned int ucc_num) {unsigned long flags;
Signature · 1 line
1.5.6.3
Quoted 5 lines · Anton Vorontsov
With this patch we can compile the
qe_lib/usb.cwithout the UCC support (that is, withoutUCC_GETHand/orSERIAL_QE).Fixes following link error (
CONFIG_SMPshould be =y to trigger this):
Quoted 7 lines
arch/powerpc/sysdev/built-in.o: In function `qe_usb_clock_set':
(.text+0x3cae): undefined reference to `cmxgcr_lock'
make: *** [.tmp_vmlinux1] Error 1While at it, also add missing
spinlock.hincludes.Signed-off-by Anton Vorontsov <[email protected]>
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Kumar Gala
AppliedQuoted 11 lines · Anton Vorontsov
With this patch we can compile the
qe_lib/usb.cwithout the UCC support (that is, withoutUCC_GETHand/orSERIAL_QE).Fixes following link error (
CONFIG_SMPshould be =y to trigger this):
arch/powerpc/sysdev/built-in.o: In function `qe_usb_clock_set':
(.text+0x3cae): undefined reference to `cmxgcr_lock'
make: *** [.tmp_vmlinux1] Error 1While at it, also add missing
spinlock.hincludes.
Quoted 8 lines
Signed-off-by Anton Vorontsov <[email protected]>---
This is for powerpc-next since nobody enables
QE_USByet.arch/powerpc/sysdev/qe_lib/qe.c | 3 +++ arch/powerpc/sysdev/qe_lib/ucc.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-)
applied to next.
- k