Age | Commit message (Collapse) | Author | Files | Lines |
|
Add G2D clocks for Exynos4x12 SoC and sclk_fimg2d required by G2D
IP.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
|
|
There is no usage for s6d6aa1_read_id().
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
|
|
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
|
|
To increase the performance, use the packed command
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
|
|
Add the capabilities2 of controller to use *_CAP2_*
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
|
|
To ensure mmcblk0 for eMMC, must call the dwmmc before calling sdhci.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
|
|
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
|
|
This patch makes g2d power domain and clock to be controlled
with runtime pm interfaces instead of controlling them
respectively.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
mmc4_clk set to CLK_SET_PARENT with DIV_F().
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
|
|
As of now we rely on code outside of the driver to set the ciu clock
frequency. There's no reason to do that. Add support for setting up
the clock in the driver during probe.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
It is possible to specify a regulator that should be turned on when
dw_mmc is probed. At the moment dw_mmc will fail to use the regulator
properly if the regulator probes after dw_mmc. Fix this problem by
honoring EPROBE_DEFER.
At the same time move the regulator code out of the slot init code.
We only specify one regulator for the whole device and other parts of
the code (like suspend/resume) assume that the regulator has only been
enabled once.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
At Interrupt status register, Bit9 is Data Read Timeout.
But we used macro name as the DTO. It could be confused with the
Data Transfer Over(DTO)-Bit[3].
It's clearly that is changed the DRTO instead of DTO.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
If pending interrupt for IDMAC exists when initialize IDMAC, it will
call interrupt handler unnecessarily.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
Fix to return -ENOMEM in alloc workqueue error case instead
of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
This patch just changes clk_enable/disable to
clk_prepare_enable/clk_disable_unprepare.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
Exynos drm drivers don't need to export device tables because
all devices of Exynos drm include in one SoC so they cannot be
plugged in.
P.S. we need to create MODULE_DEVICE_TABLE in case of enabling
the linux-hotplug system to load the driver automatically when
the device is plugged in.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
This ops has just a free callback to release resource for each
device driver. free callback will be called when device driver's
sync object is freed. So device drivers should implement this callback
so that their own contexts can be cleaned up regarding sync object.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
This patch fixes the issue that a sync object is unlocked
when shared_cnt is bigger than 1 and sobj->access_type is write.
the below number means shared_cnt and three sync objects share
one buffer,
r r r w
when write locked 1 2 3 3 <- blocked
when read unlocked 2
when read unlocked 1
when read unlocked 1 <- waked up
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
Non init data, exynos_cpufreq_driver references init data,
exynos_cpufreq_probe and exynos_cpufreq_of_match, and this causes
section mismatch.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
|
|
max77693_charger_of_match with __initconst flag is referenced from
max77693_charger_driver which is non init data and this causes
section mismatch. So flag __initconst is removed.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
|
|
The init function should have __init flag to match reference
sections.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
|
|
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
user process needs read/write permissions when the user process tires
buffer lock with a exported dmabuf fd through fcntl system call.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
This patch adds lock callback to dma buf file operations,
and this callback will be called by fcntl system call.
With this patch, fcntl system call can be used for buffer
synchronization between CPU and CPU, and CPU and DMA in user mode.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
With this patch, all cache operations will be done in kernel side
instead of user side.
P.S. basically, not only user shouldn't need to request cache operation
to kernel but also kernel should't need such things. However, we would
have performance overhead by unnecessary cache operations if we conform
with mainline style: cache sync just before memory ownership moves from
CPU to DMA, and just after memory ownership moves from DMA to CPU.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
This patch adds a buffer synchronization framework based on DMA BUF[1]
and and based on ww-mutexes[2] for lock mechanism.
The purpose of this framework is to provide not only buffer access control
to CPU and DMA but also easy-to-use interfaces for device drivers and
user application. This framework can be used for all dma devices using
system memory as dma buffer, especially for most ARM based SoCs.
Changelog v5:
- Rmove a dependence on reservation_object: the reservation_object is used
to hook up to ttm and dma-buf for easy sharing of reservations across
devices. However, the dmabuf sync can be used for all dma devices; v4l2
and drm based drivers, so doesn't need the reservation_object anymore.
With regared to this, it adds 'void *sync' to dma_buf structure.
- All patches are rebased on mainline, Linux v3.10.
Changelog v4:
- Add user side interface for buffer synchronization mechanism and update
descriptions related to the user side interface.
Changelog v3:
- remove cache operation relevant codes and update document file.
Changelog v2:
- use atomic_add_unless to avoid potential bug.
- add a macro for checking valid access type.
- code clean.
The mechanism of this framework has the following steps,
1. Register dmabufs to a sync object - A task gets a new sync object and
can add one or more dmabufs that the task wants to access.
This registering should be performed when a device context or an event
context such as a page flip event is created or before CPU accesses a shared
buffer.
dma_buf_sync_get(a sync object, a dmabuf);
2. Lock a sync object - A task tries to lock all dmabufs added in its own
sync object. Basically, the lock mechanism uses ww-mutex[1] to avoid dead
lock issue and for race condition between CPU and CPU, CPU and DMA, and DMA
and DMA. Taking a lock means that others cannot access all locked dmabufs
until the task that locked the corresponding dmabufs, unlocks all the locked
dmabufs.
This locking should be performed before DMA or CPU accesses these dmabufs.
dma_buf_sync_lock(a sync object);
3. Unlock a sync object - The task unlocks all dmabufs added in its own sync
object. The unlock means that the DMA or CPU accesses to the dmabufs have
been completed so that others may access them.
This unlocking should be performed after DMA or CPU has completed accesses
to the dmabufs.
dma_buf_sync_unlock(a sync object);
4. Unregister one or all dmabufs from a sync object - A task unregisters
the given dmabufs from the sync object. This means that the task dosen't
want to lock the dmabufs.
The unregistering should be performed after DMA or CPU has completed
accesses to the dmabufs or when dma_buf_sync_lock() is failed.
dma_buf_sync_put(a sync object, a dmabuf);
dma_buf_sync_put_all(a sync object);
The described steps may be summarized as:
get -> lock -> CPU or DMA access to a buffer/s -> unlock -> put
This framework includes the following two features.
1. read (shared) and write (exclusive) locks - A task is required to declare
the access type when the task tries to register a dmabuf;
READ, WRITE, READ DMA, or WRITE DMA.
The below is example codes,
struct dmabuf_sync *sync;
sync = dmabuf_sync_init(NULL, "test sync");
dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_R);
...
And the below can be used as access types:
DMA_BUF_ACCESS_R - CPU will access a buffer for read.
DMA_BUF_ACCESS_W - CPU will access a buffer for read or write.
DMA_BUF_ACCESS_DMA_R - DMA will access a buffer for read
DMA_BUF_ACCESS_DMA_W - DMA will access a buffer for read or
write.
2. Mandatory resource releasing - a task cannot hold a lock indefinitely.
A task may never try to unlock a buffer after taking a lock to the buffer.
In this case, a timer handler to the corresponding sync object is called
in five (default) seconds and then the timed-out buffer is unlocked by work
queue handler to avoid lockups and to enforce resources of the buffer.
The below is how to use interfaces for device driver:
1. Allocate and Initialize a sync object:
struct dmabuf_sync *sync;
sync = dmabuf_sync_init(NULL, "test sync");
...
2. Add a dmabuf to the sync object when setting up dma buffer relevant
registers:
dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
...
3. Lock all dmabufs of the sync object before DMA or CPU accesses
the dmabufs:
dmabuf_sync_lock(sync);
...
4. Now CPU or DMA can access all dmabufs locked in step 3.
5. Unlock all dmabufs added in a sync object after DMA or CPU access
to these dmabufs is completed:
dmabuf_sync_unlock(sync);
And call the following functions to release all resources,
dmabuf_sync_put_all(sync);
dmabuf_sync_fini(sync);
You can refer to actual example codes:
"drm/exynos: add dmabuf sync support for g2d driver" and
"drm/exynos: add dmabuf sync support for kms framework" from
https://git.kernel.org/cgit/linux/kernel/git/daeinki/
drm-exynos.git/log/?h=dmabuf-sync
And this framework includes fcntl system call[3] as interfaces exported
to user. As you know, user sees a buffer object as a dma-buf file descriptor.
So fcntl() call with the file descriptor means to lock some buffer region being
managed by the dma-buf object.
The below is how to use interfaces for user application:
struct flock filelock;
1. Lock a dma buf:
filelock.l_type = F_WRLCK or F_RDLCK;
/* lock entire region to the dma buf. */
filelock.lwhence = SEEK_CUR;
filelock.l_start = 0;
filelock.l_len = 0;
fcntl(dmabuf fd, F_SETLKW or F_SETLK, &filelock);
...
CPU access to the dma buf
2. Unlock a dma buf:
filelock.l_type = F_UNLCK;
fcntl(dmabuf fd, F_SETLKW or F_SETLK, &filelock);
close(dmabuf fd) call would also unlock the dma buf. And for more
detail, please refer to [3]
References:
[1] http://lwn.net/Articles/470339/
[2] https://patchwork.kernel.org/patch/2625361/
[3] http://linux.die.net/man/2/fcntl
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
This patch prevents NULL pointer error cauesed by unregistering unregistered
exton notifier block. At the probing time of charger manager, it tries to
remove extcon notifier block when it fails to initialize them. It has to be
applied for only registered one. Otherwise, it'd make kernel panic. To make it
work right, it checks extcon_specific_cable_nb's extcon_dev node. If extcon
cable notifier block was registered successfully, it has proper extcon_dev
pointer if not so it has NULL pointer.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
|
|
This patch fixes return value checking of regulator_get() in charger-manager
driver. The API, regulator_get(), returns ERR_PTR() when it fails to get
regulator with given name, not NULL.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
|
|
All data will be move into DT later.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
|
|
Since uart_port struct exists through whole driver lifetime, there is no
need to check if it is non-NULL in suspend/resume callbacks.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
|
|
This patch adds sched_clock registration to Exynos MCT driver to
improve scheduler precision by providing a high resolution clock source
for scheduling purposes.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Conflicts:
drivers/clocksource/exynos_mct.c
|
|
LDO20, LDO21, LDO22, BUCK8 and BUCK9 regulators provide external pins
for enable control in addition to I2C control, which is usually used to
control regulator states in suspend.
BUCK5-BUCK7 do not provide any suspend-mode control.
This patch modifies the driver to account for these factors, making it
program sleep mode states of regulators correctly.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Conflicts:
drivers/regulator/max77686.c
|
|
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
|
|
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
|
|
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
|
|
Calling pinctrl_register() means that the driver is fully initialized
and might accept pinmux/pinconf requests, so pin groups must be parsed
before.
This patch fixes this problem by moving device tree parsing
before call to pinctrl_register().
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
|
|
Some ISP bus clocks must be kept enabled when entering sleep mode,
otherwise the system hangs. This patch adds CLK_IGNORE_UNUSED flags to
those clocks to keep them ungated when FIMC IS driver is not present.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
|
|
Add modem_if to Kconfig and Makefile to enable compilation.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
CONFIG_SLP is no longer used hence new method of net device names was
implemented.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
Wake_locks are not supported outside of Android so it is essential to
make their use optional.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
Moved code from the board file to the driver of the xmm6262 chip. Also
handling of sim card detection has been commented out.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
s5p_ehci_configurate function configures the data transfer for HSIC modem.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
Enabling the interrupt caused problem with the modem.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
Move modem related code from the board file to the modem driver.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
The modem_if driver code was taken from 3.0 kernel and did not compile
on 3.8. These changes are necessary to make the driver work.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
Remove linux/cma.h from modem_modemctl_device_xmm6262.c
It wasn't used anyway and was included for linux/rbtree.h only.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
All files were taken from exynos3.4 kernel.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
Add support for HSIC to the Exynos 4x12 SoC family.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
|
|
This patch changes UTMI+ PHY interface of udc core from 16bit to
8bit. Although the manual says that only 16 bit is supported. This
solves the problem of EHCI and Device not working together.
Signed-off-by: Praveen Paneri <p.paneri@samsung.com>
|