diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-06-08 09:14:19 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-06-08 09:14:19 +0200 |
commit | 5ed28948a3ffe6c735386e59c132989869beaa3e (patch) | |
tree | cbb940a4fa90b89abdd57d6b13d64351cfce839c /include/linux/mtd/omap_elm.h | |
parent | e6607cffef965011ef0ddc0fbe6f4b7c0d53aeec (diff) | |
parent | 83bad1026b9e3a4f6b7783cc1cbb434c1bbd3fa2 (diff) |
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Diffstat (limited to 'include/linux/mtd/omap_elm.h')
-rw-r--r-- | include/linux/mtd/omap_elm.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/mtd/omap_elm.h b/include/linux/mtd/omap_elm.h index 45454eaf0f1..b8096b02e37 100644 --- a/include/linux/mtd/omap_elm.h +++ b/include/linux/mtd/omap_elm.h @@ -24,6 +24,9 @@ #define ELM_LOCATION_STATUS_ECC_CORRECTABLE_MASK (0x100) #define ELM_LOCATION_STATUS_ECC_NB_ERRORS_MASK (0x1F) +#define ELM_MAX_CHANNELS 8 +#define ELM_MAX_ERROR_COUNT 16 + #ifndef __ASSEMBLY__ enum bch_level { @@ -43,7 +46,7 @@ struct syndrome { struct location { u32 location_status; /* 0x800 */ u8 res1[124]; /* 0x804 */ - u32 error_location_x[16]; /* 0x880.... */ + u32 error_location_x[ELM_MAX_ERROR_COUNT]; /* 0x880, 0x980, .. */ u8 res2[64]; /* 0x8c0 */ }; @@ -63,12 +66,12 @@ struct elm { u8 res2[92]; /* 0x024 */ u32 page_ctrl; /* 0x080 */ u8 res3[892]; /* 0x084 */ - struct syndrome syndrome_fragments[8]; /* 0x400 */ + struct syndrome syndrome_fragments[ELM_MAX_CHANNELS]; /* 0x400,0x420 */ u8 res4[512]; /* 0x600 */ - struct location error_location[8]; /* 0x800 */ + struct location error_location[ELM_MAX_CHANNELS]; /* 0x800,0x900 ... */ }; -int elm_check_error(u8 *syndrome, u32 nibbles, u32 *error_count, +int elm_check_error(u8 *syndrome, enum bch_level bch_type, u32 *error_count, u32 *error_locations); int elm_config(enum bch_level level); void elm_reset(void); |