diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-12-15 01:59:45 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-12-15 01:59:45 +0000 |
commit | 7185dc2440c81feae80539ecc8d1e0c9e133497b (patch) | |
tree | b01c98dfee8ccdd18862f3049d7dfdcca7828c3a /target/linux/lantiq/patches-3.7/0100-MIPS-lantiq-honour-model-property-inside-devicetree-.patch | |
parent | 502a3e0f56d6af2fee94bfd4c6e05c8361ccde6c (diff) |
[lantiq] add linux-v3.7
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34687 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.7/0100-MIPS-lantiq-honour-model-property-inside-devicetree-.patch')
-rw-r--r-- | target/linux/lantiq/patches-3.7/0100-MIPS-lantiq-honour-model-property-inside-devicetree-.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.7/0100-MIPS-lantiq-honour-model-property-inside-devicetree-.patch b/target/linux/lantiq/patches-3.7/0100-MIPS-lantiq-honour-model-property-inside-devicetree-.patch new file mode 100644 index 0000000000..cef266fbc9 --- /dev/null +++ b/target/linux/lantiq/patches-3.7/0100-MIPS-lantiq-honour-model-property-inside-devicetree-.patch @@ -0,0 +1,59 @@ +From 60bc3043590bf74ca1c9dd88a4e5f28a40d5b348 Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Thu, 6 Dec 2012 10:26:05 +0100 +Subject: [PATCH 100/123] MIPS: lantiq: honour model property inside + devicetree during board init + +--- + arch/mips/lantiq/prom.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c +index 9f9e875..fa12dc1 100644 +--- a/arch/mips/lantiq/prom.c ++++ b/arch/mips/lantiq/prom.c +@@ -57,6 +57,21 @@ static void __init prom_init_cmdline(void) + } + } + ++int __init early_init_dt_scan_model(unsigned long node, ++ const char *uname, int depth, ++ void *data) ++{ ++ if (!depth) { ++ char *model = of_get_flat_dt_prop(node, "model", NULL); ++ if (model) { ++ pr_info("Board: %s\n", model); ++ snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN, "%s - %s", ++ soc_info.sys_type, model); ++ } ++ } ++ return 0; ++} ++ + void __init plat_mem_setup(void) + { + ioport_resource.start = IOPORT_RESOURCE_START; +@@ -71,6 +86,8 @@ void __init plat_mem_setup(void) + * parsed resulting in our memory appearing + */ + __dt_setup_arch(&__dtb_start); ++ ++ of_scan_flat_dt(early_init_dt_scan_model, NULL); + } + + void __init device_tree_init(void) +@@ -93,9 +110,8 @@ void __init prom_init(void) + { + /* call the soc specific detetcion code and get it to fill soc_info */ + ltq_soc_detect(&soc_info); +- snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN - 1, "%s rev %s", ++ snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN, "%s rev %s", + soc_info.name, soc_info.rev_type); +- soc_info.sys_type[LTQ_SYS_TYPE_LEN - 1] = '\0'; + pr_info("SoC: %s\n", soc_info.sys_type); + prom_init_cmdline(); + +-- +1.7.10.4 + |