Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3705750imu; Mon, 28 Jan 2019 09:20:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN6xm+Db+cOsGaZ0pSw+7VjecimBaU2ZXLNojxc4jQJdCyHQKhlXNjxtS6YMjebhBy9CsHDz X-Received: by 2002:a62:2b8b:: with SMTP id r133mr22644062pfr.246.1548696053615; Mon, 28 Jan 2019 09:20:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696053; cv=none; d=google.com; s=arc-20160816; b=AAfFNI4JkFILr9NjNqXufdZ7X+4qfLKUd1ob6cPzvp6bEYQ/UGCMK8iKkOaj4iXiDr OdVJIO69JDyc3fhAeazNH9x3kmTBKz0E7c1PBLj944sSqIltUTXI0AId9Z2lRM4eHUy7 oIk0lV8U5HKvLyW5UZL45+pBLm2lZ+IFhr/J32w0/pA9Z8Dfc/tWMH8Vz8tRhUwCv6U7 H82LT03kXdXIzbzX3pnsU84FkptAvsdhnkK/Rbe89S55QFvdR1Ey3uMNR9SB+cbDnAKk ilQ0CDcFcVXg0xoW+a7zpgzocDgAeimpMKH/b5XBWo6NMFggv5a53/STt7WVRKrS6YKK Fn/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vP4M4FNV2Vv8NQjiLqEMPXCz/nHgXV7BI9lk+e3oX3Q=; b=PC7oYjYK7lj0mEWPfFg8Z2Oah//NHwpJTUghEKoDX/4p0TR4irM40eSXBEAJGOOD5I kj/X8PZ9tRqk64DtpZ/ww4e1wu6CYYA8NDlwE3V5lGGPkaZS9Ck7m1lFKgsjJYFvo+eY fcTkt+my0gEI6kKsT0pHQqjZ/qIPQSgBdb7byMfHdR30j/Yr1phfb01fMbgXhbMZmXkI caLPZC/WruNwKDLz+zSe5YoVPl0qsuVxlLNkAquIS0l/EyNCTVJl5+TRuq9gIE7dIZeJ T9LEONt/udOZiCpqmaQjrGPy71cB+fUqvIidHpmvaztZYIKUVwXHdvgRMYuUdGzTuOgl mTgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EnxhkKyd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z29si4617164pfi.9.2019.01.28.09.20.38; Mon, 28 Jan 2019 09:20:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EnxhkKyd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731162AbfA1RSi (ORCPT + 99 others); Mon, 28 Jan 2019 12:18:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:51474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730204AbfA1QFL (ORCPT ); Mon, 28 Jan 2019 11:05:11 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B9C2920989; Mon, 28 Jan 2019 16:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691510; bh=c7wP/oO8MsH6SEorEqRo1ZnrFMcQEaU01KcuWDELvb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EnxhkKydan29/HWTxPHneX/zS9cdIE+M7Lh7KpiXdF7Y0NsgPXDoSvP0xOos9maWP JwFMr+yWrOvZesQNhIvUI2hukHrikpcMwYkYzMypucH0CFULcG8Jm11RWQJscC80DT 5Bx0X6UtOScoYMpdeOu3YTva41ZLofPwBSsYSjlk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Linus Walleij , Sasha Levin , devicetree@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 122/258] ARM: dts: Fix up the D-Link DIR-685 MTD partition info Date: Mon, 28 Jan 2019 10:57:08 -0500 Message-Id: <20190128155924.51521-122-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 738a05e673435afb986b53da43befd83ad87ec3b ] The vendor firmware was analyzed to get the right idea about this flash layout. /proc/mtd contains: dev: size erasesize name mtd0: 01e7ff40 00020000 "rootfs" mtd1: 01f40000 00020000 "upgrade" mtd2: 00040000 00020000 "rgdb" mtd3: 00020000 00020000 "nvram" mtd4: 00040000 00020000 "RedBoot" mtd5: 00020000 00020000 "LangPack" mtd6: 02000000 00020000 "flash" Here "flash" is obviously the whole device and we know "rootfs" is a bogus hack to point to a squashfs rootfs inside of the main "upgrade partition". We know "RedBoot" is the first 0x40000 of the flash and the "upgrade" partition follows from 0x40000 to 0x1f8000. So we have mtd0, 1, 4 and 6 covered. Remains: mtd2: 00040000 00020000 "rgdb" mtd3: 00020000 00020000 "nvram" mtd5: 00020000 00020000 "LangPack" Inspecting the flash at 0x1f8000 and 0x1fa000 reveals each of these starting with "RGCFG1" so we assume 0x1f8000-1fbfff is "rgdb" of 0x40000. Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- arch/arm/boot/dts/gemini-dlink-dir-685.dts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts index 6f258b50eb44..502a361d1fe9 100644 --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts @@ -274,20 +274,16 @@ read-only; }; /* - * Between the boot loader and the rootfs is the kernel - * in a custom Storlink format flashed from the boot - * menu. The rootfs is in squashfs format. + * This firmware image contains the kernel catenated + * with the squashfs root filesystem. For some reason + * this is called "upgrade" on the vendor system. */ - partition@1800c0 { - label = "rootfs"; - reg = <0x001800c0 0x01dbff40>; - read-only; - }; - partition@1f40000 { + partition@40000 { label = "upgrade"; - reg = <0x01f40000 0x00040000>; + reg = <0x00040000 0x01f40000>; read-only; }; + /* RGDB, Residental Gateway Database? */ partition@1f80000 { label = "rgdb"; reg = <0x01f80000 0x00040000>; -- 2.19.1