Ignore:
Timestamp:
Jan 24, 2021, 8:40:08 AM (5 years ago)
Author:
Paul Smedley
Message:

Update regmap & regcache to 5.10.10 kernel code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/lib32/regcache.c

    r625 r652  
    1 /*
    2  * Register cache access API
    3  *
    4  * Copyright 2011 Wolfson Microelectronics plc
    5  *
    6  * Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
    7  *
    8  * This program is free software; you can redistribute it and/or modify
    9  * it under the terms of the GNU General Public License version 2 as
    10  * published by the Free Software Foundation.
    11  */
    12 /* from 4.19.163 */
     1// SPDX-License-Identifier: GPL-2.0
     2//
     3// Register cache access API
     4//
     5// Copyright 2011 Wolfson Microelectronics plc
     6//
     7// Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
     8
     9/* from 5.10.10 */
    1310
    1411//#include <linux/bsearch.h>
     
    253250                ret = map->cache_ops->read(map, reg, value);
    254251
     252#ifndef TARGET_OS2
     253                if (ret == 0)
     254                        trace_regmap_reg_read_cache(map, reg, *value);
     255#endif
    255256                return ret;
    256257        }
     
    358359                map->cache_ops->name);
    359360        name = map->cache_ops->name;
    360 
     361#ifndef TARGET_OS2
     362        trace_regcache_sync(map, name, "start");
     363#endif
    361364        if (!map->cache_dirty)
    362365                goto out;
     
    393396        regmap_async_complete(map);
    394397
     398#ifndef TARGET_OS2
     399        trace_regcache_sync(map, name, "stop");
     400#endif
    395401        return ret;
    396402}
     
    426432        dev_dbg(map->dev, "Syncing %s cache from %d-%d\n", name, min, max);
    427433
     434#ifndef TARGET_OS2
     435        trace_regcache_sync(map, name, "start region");
     436#endif
    428437        if (!map->cache_dirty)
    429438                goto out;
     
    445454        regmap_async_complete(map);
    446455
     456#ifndef TARGET_OS2
     457        trace_regcache_sync(map, name, "stop region");
     458#endif
    447459        return ret;
    448460}
     
    470482        map->lock(map->lock_arg);
    471483
     484#ifndef TARGET_OS2
     485        trace_regcache_drop_region(map, min, max);
     486#endif
    472487        ret = map->cache_ops->drop(map, min, max);
    473488
     
    495510        WARN_ON(map->cache_bypass && enable);
    496511        map->cache_only = enable;
     512#ifndef TARGET_OS2
     513        trace_regmap_cache_only(map, enable);
     514#endif
    497515        map->unlock(map->lock_arg);
    498516}
     
    537555        WARN_ON(map->cache_only && enable);
    538556        map->cache_bypass = enable;
     557#ifndef TARGET_OS2
     558        trace_regmap_cache_bypass(map, enable);
     559#endif
    539560        map->unlock(map->lock_arg);
    540561}
     
    713734        map->cache_bypass = true;
    714735
    715         ret = _regmap_raw_write(map, base, *data, count * val_bytes);
     736        ret = _regmap_raw_write(map, base, *data, count * val_bytes, false);
    716737        if (ret)
    717738                dev_err(map->dev, "Unable to sync registers %#x-%#x. %d\n",
Note: See TracChangeset for help on using the changeset viewer.