Skip to content
Snippets Groups Projects
Commit 2dcb1c53 authored by Huang Shijie's avatar Huang Shijie
Browse files

ENGR00231581 BCH: fix the wrong data size macros in BCH


In the mx23/mx28, the DATA0_SIZE/DATAN_SIZE of the BCH's
HW_BCH_FLASH1LAYOUT0/HW_BCH_FLASH0LAYOUT1 should be the real
bytes length of the data chunk 0 and data chunk 1.

But in the mx6q/mx50, the DATA0_SIZE/DATAN_SIZE of the BCH's
HW_BCH_FLASH1LAYOUT0/HW_BCH_FLASH0LAYOUT1 should be multiple of 4 bytes.

this patch fixes the wrong macros.

Signed-off-by: default avatarHuang Shijie <b32955@freescale.com>
parent 07a5dcee
No related branches found
Tags imx-android-13.5.0-ga
No related merge requests found
/* /*
* Freescale BCH Register Definitions * Freescale BCH Register Definitions
* *
* Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. * Copyright 2008-2012 Freescale Semiconductor, Inc. All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -238,13 +238,16 @@ ...@@ -238,13 +238,16 @@
#define BV_BCH_FLASH0LAYOUT0_ECC0__ECC32 0x10 #define BV_BCH_FLASH0LAYOUT0_ECC0__ECC32 0x10
#define BM_BCH_FLASH0LAYOUT0_GF13_0_GF14_1 0x00000400 #define BM_BCH_FLASH0LAYOUT0_GF13_0_GF14_1 0x00000400
#define BP_BCH_FLASH0LAYOUT0_DATA0_SIZE 0 #define BP_BCH_FLASH0LAYOUT0_DATA0_SIZE 0
#if defined(CONFIG_GPMI_NFC_V2) #if defined(CONFIG_GPMI_NFC_V2)
#define BM_BCH_FLASH0LAYOUT0_DATA0_SIZE 0x000003FF #define BM_BCH_FLASH0LAYOUT0_DATA0_SIZE 0x000003FF
#define BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(v) \
(((v) >> 2) & BM_BCH_FLASH0LAYOUT0_DATA0_SIZE)
#else #else
#define BM_BCH_FLASH0LAYOUT0_DATA0_SIZE 0x00000FFF #define BM_BCH_FLASH0LAYOUT0_DATA0_SIZE 0x00000FFF
#endif
#define BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(v) \ #define BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(v) \
(((v) << 0) & BM_BCH_FLASH0LAYOUT0_DATA0_SIZE) (((v) << 0) & BM_BCH_FLASH0LAYOUT0_DATA0_SIZE)
#endif
#define HW_BCH_FLASH0LAYOUT1 (0x00000090) #define HW_BCH_FLASH0LAYOUT1 (0x00000090)
...@@ -284,11 +287,13 @@ ...@@ -284,11 +287,13 @@
#define BP_BCH_FLASH0LAYOUT1_DATAN_SIZE 0 #define BP_BCH_FLASH0LAYOUT1_DATAN_SIZE 0
#if defined(CONFIG_GPMI_NFC_V2) #if defined(CONFIG_GPMI_NFC_V2)
#define BM_BCH_FLASH0LAYOUT1_DATAN_SIZE 0x000003FF #define BM_BCH_FLASH0LAYOUT1_DATAN_SIZE 0x000003FF
#define BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(v) \
(((v) >> 2) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE)
#else #else
#define BM_BCH_FLASH0LAYOUT1_DATAN_SIZE 0x00000FFF #define BM_BCH_FLASH0LAYOUT1_DATAN_SIZE 0x00000FFF
#endif
#define BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(v) \ #define BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(v) \
(((v) << 0) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) (((v) << 0) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE)
#endif
#define HW_BCH_FLASH1LAYOUT0 (0x000000a0) #define HW_BCH_FLASH1LAYOUT0 (0x000000a0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment