summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* stringlist: fix cpp macro in headerSteffen Trumtrar2013-01-091-3/+3
| | | | | | | | | | | Both include/string.h and include/stringlist.h define the c preprocessor macro __STRING_H. This leads to a compile time error, in case both files are (indirectly) included. Rename the macro to __STRINGLIST_H in stringlist.h. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/net-link'Sascha Hauer2012-12-131-0/+1
|\
| * net phylib: force to wait for linkSascha Hauer2012-12-121-0/+1
| | | | | | | | | | | | | | | | When starting a network device wait until the link is up. Otherwise autobooting does not work with little timeout and several attempts have to be made until the network is finally up. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drivers/base: fix corrupt device treeSascha Hauer2012-12-121-5/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_add_child is a very unsafe function. If called multiple times it allows setting the same device to different parents thus corrupting the siblings list. This happens regularly since: | commit c2e568d19c5c34a05a1002d25280bf113b72b752 | Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | Date: Sat Nov 3 16:11:05 2012 +0100 | | bus: add bus device | | automatically add it as parent of any bus device if none already specified | | we have now a nice output per bus If for example a FATfs is mounted this nice output per bus often ends with: > `---- fat0 > `---- 0 > `---- 0x86f0000087020031-0x86f000410df27124: /dev/<NULL> > `---- sram00 > `---- 0x00000000-0xffffffffffffffff: /dev/<NULL> > `---- 0x00000000-0xffffffffffffffff: /dev/<NULL> > unable to handle NULL pointer dereference at address 0x0000000c > pc : [<87f08a20>] lr : [<87f08a04>] > sp : 86eff8c0 ip : 87f3fbde fp : ffffffff > r10: ffffffff r9 : 00000000 r8 : 00000003 > r7 : 86f075b8 r6 : 00000002 r5 : ffffffec r4 : 86f07544 > r3 : 00000000 r2 : 43f900b4 r1 : 00000020 r0 : 00000005 > Flags: Nzcv IRQs off FIQs off Mode SVC_32 > [<87f08a20>] (do_devinfo_subtree+0x90/0x130) from [<87f08a90>] (do_devinfo_subtree+0x100/0x130) > > [<87f3e070>] (unwind_backtrace+0x0/0x90) from [<87f28514>] (panic+0x28/0x3c) > [<87f28514>] (panic+0x28/0x3c) from [<87f3e4b8>] (do_exception+0x10/0x14) > [<87f3e4b8>] (do_exception+0x10/0x14) from [<87f3e544>] (do_data_abort+0x2c/0x38) > [<87f3e544>] (do_data_abort+0x2c/0x38) from [<87f3e268>] (data_abort+0x48/0x60) This patch fixes this by adding a device to its parents children list in register_device so that dev_add_child is no longer needed. This function is removed from the tree. Now callers of register_device have to clearly set the parent *before* registering a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Jan Lübbe <jlu@pengutronix.de>
* Merge branch 'for-next/phylib'Sascha Hauer2012-12-073-1/+55
|\ | | | | | | | | Conflicts: drivers/net/phy/phy.c
| * phylib: add micrel supportJean-Christophe PLAGNIOL-VILLARD2012-11-201-0/+30
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phylib: add fixup supportJean-Christophe PLAGNIOL-VILLARD2012-11-201-0/+18
| | | | | | | | | | | | | | | | if board need specific phy fixup they can register it and then the code will executed only if needed Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * driver: introduce device_probe to manully probe a deviceJean-Christophe PLAGNIOL-VILLARD2012-11-201-0/+5
| | | | | | | | | | | | | | | | This will expect a driver to be specified This is needed by the phylib the probe the generic phy if not driver found Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phylib: introduction of forced 100MbpsJean-Christophe PLAGNIOL-VILLARD2012-11-191-1/+2
| | | | | | | | | | 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 Hauer2012-12-071-2/+2
|\ \
| * | bus_for_each_device/bus_for_each_driver: add () to allow use &busJean-Christophe PLAGNIOL-VILLARD2012-11-191-2/+2
| |/ | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mem-commands'Sascha Hauer2012-12-071-1/+1
|\ \
| * | mem: add the swab (swap bytes) option to memory_display()Antony Pavlov2012-11-261-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/led'Sascha Hauer2012-12-071-0/+20
|\ \ \
| * | | led-gpio: add bicolor led supportJean-Christophe PLAGNIOL-VILLARD2012-11-191-0/+20
| | |/ | |/| | | | | | | | | | | | | | | | those led can have 2 colors but one at a time otherwise they are black Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2012-12-071-2/+15
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-imx/include/mach/devices-imx53.h
| * | | debug_ll: Add some usage commentsSascha Hauer2012-12-051-1/+15
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | debug_ll: Let architectures define PUTC_LL directlySascha Hauer2012-12-051-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | putc already is a regular barebox function. To avoid conflicts and confusions just let architectures define PUTC_LL directly instead of going through this addiotional redirection. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/ext4'Sascha Hauer2012-12-071-1/+4
|\ \ \
| * | | add ext fs detection supportSascha Hauer2012-12-031-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | filetype: Pass bufsizeSascha Hauer2012-12-031-1/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the buffer size to the file detection code. This makes sure we do not read past the buffer. This is especially useful for ext filesystem detection as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE define which is set to the minimum bufsize the detection code needs to detect all known filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/driver'Sascha Hauer2012-12-071-0/+2
|\ \ \
| * | | bus: add bus deviceJean-Christophe PLAGNIOL-VILLARD2012-11-191-0/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | automatically add it as parent of any bus device if none already specified we have now a nice output per bus barebox@Atmel at91sam9x5-ek:/ devices: `---- platform `---- atmel_usart0 `---- cs0 `---- atmel_usart1 `---- cs1 `---- mem0 `---- 0x00000000-0x07ffffff: /dev/ram0 `---- mem1 `---- 0x00000000-0x00007fff: /dev/sram0 `---- mem2 `---- 0x00000000-0x000037bf: /dev/defaultenv `---- mem3 `---- 0x00000000-0xfffffffe: /dev/mem `---- cs2 `---- w1-gpio `---- w1_bus0 `---- w1-2d-0 `---- 0x00000000-0x0000007f: /dev/ds24310 `---- w1-2d-1 `---- 0x00000000-0x0000007f: /dev/ds24311 `---- w1-23-0 `---- 0x00000000-0x000001ff: /dev/ds24330 `---- at91sam9x5cm `---- at91sam9x5ek `---- at91sam9x5dm `---- atmel_nand0 `---- nand0 `---- 0x00000000-0x1fffffff: /dev/nand0 `---- 0x00000000-0x0003ffff: /dev/at91bootstrap_raw `---- 0x00040000-0x0009ffff: /dev/self_raw `---- 0x000a0000-0x000bffff: /dev/env_raw `---- 0x000c0000-0x000dffff: /dev/env_raw1 `---- 0x00000000-0x0003ffff: /dev/nand0.at91bootstrap `---- 0x00040000-0x0009ffff: /dev/nand0.barebox `---- 0x000a0000-0x000bffff: /dev/nand0.bareboxenv `---- 0x000c0000-0x000dffff: /dev/nand0.bareboxenv2 `---- 0x000e0000-0x000fffff: /dev/nand0.oftree `---- 0x00100000-0x001fffff: /dev/nand0.free `---- 0x00200000-0x007fffff: /dev/nand0.kernel `---- 0x00800000-0x07ffffff: /dev/nand0.rootfs `---- 0x08000000-0x1fffffff: /dev/nand0.data `---- macb0 `---- miibus0 `---- eth0 `---- atmel_spi0 `---- mtd_dataflash0 `---- dataflash0 `---- 0x00000000-0x0041ffff: /dev/dataflash0 `---- atmel_mci0 `---- mci0 `---- 0x00000000-0x1d9bfffff: /dev/disk0 `---- 0x00100000-0x064fffff: /dev/disk0.0 `---- 0x06500000-0x1d9bfffff: /dev/disk0.1 `---- i2c-gpio0 `---- i2c0 `---- qt10700 `---- cs3 `---- mdio_bus `---- spi `---- i2c `---- w1_bus `---- fs `---- ramfs0 `---- devfs0 `---- net `---- global drivers: atmel_usart ramfs devfs fat macb Generic PHY atmel_nand mtd_dataflash m25p80 atmel_spi i2c-gpio mci atmel_mci qt1070 w1-gpio ds2431 ds2433 mem Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/commands'Sascha Hauer2012-12-072-3/+6
|\ \ \
| * | | loadenv: allow more fine grained environment loadingSascha Hauer2012-11-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements two new options for the loadenv command: -s: removes (scrubs) old directory contents to be able to create a fresh environment from for example /dev/defaultenv -n: no overwrite. Do not overwrite existing files. This allows to keep parts of the old environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | rm: implement -rSascha Hauer2012-11-291-0/+2
| | |/ | |/| | | | | | | | | | | | | To recursively remove files and directories. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/clk'Sascha Hauer2012-12-071-0/+11
|\ \ \
| * \ \ Merge branch 'pu/clk' into for-next/clkSascha Hauer2012-12-071-0/+8
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: include/linux/clk.h
| | * | | clk: Add clk table based divider supportSascha Hauer2012-12-061-0/+10
| | |/ / | | | | | | | | | | | | | | | | | | | | For easy support of table based dividers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * / / clk: add always enabled clocksAntony Pavlov2012-12-031-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current barebox clk framework allow disable any clock and there is no means to prevent that. But there are the clocks that can't be disabled by software at all. This patch allow registration of a clock immune to clk_disable(). Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mfd: Add i.MX6 iomux gpr header fileSascha Hauer2012-12-071-0/+320
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | ata: align ata command defines with kernelSascha Hauer2012-12-071-4/+5
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | ata: split ide sff suport to separate fileSascha Hauer2012-12-071-1/+41
|/ / | | | | | | | | | | | | | | | | | | Currently we only support oldschool IDE SFF devices. This is done by registering a register layout struct and everything else is done by the generic IDE SFF driver. Since modern ATA devices still use ATA, but not the SFF interface anymore, split out the IDE SFF support to a separate file to allow for other types of ata interfaces. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / m25p80: re-import it againt mtd_add_hostJean-Christophe PLAGNIOL-VILLARD2012-11-201-0/+65
|/ | | | | | | | | | | | so we now create the cdev via mtd This will also simplify sync with linux to avoid the m25p8000 or m25p00 the cdev is still named name m25p and the drivers m25p80 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ymodem'Sascha Hauer2012-11-162-109/+25
|\
| * commands: remove old Y-Modem implementationRobert Jarzmik2012-11-121-109/+0
| | | | | | | | | | | | | | | | | | | | | | | | As a new implementation of Y-Modem protocol is available, switch from old implementation to the new one : - remove old xyzModem* files - remove old command loady2 - rename command loady2 to loady Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: change Y-Modem implementationRobert Jarzmik2012-11-121-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Y-Modem implementation has some limitations: - Y-Modem/G protocol is not supported - Multiple files (aka. batch) transfers are not supported - Transfer speed over fast lines (USB console) is slow - Code is not trivial to maintain (personnal opinion) This implementation tries to address all these points by introducing loady2 command. The effects are : - transfer speed for Y-Modem over USB jumps from 2kBytes/s to 180kBytes/s - transfer speed for Y-Modem/G jumps to 200kBytes/s - multiple file transfers are possible This command was tested on a USB console and UART 9600bps serial line : - NAKs (and retransmissions) were tested for faulty serial lines - multiple file transfers were tested - Y-Modem, Y-Modem/G and X-Modem transfers were tested Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/spi'Sascha Hauer2012-11-161-0/+2
|\ \
| * | spi: introduce spi_get_masterJean-Christophe PLAGNIOL-VILLARD2012-11-121-0/+2
| |/ | | | | | | | | | | | | so we can request a master usefull for the spi command Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of'Sascha Hauer2012-11-162-1/+10
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/of/base.c include/of.h
| * | of: Add function to get the model nameSascha Hauer2012-10-091-0/+9
| | | | | | | | | | | | | | | | | | This is useful for printing it during startup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memory: return error in barebox_add_memory_bankSascha Hauer2012-10-081-1/+1
| |/ | | | | | | | | | | | | | | When a memory bank is already registered, return an error code instead of throwing a bug. This can happen if a board has registered a memory bank and the same bank is then probed from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2012-11-162-0/+9
|\ \
| * | net smc911x: add support for external PHYAndreas Pretzsch2012-11-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On LAN9115/LAN9117/LAN9215/LAN9217, external PHYs are supported. Switch to external PHY based on hardware strap pin and/or override flags. Also add a mask to platform data selecting external PHY address to be used. Code based on linux/drivers/net/ethernet/smsc/smsc911x.c (fd9abb3d, d23f028a). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net:designware: allow to pass the phy interfaceJean-Christophe PLAGNIOL-VILLARD2012-10-151-0/+3
| |/ | | | | | | | | | | | | If none set use NA (0) as before. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2012-11-162-2/+4
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/configs/at91sam9x5ek_defconfig
| * | mtd: introduce mtd_block_isbadJean-Christophe PLAGNIOL-VILLARD2012-11-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | this allow to do not provide block_isbad at mtd driver level as example spi flash Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: add parent supportJean-Christophe PLAGNIOL-VILLARD2012-10-171-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: add dataflash supportJean-Christophe PLAGNIOL-VILLARD2012-10-151-1/+1
| | | | | | | | | | | | | | | | | | from linux 3.6 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | Merge branch 'for-next/misc'Sascha Hauer2012-11-163-12/+25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>