From patchwork Sun Oct 26 13:37:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 403222 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 12FD914007D for ; Mon, 27 Oct 2014 02:23:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BFEDCA7824; Sun, 26 Oct 2014 16:23:23 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z1Xwy5Nd49nC; Sun, 26 Oct 2014 16:23:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 26068A76EC; Sun, 26 Oct 2014 16:23:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FFB1A73E9 for ; Sun, 26 Oct 2014 14:38:13 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xbKih15-07Ce for ; Sun, 26 Oct 2014 14:38:13 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by theia.denx.de (Postfix) with ESMTPS id 3E48BA73E7 for ; Sun, 26 Oct 2014 14:38:09 +0100 (CET) Received: by mail-wi0-f174.google.com with SMTP id q5so4354927wiv.13 for ; Sun, 26 Oct 2014 06:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=afHbR8MHRf0X4TkFdBs5W1EEnCB8TgtKkSiPUEKzBpY=; b=wEOqo1GXzLMbJVbXvJWvvnaJK9DsOwDtnQhZiX5VnYUkdn4XIGOSKowBXw9pKnbQ6f fG7lSdhPpdXZzvS21fL0HBx/99Dn6Te+vn8lekN35ebhb3ETpeESK9dyTgBxHWNfR+9M YvQdxPyLneWf8gfy/RnzUjVaxZiWJqTsAEZM4MOCP1WvhJmM2NVwr4QlgcLWL9jBcZZ4 l9Pylc9jk/NI6UQsuQZaZ9kBaewJaOpEG0EWoJZVvk/wsCnwdi2G0sMmqb34LHZtssJI hkT849oxnB5IjlKpI5lln07uKd8KkjToGjo98x3J133W/CiN+JI5KHtrGfqdc5mCCPh8 GVwA== X-Received: by 10.194.8.103 with SMTP id q7mr2138387wja.82.1414330689256; Sun, 26 Oct 2014 06:38:09 -0700 (PDT) Received: from workstation.zombienet.local (pD95FF6AF.dip0.t-ipconnect.de. [217.95.246.175]) by mx.google.com with ESMTPSA id cw6sm12049726wjb.18.2014.10.26.06.38.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Oct 2014 06:38:08 -0700 (PDT) From: Daniel Schwierzeck To: u-boot@lists.denx.de Date: Sun, 26 Oct 2014 14:37:51 +0100 Message-Id: <1414330676-22547-2-git-send-email-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1414330676-22547-1-git-send-email-daniel.schwierzeck@gmail.com> References: <1414330676-22547-1-git-send-email-daniel.schwierzeck@gmail.com> Cc: Stefan Roese Subject: [U-Boot] [PATCH 1/6] MIPS: kconfig: add options for endianess select X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add new Kconfig option to let the user select the targets endianess. Each target have to select SUPPORTS_BIG_ENDIAN and/or SUPPORTS_LITTLE_ENDIAN to indicate which endianess is supported. Signed-off-by: Daniel Schwierzeck --- arch/mips/Kconfig | 38 +++++++++++++++++++++++++ configs/dbau1000_defconfig | 1 + configs/dbau1100_defconfig | 1 + configs/dbau1500_defconfig | 1 + configs/dbau1550_defconfig | 1 + configs/dbau1550_el_defconfig | 3 +- configs/malta_defconfig | 2 +- configs/maltael_defconfig | 2 +- configs/pb1000_defconfig | 1 + configs/qemu_mips64_defconfig | 2 +- configs/qemu_mips64el_defconfig | 2 +- configs/qemu_mips_defconfig | 2 +- configs/qemu_mipsel_defconfig | 2 +- configs/vct_platinum_defconfig | 1 + configs/vct_platinum_onenand_defconfig | 1 + configs/vct_platinum_onenand_small_defconfig | 1 + configs/vct_platinum_small_defconfig | 1 + configs/vct_platinumavc_defconfig | 1 + configs/vct_platinumavc_onenand_defconfig | 1 + configs/vct_platinumavc_onenand_small_defconfig | 1 + configs/vct_platinumavc_small_defconfig | 1 + configs/vct_premium_defconfig | 1 + configs/vct_premium_onenand_defconfig | 1 + configs/vct_premium_onenand_small_defconfig | 1 + configs/vct_premium_small_defconfig | 1 + 25 files changed, 63 insertions(+), 7 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 9b72bab..b8f9741 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -12,21 +12,31 @@ choice config TARGET_QEMU_MIPS bool "Support qemu-mips" + select SUPPORTS_BIG_ENDIAN + select SUPPORTS_LITTLE_ENDIAN config TARGET_MALTA bool "Support malta" + select SUPPORTS_BIG_ENDIAN + select SUPPORTS_LITTLE_ENDIAN config TARGET_VCT bool "Support vct" + select SUPPORTS_BIG_ENDIAN config TARGET_DBAU1X00 bool "Support dbau1x00" + select SUPPORTS_BIG_ENDIAN + select SUPPORTS_LITTLE_ENDIAN config TARGET_PB1X00 bool "Support pb1x00" + select SUPPORTS_BIG_ENDIAN config TARGET_QEMU_MIPS64 bool "Support qemu-mips64" + select SUPPORTS_BIG_ENDIAN + select SUPPORTS_LITTLE_ENDIAN endchoice @@ -36,4 +46,32 @@ source "board/micronas/vct/Kconfig" source "board/pb1x00/Kconfig" source "board/qemu-mips/Kconfig" +if MIPS + +choice + prompt "Endianness selection" + help + Some MIPS boards can be configured for either little or big endian + byte order. These modes require different U-Boot images. In general there + is one preferred byteorder for a particular system but some systems are + just as commonly used in the one or the other endianness. + +config SYS_BIG_ENDIAN + bool "Big endian" + depends on SUPPORTS_BIG_ENDIAN + +config SYS_LITTLE_ENDIAN + bool "Little endian" + depends on SUPPORTS_LITTLE_ENDIAN + +endchoice + +config SUPPORTS_BIG_ENDIAN + bool + +config SUPPORTS_LITTLE_ENDIAN + bool + +endif + endmenu diff --git a/configs/dbau1000_defconfig b/configs/dbau1000_defconfig index 7c95629..aa4d338 100644 --- a/configs/dbau1000_defconfig +++ b/configs/dbau1000_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="DBAU1000" CONFIG_MIPS=y CONFIG_TARGET_DBAU1X00=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/dbau1100_defconfig b/configs/dbau1100_defconfig index 506f5da..db6f98e 100644 --- a/configs/dbau1100_defconfig +++ b/configs/dbau1100_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="DBAU1100" CONFIG_MIPS=y CONFIG_TARGET_DBAU1X00=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/dbau1500_defconfig b/configs/dbau1500_defconfig index 5a02a78..d2fbff9 100644 --- a/configs/dbau1500_defconfig +++ b/configs/dbau1500_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="DBAU1500" CONFIG_MIPS=y CONFIG_TARGET_DBAU1X00=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/dbau1550_defconfig b/configs/dbau1550_defconfig index 9015023..3142391 100644 --- a/configs/dbau1550_defconfig +++ b/configs/dbau1550_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="DBAU1550" CONFIG_MIPS=y CONFIG_TARGET_DBAU1X00=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/dbau1550_el_defconfig b/configs/dbau1550_el_defconfig index 53b35ce..514f227 100644 --- a/configs/dbau1550_el_defconfig +++ b/configs/dbau1550_el_defconfig @@ -1,3 +1,4 @@ -CONFIG_SYS_EXTRA_OPTIONS="DBAU1550,SYS_LITTLE_ENDIAN" +CONFIG_SYS_EXTRA_OPTIONS="DBAU1550" CONFIG_MIPS=y CONFIG_TARGET_DBAU1X00=y +CONFIG_SYS_LITTLE_ENDIAN=y diff --git a/configs/malta_defconfig b/configs/malta_defconfig index f3788b6..5a178a7 100644 --- a/configs/malta_defconfig +++ b/configs/malta_defconfig @@ -1,3 +1,3 @@ -CONFIG_SYS_EXTRA_OPTIONS="SYS_BIG_ENDIAN" CONFIG_MIPS=y CONFIG_TARGET_MALTA=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/maltael_defconfig b/configs/maltael_defconfig index 97d0e89..011525f 100644 --- a/configs/maltael_defconfig +++ b/configs/maltael_defconfig @@ -1,3 +1,3 @@ -CONFIG_SYS_EXTRA_OPTIONS="SYS_LITTLE_ENDIAN" CONFIG_MIPS=y CONFIG_TARGET_MALTA=y +CONFIG_SYS_LITTLE_ENDIAN=y diff --git a/configs/pb1000_defconfig b/configs/pb1000_defconfig index e226358..7d9509b 100644 --- a/configs/pb1000_defconfig +++ b/configs/pb1000_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="PB1000" CONFIG_MIPS=y CONFIG_TARGET_PB1X00=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/qemu_mips64_defconfig b/configs/qemu_mips64_defconfig index 2948355..36897b9 100644 --- a/configs/qemu_mips64_defconfig +++ b/configs/qemu_mips64_defconfig @@ -1,3 +1,3 @@ -CONFIG_SYS_EXTRA_OPTIONS="SYS_BIG_ENDIAN" CONFIG_MIPS=y CONFIG_TARGET_QEMU_MIPS64=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/qemu_mips64el_defconfig b/configs/qemu_mips64el_defconfig index 13a039f..70d226a 100644 --- a/configs/qemu_mips64el_defconfig +++ b/configs/qemu_mips64el_defconfig @@ -1,3 +1,3 @@ -CONFIG_SYS_EXTRA_OPTIONS="SYS_LITTLE_ENDIAN" CONFIG_MIPS=y CONFIG_TARGET_QEMU_MIPS64=y +CONFIG_SYS_LITTLE_ENDIAN=y diff --git a/configs/qemu_mips_defconfig b/configs/qemu_mips_defconfig index 6b2c029..0a385af 100644 --- a/configs/qemu_mips_defconfig +++ b/configs/qemu_mips_defconfig @@ -1,3 +1,3 @@ -CONFIG_SYS_EXTRA_OPTIONS="SYS_BIG_ENDIAN" CONFIG_MIPS=y CONFIG_TARGET_QEMU_MIPS=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/qemu_mipsel_defconfig b/configs/qemu_mipsel_defconfig index 57c8701..d0acb28 100644 --- a/configs/qemu_mipsel_defconfig +++ b/configs/qemu_mipsel_defconfig @@ -1,3 +1,3 @@ -CONFIG_SYS_EXTRA_OPTIONS="SYS_LITTLE_ENDIAN" CONFIG_MIPS=y CONFIG_TARGET_QEMU_MIPS=y +CONFIG_SYS_LITTLE_ENDIAN=y diff --git a/configs/vct_platinum_defconfig b/configs/vct_platinum_defconfig index 9ff8b68..85584e3 100644 --- a/configs/vct_platinum_defconfig +++ b/configs/vct_platinum_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUM" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/vct_platinum_onenand_defconfig b/configs/vct_platinum_onenand_defconfig index f33c97d..0ba7ae6 100644 --- a/configs/vct_platinum_onenand_defconfig +++ b/configs/vct_platinum_onenand_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUM,VCT_ONENAND" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/vct_platinum_onenand_small_defconfig b/configs/vct_platinum_onenand_small_defconfig index 58c7995..d70a979 100644 --- a/configs/vct_platinum_onenand_small_defconfig +++ b/configs/vct_platinum_onenand_small_defconfig @@ -1,4 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUM,VCT_ONENAND,VCT_SMALL_IMAGE" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y # CONFIG_CMD_CRC32 is not set diff --git a/configs/vct_platinum_small_defconfig b/configs/vct_platinum_small_defconfig index f4f56c4..ab5c2e1 100644 --- a/configs/vct_platinum_small_defconfig +++ b/configs/vct_platinum_small_defconfig @@ -1,4 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUM,VCT_SMALL_IMAGE" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y # CONFIG_CMD_CRC32 is not set diff --git a/configs/vct_platinumavc_defconfig b/configs/vct_platinumavc_defconfig index 8aaac56..691325d 100644 --- a/configs/vct_platinumavc_defconfig +++ b/configs/vct_platinumavc_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUMAVC" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/vct_platinumavc_onenand_defconfig b/configs/vct_platinumavc_onenand_defconfig index 926c6e4..1e0c399 100644 --- a/configs/vct_platinumavc_onenand_defconfig +++ b/configs/vct_platinumavc_onenand_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUMAVC,VCT_ONENAND" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/vct_platinumavc_onenand_small_defconfig b/configs/vct_platinumavc_onenand_small_defconfig index 31b4c9a..f254ab6 100644 --- a/configs/vct_platinumavc_onenand_small_defconfig +++ b/configs/vct_platinumavc_onenand_small_defconfig @@ -1,4 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUMAVC,VCT_ONENAND,VCT_SMALL_IMAGE" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y # CONFIG_CMD_CRC32 is not set diff --git a/configs/vct_platinumavc_small_defconfig b/configs/vct_platinumavc_small_defconfig index 23f6561..83670ed 100644 --- a/configs/vct_platinumavc_small_defconfig +++ b/configs/vct_platinumavc_small_defconfig @@ -1,4 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PLATINUMAVC,VCT_SMALL_IMAGE" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y # CONFIG_CMD_CRC32 is not set diff --git a/configs/vct_premium_defconfig b/configs/vct_premium_defconfig index 0e16ff9..24bf87e 100644 --- a/configs/vct_premium_defconfig +++ b/configs/vct_premium_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PREMIUM" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/vct_premium_onenand_defconfig b/configs/vct_premium_onenand_defconfig index 29734b8..0039ec1 100644 --- a/configs/vct_premium_onenand_defconfig +++ b/configs/vct_premium_onenand_defconfig @@ -1,3 +1,4 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PREMIUM,VCT_ONENAND" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y diff --git a/configs/vct_premium_onenand_small_defconfig b/configs/vct_premium_onenand_small_defconfig index 354793e..8fc6ac1 100644 --- a/configs/vct_premium_onenand_small_defconfig +++ b/configs/vct_premium_onenand_small_defconfig @@ -1,4 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PREMIUM,VCT_ONENAND,VCT_SMALL_IMAGE" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y # CONFIG_CMD_CRC32 is not set diff --git a/configs/vct_premium_small_defconfig b/configs/vct_premium_small_defconfig index a23ddb7..96bb0ee 100644 --- a/configs/vct_premium_small_defconfig +++ b/configs/vct_premium_small_defconfig @@ -1,4 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="VCT_PREMIUM,VCT_SMALL_IMAGE" CONFIG_MIPS=y CONFIG_TARGET_VCT=y +CONFIG_SYS_BIG_ENDIAN=y # CONFIG_CMD_CRC32 is not set