Currently DE2 driver uses functions which are defined in internal
headers. They are not meant to be used outside of uclass framework.
Switch DE2 driver to public ones. This has additional benefit that
device_probe doesn't need to be called manually.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/display2.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/display2.h>
-#include <dm/device-internal.h>
-#include <dm/uclass-internal.h>
#include <linux/bitops.h>
#include "simplefb_common.h"
#include <linux/bitops.h>
#include "simplefb_common.h"
disp_uc_plat->source_id = mux;
disp_uc_plat->source_id = mux;
- ret = device_probe(disp);
- if (ret) {
- debug("%s: device '%s' display won't probe (ret=%d)\n",
- __func__, dev->name, ret);
- return ret;
- }
-
ret = display_read_timing(disp, &timing);
if (ret) {
debug("%s: Failed to read timings\n", __func__);
ret = display_read_timing(disp, &timing);
if (ret) {
debug("%s: Failed to read timings\n", __func__);
if (!(gd->flags & GD_FLG_RELOC))
return 0;
if (!(gd->flags & GD_FLG_RELOC))
return 0;
- ret = uclass_find_device_by_name(UCLASS_DISPLAY,
- "sunxi_lcd", &disp);
+ ret = uclass_get_device_by_driver(UCLASS_DISPLAY,
+ DM_DRIVER_GET(sunxi_lcd), &disp);
debug("%s: lcd display not found (ret=%d)\n", __func__, ret);
debug("%s: lcd display not found (ret=%d)\n", __func__, ret);
- ret = uclass_find_device_by_name(UCLASS_DISPLAY,
- "sunxi_dw_hdmi", &disp);
+ ret = uclass_get_device_by_driver(UCLASS_DISPLAY,
+ DM_DRIVER_GET(sunxi_dw_hdmi), &disp);
if (!ret) {
int mux;
if (IS_ENABLED(CONFIG_MACH_SUNXI_H3_H5))
if (!ret) {
int mux;
if (IS_ENABLED(CONFIG_MACH_SUNXI_H3_H5))
mux = 1;
/* Skip simplefb setting if DE2 / HDMI is not present */
mux = 1;
/* Skip simplefb setting if DE2 / HDMI is not present */
- ret = uclass_find_device_by_name(UCLASS_VIDEO,
- "sunxi_de2", &de2);
+ ret = uclass_get_device_by_driver(UCLASS_VIDEO,
+ DM_DRIVER_GET(sunxi_de2), &de2);
if (ret) {
debug("DE2 not present\n");
return 0;
if (ret) {
debug("DE2 not present\n");
return 0;
- ret = uclass_find_device_by_name(UCLASS_DISPLAY,
- "sunxi_dw_hdmi", &hdmi);
+ ret = uclass_get_device_by_driver(UCLASS_DISPLAY,
+ DM_DRIVER_GET(sunxi_dw_hdmi), &hdmi);
if (ret) {
debug("HDMI not present\n");
} else if (device_active(hdmi)) {
if (ret) {
debug("HDMI not present\n");
} else if (device_active(hdmi)) {
debug("HDMI present but not probed\n");
}
debug("HDMI present but not probed\n");
}
- ret = uclass_find_device_by_name(UCLASS_DISPLAY,
- "sunxi_lcd", &lcd);
+ ret = uclass_get_device_by_driver(UCLASS_DISPLAY,
+ DM_DRIVER_GET(sunxi_lcd), &lcd);
if (ret)
debug("LCD not present\n");
else if (device_active(lcd))
if (ret)
debug("LCD not present\n");
else if (device_active(lcd))