summaryrefslogtreecommitdiffstats
path: root/drivers/base
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'for-next/phylib'Sascha Hauer2012-12-071-6/+17
|\ | | | | | | | | Conflicts: drivers/net/phy/phy.c
| * driver: introduce device_probe to manully probe a deviceJean-Christophe PLAGNIOL-VILLARD2012-11-201-6/+17
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/driver'Sascha Hauer2012-12-072-0/+15
|\ \
| * | bus: add bus deviceJean-Christophe PLAGNIOL-VILLARD2012-11-192-0/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / correct simple typo, "plarform_init"Robert P. J. Day2012-12-031-2/+2
|/ | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2012-11-161-2/+53
|\ | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * driver: add support for requesting resource by nameJean-Christophe PLAGNIOL-VILLARD2012-10-301-0/+46
| | | | | | | | | | | | | | this will allow to avoid issue with resource order Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * cosmetic: remove right alignment on driver listFranck Jullien2012-10-171-1/+1
| | | | | | | | | | | | | | | | In order to avoid misalignment, just remove the right alignment while printing the drivers list. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * driver: print error message when probe failsSascha Hauer2012-10-071-1/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | platform driver: Drop check for resource conflictsSascha Hauer2012-10-131-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check is wrong since it would have to check whether the new iomem region overlaps with an existing region. Checking for the base address only is not enough. Currently this is not possible because every device conflicts with the top iomem region which covers the whole address space. This at least fixes the regression that devices whose memory region begins at 0x0 can no longer be succesfully registered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Alexander Shiyan <shc_work@mail.ru> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | Merge branch 'pu/misc-fixes'Sascha Hauer2012-10-072-16/+16
|\ \ | |/ |/|
| * driver: make get_bus_by_name staticSascha Hauer2012-10-041-1/+1
| | | | | | | | | | | | We have no prototype for it, so it should be static. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * driver: move dev_get_drvdata out of CONFIG_CMD_DEVINFOSascha Hauer2012-10-041-15/+15
| | | | | | | | | | | | | | dev_get_drvdata accidently is inside #ifdef CONFIG_CMD_DEVINFO. Move it out of there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | devinfo: display device bus nameJean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+4
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-043-21/+33
|/ | | | | | | | 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-033-10/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-173-10/+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>
* | driver: search device and driver based on the bus instead of allJean-Christophe PLAGNIOL-VILLARD2012-09-232-5/+9
| | | | | | | | | | | | | | This will allow reduce the number of driver and device to search on. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | driver: register busJean-Christophe PLAGNIOL-VILLARD2012-09-233-10/+39
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of: add devicetree probing supportSascha Hauer2012-09-142-2/+28
| | | | | | | | | | | | | | This adds code to probe devices from a devicetree. Most helper functions are directly imported from Linux. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | driver: add dev_get_drvdata functionSascha Hauer2012-09-141-0/+10
| | | | | | | | | | | | | | | | Drivers need to get their driver data either from devicetree or the platform information. It should matter for the driver where this data comes from, so introduce a common function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | driver: Add platform_device_id mechanismSascha Hauer2012-09-141-1/+16
| | | | | | | | | | | | | | | | It is common for drivers to handle multiple similar devices. On Linux the driver can distinguish between the devices using the platform_device_id mechanism. Introduce the same for barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | driver: rewrite dev_printf as a functionSascha Hauer2012-09-141-0/+19
|/ | | | | | | | | | Printing device context normally should be "driver instance:", but instead we printed the device name twice. This patch fixes this and as a bonus makes the binary a bit smaller. Instead of a '@' between driver and instance this function now prints a whitespace which is a bit more like Linux. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/resource-size'Sascha Hauer2012-07-022-9/+9
|\ | | | | | | | | | | Conflicts: drivers/base/resource.c fs/fs.c
| * resource: store 'end' instead of 'size' in struct resourceSascha Hauer2012-07-012-9/+9
| | | | | | | | | | | | | | | | | | | | 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/sparse'Sascha Hauer2012-07-021-3/+3
|\ \
| * | Do not use iomem space for dev_get_mem_regionSascha Hauer2012-06-301-3/+3
| |/ | | | | | | | | | | It is mostly used for mmapping sdram which is no iomem. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/64bit'Sascha Hauer2012-07-021-1/+1
|\ \
| * | make cdev 64bit capableSascha Hauer2012-06-301-1/+1
| |/ | | | | | | | | | | Next step to 64bit support: Make cdev size a 64bit type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ehci: Fix resource sizeSascha Hauer2012-07-021-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | We now have a resource size for the ehci hccr register space. This was assumed to be 0x40 in size. On OMAP though it is only 0x10 and then the hccr resource conflicts with the hcor resource which results in a non working ehci port on beagle and panda boards. This patch adds a nonintrusive workaround, it limits the hccr resource to 0x10, which then also works on OMAP. Later we should drop the multiple resources for the ehci port and make the resource as specified in the datasheets. This is broken since: commit 08845e41fba2b16dd3050b6b910c615e1bb8e57c Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Wed May 23 12:54:24 2012 +0200 usb ehci: Add resource sizes add_usb_ehci_device registers resources with size 0. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers/base: bail out if request_iomem_region failsSascha Hauer2012-06-271-0/+2
| | | | | | | When request_iomem_region fails we have to bail out instead of dereferencing res->start. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* print out resource_size_t correctlySascha Hauer2012-06-251-1/+2
| | | | | | | resource_size_t can be 32bit or 64bit depending on the architecture. Add a define for it to be able to printf a resource_size_t correctly Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb ehci: Add resource sizesSascha Hauer2012-05-311-0/+2
| | | | | | add_usb_ehci_device registers resources with size 0. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: add device name complete support for devinfoJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* devinfo: use accessor function for parametersSascha Hauer2012-04-241-1/+1
| | | | | | | Instead of directly accessing the struct member of struct param_d use the provided getter function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* device: make singular devices possibleSascha Hauer2012-04-151-2/+5
| | | | | | | | | Currently all devices have an id meaning that all devicenames end with a number. This patch adds a DEVICE_ID_SINGLE to make it ppossible to register a device without an id assigned to it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* NET: Add support for ks8851_mllJan Weitzel2012-03-131-0/+33
| | | | | | | Add support for KS8851 16bit MLL chip from Micrel Inc. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove struct command pointer from commandsSascha Hauer2012-02-271-1/+1
| | | | | | This is unused in all commands and thus can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devices: unregister children when unregistering a deviceSascha Hauer2012-02-171-5/+15
| | | | | | | | | | | | | | | | | We currently do not allow to unregister a device when it has children. However, the return value is seldomly checked. Also this breaks for hot pluggable devices like USB which we have to unregister when they disappear. The best way to fix this is to unregister our children and also the partitions on the unregistered device. We unregister the device first and then afterwards the children. We do this because for example network devices have a miidev as child which they unregister themselves. So we only have to unregister the children which are not cleaned up by the drivers, namely fs devices. Also, unregister all partitions on a disappearing device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove the obsolet driver for the DM9000E ethernet deviceJuergen Beisert2011-12-141-1/+1
| | | | | | | | Support for the old DM9000E device is now part of the new dm9k.c driver. So, remove the old driver source and switch all users to the new driver. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* implement resource management for platform devicesSascha Hauer2011-12-041-2/+27
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: switch to generic memory banksSascha Hauer2011-09-231-15/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers/base: fix wrong variable typeSascha Hauer2011-09-231-1/+1
| | | | | | | | Introduced with commit: 808ec31 resource: introduce add_generic_device_res to add multiple resource Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: introduce add_generic_device_res to add multiple resourceJean-Christophe PLAGNIOL-VILLARD2011-09-201-32/+35
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devinfo: beautify outputSascha Hauer2011-08-171-13/+14
| | | | | | | Files associated to a device showed up in a long list. Instead, print them in seperate lines and also show offset/size information Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers/base: initialize active listSascha Hauer2011-08-151-0/+1
| | | | | | | Otherwise, when a non active device is unregistered, we call list_del on an unitialized list which oopses. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: introduce arm_add_mem_device to register dram deviceJean-Christophe PLAGNIOL-VILLARD2011-08-011-0/+15
| | | | | | this will automaticaly register the device to armlinux_add_dram Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* driver: remove map_baseJean-Christophe PLAGNIOL-VILLARD2011-08-011-20/+0
| | | | | | | as now all the drivers and board have been switch to resource whe can drop map_base and size from device_d Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* resource: introduce add_usb_ehci_device to register echi deviceJean-Christophe PLAGNIOL-VILLARD2011-07-291-0/+21
| | | | | | | | | pass the hccr and hcor register base via resource instroduce add_generic_usb_echi_device with hccr = base + 0x100 and hcor = base + 0x140 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* dm9000: introduce add_dm9000_device to register dm9000 deviceJean-Christophe PLAGNIOL-VILLARD2011-07-291-4/+53
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>