Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eb8c69e authored by John Crispin's avatar John Crispin Committed by Ralf Baechle
Browse files

MIPS: lantiq: Force the crossbar to big endian



Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11450/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 26cfdbe3
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -40,6 +40,10 @@
#define RCU_GFS_ADD2_XRX330	0x00AC
#define RCU_GFS_ADD2_XRX330	0x00AC
#define RCU_GFS_ADD3_XRX330	0x0264
#define RCU_GFS_ADD3_XRX330	0x0264


/* xbar BE flag */
#define RCU_AHB_ENDIAN          0x004C
#define RCU_VR9_BE_AHB1S        0x00000008

/* reboot bit */
/* reboot bit */
#define RCU_RD_GPHY0_XRX200	BIT(31)
#define RCU_RD_GPHY0_XRX200	BIT(31)
#define RCU_RD_SRST		BIT(30)
#define RCU_RD_SRST		BIT(30)
@@ -369,6 +373,10 @@ static int __init mips_reboot_setup(void)
	    of_machine_is_compatible("lantiq,vr9"))
	    of_machine_is_compatible("lantiq,vr9"))
		ltq_usb_init();
		ltq_usb_init();


	if (of_machine_is_compatible("lantiq,vr9"))
		ltq_rcu_w32(ltq_rcu_r32(RCU_AHB_ENDIAN) | RCU_VR9_BE_AHB1S,
			    RCU_AHB_ENDIAN);

	_machine_restart = ltq_machine_restart;
	_machine_restart = ltq_machine_restart;
	_machine_halt = ltq_machine_halt;
	_machine_halt = ltq_machine_halt;
	pm_power_off = ltq_machine_power_off;
	pm_power_off = ltq_machine_power_off;