Skip to content

Commit

Permalink
Accept the Odroid specific tweaks for selecting clkout for external USB
Browse files Browse the repository at this point in the history
devices on the Odroid boards
  • Loading branch information
reinoud committed Sep 30, 2014
1 parent f86a325 commit 41b4386
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions sys/arch/evbarm/odroid/odroid_machdep.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: odroid_machdep.c,v 1.38 2014/09/26 19:27:05 reinoud Exp $ */
/* $NetBSD: odroid_machdep.c,v 1.39 2014/09/30 14:24:26 reinoud Exp $ */

/*
* Copyright (c) 2014 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -31,7 +31,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.38 2014/09/26 19:27:05 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.39 2014/09/30 14:24:26 reinoud Exp $");

#include "opt_evbarm_boardtype.h"
#include "opt_exynos.h"
Expand Down Expand Up @@ -318,7 +318,7 @@ initarm(void *arg)
EXYNOS_IOPHYSTOVIRT(armreg_cbar_read());

#ifdef ARM_TRUSTZONE_FIRMWARE
exynos_l2cc_init();
exynos4_l2cc_init();
#endif
arml2cc_init(&exynos_bs_tag, pl310_bh, 0x2000);
}
Expand Down Expand Up @@ -887,3 +887,26 @@ odroid_device_register_post_config(device_t self, void *aux)
}
}


/*
* Odroid specific tweaks
*/
/*
* The external USB devices are clocked trough the DEBUG clkout
* XXX is this Odroid specific? XXX
*/
void
exynos_init_clkout_for_usb(void)
{
#ifdef EXYNOS4
/* Select XUSBXTI as source for CLKOUT */
bus_space_write_4(&exynos_bs_tag, exynos_pmu_bsh,
EXYNOS_PMU_DEBUG_CLKOUT, 0x900);
#endif
#ifdef EXYNOS5
/* Select XUSBXTI as source for CLKOUT */
bus_space_write_4(&exynos_bs_tag, exynos_pmu_bsh,
EXYNOS_PMU_DEBUG_CLKOUT, 0x1000);
#endif
}

0 comments on commit 41b4386

Please sign in to comment.