CONFIG_SPI_MXS compile as a module fails

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CONFIG_SPI_MXS compile as a module fails

跳至解决方案
1,449 次查看
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?

标签 (2)
0 项奖励
回复
1 解答
1,053 次查看
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 项奖励
回复
3 回复数
1,053 次查看
RobertSchwebel
Contributor IV

Hi,

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

Regards,

Robert

0 项奖励
回复
1,054 次查看
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 项奖励
回复
1,053 次查看
RobinGong
NXP Employee
NXP Employee

Hi

     Please use CONFIG_SPI_MXC to enable SPI support, not CONFIG_SPI_MXS.

0 项奖励
回复