Home
last modified time | relevance | path

Searched refs:map (Results 1 – 25 of 1304) sorted by relevance

12345678910>>...53

/drivers/base/regmap/
Dregcache.c26 static int regcache_hw_init(struct regmap *map) in regcache_hw_init() argument
34 if (!map->num_reg_defaults_raw) in regcache_hw_init()
38 for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) in regcache_hw_init()
39 if (regmap_readable(map, i * map->reg_stride) && in regcache_hw_init()
40 !regmap_volatile(map, i * map->reg_stride)) in regcache_hw_init()
45 map->cache_bypass = true; in regcache_hw_init()
49 map->num_reg_defaults = count; in regcache_hw_init()
50 map->reg_defaults = kmalloc_array(count, sizeof(struct reg_default), in regcache_hw_init()
52 if (!map->reg_defaults) in regcache_hw_init()
55 if (!map->reg_defaults_raw) { in regcache_hw_init()
[all …]
Dregmap.c36 static inline bool regmap_should_log(struct regmap *map) in regmap_should_log() argument
38 return (map->dev && strcmp(dev_name(map->dev), LOG_DEVICE) == 0); in regmap_should_log()
41 static inline bool regmap_should_log(struct regmap *map) { return false; } in regmap_should_log() argument
45 static int _regmap_update_bits(struct regmap *map, unsigned int reg,
74 bool regmap_check_range_table(struct regmap *map, unsigned int reg, in regmap_check_range_table() argument
90 bool regmap_writeable(struct regmap *map, unsigned int reg) in regmap_writeable() argument
92 if (map->max_register && reg > map->max_register) in regmap_writeable()
95 if (map->writeable_reg) in regmap_writeable()
96 return map->writeable_reg(map->dev, reg); in regmap_writeable()
98 if (map->wr_table) in regmap_writeable()
[all …]
Dregmap-debugfs.c19 struct regmap *map; member
38 struct regmap *map = file->private_data; in regmap_name_read_file() local
47 if (map->dev && map->dev->driver) in regmap_name_read_file()
48 name = map->dev->driver->name; in regmap_name_read_file()
67 static void regmap_debugfs_free_dump_cache(struct regmap *map) in regmap_debugfs_free_dump_cache() argument
71 while (!list_empty(&map->debugfs_off_cache)) { in regmap_debugfs_free_dump_cache()
72 c = list_first_entry(&map->debugfs_off_cache, in regmap_debugfs_free_dump_cache()
80 static bool regmap_printable(struct regmap *map, unsigned int reg) in regmap_printable() argument
82 if (regmap_precious(map, reg)) in regmap_printable()
85 if (!regmap_readable(map, reg) && !regmap_cached(map, reg)) in regmap_printable()
[all …]
Dtrace.h18 TP_PROTO(struct regmap *map, unsigned int reg,
21 TP_ARGS(map, reg, val),
24 __string( name, regmap_name(map) )
30 __assign_str(name, regmap_name(map));
40 TP_PROTO(struct regmap *map, unsigned int reg,
43 TP_ARGS(map, reg, val)
48 TP_PROTO(struct regmap *map, unsigned int reg,
51 TP_ARGS(map, reg, val)
56 TP_PROTO(struct regmap *map, unsigned int reg,
59 TP_ARGS(map, reg, val)
[all …]
Dregcache-rbtree.c17 static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
19 static int regcache_rbtree_exit(struct regmap *map);
40 struct regmap *map, in regcache_rbtree_get_base_top_reg() argument
45 *top = rbnode->base_reg + ((rbnode->blklen - 1) * map->reg_stride); in regcache_rbtree_get_base_top_reg()
48 static unsigned int regcache_rbtree_get_register(struct regmap *map, in regcache_rbtree_get_register() argument
51 return regcache_get_val(map, rbnode->block, idx); in regcache_rbtree_get_register()
54 static void regcache_rbtree_set_register(struct regmap *map, in regcache_rbtree_set_register() argument
59 regcache_set_val(map, rbnode->block, idx, val); in regcache_rbtree_set_register()
62 static struct regcache_rbtree_node *regcache_rbtree_lookup(struct regmap *map, in regcache_rbtree_lookup() argument
65 struct regcache_rbtree_ctx *rbtree_ctx = map->cache; in regcache_rbtree_lookup()
[all …]
Dregcache-lzo.c15 static int regcache_lzo_exit(struct regmap *map);
29 static int regcache_lzo_block_count(struct regmap *map) in regcache_lzo_block_count() argument
68 static int regcache_lzo_compress_cache_block(struct regmap *map, in regcache_lzo_compress_cache_block() argument
86 static int regcache_lzo_decompress_cache_block(struct regmap *map, in regcache_lzo_decompress_cache_block() argument
104 static inline int regcache_lzo_get_blkindex(struct regmap *map, in regcache_lzo_get_blkindex() argument
107 return ((reg / map->reg_stride) * map->cache_word_size) / in regcache_lzo_get_blkindex()
108 DIV_ROUND_UP(map->cache_size_raw, in regcache_lzo_get_blkindex()
109 regcache_lzo_block_count(map)); in regcache_lzo_get_blkindex()
112 static inline int regcache_lzo_get_blkpos(struct regmap *map, in regcache_lzo_get_blkpos() argument
115 return (reg / map->reg_stride) % in regcache_lzo_get_blkpos()
[all …]
Dinternal.h36 void (*format_write)(struct regmap *map,
46 struct regmap *map; member
182 int (*init)(struct regmap *map);
183 int (*exit)(struct regmap *map);
185 void (*debugfs_init)(struct regmap *map);
187 int (*read)(struct regmap *map, unsigned int reg, unsigned int *value);
188 int (*write)(struct regmap *map, unsigned int reg, unsigned int value);
189 int (*sync)(struct regmap *map, unsigned int min, unsigned int max);
190 int (*drop)(struct regmap *map, unsigned int min, unsigned int max);
193 bool regmap_cached(struct regmap *map, unsigned int reg);
[all …]
Dregcache-flat.c15 static inline unsigned int regcache_flat_get_index(const struct regmap *map, in regcache_flat_get_index() argument
18 return regcache_get_index_by_order(map, reg); in regcache_flat_get_index()
21 static int regcache_flat_init(struct regmap *map) in regcache_flat_init() argument
26 if (!map || map->reg_stride_order < 0 || !map->max_register) in regcache_flat_init()
29 map->cache = kcalloc(regcache_flat_get_index(map, map->max_register) in regcache_flat_init()
31 if (!map->cache) in regcache_flat_init()
34 cache = map->cache; in regcache_flat_init()
36 for (i = 0; i < map->num_reg_defaults; i++) { in regcache_flat_init()
37 unsigned int reg = map->reg_defaults[i].reg; in regcache_flat_init()
38 unsigned int index = regcache_flat_get_index(map, reg); in regcache_flat_init()
[all …]
/drivers/mtd/maps/
Dpci.c23 int (*init)(struct pci_dev *dev, struct map_pci_info *map);
24 void (*exit)(struct pci_dev *dev, struct map_pci_info *map);
25 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
30 struct map_info map; member
32 void (*exit)(struct pci_dev *dev, struct map_pci_info *map);
33 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
39 struct map_pci_info *map = (struct map_pci_info *)_map; in mtd_pci_read8() local
41 val.x[0]= readb(map->base + map->translate(map, ofs)); in mtd_pci_read8()
47 struct map_pci_info *map = (struct map_pci_info *)_map; in mtd_pci_read32() local
49 val.x[0] = readl(map->base + map->translate(map, ofs)); in mtd_pci_read32()
[all …]
Damd76xrom.c42 struct map_info map; member
71 struct amd76xrom_map_info *map, *scratch; in amd76xrom_cleanup() local
82 list_for_each_entry_safe(map, scratch, &window->maps, list) { in amd76xrom_cleanup()
83 if (map->rsrc.parent) { in amd76xrom_cleanup()
84 release_resource(&map->rsrc); in amd76xrom_cleanup()
86 mtd_device_unregister(map->mtd); in amd76xrom_cleanup()
87 map_destroy(map->mtd); in amd76xrom_cleanup()
88 list_del(&map->list); in amd76xrom_cleanup()
89 kfree(map); in amd76xrom_cleanup()
110 struct amd76xrom_map_info *map = NULL; in amd76xrom_init_one() local
[all …]
Dck804xrom.c46 struct map_info map; member
84 struct ck804xrom_map_info *map, *scratch; in ck804xrom_cleanup() local
94 list_for_each_entry_safe(map, scratch, &window->maps, list) { in ck804xrom_cleanup()
95 if (map->rsrc.parent) in ck804xrom_cleanup()
96 release_resource(&map->rsrc); in ck804xrom_cleanup()
98 mtd_device_unregister(map->mtd); in ck804xrom_cleanup()
99 map_destroy(map->mtd); in ck804xrom_cleanup()
100 list_del(&map->list); in ck804xrom_cleanup()
101 kfree(map); in ck804xrom_cleanup()
123 struct ck804xrom_map_info *map = NULL; in ck804xrom_init_one() local
[all …]
Dichxrom.c47 struct map_info map; member
59 struct ichxrom_map_info *map, *scratch; in ichxrom_cleanup() local
70 list_for_each_entry_safe(map, scratch, &window->maps, list) { in ichxrom_cleanup()
71 if (map->rsrc.parent) in ichxrom_cleanup()
72 release_resource(&map->rsrc); in ichxrom_cleanup()
73 mtd_device_unregister(map->mtd); in ichxrom_cleanup()
74 map_destroy(map->mtd); in ichxrom_cleanup()
75 list_del(&map->list); in ichxrom_cleanup()
76 kfree(map); in ichxrom_cleanup()
95 struct ichxrom_map_info *map = NULL; in ichxrom_init_one() local
[all …]
Desb2rom.c108 struct map_info map; member
120 struct esb2rom_map_info *map, *scratch; in esb2rom_cleanup() local
129 list_for_each_entry_safe(map, scratch, &window->maps, list) { in esb2rom_cleanup()
130 if (map->rsrc.parent) in esb2rom_cleanup()
131 release_resource(&map->rsrc); in esb2rom_cleanup()
132 mtd_device_unregister(map->mtd); in esb2rom_cleanup()
133 map_destroy(map->mtd); in esb2rom_cleanup()
134 list_del(&map->list); in esb2rom_cleanup()
135 kfree(map); in esb2rom_cleanup()
153 struct esb2rom_map_info *map = NULL; in esb2rom_init_one() local
[all …]
/drivers/mtd/lpddr/
Dqinfo_probe.c20 static int lpddr_chip_setup(struct map_info *map, struct lpddr_private *lpddr);
21 struct mtd_info *lpddr_probe(struct map_info *map);
22 static struct lpddr_private *lpddr_probe_chip(struct map_info *map);
23 static int lpddr_pfow_present(struct map_info *map,
44 static long lpddr_get_qinforec_pos(struct map_info *map, char *id_str) in lpddr_get_qinforec_pos() argument
48 int bankwidth = map_bankwidth(map) * 8; in lpddr_get_qinforec_pos()
58 printk(KERN_ERR"%s qinfo id string is wrong! \n", map->name); in lpddr_get_qinforec_pos()
63 static uint16_t lpddr_info_query(struct map_info *map, char *id_str) in lpddr_info_query() argument
66 int bits_per_chip = map_bankwidth(map) * 8; in lpddr_info_query()
67 unsigned long adr = lpddr_get_qinforec_pos(map, id_str); in lpddr_info_query()
[all …]
Dlpddr2_nvm.c120 static inline u_long ow_reg_add(struct map_info *map, u_long offset) in ow_reg_add() argument
123 struct pcm_int_data *pcm_data = map->fldrv_priv; in ow_reg_add()
125 val = map->pfow_base + offset*pcm_data->bus_width; in ow_reg_add()
136 static inline void ow_enable(struct map_info *map) in ow_enable() argument
138 struct pcm_int_data *pcm_data = map->fldrv_priv; in ow_enable()
151 static inline void ow_disable(struct map_info *map) in ow_disable() argument
153 struct pcm_int_data *pcm_data = map->fldrv_priv; in ow_disable()
163 static int lpddr2_nvm_do_op(struct map_info *map, u_long cmd_code, in lpddr2_nvm_do_op() argument
171 struct pcm_int_data *pcm_data = map->fldrv_priv; in lpddr2_nvm_do_op()
185 map_write(map, cmd, ow_reg_add(map, CMD_CODE_OFS)); in lpddr2_nvm_do_op()
[all …]
/drivers/xen/
Dgntdev.c67 static void unmap_grant_pages(struct gntdev_grant_map *map,
83 struct gntdev_grant_map *map; in gntdev_print_maps() local
86 list_for_each_entry(map, &priv->maps, next) in gntdev_print_maps()
88 map->index, map->count, in gntdev_print_maps()
89 map->index == text_index && text ? text : ""); in gntdev_print_maps()
93 static void gntdev_free_map(struct gntdev_grant_map *map) in gntdev_free_map() argument
95 if (map == NULL) in gntdev_free_map()
99 if (map->dma_vaddr) { in gntdev_free_map()
102 args.dev = map->dma_dev; in gntdev_free_map()
103 args.coherent = !!(map->dma_flags & GNTDEV_DMA_FLAG_COHERENT); in gntdev_free_map()
[all …]
Dpvcalls-front.c101 struct sock_mapping *map; in pvcalls_enter_sock() local
107 map = (struct sock_mapping *)sock->sk->sk_send_head; in pvcalls_enter_sock()
108 if (map == NULL) in pvcalls_enter_sock()
112 atomic_inc(&map->refcount); in pvcalls_enter_sock()
113 return map; in pvcalls_enter_sock()
118 struct sock_mapping *map; in pvcalls_exit_sock() local
120 map = (struct sock_mapping *)sock->sk->sk_send_head; in pvcalls_exit_sock()
121 atomic_dec(&map->refcount); in pvcalls_exit_sock()
134 static bool pvcalls_front_write_todo(struct sock_mapping *map) in pvcalls_front_write_todo() argument
136 struct pvcalls_data_intf *intf = map->active.ring; in pvcalls_front_write_todo()
[all …]
Dpvcalls-back.c89 struct sock_mapping *map);
93 struct sock_mapping *map = (struct sock_mapping *)opaque; in pvcalls_conn_back_read() local
98 struct pvcalls_data_intf *intf = map->ring; in pvcalls_conn_back_read()
99 struct pvcalls_data *data = &map->data; in pvcalls_conn_back_read()
103 array_size = XEN_FLEX_RING_SIZE(map->ring_order); in pvcalls_conn_back_read()
116 spin_lock_irqsave(&map->sock->sk->sk_receive_queue.lock, flags); in pvcalls_conn_back_read()
117 if (skb_queue_empty(&map->sock->sk->sk_receive_queue)) { in pvcalls_conn_back_read()
118 atomic_set(&map->read, 0); in pvcalls_conn_back_read()
119 spin_unlock_irqrestore(&map->sock->sk->sk_receive_queue.lock, in pvcalls_conn_back_read()
123 spin_unlock_irqrestore(&map->sock->sk->sk_receive_queue.lock, flags); in pvcalls_conn_back_read()
[all …]
/drivers/mtd/chips/
Dcfi_cmdset_0002.c99 static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
100 static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr);
131 static int cfi_check_err_status(struct map_info *map, struct flchip *chip, in cfi_check_err_status() argument
134 struct cfi_private *cfi = map->fldrv_priv; in cfi_check_err_status()
140 cfi_send_gen_cmd(0x70, cfi->addr_unlock1, chip->start, map, cfi, in cfi_check_err_status()
142 status = map_read(map, adr); in cfi_check_err_status()
145 if (!map_word_bitsset(map, status, CMD(CFI_SR_DRB))) in cfi_check_err_status()
148 if (map_word_bitsset(map, status, CMD(0x3a))) { in cfi_check_err_status()
153 map->name, chipstatus); in cfi_check_err_status()
156 map->name, chipstatus); in cfi_check_err_status()
[all …]
Dcfi_util.c41 struct map_info *map, struct cfi_private *cfi) in cfi_build_cmd_addr() argument
43 unsigned bankwidth = map_bankwidth(map); in cfi_build_cmd_addr()
67 map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cfi_private *cfi) in cfi_build_cmd() argument
78 if (map_bankwidth_is_large(map)) { in cfi_build_cmd()
80 words_per_bus = (map_bankwidth(map)) / wordwidth; // i.e. normally 1 in cfi_build_cmd()
82 wordwidth = map_bankwidth(map); in cfi_build_cmd()
86 chip_mode = map_bankwidth(map) / cfi_interleave(cfi); in cfi_build_cmd()
87 chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map); in cfi_build_cmd()
97 onecmd = cpu_to_cfi16(map, cmd); in cfi_build_cmd()
100 onecmd = cpu_to_cfi32(map, cmd); in cfi_build_cmd()
[all …]
Dcfi_cmdset_0001.c98 static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
99 static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
100 static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr);
173 struct map_info *map = mtd->priv; in fixup_convert_atmel_pri() local
174 struct cfi_private *cfi = map->fldrv_priv; in fixup_convert_atmel_pri()
213 struct map_info *map = mtd->priv; in fixup_at49bv640dx_lock() local
214 struct cfi_private *cfi = map->fldrv_priv; in fixup_at49bv640dx_lock()
225 struct map_info *map = mtd->priv; in fixup_intel_strataflash() local
226 struct cfi_private *cfi = map->fldrv_priv; in fixup_intel_strataflash()
238 struct map_info *map = mtd->priv; in fixup_no_write_suspend() local
[all …]
Dcfi_probe.c27 static int cfi_probe_chip(struct map_info *map, __u32 base,
29 static int cfi_chip_setup(struct map_info *map, struct cfi_private *cfi);
31 struct mtd_info *cfi_probe(struct map_info *map);
38 #define xip_allowed(base, map) \ argument
40 (void) map_read(map, base); \
45 #define xip_enable(base, map, cfi) \ argument
47 cfi_qry_mode_off(base, map, cfi); \
48 xip_allowed(base, map); \
51 #define xip_disable_qry(base, map, cfi) \ argument
54 cfi_qry_mode_on(base, map, cfi); \
[all …]
/drivers/net/wireless/realtek/rtl818x/rtl8180/
Drtl8225.c31 reg80 = rtl818x_ioread16(priv, &priv->map->RFPinsOutput) & 0xfff3; in rtl8225_write()
32 reg82 = rtl818x_ioread16(priv, &priv->map->RFPinsEnable); in rtl8225_write()
34 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82 | 0x7); in rtl8225_write()
36 reg84 = rtl818x_ioread16(priv, &priv->map->RFPinsSelect); in rtl8225_write()
37 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84 | 0x7 | 0x400); in rtl8225_write()
38 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_write()
41 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write()
42 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_write()
44 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80); in rtl8225_write()
45 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_write()
[all …]
/drivers/clk/berlin/
Dberlin2-div.c57 struct berlin2_div_map map; member
68 struct berlin2_div_map *map = &div->map; in berlin2_div_is_enabled() local
74 reg = readl_relaxed(div->base + map->gate_offs); in berlin2_div_is_enabled()
75 reg >>= map->gate_shift; in berlin2_div_is_enabled()
86 struct berlin2_div_map *map = &div->map; in berlin2_div_enable() local
92 reg = readl_relaxed(div->base + map->gate_offs); in berlin2_div_enable()
93 reg |= BIT(map->gate_shift); in berlin2_div_enable()
94 writel_relaxed(reg, div->base + map->gate_offs); in berlin2_div_enable()
105 struct berlin2_div_map *map = &div->map; in berlin2_div_disable() local
111 reg = readl_relaxed(div->base + map->gate_offs); in berlin2_div_disable()
[all …]
/drivers/gpu/drm/
Ddrm_bufs.c52 struct drm_local_map *map) in drm_find_matching_map() argument
65 if (!entry->map || in drm_find_matching_map()
66 map->type != entry->map->type || in drm_find_matching_map()
69 switch (map->type) { in drm_find_matching_map()
71 if (map->flags != _DRM_CONTAINS_LOCK) in drm_find_matching_map()
76 if ((entry->map->offset & 0xffffffff) == in drm_find_matching_map()
77 (map->offset & 0xffffffff)) in drm_find_matching_map()
83 if (entry->map->offset == map->offset) in drm_find_matching_map()
152 struct drm_local_map *map; in drm_addmap_core() local
157 map = kmalloc(sizeof(*map), GFP_KERNEL); in drm_addmap_core()
[all …]

12345678910>>...53