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);
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);