summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-09-16 23:22:08 +0400
committerKim Phillips <kim.phillips@freescale.com>2009-09-25 18:25:51 -0500
commitda6eea0f48c24a318e6de69d6bca0bb5ab70572b (patch)
tree847d873528303c5b44338134acb6dcc315047a0a /board
parent89da44ce3fe1638312d71cb3add8c6a6d2c7c1f3 (diff)
downloadu-boot-imx-da6eea0f48c24a318e6de69d6bca0bb5ab70572b.zip
u-boot-imx-da6eea0f48c24a318e6de69d6bca0bb5ab70572b.tar.gz
u-boot-imx-da6eea0f48c24a318e6de69d6bca0bb5ab70572b.tar.bz2
mpc83xx: mpc8360emds: Add QE USB device tree fixups
With this patch we can change QE USB mode without need to hand-edit the device tree. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mpc8360emds/mpc8360emds.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/mpc8360emds/mpc8360emds.c b/board/freescale/mpc8360emds/mpc8360emds.c
index 54f2989..d4ba043 100644
--- a/board/freescale/mpc8360emds/mpc8360emds.c
+++ b/board/freescale/mpc8360emds/mpc8360emds.c
@@ -25,6 +25,8 @@
#if defined(CONFIG_OF_LIBFDT)
#include <libfdt.h>
#endif
+#include <hwconfig.h>
+#include <fdt_support.h>
#if defined(CONFIG_PQ_MDS_PIB)
#include "../common/pq-mds-pib.h"
#endif
@@ -357,12 +359,22 @@ static int sdram_init(unsigned int base) { return 0; }
#endif
#if defined(CONFIG_OF_BOARD_SETUP)
+static void ft_board_fixup_qe_usb(void *blob, bd_t *bd)
+{
+ if (!hwconfig_subarg_cmp("qe_usb", "mode", "peripheral"))
+ return;
+
+ do_fixup_by_compat(blob, "fsl,mpc8323-qe-usb", "mode",
+ "peripheral", sizeof("peripheral"), 1);
+}
+
void ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
+ ft_board_fixup_qe_usb(blob, bd);
/*
* mpc8360ea pb mds errata 2: RGMII timing
* if on mpc8360ea rev. 2.1,