From patchwork Mon Sep 10 08:56:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 1430651 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 85BBA4025E for ; Mon, 10 Sep 2012 08:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755619Ab2IJI4u (ORCPT ); Mon, 10 Sep 2012 04:56:50 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:48520 "EHLO relmlor1.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752202Ab2IJI4r (ORCPT ); Mon, 10 Sep 2012 04:56:47 -0400 Received: from relmlir1.idc.renesas.com ([10.200.68.151]) by relmlor1.idc.renesas.com ( SJSMS) with ESMTP id <0MA400J7ZM5WGL20@relmlor1.idc.renesas.com>; Mon, 10 Sep 2012 17:56:20 +0900 (JST) Received: from relmlac1.idc.renesas.com ([10.200.69.21]) by relmlir1.idc.renesas.com (SJSMS) with ESMTP id <0MA400CYOM5WGWD0@relmlir1.idc.renesas.com>; Mon, 10 Sep 2012 17:56:20 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 69DCF80177; Mon, 10 Sep 2012 17:56:20 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 642B48015D; Mon, 10 Sep 2012 17:56:20 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id TAM15048; Mon, 10 Sep 2012 17:56:20 +0900 X-IronPort-AV: E=Sophos; i="4.80,397,1344178800"; d="scan'208"; a="97444798" Received: from unknown (HELO relay61.aps.necel.com) ([10.29.19.64]) by relmlii1.idc.renesas.com with ESMTP; Mon, 10 Sep 2012 17:56:20 +0900 Received: from julia (du2com5.eu.necel.com [172.29.24.35] (may be forged)) by relay61.aps.necel.com (8.14.4+Sun/8.14.4) with ESMTP id q8A8uG5f003036; Mon, 10 Sep 2012 17:56:16 +0900 (JST) Received: by julia (Postfix, from userid 2) id 18A6B4CDF5; Mon, 10 Sep 2012 10:56:22 +0200 (CEST) Received: from du0nohub.eu.necel.com (unknown [172.29.24.70]) by julia (Postfix) with ESMTP id 080FA4CD9C; Mon, 10 Sep 2012 10:56:22 +0200 (CEST) Received: from duacsls.ad.ree.renesas.com ([172.29.43.47]) by du0nohub.eu.necel.com (Lotus Domino Release 8.5.3 HF466) with ESMTP id 2012091010561564-212291 ; Mon, 10 Sep 2012 10:56:15 +0200 From: Phil Edworthy To: Florian Tobias Schandinat , linux-fbdev@vger.kernel.org, Jingoo Han Cc: linux-sh@vger.kernel.org, Phil Edworthy X-Mailer: git-send-email 1.7.5.4 In-reply-to: <001701cd8f0def56d40ce047c0$%han@samsung.com> References: <001701cd8f0def56d40ce047c0$%han@samsung.com> X-TNEFEvaluated: 1 Message-id: <1347267372-22949-1-git-send-email-phil.edworthy@renesas.com> Date: Mon, 10 Sep 2012 09:56:12 +0100 Subject: [PATCH v2] fbdev: Add Renesas vdc4 framebuffer driver X-MIMETrack: Itemize by SMTP Server on DU0NOHUB/NECEE(Release 8.5.3 HF466|March 09, 2012) at 10.09.2012 10:56:15, Serialize by Router on DU0NOHUB/NECEE(Release 8.5.3 HF466|March 09, 2012) at 10.09.2012 10:56:16, Serialize complete at 10.09.2012 10:56:16 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The vdc4 display hardware is found on the sh7269 device. Signed-off-by: Phil Edworthy Reviewed-by: Jingoo Han --- v2: * Use devm_ variants of clk_get, ioremap_nocache, request_irq. * Replace spaces with tabs. * Check ren_vdc4_start return value. * Fix headers used. drivers/video/Kconfig | 10 + drivers/video/Makefile | 1 + drivers/video/ren_vdc4fb.c | 641 ++++++++++++++++++++++++++++++++++++++++++++ include/video/ren_vdc4fb.h | 19 ++ 4 files changed, 671 insertions(+), 0 deletions(-) create mode 100644 drivers/video/ren_vdc4fb.c create mode 100644 include/video/ren_vdc4fb.h diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0217f74..89c9250 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1990,6 +1990,16 @@ config FB_W100 If unsure, say N. +config FB_REN_VDC4FB + tristate "Renesas VDC4 framebuffer support" + depends on FB && CPU_SUBTYPE_SH7269 + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + ---help--- + Frame buffer driver for the Renesas VDC4. + config FB_SH_MOBILE_LCDC tristate "SuperH Mobile LCDC framebuffer support" depends on FB && (SUPERH || ARCH_SHMOBILE) && HAVE_CLK diff --git a/drivers/video/Makefile b/drivers/video/Makefile index ee8dafb..ba69fcb 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -140,6 +140,7 @@ obj-$(CONFIG_SH_MIPI_DSI) += sh_mipi_dsi.o obj-$(CONFIG_FB_SH_MOBILE_HDMI) += sh_mobile_hdmi.o obj-$(CONFIG_FB_SH_MOBILE_MERAM) += sh_mobile_meram.o obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o +obj-$(CONFIG_FB_REN_VDC4FB) += ren_vdc4fb.o obj-$(CONFIG_FB_OMAP) += omap/ obj-y += omap2/ obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o diff --git a/drivers/video/ren_vdc4fb.c b/drivers/video/ren_vdc4fb.c new file mode 100644 index 0000000..73daee3 --- /dev/null +++ b/drivers/video/ren_vdc4fb.c @@ -0,0 +1,641 @@ +/* + * Renesas VDC4 Framebuffer + * + * Based on sh_mobile_lcdcfb.c + * Copyright (c) 2012 Renesas Electronics Europe Ltd + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include