Commit 44cd6de2 authored by Stefan Roese's avatar Stefan Roese
Browse files
parents 95981778 6abaee42
commit 787fa15860a57833e50bd30555079a9cd4e519b8
Author: Wolfgang Denk <wd@pollux.denx.de>
Date: Wed Jan 10 01:28:39 2007 +0100
Fix auto_update for MCC200 board.
The invocation of do_auto_update() is moved to the end of the
misc_init_r() function, after the flash mappings have been
initialized. Please find attached a patch that implements that
change.
Also correct the decoding of the keypad status. With this update, the
key that will trigger the update is Column 2, Row 2.
commit 67fea022fa957f59653b5238c7496f80a6b70432
Author: Markus Klotzbuecher <mk@denx.de>
Date: Tue Jan 9 16:02:48 2007 +0100
SPC1920: cleanup memory contoller setup
commit 8fc2102faa23593c80381437c09f7745a14deb40
Author: Markus Klotzbuecher <mk@denx.de>
Date: Tue Jan 9 14:57:14 2007 +0100
Fix the cpu speed setup to work with all boards.
commit 9295acb77481cf099ef9b40e1fa2d145b3c7490c
Author: Markus Klotzbuecher <mk@denx.de>
Date: Tue Jan 9 14:57:13 2007 +0100
SPC1920: add support for the FM18L08 Ramtron FRAM
commit 38ccd2fdf3364a53fe80e9b365303ecdafc9e223
Author: Markus Klotzbuecher <mk@denx.de>
Date: Tue Jan 9 14:57:13 2007 +0100
SPC1920: update the HPI register addresses to work with the second
generation of hardware
commit 5921e5313fc3eadd42770c2b99badd7fae5ecf1e
Author: Markus Klotzbuecher <mk@creamnet.de>
Date: Tue Jan 9 14:57:13 2007 +0100
Miscellanious spc1920 related cleanups
commit e4c2d37adc8bb1bf69dcf600cbc6c75f916a6120
Author: Markus Klotzbuecher <mk@denx.de>
Date: Tue Jan 9 14:57:12 2007 +0100
SPC1920 GO/NOGO led should be set to color red in U-Boot
commit 0be62728aac459ba268d6d752ed49ec0e2bc7348
Author: Markus Klotzbuecher <mk@creamnet.de>
Date: Tue Jan 9 14:57:12 2007 +0100
Add support for the DS3231 RTC
commit 8139567b60d678584b05f0718a681f2047c5e14f
Author: Markus Klotzbuecher <mk@creamnet.de>
Date: Tue Jan 9 14:57:11 2007 +0100
SMC1 uses external CLK4 instead of BRG on spc1920
commit d8d9de1a02fbd880b613d607143d1f57342affc7
Author: Markus Klotzbuecher <mk@creamnet.de>
Date: Tue Jan 9 14:57:10 2007 +0100
Update the SPC1920 CMB PLD driver
commit 3f34f869162750e5e999fd140f884f5de952bcfe
Author: Markus Klotzbuecher <mk@creamnet.de>
Date: Tue Jan 9 14:57:10 2007 +0100
Add / enable I2C support on the spc1920 board
commit d28707dbce1e9ac2017ad051da4133bf22b4204f
Author: Markus Klotzbuecher <mk@creamnet.de>
Date: Tue Jan 9 14:57:10 2007 +0100
Add support for the tms320671x host port interface (HPI)
commit f4eb54529bb3664c3a562e488b460fe075f79d67
Author: Wolfgang Denk <wd@pollux.denx.de>
Date: Sun Jan 7 00:13:11 2007 +0100
Prepare for release 1.2.0
commit f07ae7a9daef27a3d0213a4f3fe39d5342173c02
Author: Stefan Roese <sr@denx.de>
Date: Sat Jan 6 15:58:09 2007 +0100
[PATCH] 44x: Fix problem with DDR controller setup (refresh rate)
This patch fixes a problem with an incorrect setup for the refresh
timer of the 44x DDR controller in the file cpu/ppc4xx/sdram.c
Signed-off-by: Stefan Roese <sr@denx.de>
commit f16c1da9577f06c5fc08651a4065537407de4635
Author: Stefan Roese <sr@denx.de>
Date: Sat Jan 6 15:56:13 2007 +0100
[PATCH] Update ALPR board files
This update brings the ALPR board support to the newest version.
It also fixes a problem with the NAND driver.
Signed-off-by: Stefan Roese <sr@denx.de>
commit cd1d937f90250a32988c37b2b4af8364d25de8ed
Author: Stefan Roese <sr@denx.de>
Date: Fri Jan 5 11:46:05 2007 +0100
[PATCH] nand: Fix problem with oobsize calculation
Here the description from Brian Brelsford <Brian_Brelsford@dell.com>:
The Hynix part returns a 0x1d in the 4th ID byte. The Samsung part
returns a 0x15. In the code fragment below bits [1:0] determine the
page size, it is ANDed via "(extid & 0x3)" then shifted out. The
next field is also ANDed with 0x3. However this is a one bit field
as defined in the Hynix and Samsung parts in the 4th ID byte that
determins the oobsize, not a two bit field. It works on Samsung as
bits[3:2] are 01. However for the Hynix there is a 11 in these two
bits, so the oob size gets messed up.
I checked the correct linux code and the suggested fix from Brian is
also available in the linux nand mtd driver.
Signed-off-by: Stefan Roese <sr@denx.de>
commit a78bc443ae5a4a8ba87590587d5e35bf5a787b2e
Author: Stefan Roese <sr@denx.de>
Date: Fri Jan 5 10:40:36 2007 +0100
[PATCH] Clear PLB4A0_ACR[WRP] on Sequoia (440EPx)
This fix will make the MAL burst disabling patch for the Linux
EMAC driver obsolete.
Signed-off-by: Stefan Roese <sr@denx.de>
commit 023889838282b6237b401664f22dd22dfba2c066
Author: Stefan Roese <sr@denx.de>
Date: Fri Jan 5 10:38:05 2007 +0100
[PATCH] Add DDR2 optimization code for Sequoia (440EPx) board
This code will optimize the DDR2 controller setup on a board specific
basis.
Note: This code doesn't work right now on the NAND booting image for the
Sequoia board, since it doesn't fit into the 4kBytes for the SPL image.
Signed-off-by: Stefan Roese <sr@denx.de>
commit cce4acbb68398634b8d011ed7bb0d12269c84230
Author: Bartlomiej Sieka <tur@semihalf.com>
Date: Thu Dec 28 19:08:21 2006 +0100
Few V38B changes:
- fix a typo in V38B config file
- move watchdog initialisation earlier in the boot process
- add "wdt=off" to default kernel command line (disables kernel watchdog)
commit 92eb729bad876725aeea908d2addba0800620840
Author: Wolfgang Denk <wd@pollux.denx.de>
Date: Wed Dec 27 01:26:13 2006 +0100
Fix bug in adaption of Stefano Babic's CFI driver patch.
commit 9c0f42ecfe25f7ffce8ec7a815f03864d723ffe3
Author: Wolfgang Denk <wd@pollux.denx.de>
Date: Sun Dec 24 01:42:57 2006 +0100
Minor code cleanup.
commit d784fdb05900ada3686d5778783e1fb328e9fb66
Author: Stefano Babic <sbabic@denx.de>
Date: Tue Dec 12 00:22:42 2006 +0100
Fix cfi failure with Spansion Flash (Spansion Flash Devices have a different offset to go into CFI mode)
commit 1b3c360c235dc684ec06c2d5f183f0a282ce45e2
Author: Stefan Roese <sr@denx.de>
Date: Fri Dec 22 14:29:40 2006 +0100
[PATCH] Fix sequoia flash autodetection (finally correct)
Now 32MByte and 64MByte FLASH is know to work and other
configurations should work too.
Signed-off-by: Stefan Roese <sr@denx.de>
commit 82e5236a8b719543643fd26d5827938ab2b94818
Author: Wolfgang Denk <wd@pollux.denx.de>
Date: Fri Dec 22 10:30:26 2006 +0100
Minor code cleanup; update CHANGELOG.
commit fa23044564091f05d9695beb7b5b9a931e7f41a4
Author: Heiko Schocher <hs@pollux.denx.de>
Date: Thu Dec 21 17:17:02 2006 +0100
Added support for the TQM8272 board from TQ
Signed-off-by: Heiko Schocher <hs@denx.de>
commit c84bad0ef60e7055ab0bd49b93069509cecc382a
Author: Bartlomiej Sieka <tur@semihalf.com>
Date: Wed Dec 20 00:29:43 2006 +0100
......@@ -210,7 +418,7 @@ Date: Mon Nov 27 17:04:06 2006 +0100
[PATCH] Allow CONFIG_OF_FLAT_TREE to boot a non-arch/powerpc kernel
This patch allows an arch/ppc kernel to be booted by just passing 1 or 2
arguments to bootm. It removes the getenv("disable_of") test that used
arguments to bootm. It removes the getenv("disable_of") test that used
to be used for this purpose.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
......@@ -908,7 +1116,7 @@ Date: Tue Oct 24 23:47:37 2006 -0500
If a Multi-Image file contains a third image we try to use it as a
device tree. The device tree image is assumed to be uncompressed in the
image file. We automatically allocate space for the device tree in memory
image file. We automatically allocate space for the device tree in memory
and provide an 8k pad to allow more than a reasonable amount of growth.
Additionally, a device tree that was contained in flash will now automatically
......
......@@ -22,8 +22,8 @@
#
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 6
PATCHLEVEL = 2
SUBLEVEL = 0
EXTRAVERSION =
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
VERSION_FILE = $(obj)include/version_autogenerated.h
......@@ -557,6 +557,7 @@ Total5200_Rev2_lowboot_config: unconfig
@$(MKCONFIG) -a Total5200 ppc mpc5xxx total5200
cam5200_config \
cam5200_niosflash_config \
fo300_config \
MiniFAP_config \
TQM5200S_config \
......@@ -574,6 +575,10 @@ TQM5200_STK100_config: unconfig
echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h ; \
echo "... TQM5200S on Cam5200" ; \
}
@[ -z "$(findstring niosflash,$@)" ] || \
{ echo "#define CONFIG_CAM5200_NIOSFLASH" >>$(obj)include/config.h ; \
echo "... with NIOS flash driver" ; \
}
@[ -z "$(findstring fo300,$@)" ] || \
{ echo "#define CONFIG_FO300" >>$(obj)include/config.h ; \
echo "... TQM5200 on FO300" ; \
......
......@@ -121,10 +121,10 @@ struct flash_layout aufl_layout[AU_MAXFILES] = { \
#define I2C_PSOC_KEYPAD_ADDR 0x53
/* keypad mask */
#define KEYPAD_ROW 3
#define KEYPAD_COL 3
#define KEYPAD_MASK_LO ((1<<(KEYPAD_COL-1+(KEYPAD_ROW*4-4)))&0xFF)
#define KEYPAD_MASK_HI ((1<<(KEYPAD_COL-1+(KEYPAD_ROW*4-4)))>>8)
#define KEYPAD_ROW 2
#define KEYPAD_COL 2
#define KEYPAD_MASK_LO ((1<<(KEYPAD_COL-1+(KEYPAD_ROW*3-3)))&0xFF)
#define KEYPAD_MASK_HI ((1<<(KEYPAD_COL-1+(KEYPAD_ROW*3-3)))>>8)
/* externals */
extern int fat_register_device(block_dev_desc_t *, int);
......
......@@ -228,10 +228,6 @@ int misc_init_r (void)
{
ulong flash_sup_end, snum;
#ifdef CONFIG_AUTO_UPDATE
/* this has priority over all else */
do_auto_update();
#endif
/*
* Adjust flash start and offset to detected values
*/
......@@ -294,6 +290,9 @@ int misc_init_r (void)
flash_info[0].sector_count = snum;
}
#ifdef CONFIG_AUTO_UPDATE
do_auto_update();
#endif
return (0);
}
......
......@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
COBJS = $(BOARD).o
COBJS = $(BOARD).o hpi.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
......
/*
* (C) Copyright 2006
* Markus Klotzbuecher, DENX Software Engineering, mk@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
*/
/*
* Host Port Interface (HPI)
*/
/* debug levels:
* 0 : errors
* 1 : usefull info
* 2 : lots of info
* 3 : noisy
*/
#define DEBUG 0
#include <config.h>
#include <common.h>
#include <mpc8xx.h>
#include "pld.h"
#include "hpi.h"
#define _NOT_USED_ 0xFFFFFFFF
/* original table:
* - inserted loops to achieve long CS low and high Periods (~217ns)
* - move cs high 2/4 to the right
*/
const uint dsp_table_slow[] =
{
/* single read (offset 0x00 in upm ram) */
0x8fffdc04, 0x0fffdc84, 0x0fffdc84, 0x0fffdc00,
0x3fffdc04, 0xffffdc84, 0xffffdc84, 0xffffdc05,
/* burst read (offset 0x08 in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* single write (offset 0x18 in upm ram) */
0x8fffd004, 0x0fffd084, 0x0fffd084, 0x3fffd000,
0xffffd084, 0xffffd084, 0xffffd005, _NOT_USED_,
/* burst write (offset 0x20 in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* refresh (offset 0x30 in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* exception (offset 0x3C in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
};
/* dsp hpi upm ram table
* works fine for noninc access, failes on incremental.
* - removed first word
*/
const uint dsp_table_fast[] =
{
/* single read (offset 0x00 in upm ram) */
0x8fffdc04, 0x0fffdc04, 0x0fffdc00, 0x3fffdc04,
0xffffdc05, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* burst read (offset 0x08 in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* single write (offset 0x18 in upm ram) */
0x8fffd004, 0x0fffd004, 0x3fffd000, 0xffffd005,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* burst write (offset 0x20 in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* refresh (offset 0x30 in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/* exception (offset 0x3C in upm ram) */
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
};
#ifdef CONFIG_SPC1920_HPI_TEST
#undef HPI_TEST_OSZI
#define HPI_TEST_CHUNKSIZE 0x1000
#define HPI_TEST_PATTERN 0x00000000
#define HPI_TEST_START 0x0
#define HPI_TEST_END 0x30000
#define TINY_AUTOINC_DATA_SIZE 16 /* 32bit words */
#define TINY_AUTOINC_BASE_ADDR 0x0
static int hpi_activate(void);
static void hpi_inactivate(void);
static void dsp_reset(void);
static int hpi_write_inc(u32 addr, u32 *data, u32 count);
static int hpi_read_inc(u32 addr, u32 *buf, u32 count);
static int hpi_write_noinc(u32 addr, u32 data);
static u32 hpi_read_noinc(u32 addr);
int hpi_test(void);
static int hpi_write_addr_test(u32 addr);
static int hpi_read_write_test(u32 addr, u32 data);
static int hpi_tiny_autoinc_test(void);
#endif /* CONFIG_SPC1920_HPI_TEST */
/* init the host port interface on UPMA */
int hpi_init(void)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immr->im_memctl;
volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
upmconfig(UPMA, (uint *)dsp_table_slow, sizeof(dsp_table_slow)/sizeof(uint));
udelay(100);
memctl->memc_mamr = CFG_MAMR;
memctl->memc_or3 = CFG_OR3;
memctl->memc_br3 = CFG_BR3;
/* reset dsp */
dsp_reset();
/* activate hpi switch*/
pld->dsp_hpi_on = 0x1;
udelay(100);
return 0;
}
#ifdef CONFIG_SPC1920_HPI_TEST
/* activate the Host Port interface */
static int hpi_activate(void)
{
volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
/* turn on hpi */
pld->dsp_hpi_on = 0x1;
udelay(5);
/* turn on the power EN_DSP_POWER high*/
/* currently always on TBD */
/* setup hpi control register */
HPI_HPIC_1 = (u16) 0x0008;
HPI_HPIC_2 = (u16) 0x0008;
udelay(100);
return 0;
}
/* turn off the host port interface */
static void hpi_inactivate(void)
{
volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
/* deactivate hpi */
pld->dsp_hpi_on = 0x0;
/* reset the dsp */
/* pld->dsp_reset = 0x0; */
/* turn off the power EN_DSP_POWER# high*/
/* currently always on TBD */
}
/* reset the DSP */
static void dsp_reset(void)
{
volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
pld->dsp_reset = 0x1;
pld->dsp_hpi_on = 0x0;
udelay(300000);
pld->dsp_reset = 0x0;
pld->dsp_hpi_on = 0x1;
}
/* write using autoinc (count is number of 32bit words) */
static int hpi_write_inc(u32 addr, u32 *data, u32 count)
{
int i;
u16 addr1, addr2;
addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
addr2 = (u16) (addr & 0xffff);
/* write address */
HPI_HPIA_1 = addr1;
HPI_HPIA_2 = addr2;
debugX(4, "writing from data=0x%x to 0x%x\n", data, (data+count));
for(i=0; i<count; i++) {
HPI_HPID_INC_1 = (u16) ((data[i] >> 16) & 0xffff);
HPI_HPID_INC_2 = (u16) (data[i] & 0xffff);
debugX(4, "hpi_write_inc: data1=0x%x, data2=0x%x\n",
(u16) ((data[i] >> 16) & 0xffff),
(u16) (data[i] & 0xffff));
}
#if 0
while(data_ptr < (u16*) (data + count)) {
HPI_HPID_INC_1 = *(data_ptr++);
HPI_HPID_INC_2 = *(data_ptr++);
}
#endif
/* return number of bytes written */
return count;
}
/*
* read using autoinc (count is number of 32bit words)
*/
static int hpi_read_inc(u32 addr, u32 *buf, u32 count)
{
int i;
u16 addr1, addr2, data1, data2;
addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
addr2 = (u16) (addr & 0xffff);
/* write address */
HPI_HPIA_1 = addr1;
HPI_HPIA_2 = addr2;
for(i=0; i<count; i++) {
data1 = HPI_HPID_INC_1;
data2 = HPI_HPID_INC_2;
debugX(4, "hpi_read_inc: data1=0x%x, data2=0x%x\n", data1, data2);
buf[i] = (((u32) data1) << 16) | (data2 & 0xffff);
}
#if 0
while(buf_ptr < (u16*) (buf + count)) {
*(buf_ptr++) = HPI_HPID_INC_1;
*(buf_ptr++) = HPI_HPID_INC_2;
}
#endif
/* return number of bytes read */
return count;
}
/* write to non- auto inc regs */
static int hpi_write_noinc(u32 addr, u32 data)
{
u16 addr1, addr2, data1, data2;
addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
addr2 = (u16) (addr & 0xffff);
/* printf("hpi_write_noinc: addr1=0x%x, addr2=0x%x\n", addr1, addr2); */
HPI_HPIA_1 = addr1;
HPI_HPIA_2 = addr2;
data1 = (u16) ((data >> 16) & 0xffff);
data2 = (u16) (data & 0xffff);
/* printf("hpi_write_noinc: data1=0x%x, data2=0x%x\n", data1, data2); */
HPI_HPID_NOINC_1 = data1;
HPI_HPID_NOINC_2 = data2;
return 0;
}
/* read from non- auto inc regs */
static u32 hpi_read_noinc(u32 addr)
{
u16 addr1, addr2, data1, data2;
u32 ret;
addr1 = (u16) ((addr >> 16) & 0xffff); /* First HW is most significant */
addr2 = (u16) (addr & 0xffff);
HPI_HPIA_1 = addr1;
HPI_HPIA_2 = addr2;
/* printf("hpi_read_noinc: addr1=0x%x, addr2=0x%x\n", addr1, addr2); */
data1 = HPI_HPID_NOINC_1;
data2 = HPI_HPID_NOINC_2;
/* printf("hpi_read_noinc: data1=0x%x, data2=0x%x\n", data1, data2); */
ret = (((u32) data1) << 16) | (data2 & 0xffff);
return ret;
}
/*
* Host Port Interface Tests
*/
#ifndef HPI_TEST_OSZI
/* main test function */