The reserved root blocks is not enough for booting Android due to
the limit of 0.2% if the fs size too small. so we add a new mini-
mum limit is 128MB.
Change-Id: I5af3b182001d27e4d18b4090c5270bbb2ac6253b
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
Here should use the mapped grp as a reference, not idx.
Change-Id: Ia40dafc11f4f5f077f764f49985bb8d3ec800c28
Reported-by: Lin Jianhua <linjh@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
After commit 7e4da3fcf7 ("usb: gadget: composite:
Test get_alt() presence instead of set_alt()") f_uac1
function became broken because it doesn't have
get_alt() callback implementation and composite
framework never set altsetting 1 for audiostreaming
interface. On host site it looks like:
[424339.017711] 21:1:1: usb_set_interface failed (-32)
Since host can't set altsetting 1, it can't start
playing audio.
In order to fix it implemented get_alt along with
minor improvements (error conditions checking)
similar to what existing f_uac2 has.
Change-Id: I41d59c69e3b300b164e6267c48c1367e8d38b098
Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 1fc4926d92)
To avoid "too much work for irq" issue, cherry pick the the patch.
It reads the RBR to clear the time out interrupt, but sometime the
rx fifo may be not empty while cpu reads the RBR. Which would cause
the data lost.
patch for "too much work":06451e93ab59e5b1843c29cbb468a274f4919563
By the way, current patch can't get rid of the risk entirely, so I
try a lot to solve it. Unfortunately, I only got the phenomenon that
lower pclk can reduce the probability. And I check the dw data sheet,
it has pclk and sclk, so there is synchronization problem. But it
only requires (slck < 4*pclk).
Change-Id: I01a36c689b43310294c45294abcf4982f5ddf2af
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This patch tried to rename arch/arm64/boot/dts/rockchip/
{rk3326-evb-linux-lp3-v10.dts => rk3326-evb-lp3-v10-linux.dts},
and correct the right things as below.
* define the rootfs type as the squashfs.
* fixes some typo
* copyright to 2018
Change-Id: I5fed2e472c979d5209222ad51281b01148379efb
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
If edid can't be got when hdmi plug in, hdmi color depth mask and format
won't be updated. The color list in the setting are those of the previous
TV. This commit fix the error.
Change-Id: Iffe3164af1f1ad32002c26b5bbac14f2ff417c96
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
If edid can't be got when hdmi plug in, hdmi color depth mask and format
won't be updated. The color list in the setting are those of the previous
TV. This commit fix the error.
Change-Id: I5ed4be5efa2a69be0b58489f58a3af5de9912292
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
The isp_sd .get_fmt of source pad return format of input by mistake.
It should be the *out_fmt of isp_sd.
Change-Id: I9f592a2906275ef58dc564d68de63aac393c8690
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
This patch kill instructs the DMAC to immediately terminate
execution of a thread. and then clear the interrupt status,
at last, stop generating interrupts for DMA_SEV. to guarantee
the next dma start is clean. otherwise, one interrupt maybe leave
to next start and make some mistake.
we can reporduce the problem as follows:
DMASEV: modify the event-interrupt resource, and if the INTEN sets
function as interrupt, the DMAC will set irq<event_num> HIGH to
generate interrupt. write INTCLR to clear interrupt.
DMA EXECUTING INSTRUCTS DMA TERMINATE
| |
| |
... _stop
| |
| spin_lock_irqsave
DMASEV |
| |
| mask INTEN
| |
| DMAKILL
| |
| spin_unlock_irqrestore
in above case, a interrupt was left, and if we unmask INTEN, the DMAC
will set irq<event_num> HIGH to generate interrupt.
to fix this, do as follows:
DMA EXECUTING INSTRUCTS DMA TERMINATE
| |
| |
... _stop
| |
| spin_lock_irqsave
DMASEV |
| |
| DMAKILL
| |
| clear INTCLR
| mask INTEN
| |
| spin_unlock_irqrestore
Change-Id: I5d452cad70964c519b53711a292d2d2714b811a1
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
DPLL isn't the parent clock of ddr, we may need to change dpll rate for
other devices.
Change-Id: I2b41ccf6df78803980be08e4b82cbfb5c7718b69
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
To differentiate extend colorimetry and normal colorimetry, we
add the offset HDMI_COLORIMETRY_EXTENDED in colorimetry property.
It should use same value in dw_hdmi_rockchip_select_output.
Change-Id: I13e10b6e8211e7a2634dbd4b6c5310bc129bfa8d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
OPTEE supports multicore, so the lock before enter tee
is needless and can be removed to avoid unnecessary waiting.
Change-Id: I4e9c5876ba69e362b598e0c0ca78e12a96704b58
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
The commit c64eaccc619f ("usb: dwc_otg_310: map ep to
corresponding TxFIFO number") use a fixed mapping between
the endpint addresses and the TxFIFO number. The TxFIFO
number 1 is assigned to ep1-in, and the TxFIFO number 2
is assigned to ep3-in. For uvc function, the ep1-in is
used for uvc control ep (interrupt), and the ep3-in is
used for uvc stream ep. So resize the depth of TxFIFO
number 1 to 512 Bytes, and resize the depth of TxFIFO
number 2 to 1024 Bytes.
Change-Id: I07a89aab01206f6b6f853886d564130abffc1586
Signed-off-by: William Wu <william.wu@rock-chips.com>
In Dedicated FIFO mode, it uses a simple logic to assign
TxFIFO number for each active endpoint. But it doesn't
guarantee that the FIFO depth is suitable for the maxpacket
of the endpoint. We may meet ep TxFIFO problem if we use
a composite device with more than three functions.
In my test case, I configure an usb composite device with
four functions on rv108: Mass storage + ADB + Rndis + HID.
when the functions are enabled:
echo "mass_storage,ffs,rndis,hidg0" > /sys/class/android_usb/android0/functions
The mass_storage works abnormally because that the mass
storage gadget driver calls ep_enable operation at last,
and the ep1-in of mass_storage is assigned with TxFIFO
number 5. The FIFO mapping between the endpint addresses
and the TxFIFO number is:
Ep1-IN msc bulk => TxFIFO number 5, FIFO depth 64 Bytes
Ep3-IN adb bulk => TxFIFO number 1, FIFO depth 1024 Bytes
Ep5-IN rndis bulk => TxFIFO number 3, FIFO depth 512 Bytes
Ep7-IN rndis interrupt => TxFIFO number 2, FIFO depth 512 Bytes
Ep8-IN hid interrupt => TxFIFO number 4, FIFO depth 384 Bytes
This patch use a fixed mapping between the endpint addresses
and the TxFIFO number like this:
EP1-IN => TxFIFO number 1
EP3-IN => TxFIFO number 2
EP5-IN => TxFIFO number 3
EP7-IN => TxFIFO number 4
EP8-IN => TxFIFO number 5
EP9-IN => TxFIFO number 6
With this patch, in my test case (Mass storage+ ADB + Rndis + HID)
the FIFO mapping is:
Ep1-IN msc bulk => TxFIFO number 1, FIFO depth 1024 Bytes
Ep3-IN adb bulk => TxFIFO number 2, FIFO depth 512 Bytes
Ep5-IN rndis bulk => TxFIFO number 3, FIFO depth 512 Bytes
Ep7-IN rndis interrupt => TxFIFO number 4, FIFO depth 384 Bytes
Ep8-IN hid interrupt => TxFIFO number 5, FIFO depth 64 Bytes
Change-Id: Id00ed7e78d26d87b6c473ea84d1b1901ef25171e
Signed-off-by: William Wu <william.wu@rock-chips.com>
When compile rk-vcodec as ko some unexported functions will fail the
compiling. This patch will fix this issue.
Change-Id: I8afcb4bc3858f0e9efa54e4996cdcb6a45bbe1e1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This patch fliter the playback for vad, because vad only
handle capture.
Change-Id: I96ec24870adc4441081b39030056ed9361477bf3
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
If the VAD which using ACODEC and AMIC is active,
we need to keep ACODEC ADCs enabled during suspend,
otherwise, the system can not be waken up.
Change-Id: I0e6d07608f5ec514f94013a255d9061a138fbee2
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
The 'userspace' governor adds a sysfs entry, which is removed when
the governor is changed, or the devfreq device is released. However,
when the latter occurs via device_unregister(), device_del() is
called first, which removes the sysfs entries recursively and deletes
the kobject.
This means we get an Oops when the governor calls
sysfs_remove_group() on the deleted kobject. Fix this by only doing
the call when kobj *hasn't* been kobject_del()'d.
Note that we can't just remove the call to sysfs_remove_group()
entirely - it's needed for when the governor is changed to one which
doesn't need a sysfs entry.
Change-Id: I2ddad9d062ebb1a64582a15cd5b9efc5882bc848
Signed-off-by: Chris Diamand <chris.diamand@arm.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 924b9111a1)
Signed-off-by: Liang Chen <cl@rock-chips.com>
There can be a race, if receive_buf call comes before
tty initialization completes in n_tty_open and tty->disc_data
may be NULL.
CPU0 CPU1
---- ----
000|n_tty_receive_buf_common() n_tty_open()
-001|n_tty_receive_buf2() tty_ldisc_open.isra.3()
-002|tty_ldisc_receive_buf(inline) tty_ldisc_setup()
Using ldisc semaphore lock in tty_init_dev till disc_data
initializes completely.
Reviewed-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Change-Id: I3ba3cbd7dcb867a110878c8d0c47e6b920edd0b9
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
(cherry-picked from commit b027e2298b)
This board exposes a bunch of nice peripherals, including MIPI CSI/CIF,
Ethernet, WIFI, two VOPs and USB HOST/OTG....
Change-Id: I8ca3bc231875c92e5a5b9ed8016bc89feb134fb0
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
If we would like to wake up via VAD with ACODEC and AMIC,
we need to keep enabling aocdec ADCs after close audio
capture stream, otherwise, the DUT can not be waken up.
This patch can help us to specify the needed ADCs which
are just used for VAD, other ADCs can be closed during
stop capture stream.
Change-Id: I621343902b8c603a5fcbd7875aaa562a29386b04
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
The fbdev_helper would not be available when CONFIG_DRM_FBDEV_EMULATION
is disabled.
Change-Id: I9f79c170e862f24eb717c7940d8acaefd060740f
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This reverts commit e2e7ae2203.
This is a temporary workaround.
Change-Id: I77dbfec1e5e4d9921bc8b8bf6fc8687e7b1744e2
Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Px3se-evb board has two codecs es8396 and rk312x-codec.
ES8396 is enable by default. One can switch to rk312x-codec
via hardware rework: R7007, R7005, R7214, R7215.
This adds both es8396 and rk312x-codec but makes the latter one
disabled.
Change-Id: I51cad8bc50da8500c527d10ed52465c8f55d77c7
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
This enables CONFIG_VIDEO_ROCKCHIP_CIF and CONFIG_VIDEO_ADV7181D
for rockchip_linux_defconfig.
Change-Id: I657e757d80a8e2a581631eedd2b3a19254658883
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
This patch adds a new cif driver that is based on the
media controller, async subdev and vb2.
It now works in oneframe mode to receive yuv or bayer raw data.
Change-Id: I34047715405ac8b4eaafc71cc8983b9afa3c0006
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
replace tab by spaces.
Fixes: 23c2ba084d ("Use standard lz4 format for Image.lz4 on ARM64")
Change-Id: I77ebb48ed0c9fa8bd427e10856065d681070bb6b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
If the usb otg work as host mode or work as peripheral mode
with vbus always on, the otg_sm_work won't be initialized,
so flush the otg_sm_work in rockchip_usb2phy_exit() will
casuse the following lock warning:
[<ffffff800808b1e0>] dump_backtrace+0x0/0x1ec
[<ffffff800808b3e0>] show_stack+0x14/0x1c
[<ffffff8008403f3c>] dump_stack+0xb8/0xf4
[<ffffff8008107f40>] __lock_acquire+0x670/0x1984
[<ffffff8008109a60>] lock_acquire+0x1a4/0x264
[<ffffff8008129d2c>] del_timer_sync+0x48/0xb8
[<ffffff80080c3c94>] flush_delayed_work+0x20/0x50
[<ffffff80084344ac>] rockchip_usb2phy_exit+0x48/0x58
[<ffffff8008432bc4>] phy_exit+0x64/0xb4
[<ffffff80086733b8>] dwc3_core_exit+0x44/0x98
[<ffffff80086736c4>] dwc3_remove+0x90/0xe4
[<ffffff80085a5a5c>] platform_drv_remove+0x28/0x48
[<ffffff80085a3d14>] __device_release_driver+0xac/0x114
[<ffffff80085a3da4>] device_release_driver+0x28/0x3c
[<ffffff80085a2f38>] bus_remove_device+0x110/0x128
[<ffffff80085a0404>] device_del+0x160/0x1f8
[<ffffff80085a5954>] platform_device_del+0x20/0x88
[<ffffff80085a59d0>] platform_device_unregister+0x14/0x28
[<ffffff80088820f4>] of_platform_device_destroy+0x54/0xa8
[<ffffff800859f790>] device_for_each_child+0x68/0x98
[<ffffff8008882084>] of_platform_depopulate+0x30/0x4c
[<ffffff8008680030>] dwc3_rockchip_probe+0x4d4/0x574
[<ffffff80085a5ad4>] platform_drv_probe+0x58/0xa4
[<ffffff80085a396c>] driver_probe_device+0x118/0x2b0
[<ffffff80085a3b70>] __driver_attach+0x6c/0x98
[<ffffff80085a29d0>] bus_for_each_dev+0x80/0xb0
[<ffffff80085a34a0>] driver_attach+0x20/0x28
[<ffffff80085a3038>] bus_add_driver+0xe8/0x1e4
[<ffffff80085a4ad4>] driver_register+0x94/0xe0
[<ffffff80085a5a2c>] __platform_driver_register+0x48/0x50
[<ffffff8009222224>] dwc3_rockchip_driver_init+0x18/0x20
[<ffffff80080839f4>] do_one_initcall+0x17c/0x198
[<ffffff80091f0e48>] kernel_init_freeable+0x1f8/0x2b0
[<ffffff8008c61810>] kernel_init+0x10/0xf8
[<ffffff80080832c0>] ret_from_fork+0x10/0x50
This patch only allows to flush the otg_sm_work when the usb
bvalid irq is valid.
Fixes: f6fac8b68a ("phy: rockchip: rockchip-inno-usb2: flush otg work when exit")
Change-Id: I4dbe34fa9a330f22abb24ccd625da33425a9f753
Signed-off-by: William Wu <william.wu@rock-chips.com>