diff options
author | Tom Rini <trini@konsulko.com> | 2015-08-24 16:06:03 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-24 16:06:03 -0400 |
commit | 7d31c6ab83d8a5875875eda041c0a1e756189917 (patch) | |
tree | 4294f1ed6c6dc162940d8a1b79f834879ffbe53a | |
parent | a31a415803b8850f52d78395103fca3bdd1d37af (diff) | |
parent | 3664fa1beec3921dcfed605a9b37f63dee28ce6a (diff) | |
download | blackbird-obmc-uboot-7d31c6ab83d8a5875875eda041c0a1e756189917.tar.gz blackbird-obmc-uboot-7d31c6ab83d8a5875875eda041c0a1e756189917.zip |
Merge git://git.denx.de/u-boot-pxa
-rw-r--r-- | arch/arm/cpu/pxa/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/cpu/pxa/pxa2xx.c | 4 | ||||
-rw-r--r-- | arch/arm/cpu/pxa/relocate.S | 23 | ||||
-rw-r--r-- | arch/arm/cpu/pxa/timer.c | 71 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-pxa/config.h | 25 | ||||
-rw-r--r-- | arch/arm/include/asm/config.h | 5 | ||||
-rw-r--r-- | drivers/mmc/pxa_mmc_gen.c | 8 | ||||
-rw-r--r-- | drivers/serial/serial_pxa.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/pxa27x_udc.c | 5 | ||||
-rw-r--r-- | drivers/video/pxa_lcd.c | 9 | ||||
-rw-r--r-- | include/configs/colibri_pxa270.h | 26 | ||||
-rw-r--r-- | include/configs/palmtreo680.h | 1 |
12 files changed, 94 insertions, 88 deletions
diff --git a/arch/arm/cpu/pxa/Makefile b/arch/arm/cpu/pxa/Makefile index 8cd475e3a4..3ee08cd188 100644 --- a/arch/arm/cpu/pxa/Makefile +++ b/arch/arm/cpu/pxa/Makefile @@ -13,3 +13,4 @@ obj-$(CONFIG_CPU_PXA27X) += pxa2xx.o obj-y += cpuinfo.o obj-y += timer.o obj-y += usb.o +obj-y += relocate.o diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index 7e861e26db..2f12fb9c82 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -10,11 +10,11 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include <common.h> +#include <asm/arch/pxa-regs.h> #include <asm/io.h> #include <asm/system.h> #include <command.h> -#include <common.h> -#include <asm/arch/pxa-regs.h> /* Flush I/D-cache */ static void cache_flush(void) diff --git a/arch/arm/cpu/pxa/relocate.S b/arch/arm/cpu/pxa/relocate.S new file mode 100644 index 0000000000..fafd4daeb6 --- /dev/null +++ b/arch/arm/cpu/pxa/relocate.S @@ -0,0 +1,23 @@ +/* + * relocate - PXA270 vector relocation + * + * Copyright (c) 2013 Albert ARIBAUD <albert.u.boot@aribaud.net> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <linux/linkage.h> + +/* + * The PXA SoC is very specific with respect to exceptions: it + * does not provide RAM at the high vectors address (0xFFFF0000), + * thus only the low address (0x00000000) is useable; but that is + * in ROM, so let's avoid relocating the vectors. + */ + .section .text.relocate_vectors,"ax",%progbits + +ENTRY(relocate_vectors) + + bx lr + +ENDPROC(relocate_vectors) diff --git a/arch/arm/cpu/pxa/timer.c b/arch/arm/cpu/pxa/timer.c index c4717de6a9..7c25e67fea 100644 --- a/arch/arm/cpu/pxa/timer.c +++ b/arch/arm/cpu/pxa/timer.c @@ -6,80 +6,13 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include <asm/arch/pxa-regs.h> -#include <asm/io.h> #include <common.h> -#include <div64.h> +#include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; -#define TIMER_LOAD_VAL 0xffffffff - -#define timestamp (gd->arch.tbl) -#define lastinc (gd->arch.lastinc) - -#if defined(CONFIG_CPU_PXA27X) || defined(CONFIG_CPU_MONAHANS) -#define TIMER_FREQ_HZ 3250000 -#elif defined(CONFIG_CPU_PXA25X) -#define TIMER_FREQ_HZ 3686400 -#else -#error "Timer frequency unknown - please config PXA CPU type" -#endif - -static unsigned long long tick_to_time(unsigned long long tick) -{ - return lldiv(tick * CONFIG_SYS_HZ, TIMER_FREQ_HZ); -} - -static unsigned long long us_to_tick(unsigned long long us) -{ - return lldiv(us * TIMER_FREQ_HZ, 1000000); -} - int timer_init(void) { - writel(0, OSCR); + writel(0, CONFIG_SYS_TIMER_COUNTER); return 0; } - -unsigned long long get_ticks(void) -{ - /* Current tick value */ - uint32_t now = readl(OSCR); - - if (now >= lastinc) { - /* - * Normal mode (non roll) - * Move stamp forward with absolute diff ticks - */ - timestamp += (now - lastinc); - } else { - /* We have rollover of incrementer */ - timestamp += (TIMER_LOAD_VAL - lastinc) + now; - } - - lastinc = now; - return timestamp; -} - -ulong get_timer(ulong base) -{ - return tick_to_time(get_ticks()) - base; -} - -void __udelay(unsigned long usec) -{ - unsigned long long tmp; - ulong tmo; - - tmo = us_to_tick(usec); - tmp = get_ticks() + tmo; /* get current timestamp */ - - while (get_ticks() < tmp) /* loop till event */ - /*NOP*/; -} - -ulong get_tbclk(void) -{ - return TIMER_FREQ_HZ; -} diff --git a/arch/arm/include/asm/arch-pxa/config.h b/arch/arm/include/asm/arch-pxa/config.h new file mode 100644 index 0000000000..5836945214 --- /dev/null +++ b/arch/arm/include/asm/arch-pxa/config.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2014 Andrew Ruder <andrew.ruder@elecsyscorp.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _ASM_ARM_PXA_CONFIG_ +#define _ASM_ARM_PXA_CONFIG_ + +#include <asm/arch/pxa-regs.h> + +/* + * Generic timer support + */ +#if defined(CONFIG_CPU_PXA27X) || defined(CONFIG_CPU_MONAHANS) +#define CONFIG_SYS_TIMER_RATE 3250000 +#elif defined(CONFIG_CPU_PXA25X) +#define CONFIG_SYS_TIMER_RATE 3686400 +#else +#error "Timer frequency unknown - please config PXA CPU type" +#endif + +#define CONFIG_SYS_TIMER_COUNTER OSCR + +#endif /* _ASM_ARM_PXA_CONFIG_ */ diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h index 7a34a0186c..22fff02778 100644 --- a/arch/arm/include/asm/config.h +++ b/arch/arm/include/asm/config.h @@ -19,7 +19,10 @@ #include <asm/arch-fsl-lsch3/config.h> #endif -#ifdef CONFIG_LS102XA +#if defined(CONFIG_LS102XA) || \ + defined(CONFIG_CPU_PXA27X) || \ + defined(CONFIG_CPU_MONAHANS) || \ + defined(CONFIG_CPU_PXA25X) #include <asm/arch/config.h> #endif diff --git a/drivers/mmc/pxa_mmc_gen.c b/drivers/mmc/pxa_mmc_gen.c index 25ab0b1fc8..19ae81d470 100644 --- a/drivers/mmc/pxa_mmc_gen.c +++ b/drivers/mmc/pxa_mmc_gen.c @@ -6,15 +6,13 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include <config.h> #include <common.h> -#include <malloc.h> - -#include <mmc.h> -#include <asm/errno.h> #include <asm/arch/hardware.h> #include <asm/arch/regs-mmc.h> +#include <asm/errno.h> #include <asm/io.h> +#include <malloc.h> +#include <mmc.h> /* PXAMMC Generic default config for various CPUs */ #if defined(CONFIG_CPU_PXA25X) diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c index d5140045bf..8fbcc10248 100644 --- a/drivers/serial/serial_pxa.c +++ b/drivers/serial/serial_pxa.c @@ -18,12 +18,12 @@ */ #include <common.h> -#include <watchdog.h> -#include <serial.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/regs-uart.h> #include <asm/io.h> #include <linux/compiler.h> +#include <serial.h> +#include <watchdog.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 9423555280..c7b21aee42 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -10,11 +10,10 @@ #include <common.h> -#include <config.h> -#include <asm/byteorder.h> -#include <usbdevice.h> #include <asm/arch/hardware.h> +#include <asm/byteorder.h> #include <asm/io.h> +#include <usbdevice.h> #include <usb/pxa27x_udc.h> #include <usb/udc.h> diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c index 64cef37bc9..2799425a63 100644 --- a/drivers/video/pxa_lcd.c +++ b/drivers/video/pxa_lcd.c @@ -11,14 +11,13 @@ /* ** HEADER FILES */ /************************************************************************/ -#include <config.h> #include <common.h> -#include <stdarg.h> -#include <linux/types.h> -#include <stdio_dev.h> -#include <lcd.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#include <lcd.h> +#include <linux/types.h> +#include <stdarg.h> +#include <stdio_dev.h> /* #define DEBUG */ diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index a1b64c60e6..4efc9c5f3e 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -19,6 +19,9 @@ /* Avoid overwriting factory configuration block */ #define CONFIG_BOARD_SIZE_LIMIT 0x40000 +/* We will never enable dcache because we have to setup MMU first */ +#define CONFIG_SYS_DCACHE_OFF + /* * Environment settings */ @@ -56,6 +59,25 @@ #define CONFIG_CMD_MMC #define CONFIG_CMD_USB +/* I2C support */ +#ifdef CONFIG_SYS_I2C +#define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C_PXA +#define CONFIG_PXA_STD_I2C +#define CONFIG_PXA_PWR_I2C +#define CONFIG_SYS_I2C_SPEED 100000 +#endif + +/* LCD support */ +#ifdef CONFIG_LCD +#define CONFIG_PXA_LCD +#define CONFIG_PXA_VGA +#define CONFIG_SYS_WHITE_ON_BLACK +#define CONFIG_CONSOLE_SCROLL_LINES 10 +#define CONFIG_CMD_BMP +#define CONFIG_LCD_LOGO +#endif + /* * Networking Configuration */ @@ -122,16 +144,20 @@ */ #ifdef CONFIG_CMD_FLASH #define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ +#define PHYS_FLASH_SIZE 0x02000000 /* 32 MB */ #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 #define CONFIG_SYS_FLASH_CFI #define CONFIG_FLASH_CFI_DRIVER 1 +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT #define CONFIG_SYS_MAX_FLASH_SECT (4 + 255) #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_FLASH_ERASE_TOUT (25 * CONFIG_SYS_HZ) #define CONFIG_SYS_FLASH_WRITE_TOUT (25 * CONFIG_SYS_HZ) +#define CONFIG_SYS_FLASH_LOCK_TOUT (25 * CONFIG_SYS_HZ) +#define CONFIG_SYS_FLASH_UNLOCK_TOUT (25 * CONFIG_SYS_HZ) #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 #define CONFIG_SYS_FLASH_PROTECTION 1 diff --git a/include/configs/palmtreo680.h b/include/configs/palmtreo680.h index ffb0d1e19a..5ffed82955 100644 --- a/include/configs/palmtreo680.h +++ b/include/configs/palmtreo680.h @@ -67,7 +67,6 @@ #define CONFIG_PXA_LCD #define CONFIG_ACX544AKN #define CONFIG_LCD_LOGO -#define CONFIG_SYS_LCD_PXA_NO_L_BIAS /* don't configure GPIO77 as L_BIAS */ #define LCD_BPP LCD_COLOR16 #define CONFIG_FB_ADDR 0x5c000000 /* internal SRAM */ #define CONFIG_CMD_BMP |