source: trunk/target/linux/amazon/patches-3.3/160-cfi-swap.patch @ 31706

Last change on this file since 31706 was 31706, checked in by hauke, 5 years ago

amazon: update amazon target to kernel 3.3

This is just compile tested, my device is currently not working.

File size: 1.4 KB
  • drivers/mtd/chips/cfi_cmdset_0002.c

    a b static int __xipram do_write_oneword(str 
    11521152        int retry_cnt = 0; 
    11531153 
    11541154        adr += chip->start; 
     1155#ifdef CONFIG_AMAZON 
     1156        adr ^= 2; 
     1157#endif 
    11551158 
    11561159        mutex_lock(&chip->mutex); 
    11571160        ret = get_chip(map, chip, adr, FL_WRITING); 
    static int __xipram do_write_buffer(stru 
    14201423        z = 0; 
    14211424        while(z < words * map_bankwidth(map)) { 
    14221425                datum = map_word_load(map, buf); 
     1426#ifdef CONFIG_AMAZON 
     1427                map_write(map, datum, (adr + z) ^ 0x2); 
     1428#else 
    14231429                map_write(map, datum, adr + z); 
     1430#endif 
    14241431 
    14251432                z += map_bankwidth(map); 
    14261433                buf += map_bankwidth(map); 
    static int __xipram do_erase_oneblock(st 
    16651672        int ret = 0; 
    16661673 
    16671674        adr += chip->start; 
     1675#ifdef CONFIG_AMAZON 
     1676        adr ^= 2; 
     1677#endif 
    16681678 
    16691679        mutex_lock(&chip->mutex); 
    16701680        ret = get_chip(map, chip, adr, FL_ERASING); 
    static int do_atmel_lock(struct map_info 
    17931803        struct cfi_private *cfi = map->fldrv_priv; 
    17941804        int ret; 
    17951805 
     1806#ifdef CONFIG_AMAZON 
     1807        adr ^= 2; 
     1808#endif 
     1809 
    17961810        mutex_lock(&chip->mutex); 
    17971811        ret = get_chip(map, chip, adr + chip->start, FL_LOCKING); 
    17981812        if (ret) 
    static int do_atmel_unlock(struct map_in 
    18281842        struct cfi_private *cfi = map->fldrv_priv; 
    18291843        int ret; 
    18301844 
     1845#ifdef CONFIG_AMAZON 
     1846        adr ^= 2; 
     1847#endif 
     1848 
    18311849        mutex_lock(&chip->mutex); 
    18321850        ret = get_chip(map, chip, adr + chip->start, FL_UNLOCKING); 
    18331851        if (ret) 
Note: See TracBrowser for help on using the repository browser.