diff options
Diffstat (limited to 'arch/arm/mach-netx/fb.c')
-rw-r--r-- | arch/arm/mach-netx/fb.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c deleted file mode 100644 index 2dc80db07390..000000000000 --- a/arch/arm/mach-netx/fb.c +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * arch/arm/mach-netx/fb.c | ||
4 | * | ||
5 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
6 | */ | ||
7 | |||
8 | #include <linux/device.h> | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/dma-mapping.h> | ||
11 | #include <linux/amba/bus.h> | ||
12 | #include <linux/amba/clcd.h> | ||
13 | #include <linux/err.h> | ||
14 | #include <linux/gfp.h> | ||
15 | |||
16 | #include <asm/irq.h> | ||
17 | |||
18 | #include <mach/netx-regs.h> | ||
19 | #include <mach/hardware.h> | ||
20 | |||
21 | static struct clcd_panel *netx_panel; | ||
22 | |||
23 | void netx_clcd_enable(struct clcd_fb *fb) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | int netx_clcd_setup(struct clcd_fb *fb) | ||
28 | { | ||
29 | dma_addr_t dma; | ||
30 | |||
31 | fb->panel = netx_panel; | ||
32 | |||
33 | fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, 1024 * 1024, &dma, | ||
34 | GFP_KERNEL); | ||
35 | if (!fb->fb.screen_base) { | ||
36 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); | ||
37 | return -ENOMEM; | ||
38 | } | ||
39 | |||
40 | fb->fb.fix.smem_start = dma; | ||
41 | fb->fb.fix.smem_len = 1024*1024; | ||
42 | |||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) | ||
47 | { | ||
48 | return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base, | ||
49 | fb->fb.fix.smem_start, fb->fb.fix.smem_len); | ||
50 | } | ||
51 | |||
52 | void netx_clcd_remove(struct clcd_fb *fb) | ||
53 | { | ||
54 | dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base, | ||
55 | fb->fb.fix.smem_start); | ||
56 | } | ||
57 | |||
58 | static AMBA_AHB_DEVICE(fb, "fb", 0, 0x00104000, { NETX_IRQ_LCD }, NULL); | ||
59 | |||
60 | int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel) | ||
61 | { | ||
62 | netx_panel = panel; | ||
63 | fb_device.dev.platform_data = board; | ||
64 | return amba_device_register(&fb_device, &iomem_resource); | ||
65 | } | ||