summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* OF: base: rename of_free to of_delete_nodeSebastian Hesselbarth2013-07-052-3/+3
| | | | | | | | | of_free is misleading about the actual purpose of the function. There is already a of_create_node counterpart, so rename of_free to of_create_node and update all users accordingly. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next-manual/oftree-linux-sync'Sascha Hauer2013-07-023-20/+5
|\
| * OF: base: sync of_find_node_by_path with linux OF APISebastian Hesselbarth2013-06-203-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Barebox of_find_node_by_path requires a node to be passed as start node to start searching. Linux OF API does not pass this node and no current user of it in barebox is passing anything else than the root node. Therefore, we rename current function to of_find_node_by_path_from and introduce a Linux OF API compatible of_find_node_by_path that always passes the current root_node. Also, all current users of that function are updated to reflect the API change. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * OF: base: sync of_find_property with linux OF APISebastian Hesselbarth2013-06-201-1/+1
| | | | | | | | | | | | | | | | To start synchronizing OF API of barebox with linux OF API, this adds a length pointer to of_find_property. Also all current users of that function are updated to reflect the API change. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* | Merge branch 'for-next/usb'Sascha Hauer2013-07-011-7/+3
|\ \
| * | usb: move scanned status into coreSascha Hauer2013-06-211-7/+3
| |/ | | | | | | | | | | | | A command should not be interested in the internal USB core state, so move the state handling into the core. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-07-011-1/+16
|\ \
| * | detect command: Add -a option to detect all devicesSascha Hauer2013-06-211-1/+16
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/memtest'Sascha Hauer2013-07-013-304/+207
|\ \ \
| * | | commands: add new memtest commandAlexander Aring2013-06-083-0/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new memtest can test the whole unused memory. The new memtest command try to request the whole unused sdram regions on all banks and run the mem_test routine from common/memtest.c on it. The memtest command has only two parameters; -i Amount of iterations, default 1, iteration of 0 is endless. -b Set this to skip integrity check.(Do only a fast test for bus lines) If MMU support is enable, memtest try to run memtest twice. The first with cache enabled, the second with cache disabled. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | memtest: remove memtest commandAlexander Aring2013-06-053-361/+0
| | |/ | |/| | | | | | | | | | | | | | | | Remove memtest command. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/debug'Sascha Hauer2013-07-011-4/+0
|\ \ \
| * | | remove unused debug Kconfig optionsSascha Hauer2013-06-231-4/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENABLE_DEVICE_NOISE is used only in two network drivers and is otherwise unused. ENABLE_FLASH_NOISE is completely unused. ENABLE_PARTITION_NOISE enables DEBUG in the partition command, but this code has no debug messages at all. Remove all this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/bootm'Sascha Hauer2013-07-012-276/+6
|\ \ \
| * | | bootm: factor out code to make it usable from CSascha Hauer2013-06-192-276/+6
| |/ / | | | | | | | | | | | | | | | | | | Much of the bootm code is implemented in the command itself. Move it to a common place to be able to call it from C aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / ubiformat: check file sizeJan Weitzel2013-06-241-0/+5
|/ / | | | | | | | | | | | | | | | | If size of a flash image file is 0 ubiformat silently formats the volume. Check size and abort if size == 0. This may be the case if an empty or tftp mounted file is used. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / Remove a redundant line.Masaki Muranaka2013-06-031-1/+0
|/ | | | | Signed-off-by: Masaki Muranaka <monaka@monami-ya.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of'Sascha Hauer2013-06-021-5/+1
|\
| * bootm: Print internal devicetree information without verboseSascha Hauer2013-05-311-1/+1
| | | | | | | | | | | | | | | | It's a precious information that barebox will boot the kernel with the internal devicetree, so print it even in non verbose mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bootm: make sure to print fixed oftreeSascha Hauer2013-05-311-4/+0
| | | | | | | | | | | | | | | | when doing bootm -v -v we dumped the original tree to the console. Make sure to print the fixed tree instead so that the fixups can be examined. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | devices: add detect mechanismSascha Hauer2013-05-313-0/+87
|/ | | | | | | | | | | | | | | We often encounter the situation where slow devices should not be probed during startup since probing is slow and maybe unnecessary for unused devices. With MMC we have the 'probe' device parameter, for ata we have the same, for USB we have the 'usb' command. Overall this is not very consistent. With MMC there is the additional problem that the probe parameter is attached to the logical device when we often have the information which physical device we want to probe. This patch adds a 'detect' callback for devices and adds a command to detect devices and to list the devices which are actually detecable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/mem.c: drop non used DEVMEMJean-Christophe PLAGNIOL-VILLARD2013-05-081-2/+0
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-05-063-9/+4
|\
| * Don't honor initrd load addressSascha Hauer2013-05-041-3/+0
| | | | | | | | | | | | | | | | | | | | U-Boot doesn't honor the load address specified in an initrd. Barebox shouldn't be more strict here. This unbreaks booting an uInitrd generated by Debian's flash-kernel that uses 0 as entry address where there is nothing on the i.MX53 that was used. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bootm: Simplify initrd address handlingUwe Kleine-König2013-05-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data.initrd_address = UIMAGE_SOME_ADDRESS; ... if (-L was given to bootm) data.initrd_address = address_provided_to_-L; ... if (initrd is provided as uInitrd && data.initrd_address == UIMAGE_SOME_ADDRESS) data.initrd_address = load_address_from_uInitrd; ... if (data.initrd_address == UIMAGE_SOME_ADDRESS) data.initrd_address = UIMAGE_INVALID_ADDRESS; can be simplified to: data.initrd_address = UIMAGE_INVALID_ADDRESS; ... if (-L was given to bootm) data.initrd_address = address_provided_to_-L; ... if (initrd is provided as uInitrd && data.initrd_address == UIMAGE_INVALID_ADDRESS) data.initrd_address = load_address_from_uInitrd; ... The only change introduced by this simplification is for cases where the user passes -L UIMAGE_SOME_ADDRESS or -L UIMAGE_INVALID_ADDRESS to bootm. (-L UIMAGE_SOME_ADDRESS is now used literally instead of ignored before. -L UIMAGE_INVALID_ADDRESS used to skip getting the initrd-address from the uInitrd, now the uInitrd address is honored.) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: the crc command is actually called crc32Jan Luebbe2013-04-161-2/+2
| | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: i2c: change 0X to 0xJan Luebbe2013-04-091-1/+1
| | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/memory-commands'Sascha Hauer2013-05-069-514/+797
|\ \
| * | Add memory modify command (mm)Sascha Hauer2013-04-173-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now we have no way to manipulate individual bits of registers on the command line. This introduces a memory modify command which allows this. It has the syntax: mm [OPTIONS] <adr> <val> <mask> With [OPTIONS] being the usual memory command options (-b, -w, -l, -d <file>). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memory commands: separate into one file per commandSascha Hauer2013-04-178-433/+660
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally in commands we have one file per command which is named like the command itself. The memory commands are an exception to this. This patch changes this by separating the memory commands. This also has the effect that the memory commands can now be selected individually. Along the way we add some Kconfig help text for the commmands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memory commands: make rw_buf globalSascha Hauer2013-04-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | The rw_buf is used by several memory commands. Make it global since we want to split the memory commands into separate files. Also rename it to mem_rw_buf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memory commands: cleanup initializationSascha Hauer2013-04-171-8/+3
| | | | | | | | | | | | | | | | | | | | | - return -ENOMEM instead of -1 - return the result of platform_driver_register Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Use a common define for RW_BUF_SIZESascha Hauer2013-04-171-1/+0
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memory commands: move memory_display to separate fileSascha Hauer2013-04-171-68/+0
| | | | | | | | | | | | | | | | | | | | | | | | memory_display is a function which should generally be available. Currently it depends on memory command support being compiled in, so move the function to a separate file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memory commands: export common functionsSascha Hauer2013-04-171-2/+6
| |/ | | | | | | | | | | | | The memory commands all use open_and_lseek and mem_parse_options. Export them to be able to split the memory commands into separate files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of: property: fix error messageSteffen Trumtrar2013-04-261-2/+2
| | | | | | | | | | | | | | At least in standard oxford english one not is enough. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ubimkvol: Typo fixAlexander Shiyan2013-04-221-1/+1
|/ | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/oftree'Sascha Hauer2013-04-045-53/+78
|\
| * of: remove unused libfdtSascha Hauer2013-03-064-5/+1
| | | | | | | | | | | | | | Now that we are completely independent of libfdt remove the unused code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bootm: Pass unflattened devicetree to handlersSascha Hauer2013-03-061-15/+9
| | | | | | | | | | | | | | | | | | This makes it possible to modify the tree in the handlers. This is necessary because the initrd addresses are only known inside the handlers, but not to the generic bootm code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of_property command: Fix crash with empty property valueSascha Hauer2013-03-061-2/+8
| | | | | | | | | | | | | | | | the of_property command crashes when an empty property value was given. This is because xrealloc is called with a length argument of 0. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of_* commands: print usage when insufficient arguments are givenSascha Hauer2013-03-062-0/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bootm: Use of_print_nodes instead of fdt_printSascha Hauer2013-03-061-3/+3
| | | | | | | | | | | | | | Now that we use the unflattened tree in bootm we can use of_print_nodes instead of printing the flattened tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: Pass barebox internal format devicetree to of_get_fixed_treeSascha Hauer2013-03-061-1/+8
| | | | | | | | | | | | | | With this every devicetree is first converted to the barebox internal format before it's converted back to dtb again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * oftree command: retire CMD_OFTREE_PROBE Kconfig optionSascha Hauer2013-03-062-8/+1
| | | | | | | | | | | | | | | | Whether or not the user wishes devicetree probe support can now be decided indepentently of the oftree command, so retire the CMD_OFTREE_PROBE option and use OFDEVICE in the code instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: make OFDEVICE a user selectable optionSascha Hauer2013-03-061-3/+0
| | | | | | | | | | | | | | | | | | | | OFDEVICE decides whether or not we compile in support for probing devices from the devicetree. Let the user decide this explicitly. This makes the oftree, of_node and of_property commands independent of devicetree device support since being able to manipulate devicetrees has nothing to do with probing devices from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * oftree command: Use of_print_nodesSascha Hauer2013-03-061-3/+10
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: Add root node argument to of_find_node_by_pathSascha Hauer2013-03-063-4/+18
| | | | | | | | | | | | This makes of_find_node_by_path usable with multiple trees. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: let of_unflatten_dtb return the unflattened treeSascha Hauer2013-03-061-1/+13
| | | | | | | | | | | | | | | | | | In order to be able to handle multiple devicetrees, do not assume the tree to be unflattened is the barebox internal one. Instead, just return a pointer to it and assign the barebox internal root_node external to the unflatten function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of_node command: use of_create_nodeSascha Hauer2013-03-061-17/+10
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>