]> git.sur5r.net Git - u-boot/blobdiff - drivers/i2c/i2c-uniphier-f.c
rockchip: gpio: Read the GPIO value correctly
[u-boot] / drivers / i2c / i2c-uniphier-f.c
index b0d30f76c61f11ad150d9f0abdd4f196615ffc78..b3349af9e184cc05477494be00e4dd1d566318ac 100644 (file)
@@ -1,18 +1,18 @@
 /*
- * Copyright (C) 2014 Panasonic Corporation
- *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <linux/types.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/errno.h>
 #include <dm/device.h>
 #include <dm/root.h>
 #include <i2c.h>
 #include <fdtdec.h>
+#include <mapmem.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -145,16 +145,6 @@ static int uniphier_fi2c_remove(struct udevice *dev)
        return 0;
 }
 
-static int uniphier_fi2c_child_pre_probe(struct udevice *dev)
-{
-       struct dm_i2c_chip *i2c_chip = dev_get_parentdata(dev);
-
-       if (dev->of_offset == -1)
-               return 0;
-       return i2c_chip_ofdata_to_platdata(gd->fdt_blob, dev->of_offset,
-                                          i2c_chip);
-}
-
 static int wait_for_irq(struct uniphier_fi2c_dev *dev, u32 flags,
                        bool *stop)
 {
@@ -362,8 +352,8 @@ static const struct dm_i2c_ops uniphier_fi2c_ops = {
 };
 
 static const struct udevice_id uniphier_fi2c_of_match[] = {
-       { .compatible = "panasonic,uniphier-fi2c" },
-       {},
+       { .compatible = "socionext,uniphier-fi2c" },
+       { /* sentinel */ }
 };
 
 U_BOOT_DRIVER(uniphier_fi2c) = {
@@ -372,8 +362,6 @@ U_BOOT_DRIVER(uniphier_fi2c) = {
        .of_match = uniphier_fi2c_of_match,
        .probe = uniphier_fi2c_probe,
        .remove = uniphier_fi2c_remove,
-       .per_child_auto_alloc_size = sizeof(struct dm_i2c_chip),
-       .child_pre_probe = uniphier_fi2c_child_pre_probe,
        .priv_auto_alloc_size = sizeof(struct uniphier_fi2c_dev),
        .ops = &uniphier_fi2c_ops,
 };