From patchwork Fri Sep 3 09:56:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 152831 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o839vDGN003920 for ; Fri, 3 Sep 2010 09:57:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753065Ab0ICJ5N (ORCPT ); Fri, 3 Sep 2010 05:57:13 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:34138 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753002Ab0ICJ5M (ORCPT ); Fri, 3 Sep 2010 05:57:12 -0400 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.71) (envelope-from ) id 1OrT16-00034L-Lr; Fri, 03 Sep 2010 11:57:04 +0200 Received: from ukl by octopus.hi.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1OrT16-0000VT-5L; Fri, 03 Sep 2010 11:57:04 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: linux-arm-kernel@lists.infradead.org Cc: Eric Miao , Russell King , Nicolas Pitre , Paul Mundt , Magnus Damm , linux-sh@vger.kernel.org Subject: [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr Date: Fri, 3 Sep 2010 11:56:53 +0200 Message-Id: <1283507818-1573-2-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <20100903095504.GC13643@pengutronix.de> References: <20100903095504.GC13643@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-sh@vger.kernel.org Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Sep 2010 09:57:14 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 54b479c..45e134e 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -61,17 +61,6 @@ comment "SH-Mobile System Configuration" menu "Memory configuration" -config MEMORY_START - hex "Physical memory start address" - default "0x50000000" if MACH_G3EVM - default "0x40000000" if MACH_G4EVM - default "0x40000000" if MACH_AP4EVB - default "0x00000000" - ---help--- - Tweak this only when porting to a new machine which does not - already have a defconfig. Changing it from the known correct - value on any of the known systems will only lead to disaster. - config MEMORY_SIZE hex "Physical memory size" default "0x08000000" if MACH_G3EVM diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot deleted file mode 100644 index 1c08ee9..0000000 --- a/arch/arm/mach-shmobile/Makefile.boot +++ /dev/null @@ -1,9 +0,0 @@ -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_MEMORY_START) + 0x8000]') - - zreladdr-y := $(__ZRELADDR) - -# Unsupported legacy stuff -# -#params_phys-y (Instead: Pass atags pointer in r2) -#initrd_phys-y (Instead: Use compiled-in initramfs) diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h index 377584e..100f734 100644 --- a/arch/arm/mach-shmobile/include/mach/memory.h +++ b/arch/arm/mach-shmobile/include/mach/memory.h @@ -1,7 +1,20 @@ #ifndef __ASM_MACH_MEMORY_H #define __ASM_MACH_MEMORY_H -#define PHYS_OFFSET UL(CONFIG_MEMORY_START) +#define SH7367_PHYS_OFFSET UL(0x50000000) +#define SH7372_PHYS_OFFSET UL(0x40000000) +#define SH7377_PHYS_OFFSET UL(0x40000000) + +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) +# if defined(CONFIG_ARCH_SH7367) +# define PHYS_OFFSET SH7367_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7372) +# define PHYS_OFFSET SH7372_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7377) +# define PHYS_OFFSET SH7377_PHYS_OFFSET +# endif +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ + #define MEM_SIZE UL(CONFIG_MEMORY_SIZE) /* DMA memory at 0xf6000000 - 0xffdfffff */