2 * Toradex Colibri PXA270 Support
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/hardware.h>
11 #include <asm/arch/regs-mmc.h>
12 #include <asm/arch/pxa.h>
18 DECLARE_GLOBAL_DATA_PTR;
22 /* We have RAM, disable cache */
26 /* arch number of Toradex Colibri PXA270 */
27 gd->bd->bi_arch_number = MACH_TYPE_COLIBRI;
29 /* adress of boot parameters */
30 gd->bd->bi_boot_params = 0xa0000100;
38 gd->ram_size = PHYS_SDRAM_1_SIZE;
43 int board_usb_init(int index, enum usb_init_type init)
45 writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
46 ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
49 writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
51 while (UHCHR & UHCHR_FSBIR)
54 writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
55 writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
57 /* Clear any OTG Pin Hold */
58 if (readl(PSSR) & PSSR_OTGPH)
59 writel(readl(PSSR) | PSSR_OTGPH, PSSR);
61 writel(readl(UHCRHDA) & ~(0x200), UHCRHDA);
62 writel(readl(UHCRHDA) | 0x100, UHCRHDA);
64 /* Set port power control mask bits, only 3 ports. */
65 writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
68 writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
69 UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
74 int board_usb_cleanup(int index, enum usb_init_type init)
79 void usb_board_stop(void)
81 writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
83 writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
85 writel(readl(UHCCOMS) | 1, UHCCOMS);
88 writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
94 #ifdef CONFIG_DRIVER_DM9000
95 int board_eth_init(bd_t *bis)
97 return dm9000_initialize(bis);
101 #ifdef CONFIG_CMD_MMC
102 int board_mmc_init(bd_t *bis)