Hi all,
Here is a fix to be able to boot a ts7260 with 64MB of SDRAM using the
kernel 2.6.28.3-m.
If people could test it, as i'm not sure this is the definitive answer
to the problem.
In short, it was as simple as a clash between C macros and inline
function! (+ potentially the 0xC0000000 thingie pointed to by Charlie).
If you have a look at arch/arm/include/asm/memory.h, you will see this:
#ifndef __virt_to_phys
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
#endif
I realized that once __phys_to_virt() modified to try Charlie's
remark, i still get 0xe0000000 translated to 0xa0000000, which was
impossible unless i was not using my modified version.
I did not run extensive tests, but at least my kernel boot and shows:
Memory: 8MB 8MB 8MB 8MB 8MB 8MB 8MB 8MB = 64MB total
Regards,
Christian
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
--- linux-2.6.28.3-m/arch/arm/mach-ep93xx/include/mach/memory.h 2009-02-10
19:58:51.000000000 +0000
+++ linux-2.6.28.3-fixed/arch/arm/mach-ep93xx/include/mach/memory.h
2009-02-10 19:56:48.000000000 +0000
@@ -13,14 +13,19 @@
#ifndef __ASSEMBLY__
static inline unsigned long __phys_to_virt(unsigned long pa)
{
- return (pa & 0x07ffffff) | ((pa & 0xe0000000) ? 0x08000000 : 0);
+ return (pa & 0x07ffffff) | ((pa & 0xe0000000) ? 0x08000000 : 0) |
CONFIG_PAGE_OFFSET;
}
static inline unsigned long __virt_to_phys(unsigned long va)
{
return (va & 0x07ffffff) | ((va & 0x08000000) ? 0xe0000000 : 0);
}
-#endif
+
+/* We need to define them as macro as well otherwise
+ __ASM_ARM_MEMORY_H will define them with defaults values */
+#define __phys_to_virt(pa) __phys_to_virt((pa))
+#define __virt_to_phys(va) __virt_to_phys((va))
+#endif
#define SECTION_SIZE_BITS 24
#define MAX_PHYSMEM_BITS 32
|