forked from rubenslte/android_kernel_samsung_msm8226
Merge "Merge 5eb3f44493 on remote branch"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
6bd5e50e8b
@@ -33,6 +33,7 @@
|
||||
|
||||
adsp_mem: adsp_region {
|
||||
linux,contiguous-region;
|
||||
linux,memory-limit = <0x0>;
|
||||
reg = <0 0x2a00000>;
|
||||
label = "adsp_mem";
|
||||
};
|
||||
|
||||
@@ -334,6 +334,7 @@ static int context_alloc(struct fastrpc_apps *me, uint32_t kernel,
|
||||
goto bail;
|
||||
|
||||
INIT_HLIST_NODE(&ctx->hn);
|
||||
hlist_add_fake(&ctx->hn);
|
||||
ctx->pra = (remote_arg_t *)(&ctx[1]);
|
||||
ctx->fds = invokefd->fds == 0 ? 0 : (int *)(&ctx->pra[bufs]);
|
||||
ctx->handles = invokefd->fds == 0 ? 0 :
|
||||
|
||||
+13
-3
@@ -273,7 +273,8 @@ kgsl_mem_entry_destroy(struct kref *kref)
|
||||
kgsl_mem_entry_detach_process(entry);
|
||||
|
||||
if (entry->memtype != KGSL_MEM_ENTRY_KERNEL)
|
||||
kgsl_driver.stats.mapped -= entry->memdesc.size;
|
||||
atomic_sub(entry->memdesc.size,
|
||||
&kgsl_driver.stats.mapped);
|
||||
|
||||
/*
|
||||
* Ion takes care of freeing the sglist for us so
|
||||
@@ -3080,8 +3081,8 @@ static long kgsl_ioctl_map_user_mem(struct kgsl_device_private *dev_priv,
|
||||
/* Adjust the returned value for a non 4k aligned offset */
|
||||
param->gpuaddr = entry->memdesc.gpuaddr + (param->offset & ~PAGE_MASK);
|
||||
|
||||
KGSL_STATS_ADD(param->len, kgsl_driver.stats.mapped,
|
||||
kgsl_driver.stats.mapped_max);
|
||||
KGSL_STATS_ADD(param->len, &kgsl_driver.stats.mapped,
|
||||
&kgsl_driver.stats.mapped_max);
|
||||
|
||||
kgsl_process_add_stats(private, entry->memtype, param->len);
|
||||
|
||||
@@ -4112,6 +4113,15 @@ struct kgsl_driver kgsl_driver = {
|
||||
* 8064 and 8974 once the region to be flushed is > 16mb.
|
||||
*/
|
||||
.full_cache_threshold = SZ_16M,
|
||||
|
||||
.stats.vmalloc = ATOMIC_INIT(0),
|
||||
.stats.vmalloc_max = ATOMIC_INIT(0),
|
||||
.stats.page_alloc = ATOMIC_INIT(0),
|
||||
.stats.page_alloc_max = ATOMIC_INIT(0),
|
||||
.stats.coherent = ATOMIC_INIT(0),
|
||||
.stats.coherent_max = ATOMIC_INIT(0),
|
||||
.stats.mapped = ATOMIC_INIT(0),
|
||||
.stats.mapped_max = ATOMIC_INIT(0),
|
||||
};
|
||||
EXPORT_SYMBOL(kgsl_driver);
|
||||
|
||||
|
||||
+16
-11
@@ -72,8 +72,14 @@
|
||||
the statisic is greater then _max, set _max
|
||||
*/
|
||||
|
||||
#define KGSL_STATS_ADD(_size, _stat, _max) \
|
||||
do { _stat += (_size); if (_stat > _max) _max = _stat; } while (0)
|
||||
static inline void KGSL_STATS_ADD(uint32_t size, atomic_t *stat,
|
||||
atomic_t *max)
|
||||
{
|
||||
uint32_t ret = atomic_add_return(size, stat);
|
||||
|
||||
if (ret > atomic_read(max))
|
||||
atomic_set(max, ret);
|
||||
}
|
||||
|
||||
#define KGSL_MAX_NUMIBS 100000
|
||||
|
||||
@@ -106,15 +112,14 @@ struct kgsl_driver {
|
||||
void *ptpool;
|
||||
|
||||
struct {
|
||||
unsigned int vmalloc;
|
||||
unsigned int vmalloc_max;
|
||||
unsigned int page_alloc;
|
||||
unsigned int page_alloc_max;
|
||||
unsigned int coherent;
|
||||
unsigned int coherent_max;
|
||||
unsigned int mapped;
|
||||
unsigned int mapped_max;
|
||||
unsigned int histogram[16];
|
||||
atomic_t vmalloc;
|
||||
atomic_t vmalloc_max;
|
||||
atomic_t page_alloc;
|
||||
atomic_t page_alloc_max;
|
||||
atomic_t coherent;
|
||||
atomic_t coherent_max;
|
||||
atomic_t mapped;
|
||||
atomic_t mapped_max;
|
||||
} stats;
|
||||
unsigned int full_cache_threshold;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011,2013-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
@@ -371,7 +371,7 @@ void kgsl_gpummu_destroy_pagetable(struct kgsl_pagetable *pt)
|
||||
kgsl_ptpool_free((struct kgsl_ptpool *)kgsl_driver.ptpool,
|
||||
gpummu_pt->base.hostptr);
|
||||
|
||||
kgsl_driver.stats.coherent -= KGSL_PAGETABLE_SIZE;
|
||||
atomic_sub(KGSL_PAGETABLE_SIZE, &kgsl_driver.stats.coherent);
|
||||
|
||||
kfree(gpummu_pt->tlbflushfilter.base);
|
||||
|
||||
@@ -469,8 +469,8 @@ static void *kgsl_gpummu_create_pagetable(void)
|
||||
/* ptpool allocations are from coherent memory, so update the
|
||||
device statistics acordingly */
|
||||
|
||||
KGSL_STATS_ADD(KGSL_PAGETABLE_SIZE, kgsl_driver.stats.coherent,
|
||||
kgsl_driver.stats.coherent_max);
|
||||
KGSL_STATS_ADD(KGSL_PAGETABLE_SIZE, &kgsl_driver.stats.coherent,
|
||||
&kgsl_driver.stats.coherent_max);
|
||||
|
||||
return (void *)gpummu_pt;
|
||||
|
||||
|
||||
+39
-36
@@ -158,8 +158,11 @@ sysfs_show_entries(struct kobject *kobj,
|
||||
|
||||
pt = _get_pt_from_kobj(kobj);
|
||||
|
||||
if (pt)
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", pt->stats.entries);
|
||||
if (pt) {
|
||||
unsigned int val = atomic_read(&pt->stats.entries);
|
||||
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", val);
|
||||
}
|
||||
|
||||
kgsl_put_pagetable(pt);
|
||||
return ret;
|
||||
@@ -175,8 +178,11 @@ sysfs_show_mapped(struct kobject *kobj,
|
||||
|
||||
pt = _get_pt_from_kobj(kobj);
|
||||
|
||||
if (pt)
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", pt->stats.mapped);
|
||||
if (pt) {
|
||||
unsigned int val = atomic_read(&pt->stats.mapped);
|
||||
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", val);
|
||||
}
|
||||
|
||||
kgsl_put_pagetable(pt);
|
||||
return ret;
|
||||
@@ -211,8 +217,11 @@ sysfs_show_max_mapped(struct kobject *kobj,
|
||||
|
||||
pt = _get_pt_from_kobj(kobj);
|
||||
|
||||
if (pt)
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", pt->stats.max_mapped);
|
||||
if (pt) {
|
||||
unsigned int val = atomic_read(&pt->stats.max_mapped);
|
||||
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", val);
|
||||
}
|
||||
|
||||
kgsl_put_pagetable(pt);
|
||||
return ret;
|
||||
@@ -228,8 +237,11 @@ sysfs_show_max_entries(struct kobject *kobj,
|
||||
|
||||
pt = _get_pt_from_kobj(kobj);
|
||||
|
||||
if (pt)
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", pt->stats.max_entries);
|
||||
if (pt) {
|
||||
unsigned int val = atomic_read(&pt->stats.max_entries);
|
||||
|
||||
ret += snprintf(buf, PAGE_SIZE, "%d\n", val);
|
||||
}
|
||||
|
||||
kgsl_put_pagetable(pt);
|
||||
return ret;
|
||||
@@ -476,6 +488,11 @@ kgsl_mmu_createpagetableobject(struct kgsl_mmu *mmu,
|
||||
pagetable->max_entries = KGSL_PAGETABLE_ENTRIES(ptsize);
|
||||
pagetable->fault_addr = 0xFFFFFFFF;
|
||||
|
||||
atomic_set(&pagetable->stats.entries, 0);
|
||||
atomic_set(&pagetable->stats.mapped, 0);
|
||||
atomic_set(&pagetable->stats.max_mapped, 0);
|
||||
atomic_set(&pagetable->stats.max_entries, 0);
|
||||
|
||||
/*
|
||||
* create a separate kgsl pool for IOMMU, global mappings can be mapped
|
||||
* just once from this pool of the defaultpagetable
|
||||
@@ -692,14 +709,16 @@ kgsl_mmu_get_gpuaddr(struct kgsl_pagetable *pagetable,
|
||||
memdesc->gpuaddr = gen_pool_alloc_aligned(pool, size,
|
||||
page_align);
|
||||
if (memdesc->gpuaddr == 0) {
|
||||
unsigned int entries = atomic_read(&pagetable->stats.entries);
|
||||
unsigned int mapped = atomic_read(&pagetable->stats.mapped);
|
||||
KGSL_CORE_ERR("gen_pool_alloc(%d) failed, pool: %s\n",
|
||||
size,
|
||||
(pool == pagetable->kgsl_pool) ?
|
||||
"kgsl_pool" : "general_pool");
|
||||
KGSL_CORE_ERR(" [%d] allocated=%d, entries=%d\n",
|
||||
pagetable->name,
|
||||
pagetable->stats.mapped,
|
||||
pagetable->stats.entries);
|
||||
mapped,
|
||||
entries);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
@@ -726,31 +745,19 @@ kgsl_mmu_map(struct kgsl_pagetable *pagetable,
|
||||
if (kgsl_memdesc_has_guard_page(memdesc))
|
||||
size += PAGE_SIZE;
|
||||
|
||||
if (KGSL_MMU_TYPE_IOMMU != kgsl_mmu_get_mmutype())
|
||||
spin_lock(&pagetable->lock);
|
||||
ret = pagetable->pt_ops->mmu_map(pagetable, memdesc, protflags,
|
||||
&pagetable->tlb_flags);
|
||||
if (KGSL_MMU_TYPE_IOMMU == kgsl_mmu_get_mmutype())
|
||||
spin_lock(&pagetable->lock);
|
||||
|
||||
if (ret)
|
||||
goto done;
|
||||
if (ret == 0) {
|
||||
KGSL_STATS_ADD(size, &pagetable->stats.mapped,
|
||||
&pagetable->stats.max_mapped);
|
||||
|
||||
/* Keep track of the statistics for the sysfs files */
|
||||
KGSL_STATS_ADD(size, &pagetable->stats.entries,
|
||||
&pagetable->stats.max_entries);
|
||||
|
||||
KGSL_STATS_ADD(1, pagetable->stats.entries,
|
||||
pagetable->stats.max_entries);
|
||||
memdesc->priv |= KGSL_MEMDESC_MAPPED;
|
||||
}
|
||||
|
||||
KGSL_STATS_ADD(size, pagetable->stats.mapped,
|
||||
pagetable->stats.max_mapped);
|
||||
|
||||
spin_unlock(&pagetable->lock);
|
||||
memdesc->priv |= KGSL_MEMDESC_MAPPED;
|
||||
|
||||
return 0;
|
||||
|
||||
done:
|
||||
spin_unlock(&pagetable->lock);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(kgsl_mmu_map);
|
||||
@@ -824,8 +831,6 @@ kgsl_mmu_unmap(struct kgsl_pagetable *pagetable,
|
||||
start_addr = memdesc->gpuaddr;
|
||||
end_addr = (memdesc->gpuaddr + size);
|
||||
|
||||
if (KGSL_MMU_TYPE_IOMMU != kgsl_mmu_get_mmutype())
|
||||
spin_lock(&pagetable->lock);
|
||||
pagetable->pt_ops->mmu_unmap(pagetable, memdesc,
|
||||
&pagetable->tlb_flags);
|
||||
|
||||
@@ -834,15 +839,13 @@ kgsl_mmu_unmap(struct kgsl_pagetable *pagetable,
|
||||
(pagetable->fault_addr < end_addr))
|
||||
pagetable->fault_addr = 0;
|
||||
|
||||
if (KGSL_MMU_TYPE_IOMMU == kgsl_mmu_get_mmutype())
|
||||
spin_lock(&pagetable->lock);
|
||||
/* Remove the statistics */
|
||||
pagetable->stats.entries--;
|
||||
pagetable->stats.mapped -= size;
|
||||
atomic_dec(&pagetable->stats.entries);
|
||||
atomic_sub(size, &pagetable->stats.mapped);
|
||||
|
||||
spin_unlock(&pagetable->lock);
|
||||
if (!kgsl_memdesc_is_global(memdesc))
|
||||
memdesc->priv &= ~KGSL_MEMDESC_MAPPED;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(kgsl_mmu_unmap);
|
||||
|
||||
@@ -114,10 +114,10 @@ struct kgsl_pagetable {
|
||||
struct kobject *kobj;
|
||||
|
||||
struct {
|
||||
unsigned int entries;
|
||||
unsigned int mapped;
|
||||
unsigned int max_mapped;
|
||||
unsigned int max_entries;
|
||||
atomic_t entries;
|
||||
atomic_t mapped;
|
||||
atomic_t max_mapped;
|
||||
atomic_t max_entries;
|
||||
} stats;
|
||||
const struct kgsl_mmu_pt_ops *pt_ops;
|
||||
unsigned int tlb_flags;
|
||||
|
||||
@@ -218,40 +218,25 @@ static int kgsl_drv_memstat_show(struct device *dev,
|
||||
unsigned int val = 0;
|
||||
|
||||
if (!strncmp(attr->attr.name, "vmalloc", 7))
|
||||
val = kgsl_driver.stats.vmalloc;
|
||||
val = atomic_read(&kgsl_driver.stats.vmalloc);
|
||||
else if (!strncmp(attr->attr.name, "vmalloc_max", 11))
|
||||
val = kgsl_driver.stats.vmalloc_max;
|
||||
val = atomic_read(&kgsl_driver.stats.vmalloc_max);
|
||||
else if (!strncmp(attr->attr.name, "page_alloc", 10))
|
||||
val = kgsl_driver.stats.page_alloc;
|
||||
val = atomic_read(&kgsl_driver.stats.page_alloc);
|
||||
else if (!strncmp(attr->attr.name, "page_alloc_max", 14))
|
||||
val = kgsl_driver.stats.page_alloc_max;
|
||||
val = atomic_read(&kgsl_driver.stats.page_alloc_max);
|
||||
else if (!strncmp(attr->attr.name, "coherent", 8))
|
||||
val = kgsl_driver.stats.coherent;
|
||||
val = atomic_read(&kgsl_driver.stats.coherent);
|
||||
else if (!strncmp(attr->attr.name, "coherent_max", 12))
|
||||
val = kgsl_driver.stats.coherent_max;
|
||||
val = atomic_read(&kgsl_driver.stats.coherent_max);
|
||||
else if (!strncmp(attr->attr.name, "mapped", 6))
|
||||
val = kgsl_driver.stats.mapped;
|
||||
val = atomic_read(&kgsl_driver.stats.mapped);
|
||||
else if (!strncmp(attr->attr.name, "mapped_max", 10))
|
||||
val = kgsl_driver.stats.mapped_max;
|
||||
val = atomic_read(&kgsl_driver.stats.mapped_max);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", val);
|
||||
}
|
||||
|
||||
static int kgsl_drv_histogram_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
int len = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
len += snprintf(buf + len, PAGE_SIZE - len, "%d ",
|
||||
kgsl_driver.stats.histogram[i]);
|
||||
|
||||
len += snprintf(buf + len, PAGE_SIZE - len, "\n");
|
||||
return len;
|
||||
}
|
||||
|
||||
static int kgsl_drv_full_cache_threshold_store(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
@@ -283,7 +268,6 @@ DEVICE_ATTR(coherent, 0444, kgsl_drv_memstat_show, NULL);
|
||||
DEVICE_ATTR(coherent_max, 0444, kgsl_drv_memstat_show, NULL);
|
||||
DEVICE_ATTR(mapped, 0444, kgsl_drv_memstat_show, NULL);
|
||||
DEVICE_ATTR(mapped_max, 0444, kgsl_drv_memstat_show, NULL);
|
||||
DEVICE_ATTR(histogram, 0444, kgsl_drv_histogram_show, NULL);
|
||||
DEVICE_ATTR(full_cache_threshold, 0644,
|
||||
kgsl_drv_full_cache_threshold_show,
|
||||
kgsl_drv_full_cache_threshold_store);
|
||||
@@ -297,7 +281,6 @@ static const struct device_attribute *drv_attr_list[] = {
|
||||
&dev_attr_coherent_max,
|
||||
&dev_attr_mapped,
|
||||
&dev_attr_mapped_max,
|
||||
&dev_attr_histogram,
|
||||
&dev_attr_full_cache_threshold,
|
||||
NULL
|
||||
};
|
||||
@@ -413,7 +396,8 @@ static void kgsl_page_alloc_unmap_kernel(struct kgsl_memdesc *memdesc)
|
||||
if (memdesc->hostptr_count)
|
||||
goto done;
|
||||
vunmap(memdesc->hostptr);
|
||||
kgsl_driver.stats.vmalloc -= memdesc->size;
|
||||
|
||||
atomic_sub(memdesc->size, &kgsl_driver.stats.vmalloc);
|
||||
memdesc->hostptr = NULL;
|
||||
done:
|
||||
mutex_unlock(&kernel_map_global_lock);
|
||||
@@ -425,7 +409,7 @@ static void kgsl_page_alloc_free(struct kgsl_memdesc *memdesc)
|
||||
struct scatterlist *sg;
|
||||
int sglen = memdesc->sglen;
|
||||
|
||||
kgsl_driver.stats.page_alloc -= memdesc->size;
|
||||
atomic_sub(memdesc->size, &kgsl_driver.stats.page_alloc);
|
||||
|
||||
kgsl_page_alloc_unmap_kernel(memdesc);
|
||||
|
||||
@@ -484,8 +468,9 @@ static int kgsl_page_alloc_map_kernel(struct kgsl_memdesc *memdesc)
|
||||
memdesc->hostptr = vmap(pages, count,
|
||||
VM_IOREMAP, page_prot);
|
||||
if (memdesc->hostptr)
|
||||
KGSL_STATS_ADD(memdesc->size, kgsl_driver.stats.vmalloc,
|
||||
kgsl_driver.stats.vmalloc_max);
|
||||
KGSL_STATS_ADD(memdesc->size,
|
||||
&kgsl_driver.stats.vmalloc,
|
||||
&kgsl_driver.stats.vmalloc_max);
|
||||
else
|
||||
ret = -ENOMEM;
|
||||
vfree(pages);
|
||||
@@ -539,7 +524,8 @@ done:
|
||||
static void kgsl_ebimem_free(struct kgsl_memdesc *memdesc)
|
||||
|
||||
{
|
||||
kgsl_driver.stats.coherent -= memdesc->size;
|
||||
atomic_sub(memdesc->size,
|
||||
&kgsl_driver.stats.coherent);
|
||||
kgsl_ebimem_unmap_kernel(memdesc);
|
||||
/* we certainly do not expect the hostptr to still be mapped */
|
||||
BUG_ON(memdesc->hostptr);
|
||||
@@ -568,7 +554,8 @@ done:
|
||||
|
||||
static void kgsl_coherent_free(struct kgsl_memdesc *memdesc)
|
||||
{
|
||||
kgsl_driver.stats.coherent -= memdesc->size;
|
||||
atomic_sub(memdesc->size,
|
||||
&kgsl_driver.stats.coherent);
|
||||
dma_free_coherent(NULL, memdesc->size,
|
||||
memdesc->hostptr, memdesc->physaddr);
|
||||
}
|
||||
@@ -629,7 +616,7 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc,
|
||||
struct kgsl_pagetable *pagetable,
|
||||
size_t size)
|
||||
{
|
||||
int pcount = 0, order, ret = 0;
|
||||
int pcount = 0, ret = 0;
|
||||
int j, len, page_size, sglen_alloc, sglen = 0;
|
||||
struct page **pages = NULL;
|
||||
pgprot_t page_prot = pgprot_writecombine(PAGE_KERNEL);
|
||||
@@ -789,14 +776,9 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc,
|
||||
outer_cache_range_op_sg(memdesc->sg, memdesc->sglen,
|
||||
KGSL_CACHE_OP_FLUSH);
|
||||
|
||||
order = get_order(size);
|
||||
|
||||
if (order < 16)
|
||||
kgsl_driver.stats.histogram[order]++;
|
||||
|
||||
done:
|
||||
KGSL_STATS_ADD(memdesc->size, kgsl_driver.stats.page_alloc,
|
||||
kgsl_driver.stats.page_alloc_max);
|
||||
KGSL_STATS_ADD(memdesc->size, &kgsl_driver.stats.page_alloc,
|
||||
&kgsl_driver.stats.page_alloc_max);
|
||||
|
||||
if ((memdesc->sglen_alloc * sizeof(struct page *)) > PAGE_SIZE)
|
||||
vfree(pages);
|
||||
@@ -868,8 +850,8 @@ kgsl_sharedmem_alloc_coherent(struct kgsl_memdesc *memdesc, size_t size)
|
||||
|
||||
/* Record statistics */
|
||||
|
||||
KGSL_STATS_ADD(size, kgsl_driver.stats.coherent,
|
||||
kgsl_driver.stats.coherent_max);
|
||||
KGSL_STATS_ADD(size, &kgsl_driver.stats.coherent,
|
||||
&kgsl_driver.stats.coherent_max);
|
||||
|
||||
err:
|
||||
if (result)
|
||||
@@ -920,8 +902,8 @@ _kgsl_sharedmem_ebimem(struct kgsl_memdesc *memdesc,
|
||||
if (result)
|
||||
goto err;
|
||||
|
||||
KGSL_STATS_ADD(size, kgsl_driver.stats.coherent,
|
||||
kgsl_driver.stats.coherent_max);
|
||||
KGSL_STATS_ADD(size, &kgsl_driver.stats.coherent,
|
||||
&kgsl_driver.stats.coherent_max);
|
||||
|
||||
err:
|
||||
if (result)
|
||||
|
||||
@@ -368,6 +368,9 @@ static void msm_vfe40_process_reset_irq(struct vfe_device *vfe_dev,
|
||||
static void msm_vfe40_process_halt_irq(struct vfe_device *vfe_dev,
|
||||
uint32_t irq_status0, uint32_t irq_status1)
|
||||
{
|
||||
if (irq_status1 & (1 << 8)) {
|
||||
msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0);
|
||||
}
|
||||
}
|
||||
|
||||
static void msm_vfe40_process_camif_irq(struct vfe_device *vfe_dev,
|
||||
@@ -1201,7 +1204,6 @@ static long msm_vfe40_axi_halt(struct vfe_device *vfe_dev,
|
||||
msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34);
|
||||
msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24);
|
||||
if (blocking) {
|
||||
init_completion(&vfe_dev->halt_complete);
|
||||
/* Halt AXI Bus Bridge */
|
||||
msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0);
|
||||
atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW);
|
||||
@@ -1211,7 +1213,9 @@ static long msm_vfe40_axi_halt(struct vfe_device *vfe_dev,
|
||||
axi_busy_flag = false;
|
||||
}
|
||||
}
|
||||
msm_camera_io_w_mb(0x0, vfe_dev->vfe_base + 0x2C0);
|
||||
else {
|
||||
msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
@@ -514,11 +514,11 @@ int32_t gc0339_config(struct msm_sensor_ctrl_t *s_ctrl,
|
||||
}
|
||||
|
||||
if (conf_array.addr_type == MSM_CAMERA_I2C_WORD_ADDR
|
||||
|| conf_array.data_type == MSM_CAMERA_I2C_WORD_DATA)
|
||||
|| conf_array.data_type == MSM_CAMERA_I2C_WORD_DATA
|
||||
|| !conf_array.size)
|
||||
break;
|
||||
|
||||
if ((!conf_array.size) ||
|
||||
(conf_array.size > I2C_SEQ_REG_DATA_MAX)) {
|
||||
if (conf_array.size > I2C_USER_REG_DATA_MAX) {
|
||||
pr_err("%s:%d failed\n", __func__, __LINE__);
|
||||
rc = -EFAULT;
|
||||
break;
|
||||
@@ -558,8 +558,7 @@ int32_t gc0339_config(struct msm_sensor_ctrl_t *s_ctrl,
|
||||
break;
|
||||
}
|
||||
|
||||
if ((!conf_array.size) ||
|
||||
(conf_array.size > I2C_SEQ_REG_DATA_MAX)) {
|
||||
if (conf_array.size > I2C_USER_REG_DATA_MAX) {
|
||||
pr_err("%s:%d failed\n", __func__, __LINE__);
|
||||
rc = -EFAULT;
|
||||
break;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <mach/rpm-regulator-smd.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#define I2C_USER_REG_DATA_MAX 1024
|
||||
/*#define CONFIG_MSMB_CAMERA_DEBUG*/
|
||||
#undef CDBG
|
||||
#ifdef CONFIG_MSMB_CAMERA_DEBUG
|
||||
|
||||
@@ -2144,11 +2144,23 @@ static void venus_hfi_core_clear_interrupt(struct venus_hfi_device *device)
|
||||
u32 intr_status = 0;
|
||||
int rc = 0;
|
||||
|
||||
if (!device) {
|
||||
dprintk(VIDC_ERR, "%s Invalid paramter: %p\n",
|
||||
__func__, device);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!device->callback)
|
||||
return;
|
||||
|
||||
mutex_lock(&device->write_lock);
|
||||
mutex_lock(&device->clk_pwr_lock);
|
||||
if (device->state == VENUS_STATE_DEINIT) {
|
||||
dprintk(VIDC_DBG, "SPURIOUS_INTR for device: 0x%x: "
|
||||
"times: %d interrupt_status: %d",
|
||||
(u32) device, ++device->spur_count, intr_status);
|
||||
goto err_clk_gating_off;
|
||||
}
|
||||
rc = venus_hfi_clk_gating_off(device);
|
||||
if (rc) {
|
||||
dprintk(VIDC_ERR,
|
||||
@@ -3749,6 +3761,7 @@ static void venus_hfi_unload_fw(void *dev)
|
||||
return;
|
||||
}
|
||||
if (device->resources.fw.cookie) {
|
||||
flush_workqueue(device->vidc_workq);
|
||||
flush_workqueue(device->venus_pm_workq);
|
||||
subsystem_put(device->resources.fw.cookie);
|
||||
venus_hfi_interface_queues_release(dev);
|
||||
|
||||
@@ -1057,6 +1057,7 @@ void dwc3_tx_fifo_resize_request(struct usb_ep *ep, bool qdss_enabled)
|
||||
}
|
||||
EXPORT_SYMBOL(dwc3_tx_fifo_resize_request);
|
||||
|
||||
static int dwc3_msm_link_clk_reset(struct dwc3_msm *mdwc, bool assert);
|
||||
static void dwc3_resume_work(struct work_struct *w);
|
||||
static void dwc3_msm_block_reset(struct dwc3_ext_xceiv *xceiv, bool core_reset);
|
||||
|
||||
@@ -1067,6 +1068,7 @@ static void dwc3_restart_usb_work(struct work_struct *w)
|
||||
struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);
|
||||
enum dwc3_chg_type chg_type;
|
||||
unsigned timeout = 50;
|
||||
int ret = 0;
|
||||
|
||||
dev_dbg(mdwc->dev, "%s\n", __func__);
|
||||
|
||||
@@ -1104,7 +1106,15 @@ static void dwc3_restart_usb_work(struct work_struct *w)
|
||||
/* perform block reset after ERROR events */
|
||||
if (dwc->err_evt_seen) {
|
||||
dev_dbg(mdwc->dev, "%s initiating block reset\n", __func__);
|
||||
dwc3_msm_block_reset(&mdwc->ext_xceiv, true);
|
||||
ret = dwc3_msm_link_clk_reset(mdwc, 1);
|
||||
if (ret)
|
||||
dev_err(mdwc->dev, "%s: clk assert failed\n", __func__);
|
||||
|
||||
usleep_range(1000, 1200);
|
||||
ret = dwc3_msm_link_clk_reset(mdwc, 0);
|
||||
if (ret)
|
||||
dev_err(mdwc->dev, "%s:clk deassrt failed\n", __func__);
|
||||
usleep_range(10000, 12000);
|
||||
}
|
||||
dwc->err_evt_seen = false;
|
||||
/* Force reconnect only if cable is still connected */
|
||||
@@ -1400,9 +1410,11 @@ static int dwc3_msm_link_clk_reset(struct dwc3_msm *mdwc, bool assert)
|
||||
if (assert) {
|
||||
/* Using asynchronous block reset to the hardware */
|
||||
dev_dbg(mdwc->dev, "block_reset ASSERT\n");
|
||||
clk_disable_unprepare(mdwc->ref_clk);
|
||||
clk_disable_unprepare(mdwc->iface_clk);
|
||||
clk_disable_unprepare(mdwc->core_clk);
|
||||
if (!atomic_read(&mdwc->in_lpm)) {
|
||||
clk_disable_unprepare(mdwc->ref_clk);
|
||||
clk_disable_unprepare(mdwc->iface_clk);
|
||||
clk_disable_unprepare(mdwc->core_clk);
|
||||
}
|
||||
ret = clk_reset(mdwc->core_clk, CLK_RESET_ASSERT);
|
||||
if (ret)
|
||||
dev_err(mdwc->dev, "dwc3 core_clk assert failed\n");
|
||||
@@ -1410,9 +1422,11 @@ static int dwc3_msm_link_clk_reset(struct dwc3_msm *mdwc, bool assert)
|
||||
dev_dbg(mdwc->dev, "block_reset DEASSERT\n");
|
||||
ret = clk_reset(mdwc->core_clk, CLK_RESET_DEASSERT);
|
||||
ndelay(200);
|
||||
clk_prepare_enable(mdwc->core_clk);
|
||||
clk_prepare_enable(mdwc->ref_clk);
|
||||
clk_prepare_enable(mdwc->iface_clk);
|
||||
if (!atomic_read(&mdwc->in_lpm)) {
|
||||
clk_prepare_enable(mdwc->core_clk);
|
||||
clk_prepare_enable(mdwc->ref_clk);
|
||||
clk_prepare_enable(mdwc->iface_clk);
|
||||
}
|
||||
if (ret)
|
||||
dev_err(mdwc->dev, "dwc3 core_clk deassert failed\n");
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
|
||||
ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
|
||||
DWC3_DEPCMD_STARTTRANSFER, ¶ms);
|
||||
if (ret < 0) {
|
||||
dbg_event(dep->number, "STTRAFL", ret);
|
||||
dev_dbg(dwc->dev, "failed to send STARTTRANSFER command\n");
|
||||
return ret;
|
||||
}
|
||||
@@ -303,7 +304,7 @@ void dwc3_ep0_out_start(struct dwc3 *dwc)
|
||||
|
||||
ret = dwc3_ep0_start_trans(dwc, 0, dwc->ctrl_req_addr, 8,
|
||||
DWC3_TRBCTL_CONTROL_SETUP);
|
||||
WARN_ON(ret < 0);
|
||||
WARN_ON_ONCE(ret < 0);
|
||||
}
|
||||
|
||||
static struct dwc3_ep *dwc3_wIndex_to_dep(struct dwc3 *dwc, __le16 wIndex_le)
|
||||
|
||||
@@ -1394,21 +1394,25 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value)
|
||||
if (value) {
|
||||
ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
|
||||
DWC3_DEPCMD_SETSTALL, ¶ms);
|
||||
if (ret)
|
||||
dev_err(dwc->dev, "failed to %s STALL on %s\n",
|
||||
if (ret) {
|
||||
dbg_event(dep->number, "SETSTAL", ret);
|
||||
dev_dbg(dwc->dev, "failed to %s STALL on %s\n",
|
||||
value ? "set" : "clear",
|
||||
dep->name);
|
||||
else
|
||||
} else {
|
||||
dep->flags |= DWC3_EP_STALL;
|
||||
}
|
||||
} else {
|
||||
ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
|
||||
DWC3_DEPCMD_CLEARSTALL, ¶ms);
|
||||
if (ret)
|
||||
dev_err(dwc->dev, "failed to %s STALL on %s\n",
|
||||
if (ret) {
|
||||
dbg_event(dep->number, "CLRSTAL", ret);
|
||||
dev_dbg(dwc->dev, "failed to %s STALL on %s\n",
|
||||
value ? "set" : "clear",
|
||||
dep->name);
|
||||
else
|
||||
} else {
|
||||
dep->flags &= ~(DWC3_EP_STALL | DWC3_EP_WEDGE);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -544,19 +544,19 @@ static void usb_phy_reset(struct msm_otg *motg)
|
||||
return;
|
||||
|
||||
/* Assert USB PHY_PON */
|
||||
val = readl_relaxed(USB_PHY_CTRL);
|
||||
val = readl_relaxed(motg->usb_phy_ctrl_reg);
|
||||
val &= ~PHY_POR_BIT_MASK;
|
||||
val |= PHY_POR_ASSERT;
|
||||
writel_relaxed(val, USB_PHY_CTRL);
|
||||
writel_relaxed(val, motg->usb_phy_ctrl_reg);
|
||||
|
||||
/* wait for minimum 10 microseconds as suggested in HPG. */
|
||||
usleep_range(10, 15);
|
||||
|
||||
/* Deassert USB PHY_PON */
|
||||
val = readl_relaxed(USB_PHY_CTRL);
|
||||
val = readl_relaxed(motg->usb_phy_ctrl_reg);
|
||||
val &= ~PHY_POR_BIT_MASK;
|
||||
val |= PHY_POR_DEASSERT;
|
||||
writel_relaxed(val, USB_PHY_CTRL);
|
||||
writel_relaxed(val, motg->usb_phy_ctrl_reg);
|
||||
|
||||
/* Ensure that RESET operation is completed. */
|
||||
mb();
|
||||
@@ -1027,7 +1027,7 @@ static int msm_otg_suspend(struct msm_otg *motg)
|
||||
if (motg->caps & ALLOW_PHY_RETENTION && !device_bus_suspend && !dcp &&
|
||||
(!host_bus_suspend || ((motg->caps & ALLOW_HOST_PHY_RETENTION)
|
||||
&& (pdata->dpdm_pulldown_added || !(portsc & PORTSC_CCS))))) {
|
||||
phy_ctrl_val = readl_relaxed(USB_PHY_CTRL);
|
||||
phy_ctrl_val = readl_relaxed(motg->usb_phy_ctrl_reg);
|
||||
if (motg->pdata->otg_control == OTG_PHY_CONTROL) {
|
||||
/* Enable PHY HV interrupts to wake MPM/Link */
|
||||
if ((motg->pdata->mode == USB_OTG) ||
|
||||
@@ -1042,10 +1042,11 @@ static int msm_otg_suspend(struct msm_otg *motg)
|
||||
PHY_DPSE_INTEN);
|
||||
|
||||
if (!(motg->caps & ALLOW_VDD_MIN_WITH_RETENTION_DISABLED)) {
|
||||
writel_relaxed(phy_ctrl_val & ~PHY_RETEN, USB_PHY_CTRL);
|
||||
writel_relaxed(phy_ctrl_val & ~PHY_RETEN,
|
||||
motg->usb_phy_ctrl_reg);
|
||||
motg->lpm_flags |= PHY_RETENTIONED;
|
||||
} else {
|
||||
writel_relaxed(phy_ctrl_val, USB_PHY_CTRL);
|
||||
writel_relaxed(phy_ctrl_val, motg->usb_phy_ctrl_reg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1191,7 +1192,7 @@ static int msm_otg_resume(struct msm_otg *motg)
|
||||
(motg->caps & ALLOW_VDD_MIN_WITH_RETENTION_DISABLED)) {
|
||||
msm_hsusb_mhl_switch_enable(motg, 1);
|
||||
msm_hsusb_config_vddcx(1);
|
||||
phy_ctrl_val = readl_relaxed(USB_PHY_CTRL);
|
||||
phy_ctrl_val = readl_relaxed(motg->usb_phy_ctrl_reg);
|
||||
phy_ctrl_val |= PHY_RETEN;
|
||||
if (motg->pdata->otg_control == OTG_PHY_CONTROL)
|
||||
/* Disable PHY HV interrupts */
|
||||
@@ -1199,7 +1200,7 @@ static int msm_otg_resume(struct msm_otg *motg)
|
||||
~(PHY_IDHV_INTEN | PHY_OTGSESSVLDHV_INTEN);
|
||||
phy_ctrl_val &= ~(PHY_CLAMP_DPDMSE_EN | PHY_DMSE_INTEN |
|
||||
PHY_DPSE_INTEN);
|
||||
writel_relaxed(phy_ctrl_val, USB_PHY_CTRL);
|
||||
writel_relaxed(phy_ctrl_val, motg->usb_phy_ctrl_reg);
|
||||
motg->lpm_flags &= ~PHY_RETENTIONED;
|
||||
}
|
||||
|
||||
@@ -4518,6 +4519,11 @@ static int __init msm_otg_probe(struct platform_device *pdev)
|
||||
}
|
||||
dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs);
|
||||
|
||||
if (pdata->enable_sec_phy)
|
||||
motg->usb_phy_ctrl_reg = USB_PHY_CTRL2;
|
||||
else
|
||||
motg->usb_phy_ctrl_reg = USB_PHY_CTRL;
|
||||
|
||||
motg->irq = platform_get_irq(pdev, 0);
|
||||
if (!motg->irq) {
|
||||
dev_err(&pdev->dev, "platform_get_irq failed\n");
|
||||
|
||||
@@ -738,11 +738,9 @@ int mdp3_iommu_attach(int context)
|
||||
if (context >= MDP3_IOMMU_CTX_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&mdp3_res->iommu_lock);
|
||||
context_map = mdp3_res->iommu_contexts + context;
|
||||
if (context_map->attached) {
|
||||
pr_warn("mdp iommu already attached\n");
|
||||
mutex_unlock(&mdp3_res->iommu_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -751,7 +749,6 @@ int mdp3_iommu_attach(int context)
|
||||
iommu_attach_device(domain_map->domain, context_map->ctx);
|
||||
|
||||
context_map->attached = true;
|
||||
mutex_unlock(&mdp3_res->iommu_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -764,11 +761,9 @@ int mdp3_iommu_dettach(int context)
|
||||
context >= MDP3_IOMMU_CTX_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&mdp3_res->iommu_lock);
|
||||
context_map = mdp3_res->iommu_contexts + context;
|
||||
if (!context_map->attached) {
|
||||
pr_warn("mdp iommu not attached\n");
|
||||
mutex_unlock(&mdp3_res->iommu_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -776,7 +771,6 @@ int mdp3_iommu_dettach(int context)
|
||||
iommu_detach_device(domain_map->domain, context_map->ctx);
|
||||
context_map->attached = false;
|
||||
|
||||
mutex_unlock(&mdp3_res->iommu_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -965,8 +959,15 @@ static int mdp3_res_init(void)
|
||||
|
||||
static void mdp3_res_deinit(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
mdp3_bus_scale_unregister();
|
||||
mdp3_iommu_dettach(MDP3_IOMMU_CTX_DMA_0);
|
||||
|
||||
mutex_lock(&mdp3_res->iommu_lock);
|
||||
for (i = 0; i < MDP3_IOMMU_CTX_MAX; i++)
|
||||
mdp3_iommu_dettach(i);
|
||||
mutex_unlock(&mdp3_res->iommu_lock);
|
||||
|
||||
mdp3_iommu_deinit();
|
||||
|
||||
if (!IS_ERR_OR_NULL(mdp3_res->ion_client))
|
||||
@@ -1720,12 +1721,14 @@ int mdp3_iommu_enable(int client)
|
||||
{
|
||||
int rc;
|
||||
|
||||
mutex_lock(&mdp3_res->iommu_lock);
|
||||
if (client == MDP3_CLIENT_DMA_P) {
|
||||
rc = mdp3_iommu_attach(MDP3_IOMMU_CTX_DMA_0);
|
||||
} else {
|
||||
rc = mdp3_iommu_attach(MDP3_IOMMU_CTX_PPP_0);
|
||||
rc |= mdp3_iommu_attach(MDP3_IOMMU_CTX_PPP_1);
|
||||
}
|
||||
mutex_unlock(&mdp3_res->iommu_lock);
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -1734,12 +1737,14 @@ int mdp3_iommu_disable(int client)
|
||||
{
|
||||
int rc;
|
||||
|
||||
mutex_lock(&mdp3_res->iommu_lock);
|
||||
if (client == MDP3_CLIENT_DMA_P) {
|
||||
rc = mdp3_iommu_dettach(MDP3_IOMMU_CTX_DMA_0);
|
||||
} else {
|
||||
rc = mdp3_iommu_dettach(MDP3_IOMMU_CTX_PPP_0);
|
||||
rc |= mdp3_iommu_dettach(MDP3_IOMMU_CTX_PPP_1);
|
||||
}
|
||||
mutex_unlock(&mdp3_res->iommu_lock);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -964,23 +964,25 @@ void mdss_fb_update_backlight(struct msm_fb_data_type *mfd)
|
||||
u32 temp;
|
||||
bool bl_notify = false;
|
||||
|
||||
mutex_lock(&mfd->bl_lock);
|
||||
if (mfd->unset_bl_level && !mfd->bl_updated) {
|
||||
pdata = dev_get_platdata(&mfd->pdev->dev);
|
||||
if ((pdata) && (pdata->set_backlight)) {
|
||||
mfd->bl_level = mfd->unset_bl_level;
|
||||
temp = mfd->bl_level;
|
||||
if (mfd->mdp.ad_calc_bl)
|
||||
(*mfd->mdp.ad_calc_bl)(mfd, temp, &temp,
|
||||
&bl_notify);
|
||||
if (bl_notify)
|
||||
mdss_fb_bl_update_notify(mfd);
|
||||
pdata->set_backlight(pdata, temp);
|
||||
mfd->bl_level_scaled = mfd->unset_bl_level;
|
||||
mfd->bl_updated = 1;
|
||||
if (mfd->unset_bl_level) {
|
||||
mutex_lock(&mfd->bl_lock);
|
||||
if (!mfd->bl_updated) {
|
||||
pdata = dev_get_platdata(&mfd->pdev->dev);
|
||||
if ((pdata) && (pdata->set_backlight)) {
|
||||
mfd->bl_level = mfd->unset_bl_level;
|
||||
temp = mfd->bl_level;
|
||||
if (mfd->mdp.ad_calc_bl)
|
||||
(*mfd->mdp.ad_calc_bl)(mfd, temp, &temp,
|
||||
&bl_notify);
|
||||
if (bl_notify)
|
||||
mdss_fb_bl_update_notify(mfd);
|
||||
pdata->set_backlight(pdata, temp);
|
||||
mfd->bl_level_scaled = mfd->unset_bl_level;
|
||||
mfd->bl_updated = 1;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&mfd->bl_lock);
|
||||
}
|
||||
mutex_unlock(&mfd->bl_lock);
|
||||
}
|
||||
|
||||
static int mdss_fb_blank_sub(int blank_mode, struct fb_info *info,
|
||||
|
||||
@@ -725,6 +725,7 @@ static int mdss_mdp_video_display(struct mdss_mdp_ctl *ctl, void *arg)
|
||||
if ((pdata->panel_info.cont_splash_enabled &&
|
||||
!ctl->mfd->splash_info.splash_logo_enabled)
|
||||
|| (ctl->mfd->splash_info.splash_logo_enabled
|
||||
&& ctl->mfd->splash_info.splash_thread
|
||||
&& !is_mdss_iommu_attached())) {
|
||||
rc = wait_for_completion_timeout(&ctx->vsync_comp,
|
||||
usecs_to_jiffies(VSYNC_TIMEOUT_US));
|
||||
|
||||
+3
-2
@@ -198,8 +198,9 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh,
|
||||
goto out_err;
|
||||
}
|
||||
/* copy the full handle */
|
||||
if (copy_from_user(handle, ufh,
|
||||
sizeof(struct file_handle) +
|
||||
*handle = f_handle;
|
||||
if (copy_from_user(&handle->f_handle,
|
||||
&ufh->f_handle,
|
||||
f_handle.handle_bytes)) {
|
||||
retval = -EFAULT;
|
||||
goto out_handle;
|
||||
|
||||
@@ -336,6 +336,7 @@ struct msm_otg_platform_data {
|
||||
* @sleep_clk: clock struct of sleep_clk for USB PHY.
|
||||
* @core_clk_rate: core clk max frequency
|
||||
* @regs: ioremapped register base address.
|
||||
* @usb_phy_ctrl_reg: relevant PHY_CTRL_REG register base address.
|
||||
* @inputs: OTG state machine inputs(Id, SessValid etc).
|
||||
* @sm_work: OTG state machine work.
|
||||
* @pm_suspended: OTG device is system(PM) suspended.
|
||||
@@ -382,6 +383,7 @@ struct msm_otg {
|
||||
long core_clk_rate;
|
||||
struct resource *io_res;
|
||||
void __iomem *regs;
|
||||
void __iomem *usb_phy_ctrl_reg;
|
||||
#define ID 0
|
||||
#define B_SESS_VLD 1
|
||||
#define ID_A 2
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#define I2C_SEQ_REG_DATA_MAX 20
|
||||
#define MAX_CID 16
|
||||
|
||||
#define I2C_USER_REG_DATA_MAX 1024
|
||||
|
||||
#define MSM_SENSOR_MCLK_8HZ 8000000
|
||||
#define MSM_SENSOR_MCLK_16HZ 16000000
|
||||
#define MSM_SENSOR_MCLK_24HZ 24000000
|
||||
|
||||
Reference in New Issue
Block a user