Only compile the FDT bits when we are using FDT.

This commit is contained in:
Adrian Chadd 2016-04-17 02:05:45 +00:00
parent b9dd6a90b6
commit 75b3cfd252
2 changed files with 5 additions and 3 deletions

View file

@ -121,7 +121,7 @@ static int
at45d_get_status(device_t dev, uint8_t *status)
{
uint8_t rxBuf[8], txBuf[8];
struct spi_command cmd;
struct spi_command cmd = SPI_COMMAND_INITIALIZER;
int err;
memset(&cmd, 0, sizeof(cmd));
@ -141,7 +141,7 @@ static int
at45d_get_mfg_info(device_t dev, uint8_t *resp)
{
uint8_t rxBuf[8], txBuf[8];
struct spi_command cmd;
struct spi_command cmd = SPI_COMMAND_INITIALIZER;
int err;
memset(&cmd, 0, sizeof(cmd));
@ -303,7 +303,7 @@ at45d_task(void *arg)
uint8_t rxBuf[8], txBuf[8];
struct at45d_softc *sc;
struct bio *bp;
struct spi_command cmd;
struct spi_command cmd = SPI_COMMAND_INITIALIZER;
device_t dev, pdev;
caddr_t buf;
u_long len, resid;

View file

@ -432,11 +432,13 @@ mx25l_set_4b_mode(device_t dev, uint8_t command)
return (err);
}
#ifdef FDT
static struct ofw_compat_data compat_data[] = {
{ "st,m25p", 1 },
{ "jedec,spi-nor", 1 },
{ NULL, 0 },
};
#endif
static int
mx25l_probe(device_t dev)