Skip to content

Commit

Permalink
Merge u-boot/master into u-boot-ti/master
Browse files Browse the repository at this point in the history
In master we had already taken a patch to fix the davinci GPIO code for
CONFIG_SOC_DM646X and in u-boot-ti we have additional patches to support
DA830 (which is CONFIG_SOC_DA8XX && !CONFIG_SOC_DA850).  Resolve these
conflicts manually and comment the #else/#endif lines for clarity.

Conflicts:
	arch/arm/include/asm/arch-davinci/gpio.h
	drivers/gpio/da8xx_gpio.c

Signed-off-by: Tom Rini <trini@ti.com>
  • Loading branch information
trini committed Mar 11, 2013
2 parents de62688 + fc95908 commit 76b40ab
Show file tree
Hide file tree
Showing 170 changed files with 6,801 additions and 2,275 deletions.
3 changes: 2 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
# Board CPU #
#########################################################################

Mike Frysinger <vapier@gentoo.org>
Sonic Zhang <sonic.adi@gmail.com>
Blackfin Team <u-boot-devel@blackfin.uclinux.org>

BF506F-EZKIT BF506
Expand All @@ -1244,6 +1244,7 @@ Blackfin Team <u-boot-devel@blackfin.uclinux.org>
BF538F-EZKIT BF538
BF548-EZKIT BF548
BF561-EZKIT BF561
BF609-EZKIT BF609

M.Hasewinkel (MHA) <info@ssv-embedded.de>

Expand Down
32 changes: 25 additions & 7 deletions MAKEALL
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ usage()
Environment variables:
BUILD_NCPUS number of parallel make jobs (default: auto)
CROSS_COMPILE cross-compiler toolchain prefix (default: "")
CROSS_COMPILE_<ARCH> cross-compiler toolchain prefix for
architecture "ARCH". Substitute "ARCH" for any
supported architecture (default: "")
MAKEALL_LOGDIR output all logs to here (default: ./LOG/)
BUILD_DIR output build directory (default: ./)
BUILD_NBUILDS number of parallel targets (default: 1)
Expand Down Expand Up @@ -180,13 +183,6 @@ else
JOBS=""
fi


if [ "${CROSS_COMPILE}" ] ; then
MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
else
MAKE=make
fi

if [ "${MAKEALL_LOGDIR}" ] ; then
LOG_DIR=${MAKEALL_LOGDIR}
else
Expand Down Expand Up @@ -585,6 +581,18 @@ get_target_maintainers() {
echo "$mail"
}

get_target_arch() {
local target=$1

# Automatic mode
local line=`egrep -i "^[[:space:]]*${target}[[:space:]]" boards.cfg`

if [ -z "${line}" ] ; then echo "" ; return ; fi

set ${line}
echo "$2"
}

list_target() {
if [ "$PRINT_MAINTS" != 'y' ] ; then
echo "$1"
Expand Down Expand Up @@ -655,6 +663,16 @@ build_target() {

export BUILD_DIR="${output_dir}"

target_arch=$(get_target_arch ${target})
eval cross_toolchain=\$CROSS_COMPILE_${target_arch^^}
if [ "${cross_toolchain}" ] ; then
MAKE="make CROSS_COMPILE=${cross_toolchain}"
elif [ "${CROSS_COMPILE}" ] ; then
MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
else
MAKE=make
fi

${MAKE} distclean >/dev/null
${MAKE} -s ${target}_config

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#

VERSION = 2013
PATCHLEVEL = 01
PATCHLEVEL = 04
SUBLEVEL =
EXTRAVERSION =
EXTRAVERSION = -rc1
ifneq "$(SUBLEVEL)" ""
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
else
Expand Down Expand Up @@ -264,6 +264,7 @@ LIBS-y += fs/libfs.o \
fs/fdos/libfdos.o \
fs/jffs2/libjffs2.o \
fs/reiserfs/libreiserfs.o \
fs/sandbox/libsandboxfs.o \
fs/ubifs/libubifs.o \
fs/yaffs2/libyaffs2.o \
fs/zfs/libzfs.o
Expand Down
13 changes: 12 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,8 @@ The following options need to be configured:
CONFIG_CMD_I2C * I2C serial bus support
CONFIG_CMD_IDE * IDE harddisk support
CONFIG_CMD_IMI iminfo
CONFIG_CMD_IMLS List all found images
CONFIG_CMD_IMLS List all images found in NOR flash
CONFIG_CMD_IMLS_NAND List all images found in NAND flash
CONFIG_CMD_IMMAP * IMMR dump support
CONFIG_CMD_IMPORTENV * import an environment
CONFIG_CMD_INI * import data from an ini file into the env
Expand Down Expand Up @@ -876,6 +877,7 @@ The following options need to be configured:
CONFIG_CMD_READ * Read raw data from partition
CONFIG_CMD_REGINFO * Register dump
CONFIG_CMD_RUN run command in env variable
CONFIG_CMD_SANDBOX * sb command to access sandbox features
CONFIG_CMD_SAVES * save S record dump
CONFIG_CMD_SCSI * SCSI Support
CONFIG_CMD_SDRAM * print SDRAM configuration information
Expand Down Expand Up @@ -3829,6 +3831,15 @@ Low Level (hardware related) configuration options:
that is executed before the actual U-Boot. E.g. when
compiling a NAND SPL.

- CONFIG_ARCH_MAP_SYSMEM
Generally U-Boot (and in particular the md command) uses
effective address. It is therefore not necessary to regard
U-Boot address as virtual addresses that need to be translated
to physical addresses. However, sandbox requires this, since
it maintains its own little RAM buffer which contains all
addressable memory. This option causes some memory accesses
to be mapped through map_sysmem() / unmap_sysmem().

- CONFIG_USE_ARCH_MEMCPY
CONFIG_USE_ARCH_MEMSET
If these options are used a optimized version of memcpy/memset will
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/cpu/arm926ejs/davinci/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr)
int ret;

ret = eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr);
if (ret) {
if (!ret) {
/*
* There is no MAC address in the environment, so we
* initialize it from the value in the EEPROM.
Expand All @@ -115,7 +115,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr)
ret = !eth_setenv_enetaddr("ethaddr", rom_enetaddr);
}
if (!ret)
printf("Failed to set mac address from EEPROM\n");
printf("Failed to set mac address from EEPROM: %d\n", ret);
}
#endif /* CONFIG_DRIVER_TI_EMAC */

Expand Down
5 changes: 4 additions & 1 deletion arch/arm/include/asm/arch-davinci/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ struct davinci_gpio_bank {

#define gpio_status() gpio_info()
#define GPIO_NAME_SIZE 20
#if defined(CONFIG_SOC_DA8XX) && !defined(CONFIG_SOC_DA850)
#if defined(CONFIG_SOC_DM644X)
/* GPIO0 to GPIO53, omit the V3.3 volts one */
#define MAX_NUM_GPIOS 70
#elif defined(CONFIG_SOC_DA8XX) && !defined(CONFIG_SOC_DA850)
#define MAX_NUM_GPIOS 128
#else
#define MAX_NUM_GPIOS 144
Expand Down
1 change: 0 additions & 1 deletion arch/avr32/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
/* The malloc area is right below the monitor image in RAM */
mem_malloc_init(CONFIG_SYS_MONITOR_BASE + gd->reloc_off -
CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN);
malloc_bin_reloc();
dma_alloc_init();

enable_interrupts();
Expand Down
4 changes: 3 additions & 1 deletion arch/blackfin/cpu/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
/* Reset upon a double exception rather than just hanging.
* Do not do bfin_read on SWRST as that will reset status bits.
*/
# ifdef SWRST
bfin_write_SWRST(DOUBLE_FAULT);
# endif
#endif

serial_early_puts("Board init flash\n");
Expand All @@ -92,7 +94,7 @@ int irq_init(void)
#elif defined(SICA_IMASK0)
bfin_write_SICA_IMASK0(0);
bfin_write_SICA_IMASK1(0);
#else
#elif defined(SIC_IMASK)
bfin_write_SIC_IMASK(0);
#endif
/* Set up a dummy NMI handler if needed. */
Expand Down
36 changes: 29 additions & 7 deletions arch/blackfin/cpu/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ static struct gpio_port_t * const gpio_array[] = {
(struct gpio_port_t *)PORTH_FER,
(struct gpio_port_t *)PORTI_FER,
(struct gpio_port_t *)PORTJ_FER,
#elif defined(CONFIG_BF60x)
(struct gpio_port_t *)PORTA_FER,
(struct gpio_port_t *)PORTB_FER,
(struct gpio_port_t *)PORTC_FER,
(struct gpio_port_t *)PORTD_FER,
(struct gpio_port_t *)PORTE_FER,
(struct gpio_port_t *)PORTF_FER,
(struct gpio_port_t *)PORTG_FER,
#else
# error no gpio arrays defined
#endif
Expand Down Expand Up @@ -216,6 +224,12 @@ static void port_setup(unsigned gpio, unsigned short usage)
else
gpio_array[gpio_bank(gpio)]->port_fer |= gpio_bit(gpio);
SSYNC();
#elif defined(CONFIG_BF60x)
if (usage == GPIO_USAGE)
gpio_array[gpio_bank(gpio)]->port_fer_clear = gpio_bit(gpio);
else
gpio_array[gpio_bank(gpio)]->port_fer_set = gpio_bit(gpio);
SSYNC();
#endif
}

Expand Down Expand Up @@ -290,7 +304,7 @@ static void portmux_setup(unsigned short per)
}
}
}
#elif defined(CONFIG_BF54x)
#elif defined(CONFIG_BF54x) || defined(CONFIG_BF60x)
inline void portmux_setup(unsigned short per)
{
u32 pmux;
Expand Down Expand Up @@ -330,7 +344,7 @@ inline void portmux_setup(unsigned short per)
# define portmux_setup(...) do { } while (0)
#endif

#ifndef CONFIG_BF54x
#if !defined(CONFIG_BF54x) && !defined(CONFIG_BF60x)
/***********************************************************
*
* FUNCTIONS: Blackfin General Purpose Ports Access Functions
Expand Down Expand Up @@ -534,7 +548,7 @@ int peripheral_request(unsigned short per, const char *label)
* be requested and used by several drivers
*/

#ifdef CONFIG_BF54x
#if defined(CONFIG_BF54x) || defined(CONFIG_BF60x)
if (!((per & P_MAYSHARE) && get_portmux(per) == P_FUNCT2MUX(per))) {
#else
if (!(per & P_MAYSHARE)) {
Expand Down Expand Up @@ -651,7 +665,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
gpio, get_label(gpio));
return -EBUSY;
}
#ifndef CONFIG_BF54x
#if !defined(CONFIG_BF54x) && !defined(CONFIG_BF60x)
else { /* Reset POLAR setting when acquiring a gpio for the first time */
set_gpio_polar(gpio, 0);
}
Expand Down Expand Up @@ -732,12 +746,16 @@ void bfin_special_gpio_free(unsigned gpio)

static inline void __bfin_gpio_direction_input(unsigned gpio)
{
#ifdef CONFIG_BF54x
#if defined(CONFIG_BF54x) || defined(CONFIG_BF60x)
gpio_array[gpio_bank(gpio)]->dir_clear = gpio_bit(gpio);
#else
gpio_array[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio);
#endif
#if defined(CONFIG_BF60x)
gpio_array[gpio_bank(gpio)]->inen_set = gpio_bit(gpio);
#else
gpio_array[gpio_bank(gpio)]->inen |= gpio_bit(gpio);
#endif
}

int bfin_gpio_direction_input(unsigned gpio)
Expand Down Expand Up @@ -785,9 +803,13 @@ int bfin_gpio_direction_output(unsigned gpio, int value)

local_irq_save(flags);

#if defined(CONFIG_BF60x)
gpio_array[gpio_bank(gpio)]->inen_clear = gpio_bit(gpio);
#else
gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
#endif
gpio_set_value(gpio, value);
#ifdef CONFIG_BF54x
#if defined(CONFIG_BF54x) || defined(CONFIG_BF60x)
gpio_array[gpio_bank(gpio)]->dir_set = gpio_bit(gpio);
#else
gpio_array[gpio_bank(gpio)]->dir |= gpio_bit(gpio);
Expand All @@ -801,7 +823,7 @@ int bfin_gpio_direction_output(unsigned gpio, int value)

int bfin_gpio_get_value(unsigned gpio)
{
#ifdef CONFIG_BF54x
#if defined(CONFIG_BF54x) || defined(CONFIG_BF60x)
return (1 & (gpio_array[gpio_bank(gpio)]->data >> gpio_sub_n(gpio)));
#else
unsigned long flags;
Expand Down
Loading

0 comments on commit 76b40ab

Please sign in to comment.