Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
drivers/amba/tegra-ahb.c
static inline u32 gizmo_readl(struct tegra_ahb *ahb, u32 offset) { return readl(ahb->regs + offset); }
[ 0, 0 ]
Linux Kernel
drivers/amba/tegra-ahb.c
static inline void gizmo_writel(struct tegra_ahb *ahb, u32 value, u32 offset) { writel(value, ahb->regs + offset); } #ifdef CONFIG_TEGRA_IOMMU_SMMU
[ 0, 0 ]
Linux Kernel
drivers/amba/tegra-ahb.c
static int __maybe_unused tegra_ahb_resume(struct device *dev) { int i; struct tegra_ahb *ahb = dev_get_drvdata(dev); for (i = 0; i < ARRAY_SIZE(tegra_ahb_gizmo); i++) gizmo_writel(ahb, ahb->ctx[i], tegra_ahb_gizmo[i]); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/amba/tegra-ahb.c
static int tegra_ahb_probe(struct platform_device *pdev) { struct resource *res; struct tegra_ahb *ahb; size_t bytes; bytes = sizeof(*ahb) + sizeof(u32) * ARRAY_SIZE(tegra_ahb_gizmo); ahb = devm_kzalloc(&pdev->dev, bytes, GFP_KERNEL); if (!ahb) return -ENOMEM; res = platform_get_resource(pdev, IORES...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
void binder_user_error(const char *format, ...) { struct va_format vaf; va_list args; if (binder_debug_mask & BINDER_DEBUG_USER_ERROR) { va_start(args, format); vaf.va = &args; vaf.fmt = format; pr_info_ratelimited("%pV", &vaf); va_end(args); } if (binder_stop_on_user_error) binder_...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static inline void binder_stats_created(enum binder_stat_types type) { atomic_inc(&binder_stats.obj_created[type]); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void _binder_proc_lock(struct binder_proc *proc, int line) __acquires(&proc->outer_lock)
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void _binder_node_unlock(struct binder_node *node, int line) __releases(&node->lock)
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static bool binder_worklist_empty(struct binder_proc *proc, struct list_head *list) { bool ret; binder_inner_proc_lock(proc); ret = binder_worklist_empty_ilocked(list); binder_inner_proc_unlock(proc); return ret; }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_enqueue_thread_work_ilocked(struct binder_thread *thread, struct binder_work *work) { WARN_ON(!list_empty(&thread->waiting_thread_node)); binder_enqueue_work_ilocked(work, &thread->todo); thread->process_todo = true; }
[ 0, 1 ]
Linux Kernel
drivers/android/binder.c
static void binder_dequeue_work_ilocked(struct binder_work *work) { list_del_init(&work->entry); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_wakeup_poll_threads_ilocked(struct binder_proc *proc, bool sync) { struct rb_node *n; struct binder_thread *thread; for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) { thread = rb_entry(n, struct binder_thread, rb_node); if (t...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static struct binder_node *binder_get_node(struct binder_proc *proc, binder_uintptr_t ptr) { struct binder_node *node; binder_inner_proc_lock(proc); node = binder_get_node_ilocked(proc, ptr); binder_inner_proc_unlock(proc); return node; }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_put_node(struct binder_node *node) { binder_dec_node_tmpref(node); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static bool binder_dec_ref_olocked(struct binder_ref *ref, int strong) { if (strong) { if (ref->data.strong == 0) { binder_user_error("%d invalid dec strong, ref %d desc %d s %d w %d\n", ref->proc->pid, ref->data.debug_id, ref->data.desc, ref->data.strong, ref...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static int binder_inc_ref_for_node(struct binder_proc *proc, struct binder_node *node, bool strong, struct list_head *target_list, struct binder_ref_data *rdata) { struct binder_ref *ref; struct binder_ref *new_...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_pop_transaction_ilocked(struct binder_thread *target_thread, struct binder_transaction *t) { BUG_ON(!target_thread); assert_spin_locked(&target_thread->proc->inner_lock); BUG_ON(target_thread->transaction_stack != t); BUG_ON(target_thread->transacti...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_proc_dec_tmpref(struct binder_proc *proc) { binder_inner_proc_lock(proc); proc->tmp_ref--; if (proc->is_dead && RB_EMPTY_ROOT(&proc->threads) && !proc->tmp_ref) { binder_inner_proc_unlock(proc); binder_free_proc(proc); return; } binder_inner_proc_unlock(proc); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static struct binder_thread *binder_get_txn_from(struct binder_transaction *t) { struct binder_thread *from; spin_lock(&t->lock); from = t->from; if (from) atomic_inc(&from->tmp_ref); spin_unlock(&t->lock); return from; }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_free_txn_fixups(struct binder_transaction *t) { struct binder_txn_fd_fixup *fixup, *tmp; list_for_each_entry_safe(fixup, tmp, &t->fd_fixups, fixup_entry) { fput(fixup->file); if (fixup->target_fd >= 0) put_unused_fd(fixup->target_fd); list_del(&fixup->fixup_entry); kfree(fi...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_cleanup_transaction(struct binder_transaction *t, const char *reason, uint32_t error_code) { if (t->buffer->target_node && !(t->flags & TF_ONE_WAY)) { binder_send_failed_reply(t, error_code); } else { binder_deb...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_do_fd_close(struct callback_head *twork) { struct binder_task_work_cb *twcb = container_of(twork, struct binder_task_work_cb, twork); fput(twcb->file); kfree(twcb); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static int binder_add_fixup(struct list_head *pf_head, binder_size_t offset, binder_uintptr_t fixup, size_t skip_size) { struct binder_ptr_fixup *pf = kzalloc(sizeof(*pf), GFP_KERNEL); struct binder_ptr_fixup *tmppf; if (!pf) return -ENOMEM; pf->offset = offset; pf->fixup_dat...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_set_txn_from_error(struct binder_transaction *t, int id, uint32_t command, int32_t param) { struct binder_thread *from = binder_get_txn_from_and_acq_inner(t); if (!from) { __release(&from->proc->inner_lock); return; } /* don't override existing...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void binder_free_buf(struct binder_proc *proc, struct binder_thread *thread, struct binder_buffer *buffer, bool is_failure) { binder_inner_proc_lock(proc); if (buffer->transaction) { buffer->transaction->buffer = NULL; buffer->transaction = NULL...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static int binder_put_node_cmd(struct binder_proc *proc, struct binder_thread *thread, void __user **ptrp, binder_uintptr_t node_ptr, binder_uintptr_t node_cookie, int node_debug_id, uint32_t cmd...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static struct binder_thread * binder_get_thread_ilocked(struct binder_proc *proc, struct binder_thread *new_thread) { struct binder_thread *thread = NULL; struct rb_node *parent = NULL; struct rb_node **p = &proc->threads.rb_node; while (*p) { parent = *p; thread = rb_entry(p...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static struct binder_thread *binder_get_thread(struct binder_proc *proc) { struct binder_thread *thread; struct binder_thread *new_thread; binder_inner_proc_lock(proc); thread = binder_get_thread_ilocked(proc, NULL); binder_inner_proc_unlock(proc); if (!thread) { new_thread = kzalloc(sizeof(*thread), ...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static __poll_t binder_poll(struct file *filp, struct poll_table_struct *wait) { struct binder_proc *proc = filp->private_data; struct binder_thread *thread = NULL; bool wait_for_proc_work; thread = binder_get_thread(proc); if (!thread) return POLLERR; binder_inner_proc_lock(thread->proc); thread->...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static int binder_ioctl_set_ctx_mgr(struct file *filp, struct flat_binder_object *fbo) { int ret = 0; struct binder_proc *proc = filp->private_data; struct binder_context *context = proc->context; struct binder_node *new_node; kuid_t curr_euid = current_euid(); mutex_lo...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static int binder_node_release(struct binder_node *node, int refs) { struct binder_ref *ref; int death = 0; struct binder_proc *proc = node->proc; binder_release_work(proc, &node->async_todo); binder_node_lock(node); binder_inner_proc_lock(proc); binder_dequeue_work_ilocked(&node->work); BUG_ON(!node...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static void print_binder_work_ilocked(struct seq_file *m, struct binder_proc *proc, const char *prefix, const char *transaction_prefix, struct binder_work *w) { stru...
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static void print_binder_node_nilocked(struct seq_file *m, struct binder_node *node) { struct binder_ref *ref; struct binder_work *w; int count; count = 0; hlist_for_each_entry(ref, &node->refs, node_entry) count++; seq_printf( m, " node %d: u%016llx c%...
[ 1, 0 ]
Linux Kernel
drivers/android/binder.c
static int transactions_show(struct seq_file *m, void *unused) { struct binder_proc *proc; seq_puts(m, "binder transactions:\n"); mutex_lock(&binder_procs_lock); hlist_for_each_entry(proc, &binder_procs, proc_node) print_binder_proc(m, proc, 0); mutex_unlock(&binder_procs_lock); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/android/binder.c
static int transaction_log_show(struct seq_file *m, void *unused) { struct binder_transaction_log *log = m->private; unsigned int log_cur = atomic_read(&log->cur); unsigned int count; unsigned int cur; int i; count = log_cur + 1; cur = count < ARRAY_SIZE(log->entry) && !log->full ? 0 ...
[ 1, 0 ]
Linux Kernel
drivers/android/binderfs.c
static void binderfs_evict_inode(struct inode *inode) { struct binder_device *device = inode->i_private; struct binderfs_info *info = BINDERFS_SB(inode->i_sb); clear_inode(inode); if (!S_ISCHR(inode->i_mode) || !device) return; mutex_lock(&binderfs_minors_mutex); --info->device_count; ida_free(&bi...
[ 1, 0 ]
Linux Kernel
drivers/android/binderfs.c
static int binderfs_fs_context_reconfigure(struct fs_context *fc) { struct binderfs_mount_opts *ctx = fc->fs_private; struct binderfs_info *info = BINDERFS_SB(fc->root->d_sb); if (info->mount_opts.stats_mode != ctx->stats_mode) return invalfc(fc, "Binderfs stats mode cannot be changed dur...
[ 0, 0 ]
Linux Kernel
drivers/android/binderfs.c
static int binderfs_unlink(struct inode *dir, struct dentry *dentry) { if (is_binderfs_control_device(dentry)) return -EPERM; return simple_unlink(dir, dentry); }
[ 0, 0 ]
Linux Kernel
drivers/android/binderfs.c
static struct inode *binderfs_make_inode(struct super_block *sb, int mode) { struct inode *ret; ret = new_inode(sb); if (ret) { ret->i_ino = iunique(sb, BINDERFS_MAX_MINOR + INODE_OFFSET); ret->i_mode = mode; ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret); } return ret; }
[ 0, 0 ]
Linux Kernel
drivers/android/binderfs.c
static struct dentry *binderfs_create_dir(struct dentry *parent, const char *name) { struct dentry *dentry; struct inode *new_inode, *parent_inode; struct super_block *sb; parent_inode = d_inode(parent); inode_lock(parent_inode); dentry = binderfs_create_dentry(p...
[ 0, 0 ]
Linux Kernel
drivers/android/binderfs.c
static int binder_features_show(struct seq_file *m, void *unused) { bool *feature = m->private; seq_printf(m, "%d\n", *feature); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/android/binderfs.c
static int init_binder_features(struct super_block *sb) { struct dentry *dentry, *dir; dir = binderfs_create_dir(sb->s_root, "features"); if (IS_ERR(dir)) return PTR_ERR(dir); dentry = binderfs_create_file(dir, "oneway_spam_detection", &binder_features_fops, &binder_featu...
[ 0, 0 ]
Linux Kernel
drivers/android/binderfs.c
static int binderfs_init_fs_context(struct fs_context *fc) { struct binderfs_mount_opts *ctx; ctx = kzalloc(sizeof(struct binderfs_mount_opts), GFP_KERNEL); if (!ctx) return -ENOMEM; ctx->max = BINDERFS_MAX_MINOR; ctx->stats_mode = binderfs_stats_mode_unset; fc->fs_private = ctx; fc->ops = &binder...
[ 0, 0 ]
Linux Kernel
drivers/android/binderfs.c
int __init init_binderfs(void) { int ret; const char *name; size_t len; name = binder_devices_param; for (len = strcspn(name, ","); len > 0; len = strcspn(name, ",")) { if (len > BINDERFS_MAX_NAME) return -E2BIG; name += len; if (*name == ',') name++; } /* Allocate new major numb...
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static struct binder_buffer *binder_buffer_prev(struct binder_buffer *buffer) { return list_entry(buffer->entry.prev, struct binder_buffer, entry); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
struct binder_buffer *binder_alloc_prepare_to_free(struct binder_alloc *alloc, uintptr_t user_ptr) { struct binder_buffer *buffer; mutex_lock(&alloc->mutex); buffer = binder_alloc_prepare_to_free_locked(alloc, user_ptr); mutex_unlock(&alloc->mutex); return b...
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static bool debug_low_async_space_locked(struct binder_alloc *alloc, int pid) { struct rb_node *n; struct binder_buffer *buffer; size_t total_alloc_size = 0; size_t num_buffers = 0; for (n = rb_first(&alloc->allocated_buffers); n != NULL; n = rb_next(n)) { buffer = rb_entry(n, struct binder_buffer, rb_n...
[ 1, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static void __user *buffer_start_page(struct binder_buffer *buffer) { return (void __user *)((uintptr_t)buffer->user_data & PAGE_MASK); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static void print_binder_buffer(struct seq_file *m, const char *prefix, struct binder_buffer *buffer) { seq_printf(m, "%s %d: %pK size %zd:%zd:%zd %s\n", prefix, buffer->debug_id, buffer->user_data, buffer->data_size, buffer->offsets_size, buffer->extra_buffe...
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static unsigned long binder_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) { return list_lru_walk(&binder_alloc_lru, binder_alloc_free_page, NULL, sc->nr_to_scan); }
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
int binder_alloc_shrinker_init(void) { int ret = list_lru_init(&binder_alloc_lru); if (ret == 0) { ret = register_shrinker(&binder_shrinker, "android-binder"); if (ret) list_lru_destroy(&binder_alloc_lru); } return ret; }
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static inline bool check_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t offset, size_t bytes) { size_t buffer_size = binder_alloc_buffer_size(alloc, buffer); return buffer_size >= bytes && offset <= buffer_size - bytes ...
[ 1, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static void binder_alloc_clear_buf(struct binder_alloc *alloc, struct binder_buffer *buffer) { size_t bytes = binder_alloc_buffer_size(alloc, buffer); binder_size_t buffer_offset = 0; while (bytes) { unsigned long size; struct page *page; pgoff_t pgoff; page = ...
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.c
static int binder_alloc_do_buffer_copy(struct binder_alloc *alloc, bool to_buffer, struct binder_buffer *buffer, binder_size_t buffer_offset, void *ptr, size_t byte...
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc.h
static inline void binder_selftest_alloc(struct binder_alloc *alloc) {} #endif
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc_selftest.c
static void binder_selftest_free_page(struct binder_alloc *alloc) { int i; unsigned long count; while ((count = list_lru_count(&binder_alloc_lru))) { list_lru_walk(&binder_alloc_lru, binder_alloc_free_page, NULL, count); } for (i = 0; i < (alloc->buffer_size / PAGE_SIZE); i++) { if (alloc->pages[i]...
[ 0, 0 ]
Linux Kernel
drivers/android/binder_alloc_selftest.c
void binder_selftest_alloc(struct binder_alloc *alloc) { size_t end_offset[BUFFER_NUM]; if (!binder_selftest_run) return; mutex_lock(&binder_selftest_lock); if (!binder_selftest_run || !alloc->vma_addr) goto done; pr_info("STARTED\n"); binder_selftest_alloc_offset(alloc, end_offset, 0); binder_se...
[ 0, 0 ]
Linux Kernel
drivers/ata/acard-ahci.c
static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) { struct ata_host *host = pci_get_drvdata(pdev); struct ahci_host_priv *hpriv = host->private_data; void __iomem *mmio = hpriv->mmio; u32 ctl; if (mesg.event & PM_EVENT_SUSPEND && hpriv-...
[ 0, 0 ]
Linux Kernel
drivers/ata/acard-ahci.c
static int acard_ahci_pci_device_resume(struct pci_dev *pdev) { struct ata_host *host = pci_get_drvdata(pdev); int rc; rc = ata_pci_device_do_resume(pdev); if (rc) return rc; if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { rc = ahci_reset_controller(host); if (rc) return rc; ...
[ 0, 0 ]
Linux Kernel
drivers/ata/acard-ahci.c
static unsigned int acard_ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl) { struct scatterlist *sg; struct acard_sg *acard_sg = cmd_tbl + AHCI_CMD_TBL_HDR_SZ; unsigned int si, last_si = 0; for_each_sg(qc->sg, sg, qc->n_elem, si) { dma_addr_t addr = sg_dma_addre...
[ 1, 0 ]
Linux Kernel
drivers/ata/acard-ahci.c
static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; struct ahci_port_priv *pp = ap->private_data; int is_atapi = ata_is_atapi(qc->tf.protocol); void *cmd_tbl; u32 opts; const u32 cmd_fis_len = 5; /* * Fill in command table information. First...
[ 1, 0 ]
Linux Kernel
drivers/ata/acard-ahci.c
static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc) { struct ahci_port_priv *pp = qc->ap->private_data; u8 *rx_fis = pp->rx_fis; if (pp->fbs_enabled) rx_fis += qc->dev->link->pmp * ACARD_AHCI_RX_FIS_SZ; if (qc->tf.protocol == ATA_PROT_PIO && qc->dma_dir == DMA_FROM_DEVICE && !(qc->flags & ...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci.c
static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); struct ata_port *ap = link->ap; struct ahci_port_priv *pp = ap->private_data; struct ahci_host_priv *hpriv = ap-...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci.c
static int ahci_pci_device_runtime_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct ata_host *host = pci_get_drvdata(pdev); ahci_pci_disable_interrupts(host); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci.c
static int ahci_pci_device_runtime_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct ata_host *host = pci_get_drvdata(pdev); int rc; rc = ahci_reset_controller(host); if (rc) return rc; ahci_pci_init_controller(host); return 0; } #ifdef CONFIG_PM_SLEEP
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci.c
static int ahci_pci_device_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct ata_host *host = pci_get_drvdata(pdev); int rc; if (is_mcp89_apple(pdev)) ahci_mcp89_apple_enable(pdev); if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { rc = ahci_reset_controller(host...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci.c
static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac) { const int dma_bits = using_dac ? 64 : 32; int rc; /* * If the device fixup already set the dma_mask to some non-standard * value, don't extend it here. This happens on STA2X11, for example. * * XXX: manipulating the DMA mask f...
[ 1, 1 ]
Linux Kernel
drivers/ata/ahci.c
static void ahci_p5wdh_workaround(struct ata_host *host) { static const struct dmi_system_id sysids[] = { { .ident = "P5W DH Deluxe", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTEK COMPUTER INC"), DMI_MATCH(DMI_PRODUCT_NAME, "P5W DH Deluxe")...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci.c
static bool ahci_broken_lpm(struct pci_dev *pdev) { static const struct dmi_system_id sysids[] = { { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X250"), }, .driver_data = "20180406...
[ 1, 1 ]
Linux Kernel
drivers/ata/ahci.c
static void ahci_gtf_filter_workaround(struct ata_host *host) { static const struct dmi_system_id sysids[] = { { .ident = "Aspire 3810T", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Acer"), DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3810T"), ...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci.c
static int ahci_get_irq_vector(struct ata_host *host, int port) { return pci_irq_vector(to_pci_dev(host->dev), port); }
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci.c
static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports, struct ahci_host_priv *hpriv) { int nvec; if (hpriv->flags & AHCI_HFLAG_NO_MSI) return -ENODEV; if (n_ports > 1) { nvec = pci_alloc_irq_vectors(pdev, n_ports, INT_MAX, PCI_IRQ_M...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci.c
static void ahci_update_initial_lpm_policy(struct ata_port *ap, struct ahci_host_priv *hpriv) { int policy = CONFIG_SATA_MOBILE_LPM_POLICY; if (!(hpriv->flags & AHCI_HFLAG_USE_LPM_POLICY)) return; /* user modified policy via module param */ if (mobile_lpm_policy ...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_brcm.c
static void brcm_sata_alpm_init(struct ahci_host_priv *hpriv) { struct brcm_ahci_priv *priv = hpriv->plat_data; u32 port_ctrl, host_caps; int i; host_caps = readl(hpriv->mmio + HOST_CAP); if (!(host_caps & HOST_CAP_ALPM)) hpriv->flags |= AHCI_HFLAG_YES_ALPM; /* * Adjust timeout to allow PLL suffici...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_brcm.c
static void brcm_sata_phys_enable(struct brcm_ahci_priv *priv) { int i; for (i = 0; i < SATA_TOP_MAX_PHYS; i++) if (priv->port_mask & BIT(i)) brcm_sata_phy_enable(priv, i); }
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_brcm.c
static void brcm_sata_init(struct brcm_ahci_priv *priv) { void __iomem *ctrl = priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL; u32 data; data = brcm_sata_readreg(ctrl); data &= ~BUS_CTRL_ENDIAN_CONF_MASK; if (priv->version == BRCM_SATA_NSP) data |= BUS_CTRL_ENDIAN_NSP_CONF; else data |= BUS_CTRL_ENDIAN_CO...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_brcm.c
static int brcm_ahci_suspend(struct device *dev) { struct ata_host *host = dev_get_drvdata(dev); struct ahci_host_priv *hpriv = host->private_data; struct brcm_ahci_priv *priv = hpriv->plat_data; int ret; brcm_sata_phys_disable(priv); if (IS_ENABLED(CONFIG_PM_SLEEP)) ret = ahci_platform_suspend(dev);...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_da850.c
static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg, void __iomem *ahci_base, u32 mpy) { unsigned int val; val = readl(pwrdn_reg); val &= ~BIT(0); writel(val, pwrdn_reg); val = SATA_PHY_MPY(mpy) | SATA_PHY_LOS(1) | SATA_PHY_RXCDR(4) | SATA_PHY_RXEQ(1) ...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_da850.c
static u32 ahci_da850_calculate_mpy(unsigned long refclk_rate) { u32 pll_output = 1500000000, needed; WARN((refclk_rate % 10) != 0, "refclk must be divisible by 10"); needed = pll_output / (refclk_rate / 10); /* * What we have now is (multiplier * 10). * * Let's determine the actual register value we...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_da850.c
static int ahci_da850_softreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { int pmp, ret; pmp = sata_srst_pmp(link); ret = ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready); if (pmp && ret == -EBUSY) return ahci_do_softreset(link, cla...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_dm816.c
static int ahci_dm816_phy_init(struct ahci_host_priv *hpriv, struct device *dev) { unsigned long refclk_rate; int mpy; u32 val; if (hpriv->n_clks < 2) { dev_err(dev, "reference clock not supplied\n"); return -EINVAL; } refclk_rate = clk_get_rate(hpriv->clks[1].clk); ...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_dwc.c
static struct ahci_host_priv * ahci_dwc_get_resources(struct platform_device *pdev) { struct ahci_dwc_host_priv *dpriv; struct ahci_host_priv *hpriv; dpriv = devm_kzalloc(&pdev->dev, sizeof(*dpriv), GFP_KERNEL); if (!dpriv) return ERR_PTR(-ENOMEM); dpriv->pdev = pdev; dpriv->pdata = device_get_match_...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_dwc.c
static int ahci_dwc_init_dmacr(struct ahci_host_priv *hpriv) { struct ahci_dwc_host_priv *dpriv = hpriv->plat_data; struct device_node *child; void __iomem *port_mmio; u32 port, dmacr, ts; for_each_child_of_node(dpriv->pdev->dev.of_node, child) { if (!of_device_is_available(child)) continue; i...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_imx.c
static int imx_phy_reg_write(u16 val, void __iomem *mmio) { u32 crval = val; int ret; writel(crval, mmio + IMX_P0PHYCR); /* Assert the cr_cap_data signal */ ret = imx_phy_crbit_assert(mmio, IMX_P0PHYCR_CR_CAP_DATA, true); if (ret) return ret; /* Deassert cr_cap_data */ ret = imx_phy_crbit_assert(...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_imx.c
static int sata_ahci_read_temperature(struct thermal_zone_device *tz, int *temp) { return __sata_ahci_read_temperature(tz->devdata, temp); }
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_imx.c
static void ahci_imx_host_stop(struct ata_host *host) { struct ahci_host_priv *hpriv = host->private_data; struct imx_ahci_priv *imxpriv = hpriv->plat_data; imx_sata_disable(hpriv); clk_disable_unprepare(imxpriv->sata_clk); }
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_mtk.c
static int mtk_ahci_parse_property(struct ahci_host_priv *hpriv, struct device *dev) { struct mtk_ahci_plat *plat = hpriv->plat_data; struct device_node *np = dev->of_node; if (of_find_property(np, "mediatek,phy-mode", NULL)) { plat->mode = syscon_regmap_lookup_by_phandle(n...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_mvebu.c
static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv) { writel(0x4, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_ADDR); writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA); }
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_mvebu.c
static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv) { const struct mbus_dram_target_info *dram; int rc = 0; dram = mv_mbus_dram_info(); if (dram) ahci_mvebu_mbus_config(hpriv, dram); else rc = -ENODEV; ahci_mvebu_regret_option(hpriv); return rc; }
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_platform.c
static int ahci_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct ahci_host_priv *hpriv; const struct ata_port_info *port; int rc; hpriv = ahci_platform_get_resources(pdev, AHCI_PLATFORM_GET_RESETS); if (IS_ERR(hpriv)) return PTR_ERR(hpriv); rc = ahci_platform_enable_res...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_qoriq.c
static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); void __iomem *port_mmio = ahci_port_base(link->ap); u32 px_cmd, px_is, px_val; struct ata_port *ap = link->a...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_st.c
static void st_ahci_configure_oob(void __iomem *mmio) { unsigned long old_val, new_val; new_val = (0x02 << ST_AHCI_OOBR_CWMIN_SHIFT) | (0x04 << ST_AHCI_OOBR_CWMAX_SHIFT) | (0x08 << ST_AHCI_OOBR_CIMIN_SHIFT) | (0x0C << ST_AHCI_OOBR_CIMAX_SHIFT); old_val = readl(mmio + ST_AHCI_OOBR); writel(old_val...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_st.c
static void st_ahci_host_stop(struct ata_host *host) { struct ahci_host_priv *hpriv = host->private_data; struct st_ahci_drv_data *drv_data = hpriv->plat_data; struct device *dev = host->dev; int err; if (drv_data->pwr) { err = reset_control_assert(drv_data->pwr); if (err) dev_err(dev, "unable...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_st.c
static int st_ahci_probe(struct platform_device *pdev) { struct st_ahci_drv_data *drv_data; struct ahci_host_priv *hpriv; int err; drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL); if (!drv_data) return -ENOMEM; hpriv = ahci_platform_get_resources(pdev, 0); if (IS_ERR(hpriv)) ...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_sunxi.c
static void ahci_sunxi_start_engine(struct ata_port *ap) { void __iomem *port_mmio = ahci_port_base(ap); struct ahci_host_priv *hpriv = ap->host->private_data; sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ffff, 0x00004433); /* Start DMA */ sunxi_setbits(port_mmio + PORT_CMD, PORT_CMD_START); }
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_sunxi.c
static int ahci_sunxi_resume(struct device *dev) { struct ata_host *host = dev_get_drvdata(dev); struct ahci_host_priv *hpriv = host->private_data; int rc; rc = ahci_platform_enable_resources(hpriv); if (rc) return rc; rc = ahci_sunxi_phy_init(dev, hpriv->mmio); if (rc) goto disable_resources; ...
[ 0, 0 ]
Linux Kernel
drivers/ata/ahci_tegra.c
static void tegra_ahci_handle_quirks(struct ahci_host_priv *hpriv) { struct tegra_ahci_priv *tegra = hpriv->plat_data; u32 val; if (tegra->sata_aux_regs && !tegra->soc->supports_devslp) { val = readl(tegra->sata_aux_regs + SATA_AUX_MISC_CNTL_1_0); val &= ~SATA_AUX_MISC_CNTL_1_0_SDS_SUPPORT; writel(v...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_xgene.c
static int xgene_ahci_do_hardreset(struct ata_link *link, unsigned long deadline, bool *online) { const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); struct ata_port *ap = link->ap; struct ahci_host_priv *hpriv = ap->host->private_data; struct xgene_ahci_cont...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_xgene.c
static int xgene_ahci_hardreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { struct ata_port *ap = link->ap; struct ahci_host_priv *hpriv = ap->host->private_data; void __iomem *port_mmio = ahci_port_base(ap); bool online; int rc; u32 portcmd_saved; ...
[ 1, 0 ]
Linux Kernel
drivers/ata/ahci_xgene.c
static int xgene_ahci_softreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { int pmp = sata_srst_pmp(link); struct ata_port *ap = link->ap; struct ahci_host_priv *hpriv = ap->host->private_data; struct xgene_ahci_context *ctx = hpriv->plat_data; void __...
[ 1, 0 ]