]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-at91/armv7/sama5d4_devices.c
52f486289d9a217f457399f6c54f804c4e6b37a2
2 * Copyright (C) 2014 Atmel
3 * Bo Shen <voice.shen@atmel.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/at91_common.h>
11 #include <asm/arch/at91_pmc.h>
12 #include <asm/arch/clk.h>
13 #include <asm/arch/sama5_sfr.h>
14 #include <asm/arch/sama5d4.h>
18 unsigned int extension_id
= get_extension_chip_id();
21 switch (extension_id
) {
22 case ARCH_EXID_SAMA5D41
:
24 case ARCH_EXID_SAMA5D42
:
26 case ARCH_EXID_SAMA5D43
:
28 case ARCH_EXID_SAMA5D44
:
31 return "Unknown CPU type";
34 return "Unknown CPU type";
37 #ifdef CONFIG_USB_GADGET_ATMEL_USBA
38 void at91_udp_hw_init(void)
40 struct at91_pmc
*pmc
= (struct at91_pmc
*)ATMEL_BASE_PMC
;
42 /* Enable UPLL clock */
43 writel(AT91_PMC_UPLLEN
| AT91_PMC_BIASEN
, &pmc
->uckr
);
44 /* Enable UDPHS clock */
45 at91_periph_clk_enable(ATMEL_ID_UDPHS
);
49 #ifdef CONFIG_SPL_BUILD
50 void redirect_int_from_saic_to_aic(void)
52 struct atmel_sfr
*sfr
= (struct atmel_sfr
*)ATMEL_BASE_SFR
;
55 if (!(readl(&sfr
->aicredir
) & ATMEL_SFR_AICREDIR_NSAIC
)) {
56 key32
= readl(&sfr
->sn1
) ^ ATMEL_SFR_AICREDIR_KEY
;
57 writel((key32
| ATMEL_SFR_AICREDIR_NSAIC
), &sfr
->aicredir
);