Monday, January 13, 2014

linux.kernel - 26 new messages in 18 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* video: add OpenCores VGA/LCD framebuffer driver - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/6de4648d5dffb42a?hl=en
* Driver/IFC: Move Freescale IFC driver to a common driver - 2 messages, 2
authors
http://groups.google.com/group/linux.kernel/t/e1ab3bbaf7a7d836?hl=en
* kconfig: consolidate arch-specific seccomp options - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/196ce794be2da521?hl=en
* Send audit/procinfo/cgroup data in socket-level control message - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/cb3f28ed868f4bdd?hl=en
* power: clock_ops.c: check return of clk_enable() in pm_clk_resume() - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/41367c40b0de6d9b?hl=en
* target/configfs: Expose protection device attributes - 5 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/0f7dabefe93a4442?hl=en
* Staging: ced1401: fix coding style in ced_ioc.c - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/cf0ebd61b1e13adb?hl=en
* zram: remove workqueue for freeing removed pending slot - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/dc0d124af7423670?hl=en
* Documentation: add dts binding for X-Gene reboot dts node. - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/12227fdb34cca7d6?hl=en
* arm: Add [U]EFI runtime services support - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/260609102e2a8650?hl=en
* Excessive WARN()s in Intel 915 driver - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/5af1ec5c35109098?hl=en
* DAS1800: Fixing foo * bar should be foo *bar - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/3ad2131d385b9e1e?hl=en
* AlarmDev: Changing is_wakeup() to be a function to pass checkpatch - 2
messages, 2 authors
http://groups.google.com/group/linux.kernel/t/cf050cae17fdff9f?hl=en
* x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user
[v2] - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/4888d1ac18187fba?hl=en
* iio: mxs-lradc: fix invalid channel number detection - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/90e49850c40f4fca?hl=en
* seccomp: protect seccomp.filter pointer (w) with the task_lock - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/e2f632c51e6112a2?hl=en
* tools lib traceevent: Shut up plugins make message - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/14a1ef799836015c?hl=en
* perf/core improvements and fixes - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/27d8f7d641802deb?hl=en

==============================================================================
TOPIC: video: add OpenCores VGA/LCD framebuffer driver
http://groups.google.com/group/linux.kernel/t/6de4648d5dffb42a?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jan 13 2014 11:40 am
From: Stefan Kristiansson


This adds support for the VGA/LCD core available from OpenCores:
http://opencores.org/project,vga_lcd

The driver have been tested together with both OpenRISC and
ARM (socfpga) processors.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
Changes in v2:
- Add Microblaze as an example user and fix a typo in Xilinx Zynq

Changes in v3:
- Use devm_kzalloc instead of kzalloc
- Remove superfluous MODULE #ifdef

Changes in v4:
- Remove 'default n' in Kconfig
- Simplify ioremap/request_mem_region by using devm_ioremap_resource
- Remove release_mem_region

Changes in v5:
- Remove static structs to support multiple devices

Changes in v6
- Reorganize header files in alphabetical order
- Remove superfluous casts to (void __iomem *)
---
drivers/video/Kconfig | 16 ++
drivers/video/Makefile | 1 +
drivers/video/ocfb.c | 440 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 457 insertions(+)
create mode 100644 drivers/video/ocfb.c

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 84b685f..8e41a1e 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -979,6 +979,22 @@ config FB_PVR2
(<file:drivers/video/pvr2fb.c>). Please see the file
<file:Documentation/fb/pvr2fb.txt>.

+config FB_OPENCORES
+ tristate "OpenCores VGA/LCD core 2.0 framebuffer support"
+ depends on FB
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
+ help
+ This enables support for the OpenCores VGA/LCD core.
+
+ The OpenCores VGA/LCD core is typically used together with
+ softcore CPUs (e.g. OpenRISC or Microblaze) or hard processor
+ systems (e.g. Altera socfpga or Xilinx Zynq) on FPGAs.
+
+ The source code and specification for the core is available at
+ <http://opencores.org/project,vga_lcd>
+
config FB_S1D13XXX
tristate "Epson S1D13XXX framebuffer support"
depends on FB
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index e8bae8d..ae17ddf 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -150,6 +150,7 @@ obj-$(CONFIG_FB_NUC900) += nuc900fb.o
obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o
obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o
obj-$(CONFIG_FB_HYPERV) += hyperv_fb.o
+obj-$(CONFIG_FB_OPENCORES) += ocfb.o

# Platform or fallback drivers go here
obj-$(CONFIG_FB_UVESA) += uvesafb.o
diff --git a/drivers/video/ocfb.c b/drivers/video/ocfb.c
new file mode 100644
index 0000000..7f9dc9b
--- /dev/null
+++ b/drivers/video/ocfb.c
@@ -0,0 +1,440 @@
+/*
+ * OpenCores VGA/LCD 2.0 core frame buffer driver
+ *
+ * Copyright (C) 2013 Stefan Kristiansson, stefan.kristiansson@saunalahti.fi
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/errno.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+
+/* OCFB register defines */
+#define OCFB_CTRL 0x000
+#define OCFB_STAT 0x004
+#define OCFB_HTIM 0x008
+#define OCFB_VTIM 0x00c
+#define OCFB_HVLEN 0x010
+#define OCFB_VBARA 0x014
+#define OCFB_PALETTE 0x800
+
+#define OCFB_CTRL_VEN 0x00000001 /* Video Enable */
+#define OCFB_CTRL_HIE 0x00000002 /* HSync Interrupt Enable */
+#define OCFB_CTRL_PC 0x00000800 /* 8-bit Pseudo Color Enable*/
+#define OCFB_CTRL_CD8 0x00000000 /* Color Depth 8 */
+#define OCFB_CTRL_CD16 0x00000200 /* Color Depth 16 */
+#define OCFB_CTRL_CD24 0x00000400 /* Color Depth 24 */
+#define OCFB_CTRL_CD32 0x00000600 /* Color Depth 32 */
+#define OCFB_CTRL_VBL1 0x00000000 /* Burst Length 1 */
+#define OCFB_CTRL_VBL2 0x00000080 /* Burst Length 2 */
+#define OCFB_CTRL_VBL4 0x00000100 /* Burst Length 4 */
+#define OCFB_CTRL_VBL8 0x00000180 /* Burst Length 8 */
+
+#define PALETTE_SIZE 256
+
+#define OCFB_NAME "OC VGA/LCD"
+
+static char *mode_option;
+
+static const struct fb_videomode default_mode = {
+ /* 640x480 @ 60 Hz, 31.5 kHz hsync */
+ NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
+ 0, FB_VMODE_NONINTERLACED
+};
+
+struct ocfb_dev {
+ struct fb_info info;
+ void __iomem *regs;
+ /* flag indicating whether the regs are little endian accessed */
+ int little_endian;
+ /* Physical and virtual addresses of framebuffer */
+ phys_addr_t fb_phys;
+ void __iomem *fb_virt;
+ u32 pseudo_palette[PALETTE_SIZE];
+};
+
+#ifndef MODULE
+static int __init ocfb_setup(char *options)
+{
+ char *curr_opt;
+
+ if (!options || !*options)
+ return 0;
+
+ while ((curr_opt = strsep(&options, ",")) != NULL) {
+ if (!*curr_opt)
+ continue;
+ mode_option = curr_opt;
+ }
+
+ return 0;
+}
+

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate