9
0
Fork 0

Merge branch 'master' into next

This commit is contained in:
Sascha Hauer 2011-06-20 09:08:13 +02:00
commit c6abd61fa8
21 changed files with 74 additions and 55 deletions

View File

@ -1,5 +1,5 @@
VERSION = 2011
PATCHLEVEL = 04
PATCHLEVEL = 06
SUBLEVEL = 0
EXTRAVERSION =
NAME = Amissive Actinocutious Kiwi

View File

@ -23,4 +23,6 @@ CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
CONFIG_MCI_OMAP_HSMMC=y
# CONFIG_FS_RAMFS is not set
# CONFIG_FS_DEVFS is not set
CONFIG_FS_FAT=y

View File

@ -1,4 +1,4 @@
CPPFLAGS += -fno-strict-aliasing
CPPFLAGS += -fno-strict-aliasing -mno-hw-mul
board-$(CONFIG_GENERIC) := generic

View File

@ -4,6 +4,9 @@
kernel=flash
root=flash
kernel_loc=nor
kernelimage_type=uimage
# use 'dhcp' todo dhcp in barebox and in kernel
ip=none
@ -11,6 +14,8 @@ autoboot_timeout=3
nor_parts="256k(barebox),128k(env),4M(kernel),-(rootfs)"
bootargs="console=ttyS0,9600"
# set a fancy prompt (if support is compiled in)
PS1="\e[1;33mbarebox@\e[1;32mgeneric:\w\e[0m "

View File

@ -48,7 +48,7 @@ static struct device_d epcs_flash_device = {
};
*/
static int comBoard_devices_init(void)
static int generic_devices_init(void)
{
register_device(&cfi_dev);
register_device(&ram_dev);
@ -63,7 +63,7 @@ static int comBoard_devices_init(void)
return 0;
}
device_initcall(comBoard_devices_init);
device_initcall(generic_devices_init);
static int altera_console_init(void)

View File

@ -28,7 +28,7 @@
*/
#define CPU_IMPLEMENTATION "fast"
#define BIG_ENDIAN 0
#define CPU_FREQ 50000000
#define CPU_FREQ 100000000
#define ICACHE_LINE_SIZE 32
#define ICACHE_LINE_SIZE_LOG2 5
#define ICACHE_SIZE 8192
@ -221,7 +221,7 @@
#define SGDMA_TX_BASE 0x4204400
#define SGDMA_TX_SPAN 64
#define SGDMA_TX_END 0x420443f
#define SGDMA_TX_IRQ 0
#define SGDMA_TX_IRQ 5
#define SGDMA_TX_READ_BLOCK_DATA_WIDTH 32
#define SGDMA_TX_WRITE_BLOCK_DATA_WIDTH 32
#define SGDMA_TX_STREAM_DATA_WIDTH 32
@ -336,7 +336,7 @@
#define UART_USE_EOP_REGISTER 0
#define UART_SIM_TRUE_BAUD 0
#define UART_SIM_CHAR_STREAM ""
#define UART_FREQ 50000000
#define UART_FREQ 100000000
/*
* Macros for device 'SYS_CLK_TIMER', class 'altera_avalon_timer'
@ -356,8 +356,8 @@
#define SYS_CLK_TIMER_PERIOD_UNITS "ms"
#define SYS_CLK_TIMER_RESET_OUTPUT 0
#define SYS_CLK_TIMER_TIMEOUT_PULSE_OUTPUT 0
#define SYS_CLK_TIMER_FREQ 50000000
#define SYS_CLK_TIMER_LOAD_VALUE 49999ULL
#define SYS_CLK_TIMER_FREQ 100000000
#define SYS_CLK_TIMER_LOAD_VALUE 99999ULL
#define SYS_CLK_TIMER_COUNTER_SIZE 32
#define SYS_CLK_TIMER_MULT 0.0010
#define SYS_CLK_TIMER_TICKS_PER_SEC 1000
@ -384,7 +384,7 @@
#define LED_STATUS_RESET_VALUE 0x3
#define LED_STATUS_EDGE_TYPE "NONE"
#define LED_STATUS_IRQ_TYPE "NONE"
#define LED_STATUS_FREQ 50000000
#define LED_STATUS_FREQ 100000000
/*
* Macros for device 'JTAG_UART', class 'altera_avalon_jtag_uart'

View File

@ -15,7 +15,7 @@ static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
void *addr = malloc(len + DCACHE_LINE_SIZE);
if (!addr)
return 0;
flush_dcache_range((unsigned long)addr, len + DCACHE_LINE_SIZE);
flush_dcache_range((unsigned long)addr,(unsigned long)addr + len + DCACHE_LINE_SIZE);
*handle = ((unsigned long)addr +
(DCACHE_LINE_SIZE - 1)) &
~(DCACHE_LINE_SIZE - 1) & ~(IO_REGION_BASE);

View File

@ -110,6 +110,7 @@ int barebox_register_filedev(struct hf_platform_data *hf)
strcpy(dev->name, "hostfile");
dev->size = hf->size;
dev->id = -1;
dev->map_base = hf->map_base;
return register_device(dev);

View File

@ -0,0 +1,6 @@
#ifndef _ASM_SWAB_H
#define _ASM_SWAB_H
/* nothing. use generic functions */
#endif /* _ASM_SWAB_H */

View File

@ -150,7 +150,7 @@ BAREBOX_CMD_HELP_OPT ("-f <file>", "Use file instead of memory.\n")
#ifdef CONFIG_CMD_CRC_CMP
BAREBOX_CMD_HELP_OPT ("-F <file>", "Use file to compare.\n")
#endif
BAREBOX_CMD_HELP_OPT ("-v <crc>", "Verfify\n")
BAREBOX_CMD_HELP_OPT ("-v <crc>", "Verify\n")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(crc32)

View File

@ -189,6 +189,20 @@ static int getc_raw(void)
}
}
static int tstc_raw(void)
{
struct console_device *cdev;
for_each_console(cdev) {
if (!(cdev->f_active & CONSOLE_STDIN))
continue;
if (cdev->tstc(cdev))
return 1;
}
return 0;
}
int getc(void)
{
unsigned char ch;
@ -203,7 +217,7 @@ int getc(void)
while (1) {
poller_call();
if (tstc()) {
if (tstc_raw()) {
kfifo_putc(console_input_buffer, getc_raw());
start = get_time_ns();
@ -230,16 +244,7 @@ EXPORT_SYMBOL(fgetc);
int tstc(void)
{
struct console_device *cdev;
for_each_console(cdev) {
if (!(cdev->f_active & CONSOLE_STDIN))
continue;
if (cdev->tstc(cdev))
return 1;
}
return 0;
return kfifo_len(console_input_buffer) || tstc_raw();
}
EXPORT_SYMBOL(tstc);

View File

@ -205,7 +205,7 @@ int setenv(const char *_name, const char *value)
struct variable_d *var;
int ret = 0;
if (!*value)
if (value && !*value)
value = NULL;

View File

@ -35,16 +35,16 @@ unprotect $part
echo
echo "erasing partition $part"
echo
erase $part
erase $part || exit 1
echo
echo "flashing $image to $part"
echo
if [ x$mode = xtftp ]; then
tftp $image $part
tftp $image $part || exit 1
else
cp $image $part
cp $image $part || exit 1
fi
protect $part

View File

@ -957,7 +957,7 @@ static int mci_sd_write(struct device_d *disk_dev, uint64_t sector_start,
struct mci *mci = GET_MCI_DATA(mci_dev);
int rc;
pr_debug("%s: Write %u block(s), starting at %u",
pr_debug("%s: Write %u block(s), starting at %u\n",
__func__, sector_count, (unsigned)sector_start);
if (mci->write_bl_len != 512) {

View File

@ -654,6 +654,8 @@ static int omap_gpmc_eccmode_set(struct device_d *dev, struct param_d *param, co
return -EINVAL;
}
dev_param_set_generic(dev, param, ecc_mode_strings[i]);
return omap_gpmc_eccmode(oinfo, i);
}
@ -811,7 +813,9 @@ static int gpmc_nand_probe(struct device_d *pdev)
}
nand->options |= NAND_SKIP_BBTSCAN;
omap_gpmc_eccmode(oinfo, pdata->ecc_mode);
dev_add_param(pdev, "eccmode", omap_gpmc_eccmode_set, NULL, 0);
dev_set_param(pdev, "eccmode", ecc_mode_strings[pdata->ecc_mode]);
/* We are all set to register with the system now! */
err = add_mtd_device(minfo);
@ -820,8 +824,6 @@ static int gpmc_nand_probe(struct device_d *pdev)
goto out_release_mem;
}
dev_add_param(pdev, "eccmode", omap_gpmc_eccmode_set, NULL, 0);
return 0;
out_release_mem:

View File

@ -303,9 +303,9 @@ int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
(chip->pagebuf << chip->page_shift) < (to + ops->len))
chip->pagebuf = -1;
/* If we're not given explicit OOB data, let it be 0xFF */
if (likely(!oob))
memset(chip->oob_poi, 0xff, mtd->oobsize);
/* Initialize to all 0xFF, to avoid the possibility of
left over OOB data from a previous OOB read. */
memset(chip->oob_poi, 0xff, mtd->oobsize);
while(1) {
int bytes = mtd->writesize;

View File

@ -526,7 +526,7 @@ static int tse_probe(struct device_d *dev)
tx_desc = (struct alt_sgdma_descriptor *)NIOS_SOPC_TSE_DESC_MEM_BASE;
rx_desc = tx_desc + 2;
#else
tx_desc = dma_alloc_coherent(sizeof(*tx_desc) * (3 + PKTBUFSRX), &dma_handle);
tx_desc = dma_alloc_coherent(sizeof(*tx_desc) * (3 + PKTBUFSRX), (unsigned long *)&dma_handle);
rx_desc = tx_desc + 2;
if (!tx_desc) {

View File

@ -745,7 +745,7 @@ int usb_get_class_descriptor(struct usb_device *dev, int ifnum,
/********************************************************************
* get string index in buffer
*/
int usb_get_string(struct usb_device *dev, unsigned short langid,
static int usb_get_string(struct usb_device *dev, unsigned short langid,
unsigned char index, void *buf, int size)
{
int i;
@ -884,42 +884,35 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
#define USB_HUB_PRINTF(fmt, args...)
#endif
int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size)
static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size)
{
return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB,
USB_DT_HUB << 8, 0, data, size, USB_CNTL_TIMEOUT);
}
int usb_clear_hub_feature(struct usb_device *dev, int feature)
{
return usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature,
0, NULL, 0, USB_CNTL_TIMEOUT);
}
int usb_clear_port_feature(struct usb_device *dev, int port, int feature)
static int usb_clear_port_feature(struct usb_device *dev, int port, int feature)
{
return usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
USB_REQ_CLEAR_FEATURE, USB_RT_PORT, feature,
port, NULL, 0, USB_CNTL_TIMEOUT);
}
int usb_set_port_feature(struct usb_device *dev, int port, int feature)
static int usb_set_port_feature(struct usb_device *dev, int port, int feature)
{
return usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
USB_REQ_SET_FEATURE, USB_RT_PORT, feature,
port, NULL, 0, USB_CNTL_TIMEOUT);
}
int usb_get_hub_status(struct usb_device *dev, void *data)
static int usb_get_hub_status(struct usb_device *dev, void *data)
{
return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0,
data, sizeof(struct usb_hub_status), USB_CNTL_TIMEOUT);
}
int usb_get_port_status(struct usb_device *dev, int port, void *data)
static int usb_get_port_status(struct usb_device *dev, int port, void *data)
{
return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port,
@ -1068,7 +1061,7 @@ static void usb_hub_port_connect_change(struct usb_device *dev, int port)
}
int usb_hub_configure(struct usb_device *dev)
static int usb_hub_configure(struct usb_device *dev)
{
unsigned char buffer[USB_BUFSIZ], *bitmap;
struct usb_hub_descriptor *descriptor;
@ -1284,7 +1277,7 @@ int usb_driver_register(struct usb_driver *drv)
}
/* returns 0 if no match, 1 if match */
int usb_match_device(struct usb_device *dev, const struct usb_device_id *id)
static int usb_match_device(struct usb_device *dev, const struct usb_device_id *id)
{
if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) &&
id->idVendor != le16_to_cpu(dev->descriptor.idVendor))
@ -1298,7 +1291,7 @@ int usb_match_device(struct usb_device *dev, const struct usb_device_id *id)
}
/* returns 0 if no match, 1 if match */
int usb_match_one_id(struct usb_device *usbdev,
static int usb_match_one_id(struct usb_device *usbdev,
const struct usb_device_id *id)
{
/* proc_connectinfo in devio.c may call us with id == NULL. */
@ -1312,7 +1305,7 @@ int usb_match_one_id(struct usb_device *usbdev,
}
EXPORT_SYMBOL(usb_match_one_id);
const struct usb_device_id *usb_match_id(struct usb_device *usbdev,
static const struct usb_device_id *usb_match_id(struct usb_device *usbdev,
const struct usb_device_id *id)
{
/* proc_connectinfo in devio.c may call us with id == NULL. */

View File

@ -311,8 +311,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
le16_to_cpu(req->value), le16_to_cpu(req->value),
le16_to_cpu(req->index));
memset(&__qh, sizeof(struct QH), 0);
memset(&__td, sizeof(struct qTD) * 3, 0);
memset(&__qh, 0, sizeof(struct QH));
memset(&__td, 0, sizeof(struct qTD) * 3);
qh = &__qh;
qh->qh_link = cpu_to_hc32((uint32_t)ehci->qh_list | QH_LINK_TYPE_QH);
@ -503,7 +503,7 @@ static inline int min3(int a, int b, int c)
return a;
}
int
static int
ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
int length, struct devrequest *req)
{

View File

@ -20,6 +20,8 @@
#define printk printf
#define pr_warn pr_warning
#define __init
#define MODULE_AUTHOR(x)

View File

@ -13,6 +13,9 @@ tempdir=$(mktemp -d)
for i in $*; do
cp -r $i/* $tempdir
done
find $tempdir -name '.svn' -o -name '*~' | xargs --no-run-if-empty rm -r
$objtree/scripts/bareboxenv -s $tempdir $objtree/barebox_default_env
rm -r $tempdir