summaryrefslogtreecommitdiffstats
path: root/drivers/bus/omap-gpmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bus/omap-gpmc.c')
-rw-r--r--drivers/bus/omap-gpmc.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c
index 5f65d59911..f720933a0a 100644
--- a/drivers/bus/omap-gpmc.c
+++ b/drivers/bus/omap-gpmc.c
@@ -16,8 +16,8 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/mtd/rawnand.h>
-#include <mach/gpmc_nand.h>
-#include <mach/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
+#include <mach/omap/gpmc.h>
#define GPMC_CS_NUM 8
#define GPMC_NR_WAITPINS 4
@@ -141,7 +141,7 @@ struct gpmc_settings {
};
struct imx_gpmc {
- struct device_d *dev;
+ struct device *dev;
void __iomem *base;
struct imx_gpmc_devtype *devtype;
};
@@ -452,7 +452,7 @@ static struct dt_eccmode modes[] = {
},
};
-static int gpmc_probe_nand_child(struct device_d *dev,
+static int gpmc_probe_nand_child(struct device *dev,
struct device_node *child)
{
u32 val;
@@ -464,8 +464,7 @@ static int gpmc_probe_nand_child(struct device_d *dev,
int ret, i;
if (of_property_read_u32(child, "reg", &val) < 0) {
- dev_err(dev, "%s has no 'reg' property\n",
- child->full_name);
+ dev_err(dev, "%pOF has no 'reg' property\n", child);
return -ENODEV;
}
@@ -523,7 +522,7 @@ static int gpmc_probe_nand_child(struct device_d *dev,
dev = device_alloc("gpmc_nand", DEVICE_ID_DYNAMIC);
device_add_resource(dev, NULL, (resource_size_t)gpmc_base, SZ_4K, IORESOURCE_MEM);
device_add_data(dev, &gpmc_nand_data, sizeof(gpmc_nand_data));
- dev->device_node = child;
+ dev->of_node = child;
platform_device_register(dev);
return 0;
@@ -537,8 +536,8 @@ static int gpmc_probe_nand_child(struct device_d *dev,
* Allocates and configures a GPMC chip-select for a child device.
* Returns 0 on success and appropriate negative error code on failure.
*/
-static int gpmc_probe_generic_child(struct device_d *dev,
- struct device_node *child)
+static int gpmc_probe_generic_child(struct device *dev,
+ struct device_node *child)
{
struct gpmc_settings gpmc_s = {};
struct gpmc_timings gpmc_t = {};
@@ -548,14 +547,12 @@ static int gpmc_probe_generic_child(struct device_d *dev,
resource_size_t size;
if (of_property_read_u32(child, "reg", &cs) < 0) {
- dev_err(dev, "%s has no 'reg' property\n",
- child->full_name);
+ dev_err(dev, "%pOF has no 'reg' property\n", child);
return -ENODEV;
}
if (of_address_to_resource(child, 0, &res) < 0) {
- dev_err(dev, "%s has malformed 'reg' property\n",
- child->full_name);
+ dev_err(dev, "%pOF has malformed 'reg' property\n", child);
return -ENODEV;
}
@@ -600,9 +597,9 @@ err:
return ret;
}
-static int gpmc_probe(struct device_d *dev)
+static int gpmc_probe(struct device *dev)
{
- struct device_node *child, *node = dev->device_node;
+ struct device_node *child, *node = dev->of_node;
int ret;
gpmc_generic_init(0x12);
@@ -652,8 +649,9 @@ static struct of_device_id gpmc_id_table[] = {
{ .compatible = "ti,am3352-gpmc" }, /* am335x devices */
{ }
};
+MODULE_DEVICE_TABLE(of, gpmc_id_table);
-static struct driver_d gpmc_driver = {
+static struct driver gpmc_driver = {
.name = "omap-gpmc",
.of_compatible = DRV_OF_COMPAT(gpmc_id_table),
.probe = gpmc_probe,