Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2019 15:59:50 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348172 - in head/sys/dev: flash spibus
Message-ID:  <201905231559.x4NFxoQ2084314@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Thu May 23 15:59:50 2019
New Revision: 348172
URL: https://svnweb.freebsd.org/changeset/base/348172

Log:
  Use the new FDTCOMPAT_PNP_INFO() macro to define SPIBUS_FDT_PNP_INFO().
  Also rename SPIBUS_PNP_INFO -> SPIBUS_FDT_PNP_INFO because there could be
  other kinds of pnpinfo for other (non-fdt) bus attachments.

Modified:
  head/sys/dev/flash/at45d.c
  head/sys/dev/flash/mx25l.c
  head/sys/dev/spibus/spi.h

Modified: head/sys/dev/flash/at45d.c
==============================================================================
--- head/sys/dev/flash/at45d.c	Thu May 23 15:53:41 2019	(r348171)
+++ head/sys/dev/flash/at45d.c	Thu May 23 15:59:50 2019	(r348172)
@@ -606,6 +606,6 @@ DRIVER_MODULE(at45d, spibus, at45d_driver, at45d_devcl
 MODULE_DEPEND(at45d, spibus, 1, 1, 1);
 #ifdef FDT
 MODULE_DEPEND(at45d, fdt_slicer, 1, 1, 1);
-SPIBUS_PNP_INFO(compat_data);
+SPIBUS_FDT_PNP_INFO(compat_data);
 #endif
 

Modified: head/sys/dev/flash/mx25l.c
==============================================================================
--- head/sys/dev/flash/mx25l.c	Thu May 23 15:53:41 2019	(r348171)
+++ head/sys/dev/flash/mx25l.c	Thu May 23 15:59:50 2019	(r348172)
@@ -686,5 +686,5 @@ DRIVER_MODULE(mx25l, spibus, mx25l_driver, mx25l_devcl
 MODULE_DEPEND(mx25l, spibus, 1, 1, 1);
 #ifdef	FDT
 MODULE_DEPEND(mx25l, fdt_slicer, 1, 1, 1);
-SPIBUS_PNP_INFO(compat_data);
+SPIBUS_FDT_PNP_INFO(compat_data);
 #endif

Modified: head/sys/dev/spibus/spi.h
==============================================================================
--- head/sys/dev/spibus/spi.h	Thu May 23 15:53:41 2019	(r348171)
+++ head/sys/dev/spibus/spi.h	Thu May 23 15:59:50 2019	(r348172)
@@ -41,6 +41,8 @@ struct spi_command {
 
 #define	SPI_CHIP_SELECT_HIGH	0x1		/* Chip select high (else low) */
 
-#define SPIBUS_PNP_DESCR "Z:compat;P:#;"
-#define SPIBUS_PNP_INFO(t) \
-	MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t) / sizeof(t[0]));
+#ifdef FDT
+#define	SPIBUS_FDT_PNP_INFO(t)	FDTCOMPAT_PNP_INFO(t, spibus)
+#else
+#define	SPIBUS_FDT_PNP_INFO(t)
+#endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905231559.x4NFxoQ2084314>