CONFIG_SPI_MXS compile as a module fails

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CONFIG_SPI_MXS compile as a module fails

ソリューションへジャンプ
1,491件の閲覧回数
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,095件の閲覧回数
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,095件の閲覧回数
RobertSchwebel
Contributor IV

Hi,

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

Regards,

Robert

0 件の賞賛
返信
1,096件の閲覧回数
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,095件の閲覧回数
RobinGong
NXP Employee
NXP Employee

Hi

     Please use CONFIG_SPI_MXC to enable SPI support, not CONFIG_SPI_MXS.

0 件の賞賛
返信