summaryrefslogtreecommitdiffstats
path: root/arch/nios2
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: allow "make ARCH=sandbox allyesconfig"Holger Schurig2014-07-221-0/+1
| | | | | | | | | | | | | Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code. This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* consistently use the same bitops.h fileSascha Hauer2014-07-172-3/+30
| | | | | | | | | | | | | | | | We have many variants of the same bitops.h file. Consistently use the same file for all architectures which completely use the generic bitops versions. Some architectures had static inline versions of functions identically to the generic versions, these are removed and the generic versions are used directly now. Also several architectures depend on the generic find_*_bit functions but didn't have the GENERIC_FIND_NEXT_BIT Kconfig option selected. This is added where needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove address of the Free Software FoundationAntony Pavlov2014-06-111-4/+0
| | | | | | | | | | | | | | | | | | The FSF address has changed; The FSF site says that address is Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA (see http://www.fsf.org/about/contact/) Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: NET_PING -> CMD_PINGHolger Schurig2014-05-141-1/+1
| | | | | | | | | | | * this compile option actually turns on a command, so name it accordingly * also move the Kconfig definition into commands/Kconfig, thus placing getopt into the "Network commands" section * while at it, improve Kconfig documention Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: Allow for I/O mapped I/OMichel Stam2014-04-081-0/+2
| | | | | | | | Rework the current framework so that I/O mapped I/O resources are also possible. Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_load_os helperSascha Hauer2014-01-101-2/+4
| | | | | | | | | | The common bootm code used to load uImage contents to SDRAM before calling into the handlers if possible. This makes the handlers complicated since they have to handle many cases. Instead, introduce a helper to load the os after the handlers have figured out a good load address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Set model and hostname at boardlevelSascha Hauer2013-08-162-3/+3
| | | | | | | | | | | | With multiboard support the compiletime generated BOARDINFO string gets more and more meaningless. This removes it from Kconfig and replaces it with a variable that can be set at boardlevel. Also many boards have a standard setting for the hostname in the environment. This patch also moves the standard to C code by calling barebox_set_hostname(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nios: initialize malloc pool before start_barebox()Sascha Hauer2013-03-142-8/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nor flash: integrate into mtdSascha Hauer2013-02-141-0/+1
| | | | | | | | CFI Flash is currently handled outside the mtd layer which makes it a special case. Integrate it into mtd so that we get rid of this special status. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-02-042-0/+19
|\
| * barebox-data: add barebox-data sectionsAlexander Aring2013-01-181-0/+1
| | | | | | | | | | | | | | | | Add barebox-data section in arm branch to get complete barebox regions in sdram regions tree. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * remap_range: make function 'remap_range' globalAlexander Aring2013-01-181-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Change function remap_range in arm architecture to make it global accessable. For example command 'memtest' can change pte flags to enable or disable cache. Add dummy function for others architectures that doesn't have mmu or pte support. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | nios2: Use unsigned long for __kernel_size_tSascha Hauer2013-01-271-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | nios2: Let readl return an unsigned intSascha Hauer2013-01-271-1/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Cleanup Kconfig filesAlexander Shiyan2012-12-081-3/+2
| | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/nios2'Sascha Hauer2012-11-162-3/+19
|\
| * nios2: update generic_defconfigFranck Jullien2012-11-151-1/+10
| | | | | | | | | | Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nios2: use barebox_add_memory_bank in generic.cFranck Jullien2012-11-151-2/+9
| | | | | | | | | | | | | | | | In the nios2 generic board generic.c file, use the new barebox_add_memory_bank to init ram memory. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2012-11-161-1/+1
|\ \ | |/ |/| | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * make make -s more silentSascha Hauer2012-10-171-1/+1
| | | | | | | | | | | | | | use $(kecho) instead of echo to not output messages with make -s Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu/misc-fixes'Sascha Hauer2012-10-071-1/+1
|\ \ | |/ |/|
| * nios2: Fix stray comment start in longlong.hSascha Hauer2012-10-041-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
|/ | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-0317-69/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-1717-69/+0
| | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | nios2: Fix DMA functions when CPU has no dcacheFranck Jullien2012-09-191-1/+13
|/ | | | | Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devices: fix missing conversion to DEVICE_ID_DYNAMICJean-Christophe PLAGNIOL-VILLARD2012-08-121-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/resource-size'Sascha Hauer2012-07-021-3/+3
|\ | | | | | | | | | | Conflicts: drivers/base/resource.c fs/fs.c
| * resource: store 'end' instead of 'size' in struct resourceSascha Hauer2012-07-011-3/+3
| | | | | | | | | | | | | | | | | | | | Storing the size instead of the resource end in struct resource was a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously leads to problems. 'end' on the other hand will never exceed UINT[32|64]_MAX. Also this way we can express a iomem region covering the whole address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/dma-cache-align'Sascha Hauer2012-07-022-0/+18
|\ \
| * | nios: add dma_alloc, asm/dma.hMarc Kleine-Budde2012-06-302-0/+18
| |/ | | | | | | | | | | | | | | This patch add dma_alloc to existing dma-mapping.h. On nios the mem is aligned to D_ACHE_LINE_SIZE. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / nios2: Add missing ffs and fls includeSascha Hauer2012-06-281-0/+5
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* booting: more flexible Linux bootargs generationSascha Hauer2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | We currently use the environment variable 'bootargs' to get the Linux bootargs. This patch allows for a more flexible bootargs generation using global variables. With it the Linux bootargs are concatenated from multiple variables. This allows to replace parts of the bootargs string without having to reconstruct it completely. With this bootargs can be constructed like: global linux.bootargs.base="console=ttyS0,115200" global linux.bootargs.ip="ip=dhcp" global linux.mtdparts="physmap-flash.0:512K(nor0.barebox),-(root)" This will then automatically be combined into a kernel bootargs string during boot. If the 'linux.bootargs.' variables are all empty the old standard 'bootargs' way will be used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Removed duplicate definition for DEVFS_PARTITION_xxxAlexander Shiyan2012-05-131-2/+2
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use DEVICE_ID_DYNAMIC where applicableSascha Hauer2012-04-161-3/+3
| | | | | | | We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce barebox_bare_init_size to known the bare_init size and check itJean-Christophe PLAGNIOL-VILLARD2012-01-231-0/+3
| | | | | | | | | | | this allow to check we do not exceed the size of the SRAM as example introduce BAREBOX_MAX_BARE_INIT_SIZE the maximum size of bare_init this will allow your bare_init will fit in SRAM as example ARCH can overwrite it via ARCH_BAREBOX_MAX_BARE_INIT_SIZE Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* defaultenv: simplify bootSascha Hauer2011-12-151-1/+0
| | | | | | | | Now that we have a bootm command which boots everything we can simplify the defaultenvironment. We can call bootm on every image type and can remove the kernelimage_type variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use new uimage codeSascha Hauer2011-12-151-3/+8
| | | | | | | | | | | | | | This switches the bootm code to the new uimage code. Also bootm can now handle other types of images than uImages. Currently the only architecture making use of this is arm which allows to boot zImages, raw images and barebox images. I intended to make a more bisectable series from this but I failed becuase there are many dependencies and no matter how I tried the patches grew bigger and and bigger. So I decided to put this all in a single patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nios2: remove one "_" from etext an stextFranck Jullien2011-12-121-2/+2
| | | | | | | | common/memory.c now uses _etext and _stext. The nios2 linker script defines __stext and __etext... Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix malloc space sizesSascha Hauer2011-12-031-1/+1
| | | | | | end is start + size - 1, not start + size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: push relocate_image up to the generic commandSascha Hauer2011-11-291-3/+0
| | | | | | | | | All handlers used to just relocate the image without any checks, so we are doomed if we write outside of SDRAM or will overwrite ourselves. Move the relocation up to the generic part where we have a chance of catching these issues. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'work/magicvars' into nextSascha Hauer2011-11-291-0/+4
|\
| * add magicvar commandSascha Hauer2011-11-291-0/+4
| | | | | | | | | | | | | | The magicvar command gives an overview about all environment variables with a special meaning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'master' into nextSascha Hauer2011-11-291-0/+15
|\| | | | | | | | | | | | | Conflicts: drivers/ata/disk_drive.c Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nios2: Include asm/unaligned.hFranck Jullien2011-11-241-0/+15
| | | | | | | | | | | | | | drivers/ata/disk_drive.c needs it.... Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | remove irq support fragmentsSascha Hauer2011-11-286-160/+0
| | | | | | | | | | | | | | | | We never had interrupt support in barebox and we have no plans to add interrupt support. Even if we do I doubt the current fragments of irq support are helpful, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | spi/altera_spi: Add cs_change supportFranck Jullien2011-11-251-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux kernel says (spi.h) : * All SPI transfers start with the relevant chipselect active. Normally * it stays selected until after the last transfer in a message. Drivers * can affect the chipselect signal using cs_change. * * (i) If the transfer isn't the last one in the message, this flag is * used to make the chipselect briefly go inactive in the middle of the * message. Toggling chipselect in this way may be needed to terminate * a chip command, letting a single spi_message perform all of group of * chip transactions together. * * (ii) When the transfer is the last one in the message, the chip may * stay selected until the next transfer. On multi-device SPI busses * with nothing blocking messages going to other devices, this is just * a performance hint; starting a message to another device deselects * this one. But in other cases, this can be used to ensure correctness. * Some devices need protocol transactions to be built from a series of * spi_message submissions, where the content of one message is * determined by the results of previous messages and where the whole * transaction * ends when the chipselect goes intactive. In other words, cs_change changes the default chipselect *behavior*. Support of cs_change is necessary to implement the mci spi driver. This patch also fix few things: Passing the bus number to the brand new master device. Disable chipselect during master->setup. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'master' into nextSascha Hauer2011-10-141-0/+2
|\
| * nios2: remove warnings generated by include/io.hFranck Jullien2011-10-141-0/+2
| | | | | | | | | | | | | | | | | | | | This patch remove those warnings in nios2 drivers: include/io.h:7:5: warning: "__BYTE_ORDER" is not defined include/io.h:7:21: warning: "__BIG_ENDIAN" is not defined Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | move digest to crypto/Jean-Christophe PLAGNIOL-VILLARD2011-10-121-1/+1
|/ | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>