CONFIG_SPI_MXS compile as a module fails

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CONFIG_SPI_MXS compile as a module fails

Jump to solution
1,132 Views
danib
Contributor I

Hi

i am trying to compile the kernel version 2.6.35.3 for i.mx28 , and when i try to

compile CONFIG_SPI_MXS as a module it fails

on this error

ERROR: "mxs_reset_block" [drivers/spi/spi_mxs.ko] undefined!

Any Idea?

Labels (2)
0 Kudos
1 Solution
736 Views
RobinGong
NXP Employee
NXP Employee

Sorry, please ignore my the wrong information. I have a try with mainline code, and saw what Danib met. Hi, Danib, you can use the below patch to built SPI as module:

diff --git a/arch/arm/plat-mxs/core.c b/arch/arm/plat-mxs/core.c

index b804a57..67cc1f4 100644

--- a/arch/arm/plat-mxs/core.c

+++ b/arch/arm/plat-mxs/core.c

@@ -20,12 +20,12 @@

#include <linux/init.h>

#include <linux/io.h>

#include <linux/err.h>

+#include <linux/module.h>

#include <asm/proc-fns.h>

#include <mach/hardware.h>

#include <mach/regs-rtc.h>

-

void (*machine_arch_reset) (char mode, const char *cmd);

void arch_idle(void)

@@ -135,3 +135,5 @@ int mxs_reset_block(void __iomem *hwreg, int just_enable)

        }

        return r;

}

+EXPORT_SYMBOL(mxs_reset_block);

+

diff --git a/arch/arm/plat-mxs/include/mach/system.h b/arch/arm/plat-mxs/include/mach/system.h

index faaa2ff..05d8a23 100644

--- a/arch/arm/plat-mxs/include/mach/system.h

+++ b/arch/arm/plat-mxs/include/mach/system.h

@@ -24,7 +24,7 @@ extern void arch_idle(void);

void arch_reset(char mode, const char *cmd);

extern void (*machine_arch_reset)(char mode, const char *cmd);

-int mxs_reset_block(void __iomem *hwreg, int just_enable);

+extern int mxs_reset_block(void __iomem *hwreg, int just_enable);

int get_evk_board_version(void);

View solution in original post

0 Kudos
3 Replies
736 Views
RobertSchwebel
Contributor IV

Hi,

as i.MX28 is nicely supported with current mainline kernels, did you give them a try?

Regards,

Robert

0 Kudos
737 Views
RobinGong
NXP Employee
NXP Employee

Sorry, please ignore my the wrong information. I have a try with mainline code, and saw what Danib met. Hi, Danib, you can use the below patch to built SPI as module:

diff --git a/arch/arm/plat-mxs/core.c b/arch/arm/plat-mxs/core.c

index b804a57..67cc1f4 100644

--- a/arch/arm/plat-mxs/core.c

+++ b/arch/arm/plat-mxs/core.c

@@ -20,12 +20,12 @@

#include <linux/init.h>

#include <linux/io.h>

#include <linux/err.h>

+#include <linux/module.h>

#include <asm/proc-fns.h>

#include <mach/hardware.h>

#include <mach/regs-rtc.h>

-

void (*machine_arch_reset) (char mode, const char *cmd);

void arch_idle(void)

@@ -135,3 +135,5 @@ int mxs_reset_block(void __iomem *hwreg, int just_enable)

        }

        return r;

}

+EXPORT_SYMBOL(mxs_reset_block);

+

diff --git a/arch/arm/plat-mxs/include/mach/system.h b/arch/arm/plat-mxs/include/mach/system.h

index faaa2ff..05d8a23 100644

--- a/arch/arm/plat-mxs/include/mach/system.h

+++ b/arch/arm/plat-mxs/include/mach/system.h

@@ -24,7 +24,7 @@ extern void arch_idle(void);

void arch_reset(char mode, const char *cmd);

extern void (*machine_arch_reset)(char mode, const char *cmd);

-int mxs_reset_block(void __iomem *hwreg, int just_enable);

+extern int mxs_reset_block(void __iomem *hwreg, int just_enable);

int get_evk_board_version(void);

0 Kudos
736 Views
RobinGong
NXP Employee
NXP Employee

Hi

     Please use CONFIG_SPI_MXC to enable SPI support, not CONFIG_SPI_MXS.

0 Kudos