sh: add uio device for physically contiguous memory
PATCH 1/1 sh: add uio device for physically contiguous memory
From: Magnus Damm <[email protected]>
This patch adds a separate uio device for physically contiguous memory. The default behaviour is that no memory is assigned to this device. To assign memory the kernel command line parameter memchunk.uio_memory can be used.
Signed-off-by Magnus Damm <[email protected]>
---
arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 6 ++-- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 6 ++-- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 ++-- arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 8 ++--- arch/sh/kernel/cpu/shmobile/Makefile | 1 arch/sh/kernel/cpu/shmobile/uio_memory.c | 42 ++++++++++++++++++++++++++++++ 6 files changed, 56 insertions(+), 13 deletions(-)
arch/sh/kernel/cpu/sh4a/setup-sh7366.c +3 -3
@@ -88,7 +88,7 @@ static struct resource vpu_resources[]static struct platform_device vpu_device = { .name ="uio_pdrv_genirq" , - .id =0 , + .id =1 , .dev = { .platform_data = &vpu_platform_data, },
@@ -116,7 +116,7 @@ static struct resource veu0_resources[]static struct platform_device veu0_device = { .name ="uio_pdrv_genirq" , - .id =1 , + .id =2 , .dev = { .platform_data = &veu0_platform_data, },
@@ -144,7 +144,7 @@ static struct resource veu1_resources[]static struct platform_device veu1_device = { .name ="uio_pdrv_genirq" , - .id =2 , + .id =3 , .dev = { .platform_data = &veu1_platform_data, },
arch/sh/kernel/cpu/sh4a/setup-sh7722.c +7 -7
@@ -130,7 +130,7 @@ static struct resource vpu_resources[]static struct platform_device vpu_device = { .name ="uio_pdrv_genirq" , - .id =0 , + .id =1 , .dev = { .platform_data = &vpu_platform_data, },
@@ -161,7 +161,7 @@ static struct resource veu_resources[]static struct platform_device veu_device = { .name ="uio_pdrv_genirq" , - .id =1 , + .id =2 , .dev = { .platform_data = &veu_platform_data, },
@@ -192,7 +192,7 @@ static struct resource jpu_resources[]static struct platform_device jpu_device = { .name ="uio_pdrv_genirq" , - .id =2 , + .id =3 , .dev = { .platform_data = &jpu_platform_data, }, ---0001 /arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ work/arch/sh/kernel/cpu/sh4a/setup-sh7723.c 2009-10-02 10:20:41.000000000 +0900
@@ -40,7 +40,7 @@ static struct resource vpu_resources[]static struct platform_device vpu_device = { .name ="uio_pdrv_genirq" , - .id =0 , + .id =1 , .dev = { .platform_data = &vpu_platform_data, },
@@ -71,7 +71,7 @@ static struct resource veu0_resources[]static struct platform_device veu0_device = { .name ="uio_pdrv_genirq" , - .id =1 , + .id =2 , .dev = { .platform_data = &veu0_platform_data, },
@@ -102,7 +102,7 @@ static struct resource veu1_resources[]static struct platform_device veu1_device = { .name ="uio_pdrv_genirq" , - .id =2 , + .id =3 , .dev = { .platform_data = &veu1_platform_data, },
arch/sh/kernel/cpu/sh4a/setup-sh7724.c +6 -5
@@ -180,7 +180,7 @@ static struct resource vpu_resources[]static struct platform_device vpu_device = { .name ="uio_pdrv_genirq" , - .id =0 , + .id =1 , .dev = { .platform_data = &vpu_platform_data, },
@@ -212,7 +212,7 @@ static struct resource veu0_resources[]static struct platform_device veu0_device = { .name ="uio_pdrv_genirq" , - .id =1 , + .id =2 , .dev = { .platform_data = &veu0_platform_data, },
@@ -244,7 +244,7 @@ static struct resource veu1_resources[]static struct platform_device veu1_device = { .name ="uio_pdrv_genirq" , - .id =2 , + .id =3 , .dev = { .platform_data = &veu1_platform_data, },
@@ -512,7 +512,7 @@ static struct resource jpu_resources[]static struct platform_device jpu_device = { .name ="uio_pdrv_genirq" , - .id =3 , + .id =4 , .dev = { .platform_data = &jpu_platform_data, }, ---0001 /arch/sh/kernel/cpu/shmobile/Makefile +++ work/arch/sh/kernel/cpu/shmobile/Makefile 2009-10-02 10:18:11.000000000 +0900
@@ -6,3 +6,4 @@ obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_PM_RUNTIME) += pm_runtime.o +obj-$ (CONFIG_UIO_PDRV_GENIRQ ) += uio_memory.o
arch/sh/kernel/cpu/shmobile/uio_memory.c new file +42 -0
42 lines not on this page · raw message