mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-12 22:49:43 +03:00
Compare commits
37 Commits
v2011.06-r
...
v2011.06-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79cfe42261 | ||
|
|
282e27c0b7 | ||
|
|
6c169c12d7 | ||
|
|
2321bfe425 | ||
|
|
fd2f565809 | ||
|
|
d0a94620a8 | ||
|
|
95d50e5ce7 | ||
|
|
96fd99067f | ||
|
|
576e7a10c4 | ||
|
|
9b372b2c8e | ||
|
|
8c6407fce3 | ||
|
|
b8d41dda22 | ||
|
|
8073399444 | ||
|
|
fc97102810 | ||
|
|
61a58a16f8 | ||
|
|
953ee4d09e | ||
|
|
e845f9006a | ||
|
|
22a9ea974b | ||
|
|
154f53488e | ||
|
|
3712982019 | ||
|
|
574fa1f02e | ||
|
|
56ccd36fa1 | ||
|
|
0f33ef946a | ||
|
|
d59772eb75 | ||
|
|
29b83d9833 | ||
|
|
9571865e0d | ||
|
|
84b8085638 | ||
|
|
43f13e4ad7 | ||
|
|
ba8dcca78d | ||
|
|
ac88e66e14 | ||
|
|
4e37731a27 | ||
|
|
4ac2e2d69f | ||
|
|
ba5c122846 | ||
|
|
acf04b3059 | ||
|
|
1b48f126d6 | ||
|
|
9aeab10bd4 | ||
|
|
867f54cc35 |
@@ -302,6 +302,11 @@ Dan Malek <dan@embeddedalley.com>
|
||||
stxssa MPC85xx
|
||||
stxxtc MPC8xx
|
||||
|
||||
Ryan Mallon <ryan@bluewatersys.com>
|
||||
|
||||
snapper9260 ARM926EJS (AT91SAM9260 SoC)
|
||||
snapper9g20 ARM926EJS (AT91SAM9G20 SoC)
|
||||
|
||||
Eran Man <eran@nbase.co.il>
|
||||
|
||||
EVB64260_750CX MPC750CX
|
||||
|
||||
3
MAKEALL
3
MAKEALL
@@ -454,9 +454,6 @@ LIST_at91="$(boards_by_soc at91)\
|
||||
at91sam9g20ek \
|
||||
at91sam9m10g45ek \
|
||||
at91sam9rlek \
|
||||
CPUAT91 \
|
||||
CPU9260 \
|
||||
CPU9G20 \
|
||||
pm9g45 \
|
||||
SBC35_A9G20 \
|
||||
TNY_A9260 \
|
||||
|
||||
47
Makefile
47
Makefile
@@ -24,7 +24,7 @@
|
||||
VERSION = 2011
|
||||
PATCHLEVEL = 06
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION = -rc3
|
||||
ifneq "$(SUBLEVEL)" ""
|
||||
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
||||
else
|
||||
@@ -766,43 +766,6 @@ M5485HFE_config : unconfig
|
||||
## ARM926EJ-S Systems
|
||||
#########################################################################
|
||||
|
||||
at91sam9260ek_nandflash_config \
|
||||
at91sam9260ek_dataflash_cs0_config \
|
||||
at91sam9260ek_dataflash_cs1_config \
|
||||
at91sam9260ek_config \
|
||||
at91sam9g20ek_nandflash_config \
|
||||
at91sam9g20ek_dataflash_cs0_config \
|
||||
at91sam9g20ek_dataflash_cs1_config \
|
||||
at91sam9g20ek_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@if [ "$(findstring 9g20,$@)" ] ; then \
|
||||
echo "#define CONFIG_AT91SAM9G20EK 1" >>$(obj)include/config.h ; \
|
||||
else \
|
||||
echo "#define CONFIG_AT91SAM9260EK 1" >>$(obj)include/config.h ; \
|
||||
fi;
|
||||
@if [ "$(findstring _nandflash,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \
|
||||
elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \
|
||||
else \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1" >>$(obj)include/config.h ; \
|
||||
fi;
|
||||
@$(MKCONFIG) -n $@ -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
|
||||
|
||||
at91sam9xeek_nandflash_config \
|
||||
at91sam9xeek_dataflash_cs0_config \
|
||||
at91sam9xeek_dataflash_cs1_config \
|
||||
at91sam9xeek_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@if [ "$(findstring _nandflash,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \
|
||||
elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \
|
||||
else \
|
||||
echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1" >>$(obj)include/config.h ; \
|
||||
fi;
|
||||
@$(MKCONFIG) -n $@ -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
|
||||
|
||||
at91sam9261ek_nandflash_config \
|
||||
at91sam9261ek_dataflash_cs0_config \
|
||||
at91sam9261ek_dataflash_cs3_config \
|
||||
@@ -857,14 +820,6 @@ at91sam9rlek_config : unconfig
|
||||
fi;
|
||||
@$(MKCONFIG) -n $@ -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
|
||||
|
||||
CPU9G20_128M_config \
|
||||
CPU9G20_config \
|
||||
CPU9260_128M_config \
|
||||
CPU9260_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
|
||||
@$(MKCONFIG) -n $@ -a cpu9260 arm arm926ejs cpu9260 eukrea at91
|
||||
|
||||
at91sam9m10g45ek_nandflash_config \
|
||||
at91sam9m10g45ek_dataflash_config \
|
||||
at91sam9m10g45ek_dataflash_cs0_config \
|
||||
|
||||
@@ -42,7 +42,7 @@ void __attribute__((weak)) board_reset(void)
|
||||
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
at91_st_t *st = (at91_st_t *) AT91_ST_BASE;
|
||||
at91_st_t *st = (at91_st_t *) ATMEL_BASE_ST;
|
||||
#if defined(CONFIG_AT91RM9200_USART)
|
||||
/*shutdown the console to avoid strange chars during reset */
|
||||
serial_exit();
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91_tc.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
@@ -44,11 +44,11 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
/* enables TC1.0 clock */
|
||||
writel(1 << AT91_ID_TC0, &pmc->pcer); /* enable clock */
|
||||
writel(1 << ATMEL_ID_TC0, &pmc->pcer); /* enable clock */
|
||||
|
||||
writel(0, &tc->bcr);
|
||||
writel(AT91_TC_BMR_TC0XC0S_NONE | AT91_TC_BMR_TC1XC1S_NONE |
|
||||
@@ -96,14 +96,14 @@ void __udelay(unsigned long usec)
|
||||
void reset_timer_masked(void)
|
||||
{
|
||||
/* reset time */
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC;
|
||||
gd->lastinc = readl(&tc->tc[0].cv) & 0x0000ffff;
|
||||
gd->tbl = 0;
|
||||
}
|
||||
|
||||
ulong get_timer_raw(void)
|
||||
{
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC;
|
||||
u32 now;
|
||||
|
||||
now = readl(&tc->tc[0].cv) & 0x0000ffff;
|
||||
|
||||
@@ -230,37 +230,37 @@ SMRDATA1:
|
||||
.word CONFIG_SYS_SDRC_MDR_VAL
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL2
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL1
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL3
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL2
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL3
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL4
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL5
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL6
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL7
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL8
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL9
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL4
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL10
|
||||
.word AT91_ASM_SDRAMC_MR
|
||||
.word CONFIG_SYS_SDRC_MR_VAL5
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL11
|
||||
.word AT91_ASM_SDRAMC_TR
|
||||
.word CONFIG_SYS_SDRC_TR_VAL2
|
||||
.word AT91_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_BASE
|
||||
.word CONFIG_SYS_SDRAM_VAL12
|
||||
/* User reset enable*/
|
||||
.word AT91_ASM_RSTC_MR
|
||||
|
||||
@@ -26,18 +26,18 @@
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x11C)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x11C)
|
||||
#elif defined(CONFIG_AT91SAM9261)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x30)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x30)
|
||||
#elif defined(CONFIG_AT91SAM9263)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x120)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x120)
|
||||
#elif defined(CONFIG_AT91SAM9G45)
|
||||
#define AT91_ASM_MATRIX_CSA0 (AT91_MATRIX_BASE + 0x128)
|
||||
#define AT91_ASM_MATRIX_CSA0 (ATMEL_BASE_MATRIX + 0x128)
|
||||
#else
|
||||
#error AT91_ASM_MATRIX_CSA0 is not definied for current CPU
|
||||
#endif
|
||||
|
||||
#define AT91_ASM_MATRIX_MCFG AT91_MATRIX_BASE
|
||||
#define AT91_ASM_MATRIX_MCFG ATMEL_BASE_MATRIX
|
||||
|
||||
#else
|
||||
#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
#ifndef AT91_MC_H
|
||||
#define AT91_MC_H
|
||||
|
||||
#define AT91_ASM_MC_EBI_CSA (AT91_MC_BASE + 0x60)
|
||||
#define AT91_ASM_MC_EBI_CFG (AT91_MC_BASE + 0x64)
|
||||
#define AT91_ASM_MC_SMC_CSR0 (AT91_MC_BASE + 0x70)
|
||||
#define AT91_ASM_MC_SDRAMC_MR (AT91_MC_BASE + 0x90)
|
||||
#define AT91_ASM_MC_SDRAMC_TR (AT91_MC_BASE + 0x94)
|
||||
#define AT91_ASM_MC_SDRAMC_CR (AT91_MC_BASE + 0x98)
|
||||
#define AT91_ASM_MC_EBI_CSA (ATMEL_BASE_MC + 0x60)
|
||||
#define AT91_ASM_MC_EBI_CFG (ATMEL_BASE_MC + 0x64)
|
||||
#define AT91_ASM_MC_SMC_CSR0 (ATMEL_BASE_MC + 0x70)
|
||||
#define AT91_ASM_MC_SDRAMC_MR (ATMEL_BASE_MC + 0x90)
|
||||
#define AT91_ASM_MC_SDRAMC_TR (ATMEL_BASE_MC + 0x94)
|
||||
#define AT91_ASM_MC_SDRAMC_CR (ATMEL_BASE_MC + 0x98)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
|
||||
#define AT91_ASM_PIO_RANGE 0x200
|
||||
#define AT91_ASM_PIOC_ASR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x70)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x70)
|
||||
#define AT91_ASM_PIOC_BSR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x74)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x74)
|
||||
#define AT91_ASM_PIOC_PDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x04)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x04)
|
||||
#define AT91_ASM_PIOC_PUDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x60)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x60)
|
||||
|
||||
#define AT91_ASM_PIOD_PDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x04)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x04)
|
||||
#define AT91_ASM_PIOD_PUDR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x60)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x60)
|
||||
#define AT91_ASM_PIOD_ASR \
|
||||
(AT91_PIO_BASE + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x70)
|
||||
(ATMEL_BASE_PIO + AT91_PIO_PORTD * AT91_ASM_PIO_RANGE + 0x70)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
#ifndef AT91_PMC_H
|
||||
#define AT91_PMC_H
|
||||
|
||||
#define AT91_ASM_PMC_MOR (AT91_PMC_BASE + 0x20)
|
||||
#define AT91_ASM_PMC_PLLAR (AT91_PMC_BASE + 0x28)
|
||||
#define AT91_ASM_PMC_PLLBR (AT91_PMC_BASE + 0x2c)
|
||||
#define AT91_ASM_PMC_MCKR (AT91_PMC_BASE + 0x30)
|
||||
#define AT91_ASM_PMC_SR (AT91_PMC_BASE + 0x68)
|
||||
#define AT91_ASM_PMC_MOR (ATMEL_BASE_PMC + 0x20)
|
||||
#define AT91_ASM_PMC_PLLAR (ATMEL_BASE_PMC + 0x28)
|
||||
#define AT91_ASM_PMC_PLLBR (ATMEL_BASE_PMC + 0x2c)
|
||||
#define AT91_ASM_PMC_MCKR (ATMEL_BASE_PMC + 0x30)
|
||||
#define AT91_ASM_PMC_SR (ATMEL_BASE_PMC + 0x68)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef AT91_RSTC_H
|
||||
#define AT91_RSTC_H
|
||||
|
||||
#define AT91_ASM_RSTC_MR (AT91_RSTC_BASE + 0x08)
|
||||
#define AT91_ASM_RSTC_MR (ATMEL_BASE_RSTC + 0x08)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#define AT91_ASM_WDT_MR (AT91_WDT_BASE + 0x04)
|
||||
#define AT91_ASM_WDT_MR (ATMEL_BASE_WDT + 0x04)
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -21,115 +21,126 @@
|
||||
#ifndef __AT91RM9200_H__
|
||||
#define __AT91RM9200_H__
|
||||
|
||||
#define CONFIG_AT91FAMILY /* it's a member of AT91 */
|
||||
#define CONFIG_ARM920T /* This is an ARM920T Core */
|
||||
|
||||
/* Periperial Identifiers */
|
||||
|
||||
#define AT91_ID_SYS 1 /* System Peripheral */
|
||||
#define AT91_ID_PIOA 2 /* PIO port A */
|
||||
#define AT91_ID_PIOB 3 /* PIO port B */
|
||||
#define AT91_ID_PIOC 4 /* PIO port C */
|
||||
#define AT91_ID_PIOD 5 /* PIO port D BGA only */
|
||||
#define AT91_ID_USART0 6 /* USART 0 */
|
||||
#define AT91_ID_USART1 7 /* USART 1 */
|
||||
#define AT91_ID_USART2 8 /* USART 2 */
|
||||
#define AT91_ID_USART3 9 /* USART 3 */
|
||||
#define AT91_ID_MCI 10 /* Multimedia Card Interface */
|
||||
#define AT91_ID_UDP 11 /* USB Device Port */
|
||||
#define AT91_ID_TWI 12 /* Two Wire Interface */
|
||||
#define AT91_ID_SPI 13 /* Serial Peripheral Interface */
|
||||
#define AT91_ID_SSC0 14 /* Synch. Serial Controller 0 */
|
||||
#define AT91_ID_SSC1 15 /* Synch. Serial Controller 1 */
|
||||
#define AT91_ID_SSC2 16 /* Synch. Serial Controller 2 */
|
||||
#define AT91_ID_TC0 17 /* Timer Counter 0 */
|
||||
#define AT91_ID_TC1 18 /* Timer Counter 1 */
|
||||
#define AT91_ID_TC2 19 /* Timer Counter 2 */
|
||||
#define AT91_ID_TC3 20 /* Timer Counter 3 */
|
||||
#define AT91_ID_TC4 21 /* Timer Counter 4 */
|
||||
#define AT91_ID_TC5 22 /* Timer Counter 5 */
|
||||
#define AT91_ID_UHP 23 /* OHCI USB Host Port */
|
||||
#define AT91_ID_EMAC 24 /* Ethernet MAC */
|
||||
#define AT91_ID_IRQ0 25 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ1 26 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ2 27 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ3 28 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ4 29 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ5 30 /* Advanced Interrupt Controller */
|
||||
#define AT91_ID_IRQ6 31 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_SYS 1 /* System Peripheral */
|
||||
#define ATMEL_ID_PIOA 2 /* PIO port A */
|
||||
#define ATMEL_ID_PIOB 3 /* PIO port B */
|
||||
#define ATMEL_ID_PIOC 4 /* PIO port C */
|
||||
#define ATMEL_ID_PIOD 5 /* PIO port D BGA only */
|
||||
#define ATMEL_ID_USART0 6 /* USART 0 */
|
||||
#define ATMEL_ID_USART1 7 /* USART 1 */
|
||||
#define ATMEL_ID_USART2 8 /* USART 2 */
|
||||
#define ATMEL_ID_USART3 9 /* USART 3 */
|
||||
#define ATMEL_ID_MCI 10 /* Multimedia Card Interface */
|
||||
#define ATMEL_ID_UDP 11 /* USB Device Port */
|
||||
#define ATMEL_ID_TWI 12 /* Two Wire Interface */
|
||||
#define ATMEL_ID_SPI 13 /* Serial Peripheral Interface */
|
||||
#define ATMEL_ID_SSC0 14 /* Synch. Serial Controller 0 */
|
||||
#define ATMEL_ID_SSC1 15 /* Synch. Serial Controller 1 */
|
||||
#define ATMEL_ID_SSC2 16 /* Synch. Serial Controller 2 */
|
||||
#define ATMEL_ID_TC0 17 /* Timer Counter 0 */
|
||||
#define ATMEL_ID_TC1 18 /* Timer Counter 1 */
|
||||
#define ATMEL_ID_TC2 19 /* Timer Counter 2 */
|
||||
#define ATMEL_ID_TC3 20 /* Timer Counter 3 */
|
||||
#define ATMEL_ID_TC4 21 /* Timer Counter 4 */
|
||||
#define ATMEL_ID_TC5 22 /* Timer Counter 5 */
|
||||
#define ATMEL_ID_UHP 23 /* OHCI USB Host Port */
|
||||
#define ATMEL_ID_EMAC 24 /* Ethernet MAC */
|
||||
#define ATMEL_ID_IRQ0 25 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ1 26 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ2 27 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ3 28 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ4 29 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ5 30 /* Advanced Interrupt Controller */
|
||||
#define ATMEL_ID_IRQ6 31 /* Advanced Interrupt Controller */
|
||||
|
||||
#define AT91_USB_HOST_BASE 0x00300000
|
||||
#define ATMEL_USB_HOST_BASE 0x00300000
|
||||
|
||||
#define AT91_TC_BASE 0xFFFA0000
|
||||
#define AT91_UDP_BASE 0xFFFB0000
|
||||
#define AT91_MCI_BASE 0xFFFB4000
|
||||
#define AT91_TWI_BASE 0xFFFB8000
|
||||
#define AT91_EMAC_BASE 0xFFFBC000
|
||||
#define AT91_USART_BASE 0xFFFC0000 /* 4x 0x4000 Offset */
|
||||
#define AT91_SCC_BASE 0xFFFD0000 /* 4x 0x4000 Offset */
|
||||
#define AT91_SPI_BASE 0xFFFE0000
|
||||
#define ATMEL_BASE_TC 0xFFFA0000
|
||||
#define ATMEL_BASE_UDP 0xFFFB0000
|
||||
#define ATMEL_BASE_MCI 0xFFFB4000
|
||||
#define ATMEL_BASE_TWI 0xFFFB8000
|
||||
#define ATMEL_BASE_EMAC 0xFFFBC000
|
||||
#define ATMEL_BASE_USART 0xFFFC0000 /* 4x 0x4000 Offset */
|
||||
#define ATMEL_BASE_USART0 ATMEL_BASE_USART
|
||||
#define ATMEL_BASE_USART1 (ATMEL_BASE_USART + 0x4000)
|
||||
#define ATMEL_BASE_USART2 (ATMEL_BASE_USART + 0x8000)
|
||||
#define ATMEL_BASE_USART3 (ATMEL_BASE_USART + 0xC000)
|
||||
|
||||
#define AT91_AIC_BASE 0xFFFFF000
|
||||
#define AT91_DBGU_BASE 0xFFFFF200
|
||||
#define AT91_PIO_BASE 0xFFFFF400 /* 4x 0x200 Offset */
|
||||
#define AT91_PMC_BASE 0xFFFFFC00
|
||||
#define AT91_ST_BASE 0xFFFFFD00
|
||||
#define AT91_ST_BASE 0xFFFFFD00
|
||||
#define AT91_RTC_BASE 0xFFFFFE00
|
||||
#define AT91_MC_BASE 0xFFFFFF00
|
||||
#define ATMEL_BASE_SCC 0xFFFD0000 /* 4x 0x4000 Offset */
|
||||
#define ATMEL_BASE_SPI 0xFFFE0000
|
||||
|
||||
#define ATMEL_BASE_AIC 0xFFFFF000
|
||||
#define ATMEL_BASE_DBGU 0xFFFFF200
|
||||
#define ATMEL_BASE_PIO 0xFFFFF400 /* 4x 0x200 Offset */
|
||||
#define ATMEL_BASE_PMC 0xFFFFFC00
|
||||
#define ATMEL_BASE_ST 0xFFFFFD00
|
||||
#define ATMEL_BASE_RTC 0xFFFFFE00
|
||||
#define ATMEL_BASE_MC 0xFFFFFF00
|
||||
|
||||
#define AT91_PIO_BASE ATMEL_BASE_PIO
|
||||
|
||||
/* AT91RM9200 Periperial Multiplexing A */
|
||||
/* Port A */
|
||||
#define AT91_PMX_AA_EREFCK 0x00000080
|
||||
#define AT91_PMX_AA_ETXCK 0x00000080
|
||||
#define AT91_PMX_AA_ETXEN 0x00000100
|
||||
#define AT91_PMX_AA_ETX0 0x00000200
|
||||
#define AT91_PMX_AA_ETX1 0x00000400
|
||||
#define AT91_PMX_AA_ECRS 0x00000800
|
||||
#define AT91_PMX_AA_ECRSDV 0x00000800
|
||||
#define AT91_PMX_AA_ERX0 0x00001000
|
||||
#define AT91_PMX_AA_ERX1 0x00002000
|
||||
#define AT91_PMX_AA_ERXER 0x00004000
|
||||
#define AT91_PMX_AA_EMDC 0x00008000
|
||||
#define AT91_PMX_AA_EMDIO 0x00010000
|
||||
#define ATMEL_PMX_AA_EREFCK 0x00000080
|
||||
#define ATMEL_PMX_AA_ETXCK 0x00000080
|
||||
#define ATMEL_PMX_AA_ETXEN 0x00000100
|
||||
#define ATMEL_PMX_AA_ETX0 0x00000200
|
||||
#define ATMEL_PMX_AA_ETX1 0x00000400
|
||||
#define ATMEL_PMX_AA_ECRS 0x00000800
|
||||
#define ATMEL_PMX_AA_ECRSDV 0x00000800
|
||||
#define ATMEL_PMX_AA_ERX0 0x00001000
|
||||
#define ATMEL_PMX_AA_ERX1 0x00002000
|
||||
#define ATMEL_PMX_AA_ERXER 0x00004000
|
||||
#define ATMEL_PMX_AA_EMDC 0x00008000
|
||||
#define ATMEL_PMX_AA_EMDIO 0x00010000
|
||||
|
||||
#define AT91_PMX_AA_TXD2 0x00810000
|
||||
#define ATMEL_PMX_AA_TXD2 0x00810000
|
||||
|
||||
#define AT91_PMX_AA_TWD 0x02000000
|
||||
#define AT91_PMX_AA_TWCK 0x04000000
|
||||
#define ATMEL_PMX_AA_TWD 0x02000000
|
||||
#define ATMEL_PMX_AA_TWCK 0x04000000
|
||||
|
||||
/* Port B */
|
||||
#define AT91_PMX_BA_ERXCK 0x00080000
|
||||
#define AT91_PMX_BA_ECOL 0x00040000
|
||||
#define AT91_PMX_BA_ERXDV 0x00020000
|
||||
#define AT91_PMX_BA_ERX3 0x00010000
|
||||
#define AT91_PMX_BA_ERX2 0x00008000
|
||||
#define AT91_PMX_BA_ETXER 0x00004000
|
||||
#define AT91_PMX_BA_ETX3 0x00002000
|
||||
#define AT91_PMX_BA_ETX2 0x00001000
|
||||
#define ATMEL_PMX_BA_ERXCK 0x00080000
|
||||
#define ATMEL_PMX_BA_ECOL 0x00040000
|
||||
#define ATMEL_PMX_BA_ERXDV 0x00020000
|
||||
#define ATMEL_PMX_BA_ERX3 0x00010000
|
||||
#define ATMEL_PMX_BA_ERX2 0x00008000
|
||||
#define ATMEL_PMX_BA_ETXER 0x00004000
|
||||
#define ATMEL_PMX_BA_ETX3 0x00002000
|
||||
#define ATMEL_PMX_BA_ETX2 0x00001000
|
||||
|
||||
/* Port B */
|
||||
|
||||
#define AT91_PMX_CA_BFCK 0x00000001
|
||||
#define AT91_PMX_CA_BFRDY 0x00000002
|
||||
#define AT91_PMX_CA_SMOE 0x00000002
|
||||
#define AT91_PMX_CA_BFAVD 0x00000004
|
||||
#define AT91_PMX_CA_BFBAA 0x00000008
|
||||
#define AT91_PMX_CA_SMWE 0x00000008
|
||||
#define AT91_PMX_CA_BFOE 0x00000010
|
||||
#define AT91_PMX_CA_BFWE 0x00000020
|
||||
#define AT91_PMX_CA_NWAIT 0x00000040
|
||||
#define AT91_PMX_CA_A23 0x00000080
|
||||
#define AT91_PMX_CA_A24 0x00000100
|
||||
#define AT91_PMX_CA_A25 0x00000200
|
||||
#define AT91_PMX_CA_CFRNW 0x00000200
|
||||
#define AT91_PMX_CA_NCS4 0x00000400
|
||||
#define AT91_PMX_CA_CFCS 0x00000400
|
||||
#define AT91_PMX_CA_NCS5 0x00000800
|
||||
#define AT91_PMX_CA_CFCE1 0x00001000
|
||||
#define AT91_PMX_CA_NCS6 0x00001000
|
||||
#define AT91_PMX_CA_CFCE2 0x00002000
|
||||
#define AT91_PMX_CA_NCS7 0x00002000
|
||||
#define AT91_PMX_CA_D16_31 0xFFFF0000
|
||||
#define ATMEL_PMX_CA_BFCK 0x00000001
|
||||
#define ATMEL_PMX_CA_BFRDY 0x00000002
|
||||
#define ATMEL_PMX_CA_SMOE 0x00000002
|
||||
#define ATMEL_PMX_CA_BFAVD 0x00000004
|
||||
#define ATMEL_PMX_CA_BFBAA 0x00000008
|
||||
#define ATMEL_PMX_CA_SMWE 0x00000008
|
||||
#define ATMEL_PMX_CA_BFOE 0x00000010
|
||||
#define ATMEL_PMX_CA_BFWE 0x00000020
|
||||
#define ATMEL_PMX_CA_NWAIT 0x00000040
|
||||
#define ATMEL_PMX_CA_A23 0x00000080
|
||||
#define ATMEL_PMX_CA_A24 0x00000100
|
||||
#define ATMEL_PMX_CA_A25 0x00000200
|
||||
#define ATMEL_PMX_CA_CFRNW 0x00000200
|
||||
#define ATMEL_PMX_CA_NCS4 0x00000400
|
||||
#define ATMEL_PMX_CA_CFCS 0x00000400
|
||||
#define ATMEL_PMX_CA_NCS5 0x00000800
|
||||
#define ATMEL_PMX_CA_CFCE1 0x00001000
|
||||
#define ATMEL_PMX_CA_NCS6 0x00001000
|
||||
#define ATMEL_PMX_CA_CFCE2 0x00002000
|
||||
#define ATMEL_PMX_CA_NCS7 0x00002000
|
||||
#define ATMEL_PMX_CA_D16_31 0xFFFF0000
|
||||
|
||||
#define CONFIG_SYS_AT91_CPU_NAME "AT91RM9200"
|
||||
#define ATMEL_PIO_PORTS 4 /* theese SoCs have 4 PIO */
|
||||
#define ATMEL_PMC_UHP AT91RM9200_PMC_UHP
|
||||
|
||||
#define CONFIG_SYS_ATMEL_CPU_NAME "AT91RM9200"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
*/
|
||||
#define ATMEL_PIO_PORTS 3 /* these SoCs have 3 PIO */
|
||||
#define ATMEL_PMC_UHP AT91SAM926x_PMC_UHP
|
||||
#define ATMEL_BASE_PIO ATMEL_BASE_PIOA
|
||||
|
||||
/*
|
||||
* SoC specific defines
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
* Other misc defines
|
||||
*/
|
||||
#define ATMEL_PIO_PORTS 3 /* theese SoCs have 3 PIO */
|
||||
#define ATMEL_BASE_PIO ATMEL_BASE_PIOA
|
||||
|
||||
/*
|
||||
* SoC specific defines
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
* Other misc defines
|
||||
*/
|
||||
#define ATMEL_PIO_PORTS 5 /* this SoCs has 5 PIO */
|
||||
#define ATMEL_BASE_PIO ATMEL_BASE_PIOA
|
||||
|
||||
/*
|
||||
* Cpu Name
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#ifndef AT91_SDRAMC_BASE
|
||||
#define AT91_SDRAMC_BASE AT91_SDRAMC0_BASE
|
||||
#ifndef ATMEL_BASE_SDRAMC
|
||||
#define ATMEL_BASE_SDRAMC AT91_SDRAMC0_BASE
|
||||
#endif
|
||||
|
||||
#define AT91_ASM_SDRAMC_MR AT91_SDRAMC_BASE
|
||||
#define AT91_ASM_SDRAMC_TR (AT91_SDRAMC_BASE + 0x04)
|
||||
#define AT91_ASM_SDRAMC_CR (AT91_SDRAMC_BASE + 0x08)
|
||||
#define AT91_ASM_SDRAMC_MDR (AT91_SDRAMC_BASE + 0x24)
|
||||
#define AT91_ASM_SDRAMC_MR ATMEL_BASE_SDRAMC
|
||||
#define AT91_ASM_SDRAMC_TR (ATMEL_BASE_SDRAMC + 0x04)
|
||||
#define AT91_ASM_SDRAMC_CR (ATMEL_BASE_SDRAMC + 0x08)
|
||||
#define AT91_ASM_SDRAMC_MDR (ATMEL_BASE_SDRAMC + 0x24)
|
||||
|
||||
#endif
|
||||
|
||||
/* SDRAM Controller (SDRAMC) registers */
|
||||
#define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */
|
||||
#define AT91_SDRAMC_MR (ATMEL_BASE_SDRAMC + 0x00) /* SDRAM Controller Mode Register */
|
||||
#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
|
||||
#define AT91_SDRAMC_MODE_NORMAL 0
|
||||
#define AT91_SDRAMC_MODE_NOP 1
|
||||
@@ -41,10 +41,10 @@
|
||||
#define AT91_SDRAMC_MODE_EXT_LMR 5
|
||||
#define AT91_SDRAMC_MODE_DEEP 6
|
||||
|
||||
#define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */
|
||||
#define AT91_SDRAMC_TR (ATMEL_BASE_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */
|
||||
#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */
|
||||
|
||||
#define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */
|
||||
#define AT91_SDRAMC_CR (ATMEL_BASE_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */
|
||||
#define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */
|
||||
#define AT91_SDRAMC_NC_8 (0 << 0)
|
||||
#define AT91_SDRAMC_NC_9 (1 << 0)
|
||||
@@ -71,7 +71,7 @@
|
||||
#define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */
|
||||
#define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */
|
||||
|
||||
#define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */
|
||||
#define AT91_SDRAMC_LPR (ATMEL_BASE_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */
|
||||
#define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */
|
||||
#define AT91_SDRAMC_LPCB_DISABLE 0
|
||||
#define AT91_SDRAMC_LPCB_SELF_REFRESH 1
|
||||
@@ -85,13 +85,13 @@
|
||||
#define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12)
|
||||
#define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12)
|
||||
|
||||
#define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */
|
||||
#define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */
|
||||
#define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */
|
||||
#define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */
|
||||
#define AT91_SDRAMC_IER (ATMEL_BASE_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */
|
||||
#define AT91_SDRAMC_IDR (ATMEL_BASE_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */
|
||||
#define AT91_SDRAMC_IMR (ATMEL_BASE_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */
|
||||
#define AT91_SDRAMC_ISR (ATMEL_BASE_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */
|
||||
#define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */
|
||||
|
||||
#define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory Device Register */
|
||||
#define AT91_SDRAMC_MDR (ATMEL_BASE_SDRAMC + 0x24) /* SDRAM Memory Device Register */
|
||||
#define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */
|
||||
#define AT91_SDRAMC_MD_SDRAM 0
|
||||
#define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#ifndef AT91_SMC_BASE
|
||||
#define AT91_SMC_BASE AT91_SMC0_BASE
|
||||
#ifndef ATMEL_BASE_SMC
|
||||
#define ATMEL_BASE_SMC ATMEL_BASE_SMC0
|
||||
#endif
|
||||
|
||||
#define AT91_ASM_SMC_SETUP0 AT91_SMC_BASE
|
||||
#define AT91_ASM_SMC_PULSE0 (AT91_SMC_BASE + 0x04)
|
||||
#define AT91_ASM_SMC_CYCLE0 (AT91_SMC_BASE + 0x08)
|
||||
#define AT91_ASM_SMC_MODE0 (AT91_SMC_BASE + 0x0C)
|
||||
#define AT91_ASM_SMC_SETUP0 ATMEL_BASE_SMC
|
||||
#define AT91_ASM_SMC_PULSE0 (ATMEL_BASE_SMC + 0x04)
|
||||
#define AT91_ASM_SMC_CYCLE0 (ATMEL_BASE_SMC + 0x08)
|
||||
#define AT91_ASM_SMC_MODE0 (ATMEL_BASE_SMC + 0x0C)
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -76,10 +76,6 @@ LDR_FLAGS += $(LDR_FLAGS-y)
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
|
||||
|
||||
ifeq ($(wildcard $(TOPDIR)/board/$(BOARD)/u-boot.lds*),)
|
||||
LDSCRIPT = $(obj)arch/$(ARCH)/lib/u-boot.lds.S
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_SYS_TEXT_BASE),)
|
||||
$(error do not set CONFIG_SYS_TEXT_BASE for Blackfin boards)
|
||||
endif
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <asm/blackfin.h>
|
||||
#include <asm/mach-common/bits/bootrom.h>
|
||||
#include "cpu.h"
|
||||
|
||||
/* A system soft reset makes external memory unusable so force
|
||||
@@ -29,46 +30,40 @@ static void bfin_reset(void)
|
||||
*/
|
||||
__builtin_bfin_ssync();
|
||||
|
||||
/* The bootrom checks to see how it was reset and will
|
||||
* automatically perform a software reset for us when
|
||||
* it starts executing after the core reset.
|
||||
/* Initiate System software reset. */
|
||||
bfin_write_SWRST(0x7);
|
||||
|
||||
/* Due to the way reset is handled in the hardware, we need
|
||||
* to delay for 10 SCLKS. The only reliable way to do this is
|
||||
* to calculate the CCLK/SCLK ratio and multiply 10. For now,
|
||||
* we'll assume worse case which is a 1:15 ratio.
|
||||
*/
|
||||
if (ANOMALY_05000353 || ANOMALY_05000386) {
|
||||
/* Initiate System software reset. */
|
||||
bfin_write_SWRST(0x7);
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC0 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 10)
|
||||
: "LC0", "LB0", "LT0"
|
||||
);
|
||||
|
||||
/* Due to the way reset is handled in the hardware, we need
|
||||
* to delay for 10 SCLKS. The only reliable way to do this is
|
||||
* to calculate the CCLK/SCLK ratio and multiply 10. For now,
|
||||
* we'll assume worse case which is a 1:15 ratio.
|
||||
*/
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC0 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 10)
|
||||
: "LC0", "LB0", "LT0"
|
||||
);
|
||||
/* Clear System software reset */
|
||||
bfin_write_SWRST(0);
|
||||
|
||||
/* Clear System software reset */
|
||||
bfin_write_SWRST(0);
|
||||
|
||||
/* The BF526 ROM will crash during reset */
|
||||
/* The BF526 ROM will crash during reset */
|
||||
#if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__)
|
||||
bfin_read_SWRST();
|
||||
bfin_read_SWRST();
|
||||
#endif
|
||||
|
||||
/* Wait for the SWRST write to complete. Cannot rely on SSYNC
|
||||
* though as the System state is all reset now.
|
||||
*/
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC1 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 1)
|
||||
: "LC1", "LB1", "LT1"
|
||||
);
|
||||
}
|
||||
/* Wait for the SWRST write to complete. Cannot rely on SSYNC
|
||||
* though as the System state is all reset now.
|
||||
*/
|
||||
asm(
|
||||
"LSETUP (1f, 1f) LC1 = %0\n"
|
||||
"1: nop;"
|
||||
:
|
||||
: "a" (15 * 1)
|
||||
: "LC1", "LB1", "LT1"
|
||||
);
|
||||
|
||||
while (1)
|
||||
/* Issue core reset */
|
||||
@@ -84,7 +79,10 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
if (board_reset)
|
||||
board_reset();
|
||||
while (1)
|
||||
asm("jump (%0);" : : "a" (bfin_reset));
|
||||
if (ANOMALY_05000353 || ANOMALY_05000386)
|
||||
while (1)
|
||||
asm("jump (%0);" : : "a" (bfin_reset));
|
||||
else
|
||||
bfrom_SoftReset((void *)(L1_SRAM_SCRATCH_END - 20));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
/* Correct IRDA resistor problem / Set PA23_TXD in Output */
|
||||
writel(AT91_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_EB_CPUX9K2;
|
||||
/* adress of boot parameters */
|
||||
@@ -147,7 +147,7 @@ int dram_init(void)
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
rc = at91emac_register(bis, (u32) AT91_EMAC_BASE);
|
||||
rc = at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
@@ -164,9 +164,9 @@ int board_eth_init(bd_t *bis)
|
||||
void cpux9k2_nand_hw_init(void)
|
||||
{
|
||||
unsigned long csr;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_mc_t *mc = (at91_mc_t *) AT91_MC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_mc_t *mc = (at91_mc_t *) ATMEL_BASE_MC;
|
||||
|
||||
/* Setup Smart Media, fitst enable the address range of CS3 */
|
||||
writel(readl(&mc->ebi.csa) | AT91_EBI_CSA_CS3A, &mc->ebi.csa);
|
||||
@@ -178,23 +178,23 @@ void cpux9k2_nand_hw_init(void)
|
||||
AT91_SMC_CSR_WSEN;
|
||||
writel(csr, &mc->smc.csr[3]);
|
||||
|
||||
writel(AT91_PMX_CA_SMOE | AT91_PMX_CA_SMWE, &pio->pioc.asr);
|
||||
writel(AT91_PMX_CA_BFCK | AT91_PMX_CA_SMOE | AT91_PMX_CA_SMWE,
|
||||
writel(ATMEL_PMX_CA_SMOE | ATMEL_PMX_CA_SMWE, &pio->pioc.asr);
|
||||
writel(ATMEL_PMX_CA_BFCK | ATMEL_PMX_CA_SMOE | ATMEL_PMX_CA_SMWE,
|
||||
&pio->pioc.pdr);
|
||||
|
||||
/* Configure PC2 as input (signal Nand READY ) */
|
||||
writel(AT91_PMX_CA_BFAVD, &pio->pioc.per);
|
||||
writel(AT91_PMX_CA_BFAVD, &pio->pioc.odr); /* disable output */
|
||||
writel(AT91_PMX_CA_BFCK, &pio->pioc.codr);
|
||||
writel(ATMEL_PMX_CA_BFAVD, &pio->pioc.per);
|
||||
writel(ATMEL_PMX_CA_BFAVD, &pio->pioc.odr); /* disable output */
|
||||
writel(ATMEL_PMX_CA_BFCK, &pio->pioc.codr);
|
||||
|
||||
/* PIOC clock enabling */
|
||||
writel(1 << AT91_ID_PIOC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
|
||||
}
|
||||
|
||||
static void board_nand_hwcontrol(struct mtd_info *mtd,
|
||||
int cmd, unsigned int ctrl)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
struct nand_chip *this = mtd->priv;
|
||||
ulong IO_ADDR_W = (ulong) this->IO_ADDR_W;
|
||||
|
||||
@@ -219,7 +219,7 @@ static void board_nand_hwcontrol(struct mtd_info *mtd,
|
||||
|
||||
static int board_nand_dev_ready(struct mtd_info *mtd)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
return ((readl(&pio->pioc.pdsr) & (1 << 2)) != 0);
|
||||
}
|
||||
|
||||
@@ -248,8 +248,8 @@ int drv_video_init(void)
|
||||
#endif
|
||||
char *s;
|
||||
unsigned long csr;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_mc_t *mc = (at91_mc_t *) AT91_MC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_mc_t *mc = (at91_mc_t *) ATMEL_BASE_MC;
|
||||
|
||||
printf("Init Video as ");
|
||||
s = getenv("displaywidth");
|
||||
@@ -270,7 +270,7 @@ int drv_video_init(void)
|
||||
AT91_SMC_CSR_ACSS_STANDARD | AT91_SMC_CSR_DBW_16 |
|
||||
AT91_SMC_CSR_BAT_16 | AT91_SMC_CSR_WSEN;
|
||||
writel(csr, &mc->smc.csr[2]);
|
||||
writel(1 << AT91_ID_PIOB, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOB, &pmc->pcer);
|
||||
|
||||
vcxk_init(display_width, display_height);
|
||||
#ifdef CONFIG_SPLASH_SCREEN
|
||||
@@ -290,11 +290,11 @@ int drv_video_init(void)
|
||||
void i2c_init_board(void)
|
||||
{
|
||||
u32 pin;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
writel(1 << AT91_ID_PIOA, &pmc->pcer);
|
||||
pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
|
||||
writel(1 << ATMEL_ID_PIOA, &pmc->pcer);
|
||||
pin = ATMEL_PMX_AA_TWD | ATMEL_PMX_AA_TWCK;
|
||||
writel(pin, &pio->pioa.idr);
|
||||
writel(pin, &pio->pioa.pudr);
|
||||
writel(pin, &pio->pioa.per);
|
||||
@@ -310,7 +310,7 @@ void i2c_init_board(void)
|
||||
|
||||
void __led_toggle(led_id_t mask)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
if (readl(&pio->piod.odsr) & mask)
|
||||
writel(mask, &pio->piod.codr);
|
||||
@@ -320,10 +320,10 @@ void __led_toggle(led_id_t mask)
|
||||
|
||||
void __led_init(led_id_t mask, int state)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
writel(1 << AT91_ID_PIOD, &pmc->pcer); /* Enable PIOB clock */
|
||||
writel(1 << ATMEL_ID_PIOD, &pmc->pcer); /* Enable PIOB clock */
|
||||
/* Disable peripherals on LEDs */
|
||||
writel(STATUS_LED_BIT | STATUS_LED_BIT1, &pio->piod.per);
|
||||
/* Enable pins as outputs */
|
||||
@@ -336,7 +336,7 @@ void __led_init(led_id_t mask, int state)
|
||||
|
||||
void __led_set(led_id_t mask, int state)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
if (state == STATUS_LED_ON)
|
||||
writel(mask, &pio->piod.codr);
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
||||
#include <netdev.h>
|
||||
@@ -48,28 +48,28 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
static void afeb9260_nand_hw_init(void)
|
||||
{
|
||||
unsigned long csa;
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA,
|
||||
csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
/* Assign CS3 to NAND/SmartMedia Interface */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
at91_sys_write(AT91_SMC_SETUP(3),
|
||||
AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) |
|
||||
AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
|
||||
at91_sys_write(AT91_SMC_PULSE(3),
|
||||
AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
|
||||
AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
|
||||
at91_sys_write(AT91_SMC_CYCLE(3),
|
||||
AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
|
||||
at91_sys_write(AT91_SMC_MODE(3),
|
||||
AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
|
||||
AT91_SMC_EXNWMODE_DISABLE |
|
||||
AT91_SMC_DBW_8 |
|
||||
AT91_SMC_TDF_(2));
|
||||
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
|
||||
writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
|
||||
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
AT91_SMC_MODE_TDF_CYCLE(2),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
@@ -81,10 +81,15 @@ static void afeb9260_nand_hw_init(void)
|
||||
#ifdef CONFIG_MACB
|
||||
static void afeb9260_macb_hw_init(void)
|
||||
{
|
||||
unsigned long rstc;
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
|
||||
struct at91_rstc *rstc = (struct at91_rstc *)ATMEL_BASE_RSTC;
|
||||
unsigned long erstl;
|
||||
|
||||
|
||||
/* Enable EMAC clock */
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/* Enable clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
|
||||
|
||||
/*
|
||||
* Disable pull-up on:
|
||||
@@ -103,24 +108,22 @@ static void afeb9260_macb_hw_init(void)
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUDR);
|
||||
&pioa->pudr);
|
||||
|
||||
rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
|
||||
erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK;
|
||||
|
||||
/* Need to reset PHY -> 500ms reset */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
AT91_RSTC_ERSTL | (0x0D << 8) |
|
||||
AT91_RSTC_URSTEN);
|
||||
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(13) |
|
||||
AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr);
|
||||
|
||||
/* Wait for end hardware reset */
|
||||
while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
|
||||
|
||||
while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL))
|
||||
;
|
||||
/* Restore NRST value */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(rstc) |
|
||||
AT91_RSTC_URSTEN);
|
||||
writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN,
|
||||
&rstc->mr);
|
||||
|
||||
|
||||
/* Re-enable pull-up */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
@@ -129,23 +132,29 @@ static void afeb9260_macb_hw_init(void)
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUER);
|
||||
&pioa->puer);
|
||||
|
||||
at91_macb_hw_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
/* Enable clocks for all PIOs */
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
return 0;
|
||||
}
|
||||
int board_init(void)
|
||||
{
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
/* arch number of AT91SAM9260EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AFEB9260;
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
afeb9260_nand_hw_init();
|
||||
#endif
|
||||
@@ -159,8 +168,10 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
|
||||
gd->ram_size = get_ram_size(
|
||||
(void *)CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_SIZE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -174,7 +185,7 @@ int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0, (void *)AT91SAM9260_BASE_EMAC, 0x01);
|
||||
rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x01);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ int board_init(void)
|
||||
* Correct IRDA resistor problem
|
||||
* Set PA23_TXD in Output
|
||||
*/
|
||||
writel(AT91_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer);
|
||||
|
||||
/* arch number of AT91RM9200EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
|
||||
@@ -65,6 +65,6 @@ int dram_init (void)
|
||||
#ifdef CONFIG_DRIVER_AT91EMAC
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return at91emac_register(bis, (u32) AT91_EMAC_BASE);
|
||||
return at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_pio.h>
|
||||
|
||||
/* bit mask in PIO port B */
|
||||
#define GREEN_LED (1<<0)
|
||||
@@ -36,47 +38,47 @@
|
||||
|
||||
void green_LED_on(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(GREEN_LED, &pio->piob.codr);
|
||||
}
|
||||
|
||||
void yellow_LED_on(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(YELLOW_LED, &pio->piob.codr);
|
||||
}
|
||||
|
||||
void red_LED_on(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(RED_LED, &pio->piob.codr);
|
||||
}
|
||||
|
||||
void green_LED_off(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(GREEN_LED, &pio->piob.sodr);
|
||||
}
|
||||
|
||||
void yellow_LED_off(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(YELLOW_LED, &pio->piob.sodr);
|
||||
}
|
||||
|
||||
void red_LED_off(void)
|
||||
{
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
writel(RED_LED, &pio->piob.sodr);
|
||||
}
|
||||
|
||||
void coloured_LED_init (void)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO;
|
||||
|
||||
/* Enable PIOB clock */
|
||||
writel(1 << AT91_ID_PIOB, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOB, &pmc->pcer);
|
||||
|
||||
/* Disable peripherals on LEDs */
|
||||
writel(GREEN_LED | YELLOW_LED | RED_LED, &pio->piob.per);
|
||||
|
||||
@@ -23,17 +23,16 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/at91sam9260_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
|
||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
||||
#include <net.h>
|
||||
# include <net.h>
|
||||
#endif
|
||||
#include <netdev.h>
|
||||
|
||||
@@ -47,49 +46,53 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
static void at91sam9260ek_nand_hw_init(void)
|
||||
{
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
unsigned long csa;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA,
|
||||
csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
/* Assign CS3 to NAND/SmartMedia Interface */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
at91_sys_write(AT91_SMC_SETUP(3),
|
||||
AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) |
|
||||
AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0));
|
||||
at91_sys_write(AT91_SMC_PULSE(3),
|
||||
AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
|
||||
AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
|
||||
at91_sys_write(AT91_SMC_CYCLE(3),
|
||||
AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
|
||||
at91_sys_write(AT91_SMC_MODE(3),
|
||||
AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
|
||||
AT91_SMC_EXNWMODE_DISABLE |
|
||||
writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
|
||||
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
#ifdef CONFIG_SYS_NAND_DBW_16
|
||||
AT91_SMC_DBW_16 |
|
||||
AT91_SMC_MODE_DBW_16 |
|
||||
#else /* CONFIG_SYS_NAND_DBW_8 */
|
||||
AT91_SMC_DBW_8 |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
#endif
|
||||
AT91_SMC_TDF_(2));
|
||||
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
|
||||
AT91_SMC_MODE_TDF_CYCLE(2),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
|
||||
/* Enable NandFlash */
|
||||
at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACB
|
||||
static void at91sam9260ek_macb_hw_init(void)
|
||||
{
|
||||
unsigned long rstc;
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
|
||||
struct at91_rstc *rstc = (struct at91_rstc *)ATMEL_BASE_RSTC;
|
||||
unsigned long erstl;
|
||||
|
||||
/* Enable clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
|
||||
/* Enable EMAC clock */
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/*
|
||||
* Disable pull-up on:
|
||||
@@ -103,48 +106,57 @@ static void at91sam9260ek_macb_hw_init(void)
|
||||
* PHY has internal pull-down
|
||||
*/
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUDR);
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
&pioa->pudr);
|
||||
|
||||
rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
|
||||
erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK;
|
||||
|
||||
/* Need to reset PHY -> 500ms reset */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(AT91_RSTC_ERSTL & (0x0D << 8)) |
|
||||
AT91_RSTC_URSTEN);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(13) |
|
||||
AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr);
|
||||
|
||||
/* Wait for end hardware reset */
|
||||
while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
|
||||
while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL))
|
||||
;
|
||||
|
||||
/* Restore NRST value */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(rstc) |
|
||||
AT91_RSTC_URSTEN);
|
||||
writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN,
|
||||
&rstc->mr);
|
||||
|
||||
/* Re-enable pull-up */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
pin_to_controller(AT91_PIN_PA0) + PIO_PUER);
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA17) |
|
||||
pin_to_mask(AT91_PIN_PA25) |
|
||||
pin_to_mask(AT91_PIN_PA26) |
|
||||
pin_to_mask(AT91_PIN_PA28),
|
||||
&pioa->puer);
|
||||
|
||||
/* Initialize EMAC=MACB hardware */
|
||||
at91_macb_hw_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable clocks for all PIOs */
|
||||
writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* Enable Ctrlc */
|
||||
console_init_f();
|
||||
|
||||
#ifdef CONFIG_AT91SAM9G20EK
|
||||
/* arch number of AT91SAM9260EK-Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
|
||||
@@ -153,9 +165,9 @@ int board_init(void)
|
||||
gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
|
||||
#endif
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
at91sam9260ek_nand_hw_init();
|
||||
#endif
|
||||
@@ -171,8 +183,9 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
|
||||
gd->ram_size = get_ram_size(
|
||||
(void *)CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -186,7 +199,7 @@ int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0, (void *)AT91SAM9260_BASE_EMAC, 0x00);
|
||||
rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x00);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x23f00000
|
||||
@@ -23,16 +23,12 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
|
||||
void coloured_LED_init(void)
|
||||
{
|
||||
/* Enable clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOA);
|
||||
|
||||
/* Clock is enabled in board_early_init_f() */
|
||||
at91_set_gpio_output(CONFIG_RED_LED, 1);
|
||||
at91_set_gpio_output(CONFIG_GREEN_LED, 1);
|
||||
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --dma 6
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
|
||||
|
||||
53
board/bluewater/snapper9260/Makefile
Normal file
53
board/bluewater/snapper9260/Makefile
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
# (C) Copyright 2003-2008
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# (C) Copyright 2011 Bluewater Systems
|
||||
# Ryan Mallon <ryan@bluewatersys.com>
|
||||
#
|
||||
# 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).o
|
||||
|
||||
COBJS-y += snapper9260.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS-y))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||
$(call cmd_link_o_target, $(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
|
||||
|
||||
#########################################################################
|
||||
169
board/bluewater/snapper9260/snapper9260.c
Normal file
169
board/bluewater/snapper9260/snapper9260.c
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Bluewater Systems Snapper 9260/9G20 modules
|
||||
*
|
||||
* (C) Copyright 2011 Bluewater Systems
|
||||
* Author: Andre Renaud <andre@bluewatersys.com>
|
||||
* Author: Ryan Mallon <ryan@bluewatersys.com>
|
||||
*
|
||||
* 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/io.h>
|
||||
#include <asm/arch/at91sam9260_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <net.h>
|
||||
#include <netdev.h>
|
||||
#include <i2c.h>
|
||||
#include <pca953x.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* IO Expander pins */
|
||||
#define IO_EXP_ETH_RESET (0 << 1)
|
||||
#define IO_EXP_ETH_POWER (1 << 1)
|
||||
|
||||
static void macb_hw_init(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
|
||||
struct at91_rstc *rstc = (struct at91_rstc *)ATMEL_BASE_RSTC;
|
||||
unsigned long erstl;
|
||||
|
||||
/* Enable clock */
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/* Disable pull-ups to prevent PHY going into test mode */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA18),
|
||||
&pioa->pudr);
|
||||
|
||||
/* Power down ethernet */
|
||||
pca953x_set_dir(0x28, IO_EXP_ETH_POWER, PCA953X_DIR_OUT);
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_POWER, 1);
|
||||
|
||||
/* Hold ethernet in reset */
|
||||
pca953x_set_dir(0x28, IO_EXP_ETH_RESET, PCA953X_DIR_OUT);
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_RESET, 0);
|
||||
|
||||
/* Enable ethernet power */
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_POWER, 0);
|
||||
|
||||
/* Need to reset PHY -> 500ms reset */
|
||||
erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK;
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(13) |
|
||||
AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr);
|
||||
|
||||
/* Wait for end hardware reset */
|
||||
while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL))
|
||||
;
|
||||
|
||||
/* Restore NRST value */
|
||||
writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN, &rstc->mr);
|
||||
|
||||
/* Bring the ethernet out of reset */
|
||||
pca953x_set_val(0x28, IO_EXP_ETH_RESET, 1);
|
||||
|
||||
/* The phy internal reset take 21ms */
|
||||
udelay(21 * 1000);
|
||||
|
||||
/* Re-enable pull-up */
|
||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
||||
pin_to_mask(AT91_PIN_PA15) |
|
||||
pin_to_mask(AT91_PIN_PA18),
|
||||
&pioa->puer);
|
||||
|
||||
at91_macb_hw_init();
|
||||
}
|
||||
|
||||
static void nand_hw_init(void)
|
||||
{
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
unsigned long csa;
|
||||
|
||||
/* Enable CS3 as NAND/SmartMedia */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
writel(AT91_SMC_SETUP_NWE(2) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(2) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(4) | AT91_SMC_PULSE_NCS_WR(4) |
|
||||
AT91_SMC_PULSE_NRD(4) | AT91_SMC_PULSE_NCS_RD(4),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(7) | AT91_SMC_CYCLE_NRD(7),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
AT91_SMC_MODE_TDF_CYCLE(3),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
|
||||
/* Enable NandFlash */
|
||||
at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable PIO clocks */
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC), &pmc->pcer);
|
||||
|
||||
/* The mach-type is the same for both Snapper 9260 and 9G20 */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_SNAPPER_9260;
|
||||
|
||||
/* Address of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
/* Initialise peripherals */
|
||||
at91_seriald_hw_init();
|
||||
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
|
||||
nand_hw_init();
|
||||
macb_hw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x1f);
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void reset_phy(void)
|
||||
{
|
||||
}
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --dma 6
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0xa0000000
|
||||
|
||||
# PLATFORM_CPPFLAGS += -DDEBUG
|
||||
@@ -31,7 +31,8 @@
|
||||
#include <mmc.h>
|
||||
#include <i2c.h>
|
||||
#include <spi.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91sam9260_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
@@ -39,35 +40,35 @@
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/at91_shdwn.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
static void nand_hw_init(void)
|
||||
{
|
||||
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
|
||||
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
|
||||
unsigned long csa;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA,
|
||||
csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
/* Assign CS3 to NAND/SmartMedia Interface */
|
||||
csa = readl(&matrix->ebicsa);
|
||||
csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA;
|
||||
writel(csa, &matrix->ebicsa);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
at91_sys_write(AT91_SMC_SETUP(3),
|
||||
AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) |
|
||||
AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0));
|
||||
at91_sys_write(AT91_SMC_PULSE(3),
|
||||
AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
|
||||
AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
|
||||
at91_sys_write(AT91_SMC_CYCLE(3),
|
||||
AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
|
||||
at91_sys_write(AT91_SMC_MODE(3),
|
||||
AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
|
||||
AT91_SMC_EXNWMODE_DISABLE |
|
||||
AT91_SMC_DBW_8 |
|
||||
AT91_SMC_TDF_(2));
|
||||
writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
|
||||
AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
|
||||
&smc->cs[3].setup);
|
||||
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
|
||||
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
|
||||
&smc->cs[3].pulse);
|
||||
writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
|
||||
&smc->cs[3].cycle);
|
||||
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
|
||||
AT91_SMC_MODE_EXNW_DISABLE |
|
||||
AT91_SMC_MODE_DBW_8 |
|
||||
AT91_SMC_MODE_TDF_CYCLE(2),
|
||||
&smc->cs[3].mode);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
@@ -80,8 +81,10 @@ static void nand_hw_init(void)
|
||||
#ifdef CONFIG_MACB
|
||||
static void macb_hw_init(void)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable EMAC clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
/* Initialize EMAC=MACB hardware */
|
||||
at91_macb_hw_init();
|
||||
@@ -92,14 +95,16 @@ static void macb_hw_init(void)
|
||||
/* this is a weak define that we are overriding */
|
||||
int board_mmc_init(bd_t *bd)
|
||||
{
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable MCI clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
|
||||
writel(1 << ATMEL_ID_MCI, &pmc->pcer);
|
||||
|
||||
/* Initialize MCI hardware */
|
||||
at91_mci_hw_init();
|
||||
|
||||
/* This calls the atmel_mmc_init in gen_atmel_mci.c */
|
||||
return atmel_mci_init((void *)AT91_BASE_MCI);
|
||||
return atmel_mci_init((void *)ATMEL_BASE_MCI);
|
||||
}
|
||||
|
||||
/* this is a weak define that we are overriding */
|
||||
@@ -120,7 +125,8 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_shdwn *shdwn = (struct at91_shdwn *)AT91_SHDWN_BASE;
|
||||
struct at91_shdwn *shdwn = (struct at91_shdwn *)ATMEL_BASE_SHDWN;
|
||||
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
|
||||
|
||||
/*
|
||||
* make sure the board can be powered on by
|
||||
@@ -130,9 +136,9 @@ int board_early_init_f(void)
|
||||
&shdwn->mr);
|
||||
|
||||
/* Enable clocks for all PIOs */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOA);
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOB);
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
|
||||
writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
|
||||
/* set SCL0 and SDA0 to open drain */
|
||||
at91_set_pio_output(I2C0_PORT, SCL0_PIN, 1);
|
||||
@@ -159,7 +165,7 @@ int board_init(void)
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
nand_hw_init();
|
||||
#endif
|
||||
@@ -211,7 +217,7 @@ int board_eth_init(bd_t *bis)
|
||||
int num = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0,
|
||||
(void *)AT91_EMAC_BASE,
|
||||
(void *)ATMEL_BASE_EMAC0,
|
||||
CONFIG_SYS_PHY_ID);
|
||||
if (!rc)
|
||||
num++;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Lead Tech Design <www.leadtechdesign.com>
|
||||
* Ilko Iliev <www.ronetix.at>
|
||||
*
|
||||
* (C) Copyright 2009
|
||||
* (C) Copyright 2009-2011
|
||||
* Eric Benard <eric@eukrea.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
@@ -27,16 +27,15 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/sizes.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_matrix.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/at91_matrix.h>
|
||||
#include <asm/arch/at91_pio.h>
|
||||
#include <asm/arch/clk.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
||||
#include <net.h>
|
||||
@@ -54,9 +53,9 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
static void cpu9260_nand_hw_init(void)
|
||||
{
|
||||
unsigned long csa;
|
||||
at91_smc_t *smc = (at91_smc_t *) AT91_SMC_BASE;
|
||||
at91_matrix_t *matrix = (at91_matrix_t *) AT91_MATRIX_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_smc_t *smc = (at91_smc_t *) ATMEL_BASE_SMC;
|
||||
at91_matrix_t *matrix = (at91_matrix_t *) ATMEL_BASE_MATRIX;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = readl(&matrix->csa) | AT91_MATRIX_CSA_EBI_CS3A;
|
||||
@@ -93,7 +92,7 @@ static void cpu9260_nand_hw_init(void)
|
||||
&smc->cs[3].mode);
|
||||
#endif
|
||||
|
||||
writel(1 << AT91SAM9260_ID_PIOC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
@@ -107,11 +106,11 @@ static void cpu9260_nand_hw_init(void)
|
||||
static void cpu9260_macb_hw_init(void)
|
||||
{
|
||||
unsigned long rstcmr;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_rstc_t *rstc = (at91_rstc_t *) AT91_RSTC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_rstc_t *rstc = (at91_rstc_t *) ATMEL_BASE_RSTC;
|
||||
|
||||
/* Enable clock */
|
||||
writel(1 << AT91SAM9260_ID_EMAC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
|
||||
|
||||
at91_set_pio_pullup(AT91_PIO_PORTA, 17, 1);
|
||||
|
||||
@@ -136,14 +135,14 @@ static void cpu9260_macb_hw_init(void)
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
writel((1 << AT91SAM9260_ID_PIOA) |
|
||||
(1 << AT91SAM9260_ID_PIOC) |
|
||||
(1 << AT91SAM9260_ID_PIOB),
|
||||
writel((1 << ATMEL_ID_PIOA) |
|
||||
(1 << ATMEL_ID_PIOB) |
|
||||
(1 << ATMEL_ID_PIOC),
|
||||
&pmc->pcer);
|
||||
|
||||
at91_serial_hw_init();
|
||||
at91_seriald_hw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -184,7 +183,7 @@ int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0, (void *)AT91_EMAC_BASE, 0);
|
||||
rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
static unsigned int saved_state[4] = {STATUS_LED_OFF, STATUS_LED_OFF,
|
||||
STATUS_LED_OFF, STATUS_LED_OFF};
|
||||
|
||||
void coloured_LED_init(void)
|
||||
{
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
/* Enable clock */
|
||||
writel(1 << AT91SAM9260_ID_PIOC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
|
||||
|
||||
at91_set_pio_output(CONFIG_RED_LED, 1);
|
||||
at91_set_pio_output(CONFIG_GREEN_LED, 1);
|
||||
|
||||
@@ -63,7 +63,7 @@ int dram_init(void)
|
||||
#ifdef CONFIG_DRIVER_AT91EMAC
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
return at91emac_register(bis, (u32) AT91_EMAC_BASE);
|
||||
return at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -71,8 +71,8 @@ int board_eth_init(bd_t *bis)
|
||||
void i2c_init_board(void)
|
||||
{
|
||||
u32 pin;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
|
||||
writel(1 << AT91_ID_PIOA, &pmc->pcer);
|
||||
pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x87f00000
|
||||
@@ -28,15 +28,21 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init (void)
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
}
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -94,6 +100,11 @@ int board_init (void)
|
||||
readb(CS4_BASE + 8);
|
||||
readb(CS4_BASE + 7);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX31ADS; /* board id for linux */
|
||||
gd->bd->bi_boot_params = 0x80000100; /* adress of boot parameters */
|
||||
|
||||
|
||||
@@ -48,23 +48,47 @@ SECTIONS
|
||||
|
||||
*(.text)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
.data : {
|
||||
*(.data)
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.got : { *(.got) }
|
||||
|
||||
. = .;
|
||||
__u_boot_cmd_start = .;
|
||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||
__u_boot_cmd_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_start = .;
|
||||
.bss : { *(.bss) . = ALIGN(4); }
|
||||
__bss_end__ = .;
|
||||
|
||||
.rel.dyn : {
|
||||
__rel_dyn_start = .;
|
||||
*(.rel*)
|
||||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
.dynsym : {
|
||||
__dynsym_start = .;
|
||||
*(.dynsym)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
}
|
||||
|
||||
/DISCARD/ : { *(.bss*) }
|
||||
/DISCARD/ : { *(.dynstr*) }
|
||||
/DISCARD/ : { *(.dynsym*) }
|
||||
/DISCARD/ : { *(.dynamic*) }
|
||||
/DISCARD/ : { *(.hash*) }
|
||||
/DISCARD/ : { *(.plt*) }
|
||||
/DISCARD/ : { *(.interp*) }
|
||||
/DISCARD/ : { *(.gnu*) }
|
||||
}
|
||||
|
||||
@@ -308,7 +308,8 @@ int board_eth_init(bd_t *bis)
|
||||
* ft_codec_setup - fix up the clock-frequency property of the codec node
|
||||
*
|
||||
* Update the clock-frequency property based on the value of the 'audclk'
|
||||
* hwconfig option. If audclk is not specified, then default to 12.288MHz.
|
||||
* hwconfig option. If audclk is not specified, then don't write anything
|
||||
* to the device tree, because it means that the codec clock is disabled.
|
||||
*/
|
||||
static void ft_codec_setup(void *blob, const char *compatible)
|
||||
{
|
||||
@@ -317,12 +318,15 @@ static void ft_codec_setup(void *blob, const char *compatible)
|
||||
u32 freq;
|
||||
|
||||
audclk = hwconfig_arg("audclk", &arglen);
|
||||
if (audclk && (strncmp(audclk, "11", 2) == 0))
|
||||
freq = 11289600;
|
||||
else
|
||||
freq = 12288000;
|
||||
if (audclk) {
|
||||
if (strncmp(audclk, "11", 2) == 0)
|
||||
freq = 11289600;
|
||||
else
|
||||
freq = 12288000;
|
||||
|
||||
do_fixup_by_compat_u32(blob, compatible, "clock-frequency", freq, 1);
|
||||
do_fixup_by_compat_u32(blob, compatible, "clock-frequency",
|
||||
freq, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ft_board_setup(void *blob, bd_t *bd)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x87f00000
|
||||
@@ -30,15 +30,24 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_PCM037; /* board id for linux */
|
||||
gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
__REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */
|
||||
__REG(CSCR_L(0)) = 0x10000d03;
|
||||
@@ -62,9 +71,6 @@ int board_init (void)
|
||||
mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
|
||||
mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_PCM037; /* board id for linux */
|
||||
gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# with relocation CONFIG_SYS_TEXT_BASE can be anything, and making it 0
|
||||
# makes relative and absolute relocation fixups interchangeable.
|
||||
#CONFIG_SYS_TEXT_BASE = 0
|
||||
|
||||
CONFIG_SYS_TEXT_BASE = 0xc0000000
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0xa0000000
|
||||
@@ -29,21 +29,21 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
dram_init_banksize (void)
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
}
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
__REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */
|
||||
__REG(CSCR_L(0)) = 0xa0330d01;
|
||||
@@ -71,6 +71,11 @@ int board_init (void)
|
||||
/* start SPI2 clock */
|
||||
__REG(CCM_CGR2) = __REG(CCM_CGR2) | (3 << 4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX31LITE; /* board id for linux */
|
||||
gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#
|
||||
# board/mx1ads/config.mk
|
||||
#
|
||||
# (c) Copyright 2004
|
||||
# Techware Information Technology, Inc.
|
||||
# http://www.techware.com.tw/
|
||||
#
|
||||
# Ming-Len Wu <minglen_wu@techware.com.tw>
|
||||
#
|
||||
# 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
|
||||
|
||||
CONFIG_SYS_TEXT_BASE = 0x08400000
|
||||
@@ -78,7 +78,7 @@ void SetAsynchMode (void)
|
||||
|
||||
static u32 mc9328sid;
|
||||
|
||||
int board_init (void)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
volatile unsigned int tmp;
|
||||
|
||||
@@ -112,10 +112,6 @@ int board_init (void)
|
||||
|
||||
SetAsynchMode ();
|
||||
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX1ADS;
|
||||
|
||||
gd->bd->bi_boot_params = 0x08000100; /* adress of boot parameters */
|
||||
|
||||
icache_enable ();
|
||||
dcache_enable ();
|
||||
|
||||
@@ -133,6 +129,15 @@ int board_init (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_arch_number = MACH_TYPE_MX1ADS;
|
||||
|
||||
gd->bd->bi_boot_params = 0x08000100; /* adress of boot parameters */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_late_init (void)
|
||||
{
|
||||
|
||||
@@ -161,12 +166,18 @@ int board_late_init (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init (void)
|
||||
int dram_init(void)
|
||||
{
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_NET
|
||||
|
||||
@@ -67,6 +67,8 @@ SECTIONS
|
||||
*(.dynsym)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
CFLAGS_lib += -O2
|
||||
CFLAGS_lib/lzma += -O2
|
||||
CFLAGS_lib/zlib += -O2
|
||||
|
||||
# Set some default LDR flags based on boot mode.
|
||||
LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
|
||||
|
||||
@@ -74,6 +74,15 @@ omap1510inn arm arm925t - ti
|
||||
aspenite arm arm926ejs - Marvell armada100
|
||||
afeb9260 arm arm926ejs - - at91
|
||||
at91cap9adk arm arm926ejs - atmel at91
|
||||
at91sam9260ek_nandflash arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9260,SYS_USE_NANDFLASH
|
||||
at91sam9260ek_dataflash_cs0 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9260,SYS_USE_DATAFLASH_CS0
|
||||
at91sam9260ek_dataflash_cs1 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9260,SYS_USE_DATAFLASH_CS1
|
||||
at91sam9g20ek_nandflash arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9G20,SYS_USE_NANDFLASH
|
||||
at91sam9g20ek_dataflash_cs0 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS0
|
||||
at91sam9g20ek_dataflash_cs1 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS1
|
||||
at91sam9xeek_nandflash arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_NANDFLASH
|
||||
at91sam9xeek_dataflash_cs0 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS0
|
||||
at91sam9xeek_dataflash_cs1 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS1
|
||||
snapper9260 arm arm926ejs - bluewater at91 snapper9260:AT91SAM9260
|
||||
snapper9g20 arm arm926ejs snapper9260 bluewater at91 snapper9260:AT91SAM9G20
|
||||
cpu9260 arm arm926ejs cpu9260 eukrea at91 cpu9260:CPU9260
|
||||
|
||||
@@ -342,34 +342,34 @@ static int at91emac_init(struct eth_device *netdev, bd_t *bd)
|
||||
u32 value;
|
||||
emac_device *dev;
|
||||
at91_emac_t *emac;
|
||||
at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
|
||||
emac = (at91_emac_t *) netdev->iobase;
|
||||
dev = (emac_device *) netdev->priv;
|
||||
|
||||
/* PIO Disable Register */
|
||||
value = AT91_PMX_AA_EMDIO | AT91_PMX_AA_EMDC |
|
||||
AT91_PMX_AA_ERXER | AT91_PMX_AA_ERX1 |
|
||||
AT91_PMX_AA_ERX0 | AT91_PMX_AA_ECRS |
|
||||
AT91_PMX_AA_ETX1 | AT91_PMX_AA_ETX0 |
|
||||
AT91_PMX_AA_ETXEN | AT91_PMX_AA_EREFCK;
|
||||
value = ATMEL_PMX_AA_EMDIO | ATMEL_PMX_AA_EMDC |
|
||||
ATMEL_PMX_AA_ERXER | ATMEL_PMX_AA_ERX1 |
|
||||
ATMEL_PMX_AA_ERX0 | ATMEL_PMX_AA_ECRS |
|
||||
ATMEL_PMX_AA_ETX1 | ATMEL_PMX_AA_ETX0 |
|
||||
ATMEL_PMX_AA_ETXEN | ATMEL_PMX_AA_EREFCK;
|
||||
|
||||
writel(value, &pio->pioa.pdr);
|
||||
writel(value, &pio->pioa.asr);
|
||||
|
||||
#ifdef CONFIG_RMII
|
||||
value = AT91_PMX_BA_ERXCK;
|
||||
value = ATMEL_PMX_BA_ERXCK;
|
||||
#else
|
||||
value = AT91_PMX_BA_ERXCK | AT91_PMX_BA_ECOL |
|
||||
AT91_PMX_BA_ERXDV | AT91_PMX_BA_ERX3 |
|
||||
AT91_PMX_BA_ERX2 | AT91_PMX_BA_ETXER |
|
||||
AT91_PMX_BA_ETX3 | AT91_PMX_BA_ETX2;
|
||||
value = ATMEL_PMX_BA_ERXCK | ATMEL_PMX_BA_ECOL |
|
||||
ATMEL_PMX_BA_ERXDV | ATMEL_PMX_BA_ERX3 |
|
||||
ATMEL_PMX_BA_ERX2 | ATMEL_PMX_BA_ETXER |
|
||||
ATMEL_PMX_BA_ETX3 | ATMEL_PMX_BA_ETX2;
|
||||
#endif
|
||||
writel(value, &pio->piob.pdr);
|
||||
writel(value, &pio->piob.bsr);
|
||||
|
||||
writel(1 << AT91_ID_EMAC, &pmc->pcer);
|
||||
writel(1 << ATMEL_ID_EMAC, &pmc->pcer);
|
||||
writel(readl(&emac->ctl) | AT91_EMAC_CTL_CSR, &emac->ctl);
|
||||
|
||||
/* Init Ethernet buffers */
|
||||
@@ -476,16 +476,18 @@ static int at91emac_write_hwaddr(struct eth_device *netdev)
|
||||
{
|
||||
emac_device *dev;
|
||||
at91_emac_t *emac;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
|
||||
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
|
||||
emac = (at91_emac_t *) netdev->iobase;
|
||||
dev = (emac_device *) netdev->priv;
|
||||
|
||||
writel(1 << AT91_ID_EMAC, &pmc->pcer);
|
||||
DEBUG_AT91EMAC("init MAC-ADDR %x%x \n",
|
||||
cpu_to_le16(*((u16 *)(netdev->enetaddr + 4))),
|
||||
cpu_to_le32(*((u32 *)netdev->enetaddr)));
|
||||
writel(cpu_to_le32(*((u32 *)netdev->enetaddr)), &emac->sa2l);
|
||||
writel(cpu_to_le16(*((u16 *)(netdev->enetaddr + 4))), &emac->sa2h);
|
||||
writel(1 << ATMEL_ID_EMAC, &pmc->pcer);
|
||||
DEBUG_AT91EMAC("init MAC-ADDR %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
netdev->enetaddr[5], netdev->enetaddr[4], netdev->enetaddr[3],
|
||||
netdev->enetaddr[2], netdev->enetaddr[1], netdev->enetaddr[0]);
|
||||
writel( (netdev->enetaddr[0] | netdev->enetaddr[1] << 8 |
|
||||
netdev->enetaddr[2] << 16 | netdev->enetaddr[3] << 24),
|
||||
&emac->sa2l);
|
||||
writel((netdev->enetaddr[4] | netdev->enetaddr[5] << 8), &emac->sa2h);
|
||||
DEBUG_AT91EMAC("init MAC-ADDR %x%x \n",
|
||||
readl(&emac->sa2h), readl(&emac->sa2l));
|
||||
return 0;
|
||||
@@ -498,7 +500,7 @@ int at91emac_register(bd_t *bis, unsigned long iobase)
|
||||
struct eth_device *dev;
|
||||
|
||||
if (iobase == 0)
|
||||
iobase = AT91_EMAC_BASE;
|
||||
iobase = ATMEL_BASE_EMAC;
|
||||
emac = malloc(sizeof(*emac)+512);
|
||||
if (emac == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -522,9 +522,10 @@ static int macb_write_hwaddr(struct eth_device *dev)
|
||||
u16 hwaddr_top;
|
||||
|
||||
/* set hardware address */
|
||||
hwaddr_bottom = cpu_to_le32(*((u32 *)dev->enetaddr));
|
||||
hwaddr_bottom = dev->enetaddr[0] | dev->enetaddr[1] << 8 |
|
||||
dev->enetaddr[2] << 16 | dev->enetaddr[3] << 24;
|
||||
macb_writel(macb, SA1B, hwaddr_bottom);
|
||||
hwaddr_top = cpu_to_le16(*((u16 *)(dev->enetaddr + 4)));
|
||||
hwaddr_top = dev->enetaddr[4] | dev->enetaddr[5] << 8;
|
||||
macb_writel(macb, SA1T, hwaddr_top);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,9 @@
|
||||
|
||||
#include <common.h>
|
||||
#ifndef CONFIG_AT91_LEGACY
|
||||
# define CONFIG_ATMEL_LEGACY
|
||||
# define CONFIG_AT91_LEGACY
|
||||
# warning Please update to use C structure SoC access !
|
||||
#endif
|
||||
#include <common.h>
|
||||
#include <spi.h>
|
||||
#include <malloc.h>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/* i.MX27 has a completely wrong register layout and register definitions in the
|
||||
* datasheet, the correct one is in the Freescale's Linux driver */
|
||||
|
||||
#error "i.MX27 CSPI not supported due to drastic differences in register definisions" \
|
||||
#error "i.MX27 CSPI not supported due to drastic differences in register definitions" \
|
||||
"See linux mxc_spi driver from Freescale for details."
|
||||
|
||||
#elif defined(CONFIG_MX31)
|
||||
|
||||
@@ -25,17 +25,21 @@
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
#define CONFIG_AT91SAM9260 /* Atmel AT91SAM9260 SoC*/
|
||||
#include <asm/arch/hardware.h>
|
||||
|
||||
#define CONFIG_AT91_LEGACY
|
||||
#define CONFIG_SYS_TEXT_BASE 0x21f00000
|
||||
|
||||
/* ARM asynchronous clock */
|
||||
#define CONFIG_SYS_AT91_MAIN_CLOCK 18429952 /* from 18.432 MHz crystal */
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
#define CONFIG_AT91SAM9260 1 /* It's an Atmel AT91SAM9260 SoC*/
|
||||
#define CONFIG_AFEB9260 1 /* on an AFEB9260 Board */
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
|
||||
#define CONFIG_AFEB9260 /* AFEB9260 Board */
|
||||
#define CONFIG_ARCH_CPU_INIT
|
||||
#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
|
||||
|
||||
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
|
||||
#define CONFIG_SETUP_MEMORY_TAGS 1
|
||||
@@ -46,12 +50,14 @@
|
||||
/*
|
||||
* Hardware drivers
|
||||
*/
|
||||
#define CONFIG_AT91_GPIO 1
|
||||
#define CONFIG_ATMEL_USART 1
|
||||
#undef CONFIG_USART0
|
||||
#undef CONFIG_USART1
|
||||
#undef CONFIG_USART2
|
||||
#define CONFIG_USART3 1 /* USART 3 is DBGU */
|
||||
#define CONFIG_ATMEL_LEGACY
|
||||
#define CONFIG_AT91_GPIO
|
||||
#define CONFIG_AT91_PULLUP 1
|
||||
|
||||
#define CONFIG_ATMEL_USART
|
||||
#define CONFIG_USART_BASE ATMEL_BASE_DBGU
|
||||
#define CONFIG_USART_ID ATMEL_ID_SYS
|
||||
#define CONFIG_USART3 /* USART 3 is DBGU */
|
||||
|
||||
#define CONFIG_BOOTDELAY 3
|
||||
|
||||
@@ -74,20 +80,20 @@
|
||||
#undef CONFIG_CMD_LOADS
|
||||
#undef CONFIG_CMD_SOURCE
|
||||
|
||||
#define CONFIG_CMD_PING 1
|
||||
#define CONFIG_CMD_DHCP 1
|
||||
#define CONFIG_CMD_PING
|
||||
#define CONFIG_CMD_DHCP
|
||||
|
||||
#define CONFIG_CMD_NAND 1
|
||||
#define CONFIG_CMD_USB 1
|
||||
#define CONFIG_CMD_NAND
|
||||
#define CONFIG_CMD_USB
|
||||
|
||||
/* SDRAM */
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM 0x20000000
|
||||
#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
|
||||
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
|
||||
#define CONFIG_SYS_SDRAM_SIZE 0x04000000 /* 64 megs */
|
||||
|
||||
/* DataFlash */
|
||||
#define CONFIG_ATMEL_DATAFLASH_SPI
|
||||
#define CONFIG_HAS_DATAFLASH 1
|
||||
#define CONFIG_HAS_DATAFLASH
|
||||
#define CONFIG_SYS_SPI_WRITE_TOUT (5 * CONFIG_SYS_HZ)
|
||||
#define CONFIG_SYS_MAX_DATAFLASH_BANKS 2
|
||||
#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 /* CS0 */
|
||||
@@ -100,8 +106,8 @@
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
#define CONFIG_NAND_ATMEL
|
||||
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
||||
#define CONFIG_SYS_NAND_BASE 0x40000000
|
||||
#define CONFIG_SYS_NAND_DBW_8 1
|
||||
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
|
||||
#define CONFIG_SYS_NAND_DBW_8
|
||||
/* our ALE is AD21 */
|
||||
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
|
||||
/* our CLE is AD22 */
|
||||
@@ -112,37 +118,36 @@
|
||||
#endif
|
||||
|
||||
/* NOR flash - no real flash on this board */
|
||||
#define CONFIG_SYS_NO_FLASH 1
|
||||
#define CONFIG_SYS_NO_FLASH
|
||||
|
||||
/* Ethernet */
|
||||
#define CONFIG_MACB 1
|
||||
#undef CONFIG_RMII /* We have full MII there */
|
||||
#define CONFIG_RESET_PHY_R 1
|
||||
#define CONFIG_MACB
|
||||
#define CONFIG_RESET_PHY_R
|
||||
|
||||
#define CONFIG_NET_MULTI 1
|
||||
#define CONFIG_NET_MULTI
|
||||
#define CONFIG_NET_RETRY_COUNT 20
|
||||
|
||||
/* USB */
|
||||
#define CONFIG_USB_ATMEL
|
||||
#define CONFIG_USB_OHCI_NEW 1
|
||||
#define CONFIG_DOS_PARTITION 1
|
||||
#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
|
||||
#define CONFIG_USB_OHCI_NEW
|
||||
#define CONFIG_DOS_PARTITION
|
||||
#define CONFIG_SYS_USB_OHCI_CPU_INIT
|
||||
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9260_UHP_BASE */
|
||||
#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
|
||||
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
|
||||
#define CONFIG_USB_STORAGE 1
|
||||
#define CONFIG_USB_STORAGE
|
||||
|
||||
#define CONFIG_SYS_LOAD_ADDR 0x21000000 /* load address */
|
||||
|
||||
#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
|
||||
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
|
||||
#define CONFIG_SYS_MEMTEST_END 0x21e00000
|
||||
|
||||
#undef CONFIG_SYS_USE_DATAFLASH_CS0
|
||||
#define CONFIG_SYS_USE_DATAFLASH_CS1 1
|
||||
#undef CONFIG_SYS_USE_NANDFLASH
|
||||
#define CONFIG_SYS_USE_DATAFLASH_CS1
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (ATMEL_BASE_SRAM1 + 0x1000 -\
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
|
||||
/* bootstrap + u-boot + env + linux in dataflash on CS1 */
|
||||
#define CONFIG_ENV_IS_IN_DATAFLASH 1
|
||||
#define CONFIG_ENV_IS_IN_DATAFLASH
|
||||
#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
|
||||
#define CONFIG_ENV_OFFSET 0x4200
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
|
||||
@@ -159,8 +164,8 @@
|
||||
#define CONFIG_SYS_CBSIZE 256
|
||||
#define CONFIG_SYS_MAXARGS 16
|
||||
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
|
||||
#define CONFIG_SYS_LONGHELP 1
|
||||
#define CONFIG_CMDLINE_EDITING 1
|
||||
#define CONFIG_SYS_LONGHELP
|
||||
#define CONFIG_CMDLINE_EDITING
|
||||
|
||||
/*
|
||||
* Size of malloc() pool
|
||||
@@ -172,5 +177,4 @@
|
||||
#ifdef CONFIG_USE_IRQ
|
||||
#error CONFIG_USE_IRQ not supported
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
/* CPU configuration */
|
||||
#define CONFIG_ARM920T
|
||||
#define CONFIG_AT91RM9200
|
||||
#define CONFIG_AT91RM9200EK
|
||||
#define CONFIG_CPUAT91
|
||||
@@ -71,8 +70,6 @@
|
||||
#define CONFIG_SETUP_MEMORY_TAGS
|
||||
#define CONFIG_INITRD_TAG
|
||||
|
||||
#define CONFIG_AT91FAMILY
|
||||
|
||||
/*
|
||||
* Memory Configuration
|
||||
*/
|
||||
@@ -172,7 +169,7 @@
|
||||
#define CONFIG_DOS_PARTITION 1
|
||||
|
||||
#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
|
||||
#define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE
|
||||
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_USB_HOST_BASE
|
||||
#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200"
|
||||
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
|
||||
|
||||
|
||||
@@ -27,38 +27,53 @@
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
#define CONFIG_AT91_LEGACY
|
||||
|
||||
/* ARM asynchronous clock */
|
||||
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
#define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
|
||||
|
||||
#ifdef CONFIG_AT91SAM9G20EK
|
||||
#define CONFIG_AT91SAM9G20 1 /* It's an Atmel AT91SAM9G20 SoC*/
|
||||
#else
|
||||
#define CONFIG_AT91SAM9260 1 /* It's an Atmel AT91SAM9260 SoC*/
|
||||
#endif
|
||||
|
||||
#define CONFIG_ARCH_CPU_INIT
|
||||
#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
|
||||
|
||||
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
|
||||
#define CONFIG_SETUP_MEMORY_TAGS 1
|
||||
#define CONFIG_INITRD_TAG 1
|
||||
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
/*
|
||||
* SoC must be defined first, before hardware.h is included.
|
||||
* In this case SoC is defined in boards.cfg.
|
||||
*/
|
||||
#include <asm/hardware.h>
|
||||
|
||||
/*
|
||||
* Hardware drivers
|
||||
* Warning: changing CONFIG_SYS_TEXT_BASE requires
|
||||
* adapting the initial boot program.
|
||||
* Since the linker has to swallow that define, we must use a pure
|
||||
* hex number here!
|
||||
*/
|
||||
#define CONFIG_AT91_GPIO 1
|
||||
#define CONFIG_ATMEL_USART 1
|
||||
#undef CONFIG_USART0
|
||||
#undef CONFIG_USART1
|
||||
#undef CONFIG_USART2
|
||||
#define CONFIG_USART3 1 /* USART 3 is DBGU */
|
||||
#define CONFIG_SYS_TEXT_BASE 0x21f00000
|
||||
|
||||
/* ARM asynchronous clock */
|
||||
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */
|
||||
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* main clock xtal */
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
/* Define actual evaluation board type from used processor type */
|
||||
#ifdef CONFIG_AT91SAM9G20
|
||||
# define CONFIG_AT91SAM9G20EK /* It's an Atmel AT91SAM9G20 EK */
|
||||
#else
|
||||
# define CONFIG_AT91SAM9260EK /* It's an Atmel AT91SAM9260 EK */
|
||||
#endif
|
||||
|
||||
/* Misc CPU related */
|
||||
#define CONFIG_ARCH_CPU_INIT
|
||||
#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
|
||||
#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
|
||||
#define CONFIG_SETUP_MEMORY_TAGS
|
||||
#define CONFIG_INITRD_TAG
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
|
||||
/* general purpose I/O */
|
||||
#define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
|
||||
#define CONFIG_AT91_GPIO
|
||||
#define CONFIG_AT91_GPIO_PULLUP 1 /* keep pullups on peripheral pins */
|
||||
|
||||
/* serial console */
|
||||
#define CONFIG_ATMEL_USART
|
||||
#define CONFIG_USART_BASE ATMEL_BASE_DBGU
|
||||
#define CONFIG_USART_ID ATMEL_ID_SYS
|
||||
#define CONFIG_BAUDRATE 115200
|
||||
#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
|
||||
|
||||
/* LED */
|
||||
#define CONFIG_AT91_LED
|
||||
@@ -91,10 +106,26 @@
|
||||
#define CONFIG_CMD_NAND 1
|
||||
#define CONFIG_CMD_USB 1
|
||||
|
||||
/* SDRAM */
|
||||
/*
|
||||
* SDRAM: 1 bank, min 32, max 128 MB
|
||||
* Initialized before u-boot gets started.
|
||||
*/
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM 0x20000000
|
||||
#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
|
||||
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
|
||||
#define CONFIG_SYS_SDRAM_SIZE 0x04000000
|
||||
|
||||
/*
|
||||
* Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM,
|
||||
* leaving the correct space for initial global data structure above
|
||||
* that address while providing maximum stack area below.
|
||||
*/
|
||||
#ifdef CONFIG_AT91SAM9XE
|
||||
# define CONFIG_SYS_INIT_SP_ADDR \
|
||||
(ATMEL_BASE_SRAM + 0x1000 - GENERATED_GBL_DATA_SIZE)
|
||||
#else
|
||||
# define CONFIG_SYS_INIT_SP_ADDR \
|
||||
(ATMEL_BASE_SRAM1 + 0x1000 - GENERATED_GBL_DATA_SIZE)
|
||||
#endif
|
||||
|
||||
/* DataFlash */
|
||||
#define CONFIG_ATMEL_DATAFLASH_SPI
|
||||
@@ -115,16 +146,13 @@
|
||||
/* NAND flash */
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
#define CONFIG_NAND_ATMEL
|
||||
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
||||
#define CONFIG_SYS_NAND_BASE 0x40000000
|
||||
#define CONFIG_SYS_NAND_DBW_8 1
|
||||
/* our ALE is AD21 */
|
||||
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
|
||||
/* our CLE is AD22 */
|
||||
#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
|
||||
#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14
|
||||
#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC13
|
||||
|
||||
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
||||
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
|
||||
#define CONFIG_SYS_NAND_DBW_8
|
||||
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
|
||||
#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
|
||||
#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14
|
||||
#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC13
|
||||
#endif
|
||||
|
||||
/* NOR flash - no real flash on this board */
|
||||
@@ -150,7 +178,7 @@
|
||||
|
||||
#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
|
||||
|
||||
#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
|
||||
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
|
||||
#define CONFIG_SYS_MEMTEST_END 0x23e00000
|
||||
|
||||
#ifdef CONFIG_SYS_USE_DATAFLASH_CS0
|
||||
@@ -198,9 +226,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
#define CONFIG_BAUDRATE 115200
|
||||
#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
|
||||
|
||||
#define CONFIG_SYS_PROMPT "U-Boot> "
|
||||
#define CONFIG_SYS_CBSIZE 256
|
||||
#define CONFIG_SYS_MAXARGS 16
|
||||
|
||||
@@ -113,12 +113,12 @@
|
||||
#define CONFIG_ENV_OFFSET 0x60000
|
||||
#define CONFIG_ENV_SIZE 0x20000
|
||||
#else
|
||||
/* The BF548-EZKIT uses a top boot flash */
|
||||
#define CONFIG_ENV_IS_IN_FLASH 1
|
||||
#define CONFIG_ENV_ADDR 0x20002000
|
||||
#define CONFIG_ENV_OFFSET 0x2000
|
||||
#define CONFIG_ENV_SIZE 0x2000
|
||||
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
|
||||
#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
|
||||
#define CONFIG_ENV_OFFSET (0x1000000 - CONFIG_ENV_SECT_SIZE)
|
||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
|
||||
#define CONFIG_ENV_SECT_SIZE 0x8000
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -80,27 +80,10 @@
|
||||
#define CONFIG_SYS_MAX_FLASH_SECT 135
|
||||
/* The BF561-EZKIT uses a top boot flash */
|
||||
#define CONFIG_ENV_IS_IN_FLASH 1
|
||||
#define CONFIG_ENV_OFFSET 0x4000
|
||||
#define CONFIG_ENV_OFFSET (0x800000 - CONFIG_ENV_SECT_SIZE)
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
|
||||
#define CONFIG_ENV_SIZE 0x2000
|
||||
#define CONFIG_ENV_SECT_SIZE 0x10000
|
||||
#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
|
||||
#define ENV_IS_EMBEDDED
|
||||
#else
|
||||
#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
|
||||
#endif
|
||||
#ifdef ENV_IS_EMBEDDED
|
||||
/* WARNING - the following is hand-optimized to fit within
|
||||
* the sector before the environment sector. If it throws
|
||||
* an error during compilation remove an object here to get
|
||||
* it linked after the configuration sector.
|
||||
*/
|
||||
# define LDS_BOARD_TEXT \
|
||||
arch/blackfin/lib/libblackfin.o (.text*); \
|
||||
arch/blackfin/cpu/libblackfin.o (.text*); \
|
||||
. = DEFINED(env_offset) ? env_offset : .; \
|
||||
common/env_embedded.o (.text*);
|
||||
#endif
|
||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
|
||||
#define CONFIG_ENV_SECT_SIZE 0x2000
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -89,13 +89,12 @@
|
||||
* Env Storage Settings
|
||||
*/
|
||||
#define CONFIG_ENV_IS_IN_FLASH 1
|
||||
#define CONFIG_ENV_OFFSET 0x4000
|
||||
#define CONFIG_ENV_SIZE 0x2000
|
||||
#define CONFIG_ENV_SECT_SIZE 0x20000
|
||||
#define CONFIG_ENV_OFFSET 0x8000
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
|
||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
|
||||
#define CONFIG_ENV_SECT_SIZE 0x8000
|
||||
#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
|
||||
#define ENV_IS_EMBEDDED
|
||||
#else
|
||||
#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
|
||||
#endif
|
||||
#ifdef ENV_IS_EMBEDDED
|
||||
/* WARNING - the following is hand-optimized to fit within
|
||||
@@ -127,7 +126,7 @@
|
||||
#define CONFIG_UART_CONSOLE 0
|
||||
#define CONFIG_BOOTCOMMAND "run flashboot"
|
||||
#define FLASHBOOT_ENV_SETTINGS \
|
||||
"flashboot=flread 20040000 1000000 300000;" \
|
||||
"flashboot=flread 20040000 1000000 3c0000;" \
|
||||
"bootm 0x1000000\0"
|
||||
|
||||
|
||||
|
||||
@@ -90,13 +90,12 @@
|
||||
* Env Storage Settings
|
||||
*/
|
||||
#define CONFIG_ENV_IS_IN_FLASH 1
|
||||
#define CONFIG_ENV_OFFSET 0x4000
|
||||
#define CONFIG_ENV_SIZE 0x2000
|
||||
#define CONFIG_ENV_SECT_SIZE 0x20000
|
||||
#define CONFIG_ENV_OFFSET 0x8000
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
|
||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
|
||||
#define CONFIG_ENV_SECT_SIZE 0x8000
|
||||
#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
|
||||
#define ENV_IS_EMBEDDED
|
||||
#else
|
||||
#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
|
||||
#endif
|
||||
#ifdef ENV_IS_EMBEDDED
|
||||
/* WARNING - the following is hand-optimized to fit within
|
||||
@@ -128,7 +127,7 @@
|
||||
#define CONFIG_UART_CONSOLE 0
|
||||
#define CONFIG_BOOTCOMMAND "run flashboot"
|
||||
#define FLASHBOOT_ENV_SETTINGS \
|
||||
"flashboot=flread 20040000 1000000 280000;" \
|
||||
"flashboot=flread 20040000 1000000 300000;" \
|
||||
"bootm 0x1000000\0"
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
|
||||
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
#define CONFIG_ARM926EJS
|
||||
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
|
||||
|
||||
#if defined(CONFIG_CPU9G20)
|
||||
#define CONFIG_AT91SAM9G20
|
||||
@@ -48,6 +47,8 @@
|
||||
#error "Unknown board"
|
||||
#endif
|
||||
|
||||
#include <asm/arch/hardware.h>
|
||||
|
||||
#define CONFIG_AT91FAMILY
|
||||
#define CONFIG_ARCH_CPU_INIT
|
||||
#undef CONFIG_USE_IRQ
|
||||
@@ -251,10 +252,8 @@
|
||||
#define CONFIG_AT91SAM9_WATCHDOG
|
||||
#define CONFIG_AT91_GPIO
|
||||
#define CONFIG_ATMEL_USART
|
||||
#undef CONFIG_USART0
|
||||
#undef CONFIG_USART1
|
||||
#undef CONFIG_USART2
|
||||
#define CONFIG_USART3
|
||||
#define CONFIG_USART_BASE ATMEL_BASE_DBGU
|
||||
#define CONFIG_USART_ID ATMEL_ID_SYS
|
||||
|
||||
#define CONFIG_BOOTDELAY 3
|
||||
|
||||
|
||||
@@ -29,12 +29,11 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define CONFIG_ARM920T 1 /* This is an ARM920T Core */
|
||||
#define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */
|
||||
#define CONFIG_EB_CPUX9K2 1 /* on an EP+CPUX9K2 Board */
|
||||
#define USE_920T_MMU 1
|
||||
#define CONFIG_AT91RM9200 /* It's an Atmel AT91RM9200 SoC */
|
||||
#define CONFIG_EB_CPUX9K2 /* on an EP+CPUX9K2 Board */
|
||||
#define USE_920T_MMU
|
||||
|
||||
#define CONFIG_VERSION_VARIABLE 1
|
||||
#define CONFIG_VERSION_VARIABLE
|
||||
#define CONFIG_IDENT_STRING " on EB+CPUx9K2"
|
||||
|
||||
#include <asm/arch/hardware.h> /* needed for port definitions */
|
||||
@@ -217,19 +216,19 @@
|
||||
#define CONFIG_SYS_I2C_INIT_BOARD
|
||||
|
||||
#define I2C_INIT i2c_init_board();
|
||||
#define I2C_ACTIVE writel(AT91_PMX_AA_TWD, &pio->pioa.mddr);
|
||||
#define I2C_TRISTATE writel(AT91_PMX_AA_TWD, &pio->pioa.mder);
|
||||
#define I2C_READ ((readl(&pio->pioa.pdsr) & AT91_PMX_AA_TWD) != 0)
|
||||
#define I2C_ACTIVE writel(ATMEL_PMX_AA_TWD, &pio->pioa.mddr);
|
||||
#define I2C_TRISTATE writel(ATMEL_PMX_AA_TWD, &pio->pioa.mder);
|
||||
#define I2C_READ ((readl(&pio->pioa.pdsr) & ATMEL_PMX_AA_TWD) != 0)
|
||||
#define I2C_SDA(bit) \
|
||||
if (bit) \
|
||||
writel(AT91_PMX_AA_TWD, &pio->pioa.sodr); \
|
||||
writel(ATMEL_PMX_AA_TWD, &pio->pioa.sodr); \
|
||||
else \
|
||||
writel(AT91_PMX_AA_TWD, &pio->pioa.codr);
|
||||
writel(ATMEL_PMX_AA_TWD, &pio->pioa.codr);
|
||||
#define I2C_SCL(bit) \
|
||||
if (bit) \
|
||||
writel(AT91_PMX_AA_TWCK, &pio->pioa.sodr); \
|
||||
writel(ATMEL_PMX_AA_TWCK, &pio->pioa.sodr); \
|
||||
else \
|
||||
writel(AT91_PMX_AA_TWCK, &pio->pioa.codr);
|
||||
writel(ATMEL_PMX_AA_TWCK, &pio->pioa.codr);
|
||||
|
||||
#define I2C_DELAY udelay(2500000/CONFIG_SYS_I2C_SPEED)
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#define CONFIG_DISPLAY_BOARDINFO
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
|
||||
#define CONFIG_SYS_TEXT_BASE 0xc0000000
|
||||
|
||||
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
|
||||
#define CONFIG_SETUP_MEMORY_TAGS 1
|
||||
#define CONFIG_INITRD_TAG 1
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
#define CONFIG_DISPLAY_BOARDINFO
|
||||
|
||||
#define CONFIG_SYS_TEXT_BASE 0xa0000000
|
||||
|
||||
/* Temporarily disabled */
|
||||
#if 0
|
||||
#define CONFIG_OF_LIBFDT 1
|
||||
@@ -145,6 +147,7 @@
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM_1 CSD0_BASE
|
||||
#define PHYS_SDRAM_1_SIZE (128 * 1024 * 1024)
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE CSD0_BASE
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
#include <asm/arch/imx-regs.h>
|
||||
|
||||
/* High Level Configuration Options */
|
||||
#define CONFIG_ARM1136 1 /* This is an arm1136 CPU core */
|
||||
#define CONFIG_MX31 1 /* in a mx31 */
|
||||
@@ -143,6 +145,16 @@
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM_1 0x80000000
|
||||
#define PHYS_SDRAM_1_SIZE (128 * 1024 * 1024)
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
#define CONFIG_SYS_TEXT_BASE 0xA0000000
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
||||
#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
|
||||
CONFIG_SYS_GBL_DATA_OFFSET)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* FLASH and environment organization
|
||||
|
||||
@@ -156,6 +156,16 @@
|
||||
#define PHYS_SDRAM_1 0x08000000 /* SDRAM on CSD0 */
|
||||
#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
|
||||
|
||||
#define CONFIG_SYS_TEXT_BASE 0x10000000
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR 0x00300000
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE 0x000FFFFF
|
||||
#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
|
||||
CONFIG_SYS_GBL_DATA_OFFSET)
|
||||
|
||||
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* 1 bank of SyncFlash */
|
||||
#define CONFIG_SYS_FLASH_BASE 0x0C000000 /* SyncFlash on CSD1 */
|
||||
#define FLASH_BANK_SIZE 0x01000000 /* 16 MB Total */
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
#define CONFIG_DISPLAY_BOARDINFO
|
||||
|
||||
#define CONFIG_SYS_TEXT_BASE 0xA0000000
|
||||
|
||||
/*
|
||||
* Disabled for now due to build problems under Debian and a significant increase
|
||||
* in the final file size: 144260 vs. 109536 Bytes.
|
||||
@@ -160,6 +162,15 @@
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM_1 CSD0_BASE
|
||||
#define PHYS_SDRAM_1_SIZE (128 * 1024 * 1024)
|
||||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
||||
#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
|
||||
CONFIG_SYS_GBL_DATA_OFFSET)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* FLASH and environment organization
|
||||
@@ -171,18 +182,14 @@
|
||||
#define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256KiB */
|
||||
|
||||
#define CONFIG_ENV_IS_IN_FLASH 1
|
||||
#define CONFIG_ENV_SECT_SIZE (32 * 1024)
|
||||
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
|
||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
|
||||
|
||||
/* Address and size of Redundant Environment Sector */
|
||||
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
|
||||
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE)
|
||||
#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
|
||||
|
||||
/* S29WS256N NOR flash has 4 32KiB small sectors at the beginning and at the end.
|
||||
* The rest of 32MiB is in 128KiB big sectors. U-Boot occupies the low 4 sectors,
|
||||
* if we put environment next to it, we will have to occupy 128KiB for it.
|
||||
* Putting it at the top of flash we use only 32KiB. */
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_ENV_SECT_SIZE)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* CFI FLASH driver setup
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
#define CONFIG_CMD_MII
|
||||
#define CONFIG_CMD_PING
|
||||
#define CONFIG_CMD_DHCP
|
||||
#define CONFIG_CMD_SPI
|
||||
#define CONFIG_CMD_DATE
|
||||
#define CONFIG_CMD_NAND
|
||||
|
||||
@@ -161,6 +161,8 @@
|
||||
|
||||
#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
|
||||
|
||||
#define PHYS_SRAM 0x20000000
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* FLASH and environment organization
|
||||
*/
|
||||
@@ -190,4 +192,7 @@
|
||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
|
||||
#define CONFIG_ENV_OFFSET ( CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN ) /* Environment after Monitor */
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_SP_ADDR PHYS_SRAM
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -172,6 +172,8 @@ extern unsigned long omap_flash_base; /* set in flash__init */
|
||||
|
||||
#endif
|
||||
|
||||
#define PHYS_SRAM 0x20000000
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* FLASH and environment organization
|
||||
*/
|
||||
@@ -189,4 +191,7 @@ extern unsigned long omap_flash_base; /* set in flash__init */
|
||||
#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
|
||||
#define CONFIG_ENV_OFFSET 0x20000 /* environment starts here */
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_SP_ADDR PHYS_SRAM
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -177,6 +177,8 @@ extern unsigned long omap_flash_base; /* set in flash__init */
|
||||
|
||||
#endif
|
||||
|
||||
#define PHYS_SRAM 0x20000000
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* FLASH and environment organization
|
||||
*/
|
||||
@@ -194,4 +196,7 @@ extern unsigned long omap_flash_base; /* set in flash__init */
|
||||
#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
|
||||
#define CONFIG_ENV_OFFSET 0x20000 /* environment starts here */
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_SP_ADDR PHYS_SRAM
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -220,6 +220,7 @@
|
||||
#define PHYS_FLASH_2 (H4_CS0_BASE+SZ_32M) /* same cs, 2 chips in series */
|
||||
#define PHYS_FLASH_SIZE_2 SZ_32M
|
||||
|
||||
#define PHYS_SRAM 0x4020F800
|
||||
/*-----------------------------------------------------------------------
|
||||
* FLASH and environment organization
|
||||
*/
|
||||
@@ -271,4 +272,7 @@
|
||||
#define MTDPARTS_DEFAULT "mtdparts=omap2420-1:-(jffs2)"
|
||||
*/
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_SP_ADDR PHYS_SRAM
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -168,6 +168,8 @@
|
||||
|
||||
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE /* Monitor at beginning of flash */
|
||||
|
||||
#define PHYS_SRAM 0x20000000
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* FLASH driver setup
|
||||
*/
|
||||
@@ -199,4 +201,7 @@
|
||||
#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
|
||||
#define CONFIG_ENV_OFFSET 0x20000 /* environment starts here */
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_SP_ADDR PHYS_SRAM
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -180,6 +180,8 @@
|
||||
#error Unknown Boot Chip-Select number
|
||||
#endif
|
||||
|
||||
#define PHYS_SRAM 0x20000000
|
||||
|
||||
#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
@@ -200,4 +202,7 @@
|
||||
#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
|
||||
#define CONFIG_ENV_OFFSET 0x20000 /* environment starts here */
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_SP_ADDR PHYS_SRAM
|
||||
|
||||
#endif /* ! __CONFIG_H */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <asm/arch/imx-regs.h>
|
||||
|
||||
/* High Level Configuration Options */
|
||||
/* High Level Configuration Options */
|
||||
#define CONFIG_ARM1136 1 /* This is an arm1136 CPU core */
|
||||
#define CONFIG_MX31 1 /* in a mx31 */
|
||||
#define CONFIG_QONG 1
|
||||
@@ -34,6 +34,8 @@
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
#define CONFIG_DISPLAY_BOARDINFO
|
||||
|
||||
#define CONFIG_SYS_TEXT_BASE 0xa0000000
|
||||
|
||||
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
|
||||
#define CONFIG_SETUP_MEMORY_TAGS 1
|
||||
#define CONFIG_INITRD_TAG 1
|
||||
|
||||
191
include/configs/snapper9260.h
Normal file
191
include/configs/snapper9260.h
Normal file
@@ -0,0 +1,191 @@
|
||||
/*
|
||||
* Bluewater Systems Snapper 9260 and 9G20 modules
|
||||
*
|
||||
* (C) Copyright 2011 Bluewater Systems
|
||||
* Author: Andre Renaud <andre@bluewatersys.com>
|
||||
* Author: Ryan Mallon <ryan@bluewatersys.com>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
/* SoC type is defined in boards.cfg */
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/sizes.h>
|
||||
|
||||
#define CONFIG_SYS_TEXT_BASE 0x20000000
|
||||
|
||||
/* ARM asynchronous clock */
|
||||
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* External Crystal, in Hz */
|
||||
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
/* CPU */
|
||||
#define CONFIG_ARCH_CPU_INIT
|
||||
#undef CONFIG_USE_IRQ
|
||||
|
||||
#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
|
||||
#define CONFIG_SETUP_MEMORY_TAGS
|
||||
#define CONFIG_INITRD_TAG
|
||||
#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#define CONFIG_SKIP_RELOCATE_UBOOT
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
#define CONFIG_FIT
|
||||
|
||||
/* SDRAM */
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
|
||||
#define CONFIG_SYS_SDRAM_SIZE (64 * 1024 * 1024) /* 64MB */
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (ATMEL_BASE_SRAM1 + 0x1000 - \
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
|
||||
/* Mem test settings */
|
||||
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
|
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + (1024 * 1024))
|
||||
|
||||
/* NAND Flash */
|
||||
#define CONFIG_NAND_ATMEL
|
||||
#define CONFIG_SYS_NO_FLASH
|
||||
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
||||
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
|
||||
#define CONFIG_SYS_NAND_DBW_8
|
||||
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21) /* AD21 */
|
||||
#define CONFIG_SYS_NAND_MASK_CLE (1 << 22) /* AD22 */
|
||||
#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14
|
||||
#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC13
|
||||
|
||||
/* Ethernet */
|
||||
#define CONFIG_MACB
|
||||
#define CONFIG_RMII
|
||||
#define CONFIG_NET_MULTI
|
||||
#define CONFIG_NET_RETRY_COUNT 20
|
||||
#define CONFIG_RESET_PHY_R
|
||||
#define CONFIG_TFTP_PORT
|
||||
#define CONFIG_TFTP_TSIZE
|
||||
|
||||
/* USB */
|
||||
#define CONFIG_USB_ATMEL
|
||||
#define CONFIG_USB_OHCI_NEW
|
||||
#define CONFIG_DOS_PARTITION
|
||||
#define CONFIG_SYS_USB_OHCI_CPU_INIT
|
||||
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_UHP_BASE
|
||||
#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
|
||||
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
#define CONFIG_USB_STORAGE
|
||||
|
||||
/* GPIOs and IO expander */
|
||||
#define CONFIG_AT91_LEGACY
|
||||
#define CONFIG_ATMEL_LEGACY
|
||||
#define CONFIG_AT91_GPIO
|
||||
#define CONFIG_AT91_GPIO_PULLUP 1
|
||||
#define CONFIG_PCA953X
|
||||
#define CONFIG_SYS_I2C_PCA953X_ADDR 0x28
|
||||
#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x28, 16} }
|
||||
|
||||
/* UARTs/Serial console */
|
||||
#define CONFIG_ATMEL_USART
|
||||
#define CONFIG_USART_BASE ATMEL_BASE_DBGU
|
||||
#define CONFIG_USART_ID ATMEL_ID_SYS
|
||||
#define CONFIG_BAUDRATE 115200
|
||||
#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
|
||||
#define CONFIG_SYS_PROMPT "Snapper> "
|
||||
|
||||
/* I2C - Bit-bashed */
|
||||
#define CONFIG_SOFT_I2C
|
||||
#define CONFIG_SYS_I2C_SPEED 100000
|
||||
#define CONFIG_SYS_I2C_SLAVE 0x7F
|
||||
#define CONFIG_SOFT_I2C_READ_REPEATED_START
|
||||
#define CONFIG_I2C_MULTI_BUS
|
||||
#define I2C_INIT do { \
|
||||
at91_set_gpio_output(AT91_PIN_PA23, 1); \
|
||||
at91_set_gpio_output(AT91_PIN_PA24, 1); \
|
||||
at91_set_pio_multi_drive(AT91_PIO_PORTA, 23, 1); \
|
||||
at91_set_pio_multi_drive(AT91_PIO_PORTA, 24, 1); \
|
||||
} while (0)
|
||||
#define I2C_SOFT_DECLARATIONS
|
||||
#define I2C_ACTIVE
|
||||
#define I2C_TRISTATE at91_set_gpio_input(AT91_PIN_PA23, 1);
|
||||
#define I2C_READ at91_get_gpio_value(AT91_PIN_PA23);
|
||||
#define I2C_SDA(bit) do { \
|
||||
if (bit) { \
|
||||
at91_set_gpio_input(AT91_PIN_PA23, 1); \
|
||||
} else { \
|
||||
at91_set_gpio_output(AT91_PIN_PA23, 1); \
|
||||
at91_set_gpio_value(AT91_PIN_PA23, bit); \
|
||||
} \
|
||||
} while (0)
|
||||
#define I2C_SCL(bit) at91_set_pio_value(AT91_PIO_PORTA, 24, bit)
|
||||
#define I2C_DELAY udelay(2)
|
||||
|
||||
/* Boot options */
|
||||
#define CONFIG_SYS_LOAD_ADDR 0x23000000
|
||||
#define CONFIG_BOOTDELAY 3
|
||||
#define CONFIG_ZERO_BOOTDELAY_CHECK
|
||||
|
||||
#define CONFIG_BOOTP_BOOTFILESIZE
|
||||
#define CONFIG_BOOTP_BOOTPATH
|
||||
#define CONFIG_BOOTP_GATEWAY
|
||||
#define CONFIG_BOOTP_HOSTNAME
|
||||
|
||||
/* Environment settings */
|
||||
#define CONFIG_ENV_IS_IN_NAND
|
||||
#define CONFIG_ENV_OFFSET (512 << 10)
|
||||
#define CONFIG_ENV_SIZE (256 << 10)
|
||||
#define CONFIG_ENV_OVERWRITE
|
||||
#define CONFIG_BOOTARGS "console=ttyS0,115200 ip=any"
|
||||
|
||||
/* Console settings */
|
||||
#define CONFIG_SYS_CBSIZE 256
|
||||
#define CONFIG_SYS_MAXARGS 16
|
||||
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
|
||||
sizeof(CONFIG_SYS_PROMPT) + 16)
|
||||
#define CONFIG_SYS_LONGHELP
|
||||
#define CONFIG_SYS_EXTBDINFO
|
||||
#define CONFIG_CMDLINE_EDITING
|
||||
#define CONFIG_AUTO_COMPLETE
|
||||
#define CONFIG_SYS_HUSH_PARSER
|
||||
#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
|
||||
|
||||
/* U-Boot memory settings */
|
||||
#define CONFIG_SYS_MALLOC_LEN (1 << 20)
|
||||
#define CONFIG_STACKSIZE (256 << 10)
|
||||
|
||||
/* Command line configuration */
|
||||
#include <config_cmd_default.h>
|
||||
#undef CONFIG_CMD_BDI
|
||||
#undef CONFIG_CMD_FPGA
|
||||
#undef CONFIG_CMD_IMI
|
||||
#undef CONFIG_CMD_IMLS
|
||||
#undef CONFIG_CMD_LOADS
|
||||
#undef CONFIG_CMD_SOURCE
|
||||
|
||||
#define CONFIG_CMD_PING
|
||||
#define CONFIG_CMD_DHCP
|
||||
#define CONFIG_CMD_FAT
|
||||
#define CONFIG_CMD_I2C
|
||||
#undef CONFIG_CMD_GPIO
|
||||
#define CONFIG_CMD_USB
|
||||
#define CONFIG_CMD_MII
|
||||
#define CONFIG_CMD_NAND
|
||||
#define CONFIG_CMD_PCA953X
|
||||
#define CONFIG_CMD_PCA953X_INFO
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
@@ -90,13 +90,12 @@
|
||||
* Env Storage Settings
|
||||
*/
|
||||
#define CONFIG_ENV_IS_IN_FLASH 1
|
||||
#define CONFIG_ENV_OFFSET 0x4000
|
||||
#define CONFIG_ENV_SIZE 0x2000
|
||||
#define CONFIG_ENV_SECT_SIZE 0x20000
|
||||
#define CONFIG_ENV_OFFSET 0x8000
|
||||
#define CONFIG_ENV_SIZE 0x8000
|
||||
#define CONFIG_ENV_SECT_SIZE 0x8000
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
|
||||
#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
|
||||
#define ENV_IS_EMBEDDED
|
||||
#else
|
||||
#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
|
||||
#endif
|
||||
#ifdef ENV_IS_EMBEDDED
|
||||
/* WARNING - the following is hand-optimized to fit within
|
||||
@@ -128,7 +127,7 @@
|
||||
#define CONFIG_UART_CONSOLE 0
|
||||
#define CONFIG_BOOTCOMMAND "run flashboot"
|
||||
#define FLASHBOOT_ENV_SETTINGS \
|
||||
"flashboot=flread 20040000 1000000 280000;" \
|
||||
"flashboot=flread 20040000 1000000 300000;" \
|
||||
"bootm 0x1000000\0"
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
/* SoC must be defined first, before hardware.h is included */
|
||||
#define CONFIG_AT91SAM9XE
|
||||
#include <asm/hardware.h>
|
||||
|
||||
/*
|
||||
* Warning: changing CONFIG_SYS_TEXT_BASE requires
|
||||
* adapting the initial boot program.
|
||||
@@ -61,17 +65,11 @@
|
||||
#define CONFIG_CMD_CACHE
|
||||
|
||||
/* ARM asynchronous clock */
|
||||
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* 18.432 MHz xtal */
|
||||
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */
|
||||
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* main clock xtal */
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
/* SoC */
|
||||
#define CONFIG_ARM926EJS /* ARM926EJS Core */
|
||||
#define CONFIG_AT91FAMILY /* it's a member of AT91 */
|
||||
#define CONFIG_AT91SAM9260 /* Atmel AT91SAM9260 based SoC */
|
||||
#define CONFIG_AT91SAM9XE
|
||||
|
||||
/* Misc CPU related */
|
||||
#define CONFIG_AT91_LEGACY
|
||||
#define CONFIG_ARCH_CPU_INIT
|
||||
#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
|
||||
#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
|
||||
@@ -83,12 +81,14 @@
|
||||
#define CONFIG_AT91RESET_EXTRST /* assert external reset */
|
||||
|
||||
/* general purpose I/O */
|
||||
#define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
|
||||
#define CONFIG_AT91_GPIO
|
||||
#define CONFIG_AT91_GPIO_PULLUP 1 /* keep pullups on peripheral pins */
|
||||
|
||||
/* serial console */
|
||||
#define CONFIG_ATMEL_USART
|
||||
#define CONFIG_USART3 /* USART 3 is DBGU !!! */
|
||||
#define CONFIG_USART_BASE ATMEL_BASE_DBGU
|
||||
#define CONFIG_USART_ID ATMEL_ID_SYS
|
||||
#define CONFIG_BAUDRATE 115200
|
||||
#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
* with u-boot commands
|
||||
*/
|
||||
# define CONFIG_AT91_EFLASH
|
||||
# define CONFIG_SYS_FLASH_BASE 0x200000
|
||||
# define CONFIG_SYS_FLASH_BASE ATMEL_BASE_FLASH
|
||||
# define CONFIG_SYS_MAX_FLASH_SECT 32
|
||||
# define CONFIG_SYS_MAX_FLASH_BANKS 1
|
||||
# define CONFIG_SYS_FLASH_PROTECTION
|
||||
@@ -159,10 +159,10 @@
|
||||
* Initialized before u-boot gets started.
|
||||
*/
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define CONFIG_SYS_SDRAM_BASE 0x20000000
|
||||
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
|
||||
#define CONFIG_SYS_SDRAM_SIZE 0x08000000
|
||||
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
|
||||
#define CONFIG_SYS_MEMTEST_END 0x21e00000
|
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x01e00000)
|
||||
#define CONFIG_SYS_LOAD_ADDR \
|
||||
(CONFIG_SYS_SDRAM_BASE + 0x01000000)
|
||||
/*
|
||||
@@ -171,7 +171,7 @@
|
||||
* that address while providing maximum stack area below.
|
||||
*/
|
||||
#define CONFIG_SYS_INIT_SP_ADDR \
|
||||
(0x00300000 + 0x4000 - GENERATED_GBL_DATA_SIZE)
|
||||
(ATMEL_BASE_SRAM + 0x4000 - GENERATED_GBL_DATA_SIZE)
|
||||
|
||||
/*
|
||||
* NAND flash: 256 MB (optional)
|
||||
@@ -184,7 +184,7 @@
|
||||
*/
|
||||
#define CONFIG_NAND_ATMEL
|
||||
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
||||
#define CONFIG_SYS_NAND_BASE 0x40000000
|
||||
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
|
||||
#define CONFIG_SYS_NAND_DBW_8
|
||||
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
|
||||
#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
|
||||
@@ -197,7 +197,7 @@
|
||||
#define CONFIG_USB_OHCI_NEW
|
||||
#define CONFIG_DOS_PARTITION
|
||||
#define CONFIG_SYS_USB_OHCI_CPU_INIT
|
||||
#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000
|
||||
#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_UHP_BASE
|
||||
#define CONFIG_SYS_USB_OHCI_SLOT_NAME "top9000"
|
||||
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
|
||||
#define CONFIG_USB_STORAGE
|
||||
|
||||
Reference in New Issue
Block a user