Ilya Yanok | 2ebbb86 | 2012-11-06 13:06:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2004-2008 Texas Instruments, <www.ti.com> |
| 3 | * Rohit Choraria <rohitkc@ti.com> |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Ilya Yanok | 2ebbb86 | 2012-11-06 13:06:30 +0000 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __ASM_ARCH_OMAP_GPMC_H |
| 8 | #define __ASM_ARCH_OMAP_GPMC_H |
| 9 | |
Andreas Bießmann | 9a48c5c | 2013-04-02 06:05:54 +0000 | [diff] [blame] | 10 | /* These GPMC_NAND_HW_BCHx_ECC_LAYOUT defines are based on AM33xx ELM */ |
Ilya Yanok | 2ebbb86 | 2012-11-06 13:06:30 +0000 | [diff] [blame] | 11 | #define GPMC_NAND_HW_BCH4_ECC_LAYOUT {\ |
| 12 | .eccbytes = 32,\ |
| 13 | .eccpos = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\ |
| 14 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\ |
| 15 | 28, 29, 30, 31, 32, 33},\ |
| 16 | .oobfree = {\ |
| 17 | {.offset = 34,\ |
| 18 | .length = 30 } } \ |
| 19 | } |
| 20 | |
| 21 | #define GPMC_NAND_HW_BCH8_ECC_LAYOUT {\ |
| 22 | .eccbytes = 56,\ |
| 23 | .eccpos = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\ |
| 24 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\ |
| 25 | 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,\ |
| 26 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\ |
| 27 | 52, 53, 54, 55, 56, 57},\ |
| 28 | .oobfree = {\ |
| 29 | {.offset = 58,\ |
| 30 | .length = 6 } } \ |
| 31 | } |
| 32 | |
| 33 | #define GPMC_NAND_HW_BCH16_ECC_LAYOUT {\ |
| 34 | .eccbytes = 104,\ |
| 35 | .eccpos = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\ |
| 36 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\ |
| 37 | 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,\ |
| 38 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\ |
| 39 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\ |
| 40 | 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,\ |
| 41 | 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,\ |
| 42 | 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,\ |
| 43 | 100, 101, 102, 103, 104, 105},\ |
| 44 | .oobfree = {\ |
| 45 | {.offset = 106,\ |
| 46 | .length = 8 } } \ |
| 47 | } |
| 48 | #endif /* __ASM_ARCH_OMAP_GPMC_H */ |