Message ID | 20140529131732.2329.50630.sendpatchset@w520 (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Thu, May 29, 2014 at 10:17:32PM +0900, Magnus Damm wrote: > --- /dev/null > +++ work/drivers/staging/board/Kconfig 2014-05-29 21:40:41.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. > + Actually, you're probably going to need to add a bunch of dependencies here or it will break "make randconfig" right away. Sorry that I forgot about this in the first review. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Dan, On Thu, May 29, 2014 at 10:20 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote: > On Thu, May 29, 2014 at 10:17:32PM +0900, Magnus Damm wrote: >> --- /dev/null >> +++ work/drivers/staging/board/Kconfig 2014-05-29 21:40:41.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. >> + > > Actually, you're probably going to need to add a bunch of dependencies > here or it will break "make randconfig" right away. Sorry that I forgot > about this in the first review. Good point, thanks for checking. I will have a look at this and add dependencies to make sure it builds on a wide range of platforms. Regarding the emxx_udc portion of the patches (in the v2 series patch 1 -> 3), if there are no objections would it be possible for you to take them as-is? If so I'll resend the staging board bits only. Thanks! / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, May 29, 2014 at 10:27:30PM +0900, Magnus Damm wrote: > Hi Dan, > > On Thu, May 29, 2014 at 10:20 PM, Dan Carpenter > <dan.carpenter@oracle.com> wrote: > > On Thu, May 29, 2014 at 10:17:32PM +0900, Magnus Damm wrote: > >> --- /dev/null > >> +++ work/drivers/staging/board/Kconfig 2014-05-29 21:40:41.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. > >> + > > > > Actually, you're probably going to need to add a bunch of dependencies > > here or it will break "make randconfig" right away. Sorry that I forgot > > about this in the first review. > > Good point, thanks for checking. I will have a look at this and add > dependencies to make sure it builds on a wide range of platforms. Hi Magnus, let me know if you would like me to perform some build-testing. > Regarding the emxx_udc portion of the patches (in the v2 series patch > 1 -> 3), if there are no objections would it be possible for you to > take them as-is? If so I'll resend the staging board bits only. > > Thanks! > > / magnus > -- > To unsubscribe from this list: send the line "unsubscribe linux-sh" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, May 30, 2014 at 8:10 AM, Simon Horman <horms@verge.net.au> wrote: > On Thu, May 29, 2014 at 10:27:30PM +0900, Magnus Damm wrote: >> Hi Dan, >> >> On Thu, May 29, 2014 at 10:20 PM, Dan Carpenter >> <dan.carpenter@oracle.com> wrote: >> > On Thu, May 29, 2014 at 10:17:32PM +0900, Magnus Damm wrote: >> >> --- /dev/null >> >> +++ work/drivers/staging/board/Kconfig 2014-05-29 21:40:41.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. >> >> + >> > >> > Actually, you're probably going to need to add a bunch of dependencies >> > here or it will break "make randconfig" right away. Sorry that I forgot >> > about this in the first review. >> >> Good point, thanks for checking. I will have a look at this and add >> dependencies to make sure it builds on a wide range of platforms. > > Hi Magnus, > > let me know if you would like me to perform some build-testing. Hey Simon, Thanks for the offer. When you have time, can you please feed V3 into your build test setup? [PATCH v3 00/05] staging: Emma Mobile USB driver and KZM9D board code V3 [PATCH v3 01/05] staging: emxx_udc: Add Emma Mobile USB Gadget driver [PATCH v3 02/05] staging: emxx_udc: I/O memory and IRQ resource support [PATCH v3 03/05] staging: emxx_udc: Add TODO file [PATCH v3 04/05] staging: board: Initial board staging support [PATCH v3 05/05] staging: board: kzm9d: Board staging support for emxx_udc Cheers, / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jun 06, 2014 at 09:07:44PM +0900, Magnus Damm wrote: > On Fri, May 30, 2014 at 8:10 AM, Simon Horman <horms@verge.net.au> wrote: > > On Thu, May 29, 2014 at 10:27:30PM +0900, Magnus Damm wrote: > >> Hi Dan, > >> > >> On Thu, May 29, 2014 at 10:20 PM, Dan Carpenter > >> <dan.carpenter@oracle.com> wrote: > >> > On Thu, May 29, 2014 at 10:17:32PM +0900, Magnus Damm wrote: > >> >> --- /dev/null > >> >> +++ work/drivers/staging/board/Kconfig 2014-05-29 21:40:41.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. > >> >> + > >> > > >> > Actually, you're probably going to need to add a bunch of dependencies > >> > here or it will break "make randconfig" right away. Sorry that I forgot > >> > about this in the first review. > >> > >> Good point, thanks for checking. I will have a look at this and add > >> dependencies to make sure it builds on a wide range of platforms. > > > > Hi Magnus, > > > > let me know if you would like me to perform some build-testing. > > Hey Simon, > > Thanks for the offer. When you have time, can you please feed V3 into > your build test setup? > > [PATCH v3 00/05] staging: Emma Mobile USB driver and KZM9D board code V3 > [PATCH v3 01/05] staging: emxx_udc: Add Emma Mobile USB Gadget driver > [PATCH v3 02/05] staging: emxx_udc: I/O memory and IRQ resource support > [PATCH v3 03/05] staging: emxx_udc: Add TODO file > [PATCH v3 04/05] staging: board: Initial board staging support > [PATCH v3 05/05] staging: board: kzm9d: Board staging support for emxx_udc Hi Magnus, my test was less exciting as I had hoped as STAGING is not widely enabled in defconfigs. I compiled v3.15-rc8 with the patches above applied using the defconfigs and allmodconfigs for a wide range of architectures. The result was that all of the configs that built for v3.15-rc8 also built with your patches applied. In other words, I did not find a problem. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- 0008/drivers/staging/Kconfig +++ work/drivers/staging/Kconfig 2014-05-29 21:40:40.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" --- 0008/drivers/staging/Makefile +++ work/drivers/staging/Makefile 2014-05-29 21:40:40.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-29 21:40:41.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-29 21:40:41.000000000 +0900 @@ -0,0 +1 @@ +obj-y := board.o --- /dev/null +++ work/drivers/staging/board/TODO 2014-05-29 21:40:41.000000000 +0900 @@ -0,0 +1,2 @@ +* replace platform device code with DT nodes once the driver supports DT +* remove staging board code when no more platform devices are needed --- /dev/null +++ work/drivers/staging/board/board.c 2014-05-29 21:46:32.000000000 +0900 @@ -0,0 +1,41 @@ +#include <linux/init.h> +#include <linux/device.h> +#include <linux/kernel.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include "board.h" + +static bool find_by_address(u64 base_address) +{ + struct device_node *dn = of_find_all_nodes(NULL); + struct resource res; + + while (dn) { + if (of_can_translate_address(dn) + && !of_address_to_resource(dn, 0, &res)) { + if (res.start == base_address) { + of_node_put(dn); + return true; + } + } + dn = of_find_all_nodes(dn); + } + + return false; +} + +bool __init board_staging_dt_node_available(const struct resource *resource, + unsigned int num_resources) +{ + unsigned int i; + + for (i = 0; i < num_resources; i++) { + const struct resource *r = resource + i; + + if (resource_type(r) == IORESOURCE_MEM) + if (find_by_address(r->start)) + return true; /* DT node available */ + } + + return false; /* Nothing found */ +} --- /dev/null +++ work/drivers/staging/board/board.h 2014-05-29 21:40:41.000000000 +0900 @@ -0,0 +1,20 @@ +#ifndef __BOARD_H__ +#define __BOARD_H__ +#include <linux/init.h> +#include <linux/of.h> + +bool board_staging_dt_node_available(const struct resource *resource, + unsigned int num_resources); + +#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__ */