aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini2016-12-03 19:43:51 -0500
committerTom Rini2016-12-03 19:43:51 -0500
commit73eed452b9c9827474c0789c30729dca6fcf061d (patch)
treeb33a39a41b7b2891b0171f79ea9b5599658884c3 /arch
parentbfb380b30ad2d678c09037560abb6f09a5e9c9b6 (diff)
parenta2558e8729831e0bcef634ea2440e60425ef0ff6 (diff)
Merge branch 'master' of git://www.denx.de/git/u-boot-dm
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/lib/bootm.c5
-rw-r--r--arch/arm/include/asm/arch-omap3/musb.h6
-rw-r--r--arch/arm/include/asm/omap_musb.h7
-rw-r--r--arch/arm/lib/bootm-fdt.c2
-rw-r--r--arch/arm/lib/bootm.c2
-rw-r--r--arch/arm/mach-omap2/am33xx/board.c16
-rw-r--r--arch/arm/mach-omap2/omap3/am35x_musb.c6
-rw-r--r--arch/microblaze/lib/bootm.c5
-rw-r--r--arch/mips/lib/bootm.c2
-rw-r--r--arch/powerpc/lib/bootm.c5
-rw-r--r--arch/sandbox/lib/bootm.c5
-rw-r--r--arch/x86/lib/bootm.c5
12 files changed, 48 insertions, 18 deletions
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 04d9d9cce57..57981490467 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -37,6 +37,11 @@ void arch_lmb_reserve(struct lmb *lmb)
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
}
+int arch_fixup_fdt(void *blob)
+{
+ return 0;
+}
+
static int cleanup_before_linux(void)
{
disable_interrupts();
diff --git a/arch/arm/include/asm/arch-omap3/musb.h b/arch/arm/include/asm/arch-omap3/musb.h
index cee4ed311e2..d06a758f1b0 100644
--- a/arch/arm/include/asm/arch-omap3/musb.h
+++ b/arch/arm/include/asm/arch-omap3/musb.h
@@ -7,7 +7,7 @@
#ifndef __ASM_ARCH_OMAP3_MUSB_H
#define __ASM_ARCH_OMAP3_MUSB_H
-extern void am35x_musb_reset(void);
-extern void am35x_musb_phy_power(u8 on);
-extern void am35x_musb_clear_irq(void);
+void am35x_musb_reset(struct udevice *dev);
+void am35x_musb_phy_power(struct udevice *dev, u8 on);
+void am35x_musb_clear_irq(struct udevice *dev);
#endif
diff --git a/arch/arm/include/asm/omap_musb.h b/arch/arm/include/asm/omap_musb.h
index 8b9cb0eb8f6..7c5fb407744 100644
--- a/arch/arm/include/asm/omap_musb.h
+++ b/arch/arm/include/asm/omap_musb.h
@@ -15,9 +15,10 @@ extern const struct musb_platform_ops omap2430_ops;
struct omap_musb_board_data {
u8 interface_type;
- void (*set_phy_power)(u8 on);
- void (*clear_irq)(void);
- void (*reset)(void);
+ struct udevice *dev;
+ void (*set_phy_power)(struct udevice *dev, u8 on);
+ void (*clear_irq)(struct udevice *dev);
+ void (*reset)(struct udevice *dev);
};
enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index a51755070bc..4481f9e2fa9 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -25,7 +25,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#ifdef CONFIG_ARCH_FIXUP_FDT
int arch_fixup_fdt(void *blob)
{
bd_t *bd = gd->bd;
@@ -61,4 +60,3 @@ int arch_fixup_fdt(void *blob)
return 0;
}
-#endif
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 35e6b06733b..4eee13a59c4 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -414,10 +414,8 @@ void boot_prep_vxworks(bootm_headers_t *images)
if (images->ft_addr) {
off = fdt_path_offset(images->ft_addr, "/memory");
if (off < 0) {
-#ifdef CONFIG_ARCH_FIXUP_FDT
if (arch_fixup_fdt(images->ft_addr))
puts("## WARNING: fixup memory failed!\n");
-#endif
}
}
#endif
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index 5ebeac0ee1e..581c0ab518b 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -120,7 +120,8 @@ int cpu_mmc_init(bd_t *bis)
/* AM33XX has two MUSB controllers which can be host or gadget */
#if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \
- (defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1))
+ (defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1)) && \
+ (!defined(CONFIG_DM_USB))
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
/* USB 2.0 PHY Control */
@@ -147,7 +148,7 @@ static struct musb_hdrc_config musb_config = {
};
#ifdef CONFIG_AM335X_USB0
-static void am33xx_otg0_set_phy_power(u8 on)
+static void am33xx_otg0_set_phy_power(struct udevice *dev, u8 on)
{
am33xx_usb_set_phy_power(on, &cdev->usb_ctrl0);
}
@@ -166,7 +167,7 @@ static struct musb_hdrc_platform_data otg0_plat = {
#endif
#ifdef CONFIG_AM335X_USB1
-static void am33xx_otg1_set_phy_power(u8 on)
+static void am33xx_otg1_set_phy_power(struct udevice *dev, u8 on)
{
am33xx_usb_set_phy_power(on, &cdev->usb_ctrl1);
}
@@ -187,6 +188,7 @@ static struct musb_hdrc_platform_data otg1_plat = {
int arch_misc_init(void)
{
+#ifndef CONFIG_DM_USB
#ifdef CONFIG_AM335X_USB0
musb_register(&otg0_plat, &otg0_board_data,
(void *)USB0_OTG_BASE);
@@ -195,6 +197,14 @@ int arch_misc_init(void)
musb_register(&otg1_plat, &otg1_board_data,
(void *)USB1_OTG_BASE);
#endif
+#else
+ struct udevice *dev;
+ int ret;
+
+ ret = uclass_first_device(UCLASS_MISC, &dev);
+ if (ret || !dev)
+ return ret;
+#endif
return 0;
}
diff --git a/arch/arm/mach-omap2/omap3/am35x_musb.c b/arch/arm/mach-omap2/omap3/am35x_musb.c
index 74dd105eb6f..d542699ab00 100644
--- a/arch/arm/mach-omap2/omap3/am35x_musb.c
+++ b/arch/arm/mach-omap2/omap3/am35x_musb.c
@@ -13,7 +13,7 @@
#include <asm/io.h>
#include <asm/arch/am35x_def.h>
-void am35x_musb_reset(void)
+void am35x_musb_reset(struct udevice *dev)
{
/* Reset the musb interface */
clrsetbits_le32(&am35x_scm_general_regs->ip_sw_reset,
@@ -22,7 +22,7 @@ void am35x_musb_reset(void)
USBOTGSS_SW_RST, 0);
}
-void am35x_musb_phy_power(u8 on)
+void am35x_musb_phy_power(struct udevice *dev, u8 on)
{
unsigned long start = get_timer(0);
@@ -53,7 +53,7 @@ void am35x_musb_phy_power(u8 on)
}
}
-void am35x_musb_clear_irq(void)
+void am35x_musb_clear_irq(struct udevice *dev)
{
clrsetbits_le32(&am35x_scm_general_regs->lvl_intr_clr,
0, USBOTGSS_INT_CLR);
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 3eb3440be84..2732203b93e 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -17,6 +17,11 @@
DECLARE_GLOBAL_DATA_PTR;
+int arch_fixup_fdt(void *blob)
+{
+ return 0;
+}
+
int do_bootm_linux(int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 9fec4ad4386..be877625a8e 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -253,7 +253,6 @@ static int boot_reloc_fdt(bootm_headers_t *images)
#endif
}
-#ifdef CONFIG_ARCH_FIXUP_FDT
int arch_fixup_fdt(void *blob)
{
#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT)
@@ -265,7 +264,6 @@ int arch_fixup_fdt(void *blob)
return 0;
#endif
}
-#endif
static int boot_setup_fdt(bootm_headers_t *images)
{
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index ef15e7ac92f..17c5ed173cb 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -38,6 +38,11 @@ static void set_clocks_in_mhz (bd_t *kbd);
#define CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE (768*1024*1024)
#endif
+int arch_fixup_fdt(void *blob)
+{
+ return 0;
+}
+
static void boot_jump_linux(bootm_headers_t *images)
{
void (*kernel)(bd_t *, ulong r4, ulong r5, ulong r6,
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index 0c9a7979d23..4cdd18fe14b 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -50,6 +50,11 @@ int bootz_setup(ulong image, ulong *start, ulong *end)
return ret;
}
+int arch_fixup_fdt(void *blob)
+{
+ return 0;
+}
+
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) {
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 80fadef34e9..e5e63f6888e 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -26,6 +26,11 @@ DECLARE_GLOBAL_DATA_PTR;
#define COMMAND_LINE_OFFSET 0x9000
+int arch_fixup_fdt(void *blob)
+{
+ return 0;
+}
+
__weak void board_quiesce_devices(void)
{
}