update this for support some GRF's register offset over 0x10000
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I8427e17fafa537980f2233483c23e8f3511fd9e9
The Audio PWM provides an easy and cheap solution for audio playback
in low quality. it acts as a digital-to-analog converter(DAC), which
converts the digital audio PCM data to the analog PWM signals.
Change-Id: I50ca4aebf4fc5c92ff07d2aa53e9d33b91035e46
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
It is too long to reset the time with 1000ms, which
would make the system init and resume slowly, 50ms
is enough.
Change-Id: Ifba39f401d14e161dd3d49e1b20ae102569ebb58
Signed-off-by: David Wu <david.wu@rock-chips.com>
VPU without hardware id register will be set with -1 for reg_id,
so fix the reg_id from u32 to int.
Change-Id: Ic3cf15f223610428f77fd5e3291e74974a2a7981
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
The flag IRQ_GC_INIT_MASK_CACHE indicates to initialize the mask_cache
by reading mask reg. The gpio controllers on rockchip SoCs need enable
pclk_gpio before read/write controllers.
The irq_enable in irq_chip will be called during irq request, but the
virq needs to be get before irq request, so it causes an read without
pclk of gpio.
This patch removes flag IRQ_GC_INIT_MASK_CACHE, set mask_cache of chip
after direct setting.
Change-Id: I8e1dcf649bb8021b90ffd08bc9b44ad71232d4da
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
when we create a kthread with ktrhead_create_on_cpu(),the child thread
entry is ktread.c:ktrhead() which will be preempted by the parent after
call complete(done) while schedule() is not called yet,then the parent
will call wait_task_inactive(child) but the child is still on the runqueue,
so the parent will schedule_hrtimeout() for 1 jiffy,it will waste a lot of
time,especially on startup.
parent child
ktrhead_create_on_cpu()
wait_fo_completion(&done) -----> ktread.c:ktrhead()
|----- complete(done);--wakeup and preempted by parent
kthread_bind() <------------| |-> schedule();--dequeue here
wait_task_inactive(child) |
schedule_hrtimeout(1 jiffy) -|
So we hope the child just wakeup parent but not preempted by parent, and the
child is going to call schedule() soon,then the parent will not call
schedule_hrtimeout(1 jiffy) as the child is already dequeue.
The same issue for ktrhead_park()&&kthread_parkme().
This patch can save 120ms on rk312x startup with CONFIG_HZ=300.
Change-Id: I2ae4edb538ea6f55cf5b8f8b5dc6311d1811a4ae
Signed-off-by: Liang Chen <cl@rock-chips.com>
The rockchip pinctrl creates an irq domain by irq_domain_add_linear,
but it not means all pins' irq are in linear.
Such as rk808 interrupt, it defines in node:
rk808 {
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
}
then i2c core driver will get virq by
irq = of_irq_get(dev->of_node, 0);
->irq_create_of_mapping(&oirq);
finally the rk808 irq is mapping in DOMAIN_BUS_WIRED irq domain.
It's better to get virq by irq_find_mapping.
Change-Id: Ib416ace5c2212c9a704b01e78f77d3425dc8d21b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
It takes time to create irq mapping for all pins in probe, remove
it since the mapping will be created in gpio_to_irq.
Change-Id: Idec03ea43711335190cf440fa30f9f4c654e4540
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Since all pins have been created mapping in probe, the create
mapping operation in gpio_to_irq will never happen, the issue
is hidened.
The patch add clk_enable/disable for gpio_to_irq.
Change-Id: I50c945f95f9f66ed3ab83a8c332893151272e9f6
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
The INNO MIPI D-PHY is built in witch a standard digital interface
to talk to any third part Host controller.That is part of Rockchip SoCs,
like rk3368.
Change-Id: I9806882e0e3fb6b20348015d0f34923d1bc46b89
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This reverts commit 4ef2449889.
The description for CRU_EMMC/SDMMC/SDIO_CON[0/1] is jumble on
chapters, make it clear that the correct shift is 1 that from
IC engineer.
Change-Id: I48dce293ec6ef82a5c78db38efc083227776ea99
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
ov13850 camera module used by rk3288 evb board
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I23ad3dcb06a9f5c748a9399f5d4e9e9b1936ca52
We have removed the driver dwc3-rockchip-inno, and the hclk_usb_peri
is controlled by clock system framework instead of USB driver.
This reverts commit 24992130f2.
Change-Id: I947342389a0f85bb7f322c3481349a3ee2d56298
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
We have removed the driver dwc3-rockchip-inno, and the hclk_usb_peri
is controlled by clock system framework instead of USB driver.
This reverts commit 00c75f4839.
Change-Id: I4184b074f1946f4ee8bd68c4dac5ff725272dfe7
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
1.Fixup memleak on pvr_create_pt_fence
2.Fixup crash on pvr_sync_has_signal
Change-Id: I999c8e96d0cab2814f5fdfbd8ea57ae6c30cd961
Signed-off-by: Li Huang <putin.li@rock-chips.com>
1、Change Android sync to sync_file
2、Fixup compile error on 4.19
3、Fixup some crash on 4.19
4、Fixup some clang waring
5、Fixup clang warning
Change-Id: Ie59a9252116f6e7cc97f5f9b9a25ae6d5d5f82b1
Signed-off-by: Li Huang <putin.li@rock-chips.com>
If a configs function sets bind_deactivated flag, upon removal it will be
left with an unbalanced deactivation. Let's make sure that we conditionally
call usb_function_activate() from purge_configs_funcs() and make sure
purge_configs_funcs() is called from configfs_composite_unbind().
Change-Id: Ibe91837fdb7754f8af343a18138556901a0e089f
Signed-off-by: William Wu <william.wu@rock-chips.com>
Fix the following build warnings in configfs driver instead of
scripts/gcc-wrapper.py.
"configfs.c:1488", # drivers/usb/gadget/configfs.c:1488:12: warning: 'configfs_composite_setup' defined but not used
"configfs.c:1513", # drivers/usb/gadget/configfs.c:1513:13: warning: 'configfs_composite_disconnect' defined but not used
Fixes: a77196fc01 ("ANDROID: usb: gadget: configfs: Add Uevent to notify userspace")
Change-Id: I58ef495d6e84af8000d0bd7a3ce3a2ed7947b71f
Signed-off-by: William Wu <william.wu@rock-chips.com>
1.When the system starts, enable vcc_lcd.
2.when the System sleep, disable vcc_lcd.
Change-Id: I29afc3e98a8cbe7ded65a8b9de1990fa2ea26b53
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
merge cmd:
MPP_CMD_SET_REG -->
MPP_CMD_SET_VEPU22_CFG -->
MPP_CMD_SET_RKVENC_OSD_PLT --> MPP_CMD_SET_REG_WRITE
MPP_CMD_SET_RKVENC_L2_REG -->
change cmd:
MPP_CMD_GET_REG --> MPP_CMD_SET_REG_READ
tips:
1. the xx_WRITE cmd is to write register, while xx_READ cmd is to
read register.
2. move MPP_CMD_GET_REG to MPP_CMD_SET_REG_READ, then it can set
output when input.
Change-Id: Iee1d5c6aafdfea5e0d02d1865cd06079ef5f716b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
If the USB cable is unplugged when powered on or connected to PC,
it will cause the system to freeze. The final log is as follows:
[ 5.109122] read descriptors
[ 5.109180] read strings
[ 5.113205] udc fe800000.dwc3: registering UDC driver [g1]
The crash is caused by visit registers of dwc3 when PD is off. the
function dwc3_gadget_set_speed is added in udc_bind_to_driver in
kernel 4.19 update. We need jump of this function when dwc3 is
suspended.
Change-Id: Ie0337aaf225543b4e9e05ee57a5eb7416797d56e
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
To avoid the potential parent PLL clock of display being
closed when PD is shutdown, excute protect loader clocks
earlier.
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I5125590aac51b423e7e9fdc0032da9185c450be1