Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
sunxi: usb_phy: invert the USB phy_ctl condition
Browse files Browse the repository at this point in the history
All the new SoCs from Allwinner since the A33 have had the phy_ctl offset
at 0x410 instead of 0x404 that was used on the previous SoCs.

Instead of adding more and more special cases as the number of SoCs grow,
let's invert the test to have 0x410 by default, and the (hopefully) fixed
number of old SoCs being the exception.

Suggested-by: Siarhei Siamashka <[email protected]>
Suggested-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
  • Loading branch information
mripard committed Oct 3, 2017
1 parent ea5b1e1 commit 9f35688
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions arch/arm/mach-sunxi/usb_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@
#include <asm/io.h>
#include <errno.h>

#define SUNXI_USB_PMU_IRQ_ENABLE 0x800
#ifdef CONFIG_MACH_SUN8I_A33
#define SUNXI_USB_CSR 0x410
#else
#if defined(CONFIG_MACH_SUN4I) || \
defined(CONFIG_MACH_SUN5I) || \
defined(CONFIG_MACH_SUN6I) || \
defined(CONFIG_MACH_SUN7I) || \
defined(CONFIG_MACH_SUN8I_A23) || \
defined(CONFIG_MACH_SUN9I)
#define SUNXI_USB_CSR 0x404
#else
#define SUNXI_USB_CSR 0x410
#endif

#define SUNXI_USB_PMU_IRQ_ENABLE 0x800
#define SUNXI_USB_PASSBY_EN 1

#define SUNXI_EHCI_AHB_ICHR8_EN (1 << 10)
Expand Down

0 comments on commit 9f35688

Please sign in to comment.