Skip to content
Snippets Groups Projects
Commit da6eea0f authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Kim Phillips
Browse files

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: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
parent 89da44ce
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#if defined(CONFIG_OF_LIBFDT) #if defined(CONFIG_OF_LIBFDT)
#include <libfdt.h> #include <libfdt.h>
#endif #endif
#include <hwconfig.h>
#include <fdt_support.h>
#if defined(CONFIG_PQ_MDS_PIB) #if defined(CONFIG_PQ_MDS_PIB)
#include "../common/pq-mds-pib.h" #include "../common/pq-mds-pib.h"
#endif #endif
...@@ -357,12 +359,22 @@ static int sdram_init(unsigned int base) { return 0; } ...@@ -357,12 +359,22 @@ static int sdram_init(unsigned int base) { return 0; }
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) #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) void ft_board_setup(void *blob, bd_t *bd)
{ {
ft_cpu_setup(blob, bd); ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
ft_board_fixup_qe_usb(blob, bd);
/* /*
* mpc8360ea pb mds errata 2: RGMII timing * mpc8360ea pb mds errata 2: RGMII timing
* if on mpc8360ea rev. 2.1, * if on mpc8360ea rev. 2.1,
......
...@@ -382,6 +382,8 @@ ...@@ -382,6 +382,8 @@
#define CONFIG_NET_MULTI 1 #define CONFIG_NET_MULTI 1
#endif #endif
#define CONFIG_HWCONFIG 1
/* /*
* QE UEC ethernet configuration * QE UEC ethernet configuration
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment