@@ -23,9 +23,17 @@
* them early in the boot process, then pass them to the appropriate drivers.
* Not all devices use all parameters but the format is common to all.
*/
+
+/* NOTE:
+ * Zaurus PXA devices call sharpsl_save_param() during fixup so we need
+ * to translate the physical address.
+ * Zaurus collie (SA1100) is unaffected (function is called in init_machine).
+ */
+
#ifdef CONFIG_ARCH_SA1100
#define PARAM_BASE 0xe8ffc000
#else
+#include <asm/memory.h>
#define PARAM_BASE 0xa0000a00
#endif
#define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a )
@@ -41,7 +49,12 @@ EXPORT_SYMBOL(sharpsl_param);
void sharpsl_save_param(void)
{
- memcpy(&sharpsl_param, (void *)PARAM_BASE, sizeof(struct sharpsl_param_info));
+#ifdef CONFIG_ARCH_SA1100
+ void *param_start = (void *)PARAM_BASE;
+#else
+ void *param_start = phys_to_virt(PARAM_BASE);
+#endif
+ memcpy(&sharpsl_param, param_start, sizeof(struct sharpsl_param_info));
if (sharpsl_param.comadj_keyword != COMADJ_MAGIC)
sharpsl_param.comadj=-1;
@@ -58,5 +71,3 @@ void sharpsl_save_param(void)
if (sharpsl_param.adadj_keyword != AD_MAGIC)
sharpsl_param.adadj=-1;
}
-
-