]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/vpac270/vpac270.c
616736f5c471d430ac6fce71deed6d8fd41c0606
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>
17 DECLARE_GLOBAL_DATA_PTR
;
20 * Miscelaneous platform dependent initialisations
24 /* We have RAM, disable cache */
28 /* memory and cpu-speed are setup before relocation */
29 /* so we do _nothing_ here */
31 /* Arch number of vpac270 */
32 gd
->bd
->bi_arch_number
= MACH_TYPE_VPAC270
;
34 /* adress of boot parameters */
35 gd
->bd
->bi_boot_params
= 0xa0000100;
42 #ifndef CONFIG_ONENAND
45 gd
->ram_size
= PHYS_SDRAM_1_SIZE
;
49 void dram_init_banksize(void)
51 gd
->bd
->bi_dram
[0].start
= PHYS_SDRAM_1
;
52 gd
->bd
->bi_dram
[0].size
= PHYS_SDRAM_1_SIZE
;
54 #ifdef CONFIG_RAM_256M
55 gd
->bd
->bi_dram
[1].start
= PHYS_SDRAM_2
;
56 gd
->bd
->bi_dram
[1].size
= PHYS_SDRAM_2_SIZE
;
61 int board_mmc_init(bd_t
*bis
)
69 int usb_board_init(void)
71 writel((UHCHR
| UHCHR_PCPL
| UHCHR_PSPL
) &
72 ~(UHCHR_SSEP0
| UHCHR_SSEP1
| UHCHR_SSEP2
| UHCHR_SSE
),
75 writel(readl(UHCHR
) | UHCHR_FSBIR
, UHCHR
);
77 while (readl(UHCHR
) & UHCHR_FSBIR
)
80 writel(readl(UHCHR
) & ~UHCHR_SSE
, UHCHR
);
81 writel((UHCHIE_UPRIE
| UHCHIE_RWIE
), UHCHIE
);
83 /* Clear any OTG Pin Hold */
84 if (readl(PSSR
) & PSSR_OTGPH
)
85 writel(readl(PSSR
) | PSSR_OTGPH
, PSSR
);
87 writel(readl(UHCRHDA
) & ~(0x200), UHCRHDA
);
88 writel(readl(UHCRHDA
) | 0x100, UHCRHDA
);
90 /* Set port power control mask bits, only 3 ports. */
91 writel(readl(UHCRHDB
) | (0x7<<17), UHCRHDB
);
94 writel(readl(UP2OCR
) | UP2OCR_HXOE
| UP2OCR_HXS
|
95 UP2OCR_DMPDE
| UP2OCR_DPPDE
, UP2OCR
);
100 void usb_board_init_fail(void)
105 void usb_board_stop(void)
107 writel(readl(UHCHR
) | UHCHR_FHR
, UHCHR
);
109 writel(readl(UHCHR
) & ~UHCHR_FHR
, UHCHR
);
111 writel(readl(UHCCOMS
) | 1, UHCCOMS
);
114 writel(readl(CKEN
) & ~CKEN10_USBHOST
, CKEN
);
120 #ifdef CONFIG_DRIVER_DM9000
121 int board_eth_init(bd_t
*bis
)
123 return dm9000_initialize(bis
);