Cho KyongHo [Fri, 2 Feb 2018 13:47:34 +0000 (22:47 +0900)]
android: ion: add vmap/vunmap ops to dma-buf
Kernel drivers that allocate buffers from ION sometimes requires
kernel address of the buffers. The drivers tend to access the whole
buffer instead of accessing several pages from the large buffers in
megabytes. Therefore dma_buf_vmap() is proper for the drivers than
dma_buf_kmap().
Change-Id: Ie5edf4c325a34c8ed419291b4490b917b755b551
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Janghyuck Kim [Fri, 11 May 2018 02:23:48 +0000 (11:23 +0900)]
[9610] arm64: configs: enable SysMMU
Change-Id: Icde7bb364dafb57cbbf128ff1052174020729cc9
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 1 Dec 2017 06:52:08 +0000 (15:52 +0900)]
[9610] dtsi: fix TLB mask of sysmmu cam & isp0
Change-Id: I0f81a2ccc08c4ef9c3783895c6500bd85d180980
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 23 Oct 2017 11:49:11 +0000 (20:49 +0900)]
[9610] dtsi: add no-rpm-control for sysmmu abox
Change-Id: I0e0c293de0f49b93191af2eaa4d25594c3e383aa
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 25 Sep 2017 12:39:07 +0000 (21:39 +0900)]
[9610] dtsi: add sysmmu properties
Change-Id: Ie855f0baa5cfec54c5950203398d010be7613fdc
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 19 Sep 2017 11:54:19 +0000 (20:54 +0900)]
[9610] dtsi: add no suspend property for abox sysmmu
Change-Id: I8d8bc6f010e02561f624ac893ac663aea1a9389e
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Cho KyongHo [Fri, 15 Sep 2017 11:14:16 +0000 (20:14 +0900)]
[9610] arm64: dts: add System MMU device nodes to 9610
Change-Id: I910fd34892a22d0c06407c17fe23b3f805a5fe6f
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 27 May 2016 01:14:35 +0000 (10:14 +0900)]
[COMMON] iommu: fix detach_device() condition
attach_device() was fixed not to care group condition. So
detach_device() should be changed as same condition.
Change-Id: I300cf0927588dba4d79502e7a5beb07b479396fd
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 26 Apr 2016 05:03:18 +0000 (14:03 +0900)]
[COMMON] iommu: fix condition for exynos-iommu
Fix up condition of iommu framework to operate exynos-iommu.
exynos-iommu doesn't use dma-iommu for virtual address management.
And it doesn't need to care about group status in attach_device.
Change-Id: Ie9cbb7f2a4963fb279356d54be36c71b7ffd293d
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 9 Jan 2018 04:23:45 +0000 (13:23 +0900)]
[HACK] iommu/exynos: fix compile error
Change-Id: Iff1e5c745b0065e7a2bff2c29f5dd3fffd69485e
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Thu, 23 Nov 2017 08:10:50 +0000 (17:10 +0900)]
[COMMON] iommu/exynos: fix prevent issue
This patch fixed below prevent issue which are other violation types.
CID 201989,201988,201971,201965,201958,201937,201925,201912,200894
Change-Id: Ic43a796b3f159a8f6cd36756b5e7b42df97a1ec2
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 21 Jul 2017 08:03:45 +0000 (17:03 +0900)]
[COMMON] iommu/exynos: separate register access file
H/W access codes are separated into exynos-iommu-reg.h.
Change-Id: Ifcb239ba84f2545ae9174adc531248843265e56f
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Wed, 19 Jul 2017 09:58:40 +0000 (18:58 +0900)]
[COMMON] iommu/exynos: add sysmmu operation logging
Sysmmu operation logging is added that would be useful for unexpected
situation.
Change-Id: I3d8381cdb8eb1a80f9e52c685affa885c613a73e
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 2 Jan 2017 11:41:27 +0000 (20:41 +0900)]
[COMMON] iommu/exynos: add slot property setting
This patch added parsing DT about slot properties, and parsed
information is used at the beginning of sysmmu.
Change-Id: I1148177911eff50ee71282c4bba508368b1a4a0b
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 8 Nov 2016 11:34:41 +0000 (20:34 +0900)]
[COMMON] iommu/exynos: add TLB port setting
To support TLB port setting, parsing device tree and setting code are
added.
Change-Id: I63f5854d4d23f2aabb4fe9a4a68a35b8902ab6fd
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 31 Oct 2016 08:03:09 +0000 (17:03 +0900)]
[COMMON] iommu/exynos: add TLB match type flags
TLB match type can be different by the supported version.
This patch reads supported feature from H/W, and calls handling function
for each type.
Change-Id: Id674fa9687c4a3839c2dcfa04061c2c8386a4c34
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Wed, 22 Feb 2017 07:24:21 +0000 (16:24 +0900)]
[COMMON] iommu/exynos: remove __initconst for sysmmu_of_match table
KASAN reported use-after-free case like below.
To avoid this case, __instconst is removed.
BUG: KASAN: use-after-free in __of_match_node+0xb0/0x104 at addr
ffffffc002653338
Read of size 1 by task kworker/u16:0/6
page:
ffffffbdc00994c0 count:0 mapcount:0 mapping: (null)
index:0x1
flags: 0x0()
page dumped because: kasan: bad access detected
.. < skip > ..
Workqueue: deferwq deferred_probe_work_func
Call trace:
[<
ffffffc0000e7140>] dump_backtrace+0x0/0x21c
[<
ffffffc0000e7370>] show_stack+0x14/0x1c
[<
ffffffc0007a4dc8>] dump_stack+0xa8/0xe8
[<
ffffffc000393e04>] kasan_report+0x468/0x484
[<
ffffffc000393e38>] __asan_report_load1_noabort+0x18/0x20
[<
ffffffc00125f65c>] __of_match_node+0xb0/0x104
[<
ffffffc00125f6e8>] of_match_node+0x38/0x5c
[<
ffffffc00125ff3c>] of_match_device+0x50/0x5c
[<
ffffffc000b0fa5c>] platform_match+0x9c/0x1c4
[<
ffffffc000b0be84>] __device_attach_driver+0x100/0x180
[<
ffffffc000b08bb0>] bus_for_each_drv+0x15c/0x164
[<
ffffffc000b0b584>] __device_attach+0x198/0x208
[<
ffffffc000b0c180>] device_initial_probe+0x10/0x18
[<
ffffffc000b09020>] bus_probe_device+0x98/0x190
[<
ffffffc000b0ac78>] deferred_probe_work_func+0xd4/0xec
[<
ffffffc000145428>] process_one_work+0x978/0x1208
[<
ffffffc00014636c>] worker_thread+0x654/0x824
[<
ffffffc0001524fc>] kthread+0x240/0x250
[<
ffffffc0000dde30>] ret_from_fork+0x10/0x20
Memory state around the buggy address:
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Change-Id: Ibc46808a38b0db3f9cc62a1e106022fa9383dd20
Janghyuck Kim [Wed, 1 Feb 2017 08:24:20 +0000 (17:24 +0900)]
[COMMON] iommu/exynos: display sysmmu name when fault occurred
In case of sysmmu page fault, it was difficult to distinguish the owner
of invalid request. This patch displays sysmmu name to improve
readability.
Change-Id: I2a11a503c4ad64eaa819e8f76640c3dffc999d00
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Sat, 7 Jan 2017 05:53:35 +0000 (14:53 +0900)]
[COMMON] iommu/exynos: alloc page table entry with gfp mask
Page table entry can be allocated with GFP_KERNEL if mapping request is
passed by iommu_map(), because it is outside of spinlock boundary.
Change-Id: I59fc5666597ee41f060bccfe91772c603acf9a12
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Cho KyongHo [Wed, 4 Jan 2017 08:23:19 +0000 (17:23 +0900)]
[COMMON] iommu/exynos: force non-shareable for non-cached buffers
exynos_iovmm_map_userptr() migrates the given userspace mapping to the
device virtual address space. If the given mapping is uncached or
writecombine, cache lines that are allocated to some part of the given
range can be stale. Therefore the mapping is not cached, the mapping
to the System MMU page table should also be non-shareable.
Change-Id: I748ae92525c916d580cb55f9deeb9c43f03a6386
Signe-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Thu, 5 Jan 2017 13:59:33 +0000 (22:59 +0900)]
[COMMON] iommu/exynos: fix possible NULL pointer dereference
find_vma() may return NULL. It should be checked even though
exynos_iovmm_map_userptr() requires the callers to acquire mmap_sem.
SVACE WGID 87553
Change-Id: Ice3239234dc46177bce5963444f0c4cbc094fe40
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Janghyuck Kim [Thu, 8 Dec 2016 02:23:31 +0000 (11:23 +0900)]
[COMMON] iommu/exynos: implement API to show status
exynos_sysmmu_show_status() provides information of sysmmu status.
Change-Id: Ia448f085acd3b7d605941481f7799899940420f3
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 25 Oct 2016 10:29:53 +0000 (19:29 +0900)]
[COMMON] iommu/exynos: support no-suspend feature
This patch supports no-suspend mode that not to disable sysmmu when it
is going to suspend state. It is necessary for the master driver like
abox that should operate in suspend mode.
Change-Id: I1ff1ccd83997f3852d5b962767c43bc0d6cd6819
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 5 Sep 2016 03:21:20 +0000 (12:21 +0900)]
[COMMON] iommu/exynos: check condition before pointer access
Fix Svace : 64214, 64219
Change-Id: I5ab4d2e84d4a510693978b6aac97ebf8c037119e
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Thu, 11 Aug 2016 04:23:33 +0000 (13:23 +0900)]
[COMMON] iommu/exynos: add shareablity setting in iommu_map
Current exynos iommu driver supports shareability setting by userptr
case only, and prot was ignored in case of iommu_map().
This patch enables shareability setting for iommu_map().
Change-Id: I5431a029746b5d9b89ceb8d4b0a6b2190e8d43e6
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Sat, 6 Aug 2016 07:20:47 +0000 (16:20 +0900)]
[COMMON] iommu/exynos: support secure sysmmu interrupt
Abnormal situation like page fault can be happened when sysmmu is
operating in secure context. To ease debugging with maintaining secure
state, secure interrupt handler is added. In this handler, useful
information of sysmmu status can be obtained through exynos_smc().
Change-Id: I066f70f655e41eda9ba5d7f2d8dd83f1cea94176
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Thu, 7 Jul 2016 14:01:16 +0000 (23:01 +0900)]
[COMMON] iommu/exynos: fix overflow check condition
Considering 32bit dma address, overflow checking condition is fixed.
Change-Id: I98066be8a219f9a26e076b2f64285455f48d057d
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 1 May 2017 08:28:04 +0000 (17:28 +0900)]
[COMMON] include: add definition for prefetch read/write
Change-Id: Ibac9935d7ed568bcc62845643e7fb00af003f926
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 8 Nov 2016 11:33:51 +0000 (20:33 +0900)]
[COMMON] include: add definition for TLB port setting
Change-Id: I49560e481edc20b8134861f9314cbda19cb48925
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 16 May 2016 12:19:54 +0000 (21:19 +0900)]
[COMMON] iommu/exynos: parsing DT for sysmmu properties
Sysmmu properties that read from DT are parsed and stored into driver
data.
1) QoS property is defined like below in DT.
sysmmu_node:
qos = <4>;
2) TLB properties are defined like below in DT.
sysmmu_node:
sysmmu,tlb_property =
<PRIV_WAY_CFG ID SYSMMU_ID(X)>,
<PRIV_WAY_CFG ID SYSMMU_ID(X)>,
<PUBLIC_WAY_CFG SYSMMU_NOID>;
Refer to include/dt-bindings/sysmmu/sysmmu.h for detailed definitions.
Change-Id: Ibdca6081351e997ba3a01f0173c751d30bb69a1d
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Wed, 11 May 2016 02:25:18 +0000 (11:25 +0900)]
[COMMON] iommu/exynos: add dma-window property parsing
Each domain may need different dma ranges for client device's
requirement. 'dma-window' property specifies dma ranges
for each domain.
This property is optional, so if it doesn't exist,
default dma ranges from 0x10000000 to 0xD0000000 are used.
If this property is used, address and size cells should be described.
Below is an example.
iommu-domain_something {
compatible = "samsung,exynos-iommu-bus";
#dma-address-cells = <1>;
#dma-size-cells = <1>;
/* start address, size */
dma-window = <0x10000000 0xC0000000>;
domain-clients = <&something>;
};
Change-Id: I2765f8a4a6b142475c5de80aa73234bef0bd3248
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Thu, 16 Jun 2016 08:12:46 +0000 (17:12 +0900)]
[COMMON] iommu/exynos: add dump of TLB status
Dumping TLB status and TLB set/way information are added to provide
useful information in sysmmu status dumping
Change-Id: I37bfdfbd1baa2c6f10275c93f3d43b055ad0b6e7
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Wed, 1 Jun 2016 05:10:39 +0000 (14:10 +0900)]
[COMMON] iommu/exynos: support fault handler for v7
Reading interrupt status and displaying information are changed to
support sysmmu v7.
Change-Id: I29acc8fd8427933a58a2330526f74f283a0d2d01
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Wed, 1 Jun 2016 05:13:13 +0000 (14:13 +0900)]
[COMMON] iommu/exynos: fix return value in attach_dev
IOMMU framework considers error if attach_dev returns non-zero value.
If sysmmu is already enabled by other master device, return value can be
one, which means already enabled. It is normal situation, so return
value is changed to zero in this case.
Change-Id: I4a344cedc2d3729de3b46c9c1cf0f6e44072d2a5
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 27 May 2016 01:23:56 +0000 (10:23 +0900)]
[COMMON] exynos/iommu: add suspended state
This patch added suspended state that becomes true when sysmmu goes to
suspend state. No SFR access is allowed if sysmmu is in suspended.
Without suspended state, some operation involving SFR access like tlb
invalidation would make external abort because it only checks internal
reference count before SFR access, and internal reference count is
remained after sysmmu becomes suspend state.
Change-Id: I7460e8b0b96de5f46584cc299dc2e659fc34da44
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 9 May 2016 06:16:24 +0000 (15:16 +0900)]
[COMMON] iommu/exynos: add fault handler API
By fault handler API, master driver can register their own fault handler
that would be called when related sysmmu fault occurred.
In fault handler, master driver can print out their useful information
like SFR for debugging.
Change-Id: Ica6b7df8108d3165a7e1a3632aba027f328d1ecf
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Sat, 7 May 2016 06:45:32 +0000 (15:45 +0900)]
[COMMON] iommu/exynos: add iova_to_phys
iova_to_phys() is implemented to return physical address from iova.
Change-Id: I0e0d0f91231889efadb10a18b1e07d60b01ce1dc
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Thu, 19 May 2016 11:22:08 +0000 (20:22 +0900)]
[COMMON] iommu/exynos: remove rpm-enabled check in suspend/resume
After removing CONFIG_PM_RUNTIME, pm_runtime_enabled() always returns
zero because sysmmu driver calls pm_runtime_enable() at probe time.
It results SFR access in suspend/resume callback even though power block
is off. To avoid SFR access, condition checking by pm_runtime_enabled()
is removed by this patch.
Change-Id: I2afea1ad4b3bdc57cb50d71423e44358b3023696
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 3 May 2016 11:52:34 +0000 (20:52 +0900)]
[COMMON] iommu/exynos: add userptr map/unmap
user virtual address mapping/unmapping should be supported.
Change-Id: Iff0398588a1d295d86ea9285303a558453f0baba
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 3 May 2016 11:55:58 +0000 (20:55 +0900)]
[COMMON] iommu/exynos: add sysmmu irq handler
Sysmmu interrupt occurred when sysmmu detected illegal request.
Sysmu irq handler displays detected fault type and related information.
Change-Id: Ie12909182f722f85480a285fc05573ad5af7759a
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Thu, 28 Apr 2016 06:49:40 +0000 (15:49 +0900)]
[COMMON] iommu/exynos: add cache sync operation
Cache sync operation for device and cpu is added.
Change-Id: I6167a51997d50978e1bc22bbe2c1c33a18cf0666
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 26 Apr 2016 07:09:29 +0000 (16:09 +0900)]
[COMMON] iommu/exynos: add temporal function for master driver
Frequently used function for master driver is added temporally to avoid
compile error.
Change-Id: Ieb3986467e9fadcc77aee01f40bb5e9e7d7c04c8
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 26 Apr 2016 05:00:47 +0000 (14:00 +0900)]
[COMMON] iommu/exynos: add iommu group for each domain
iommu group is not important for exynos iommu driver, however, without
iommu group, getting domain from master device is failed.
This patch added one to one relationship for iommu group and domain.
Change-Id: Ia31bd028226e228c14091cd8ec5ee0412155228d
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 25 Apr 2016 09:30:17 +0000 (18:30 +0900)]
[COMMON] iommu/exynos: add suspend/resume callback
To support suspend and resume of APM, suspend and resume callback is
added to disable and enable sysmmu properly.
Change-Id: Ie2cf804b50219c1c820de794fe2e6aad68ae3d94
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 25 Apr 2016 09:27:20 +0000 (18:27 +0900)]
[COMMON] iommu/exynos: runtime suspend/resume callback
Sysmmu operation is implicitly enabled and disabled when master device
turned on the power and off the power.
This patch replaces runtime pm suspend/resume callback of platform bus
with exynos_iommu_runtime_suspend/resume that added sysmmu handling.
Change-Id: I5e5e1f5fb485a9943c84c0e6a379b8720de57094
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 25 Apr 2016 05:20:05 +0000 (14:20 +0900)]
[COMMON] iommu/exynos: add tlb invalidation
TLB invalidation is mandatory when page table entry is added or removed.
Without this, sysmmu might translate wrong address results.
Change-Id: I3fe24d211256b8f503d1fbabc78dc3f6790faf4e
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Mon, 25 Apr 2016 02:28:06 +0000 (11:28 +0900)]
[COMMON] iommu/exynos: add map/unmap
mapping makes page table entry to translate virtual address to physical
address. unmapping removes page table entry.
Change-Id: I82c053b40868deba948c60affd96074661987f15
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Sat, 23 Apr 2016 10:26:37 +0000 (19:26 +0900)]
[COMMON] iommu/exynos: add sysmmu enable/disable
Sysmmu checks activation status and runtime activation by master
driver to control properly.
At enabling time, sysmmu configuration and page table are set.
At disabling time, sysmmu is blocked and disabled.
Change-Id: Ia8cfee103bdb259d295c18edb7d3b033f85c2662
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Sat, 23 Apr 2016 07:51:50 +0000 (16:51 +0900)]
[COMMON] iommu/exynos: add attach/detach device
Client device is attached to domain by attach_device.
It enables sysmmu for all clients that attached to domain.
Client device is detached from domain by detach_device.
All enabled sysmmus for clients are disabled.
Change-Id: Ib261369344516ee034a3fae0498137f983ca5bd6
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Sat, 23 Apr 2016 07:00:10 +0000 (16:00 +0900)]
[COMMON] iommu/exynos: add domain alloc/free
iommu domain represents virtual address spaces for client device.
domain_alloc creates page table for each domain and initialize domain
related data structures.
domain_free cleans up attached client list and releases domain related
information.
Change-Id: I61d6621c5598be459e963ecdb58711fc76d083ed
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 22 Apr 2016 11:13:54 +0000 (20:13 +0900)]
[COMMON] iommu/exynos: of_xlate for master and sysmmu
of_xlate is called when master device is added.
Purpose of of_xlate is making relationship between master and sysmmu
devices. Domain and client relationship is also created at this time.
Change-Id: I4b7f5a2d9d1237b61beee1a6f216ef39c60df722
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 22 Apr 2016 12:03:30 +0000 (21:03 +0900)]
[COMMON] iommu/exynos: add probe function
resources like SFR and IRQ are registered and main structure for sysmmu
is created in probe function.
Change-Id: I3266acf9b97bea4395804a5bf1f814c7b0f4815f
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 22 Apr 2016 06:13:15 +0000 (15:13 +0900)]
[COMMON] iommu/exynos: creating iommu domain
iommu domain is created at booting time and it parses device tree with
"samsung,exynos-iommu-bus" to clarify relationship between domain and
client devices. At this time, client device is not added yet, so parsed
informations are stored into exynos_client_list for later.
Change-Id: I7928fbdf0898fef2b9e9004e3b45c3520c2c1c18
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Fri, 22 Apr 2016 05:21:02 +0000 (14:21 +0900)]
[COMMON] iommu/exynos: enable IOVMM
IOVMM is Exynos I/O Virtual Memory Manager.
It manages device virtual address region like allocation and free.
IOVMM is connected with exynos iommu domain.
Some dummy function is added in exynos-iommu to avoid compilie error.
Change-Id: Icdd0fe1acc81240b97361ae495276d920c129ad9
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Thu, 21 Apr 2016 10:19:53 +0000 (19:19 +0900)]
[COMMON] iommu/exynos: add initialization
This is the starting point for exynos iommu driver.
It registers sysmmu driver and iommu api to platform_bus_type.
Change-Id: Iae165ce448ab4334ca956c5c2aaaa6bbe4997d7a
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 19 Apr 2016 05:28:16 +0000 (14:28 +0900)]
[COMMON] iommu/exynos: add skeleton exynos iommu driver
Basic structures for domain, master and sysmmu are defined.
Skeleton functions of iommu_ops are added.
Change-Id: I501f6a82357a1e37e3d14bbb0f2c7ad4c516090f
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Janghyuck Kim [Tue, 9 Jan 2018 02:18:00 +0000 (11:18 +0900)]
[COMMON] iommu/exynos: remove exynos-iommu.c
Original file is removed.
Change-Id: Ibe28c914b294d22326222dbf994511dbc7a80e52
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Jaehyoung Choi [Mon, 14 May 2018 09:16:56 +0000 (18:16 +0900)]
[9610][ERD] arm64: config: Fix CONFIG_NR_CPUS
Change-Id: Iec2fb5cbbf63e82769c6caf4f8cbe3372a6eb89f
Signed-off-by: Jaehyoung Choi <jkkkkk.choi@samsung.com>
Jaehyoung Choi [Mon, 14 May 2018 07:16:55 +0000 (16:16 +0900)]
Revert "[HACK] remove clock setting code"
This reverts commit
c6d418b50aeb5fedbbac7ce5e4a120c4757c00f3.
Jaehyoung Choi [Mon, 14 May 2018 06:59:34 +0000 (15:59 +0900)]
[9610][ERD] arm64: config: Enable config related to full treble
Change-Id: If5076d25a6c1ec00192268f704ae0e1cb82e54e0
Signed-off-by: Jaehyoung Choi <jkkkkk.choi@samsung.com>
Taekki Kim [Wed, 9 May 2018 05:48:43 +0000 (14:48 +0900)]
[COMMON] soc: samsung: fix build error
This patch fixes build error as below.
- fix build error when exynos_pd is disabled.
- add sched clock header prevent build error.
Change-Id: Ibcc337660f066a45ee6d10dcb4794dd0d87b38e0
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
Taekki Kim [Wed, 9 May 2018 05:47:14 +0000 (14:47 +0900)]
[COMMON] soc: samsung: add bcm config
Change-Id: I0a202641d8d079be63ee5d36eb5f889ce900dfd0
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
Seokju Yoon [Mon, 14 Nov 2016 09:41:55 +0000 (18:41 +0900)]
[COMMON] soc: samsung: bcm: remove setting iotable.
Change-Id: I319d57b0011da2c519717fba01084187fc0489c0
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Taekki Kim [Fri, 14 Apr 2017 08:35:46 +0000 (17:35 +0900)]
[COMMON] bcm: add header for slab
Change-Id: I02cc719350a91cd78d1685e1d4c75fac97e61f8c
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
Seokju Yoon [Wed, 7 Dec 2016 04:19:12 +0000 (13:19 +0900)]
[COMMON] bcm: fix stack overflow possibility.
Change-Id: Ia87174a7f0f04dfaf2e03935f66348ec1119d50b
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Seokju Yoon [Fri, 30 Sep 2016 01:02:27 +0000 (10:02 +0900)]
[common] bcm: unlimit log size in panic
Change-Id: I0502681f657dffdf3c952ca6a086dc15d896d4d5
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Seokju Yoon [Thu, 18 Aug 2016 10:10:23 +0000 (19:10 +0900)]
[COMMON] bcm: panic log size increase
Change-Id: Ie387592a4bc88a859a91633e2b8fcfdedf1de344
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Seokju Yoon [Mon, 18 Jul 2016 13:13:06 +0000 (22:13 +0900)]
[COMMON] bcm: enable bcm panic logging
Change-Id: I474702088501f6aaba2a2cab733cdd183ef2de4b
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Seokju Yoon [Mon, 11 Jul 2016 02:22:22 +0000 (11:22 +0900)]
[COMMON] bcm: split print log buffer to support long sentences
Change-Id: I110ea98f5be98c7bf12359884063308dbaf2ab5a
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Seokju Yoon [Mon, 20 Jun 2016 02:19:09 +0000 (11:19 +0900)]
[COMMON] soc: samsung: Add the bcm driver
Change-Id: Ibe3ce4189b269d21fb9781160b6c119dcdb82e07
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Taekki Kim [Fri, 4 May 2018 05:46:06 +0000 (14:46 +0900)]
[9610] arm64: dtsi: add pdma device node
Change-Id: I587f504d44c3651472ca3d20ca51c18bdc63de93
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
Eunok Jo [Mon, 22 May 2017 05:44:37 +0000 (14:44 +0900)]
change dma_attrs to unsigned long
Due to patch "dma-mapping: use unsigned long for dma_attrs",
dma_attrs should be unsigned long to be used.
Change-Id: Ia68dfee7ff5e4b1e89c921e161bb8891c0278e5e
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
KangNam Park [Wed, 30 Jul 2014 14:38:57 +0000 (23:38 +0900)]
arch64: dma: add the dma interface for audio
Change-Id: I8037f12b582668ed6c7fb3031dca768685a909db
Signed-off-by: KangNam Park <kn0710.park@samsung.com>
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Jaejoon Yoo [Wed, 14 Mar 2018 04:24:44 +0000 (13:24 +0900)]
[COMMON] pl330: Add exynos_pd config
Change-Id: I5a71d4f6ef5722c3db2204da33e46a2669bf7aff
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Eunok Jo [Fri, 11 Nov 2016 09:23:34 +0000 (18:23 +0900)]
Set CPU Affinity for handling interrupt
When HMP for exynos series is enabled, cpu affinity for
handling interrupt will be set only for little cores.
Otherwise, all cores can catch interrupt and handle it.
Change-Id: Id6a37fd0e7e97ed240c94f47c91d096b5f5211cd
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
Eunok Jo [Mon, 24 Oct 2016 07:24:30 +0000 (16:24 +0900)]
dma: pl330: remove unnecessary spinlock
Change-Id: I3e17fd6d5fd90999974de89621d860e229aed4e5
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
Taekki Kim [Fri, 30 Sep 2016 09:17:25 +0000 (18:17 +0900)]
dma: pl330: support IRQF_GIC_MULTI_TARGET
Change-Id: I467307919c0bf47421c0d9b52a9306518369cbba
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
Taekki Kim [Fri, 30 Sep 2016 09:13:26 +0000 (18:13 +0900)]
dma: of: add multi irq get API for support IRQF_GIC_MULTI_TARGET.
Change-Id: Ie58232a9fe0f1a5228fa8c7505fd30d856873caf
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
Jaejoon Yoo [Thu, 18 Jan 2018 04:25:32 +0000 (13:25 +0900)]
[COMMON] dma: Modify dma code for kernel 4.14
Change-Id: Ifaadf8bf3cdf19a126fc109a9da05cdf44c05359
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Eunok Jo [Mon, 22 May 2017 10:48:28 +0000 (19:48 +0900)]
samsung: dma: add samsung dma
Change-Id: I817574379d67e5605517dd409cf8f012f59b3653
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
Jaejoon Yoo [Wed, 29 Nov 2017 06:29:07 +0000 (15:29 +0900)]
[COMMON] dma: change MCODE_BUFFER size.
Change-Id: Id92b11a013db9cbd20c9715108cf465a0bc82ae0
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Jaejoon Yoo [Wed, 29 Nov 2017 00:24:40 +0000 (09:24 +0900)]
[COMMON] DMA: Add configurable burst length in cyclic mode.
Change-Id: Iaa152f26fac528b9fdb4b125cd5206377c55db54
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Eunok Jo [Thu, 14 Sep 2017 05:43:14 +0000 (14:43 +0900)]
[COMMON] dma: Remove FLUSHP for dev2mem transfer
In Dev2mem transfer, peripheral de-asserts the PERIPHERAL_REQUEST
on the very next clock edge of its finished request because
data transfer is already completed on the peripheral side.
In this case, micro code does not have to do FLUSHP
because there should not be any synchronization issues.
Change-Id: I7370b526759422b1d056f0c54c65899597e327a4
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
Eunok Jo [Mon, 22 May 2017 07:48:58 +0000 (16:48 +0900)]
Revert "dmaengine: Remove the context argument to the prep_dma_cyclic operation"
This reverts commit
31c1e5a1350ae8d1bc2018f5de8264266d9773e1.
Change-Id: I0d1eb6fe5cf845935d219bcf31c1902c548240b4
Eunok Jo [Tue, 7 Feb 2017 10:51:42 +0000 (19:51 +0900)]
dma: svace fix: fix variable type mismatch
WGID: 95862, 96284, 96746, 96796, 97246
Change-Id: I7bfbd10408e7982fe01884435dcb396052c6e42f
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
Jaejoon Yoo [Fri, 6 Jan 2017 08:21:33 +0000 (17:21 +0900)]
DMA: svace fix: add type cast code to loop function(WGID: 2490).
Change-Id: Ie2d0d68c975e2c0b8e51330783c577bff1523b37
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Jaejoon Yoo [Tue, 10 Jan 2017 10:05:01 +0000 (19:05 +0900)]
DMA: Support 36bit address when call getposition function.
Change-Id: I542860611c550d25b014e6cb112e64edf94e4e02
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Taekki Kim [Mon, 9 Jan 2017 04:07:34 +0000 (13:07 +0900)]
dma: pl330: add critical section for list operation
Change-Id: I8505ac36fcc13a9d0c376bd4dba7fae6558f50cb
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
Jaejoon Yoo [Tue, 3 Jan 2017 09:51:05 +0000 (18:51 +0900)]
DMA: Fix SFR address when debug log print.
Change-Id: Ib52934854f5d238e60b48e908256552b537d6483
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Jaejoon Yoo [Mon, 2 Jan 2017 12:06:20 +0000 (21:06 +0900)]
DMA: Modify register base address
Change-Id: Ia9e0e042cbbaaf12f5e15b29f5506a15f57de736
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Jaejoon Yoo [Wed, 28 Dec 2016 06:19:54 +0000 (15:19 +0900)]
DMA: svace fix: Add code for handling null (WGID: 58265).
Change-Id: I168bd2e9effaa27ff1bdcdcce946905697f298b9
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Jaejoon Yoo [Thu, 15 Dec 2016 08:16:38 +0000 (17:16 +0900)]
DMA: Add more information to pl330_dma_debug function.
Change-Id: Ideca8099a73ef3aec2ce13af71c37d68ede6228b
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Eunok Jo [Tue, 10 Nov 2015 06:55:36 +0000 (06:55 +0000)]
dma: set mask bit as 36
Change-Id: I4cd8af74c2b2033c0105de4580d19d16381a36f1
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
Jaejoon Yoo [Mon, 24 Oct 2016 06:42:46 +0000 (15:42 +0900)]
dma: Modify FLUSHP instuction for DP audio.
Change-Id: I353a38327e5b5265045547c6ced6c2a072f20a47
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Jaejoon Yoo [Wed, 5 Oct 2016 02:19:41 +0000 (11:19 +0900)]
Revert "dmaengine: pl330: fix bug that cause start the same descs in cyclic"
This reverts commit
0091b9d6c1ef2caab6cb3b6c0aa75f9948307856.
Change-Id: Ideaea8c9a415a544335452f8e6bec969040c02d0
Jaejoon Yoo [Tue, 2 Aug 2016 02:17:09 +0000 (11:17 +0900)]
dma: Introduce DMA register dump.
Change-Id: I4316c39a062fb862450c5e3bb9ff21055aade6e0
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
Seokju Yoon [Tue, 24 Nov 2015 06:02:43 +0000 (15:02 +0900)]
dma: pl330: clear interrupt flag in dma stop
Change-Id: Ibd286459dfd26d2d2cbdea4f127bf1eaccf646ba
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Seokju Yoon [Fri, 27 Nov 2015 08:17:06 +0000 (17:17 +0900)]
DMA: fixed time loop code
Change-Id: I53e9216c0e015709219fb91f1b0cc36a716f13f3
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Eunok Jo [Mon, 20 Jul 2015 02:20:19 +0000 (02:20 +0000)]
dma: restore instruction wrapper register
Wrapper register for instruction address should be restored after power mode.
Change-Id: Icbaf3fe80be32fc496cfdc22dc7ebc34dd00671a
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
Seokju Yoon [Thu, 18 Jun 2015 14:09:12 +0000 (23:09 +0900)]
dma: of-dma: Support to set number of dma mask bit property.
Change-Id: I329b65fa71cacddbc1be4df5bc32d142a8598c6d
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>