Skip to content

Commit 18a00df

Browse files
committed
PXA: Voipac PXA270 Support
This patch adds support for the Voipac PXA270 board. The support includes: - Ethernet - USB - MMC - NOR Booting - OneNAND Booting - LCD - HDD Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Scott Wood <scottwood@freescale.com>
1 parent 546cd60 commit 18a00df

File tree

13 files changed

+816
-0
lines changed

13 files changed

+816
-0
lines changed

MAKEALL

+2
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,8 @@ LIST_pxa=" \
713713
polaris \
714714
pxa255_idp \
715715
trizepsiv \
716+
vpac270_nor \
717+
vpac270_onenand \
716718
wepep250 \
717719
xaeniax \
718720
xm250 \

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -2171,6 +2171,15 @@ trizepsiv_config : unconfig
21712171
fi;
21722172
@$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv
21732173

2174+
vpac270_nor_config \
2175+
vpac270_onenand_config : unconfig
2176+
@mkdir -p $(obj)include
2177+
@if [ "$(findstring onenand,$@)" ] ; then \
2178+
echo "#define CONFIG_ONENAND_U_BOOT" \
2179+
>>$(obj)include/config.h ; \
2180+
fi;
2181+
@$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270
2182+
21742183
#########################################################################
21752184
## ARM1136 Systems
21762185
#########################################################################

board/vpac270/Makefile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
#
3+
# (C) Copyright 2000
4+
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5+
#
6+
# See file CREDITS for list of people who contributed to this
7+
# project.
8+
#
9+
# This program is free software; you can redistribute it and/or
10+
# modify it under the terms of the GNU General Public License as
11+
# published by the Free Software Foundation; either version 2 of
12+
# the License, or (at your option) any later version.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22+
# MA 02111-1307 USA
23+
#
24+
25+
include $(TOPDIR)/config.mk
26+
27+
LIB = lib$(BOARD).a
28+
29+
OBJS := vpac270.o
30+
SOBJS := lowlevel_init.o
31+
32+
$(LIB): $(OBJS) $(SOBJS)
33+
$(AR) crv $@ $(OBJS) $(SOBJS)
34+
35+
clean:
36+
rm -f $(SOBJS) $(OBJS)
37+
38+
distclean: clean
39+
rm -f $(LIB) core *.bak .depend
40+
41+
#########################################################################
42+
43+
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
44+
$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
45+
46+
-include .depend
47+
48+
#########################################################################

board/vpac270/config.mk

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TEXT_BASE = 0xa1000000

board/vpac270/lowlevel_init.S

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Voipac PXA270 Lowlevel Hardware Initialization
3+
*
4+
* Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
5+
*
6+
*
7+
* See file CREDITS for list of people who contributed to this
8+
* project.
9+
*
10+
* This program is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU General Public License as
12+
* published by the Free Software Foundation; either version 2 of
13+
* the License, or (at your option) any later version.
14+
*
15+
* This program is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
* GNU General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU General Public License
21+
* along with this program; if not, write to the Free Software
22+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23+
* MA 02111-1307 USA
24+
*/
25+
26+
#include <config.h>
27+
#include <version.h>
28+
#include <asm/arch/pxa-regs.h>
29+
#include <asm/arch/macro.h>
30+
31+
.globl lowlevel_init
32+
lowlevel_init:
33+
pxa_gpio_setup
34+
pxa_wait_ticks 0x8000
35+
pxa_mem_setup
36+
pxa_wakeup
37+
pxa_intr_setup
38+
pxa_clock_setup
39+
40+
mov pc, lr

board/vpac270/u-boot.lds

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* (C) Copyright 2000
3+
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4+
*
5+
* See file CREDITS for list of people who contributed to this
6+
* project.
7+
*
8+
* This program is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU General Public License as
10+
* published by the Free Software Foundation; either version 2 of
11+
* the License, or (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program; if not, write to the Free Software
20+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21+
* MA 02111-1307 USA
22+
*/
23+
24+
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
25+
OUTPUT_ARCH(arm)
26+
ENTRY(_start)
27+
SECTIONS
28+
{
29+
. = 0x00000000;
30+
31+
. = ALIGN(4);
32+
.text :
33+
{
34+
cpu/pxa/start.o (.text)
35+
*(.text)
36+
}
37+
38+
. = ALIGN(4);
39+
.rodata : { *(.rodata) }
40+
41+
. = ALIGN(4);
42+
.data : { *(.data) }
43+
44+
. = ALIGN(4);
45+
.got : { *(.got) }
46+
47+
__u_boot_cmd_start = .;
48+
.u_boot_cmd : { *(.u_boot_cmd) }
49+
__u_boot_cmd_end = .;
50+
51+
. = ALIGN(4);
52+
__bss_start = .;
53+
.bss : { *(.bss) }
54+
_end = .;
55+
}

board/vpac270/vpac270.c

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
/*
2+
* (C) Copyright 2004
3+
* Robert Whaley, Applied Data Systems, Inc. rwhaley@applieddata.net
4+
*
5+
* (C) Copyright 2002
6+
* Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
7+
*
8+
* (C) Copyright 2002
9+
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
10+
* Marius Groeger <mgroeger@sysgo.de>
11+
*
12+
* See file CREDITS for list of people who contributed to this
13+
* project.
14+
*
15+
* This program is free software; you can redistribute it and/or
16+
* modify it under the terms of the GNU General Public License as
17+
* published by the Free Software Foundation; either version 2 of
18+
* the License, or (at your option) any later version.
19+
*
20+
* This program is distributed in the hope that it will be useful,
21+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+
* GNU General Public License for more details.
24+
*
25+
* You should have received a copy of the GNU General Public License
26+
* along with this program; if not, write to the Free Software
27+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28+
* MA 02111-1307 USA
29+
*/
30+
31+
#include <common.h>
32+
#include <asm/arch/hardware.h>
33+
34+
DECLARE_GLOBAL_DATA_PTR;
35+
36+
/* ------------------------------------------------------------------------- */
37+
38+
/*
39+
* Miscelaneous platform dependent initialisations
40+
*/
41+
extern struct serial_device serial_ffuart_device;
42+
extern struct serial_device serial_btuart_device;
43+
extern struct serial_device serial_stuart_device;
44+
45+
struct serial_device *default_serial_console (void)
46+
{
47+
return &serial_ffuart_device;
48+
}
49+
50+
int board_init (void)
51+
{
52+
/* memory and cpu-speed are setup before relocation */
53+
/* so we do _nothing_ here */
54+
55+
/* arch number of vpac270 */
56+
gd->bd->bi_arch_number = MACH_TYPE_VPAC270;
57+
58+
/* adress of boot parameters */
59+
gd->bd->bi_boot_params = 0xa0000100;
60+
61+
return 0;
62+
}
63+
64+
int dram_init (void)
65+
{
66+
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
67+
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
68+
69+
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
70+
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
71+
72+
return 0;
73+
}
74+
75+
int usb_board_init(void)
76+
{
77+
UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
78+
~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
79+
80+
UHCHR |= UHCHR_FSBIR;
81+
82+
while (UHCHR & UHCHR_FSBIR);
83+
84+
UHCHR &= ~UHCHR_SSE;
85+
UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
86+
87+
/* Clear any OTG Pin Hold */
88+
if (PSSR & PSSR_OTGPH)
89+
PSSR |= PSSR_OTGPH;
90+
91+
UHCRHDA &= ~(0x200);
92+
UHCRHDA |= 0x100;
93+
94+
/* Set port power control mask bits, only 3 ports. */
95+
UHCRHDB |= (0x7<<17);
96+
97+
/* enable port 2 */
98+
UP2OCR |= UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
99+
100+
return 0;
101+
}
102+
103+
void usb_board_init_fail(void)
104+
{
105+
return;
106+
}
107+
108+
void usb_board_stop(void)
109+
{
110+
UHCHR |= UHCHR_FHR;
111+
udelay(11);
112+
UHCHR &= ~UHCHR_FHR;
113+
114+
UHCCOMS |= 1;
115+
udelay(10);
116+
117+
CKEN &= ~CKEN10_USBHOST;
118+
119+
return;
120+
}
121+
122+
#ifdef CONFIG_DRIVER_DM9000
123+
int board_eth_init(bd_t *bis)
124+
{
125+
return dm9000_initialize(bis);
126+
}
127+
#endif

0 commit comments

Comments
 (0)