summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-11-08 13:25:20 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-11-09 08:35:02 +0100
commit451e41eb6da976a8d6fcaf231945334d80e4c905 (patch)
tree66c1cc1da60a5641d85d6fb40932a3a929ce57fb
parentcbb2cd3e03c5b684116fccd1c30f86e07981fc59 (diff)
tegras: update git hash of Linux kernel and revert bch ecc
Update git hash of the Linux kenrel to latest from 2.8b4 release and revert BCH ECC configuration again. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--recipes-kernel/linux/files/0001-Revert-colibri_t20-initial-16-bit-BCH-ECC-support.patch192
-rw-r--r--recipes-kernel/linux/linux-toradex_git.bb13
2 files changed, 201 insertions, 4 deletions
diff --git a/recipes-kernel/linux/files/0001-Revert-colibri_t20-initial-16-bit-BCH-ECC-support.patch b/recipes-kernel/linux/files/0001-Revert-colibri_t20-initial-16-bit-BCH-ECC-support.patch
new file mode 100644
index 0000000..b823fff
--- /dev/null
+++ b/recipes-kernel/linux/files/0001-Revert-colibri_t20-initial-16-bit-BCH-ECC-support.patch
@@ -0,0 +1,192 @@
+From 96342c6c5d642c5fc762e73aac1b916aaeee017b Mon Sep 17 00:00:00 2001
+From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Date: Thu, 8 Nov 2018 13:05:42 +0100
+Subject: [PATCH] Revert "colibri_t20: initial 16-bit BCH ECC support"
+
+This reverts commit 834b98d0367931d6bec5a48fe87fddd9b877f688.
+
+For compatibility with BSP V2.3 which still uses RS4 ECC.
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+---
+
+ arch/arm/configs/colibri_t20_android_defconfig | 3 ++-
+ arch/arm/configs/colibri_t20_defconfig | 3 ++-
+ drivers/mtd/devices/tegra_nand.c | 16 +++++-----------
+ drivers/mtd/devices/tegra_nand.h | 7 -------
+ 4 files changed, 9 insertions(+), 20 deletions(-)
+
+diff --git a/arch/arm/configs/colibri_t20_android_defconfig b/arch/arm/configs/colibri_t20_android_defconfig
+index 09780945a35a..eebe621e7f84 100644
+--- a/arch/arm/configs/colibri_t20_android_defconfig
++++ b/arch/arm/configs/colibri_t20_android_defconfig
+@@ -186,7 +186,6 @@ CONFIG_MTD_BLOCK=y
+ CONFIG_MTD_NAND_TEGRA=y
+ CONFIG_MTD_NAND=y
+ CONFIG_MTD_UBI=y
+-CONFIG_MTD_UBI_FASTMAP=y
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_MISC_DEVICES=y
+ CONFIG_UID_STAT=y
+@@ -367,6 +366,8 @@ CONFIG_VFAT_FS=y
+ CONFIG_NTFS_FS=y
+ CONFIG_TMPFS=y
+ CONFIG_TMPFS_POSIX_ACL=y
++CONFIG_YAFFS_FS=y
++CONFIG_YAFFS_DISABLE_TAGS_ECC=y
+ CONFIG_UBIFS_FS=y
+ CONFIG_NFS_FS=y
+ CONFIG_NFS_V3=y
+diff --git a/arch/arm/configs/colibri_t20_defconfig b/arch/arm/configs/colibri_t20_defconfig
+index 552c34ee42b8..dc0133d7223d 100644
+--- a/arch/arm/configs/colibri_t20_defconfig
++++ b/arch/arm/configs/colibri_t20_defconfig
+@@ -152,7 +152,6 @@ CONFIG_MTD_BLOCK=y
+ CONFIG_MTD_NAND_TEGRA=y
+ CONFIG_MTD_NAND=y
+ CONFIG_MTD_UBI=y
+-CONFIG_MTD_UBI_FASTMAP=y
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_MISC_DEVICES=y
+ CONFIG_UID_STAT=y
+@@ -325,6 +324,8 @@ CONFIG_FUSE_FS=y
+ CONFIG_CUSE=y
+ CONFIG_VFAT_FS=y
+ CONFIG_TMPFS=y
++CONFIG_YAFFS_FS=y
++CONFIG_YAFFS_DISABLE_TAGS_ECC=y
+ CONFIG_UBIFS_FS=y
+ CONFIG_NFS_FS=y
+ CONFIG_NFS_V3=y
+diff --git a/drivers/mtd/devices/tegra_nand.c b/drivers/mtd/devices/tegra_nand.c
+index 0a9edfdb8ba2..6034f0b2f239 100644
+--- a/drivers/mtd/devices/tegra_nand.c
++++ b/drivers/mtd/devices/tegra_nand.c
+@@ -121,7 +121,6 @@ struct tegra_nand_info {
+ uint32_t command_reg;
+ uint32_t config_reg;
+ uint32_t dmactrl_reg;
+- uint32_t bch_config_reg;
+
+ struct completion cmd_complete;
+ struct completion dma_complete;
+@@ -234,7 +233,6 @@ static struct {
+ REG_NAME(DEC_STATUS_REG),
+ REG_NAME(HWSTATUS_CMD_REG),
+ REG_NAME(HWSTATUS_MASK_REG),
+- REG_NAME(BCH_CONFIG_REG),
+ {0, NULL},
+ };
+
+@@ -394,7 +392,6 @@ static void tegra_nand_prep_readid(struct tegra_nand_info *info)
+ writel(0, ADDR_REG1);
+ writel(0, ADDR_REG2);
+ writel(0, CONFIG_REG);
+- writel(0, BCH_CONFIG_REG);
+ }
+
+ static int
+@@ -454,7 +451,6 @@ static int tegra_nand_cmd_reset(struct tegra_nand_info *info,
+ writel(0, ADDR_REG1);
+ writel(0, ADDR_REG2);
+ writel(0, CONFIG_REG);
+- writel(0, BCH_CONFIG_REG);
+
+ err = tegra_nand_go(info);
+ if (err != 0)
+@@ -793,7 +789,6 @@ static inline void clear_regs(struct tegra_nand_info *info)
+ info->command_reg = 0;
+ info->config_reg = 0;
+ info->dmactrl_reg = 0;
+- info->bch_config_reg = 0;
+ }
+
+ static void
+@@ -825,7 +820,7 @@ prep_transfer_dma(struct tegra_nand_info *info, int rx, int do_ecc,
+
+ if (rx) {
+ if (do_ecc)
+- info->bch_config_reg |= (BCH_CONFIG_BCH_TVALUE(3) | BCH_CONFIG_BCH_ECC);
++ info->config_reg |= CONFIG_HW_ERR_CORRECTION;
+ info->command_reg |= COMMAND_RX;
+ info->dmactrl_reg |= DMA_CTRL_REUSE_BUFFER;
+ writel(NAND_CMD_READ0, CMD_REG1);
+@@ -838,8 +833,10 @@ prep_transfer_dma(struct tegra_nand_info *info, int rx, int do_ecc,
+ }
+
+ if (data_len) {
++ if (do_ecc)
++ info->config_reg |= CONFIG_HW_ECC | CONFIG_ECC_SEL;
+ info->config_reg |=
+- CONFIG_PAGE_SIZE_SEL(page_size_sel) |
++ CONFIG_PAGE_SIZE_SEL(page_size_sel) | CONFIG_TVALUE(0) |
+ CONFIG_SKIP_SPARE | CONFIG_SKIP_SPARE_SEL(0);
+ info->command_reg |= COMMAND_A_VALID;
+ info->dmactrl_reg |= DMA_CTRL_DMA_EN_A;
+@@ -860,6 +857,7 @@ prep_transfer_dma(struct tegra_nand_info *info, int rx, int do_ecc,
+ tag_sz += 4; /* size of tag ecc */
+ if (rx)
+ oob_len += 4; /* size of tag ecc */
++ info->config_reg |= CONFIG_ECC_EN_TAG;
+ }
+ if (data_len && rx)
+ oob_len += 4; /* num of skipped bytes */
+@@ -1041,7 +1039,6 @@ do_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
+ datbuf_dma_addr, a_len, info->oob_dma_addr,
+ b_len);
+ writel(info->config_reg, CONFIG_REG);
+- writel(info->bch_config_reg, BCH_CONFIG_REG);
+ writel(info->dmactrl_reg, DMA_MST_CTRL_REG);
+
+ INIT_COMPLETION(info->dma_complete);
+@@ -1245,7 +1242,6 @@ do_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops)
+ b_len);
+
+ writel(info->config_reg, CONFIG_REG);
+- writel(info->bch_config_reg, BCH_CONFIG_REG);
+ writel(info->dmactrl_reg, DMA_MST_CTRL_REG);
+
+ INIT_COMPLETION(info->dma_complete);
+@@ -1378,7 +1374,6 @@ static void tegra_nand_resume(struct mtd_info *mtd)
+ IER_ECC_ERR | IER_GIE);
+
+ writel(0, CONFIG_REG);
+- writel(0, BCH_CONFIG_REG);
+
+ set_chip_timing(info, info->vendor_id,
+ info->device_id, info->dev_parms);
+@@ -1432,7 +1427,6 @@ static int tegra_nand_scan(struct mtd_info *mtd, int maxchips)
+ writel(SCAN_TIMING_VAL, TIMING_REG);
+ writel(SCAN_TIMING2_VAL, TIMING2_REG);
+ writel(0, CONFIG_REG);
+- writel(0, BCH_CONFIG_REG);
+
+ select_chip(info, 0);
+
+diff --git a/drivers/mtd/devices/tegra_nand.h b/drivers/mtd/devices/tegra_nand.h
+index 64d66381f8b1..339d6cc7330c 100644
+--- a/drivers/mtd/devices/tegra_nand.h
++++ b/drivers/mtd/devices/tegra_nand.h
+@@ -56,9 +56,6 @@
+ #define LL_CONFIG_REG (TEGRA_NAND_BASE + 0x58)
+ #define LL_PTR_REG (TEGRA_NAND_BASE + 0x5c)
+ #define LL_STATUS_REG (TEGRA_NAND_BASE + 0x60)
+-#define BCH_CONFIG_REG (TEGRA_NAND_BASE + 0xcc)
+-#define BCH_DEC_RESULT_REG (TEGRA_NAND_BASE + 0xd0)
+-#define BCH_DEC_STATUS_BUF_REG (TEGRA_NAND_BASE + 0xd4)
+
+ /* nand_command bits */
+ #define COMMAND_GO REG_BIT(31)
+@@ -147,9 +144,5 @@
+ #define HWSTATUS_RBSY_MASK(val) REG_FIELD((val), 8, 8)
+ #define HWSTATUS_RBSY_EXP_VAL(val) REG_FIELD((val), 0, 8)
+
+-/* nand bch config bits */
+-#define BCH_CONFIG_BCH_TVALUE(val) REG_FIELD((val), 4, 2)
+-#define BCH_CONFIG_BCH_ECC REG_BIT(0)
+-
+ #endif
+
+--
+2.14.5
+
diff --git a/recipes-kernel/linux/linux-toradex_git.bb b/recipes-kernel/linux/linux-toradex_git.bb
index af258ba..cb26fe1 100644
--- a/recipes-kernel/linux/linux-toradex_git.bb
+++ b/recipes-kernel/linux/linux-toradex_git.bb
@@ -3,19 +3,24 @@ require recipes-kernel/linux/linux-toradex.inc
LINUX_VERSION ?= "3.1.10"
-SRCREV_colibri-t20 = "e797e34a3f7cb82c4e5b249a525c9e857ac6eebd"
+SRCREV_colibri-t20 = "4f04efd8590618827d15c41dabfe7e31bb0b8ac4"
PR_colibri-t20 = "V2.3"
-SRCREV_colibri-t30 = "e797e34a3f7cb82c4e5b249a525c9e857ac6eebd"
+SRCREV_colibri-t30 = "4f04efd8590618827d15c41dabfe7e31bb0b8ac4"
PR_colibri-t30 = "V2.3"
-SRCREV_apalis-t30 = "e797e34a3f7cb82c4e5b249a525c9e857ac6eebd"
+SRCREV_apalis-t30 = "4f04efd8590618827d15c41dabfe7e31bb0b8ac4"
PR_apalis-t30 = "V2.3"
SRCREV_colibri-pxa = "a699c4f23852bad780b8ad5273d5a3171cd461f9"
PR_colibri-pxa = "V2.3a1"
PV = "${LINUX_VERSION}+gitr${SRCREV}"
S = "${WORKDIR}/git"
-SRC_URI = "git://git.toradex.com/linux-toradex.git;protocol=git;branch=tegra"
+SRC_URI = " \
+ git://git.toradex.com/linux-toradex.git;protocol=git;branch=tegra \
+ "
+SRC_URI_append_colibri-t20 = " \
+ file://0001-Revert-colibri_t20-initial-16-bit-BCH-ECC-support.patch \
+ "
COMPATIBLE_MACHINE = "(colibri-t20|colibri-t30|apalis-t30|colibri-pxa)"