diff options
author | John Crispin <blogic@openwrt.org> | 2013-07-14 18:00:34 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-07-14 18:00:34 +0000 |
commit | d4b8b8d62fcb34be61c325efa6f91d937d19a616 (patch) | |
tree | 29b48b2691fa9b9bb934598aab3dd09bb8562f6e /target/linux/ramips/patches-3.8/0037-MIPS-add-detect_memory_region.patch | |
parent | 6bcbd536ed1e845dce59f5a063bbce293740c26e (diff) | |
download | upstream-d4b8b8d62fcb34be61c325efa6f91d937d19a616.tar.gz upstream-d4b8b8d62fcb34be61c325efa6f91d937d19a616.tar.bz2 upstream-d4b8b8d62fcb34be61c325efa6f91d937d19a616.zip |
ralink: drop v3.8 support
Signed-off-by: John Crispin <blogic@opewnrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37311 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/patches-3.8/0037-MIPS-add-detect_memory_region.patch')
-rw-r--r-- | target/linux/ramips/patches-3.8/0037-MIPS-add-detect_memory_region.patch | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/target/linux/ramips/patches-3.8/0037-MIPS-add-detect_memory_region.patch b/target/linux/ramips/patches-3.8/0037-MIPS-add-detect_memory_region.patch deleted file mode 100644 index 2f5626efd0..0000000000 --- a/target/linux/ramips/patches-3.8/0037-MIPS-add-detect_memory_region.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 3350a0d29bc3f3d15b50835a20ffcc14a458e2d9 Mon Sep 17 00:00:00 2001 -From: John Crispin <blogic@openwrt.org> -Date: Sat, 13 Apr 2013 13:15:47 +0200 -Subject: [PATCH 37/79] MIPS: add detect_memory_region() - -Add a generic way of detecting the available RAM. This function is based on the -implementation already used by ath79. - -Signed-off-by: John Crispin <blogic@openwrt.org> -Patchwork: http://patchwork.linux-mips.org/patch/5178/ ---- - arch/mips/include/asm/bootinfo.h | 1 + - arch/mips/kernel/setup.c | 20 ++++++++++++++++++++ - 2 files changed, 21 insertions(+) - -diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h -index 7a51d87..6d6cfac 100644 ---- a/arch/mips/include/asm/bootinfo.h -+++ b/arch/mips/include/asm/bootinfo.h -@@ -104,6 +104,7 @@ struct boot_mem_map { - extern struct boot_mem_map boot_mem_map; - - extern void add_memory_region(phys_t start, phys_t size, long type); -+extern void detect_memory_region(phys_t start, phys_t sz_min, phys_t sz_max); - - extern void prom_init(void); - extern void prom_free_prom_memory(void); -diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c -index 8c41187..3937630 100644 ---- a/arch/mips/kernel/setup.c -+++ b/arch/mips/kernel/setup.c -@@ -23,6 +23,7 @@ - #include <linux/pfn.h> - #include <linux/debugfs.h> - #include <linux/kexec.h> -+#include <linux/sizes.h> - - #include <asm/addrspace.h> - #include <asm/bootinfo.h> -@@ -122,6 +123,25 @@ void __init add_memory_region(phys_t start, phys_t size, long type) - boot_mem_map.nr_map++; - } - -+void __init detect_memory_region(phys_t start, phys_t sz_min, phys_t sz_max) -+{ -+ phys_t size; -+ -+ for (size = sz_min; size < sz_max; size <<= 1) { -+ if (!memcmp(detect_memory_region, -+ detect_memory_region + size, 1024)) -+ break; -+ } -+ -+ pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n", -+ ((unsigned long long) size) / SZ_1M, -+ (unsigned long long) start, -+ ((unsigned long long) sz_min) / SZ_1M, -+ ((unsigned long long) sz_max) / SZ_1M); -+ -+ add_memory_region(start, size, BOOT_MEM_RAM); -+} -+ - static void __init print_memory_map(void) - { - int i; --- -1.7.10.4 - |