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?
解決済! 解決策の投稿を見る。
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);
Hi,
as i.MX28 is nicely supported with current mainline kernels, did you give them a try?
Regards,
Robert
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);
Hi
Please use CONFIG_SPI_MXC to enable SPI support, not CONFIG_SPI_MXS.