msp71xx: resolve compilation problem in msp_setup.c
The msp71xx_defconfig has never compiled in a kernel release. This is because the file msp_setup.c relies on some definitions from the PMCMSP GPIO driver, which has not yet been accepted into the kernel. This patch checks for the existence of the PMCMSP GPIO driver; if it doesn't exist, no GPIO functions are referenced.
This patch will continue to work after the GPIO driver has been accepted, so no changes will be necessary when that happens.
--- arch/mips/pmc-sierra/msp71xx/msp_setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Note that this patch doesn't clean up all compilation problems with the MSP71xx: there is still a problem with a multiple definition of plat_timer_setup. I'm trying to wrangle some hardware to sort this out. Note that removing the definition of plat_timer_setup in msp_time.c allows the kernel to compile completely, but I don't know if it will run.
arch/mips/pmc-sierra/msp71xx/msp_setup.c +2 -2
@@ -19,7 +19,7 @@#include <msp_prom.h> #include <msp_regs.h> -#if defined(CONFIG_PMC_MSP7120_GW ) +#if defined(CONFIG_PMC_MSP7120_GW ) && defined(CONFIG_PMCMSP_GPIO )#include <msp_regops.h> #include <msp_gpio.h> #define MSP_BOARD_RESET_GPIO 9
@@ -79,7 +79,7 @@ void msp7120_reset(void)/* Wait a bit for the DDRC to settle */ for (i =0 ; i <100000000 ; i++); -#if defined(CONFIG_PMC_MSP7120_GW ) +#if defined(CONFIG_PMC_MSP7120_GW ) && defined(CONFIG_PMCMSP_GPIO )/* * Set GPIO 9 HI, (tied to board reset logic) * GPIO 9 is the 4th GPIO of register 3
Quoted 5 lines · Shane McDonald
From: Shane McDonald <[email protected]>
Date: Sun, 17 Aug 2008 11:51:48 -0600
To: [email protected], [email protected]
Subject: [MIPS] msp71xx: resolve compilation problem inmsp_setup.c
Quoted 8 lines
The
msp71xx_defconfighas never compiled in a kernel release. This is because the filemsp_setup.crelies on some definitions from the PMCMSP GPIO driver, which has not yet been accepted into the kernel. This patch checks for the existence of the PMCMSP GPIO driver; if it doesn't exist, no GPIO functions are referenced.This patch will continue to work after the GPIO driver has been accepted, so no changes will be necessary when that happens.
Has the driver actually been submitted? In its current form I doubt it'll be accepted since there is now a generic GPIO framework so there should be no more new drivers/char/ GPIO drivers.
Ralf
Quoted 7 lines · Shane McDonald
Quoted 6 lines
From: Shane McDonald <[email protected]>
Date: Sun, 17 Aug 2008 11:51:48 -0600
To: [email protected], [email protected]
Subject: [MIPS] msp71xx: resolve compilation problem inmsp_setup.cThe
msp71xx_defconfighas never compiled in a kernel release. This
is
Quoted 9 lines
Quoted 7 lines
because the file
msp_setup.crelies on some definitions from the PMCMSP GPIO driver, which has not yet been accepted into the kernel. This patch checks for the existence of the PMCMSP GPIO driver; if it doesn't exist, no GPIO functions are referenced.This patch will continue to work after the GPIO driver has been accepted, so no changes will be necessary when that happens.
Has the driver actually been submitted? In its current form I doubt
it'll be accepted since
Quoted 1 line
there is now a generic GPIO framework so there should be no more new
drivers/char/ GPIO
Quoted 3 lines
drivers.
Ralf
Hi,
I have attempted to submit a new patch for msp71xx which enables gpio access through the new gpio framework. Hopefully it should propogate throught the list soon... if I have not messed up (It's my first patch for linux-mips). Also we have a newer msp_setup that removes the gpio calls altogether. I will cleanup our msp_setup.c file and create a new patch that can replace this patch if that's ok with you.
Thanks,
Patrick Glass
Hi Patrick:
I'm good with replacing the msp_setup patch that I had I submitted.
Do you also have a patch to replace the plat_timer_setup function
definition in msp_time.c? If these two problems are resolved, the msp71xx_defconfig will finally compile.
Shane McDonald
On Mon, Aug 18, 2008 at 5:11 PM, Patrick Glass <[email protected]
Quoted 38 lines
Quoted 7 lines · wrote:
Quoted 6 lines · Shane McDonald
From: Shane McDonald <[email protected]>
Date: Sun, 17 Aug 2008 11:51:48 -0600
To: [email protected], [email protected]
Subject: [MIPS] msp71xx: resolve compilation problem inmsp_setup.cThe
msp71xx_defconfighas never compiled in a kernel release. Thisis
Quoted 9 lines
Quoted 7 lines
because the file
msp_setup.crelies on some definitions from the PMCMSP GPIO driver, which has not yet been accepted into the kernel. This patch checks for the existence of the PMCMSP GPIO driver; if it doesn't exist, no GPIO functions are referenced.This patch will continue to work after the GPIO driver has been accepted, so no changes will be necessary when that happens.
Has the driver actually been submitted? In its current form I doubt
it'll be accepted since
Quoted 1 line
there is now a generic GPIO framework so there should be no more new
drivers/char/GPIOQuoted 3 lines
drivers.
Ralf
Hi,
I have attempted to submit a new patch for msp71xx which enables gpio access through the new gpio framework. Hopefully it should propogate throught the list soon... if I have not messed up (It's my first patch for linux-mips). Also we have a newermsp_setupthat removes the gpio calls altogether. I will cleanup ourmsp_setup.cfile and create a new patch that can replace this patch if that's ok with you.Thanks,
Patrick Glass
Quoted 7 lines · Patrick Glass
Hi,
I have attempted to submit a new patch for msp71xx which enables gpio access through the new gpio framework. Hopefully it should propogate throught the list soon... if I have not messed up (It's my first patch for linux-mips). Also we have a newermsp_setupthat removes the gpio calls altogether. I will cleanup ourmsp_setup.cfile and create a new patch that can replace this patch if that's ok with you.
Of course.
Ralf