summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--arch/arm/configs/panda_xload_defconfig2
-rw-r--r--arch/nios2/Makefile2
-rw-r--r--arch/nios2/boards/generic/env/config5
-rw-r--r--arch/nios2/boards/generic/generic.c4
-rw-r--r--arch/nios2/boards/generic/nios_sopc.h12
-rw-r--r--arch/nios2/include/asm/dma-mapping.h2
-rw-r--r--arch/sandbox/board/hostfile.c1
-rw-r--r--arch/sandbox/include/asm/swab.h6
-rw-r--r--commands/crc.c2
-rw-r--r--common/console.c27
-rw-r--r--common/env.c2
-rw-r--r--defaultenv/bin/_update6
-rw-r--r--drivers/mci/mci-core.c2
-rw-r--r--drivers/mtd/nand/nand_omap_gpmc.c8
-rw-r--r--drivers/mtd/nand/nand_write.c6
-rw-r--r--drivers/net/altera_tse.c2
-rw-r--r--drivers/usb/core/usb.c27
-rw-r--r--drivers/usb/host/ehci-hcd.c6
-rw-r--r--include/linux/barebox-wrapper.h2
-rwxr-xr-xscripts/genenv3
21 files changed, 74 insertions, 55 deletions
diff --git a/Makefile b/Makefile
index 07176925e5..1647ce94b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
VERSION = 2011
-PATCHLEVEL = 04
+PATCHLEVEL = 06
SUBLEVEL = 0
EXTRAVERSION =
NAME = Amissive Actinocutious Kiwi
diff --git a/arch/arm/configs/panda_xload_defconfig b/arch/arm/configs/panda_xload_defconfig
index 24452a673c..f8f0ae9c8c 100644
--- a/arch/arm/configs/panda_xload_defconfig
+++ b/arch/arm/configs/panda_xload_defconfig
@@ -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
diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
index 6603da5ea1..b94e07465b 100644
--- a/arch/nios2/Makefile
+++ b/arch/nios2/Makefile
@@ -1,4 +1,4 @@
-CPPFLAGS += -fno-strict-aliasing
+CPPFLAGS += -fno-strict-aliasing -mno-hw-mul
board-$(CONFIG_GENERIC) := generic
diff --git a/arch/nios2/boards/generic/env/config b/arch/nios2/boards/generic/env/config
index df7d09e85f..5d23098390 100644
--- a/arch/nios2/boards/generic/env/config
+++ b/arch/nios2/boards/generic/env/config
@@ -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 "
diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c
index 7e939ce22f..4f7e7479e2 100644
--- a/arch/nios2/boards/generic/generic.c
+++ b/arch/nios2/boards/generic/generic.c
@@ -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)
diff --git a/arch/nios2/boards/generic/nios_sopc.h b/arch/nios2/boards/generic/nios_sopc.h
index 5ee3642d0c..688bc44f41 100644
--- a/arch/nios2/boards/generic/nios_sopc.h
+++ b/arch/nios2/boards/generic/nios_sopc.h
@@ -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'
diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h
index 49ebf798af..5b70f4cead 100644
--- a/arch/nios2/include/asm/dma-mapping.h
+++ b/arch/nios2/include/asm/dma-mapping.h
@@ -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);
diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c
index dbaadcc9c9..b049baa0a1 100644
--- a/arch/sandbox/board/hostfile.c
+++ b/arch/sandbox/board/hostfile.c
@@ -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);
diff --git a/arch/sandbox/include/asm/swab.h b/arch/sandbox/include/asm/swab.h
index e69de29bb2..60a90120b6 100644
--- a/arch/sandbox/include/asm/swab.h
+++ b/arch/sandbox/include/asm/swab.h
@@ -0,0 +1,6 @@
+#ifndef _ASM_SWAB_H
+#define _ASM_SWAB_H
+
+/* nothing. use generic functions */
+
+#endif /* _ASM_SWAB_H */
diff --git a/commands/crc.c b/commands/crc.c
index 993074c746..01fedd7c65 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -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)
diff --git a/common/console.c b/common/console.c
index d33a249c92..d60e57fc42 100644
--- a/common/console.c
+++ b/common/console.c
@@ -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);
diff --git a/common/env.c b/common/env.c
index b72b5d1f4a..47cef05484 100644
--- a/common/env.c
+++ b/common/env.c
@@ -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;
diff --git a/defaultenv/bin/_update b/defaultenv/bin/_update
index f736acc744..1bcb71c9b2 100644
--- a/defaultenv/bin/_update
+++ b/defaultenv/bin/_update
@@ -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
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index a06c997e4a..1c16cf15d7 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -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) {
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index fc48551445..4a2d561dde 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -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:
diff --git a/drivers/mtd/nand/nand_write.c b/drivers/mtd/nand/nand_write.c
index 89dc47b35d..3ede8d02f0 100644
--- a/drivers/mtd/nand/nand_write.c
+++ b/drivers/mtd/nand/nand_write.c
@@ -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;
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index d922a9aa81..ac8cd2de98 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -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) {
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index df4e9e08a0..b01a79745e 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -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. */
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 15f7bfd230..844dc1db2a 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -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)
{
diff --git a/include/linux/barebox-wrapper.h b/include/linux/barebox-wrapper.h
index 1221a21fb6..1d1f846b2b 100644
--- a/include/linux/barebox-wrapper.h
+++ b/include/linux/barebox-wrapper.h
@@ -20,6 +20,8 @@
#define printk printf
+#define pr_warn pr_warning
+
#define __init
#define MODULE_AUTHOR(x)
diff --git a/scripts/genenv b/scripts/genenv
index de8b4f138d..7b279c8e6e 100755
--- a/scripts/genenv
+++ b/scripts/genenv
@@ -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