summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/aiodev/am335x_adc.c2
-rw-r--r--drivers/aiodev/imx_thermal.c2
-rw-r--r--drivers/clk/Kconfig5
-rw-r--r--drivers/clk/Makefile3
-rw-r--r--drivers/clk/clk-gpio.c20
-rw-r--r--drivers/clk/clk.c30
-rw-r--r--drivers/gpio/gpiolib.c2
-rw-r--r--drivers/hab/hab.c2
-rw-r--r--drivers/mci/dw_mmc.c2
-rw-r--r--drivers/mci/imx-esdhc-pbl.c108
-rw-r--r--drivers/mci/mci-bcm2835.c2
-rw-r--r--drivers/mtd/devices/m25p80.c15
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c4
-rw-r--r--drivers/mtd/nand/atmel/legacy.c11
-rw-r--r--drivers/mtd/spi-nor/spi-nor.c1
-rw-r--r--drivers/net/macb.c4
-rw-r--r--drivers/net/realtek-dsa/realtek-mdio.c1
-rw-r--r--drivers/net/realtek-dsa/realtek-smi.c1
-rw-r--r--drivers/net/realtek-dsa/rtl8365mb.c2
-rw-r--r--drivers/net/realtek-dsa/rtl8366rb.c2
-rw-r--r--drivers/net/realtek-dsa/tag_rtl4_a.c1
-rw-r--r--drivers/net/realtek-dsa/tag_rtl8_4.c1
-rw-r--r--drivers/nvmem/ocotp.c4
-rw-r--r--drivers/of/base.c12
-rw-r--r--drivers/of/platform.c2
-rw-r--r--drivers/pci/pci-imx6.c6
-rw-r--r--drivers/pinctrl/imx-iomux-v2.c2
-rw-r--r--drivers/pinctrl/pinctrl-stm32.c5
-rw-r--r--drivers/spi/atmel-quadspi.c6
-rw-r--r--drivers/video/imx-ipu-fb.c4
-rw-r--r--drivers/video/ramfb.c2
31 files changed, 80 insertions, 184 deletions
diff --git a/drivers/aiodev/am335x_adc.c b/drivers/aiodev/am335x_adc.c
index ceb7531dc0..491866ca36 100644
--- a/drivers/aiodev/am335x_adc.c
+++ b/drivers/aiodev/am335x_adc.c
@@ -19,7 +19,7 @@
#include <io.h>
#include <linux/log2.h>
#include <aiodev.h>
-#include <mach/am33xx-clock.h>
+#include <mach/omap/am33xx-clock.h>
#include "ti_am335x_tscadc.h"
struct am335x_adc_data {
diff --git a/drivers/aiodev/imx_thermal.c b/drivers/aiodev/imx_thermal.c
index 4d24f6cae3..0b1670708f 100644
--- a/drivers/aiodev/imx_thermal.c
+++ b/drivers/aiodev/imx_thermal.c
@@ -22,7 +22,7 @@
#include <linux/math64.h>
#include <linux/log2.h>
#include <linux/clk.h>
-#include <mach/imx6-anadig.h>
+#include <mach/imx/imx6-anadig.h>
#include <io.h>
#include <aiodev.h>
#include <mfd/syscon.h>
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 0faea6488e..076e77c859 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -38,6 +38,11 @@ config COMMON_CLK_SCMI
This driver uses SCMI Message Protocol to interact with the
firmware providing all the clock controls.
+config COMMON_CLK_GPIO
+ bool
+ default y
+ depends on COMMON_CLK_OF_PROVIDER
+
source "drivers/clk/sifive/Kconfig"
endif
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index baf452de98..c865e4c274 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -2,7 +2,7 @@
obj-$(CONFIG_COMMON_CLK) += clk.o clk-fixed.o clk-divider.o clk-fixed-factor.o \
clk-mux.o clk-gate.o clk-composite.o \
clk-fractional-divider.o clk-conf.o \
- clk-gate-shared.o clk-gpio.o \
+ clk-gate-shared.o \
clk-bulk.o
obj-$(CONFIG_CLKDEV_LOOKUP) += clkdev.o
@@ -28,3 +28,4 @@ obj-$(CONFIG_COMMON_CLK_STM32F) += clk-stm32f4.o
obj-$(CONFIG_MACH_RPI_COMMON) += clk-rpi.o
obj-y += bcm/
obj-$(CONFIG_COMMON_CLK_SCMI) += clk-scmi.o
+obj-$(CONFIG_COMMON_CLK_GPIO) += clk-gpio.o
diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
index 6ac2e820fa..8cc0c5fc97 100644
--- a/drivers/clk/clk-gpio.c
+++ b/drivers/clk/clk-gpio.c
@@ -50,8 +50,9 @@ static struct clk_ops clk_gpio_ops = {
.is_enabled = clk_gpio_is_enabled,
};
-static int of_gpio_clk_setup(struct device_node *node)
+static int of_gpio_clk_probe(struct device *dev)
{
+ struct device_node *node = dev->device_node;
struct clk_gpio *clk_gpio;
enum of_gpio_flags of_flags;
unsigned long flags;
@@ -105,16 +106,15 @@ no_parent:
return ret;
}
-/* Can't use OF_CLK_DECLARE due to need to run after GPIOcontrollers have
- * registrered */
-
static const struct of_device_id clk_gpio_device_id[] = {
- { .compatible = "gpio-gate-clock", .data = of_gpio_clk_setup, },
+ { .compatible = "gpio-gate-clock", },
{}
};
-static int clk_gpio_init(void)
-{
- return of_clk_init(NULL, clk_gpio_device_id);
-}
-coredevice_initcall(clk_gpio_init);
+static struct driver gpio_gate_clock_driver = {
+ .probe = of_gpio_clk_probe,
+ .name = "gpio-gate-clock",
+ .of_compatible = DRV_OF_COMPAT(clk_gpio_device_id),
+};
+
+core_platform_driver(gpio_gate_clock_driver);
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 30fe43032b..7406dba260 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -847,18 +847,30 @@ static int parent_ready(struct device_node *np)
}
}
+static LIST_HEAD(probed_clks);
+
+static bool of_clk_probed(struct device_node *np)
+{
+ struct clock_provider *clk_provider;
+
+ list_for_each_entry(clk_provider, &probed_clks, node)
+ if (clk_provider->np == np)
+ return true;
+ return false;
+}
+
/**
* of_clk_init() - Scan and init clock providers from the DT
- * @root: parent of the first level to probe or NULL for the root of the tree
- * @matches: array of compatible values and init functions for providers.
*
* This function scans the device tree for matching clock providers and
* calls their initialization functions
*
* Returns 0 on success, < 0 on failure.
*/
-int of_clk_init(struct device_node *root, const struct of_device_id *matches)
+int of_clk_init(void)
{
+ struct device_node *root = of_get_root_node();
+ const struct of_device_id *matches = __clk_of_table_start;
struct clock_provider *clk_provider, *next;
bool is_init_done;
bool force = false;
@@ -866,11 +878,7 @@ int of_clk_init(struct device_node *root, const struct of_device_id *matches)
const struct of_device_id *match;
if (!root)
- root = of_find_node_by_path("/");
- if (!root)
return -EINVAL;
- if (!matches)
- matches = __clk_of_table_start;
/* First prepare the list of the clocks providers */
for_each_matching_node_and_match(root, matches, &match) {
@@ -879,6 +887,11 @@ int of_clk_init(struct device_node *root, const struct of_device_id *matches)
if (!of_device_is_available(root))
continue;
+ if (of_clk_probed(root)) {
+ pr_debug("%s: already probed: %pOF\n", __func__, root);
+ continue;
+ }
+
parent = xzalloc(sizeof(*parent));
parent->clk_init_cb = match->data;
@@ -898,8 +911,7 @@ int of_clk_init(struct device_node *root, const struct of_device_id *matches)
clk_provider->clk_init_cb(np);
of_clk_set_defaults(np, true);
- list_del(&clk_provider->node);
- free(clk_provider);
+ list_move_tail(&clk_provider->node, &probed_clks);
is_init_done = true;
}
}
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 7362798758..6ec63b1119 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -583,7 +583,7 @@ int dev_gpiod_get_index(struct device *dev,
buf = NULL;
if (!label) {
- if (con_id)
+ if (_con_id)
label = buf = basprintf("%s-%s", dev_name(dev), _con_id);
else
label = dev_name(dev);
diff --git a/drivers/hab/hab.c b/drivers/hab/hab.c
index 65384a6c10..5bb97c4b68 100644
--- a/drivers/hab/hab.c
+++ b/drivers/hab/hab.c
@@ -5,7 +5,7 @@
#include <fcntl.h>
#include <environment.h>
#include <libfile.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <hab.h>
#include <regmap.h>
#include <fs.h>
diff --git a/drivers/mci/dw_mmc.c b/drivers/mci/dw_mmc.c
index 8f3317deb5..73a8ebbc15 100644
--- a/drivers/mci/dw_mmc.c
+++ b/drivers/mci/dw_mmc.c
@@ -570,7 +570,7 @@ static int dw_mmc_probe(struct device *dev)
clk_enable(host->clk_biu);
clk_enable(host->clk_ciu);
- rst = reset_control_get(dev, "reset");
+ rst = reset_control_get_optional(dev, "reset");
if (IS_ERR(rst)) {
dev_warn(dev, "error claiming reset: %pe\n", rst);
} else if (rst) {
diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c
index 40c2882dc4..7c5febb7a8 100644
--- a/drivers/mci/imx-esdhc-pbl.c
+++ b/drivers/mci/imx-esdhc-pbl.c
@@ -104,117 +104,17 @@ static int esdhc_read_blocks(struct fsl_esdhc_host *host, void *dst, size_t len)
}
#ifdef CONFIG_ARCH_IMX
-static int esdhc_search_header(struct fsl_esdhc_host *host,
- struct imx_flash_header_v2 **header_pointer,
- void *buffer, u32 *offset, u32 ivt_offset)
+static int imx_read_blocks(void *dest, size_t len, void *priv)
{
- int ret;
- int i, header_count = 1;
- void *buf = buffer;
- struct imx_flash_header_v2 *hdr;
-
- for (i = 0; i < header_count; i++) {
- ret = esdhc_read_blocks(host, buf,
- *offset + ivt_offset + SECTOR_SIZE);
- if (ret)
- return ret;
-
- hdr = buf + *offset + ivt_offset;
-
- if (!is_imx_flash_header_v2(hdr)) {
- pr_debug("IVT header not found on SD card. "
- "Found tag: 0x%02x length: 0x%04x "
- "version: %02x\n",
- hdr->header.tag, hdr->header.length,
- hdr->header.version);
- return -EINVAL;
- }
-
- if (IS_ENABLED(CONFIG_ARCH_IMX8MQ) &&
- hdr->boot_data.plugin & PLUGIN_HDMI_IMAGE) {
- /*
- * In images that include signed HDMI
- * firmware, first v2 header would be
- * dedicated to that and would not contain any
- * useful for us information. In order for us
- * to pull the rest of the bootloader image
- * in, we need to re-read header from SD/MMC,
- * this time skipping anything HDMI firmware
- * related.
- */
- *offset += hdr->boot_data.size + hdr->header.length;
- header_count++;
- }
- }
- *header_pointer = hdr;
- return 0;
+ return esdhc_read_blocks(priv, dest, len);
}
static int
esdhc_load_image(struct fsl_esdhc_host *host, ptrdiff_t address,
ptrdiff_t entry, u32 offset, u32 ivt_offset, bool start)
{
-
- void *buf = (void *)address;
- struct imx_flash_header_v2 *hdr = NULL;
- int ret, len;
- void __noreturn (*bb)(void);
- unsigned int ofs;
-
- len = imx_image_size();
- len = ALIGN(len, SECTOR_SIZE);
-
- ret = esdhc_search_header(host, &hdr, buf, &offset, ivt_offset);
- if (ret)
- return ret;
-
- pr_debug("Check ok, loading image\n");
-
- ofs = offset + hdr->entry - hdr->boot_data.start;
-
- if (entry != address) {
- /*
- * Passing entry different from address is interpreted
- * as a request to place the image such that its entry
- * point would be exactly at 'entry', that is:
- *
- * buf + ofs = entry
- *
- * solving the above for 'buf' gives us the
- * adjustment that needs to be made:
- *
- * buf = entry - ofs
- *
- */
- if (WARN_ON(entry - ofs < address)) {
- /*
- * We want to make sure we won't try to place
- * the start of the image before the beginning
- * of the memory buffer we were given in
- * address.
- */
- return -EINVAL;
- }
-
- buf = (void *)(entry - ofs);
- }
-
- ret = esdhc_read_blocks(host, buf, offset + len);
- if (ret) {
- pr_err("Loading image failed with %d\n", ret);
- return ret;
- }
-
- pr_debug("Image loaded successfully\n");
-
- if (!start)
- return 0;
-
- bb = buf + ofs;
-
- sync_caches_for_execution();
-
- bb();
+ return imx_load_image(address, entry, offset, ivt_offset, start,
+ SECTOR_SIZE, imx_read_blocks, host);
}
static void imx_esdhc_init(struct fsl_esdhc_host *host,
diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
index bcdf1b6196..477a3b83a0 100644
--- a/drivers/mci/mci-bcm2835.c
+++ b/drivers/mci/mci-bcm2835.c
@@ -148,7 +148,7 @@ static int bcm2835_mci_request(struct mci_host *mci, struct mci_cmd *cmd,
command << 16 | transfer_mode);
ret = bcm2835_mci_wait_command_done(host);
- if (ret) {
+ if (ret && ret != -ETIMEDOUT) {
dev_err(host->hw_dev, "Error while executing command %d\n",
cmd->cmdidx);
dev_err(host->hw_dev, "Status: 0x%X, Interrupt: 0x%X\n",
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 05c6473a28..ce3789c096 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -15,7 +15,6 @@
#include <driver.h>
#include <of.h>
#include <spi/spi.h>
-#include <spi/flash.h>
#include <xfuncs.h>
#include <malloc.h>
#include <errno.h>
@@ -205,7 +204,6 @@ static int m25p_probe(struct device *dev)
{
struct spi_device *spi = (struct spi_device *)dev->type_data;
struct spi_mem *spimem = spi->mem;
- struct flash_platform_data *data;
struct m25p *flash;
struct spi_nor *nor;
struct spi_nor_hwcaps hwcaps = {
@@ -218,8 +216,6 @@ static int m25p_probe(struct device *dev)
bool use_large_blocks;
int ret;
- data = dev->platform_data;
-
flash = xzalloc(sizeof *flash);
nor = &flash->spi_nor;
@@ -245,14 +241,7 @@ static int m25p_probe(struct device *dev)
dev->priv = (void *)flash;
- if (data && data->name)
- flash->mtd.name = data->name;
-
- if (data && data->type)
- flash_name = data->type;
- else if (data && data->name)
- flash_name = data->name;
- else if (dev->id_entry)
+ if (dev->id_entry)
flash_name = dev->id_entry->name;
else
flash_name = NULL; /* auto-detect */
@@ -267,8 +256,6 @@ static int m25p_probe(struct device *dev)
device_id = DEVICE_ID_SINGLE;
if (dev->of_node)
flash_name = of_alias_get(dev->of_node);
- else if (data && data->name)
- flash_name = data->name;
if (!flash_name) {
device_id = DEVICE_ID_DYNAMIC;
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index b6a0c79d2f..b5dbe4de3e 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -17,7 +17,6 @@
#include <clock.h>
#include <spi/spi.h>
-#include <spi/flash.h>
#include <linux/math64.h>
#include <linux/mtd/mtd.h>
@@ -599,7 +598,6 @@ add_dataflash_otp(struct spi_device *spi, char *name,
{
struct dataflash *priv;
struct mtd_info *device;
- struct flash_platform_data *pdata = spi->dev.platform_data;
char *otp_tag = "";
int err = 0;
@@ -617,7 +615,7 @@ add_dataflash_otp(struct spi_device *spi, char *name,
name);
device = &priv->mtd;
- device->name = (pdata && pdata->name) ? pdata->name : "dataflash";
+ device->name = "dataflash";
device->size = nr_pages * (uint64_t)pagesize;
device->erasesize = pagesize;
device->writesize = pagesize;
diff --git a/drivers/mtd/nand/atmel/legacy.c b/drivers/mtd/nand/atmel/legacy.c
index 44cd4d07e8..cf402549b8 100644
--- a/drivers/mtd/nand/atmel/legacy.c
+++ b/drivers/mtd/nand/atmel/legacy.c
@@ -1240,19 +1240,14 @@ static int __init atmel_nand_probe(struct device *dev)
nand_chip->ecc.mode = pdata->ecc_mode;
nand_chip->ecc.strength = pdata->ecc_strength ? : 1;
- nand_chip->ecc.size = 1 << pdata->ecc_size_shift ? : 512;
+ nand_chip->ecc.size = 1 << (pdata->ecc_size_shift ? : 9);
- if (pdata->ecc_mode == NAND_ECC_HW) {
- nand_chip->ecc.mode = NAND_ECC_HW;
+ if (pdata->ecc_mode == NAND_ECC_SOFT) {
+ nand_chip->ecc.algo = NAND_ECC_ALGO_HAMMING;
}
nand_chip->legacy.chip_delay = 40; /* 40us command delay time */
- if (IS_ENABLED(CONFIG_NAND_ECC_BCH) &&
- pdata->ecc_mode == NAND_ECC_SOFT_BCH) {
- nand_chip->ecc.mode = NAND_ECC_SOFT_BCH;
- }
-
if (host->board->bus_width_16) { /* 16-bit bus width */
nand_chip->options |= NAND_BUSWIDTH_16;
nand_chip->legacy.read_buf = atmel_read_buf16;
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index f83c3f02a0..8f6726ca4b 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -19,7 +19,6 @@
#include <linux/mtd/cfi.h>
#include <linux/mtd/spi-nor.h>
#include <of.h>
-#include <spi/flash.h>
#define SPI_NOR_MAX_ID_LEN 6
#define SPI_NOR_MAX_ADDR_WIDTH 4
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 3d7627fed8..9dd273a504 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -936,8 +936,8 @@ static const struct of_device_id macb_dt_ids[] = {
{ .compatible = "atmel,sama5d2-gem",},
{ .compatible = "atmel,sama5d3-gem",},
{ .compatible = "atmel,sama5d4-gem",},
- { .compatible = "cdns,zynq-gem",},
- { .compatible = "cdns,zynqmp-gem",},
+ { .compatible = "xlnx,zynq-gem",},
+ { .compatible = "xlnx,zynqmp-gem",},
{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
{ /* sentinel */ }
};
diff --git a/drivers/net/realtek-dsa/realtek-mdio.c b/drivers/net/realtek-dsa/realtek-mdio.c
index 8b32c3cf53..579eefebe2 100644
--- a/drivers/net/realtek-dsa/realtek-mdio.c
+++ b/drivers/net/realtek-dsa/realtek-mdio.c
@@ -23,6 +23,7 @@
#include <regmap.h>
#include <clock.h>
#include <gpiod.h>
+#include <linux/printk.h>
#include <linux/mdio.h>
#include "realtek.h"
diff --git a/drivers/net/realtek-dsa/realtek-smi.c b/drivers/net/realtek-dsa/realtek-smi.c
index 83d197dcdf..a12cb7ffd4 100644
--- a/drivers/net/realtek-dsa/realtek-smi.c
+++ b/drivers/net/realtek-dsa/realtek-smi.c
@@ -31,6 +31,7 @@
#include <of.h>
#include <of_device.h>
#include <linux/mdio.h>
+#include <linux/printk.h>
#include <clock.h>
#include <gpiod.h>
#include <driver.h>
diff --git a/drivers/net/realtek-dsa/rtl8365mb.c b/drivers/net/realtek-dsa/rtl8365mb.c
index 1f11ed4ed4..d8e8ac714d 100644
--- a/drivers/net/realtek-dsa/rtl8365mb.c
+++ b/drivers/net/realtek-dsa/rtl8365mb.c
@@ -94,6 +94,8 @@
#include <linux/bitops.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
+#include <linux/printk.h>
+#include <linux/export.h>
#include <regmap.h>
#include <net.h>
#include <linux/if_bridge.h>
diff --git a/drivers/net/realtek-dsa/rtl8366rb.c b/drivers/net/realtek-dsa/rtl8366rb.c
index 67dcb7fb70..5449b9481c 100644
--- a/drivers/net/realtek-dsa/rtl8366rb.c
+++ b/drivers/net/realtek-dsa/rtl8366rb.c
@@ -15,6 +15,8 @@
#include <linux/bitops.h>
#include <net.h>
#include <linux/if_bridge.h>
+#include <linux/printk.h>
+#include <linux/export.h>
#include <regmap.h>
#include "realtek.h"
diff --git a/drivers/net/realtek-dsa/tag_rtl4_a.c b/drivers/net/realtek-dsa/tag_rtl4_a.c
index dabd4ccba2..30c6a712d9 100644
--- a/drivers/net/realtek-dsa/tag_rtl4_a.c
+++ b/drivers/net/realtek-dsa/tag_rtl4_a.c
@@ -16,6 +16,7 @@
*/
#include <net.h>
+#include <linux/printk.h>
#include "realtek.h"
#include "dsa_priv.h"
diff --git a/drivers/net/realtek-dsa/tag_rtl8_4.c b/drivers/net/realtek-dsa/tag_rtl8_4.c
index a6762fc4e9..80e977a65d 100644
--- a/drivers/net/realtek-dsa/tag_rtl8_4.c
+++ b/drivers/net/realtek-dsa/tag_rtl8_4.c
@@ -74,6 +74,7 @@
*/
#include <linux/bitfield.h>
+#include <linux/printk.h>
#include <net.h>
#include "realtek.h"
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index ff1e815c6b..f3bd377f84 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -30,8 +30,8 @@
#include <mach/imx/ocotp.h>
#include <mach/imx/ocotp-fusemap.h>
#else
-#include <mach/ocotp.h>
-#include <mach/ocotp-fusemap.h>
+#include <mach/mxs/ocotp.h>
+#include <mach/mxs/ocotp-fusemap.h>
#endif
#include <soc/imx8m/featctrl.h>
#include <linux/nvmem-provider.h>
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 9eaa93b5bb..5644e8e953 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1757,7 +1757,7 @@ int barebox_register_of(struct device_node *root)
of_fix_tree(root);
if (IS_ENABLED(CONFIG_OFDEVICE)) {
- of_clk_init(root, NULL);
+ of_clk_init();
if (!deep_probe_is_supported())
return of_probe();
}
@@ -2529,13 +2529,13 @@ static int of_probe_memory(void)
}
mem_initcall(of_probe_memory);
-struct device *of_platform_device_create_root(struct device_node *np)
+static void of_platform_device_create_root(struct device_node *np)
{
static struct device *dev;
int ret;
if (dev)
- return dev;
+ return;
dev = xzalloc(sizeof(*dev));
dev->id = DEVICE_ID_SINGLE;
@@ -2543,12 +2543,8 @@ struct device *of_platform_device_create_root(struct device_node *np)
dev_set_name(dev, "machine");
ret = platform_device_register(dev);
- if (ret) {
+ if (ret)
free_device(dev);
- return ERR_PTR(ret);
- }
-
- return dev;
}
static const struct of_device_id reserved_mem_matches[] = {
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 683a7821ad..23b8fa7934 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -419,7 +419,7 @@ static struct device *of_device_create_on_demand(struct device_node *np)
parent = of_get_parent(np);
if (!parent)
- return of_platform_device_create_root(np);
+ return NULL;
if (!np->dev && parent->dev)
device_rescan(parent->dev);
diff --git a/drivers/pci/pci-imx6.c b/drivers/pci/pci-imx6.c
index 6212a00913..40bcf3d890 100644
--- a/drivers/pci/pci-imx6.c
+++ b/drivers/pci/pci-imx6.c
@@ -30,9 +30,9 @@
#include <mfd/imx6q-iomuxc-gpr.h>
#include <mfd/imx7-iomuxc-gpr.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx7-regs.h>
-#include <mach/imx8mq-regs.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/imx8mq-regs.h>
#include "pcie-designware.h"
diff --git a/drivers/pinctrl/imx-iomux-v2.c b/drivers/pinctrl/imx-iomux-v2.c
index 806c3f882c..cc5b8f11bc 100644
--- a/drivers/pinctrl/imx-iomux-v2.c
+++ b/drivers/pinctrl/imx-iomux-v2.c
@@ -7,7 +7,7 @@
#include <io.h>
#include <init.h>
#include <linux/err.h>
-#include <mach/iomux-mx31.h>
+#include <mach/imx/iomux-mx31.h>
/*
* IOMUX register (base) addresses
diff --git a/drivers/pinctrl/pinctrl-stm32.c b/drivers/pinctrl/pinctrl-stm32.c
index 15d845e0ad..1eed5473f6 100644
--- a/drivers/pinctrl/pinctrl-stm32.c
+++ b/drivers/pinctrl/pinctrl-stm32.c
@@ -348,11 +348,6 @@ static int stm32_pinctrl_probe(struct device *dev)
struct device_node *np = dev->of_node, *child;
int ret;
- if (!of_find_property(np, "pins-are-numbered", NULL)) {
- dev_err(dev, "only pins-are-numbered format supported\n");
- return -EINVAL;
- }
-
for_each_available_child_of_node(np, child)
if (of_property_read_bool(child, "gpio-controller"))
nbanks++;
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index e579fcaed6..923a170844 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -21,9 +21,9 @@
#include <of_gpio.h>
#include <io.h>
#include <spi/spi.h>
-#include <mach/iomux.h>
-#include <mach/board.h>
-#include <mach/cpu.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/board.h>
+#include <mach/at91/cpu.h>
#include <linux/clk.h>
#include <linux/err.h>
diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
index 77c0ba2c9c..e2ff01929b 100644
--- a/drivers/video/imx-ipu-fb.c
+++ b/drivers/video/imx-ipu-fb.c
@@ -8,14 +8,14 @@
#include <dma.h>
#include <init.h>
#include <io.h>
-#include <mach/imx35-regs.h>
+#include <mach/imx/imx35-regs.h>
#include <fb.h>
#include <platform_data/imxfb.h>
#include <malloc.h>
#include <errno.h>
#include <linux/math64.h>
#include <mmu.h>
-#include <mach/imx-ipu-fb.h>
+#include <mach/imx/imx-ipu-fb.h>
#include <linux/clk.h>
#include <linux/err.h>
diff --git a/drivers/video/ramfb.c b/drivers/video/ramfb.c
index 26e01196fc..3442e81b9e 100644
--- a/drivers/video/ramfb.c
+++ b/drivers/video/ramfb.c
@@ -131,7 +131,7 @@ static int ramfb_probe(struct device *parent_dev, int fd)
ret = fw_cfg_find_file(parent_dev, fd, "etc/ramfb");
if (ret < 0) {
- dev_err(parent_dev, "ramfb: fw_cfg (etc/ramfb) file not found\n");
+ dev_dbg(parent_dev, "ramfb: fw_cfg (etc/ramfb) file not found\n");
return -ENODEV;
}