/linux/drivers/clk/at91/ |
H A D | clk-programmable.c | 18 #define PROG_PRES(layout, pckr) ((pckr >> layout->pres_shift) & layout->pres_mask) argument 26 const struct clk_programmable_layout *layout; member 36 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_recalc_rate() local 42 if (layout->is_pres_direct) in clk_programmable_recalc_rate() 43 rate = parent_rate / (PROG_PRES(layout, pckr) + 1); in clk_programmable_recalc_rate() 45 rate = parent_rate >> PROG_PRES(layout, pckr); in clk_programmable_recalc_rate() 54 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_determine_rate() local 68 if (layout->is_pres_direct) { in clk_programmable_determine_rate() 69 for (shift = 0; shift <= layout->pres_mask; shift++) { in clk_programmable_determine_rate() 75 for (shift = 0; shift < layout->pres_mask; shift++) { in clk_programmable_determine_rate() [all …]
|
H A D | clk-pll.c | 20 #define PLL_MUL(reg, layout) (((reg) >> (layout)->mul_shift) & \ argument 21 (layout)->mul_mask) 23 #define PLL_MUL_MASK(layout) ((layout)->mul_mask) argument 24 #define PLL_MUL_MAX(layout) (PLL_MUL_MASK(layout) + 1) argument 41 const struct clk_pll_layout *layout; member 59 const struct clk_pll_layout *layout = pll->layout; in clk_pll_prepare() local 73 mul = PLL_MUL(pllr, layout); in clk_pll_prepare() 87 regmap_update_bits(regmap, offset, layout->pllr_mask, in clk_pll_prepare() 90 ((pll->mul & layout->mul_mask) << layout->mul_shift)); in clk_pll_prepare() 108 unsigned int mask = pll->layout->pllr_mask; in clk_pll_unprepare() [all …]
|
H A D | clk-generated.c | 29 const struct clk_pcr_layout *layout; member 44 regmap_write(gck->regmap, gck->layout->offset, in clk_generated_set() 45 (gck->id & gck->layout->pid_mask)); in clk_generated_set() 46 regmap_update_bits(gck->regmap, gck->layout->offset, in clk_generated_set() 47 AT91_PMC_PCR_GCKDIV_MASK | gck->layout->gckcss_mask | in clk_generated_set() 48 gck->layout->cmd | enable, in clk_generated_set() 49 field_prep(gck->layout->gckcss_mask, gck->parent_id) | in clk_generated_set() 50 gck->layout->cmd | in clk_generated_set() 76 regmap_write(gck->regmap, gck->layout->offset, in clk_generated_disable() 77 (gck->id & gck->layout->pid_mask)); in clk_generated_disable() [all …]
|
H A D | clk-sam9x60-pll.c | 32 const struct clk_pll_layout *layout; member 81 if (core->layout->div2) in sam9x60_frac_pll_recalc_rate() 99 cmul = (val & core->layout->mul_mask) >> core->layout->mul_shift; in sam9x60_frac_pll_set() 100 cfrac = (val & core->layout->frac_mask) >> core->layout->frac_shift; in sam9x60_frac_pll_set() 114 (frac->mul << core->layout->mul_shift) | in sam9x60_frac_pll_set() 115 (frac->frac << core->layout->frac_shift)); in sam9x60_frac_pll_set() 268 cmul = (val & core->layout->mul_mask) >> core->layout->mul_shift; in sam9x60_frac_pll_set_rate_chg() 269 cfrac = (val & core->layout->frac_mask) >> core->layout->frac_shift; in sam9x60_frac_pll_set_rate_chg() 275 (frac->mul << core->layout->mul_shift) | in sam9x60_frac_pll_set_rate_chg() 276 (frac->frac << core->layout->frac_shift)); in sam9x60_frac_pll_set_rate_chg() [all …]
|
H A D | clk-peripheral.c | 39 const struct clk_pcr_layout *layout; member 173 regmap_write(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_set() 174 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_set() 175 regmap_update_bits(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_set() 176 periph->layout->div_mask | periph->layout->cmd | in clk_sam9x5_peripheral_set() 178 field_prep(periph->layout->div_mask, periph->div) | in clk_sam9x5_peripheral_set() 179 periph->layout->cmd | enable); in clk_sam9x5_peripheral_set() 201 regmap_write(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_disable() 202 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_disable() 203 regmap_update_bits(periph->regmap, periph->layout->offset, in clk_sam9x5_peripheral_disable() [all …]
|
H A D | clk-master.c | 31 const struct clk_master_layout *layout; member 90 const struct clk_master_layout *layout = master->layout; in clk_master_div_recalc_rate() local 96 regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_recalc_rate() 99 mckr &= layout->mask; in clk_master_div_recalc_rate() 121 regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_save_context() 124 mckr &= master->layout->mask; in clk_master_div_save_context() 142 regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_restore_context() 145 mckr &= master->layout->mask; in clk_master_div_restore_context() 188 ret = regmap_read(master->regmap, master->layout->offset, &mckr); in clk_master_div_set() 192 mckr &= master->layout->mask; in clk_master_div_set() [all …]
|
/linux/drivers/gpio/ |
H A D | gpio-creg-snps.c | 27 const struct creg_layout *layout; member 33 const struct creg_layout *layout = hcg->layout; in creg_gpio_set() local 38 value = val ? hcg->layout->on[offset] : hcg->layout->off[offset]; in creg_gpio_set() 40 reg_shift = layout->shift[offset]; in creg_gpio_set() 42 reg_shift += layout->bit_per_gpio[i] + layout->shift[i]; in creg_gpio_set() 46 reg &= ~(GENMASK(layout->bit_per_gpio[i] - 1, 0) << reg_shift); in creg_gpio_set() 62 const struct creg_layout *layout = hcg->layout; in creg_gpio_validate_pg() local 64 if (layout->bit_per_gpio[i] < 1 || layout->bit_per_gpio[i] > 8) in creg_gpio_validate_pg() 68 if (GENMASK(31, layout->bit_per_gpio[i]) & layout->on[i]) in creg_gpio_validate_pg() 72 if (GENMASK(31, layout->bit_per_gpio[i]) & layout->off[i]) in creg_gpio_validate_pg() [all …]
|
/linux/drivers/net/can/spi/mcp251xfd/ |
H A D | mcp251xfd-ethtool.c | 22 struct can_ram_layout layout; in mcp251xfd_ring_get_ringparam() local 24 can_ram_get_layout(&layout, &mcp251xfd_ram_config, NULL, NULL, fd_mode); in mcp251xfd_ring_get_ringparam() 25 ring->rx_max_pending = layout.max_rx; in mcp251xfd_ring_get_ringparam() 26 ring->tx_max_pending = layout.max_tx; in mcp251xfd_ring_get_ringparam() 40 struct can_ram_layout layout; in mcp251xfd_ring_set_ringparam() local 42 can_ram_get_layout(&layout, &mcp251xfd_ram_config, ring, NULL, fd_mode); in mcp251xfd_ring_set_ringparam() 43 if ((layout.cur_rx != priv->rx_obj_num || in mcp251xfd_ring_set_ringparam() 44 layout.cur_tx != priv->tx->obj_num) && in mcp251xfd_ring_set_ringparam() 48 priv->rx_obj_num = layout.cur_rx; in mcp251xfd_ring_set_ringparam() 49 priv->rx_obj_num_coalesce_irq = layout.rx_coalesce; in mcp251xfd_ring_set_ringparam() [all …]
|
H A D | mcp251xfd-ram.c | 60 void can_ram_get_layout(struct can_ram_layout *layout, in can_ram_get_layout() argument 79 layout->default_rx = can_ram_rounddown_pow_of_two(config, &config->rx, 0, num_rx); in can_ram_get_layout() 80 layout->default_tx = num_tx; in can_ram_get_layout() 92 layout->max_rx = can_ram_rounddown_pow_of_two(config, &config->rx, 0, num_rx); in can_ram_get_layout() 93 layout->max_tx = can_ram_rounddown_pow_of_two(config, &config->tx, 0, num_tx); in can_ram_get_layout() 106 if (num_rx > layout->max_rx) in can_ram_get_layout() 107 num_rx = layout->default_rx; in can_ram_get_layout() 152 layout->cur_rx = num_rx; in can_ram_get_layout() 153 layout->cur_tx = num_tx; in can_ram_get_layout() 154 layout->rx_coalesce = num_rx_coalesce; in can_ram_get_layout() [all …]
|
/linux/sound/soc/intel/avs/ |
H A D | apl.c | 71 struct avs_apl_log_buffer_layout layout; in avs_apl_log_buffer_status() local 78 memcpy_fromio(&layout, addr, sizeof(layout)); in avs_apl_log_buffer_status() 86 if (layout.read_ptr > layout.write_ptr) { in avs_apl_log_buffer_status() 87 avs_dump_fw_log(adev, buf + layout.read_ptr, in avs_apl_log_buffer_status() 88 avs_apl_log_payload_size(adev) - layout.read_ptr); in avs_apl_log_buffer_status() 89 layout.read_ptr = 0; in avs_apl_log_buffer_status() 91 avs_dump_fw_log_wakeup(adev, buf + layout.read_ptr, layout.write_ptr - layout.read_ptr); in avs_apl_log_buffer_status() 94 writel(layout.write_ptr, addr); in avs_apl_log_buffer_status() 99 struct avs_apl_log_buffer_layout *layout) in avs_apl_wait_log_entry() argument 111 memcpy_fromio(layout, addr, sizeof(*layout)); in avs_apl_wait_log_entry() [all …]
|
/linux/drivers/nvmem/ |
H A D | layouts.c | 32 struct nvmem_layout *layout = to_nvmem_layout_device(dev); in nvmem_layout_bus_probe() local 37 return drv->probe(layout); in nvmem_layout_bus_probe() 43 struct nvmem_layout *layout = to_nvmem_layout_device(dev); in nvmem_layout_bus_remove() local 45 return drv->remove(layout); in nvmem_layout_bus_remove() 73 struct nvmem_layout *layout = to_nvmem_layout_device(dev); in nvmem_layout_release_device() local 75 of_node_put(layout->dev.of_node); in nvmem_layout_release_device() 76 kfree(layout); in nvmem_layout_release_device() 82 struct nvmem_layout *layout; in nvmem_layout_create_device() local 86 layout = kzalloc(sizeof(*layout), GFP_KERNEL); in nvmem_layout_create_device() 87 if (!layout) in nvmem_layout_create_device() [all …]
|
/linux/rust/kernel/alloc/ |
H A D | allocator.rs | 49 let layout = new_layout.pad_to_align(); in realloc() 51 // Note that `layout.size()` (after padding) is guaranteed to be a multiple of `layout.align()` in realloc() 54 layout.size() in realloc() 86 layout: Layout, 90 let size = aligned_size(layout); 116 crate::alloc::dangling_from_layout(layout) 133 layout: Layout, 138 unsafe { ReallocFunc::KREALLOC.call(ptr, layout, old_layout, flags) } 150 layout 19 let layout = new_layout.pad_to_align(); krealloc_aligned() localVariable 52 let layout = unsafe { Layout::from_size_align_unchecked(new_size, layout.align()) }; realloc() localVariable [all...] |
/linux/include/linux/mfd/syscon/ |
H A D | atmel-smc.h | 19 #define ATMEL_HSMC_SETUP(layout, cs) \ argument 20 ((layout)->timing_regs_offset + ((cs) * 0x14)) 22 #define ATMEL_HSMC_PULSE(layout, cs) \ argument 23 ((layout)->timing_regs_offset + ((cs) * 0x14) + 0x4) 25 #define ATMEL_HSMC_CYCLE(layout, cs) \ argument 26 ((layout)->timing_regs_offset + ((cs) * 0x14) + 0x8) 33 #define ATMEL_HSMC_MODE(layout, cs) \ argument 34 ((layout)->timing_regs_offset + ((cs) * 0x14) + 0x10) 64 #define ATMEL_HSMC_TIMINGS(layout, cs) \ argument 65 ((layout)->timing_regs_offset + ((cs) * 0x14) + 0xc)
|
/linux/drivers/md/dm-vdo/indexer/ |
H A D | index-layout.h | 24 void uds_free_index_layout(struct index_layout *layout); 26 int __must_check uds_replace_index_layout_storage(struct index_layout *layout, 29 int __must_check uds_load_index_state(struct index_layout *layout, 32 int __must_check uds_save_index_state(struct index_layout *layout, 35 int __must_check uds_discard_open_chapter(struct index_layout *layout); 37 u64 __must_check uds_get_volume_nonce(struct index_layout *layout); 39 int __must_check uds_open_volume_bufio(struct index_layout *layout, size_t block_size,
|
/linux/drivers/gpu/drm/atmel-hlcdc/ |
H A D | atmel_hlcdc_plane.c | 292 if (!desc->layout.scaler_config) in atmel_hlcdc_plane_setup_scaler() 297 desc->layout.scaler_config, 0); in atmel_hlcdc_plane_setup_scaler() 301 if (desc->layout.phicoeffs.x) { in atmel_hlcdc_plane_setup_scaler() 315 desc->layout.phicoeffs.x); in atmel_hlcdc_plane_setup_scaler() 322 desc->layout.phicoeffs.y); in atmel_hlcdc_plane_setup_scaler() 328 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config, in atmel_hlcdc_plane_setup_scaler() 341 if (!desc->layout.scaler_config) in atmel_xlcdc_plane_setup_scaler() 346 desc->layout.scaler_config, 0); in atmel_xlcdc_plane_setup_scaler() 356 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config, in atmel_xlcdc_plane_setup_scaler() 362 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config + 1, in atmel_xlcdc_plane_setup_scaler() [all …]
|
H A D | atmel_hlcdc_dc.c | 43 .layout = { 74 .layout = { 90 .layout = { 109 .layout = { 133 .layout = { 168 .layout = { 184 .layout = { 203 .layout = { 222 .layout = { 250 .layout = { [all …]
|
/linux/Documentation/filesystems/nfs/ |
H A D | pnfs.rst | 17 Each nfs_inode may hold a pointer to a cache of these layout 18 segments in nfsi->layout, of type struct pnfs_layout_hdr. 26 the reference count, as the layout is kept around by the lseg that 33 layout driver type. The device ids are held in a RCU cache (struct 62 layout drivers 65 PNFS utilizes what is called layout drivers. The STD defines 4 basic 66 layout types: "files", "objects", "blocks", and "flexfiles". For each 67 of these types there is a layout-driver with a common function-vectors 69 different layout types. 71 Files-layout-driver code is in: fs/nfs/filelayout/.. directory [all …]
|
/linux/drivers/mfd/ |
H A D | atmel-smc.c | 266 const struct atmel_hsmc_reg_layout *layout, in atmel_hsmc_cs_conf_apply() argument 269 regmap_write(regmap, ATMEL_HSMC_SETUP(layout, cs), conf->setup); in atmel_hsmc_cs_conf_apply() 270 regmap_write(regmap, ATMEL_HSMC_PULSE(layout, cs), conf->pulse); in atmel_hsmc_cs_conf_apply() 271 regmap_write(regmap, ATMEL_HSMC_CYCLE(layout, cs), conf->cycle); in atmel_hsmc_cs_conf_apply() 272 regmap_write(regmap, ATMEL_HSMC_TIMINGS(layout, cs), conf->timings); in atmel_hsmc_cs_conf_apply() 273 regmap_write(regmap, ATMEL_HSMC_MODE(layout, cs), conf->mode); in atmel_hsmc_cs_conf_apply() 307 const struct atmel_hsmc_reg_layout *layout, in atmel_hsmc_cs_conf_get() argument 310 regmap_read(regmap, ATMEL_HSMC_SETUP(layout, cs), &conf->setup); in atmel_hsmc_cs_conf_get() 311 regmap_read(regmap, ATMEL_HSMC_PULSE(layout, cs), &conf->pulse); in atmel_hsmc_cs_conf_get() 312 regmap_read(regmap, ATMEL_HSMC_CYCLE(layout, cs), &conf->cycle); in atmel_hsmc_cs_conf_get() [all …]
|
/linux/drivers/md/ |
H A D | raid5.h | 768 static inline int algorithm_valid_raid5(int layout) in algorithm_valid_raid5() argument 770 return (layout >= 0) && in algorithm_valid_raid5() 771 (layout <= 5); in algorithm_valid_raid5() 773 static inline int algorithm_valid_raid6(int layout) in algorithm_valid_raid6() argument 775 return (layout >= 0 && layout <= 5) in algorithm_valid_raid6() 777 (layout >= 8 && layout <= 10) in algorithm_valid_raid6() 779 (layout >= 16 && layout <= 20); in algorithm_valid_raid6() 782 static inline int algorithm_is_DDF(int layout) in algorithm_is_DDF() argument 784 return layout >= 8 && layout <= 10; in algorithm_is_DDF()
|
H A D | dm-raid.c | 431 static bool __is_raid10_far(int layout); 530 static unsigned int __raid10_near_copies(int layout) in __raid10_near_copies() argument 532 return layout & 0xFF; in __raid10_near_copies() 536 static unsigned int __raid10_far_copies(int layout) in __raid10_far_copies() argument 538 return __raid10_near_copies(layout >> RAID10_FAR_COPIES_SHIFT); in __raid10_far_copies() 542 static bool __is_raid10_offset(int layout) in __is_raid10_offset() argument 544 return !!(layout & RAID10_OFFSET); in __is_raid10_offset() 548 static bool __is_raid10_near(int layout) in __is_raid10_near() argument 550 return !__is_raid10_offset(layout) && __raid10_near_copies(layout) > 1; in __is_raid10_near() 554 static bool __is_raid10_far(int layout) in __is_raid10_far() argument [all …]
|
/linux/sound/aoa/fabrics/ |
H A D | layout.c | 63 struct layout { struct 272 static struct layout layouts[] = { 563 static struct layout *find_layout_by_id(unsigned int id) in find_layout_by_id() 565 struct layout *l; in find_layout_by_id() 576 static struct layout *find_layout_by_device(unsigned int id) in find_layout_by_device() 578 struct layout *l; in find_layout_by_device() 589 static void use_layout(struct layout *l) in use_layout() 612 struct layout *layout; member 826 if (!ldev->layout->codecs[i].name) in layout_found_codec() 828 if (strcmp(ldev->layout->codecs[i].name, codec->name) == 0) { in layout_found_codec() [all …]
|
H A D | Makefile | 2 snd-aoa-fabric-layout-y += layout.o 4 obj-$(CONFIG_SND_AOA_FABRIC_LAYOUT) += snd-aoa-fabric-layout.o
|
/linux/drivers/nvmem/layouts/ |
H A D | u-boot-env.c | 168 static int u_boot_env_add_cells(struct nvmem_layout *layout) in u_boot_env_add_cells() argument 170 struct device *dev = &layout->dev; in u_boot_env_add_cells() 175 return u_boot_env_parse(dev, layout->nvmem, format); in u_boot_env_add_cells() 178 static int u_boot_env_probe(struct nvmem_layout *layout) in u_boot_env_probe() argument 180 layout->add_cells = u_boot_env_add_cells; in u_boot_env_probe() 182 return nvmem_layout_register(layout); in u_boot_env_probe() 185 static void u_boot_env_remove(struct nvmem_layout *layout) in u_boot_env_remove() argument 187 nvmem_layout_unregister(layout); in u_boot_env_remove()
|
/linux/drivers/gpu/drm/i915/gt/uc/ |
H A D | intel_gsc_fw.c | 77 const struct intel_gsc_layout_pointers *layout = data; in intel_gsc_fw_get_binary_info() local 84 size_t min_size = sizeof(*layout); in intel_gsc_fw_get_binary_info() 142 min_size = layout->boot1.offset + layout->boot1.size; in intel_gsc_fw_get_binary_info() 150 if (layout->boot1.size < min_size) { in intel_gsc_fw_get_binary_info() 152 layout->boot1.size, min_size); in intel_gsc_fw_get_binary_info() 156 bpdt_header = data + layout->boot1.offset; in intel_gsc_fw_get_binary_info() 164 if (layout->boot1.size < min_size) { in intel_gsc_fw_get_binary_info() 166 layout->boot1.size, min_size); in intel_gsc_fw_get_binary_info() 186 if (layout->boot1.size < min_size) { in intel_gsc_fw_get_binary_info() 188 layout->boot1.size, min_size); in intel_gsc_fw_get_binary_info() [all …]
|
/linux/drivers/input/keyboard/ |
H A D | sunkbd.c | 67 volatile s8 layout; member 90 if (sunkbd->layout == -1) { in sunkbd_interrupt() 91 sunkbd->layout = data; in sunkbd_interrupt() 105 sunkbd->layout = -1; in sunkbd_interrupt() 187 sunkbd->layout = -2; in sunkbd_initialize() 190 sunkbd->layout >= 0, HZ / 4); in sunkbd_initialize() 191 if (sunkbd->layout < 0) in sunkbd_initialize() 193 if (sunkbd->layout & SUNKBD_LAYOUT_5_MASK) in sunkbd_initialize()
|