From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, linux-sh@vger.kernel.org,
gregkh@linuxfoundation.org, horms@verge.net.au,
geert@linux-m68k.org, laurent.pinchart@ideasonboard.com,
olof@lixom.net, Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH 03/03] staging: board: kzm9d: Board staging support for emxx_udc
Date: Thu, 22 May 2014 08:54:09 +0000 [thread overview]
Message-ID: <20140522085409.26279.64965.sendpatchset@w520> (raw)
In-Reply-To: <20140522085339.26279.83340.sendpatchset@w520>
From: Magnus Damm <damm+renesas@opensource.se>
Add staging board support for the KZM9D board and add
an emxx_udc platform device to allow in-tree continous
development of the driver on the KZM9D board.
When DT bindings are ready for the emxx_udc driver then
the platform device in the KZM9D staging board code can
easily be removed. Until then we use platform devices
to continously improve the driver and integration code.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
drivers/staging/Kconfig | 2 ++
drivers/staging/Makefile | 1 +
drivers/staging/board/Kconfig | 7 +++++++
drivers/staging/board/Makefile | 1 +
drivers/staging/board/board.h | 17 +++++++++++++++++
drivers/staging/board/kzm9d.c | 18 ++++++++++++++++++
6 files changed, 46 insertions(+)
--- 0002/drivers/staging/Kconfig
+++ work/drivers/staging/Kconfig 2014-05-22 15:31:57.000000000 +0900
@@ -112,6 +112,8 @@ source "drivers/staging/media/Kconfig"
source "drivers/staging/android/Kconfig"
+source "drivers/staging/board/Kconfig"
+
source "drivers/staging/ozwpan/Kconfig"
source "drivers/staging/gdm72xx/Kconfig"
--- 0002/drivers/staging/Makefile
+++ work/drivers/staging/Makefile 2014-05-22 15:31:57.000000000 +0900
@@ -49,6 +49,7 @@ obj-$(CONFIG_TOUCHSCREEN_CLEARPAD_TM1217
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/
obj-$(CONFIG_MFD_NVEC) += nvec/
obj-$(CONFIG_ANDROID) += android/
+obj-$(CONFIG_STAGING_BOARD) += board/
obj-$(CONFIG_USB_WPAN_HCD) += ozwpan/
obj-$(CONFIG_WIMAX_GDM72XX) += gdm72xx/
obj-$(CONFIG_LTE_GDM724X) += gdm724x/
--- /dev/null
+++ work/drivers/staging/board/Kconfig 2014-05-22 15:31:58.000000000 +0900
@@ -0,0 +1,7 @@
+config STAGING_BOARD
+ boolean "Staging Board Support"
+ help
+ Select to enable per-board staging support code.
+
+ If in doubt, say N here.
+
--- /dev/null
+++ work/drivers/staging/board/Makefile 2014-05-22 15:31:58.000000000 +0900
@@ -0,0 +1 @@
+obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += kzm9d.o
--- /dev/null
+++ work/drivers/staging/board/board.h 2014-05-22 15:31:58.000000000 +0900
@@ -0,0 +1,17 @@
+#ifndef __BOARD_H__
+#define __BOARD_H__
+#include <linux/init.h>
+#include <linux/of.h>
+
+#define board_staging(str, fn) \
+static int __init runtime_board_check(void) \
+{ \
+ if (of_machine_is_compatible(str)) \
+ fn(); \
+ \
+ return 0; \
+} \
+ \
+late_initcall(runtime_board_check)
+
+#endif /* __BOARD_H__ */
--- /dev/null
+++ work/drivers/staging/board/kzm9d.c 2014-05-22 16:19:00.000000000 +0900
@@ -0,0 +1,18 @@
+/* Staging board support for KZM9D. Enable not-yet-DT-capable devices here. */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include "board.h"
+
+static const struct resource usbs1_resources[] __initconst = {
+ DEFINE_RES_MEM(0xe2800000, 0x2000),
+ DEFINE_RES_IRQ(159),
+};
+
+static void __init kzm9d_init(void)
+{
+ platform_device_register_simple("emxx_udc", -1, usbs1_resources,
+ ARRAY_SIZE(usbs1_resources));
+}
+
+board_staging("renesas,kzm9d", kzm9d_init);
next prev parent reply other threads:[~2014-05-22 8:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 8:53 [PATCH 00/03] staging: Emma Mobile USB driver and KZM9D board code Magnus Damm
2014-05-22 8:53 ` [PATCH 02/03] staging: emxx_udc: I/O memory and IRQ resource support Magnus Damm
2014-05-22 8:54 ` Magnus Damm [this message]
2014-05-22 9:19 ` [PATCH 03/03] staging: board: kzm9d: Board staging support for emxx_udc Geert Uytterhoeven
2014-05-22 9:29 ` Magnus Damm
2014-05-22 9:17 ` [PATCH 00/03] staging: Emma Mobile USB driver and KZM9D board code Dan Carpenter
2014-05-22 9:32 ` Magnus Damm
2014-05-23 2:20 ` Greg KH
2014-05-22 9:21 ` Geert Uytterhoeven
2014-05-22 9:32 ` Magnus Damm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140522085409.26279.64965.sendpatchset@w520 \
--to=magnus.damm@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=horms@verge.net.au \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=olof@lixom.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).