9
0
Fork 0

Merge branch 'for-next/misc'

This commit is contained in:
Sascha Hauer 2013-05-06 09:30:28 +02:00
commit c8af035b41
39 changed files with 221 additions and 98 deletions

View File

@ -667,9 +667,6 @@ define rule_barebox-modpost
$(Q)echo 'cmd_$@ := $(cmd_barebox-modpost)' > $(dot-target).cmd
endef
quiet_cmd_objcopy = OBJCOPY $@
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
OBJCOPYFLAGS_barebox.bin = -O binary
barebox.bin: barebox FORCE

View File

@ -0,0 +1 @@
../boot/ahci-boot

View File

@ -0,0 +1 @@
../boot/ahci

View File

@ -0,0 +1 @@
../boot/mmc-boot

View File

@ -0,0 +1 @@
../boot/mmc

View File

@ -0,0 +1 @@
../boot/net

View File

@ -0,0 +1 @@
../boot/net-eth1

21
arch/arm/boards/highbank/env/boot/ahci vendored Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "AHCI"
exit
fi
path="/mnt/ahci"
global.bootm.image="${path}/zImage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/sda2"

View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "AHCI (UEFI boot partiton)"
exit
fi
path="/mnt/ahci-boot"
global.bootm.image="${path}/zImage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/sda2"

21
arch/arm/boards/highbank/env/boot/mmc vendored Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "MMC slot"
exit
fi
path="/mnt/mmc"
global.bootm.image="${path}/zimage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"

View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "MMC slot (UEFI boot partiton)"
exit
fi
path="/mnt/mmc-boot"
global.bootm.image="${path}/zimage"
. /env/data/oftree
oftree=${path}/oftree
if [ -f $oftree ]; then
global.bootm.oftree="$oftree"
fi
# The rootdevice may actually be mmcblk1p2 if a card
# is inserted to the back MMC slot
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"

18
arch/arm/boards/highbank/env/boot/net vendored Normal file
View File

@ -0,0 +1,18 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "network (tftp, nfs) (eth0)"
exit
fi
ethact eth0
path="/mnt/tftp"
. /env/data/oftree
global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
bootargs-ip
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"

View File

@ -0,0 +1,18 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "network (tftp, nfs) (eth1)"
exit
fi
ethact eth1
path="/mnt/tftp"
. /env/data/oftree
global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
bootargs-ip
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"

View File

@ -1,33 +0,0 @@
#!/bin/sh
# use 'dhcp' to do dhcp in barebox and in kernel
# use 'none' if you want to skip kernel ip autoconfiguration
ip=dhcp
global.dhcp.vendor_id=barebox-highbank
# or set your networking parameters here
#eth0.ipaddr=a.b.c.d
#eth0.netmask=a.b.c.d
#eth0.gateway=a.b.c.d
#eth0.serverip=a.b.c.d
# can be either 'nfs', 'tftp' or 'nor'
kernel_loc=tftp
# can be either 'net', 'nor' or 'initrd'
rootfs_loc=initrd
# can be either 'jffs2' or 'ubifs'
rootfs_type=ubifs
rootfsimage=root.$rootfs_type
kernelimage=zImage
#kernelimage=uImage
#kernelimage=Image
#kernelimage=Image.lzo
autoboot_timeout=3
bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
# set a fancy prompt (if support is compiled in)
PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# "

View File

@ -0,0 +1,11 @@
#!/bin/sh
# board defaults, do not change in running system. Change /env/config
# instead
global.hostname=highbank
global.allow_color=true
global.autoboot_timeout=3
global.bootm.oftree="/dev/dtb"
global.linux.bootargs.base="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
global.boot.default=/env/boot.d

View File

@ -0,0 +1,4 @@
#!/bin/sh
#device tree provided by the firmware
global.bootm.oftree="/dev/dtb"

View File

@ -0,0 +1,27 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Automountpoints"
exit
fi
# automount tftp server based on $eth0.serverip
mkdir -p /mnt/tftp
automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
# SD card slot, boot partition
mkdir -p /mnt/mmc-boot
automount -d /mnt/mmc 'mount /dev/disk0.boot /mnt/mmc-boot'
# SD card slot, first partition
mkdir -p /mnt/mmc
automount -d /mnt/mmc 'mount /dev/disk0.0 /mnt/mmc'
# AHCI, boot partition
mkdir -p /mnt/ahci-boot
automount -d /mnt/ahci 'mount /dev/ata0.boot /mnt/ahci-boot'
# AHCI, first partition
mkdir -p /mnt/ahci
automount -d /mnt/ahci 'mount /dev/ata0.0 /mnt/ahci'

9
arch/arm/boards/highbank/env/init/ps1 vendored Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
/env/config
if [ ${global.allow_color} = "true" ]; then
export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m\n# "
else
export PS1="barebox@\h:\w\n# "
fi

View File

@ -7,7 +7,6 @@ CONFIG_CPU_V7=y
CONFIG_CPU_32v7=y
CONFIG_BOARDINFO="Phytec phyCARD-A-L1"
CONFIG_ARCH_OMAP3=y
CONFIG_OMAP_CLOCK_ALL=y
CONFIG_OMAP_CLOCK_SOURCE_S32K=y
CONFIG_OMAP3_CLOCK_CONFIG=y
CONFIG_OMAP3_COPY_CLOCK_SRAM=n

View File

@ -189,7 +189,7 @@ static int arm_mmu_remap_sdram(struct memory_bank *bank)
ptes, ttb_start, ttb_end);
for (i = 0; i < num_ptes; i++) {
ptes[i] = (phys + i * 4096) | PTE_TYPE_SMALL |
ptes[i] = (phys + i * PAGE_SIZE) | PTE_TYPE_SMALL |
pte_flags_cached;
}
@ -300,7 +300,7 @@ static int mmu_init(void)
asm volatile ("mcr p15,0,%0,c3,c0,0" : : "r"(i) /*:*/);
/* create a flat mapping using 1MiB sections */
create_sections(0, 0, 4096, PMD_SECT_AP_WRITE | PMD_SECT_AP_READ |
create_sections(0, 0, PAGE_SIZE, PMD_SECT_AP_WRITE | PMD_SECT_AP_READ |
PMD_TYPE_SECT);
vectors_init();
@ -332,7 +332,7 @@ void *dma_alloc_coherent(size_t size)
void *ret;
size = PAGE_ALIGN(size);
ret = xmemalign(4096, size);
ret = xmemalign(PAGE_SIZE, size);
dma_inv_range((unsigned long)ret, (unsigned long)ret + size);
@ -353,6 +353,7 @@ void *phys_to_virt(unsigned long phys)
void dma_free_coherent(void *mem, size_t size)
{
size = PAGE_ALIGN(size);
remap_range(mem, size, pte_flags_cached);
free(mem);

View File

@ -185,10 +185,10 @@ static struct at91_pinctrl_mux_ops at91sam9x5_ops = {
int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup)
{
struct at91_gpio_chip *at91_gpio = pin_to_controller(pin);
void __iomem *pio = at91_gpio->regbase;
void __iomem *pio;
struct device_d *dev;
unsigned mask = pin_to_mask(pin);
int bank = pin_to_bank(pin);
struct device_d *dev = at91_gpio->chip.dev;
if (!at91_gpio)
return -EINVAL;
@ -197,6 +197,7 @@ int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup)
if (!pio)
return -EINVAL;
dev = at91_gpio->chip.dev;
at91_mux_disable_interrupt(pio, mask);
pin %= MAX_NB_GPIO_PER_BANK;

View File

@ -120,12 +120,12 @@ void sam9_smc_read(int id, int cs, struct sam9_smc_config *config)
static int at91sam9_smc_probe(struct device_d *dev)
{
int id;
int id = dev->id;
if (dev->id < 0) {
if (id < 0) {
id = 0;
} else if (dev->id > 1) {
dev_warn(dev, ": id > 2\n");
} else if (id > 1) {
dev_warn(dev, "id > 1\n");
return -EIO;
}

View File

@ -12,6 +12,7 @@ choice
config MACH_HIGHBANK
bool "Calxeda Highbank"
select HAVE_DEFAULT_ENVIRONMENT_NEW
endchoice

View File

@ -17,9 +17,9 @@ config ARCH_TEXT_BASE
default 0x87f00000 if MACH_PCM043
default 0x08f80000 if MACH_SCB9328
default 0xa7e00000 if MACH_NESO
default 0x97f00000 if MACH_MX51_PDK
default 0x7ff00000 if MACH_MX53_LOCO
default 0x7ff00000 if MACH_MX53_SMD
default 0x97f00000 if MACH_FREESCALE_MX51_PDK
default 0x7ff00000 if MACH_FREESCALE_MX53_LOCO
default 0x7ff00000 if MACH_FREESCALE_MX53_SMD
default 0x87f00000 if MACH_GUF_CUPID
default 0x93d00000 if MACH_TX25
default 0x7ff00000 if MACH_TQMA53

View File

@ -9,35 +9,19 @@ config BOARDINFO
config NETX_SDRAM_CTRL
hex
default 0x010D0001 if MACH_NXDKN
default 0x010D0121 if MACH_NXDB500
default 0x030D0111 if MACH_NXHMIBB
default 0x010D0111 if MACH_NXEB500HMI
default 0x030D0001 if MACH_NXHX
config NETX_SDRAM_TIMING_CTRL
hex
default 0x03C12151 if MACH_NXDKN
default 0x03C13261 if MACH_NXDB500
default 0x03C13251 if MACH_NXHMIBB
default 0x03C13251 if MACH_NXEB500HMI
default 0x03C23251 if MACH_NXHX
config NETX_MEM_CTRL
hex
default 0x0103030F if MACH_NXDKN
default 0x0203030F if MACH_NXDB500
default 0x0103030F if MACH_NXHMIBB
default 0x0103030F if MACH_NXEB500HMI
default 0x0103030F if MACH_NXHX
config NETX_COOKIE
hex
default 16 if MACH_NXDKN
default 32 if MACH_NXDB500
default 16 if MACH_NXHMIBB
default 16 if MACH_NXEB500HMI
default 16 if MACH_NXHX
choice
prompt "Netx Board Type"

View File

@ -134,7 +134,6 @@ config MACH_BEAGLE
config MACH_BEAGLEBONE
bool "Texas Instrument's Beagle Bone"
select OMAP_CLOCK_ALL
depends on ARCH_AM33XX
help
Say Y here if you are using Beagle Bone
@ -179,7 +178,6 @@ config MACH_PCAAXL2
config MACH_PCM051
bool "Phytec phyCORE pcm051"
select OMAP_CLOCK_ALL
select HAVE_DEFAULT_ENVIRONMENT_NEW
depends on ARCH_AM33XX
help

View File

@ -652,12 +652,6 @@ void prcm_init(void)
/**
* @brief Enable the clks & power for perifs
*
* GPT2 Sysclk, ICLK,FCLK, 32k Sync is enabled by default
* Uses CONFIG_OMAP_CLOCK_UART to enable UART clocks
* Uses CONFIG_OMAP_CLOCK_I2C to enable I2C clocks
* Uses CONFIG_OMAP_CLOCK_ALL to enable All Clocks!
* - Not a wise idea in most cases
*
* @return void
*/
static void per_clocks_enable(void)

View File

@ -356,12 +356,12 @@ config CMD_MEMSET
config CMD_CRC
tristate
select CRC32
prompt "crc"
prompt "crc32"
config CMD_CRC_CMP
tristate
depends on CMD_CRC
prompt "compare 2 files crc"
prompt "compare 2 files using crc32"
config CMD_DIGEST
tristate

View File

@ -127,9 +127,6 @@ static int bootm_open_initrd_uimage(struct image_data *data)
data->initrd = data->os;
}
if (data->initrd_address == UIMAGE_SOME_ADDRESS)
data->initrd_address = data->initrd->header.ih_load;
return 0;
}
@ -256,7 +253,7 @@ static int do_bootm(int argc, char *argv[])
memset(&data, 0, sizeof(struct image_data));
data.initrd_address = UIMAGE_SOME_ADDRESS;
data.initrd_address = UIMAGE_INVALID_ADDRESS;
data.os_address = UIMAGE_SOME_ADDRESS;
data.verify = 0;
data.verbose = 0;
@ -408,8 +405,6 @@ static int do_bootm(int argc, char *argv[])
#endif
if (data.os_address == UIMAGE_SOME_ADDRESS)
data.os_address = UIMAGE_INVALID_ADDRESS;
if (data.initrd_address == UIMAGE_SOME_ADDRESS)
data.initrd_address = UIMAGE_INVALID_ADDRESS;
handler = bootm_find_handler(os_type, &data);
if (!handler) {

View File

@ -45,7 +45,7 @@ static int do_i2c_probe(int argc, char *argv[])
if (stopaddr > 0x7F)
stopaddr = 0x7F;
printf("probing i2c range 0X%02x - 0x%02x :\n", startaddr, stopaddr);
printf("probing i2c range 0x%02x - 0x%02x :\n", startaddr, stopaddr);
for (addr = startaddr; addr <= stopaddr; addr++) {
client.addr = addr;
ret = i2c_write_reg(&client, 0x00, &reg, 0);

View File

@ -16,12 +16,6 @@ global editcmd=sedit
[ -e /env/config-board ] && /env/config-board
/env/config
if [ -e /env/menu ]; then
echo -e -n "\nHit m for menu or any other key to stop autoboot: "
else
echo -e -n "\nHit any key to stop autoboot: "
fi
# allow to stop the boot before execute the /env/init/*
# but without waiting
timeout -s -a -v key 0
@ -34,6 +28,12 @@ for i in /env/init/*; do
. $i
done
if [ -e /env/menu ]; then
echo -e -n "\nHit m for menu or any other key to stop autoboot: "
else
echo -e -n "\nHit any key to stop autoboot: "
fi
timeout -a $global.autoboot_timeout -v key
autoboot="$?"

View File

@ -8,7 +8,12 @@ fi
path="/mnt/tftp"
global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
oftree="${path}/${global.user}-oftree-${global.hostname}"
if [ -f "${oftree}" ]; then
global.bootm.oftree="$oftree"
fi
nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
bootargs-ip
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"

View File

@ -35,7 +35,6 @@ config DISK_ATA
config DISK_AHCI
bool "AHCI support"
select DISK_ATA
select DISK_DRIVE
config DISK_AHCI_IMX
depends on ARCH_IMX

View File

@ -262,11 +262,13 @@ static int atmci_read_response(struct atmel_mci *host, unsigned int stat)
{
struct mci_cmd *cmd = host->cmd;
int i;
u32 *resp = (u32 *)cmd->response;
u32 *resp;
if (!cmd)
return 0;
resp = (u32 *)cmd->response;
if (stat & (ATMCI_RTOE | ATMCI_DTOE)) {
dev_err(host->hw_dev, "command/data timeout\n");
return -ETIMEDOUT;

View File

@ -225,12 +225,13 @@ static int mxcmci_read_response(struct mxcmci_host *host, unsigned int stat)
{
struct mci_cmd *cmd = host->cmd;
int i;
u32 a, b, c;
u32 *resp = (u32 *)cmd->response;
u32 a, b, c, *resp;
if (!cmd)
return 0;
resp = (u32 *)cmd->response;
if (stat & STATUS_TIME_OUT_RESP) {
printf("CMD TIMEOUT\n");
return -ETIMEDOUT;

View File

@ -91,7 +91,7 @@ static void *create_bbt(struct mtd_info *mtd)
buf = malloc(mtd->writesize);
if (!buf) {
ret = -ENOMEM;
goto out;
goto out2;
}
numblocks = mtd->size >> (chip->bbt_erase_shift - 1);
@ -99,7 +99,7 @@ static void *create_bbt(struct mtd_info *mtd)
for (i = 0; i < numblocks;) {
ret = checkbad(mtd, from, buf);
if (ret < 0)
goto out;
goto out1;
if (ret) {
bbt[i >> 3] |= 0x03 << (i & 0x6);
@ -112,8 +112,11 @@ static void *create_bbt(struct mtd_info *mtd)
}
return bbt;
out:
out1:
free(buf);
out2:
free(bbt);
return ERR_PTR(ret);
}

View File

@ -196,7 +196,6 @@ struct usb_driver {
extern struct bus_type usb_bus_type;
int usb_driver_register(struct usb_driver *);
int usb_driver_unregister(struct usb_driver *);
struct usb_host {
int (*init)(struct usb_host *);

View File

@ -209,7 +209,7 @@ our $typeTypedefs = qr{(?x:
)};
our $logFunctions = qr{(?x:
printk|
printk|printf|
pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)|
(dev|netdev|netif)_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)|
WARN|