2 * Voipac PXA270 Support
4 * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
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;
21 * Miscelaneous platform dependent initialisations
25 /* We have RAM, disable cache */
29 /* memory and cpu-speed are setup before relocation */
30 /* so we do _nothing_ here */
32 /* Arch number of vpac270 */
33 gd->bd->bi_arch_number = MACH_TYPE_VPAC270;
35 /* adress of boot parameters */
36 gd->bd->bi_boot_params = 0xa0000100;
43 #ifndef CONFIG_ONENAND
46 gd->ram_size = PHYS_SDRAM_1_SIZE;
50 void dram_init_banksize(void)
52 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
53 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
55 #ifdef CONFIG_RAM_256M
56 gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
57 gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
62 int board_mmc_init(bd_t *bis)
70 int board_usb_init(int index, enum usb_init_type init)
72 writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
73 ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
76 writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
78 while (readl(UHCHR) & UHCHR_FSBIR)
81 writel(readl(UHCHR) & ~UHCHR_SSE, UHCHR);
82 writel((UHCHIE_UPRIE | UHCHIE_RWIE), UHCHIE);
84 /* Clear any OTG Pin Hold */
85 if (readl(PSSR) & PSSR_OTGPH)
86 writel(readl(PSSR) | PSSR_OTGPH, PSSR);
88 writel(readl(UHCRHDA) & ~(0x200), UHCRHDA);
89 writel(readl(UHCRHDA) | 0x100, UHCRHDA);
91 /* Set port power control mask bits, only 3 ports. */
92 writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
95 writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
96 UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
101 int board_usb_cleanup(int index, enum usb_init_type init)
106 void usb_board_stop(void)
108 writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
110 writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
112 writel(readl(UHCCOMS) | 1, UHCCOMS);
115 writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
121 #ifdef CONFIG_DRIVER_DM9000
122 int board_eth_init(bd_t *bis)
124 return dm9000_initialize(bis);