diff options
author | Enric Balletbo i Serra <eballetbo@iseebcn.com> | 2014-10-08 19:47:46 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2014-10-08 13:50:11 -0400 |
commit | a9a74cc33dded238756eb81879d01a6eac64e503 (patch) | |
tree | 1a072e7da65338de5c8841329914cb61fce25443 /recipes-ti/linuxutils | |
parent | 888ea3744402acafa40e746a92bbca81a8b5a317 (diff) | |
download | meta-ti-a9a74cc33dded238756eb81879d01a6eac64e503.tar.gz |
ti-linuxutils: Fix build problems for kernel up to 3.17
Add to patches to fix the build of cmemk and sdmak kernel modules.
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-ti/linuxutils')
4 files changed, 89 insertions, 2 deletions
diff --git a/recipes-ti/linuxutils/ti-linuxutils.inc b/recipes-ti/linuxutils/ti-linuxutils.inc index dba485b8..c8f93209 100644 --- a/recipes-ti/linuxutils/ti-linuxutils.inc +++ b/recipes-ti/linuxutils/ti-linuxutils.inc | |||
@@ -15,7 +15,7 @@ require recipes-ti/includes/ti-staging.inc | |||
15 | PR = "${MACHINE_KERNEL_PR}" | 15 | PR = "${MACHINE_KERNEL_PR}" |
16 | 16 | ||
17 | #This is a kernel module, don't set PR directly | 17 | #This is a kernel module, don't set PR directly |
18 | MACHINE_KERNEL_PR_append = "e" | 18 | MACHINE_KERNEL_PR_append = "f" |
19 | 19 | ||
20 | inherit module | 20 | inherit module |
21 | 21 | ||
diff --git a/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-cmemk-fixes.patch b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-cmemk-fixes.patch new file mode 100644 index 00000000..3ce66f8c --- /dev/null +++ b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-cmemk-fixes.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | Index: linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c | ||
2 | =================================================================== | ||
3 | --- linuxutils_2_26_01_02.orig/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c | ||
4 | +++ linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c | ||
5 | @@ -31,6 +31,7 @@ | ||
6 | #include <linux/seq_file.h> | ||
7 | #include <linux/vmalloc.h> | ||
8 | #include <linux/sched.h> | ||
9 | +#include <linux/slab.h> | ||
10 | #include <asm/cacheflush.h> | ||
11 | #include <asm/uaccess.h> | ||
12 | #include <asm/pgtable.h> | ||
13 | @@ -1072,7 +1073,7 @@ static int set_noncached(struct vm_area_ | ||
14 | { | ||
15 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
16 | |||
17 | - vma->vm_flags |= VM_RESERVED | VM_IO; | ||
18 | + vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP | VM_IO; | ||
19 | |||
20 | if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, | ||
21 | vma->vm_end - vma->vm_start, vma->vm_page_prot)) { | ||
22 | @@ -1095,7 +1096,7 @@ static int set_cached(struct vm_area_str | ||
23 | ); | ||
24 | #endif | ||
25 | |||
26 | - vma->vm_flags |= VM_RESERVED | VM_IO; | ||
27 | + vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP | VM_IO; | ||
28 | |||
29 | if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, | ||
30 | vma->vm_end - vma->vm_start, vma->vm_page_prot)) { | ||
31 | @@ -2062,8 +2063,13 @@ int __init cmem_init(void) | ||
32 | block_avail_size[bi] = length; | ||
33 | |||
34 | /* attempt to determine the end of Linux kernel memory */ | ||
35 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) | ||
36 | phys_end_kernel = virt_to_phys((void *)PAGE_OFFSET) + | ||
37 | (num_physpages << PAGE_SHIFT); | ||
38 | +#else | ||
39 | + phys_end_kernel = virt_to_phys((void *)PAGE_OFFSET) + | ||
40 | + (get_num_physpages() << PAGE_SHIFT); | ||
41 | +#endif | ||
42 | |||
43 | if (phys_end_kernel > block_start[bi]) { | ||
44 | if (allowOverlap == 0) { | ||
45 | @@ -2186,10 +2192,14 @@ int __init cmem_init(void) | ||
46 | } | ||
47 | |||
48 | /* Create the /proc entry */ | ||
49 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) | ||
50 | cmem_proc_entry = create_proc_entry("cmem", 0, NULL); | ||
51 | if (cmem_proc_entry) { | ||
52 | cmem_proc_entry->proc_fops = &cmem_proc_ops; | ||
53 | } | ||
54 | +#else | ||
55 | + cmem_proc_entry = proc_create_data("cmem", 0, NULL, &cmem_proc_ops, NULL); | ||
56 | +#endif | ||
57 | |||
58 | mutex_init(&cmem_mutex); | ||
59 | |||
diff --git a/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-sdmak-fixes.patch b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-sdmak-fixes.patch new file mode 100644 index 00000000..5ec85fc2 --- /dev/null +++ b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-sdmak-fixes.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Index: linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c | ||
2 | =================================================================== | ||
3 | --- linuxutils_2_26_01_02.orig/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c | ||
4 | +++ linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c | ||
5 | @@ -44,7 +44,7 @@ | ||
6 | #include <mach/hardware.h> | ||
7 | #include <mach/dma.h> | ||
8 | #include <mach/tc.h> | ||
9 | -#else | ||
10 | +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) | ||
11 | #include <plat/hardware.h> | ||
12 | #include <plat/dma.h> | ||
13 | #include <plat/tc.h> | ||
14 | @@ -97,6 +97,11 @@ | ||
15 | |||
16 | #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) */ | ||
17 | |||
18 | +#ifndef OMAP_DMA_NO_DEVICE | ||
19 | +#include <linux/omap-dma.h> | ||
20 | +#define OMAP_DMA_NO_DEVICE 0 | ||
21 | +#endif | ||
22 | + | ||
23 | #include "../interface/sdma.h" | ||
24 | |||
25 | struct channel { | ||
diff --git a/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb b/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb index 75a32dab..1a56d1da 100644 --- a/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb +++ b/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb | |||
@@ -1,6 +1,9 @@ | |||
1 | require ti-linuxutils.inc | 1 | require ti-linuxutils.inc |
2 | 2 | ||
3 | SRC_URI += "file://linuxutils-BKL-fix-2.patch" | 3 | SRC_URI += "file://linuxutils-BKL-fix-2.patch \ |
4 | file://linuxutils_2_26-cmemk-fixes.patch \ | ||
5 | file://linuxutils_2_26-sdmak-fixes.patch \ | ||
6 | " | ||
4 | 7 | ||
5 | PE = "1" | 8 | PE = "1" |
6 | PV = "2_26_01_02" | 9 | PV = "2_26_01_02" |