Commit f2302d44 authored by Stefan Roese's avatar Stefan Roese

Fix merge problems

Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 9246f5ec
......@@ -26,6 +26,8 @@
/u-boot.ldr
/u-boot.ldr.hex
/u-boot.ldr.srec
/u-boot-onenand.bin
/u-boot-flexonenand.bin
#
# Generated files
......@@ -46,3 +48,8 @@ series
# cscope files
cscope.*
# OneNAND IPL files
/onenand_ipl/onenand-ipl*
/onenand_ipl/board/*/onenand*
/onenand_ipl/board/*/*.S
This diff is collapsed.
......@@ -543,7 +543,6 @@ LIST_at91=" \
#########################################################################
LIST_pxa=" \
adsvix \
cerf250 \
cradle \
csb226 \
......
......@@ -24,7 +24,7 @@
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 4
EXTRAVERSION = -rc1
EXTRAVERSION = -rc2
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
VERSION_FILE = $(obj)include/version_autogenerated.h
......@@ -346,10 +346,9 @@ $(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
$(ONENAND_IPL): $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C $(obj)onenand_ipl/board/$(BOARDDIR) all
$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
$(MAKE) -C $(obj)onenand_ipl/board/$(BOARDDIR) all
cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
......@@ -2609,9 +2608,6 @@ actux3_config : unconfig
actux4_config : unconfig
@$(MKCONFIG) $(@:_config=) arm ixp actux4
adsvix_config : unconfig
@$(MKCONFIG) $(@:_config=) arm pxa adsvix
cerf250_config : unconfig
@$(MKCONFIG) $(@:_config=) arm pxa cerf250
......@@ -2678,6 +2674,7 @@ zylonite_config :
apollon_config : unconfig
@mkdir -p $(obj)include
@mkdir -p $(obj)onenand_ipl/board/apollon
@echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h
@$(MKCONFIG) $(@:_config=) arm arm1136 apollon NULL omap24xx
@echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk
......
/*
* (C) Copyright 2007 Semihalf
* (C) Copyright 2007-2008 Semihalf
*
* Written by: Rafal Jaworowski <raj@semihalf.com>
*
......@@ -46,14 +46,15 @@
#define ENUM_USB 1
#define ENUM_SCSI 2
#define ENUM_MMC 3
#define ENUM_MAX 4
#define ENUM_SATA 4
#define ENUM_MAX 5
struct stor_spec {
int max_dev;
int enum_started;
int enum_ended;
int type; /* "external" type: DT_STOR_{IDE,USB,etc} */
char name[4];
char *name;
};
static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, "" }, };
......@@ -68,12 +69,19 @@ void dev_stor_init(void)
specs[ENUM_IDE].type = DEV_TYP_STOR | DT_STOR_IDE;
specs[ENUM_IDE].name = "ide";
#endif
#if defined(CONFIG_CMD_USB)
specs[ENUM_USB].max_dev = USB_MAX_STOR_DEV;
specs[ENUM_USB].enum_started = 0;
specs[ENUM_USB].enum_ended = 0;
specs[ENUM_USB].type = DEV_TYP_STOR | DT_STOR_USB;
specs[ENUM_USB].name = "usb";
#if defined(CONFIG_CMD_MMC)
specs[ENUM_MMC].max_dev = CFG_MMC_MAX_DEVICE;
specs[ENUM_MMC].enum_started = 0;
specs[ENUM_MMC].enum_ended = 0;
specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC;
specs[ENUM_MMC].name = "mmc";
#endif
#if defined(CONFIG_CMD_SATA)
specs[ENUM_SATA].max_dev = CFG_SATA_MAX_DEVICE;
specs[ENUM_SATA].enum_started = 0;
specs[ENUM_SATA].enum_ended = 0;
specs[ENUM_SATA].type = DEV_TYP_STOR | DT_STOR_SATA;
specs[ENUM_SATA].name = "sata";
#endif
#if defined(CONFIG_CMD_SCSI)
specs[ENUM_SCSI].max_dev = CFG_SCSI_MAX_DEVICE;
......@@ -82,6 +90,13 @@ void dev_stor_init(void)
specs[ENUM_SCSI].type = DEV_TYP_STOR | DT_STOR_SCSI;
specs[ENUM_SCSI].name = "scsi";
#endif
#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
specs[ENUM_USB].max_dev = USB_MAX_STOR_DEV;
specs[ENUM_USB].enum_started = 0;
specs[ENUM_USB].enum_ended = 0;
specs[ENUM_USB].type = DEV_TYP_STOR | DT_STOR_USB;
specs[ENUM_USB].name = "usb";
#endif
}
/*
......@@ -108,7 +123,10 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
if (first) {
di->cookie = (void *)get_dev(specs[type].name, 0);
found = 1;
if (di->cookie == NULL)
return 0;
else
found = 1;
} else {
for (i = 0; i < specs[type].max_dev; i++)
......@@ -123,7 +141,10 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
}
di->cookie = (void *)get_dev(specs[type].name, i);
found = 1;
if (di->cookie == NULL)
return 0;
else
found = 1;
/* provide hint if there are more devices in
* this group to enumerate */
......@@ -360,7 +381,7 @@ lbasize_t dev_read_stor(void *cookie, void *buf, lbasize_t len, lbastart_t start
return 0;
if ((dd->block_read) == NULL) {
debugf("no block_read() for device 0x%08x\n");
debugf("no block_read() for device 0x%08x\n", cookie);
return 0;
}
......
/*
* (C) Copyright 2007 Semihalf
* (C) Copyright 2007-2008 Semihalf
*
* Written by: Rafal Jaworowski <raj@semihalf.com>
*
......@@ -31,13 +31,15 @@
#define errf(fmt, args...) do { printf("ERROR @ %s(): ", __func__); printf(fmt, ##args); } while (0)
void test_dump_si(struct sys_info *);
#define BUF_SZ 2048
#define WAIT_SECS 5
void test_dump_buf(void *, int);
void test_dump_di(int);
void test_dump_si(struct sys_info *);
void test_dump_sig(struct api_signature *);
char buf[2048];
#define WAIT_SECS 5
static char buf[BUF_SZ];
int main(int argc, char *argv[])
{
......@@ -58,11 +60,12 @@ int main(int argc, char *argv[])
if (sig->version > API_SIG_VERSION)
return -3;
printf("API signature found @%x\n", sig);
printf("API signature found @%x\n", (unsigned int)sig);
test_dump_sig(sig);
printf("\n*** Consumer API test ***\n");
printf("syscall ptr 0x%08x@%08x\n", syscall_ptr, &syscall_ptr);
printf("syscall ptr 0x%08x@%08x\n", (unsigned int)syscall_ptr,
(unsigned int)&syscall_ptr);
/* console activities */
ub_putc('B');
......@@ -125,11 +128,17 @@ int main(int argc, char *argv[])
if (i == devs_no)
printf("No storage devices available\n");
else {
memset(buf, 0, BUF_SZ);
if ((rv = ub_dev_open(i)) != 0)
errf("open device %d error %d\n", i, rv);
else if ((rv = ub_dev_read(i, &buf, 200, 20)) != 0)
else if ((rv = ub_dev_read(i, buf, 1, 0)) != 0)
errf("could not read from device %d, error %d\n", i, rv);
printf("Sector 0 dump (512B):\n");
test_dump_buf(buf, 512);
ub_dev_close(i);
}
......@@ -180,7 +189,7 @@ void test_dump_sig(struct api_signature *sig)
printf("signature:\n");
printf(" version\t= %d\n", sig->version);
printf(" checksum\t= 0x%08x\n", sig->checksum);
printf(" sc entry\t= 0x%08x\n", sig->syscall);
printf(" sc entry\t= 0x%08x\n", (unsigned int)sig->syscall);
}
void test_dump_si(struct sys_info *si)
......@@ -188,9 +197,9 @@ void test_dump_si(struct sys_info *si)
int i;
printf("sys info:\n");
printf(" clkbus\t= 0x%08x\n", si->clk_bus);
printf(" clkcpu\t= 0x%08x\n", si->clk_cpu);
printf(" bar\t\t= 0x%08x\n", si->bar);
printf(" clkbus\t= 0x%08x\n", (unsigned int)si->clk_bus);
printf(" clkcpu\t= 0x%08x\n", (unsigned int)si->clk_cpu);
printf(" bar\t\t= 0x%08x\n", (unsigned int)si->bar);
printf("---\n");
for (i = 0; i < si->mr_no; i++) {
......@@ -217,23 +226,56 @@ void test_dump_si(struct sys_info *si)
}
}
static char * test_stor_typ(int type)
static char *test_stor_typ(int type)
{
if (type & DT_STOR_IDE)
return "IDE";
if (type & DT_STOR_MMC)
return "MMC";
if (type & DT_STOR_SATA)
return "SATA";
if (type & DT_STOR_SCSI)
return "SCSI";
if (type & DT_STOR_USB)
return "USB";
if (type & DT_STOR_MMC);
return "MMC";
return "Unknown";
}
void test_dump_buf(void *buf, int len)
{
int i;
int line_counter = 0;
int sep_flag = 0;
int addr = 0;
printf("%07x:\t", addr);
for (i = 0; i < len; i++) {
if (line_counter++ > 15) {
line_counter = 0;
sep_flag = 0;
addr += 16;
i--;
printf("\n%07x:\t", addr);
continue;
}
if (sep_flag++ > 1) {
sep_flag = 1;
printf(" ");
}
printf("%02x", *((char *)buf++));
}
printf("\n");
}
void test_dump_di(int handle)
{
int i;
......@@ -252,7 +294,7 @@ void test_dump_di(int handle)
} else if (di->type & DEV_TYP_STOR) {
printf(" type\t\t= %s\n", test_stor_typ(di->type));
printf(" blk size\t\t= %d\n", di->di_stor.block_size);
printf(" blk count\t\t= %d\n", di->di_stor.block_count);
printf(" blk size\t\t= %d\n", (unsigned int)di->di_stor.block_size);
printf(" blk count\t\t= %d\n", (unsigned int)di->di_stor.block_count);
}
}
#
# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
COBJS := adsvix.o pcmcia.o
SOBJS := lowlevel_init.o pxavoltage.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
rm -f $(LIB) core *.bak $(obj).depend
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################
/*
* (C) Copyright 2004
* Robert Whaley, Applied Data Systems, Inc. rwhaley@applieddata.net
*
* (C) Copyright 2002
* Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
*
* (C) Copyright 2002
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* Marius Groeger <mgroeger@sysgo.de>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <common.h>
DECLARE_GLOBAL_DATA_PTR;
/* ------------------------------------------------------------------------- */
/*
* Miscelaneous platform dependent initialisations
*/
int board_init (void)
{
/* memory and cpu-speed are setup before relocation */
/* so we do _nothing_ here */
/* arch number of ADSVIX-Board */
gd->bd->bi_arch_number = 620;
/* adress of boot parameters */
gd->bd->bi_boot_params = 0xa000003c;
return 0;
}
int board_late_init(void)
{
setenv("stdout", "serial");
setenv("stderr", "serial");
return 0;
}
int dram_init (void)
{
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
return 0;
}
TEXT_BASE = 0xa1700000
This diff is collapsed.
/*
* (C) Copyright 2004
* Robert Whaley, Applied Data Systems, Inc. rwhaley@applieddata.net
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <common.h>
#include <asm/arch/pxa-regs.h>
void pcmcia_power_on(void)
{
#if 0
if (!(GPLR(20) & GPIO_bit(20))) { /* 3.3V */
GPCR(81) = GPIO_bit(81);
GPSR(82) = GPIO_bit(82);
}
else if (!(GPLR(21) & GPIO_bit(21))) { /* 5.0V */
GPCR(81) = GPIO_bit(81);
GPCR(82) = GPIO_bit(82);
}
#else
#warning "Board will only supply 5V, wait for next HW spin for selectable power"
/* 5.0V */
GPCR(81) = GPIO_bit(81);
GPCR(82) = GPIO_bit(82);
#endif
udelay(300000);
/* reset the card */
GPSR(52) = GPIO_bit(52);
/* enable PCMCIA */
GPCR(83) = GPIO_bit(83);
/* clear reset */
udelay(10);
GPCR(52) = GPIO_bit(52);
udelay(20000);
}
void pcmcia_power_off(void)
{
/* 0V */
GPSR(81) = GPIO_bit(81);
GPSR(82) = GPIO_bit(82);
/* disable PCMCIA */
GPSR(83) = GPIO_bit(83);
}
/*
* (C) Copyright 2004
* Robert Whaley, Applied Data Systems, Inc. rwhaley@applieddata.net
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <asm/arch/pxa-regs.h>
#define LTC1663_ADDR 0x20
#define LTC1663_SY 0x01 /* Sync ACK */
#define LTC1663_SD 0x04 /* shutdown */
#define LTC1663_BG 0x04 /* Internal Voltage Ref */
#define VOLT_1_55 18 /* DAC value for 1.55V */
.global initPXAvoltage
@ Set the voltage to 1.55V early in the boot process so we can run
@ at a high clock speed and boot quickly. Note that this is necessary
@ because the reset button does not reset the CPU voltage, so if the
@ voltage was low (say 0.85V) then the CPU would crash without this
@ routine
@ This routine clobbers r0-r4
initializei2c:
ldr r2, =CKEN
ldr r3, [r2]
orr r3, r3, #CKEN15_PWRI2C
str r3, [r2]
ldr r2, =PCFR
ldr r3, [r2]
orr r3, r3, #PCFR_PI2C_EN
str r3, [r2]
/* delay for about 250msec
*/
ldr r3, =OSCR
mov r2, #0
str r2, [r3]
ldr r1, =0xC0000
1:
ldr r2, [r3]
cmp r1, r2
bgt 1b
ldr r0, =PWRICR
ldr r1, [r0]
bic r1, r1, #(ICR_MA | ICR_START | ICR_STOP)
str r1, [r0]
orr r1, r1, #ICR_UR
str r1, [r0]
ldr r2, =PWRISR
ldr r3, =0x7ff
str r3, [r2]
bic r1, r1, #ICR_UR
str r1, [r0]
mov r1, #(ICR_GCD | ICR_SCLE)
str r1, [r0]
orr r1, r1, #ICR_IUE
str r1, [r0]
orr r1, r1, #ICR_FM
str r1, [r0]
/* delay for about 1msec
*/
ldr r3, =OSCR
mov r2, #0
str r2, [r3]
ldr r1, =0xC00
1:
ldr r2, [r3]
cmp r1, r2
bgt 1b
mov pc, lr
sendbytei2c:
ldr r3, =PWRIDBR
str r0, [r3]
ldr r3, =PWRICR
ldr r0, [r3]
orr r0, r0, r1
bic r0, r0, r2
str r0, [r3]
orr r0, r0, #ICR_TB
str r0, [r3]
mov r2, #0x100000
waitfortxemptyi2c:
ldr r0, =PWRISR
ldr r1, [r0]
/* take it from the top if we don't get empty after a while */
subs r2, r2, #1
moveq lr, r4
beq initPXAvoltage
tst r1, #ISR_ITE
beq waitfortxemptyi2c
orr r1, r1, #ISR_ITE
str r1, [r0]
mov pc, lr
initPXAvoltage:
mov r4, lr
bl setleds
bl initializei2c
bl setleds
/* now send the real message to set the correct voltage */
ldr r0, =LTC1663_ADDR
mov r0, r0, LSL #1
mov r1, #ICR_START
ldr r2, =(ICR_STOP | ICR_ALDIE | ICR_ACKNAK)
bl sendbytei2c
bl setleds
mov r0, #LTC1663_BG
mov r1, #0
mov r2, #(ICR_STOP | ICR_START)
bl sendbytei2c
bl setleds
ldr r0, =VOLT_1_55
and r0, r0, #0xff
mov r1, #0
mov r2, #(ICR_STOP | ICR_START)
bl sendbytei2c
bl setleds
ldr r0, =VOLT_1_55
mov r0, r0, ASR #8
and r0, r0, #0xff
mov r1, #ICR_STOP
mov r2, #ICR_START
bl sendbytei2c
bl setleds
@ delay a little for the volatage to stablize
ldr r3, =OSCR
mov r2, #0
str r2, [r3]
ldr r1, =0xC0
1:
ldr r2, [r3]
cmp r1, r2
bgt 1b
mov pc, r4
setleds:
mov pc, lr
ldr r5, =0x40e00058
ldr r3, [r5]
bic r3, r3, #0x3
str r3, [r5]
ldr r5, =0x40e0000c
ldr r3, [r5]
orr r3, r3, #0x00010000