From 9f07dedeb0f20108252a9af462f398a04709f1a3 Mon Sep 17 00:00:00 2001 From: Daniel Gorsulowski Date: Mon, 9 Aug 2010 11:17:13 +0200 Subject: at91: Defined main clock frequency on esd at91 boards Autodetection is undesired now Signed-off-by: Daniel Gorsulowski Signed-off-by: Reinhard Meyer --- include/configs/meesc.h | 3 ++- include/configs/otc570.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/meesc.h b/include/configs/meesc.h index e085f4a47c..dad0bef118 100644 --- a/include/configs/meesc.h +++ b/include/configs/meesc.h @@ -3,7 +3,7 @@ * Stelian Pop * Lead Tech Design * - * (C) Copyright 2009 + * (C) Copyright 2009-2010 * Daniel Gorsulowski * esd electronic system design gmbh * @@ -38,6 +38,7 @@ #define CONFIG_MEESC 1 /* Board is esd MEESC */ #define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */ #define CONFIG_AT91SAM9263 1 /* It's an AT91SAM9263 SoC */ +#define CONFIG_SYS_AT91_MAIN_CLOCK 16000000/* 16.0 MHz crystal */ #define CONFIG_DISPLAY_BOARDINFO 1 #define CONFIG_DISPLAY_CPUINFO 1 /* display cpu info and speed */ #define CONFIG_PREBOOT /* enable preboot variable */ diff --git a/include/configs/otc570.h b/include/configs/otc570.h index fb0f576f45..4a1cedec0f 100644 --- a/include/configs/otc570.h +++ b/include/configs/otc570.h @@ -35,6 +35,7 @@ #define CONFIG_OTC570 1 /* Board is esd OTC570 */ #define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */ #define CONFIG_AT91SAM9263 1 /* It's an AT91SAM9263 SoC */ +#define CONFIG_SYS_AT91_MAIN_CLOCK 16000000/* 16.0 MHz crystal */ #define CONFIG_SYS_HZ 1000 /* decrementer freq */ #define CONFIG_DISPLAY_BOARDINFO 1 #define CONFIG_DISPLAY_CPUINFO 1 /* display cpu info and speed */ -- cgit v1.2.1 From d4562e0940444ffa5fa70ef882413369b358358c Mon Sep 17 00:00:00 2001 From: Daniel Gorsulowski Date: Mon, 9 Aug 2010 11:17:14 +0200 Subject: at91: Update meesc board to new SoC access * convert meesc board to use c stucture SoC access * change gpio access to at91_gpio syntax * moved CONFIG_SYS_HZ below board and cpu defines (purely cosmetic) Signed-off-by: Daniel Gorsulowski Signed-off-by: Reinhard Meyer --- include/configs/meesc.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/configs/meesc.h b/include/configs/meesc.h index dad0bef118..eaea1cd9c3 100644 --- a/include/configs/meesc.h +++ b/include/configs/meesc.h @@ -31,14 +31,12 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CONFIG_AT91_LEGACY - /* Common stuff */ -#define CONFIG_SYS_HZ 1000 /* decrementer freq */ #define CONFIG_MEESC 1 /* Board is esd MEESC */ #define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */ #define CONFIG_AT91SAM9263 1 /* It's an AT91SAM9263 SoC */ #define CONFIG_SYS_AT91_MAIN_CLOCK 16000000/* 16.0 MHz crystal */ +#define CONFIG_SYS_HZ 1000 /* decrementer freq */ #define CONFIG_DISPLAY_BOARDINFO 1 #define CONFIG_DISPLAY_CPUINFO 1 /* display cpu info and speed */ #define CONFIG_PREBOOT /* enable preboot variable */ @@ -122,9 +120,9 @@ #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_PD15 -#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PA22 - +#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIO_PORTD, 15 +#define CONFIG_SYS_NAND_READY_PIN AT91_PIO_PORTA, 22 +#define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */ #endif /* Ethernet */ -- cgit v1.2.1 From 64037fb453e569480ec3fc14500047a23a6b637e Mon Sep 17 00:00:00 2001 From: Daniel Gorsulowski Date: Mon, 9 Aug 2010 11:17:15 +0200 Subject: at91: Enabeling USB host on meesc board There was an redesign, so USB is available now. Signed-off-by: Daniel Gorsulowski Signed-off-by: Reinhard Meyer --- include/configs/meesc.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/meesc.h b/include/configs/meesc.h index eaea1cd9c3..dbb2531439 100644 --- a/include/configs/meesc.h +++ b/include/configs/meesc.h @@ -84,11 +84,11 @@ #undef CONFIG_CMD_FPGA #undef CONFIG_CMD_LOADS #undef CONFIG_CMD_IMLS -#undef CONFIG_CMD_USB #define CONFIG_CMD_PING 1 #define CONFIG_CMD_DHCP 1 #define CONFIG_CMD_NAND 1 +#define CONFIG_CMD_USB 1 /* LED */ #define CONFIG_AT91_LED 1 @@ -132,6 +132,17 @@ #define CONFIG_NET_RETRY_COUNT 20 #undef CONFIG_RESET_PHY_R +/* 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_SYS_USB_OHCI_REGS_BASE 0x00a00000 +#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263" +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 +#define CONFIG_USB_STORAGE 1 +#define CONFIG_CMD_FAT 1 + #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM -- cgit v1.2.1 From af4b8b4bdb37f49eb0bdf969a64341a8c65ccafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Mon, 9 Aug 2010 11:50:45 +0200 Subject: cpuat91: convert to new at91 soc architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit convert the board to the new soc architecture update default config i2c upgrade taken from eb_cpux9k2.h & board/BuS/eb_cpux9k2/cpux9k2.c Signed-off-by: Eric Bénard Signed-off-by: Reinhard Meyer --- include/configs/cpuat91.h | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h index 049298cfa3..b0127826b8 100644 --- a/include/configs/cpuat91.h +++ b/include/configs/cpuat91.h @@ -1,5 +1,5 @@ /* - * CPUAT91 by (C) Copyright 2006 Eric Benard + * CPUAT91 by (C) Copyright 2006-2010 Eric Benard * eric@eukrea.com * * Configuration settings for the CPUAT91 board. @@ -23,15 +23,12 @@ * MA 02111-1307 USA */ -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_AT91_LEGACY +#ifndef _CONFIG_CPUAT91_H +#define _CONFIG_CPUAT91_H #ifdef CONFIG_CPUAT91_RAM #define CONFIG_SKIP_LOWLEVEL_INIT 1 #define CONFIG_SKIP_RELOCATE_UBOOT 1 -#define CONFIG_CPUAT91 1 #else #define CONFIG_BOOTDELAY 1 #endif @@ -43,6 +40,7 @@ #define CONFIG_ARM920T 1 #define CONFIG_AT91RM9200 1 +#define CONFIG_CPUAT91 1 #undef CONFIG_USE_IRQ #define USE_920T_MMU 1 @@ -89,16 +87,36 @@ #undef CONFIG_USART0 #undef CONFIG_USART1 -#define CONFIG_HARD_I2C 1 +#undef CONFIG_HARD_I2C +#define CONFIG_SOFT_I2C 1 +#define AT91_PIN_SDA (1<<25) +#define AT91_PIN_SCL (1<<26) + +#define CONFIG_SYS_I2C_INIT_BOARD 1 +#define CONFIG_SYS_I2C_SPEED 50000 +#define CONFIG_SYS_I2C_SLAVE 0 + +#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_SDA(bit) \ + if (bit) \ + writel(AT91_PMX_AA_TWD, &pio->pioa.sodr); \ + else \ + writel(AT91_PMX_AA_TWD, &pio->pioa.codr); +#define I2C_SCL(bit) \ + if (bit) \ + writel(AT91_PMX_AA_TWCK, &pio->pioa.sodr); \ + else \ + writel(AT91_PMX_AA_TWCK, &pio->pioa.codr); + +#define I2C_DELAY udelay(2500000/CONFIG_SYS_I2C_SPEED) -#if defined(CONFIG_HARD_I2C) -#define CONFIG_SYS_I2C_SPEED 50000 -#define CONFIG_SYS_I2C_SLAVE 0 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 1 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 -#endif #define CONFIG_BOOTP_BOOTFILESIZE 1 #define CONFIG_BOOTP_BOOTPATH 1 @@ -117,10 +135,8 @@ #undef CONFIG_CMD_LOADS #undef CONFIG_CMD_NFS -#if defined(CONFIG_HARD_I2C) #define CONFIG_CMD_EEPROM 1 #define CONFIG_CMD_I2C 1 -#endif #define CONFIG_NR_DRAM_BANKS 1 #define PHYS_SDRAM 0x20000000 @@ -148,6 +164,7 @@ #define PHYS_FLASH_1 0x10000000 #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 #define CONFIG_SYS_MAX_FLASH_SECT 128 +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #if defined(CONFIG_CMD_USB) #define CONFIG_USB_OHCI_NEW 1 @@ -230,4 +247,4 @@ "flashboot=run ramargs;bootm 10040000\0" \ "netboot=run ramargs;tftpboot 21000000 cpuat91/uImage;" \ "bootm 21000000\0" -#endif /* __CONFIG_H */ +#endif /* _CONFIG_CPUAT91_H */ -- cgit v1.2.1 From 0ca6c526f61fd07190cda3e8328e6ea4e35a8d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Mon, 9 Aug 2010 11:50:46 +0200 Subject: cpuat91: update defaut environement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Bénard Signed-off-by: Reinhard Meyer --- include/configs/cpuat91.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h index b0127826b8..9ef4523de4 100644 --- a/include/configs/cpuat91.h +++ b/include/configs/cpuat91.h @@ -223,7 +223,7 @@ "mtdparts=physmap-flash.0:" \ "128k(u-boot)ro," \ "128k(u-boot-env)," \ - "1408k(kernel)," \ + "1792k(kernel)," \ "-(rootfs)" #define CONFIG_BOOTARGS \ @@ -238,11 +238,11 @@ "1001FFFF; erase 10000000 1001FFFF; cp.b 21000000 " \ "10000000 ${filesize}\0" \ "flui=tftp 21000000 cpuat91/uImage; protect off 10040000 " \ - "1019ffff; erase 10040000 1019ffff; cp.b 21000000 " \ + "1019ffff; erase 10040000 101fffff; cp.b 21000000 " \ "10040000 ${filesize}\0" \ "flrfs=tftp 21000000 cpuat91/rootfs.jffs2; protect off " \ - "101a0000 10ffffff; erase 101a0000 10ffffff; cp.b " \ - "21000000 101A0000 ${filesize}\0" \ + "10200000 10ffffff; erase 10200000 10ffffff; cp.b " \ + "21000000 10200000 ${filesize}\0" \ "ramargs=setenv bootargs $(bootargs) $(mtdparts)\0" \ "flashboot=run ramargs;bootm 10040000\0" \ "netboot=run ramargs;tftpboot 21000000 cpuat91/uImage;" \ -- cgit v1.2.1 From 1592ef8596fffd937a30462eb15f1d64e237ae49 Mon Sep 17 00:00:00 2001 From: Reinhard Meyer Date: Fri, 13 Aug 2010 10:31:06 +0200 Subject: AT91: MCI: add SD/MMC driver using mmc framework Signed-off-by: Reinhard Meyer --- include/mmc.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mmc.h b/include/mmc.h index fcb237e81e..9f94f423fb 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -179,6 +179,16 @@ struct mmc_cid { char pnm[7]; }; +/* + * WARNING! + * + * This structure is used by atmel_mci.c only. + * It works for the AVR32 architecture but NOT + * for ARM/AT91 architectures. + * Its use is highly depreciated. + * After the atmel_mci.c driver for AVR32 has + * been replaced this structure will be removed. + */ struct mmc_csd { u8 csd_structure:2, @@ -275,7 +285,10 @@ int mmc_set_dev(int dev_num); void print_mmc_devices(char separator); int board_mmc_getcd(u8 *cd, struct mmc *mmc); -#ifndef CONFIG_GENERIC_MMC +#ifdef CONFIG_GENERIC_MMC +int atmel_mci_init(void *regs); +#else int mmc_legacy_init(int verbose); #endif + #endif /* _MMC_H_ */ -- cgit v1.2.1