summaryrefslogtreecommitdiffstats
path: root/include/driver.h
Commit message (Collapse)AuthorAgeFilesLines
* resource: introduce add_generic_device_res to add multiple resourceJean-Christophe PLAGNIOL-VILLARD2011-09-201-0/+7
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: remove map_baseJean-Christophe PLAGNIOL-VILLARD2011-08-011-6/+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>
* ns16550: switch to resourceJean-Christophe PLAGNIOL-VILLARD2011-08-011-2/+2
| | | | | | | use generic read/write depending on the memory size if no reg_read/write defined 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/+17
| | | | | | | | | 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-0/+11
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*-. Merge branches 'pu-ethaddr', 'pu-fec', 'pu-imx-iim', 'pu-resources' and ↵Sascha Hauer2011-07-291-0/+8
|\ \ | | | | | | | | | 'pu-resources1' into next
| | * add a ns16550 registration helper and use itSascha Hauer2011-07-291-0/+8
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu' into nextSascha Hauer2011-07-291-1/+1
|\ \ | |/ |/|
| * fix typoSascha Hauer2011-07-291-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | resource: introduce add_cfi_device to register simple cfi deviceJean-Christophe PLAGNIOL-VILLARD2011-07-231-0/+7
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | resource: introduce add_generic_device to register simple deviceJean-Christophe PLAGNIOL-VILLARD2011-07-211-2/+14
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | add a add_mem_device functionSascha Hauer2011-07-181-5/+6
| | | | | | | | | | | | | | | | | | | | | | Add a helper function for boards to register their memory devices. This makes the board code smaller and also helps getting rid of map_base and struct memory_platform_data. And switch all of the memory to it Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | mem: replace DEVFS_RDWR by IORESOURCE_MEM_WRITEABLEJean-Christophe PLAGNIOL-VILLARD2011-07-181-1/+0
| | | | | | | | | | | | | | we keep struct memory_platform_data for now on we will switch off the memories resources to struct resource Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | device: Add a dev_request_mem_region functionSascha Hauer2011-07-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | We might want to add real resource tracking later. Also The first resource may not be a IORESOURCE_MEM at all. For these reasons introduce a wrapper function for driver so that they do not have to fiddle with resources directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | device: introduce resource structure to simplify resource declarationJean-Christophe PLAGNIOL-VILLARD2011-07-181-0/+4
|/ | | | | | | | | | | and add multi resource per device support for now we keep the old map_base and size temporary but will switch all of the used step by step to them resource way and mirror the first resource to the map_base and size if available Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* devfs: factor out core devfs functionalitySascha Hauer2011-04-111-0/+5
| | | | | | | | | This makes it possible to compile without devfs. devfs_create/devfs_remove is used by drivers and thus must still be present even without devfs support. Also, this patch adds cdev_open/cdev_close/cdev_flush/cdev_ioctl calls to work with devices without using the file api. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement flush functionSascha Hauer2011-04-111-0/+1
| | | | | | | Once we have caching in file functions we need a way to sync the the underlying devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: remove unused struct filep* argument from open/closeSascha Hauer2011-04-111-2/+2
| | | | | | | the cdev layer is under the file layer, so it should not use struct filep*. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* device: fix dev_nameJean-Christophe PLAGNIOL-VILLARD2010-09-201-5/+7
| | | | | | | | | | | | dev_name is supposed to return the name of the device plus the id currently we use %s%d format where in the kernel the use %s.%d we may think to switch to this format for the device name and keeping the %s%d for the devfs this will be usefull to not modify the clock device name as example Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* use resource_size_t for device resourcesJean-Christophe PLAGNIOL-VILLARD2010-08-271-3/+2
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add partition mtd supportSascha Hauer2010-07-051-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rework device parametersSascha Hauer2010-06-171-1/+1
| | | | | | | | Change device parameters so that the memory management is in generic code. This also removes the need of storing statically initialized parameters as they are stored in a struct list_head for each device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* list: remove duplicated list.hSascha Hauer2009-11-031-1/+1
| | | | | | | | We accidently have two list implementations in the tree: include/list.h and include/linux/list.h. This patch moves the latter (newer one) to include/linux/list.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: add dev_name inlineJean-Christophe PLAGNIOL-VILLARD2009-11-021-1/+6
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: add open counterSascha Hauer2009-09-111-1/+2
| | | | | | | Add an open counter for device files so that we cannot accidently remove an opened device. This happened with bb devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* get rid of device idsSascha Hauer2009-07-211-3/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Get rid of remaining DEVICE_TYPE_* usageSascha Hauer2009-07-211-19/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce cdevSascha Hauer2009-07-211-31/+54
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* we need different bus typesSascha Hauer2009-04-071-1/+14
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix dev_* macrosSascha Hauer2009-04-061-8/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Shutdown U-Boot before starting an OSSascha Hauer2009-03-191-1/+7
| | | | | | | | Some devices, especially the ones doing DMA should be disabled before giving control to an OS. We take the simple approach here: Just shutdown the devices in the reverse order they were activated. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Introduce dev_* and pr_* functionsSascha Hauer2008-10-311-0/+30
| | | | | | | | Proven to be useful in linux kernel, U-Boot should have such a thing aswell. We do not distinguish between the various print levels others than debug and not debug. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* implement memmap for mem driverSascha Hauer2008-08-141-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Partition: Add an own device id for partitionsSascha Hauer2008-08-141-1/+2
| | | | | | | | Add an own device id for partitions. This is necessary to allow the partition layer to check if the given device is really a partition. Also, check for readonly flag in erase. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* increase maximum driver name length to 32Sascha Hauer2008-08-141-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add new device types for NANDSascha Hauer2008-08-131-1/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* - introduce ioctl callSascha Hauer2008-06-061-0/+26
| | | | - pass open/close/lseek through to drivers
* doc added (what else)Juergen Beisert2007-10-191-2/+5
|
* Merge branch 'master' of jbe@octopus:/home/git/projects/u-boot-v2Juergen Beisert2007-10-191-8/+39
|\
| * fix compiler warningsascha2007-10-191-1/+1
| |
| * - Implement tree structure for devicessascha2007-10-191-7/+38
| | | | | | | | | | | | | | - Use device tree structure to implement partitions - Let devinfo print a nice tree - Introduce 'fixed' partitions which are not removable - Fix mount: It was not possible to mount on a relative path.
* | doc added onlyJuergen Beisert2007-10-191-16/+92
|/
* let erase and protect functions return int instead of size_t. TheySascha Hauer2007-10-111-3/+3
| | | | only return succes/error but no size.
* Use Linux kernel list for drivers and devices instead of handmadeSascha Hauer2007-10-111-2/+10
| | | | list.
* implement flash protectionSascha Hauer2007-07-161-0/+2
|
* implement memmap().Sascha Hauer2007-07-151-0/+5
| | | | | | With this function we can get a pointer to directly memory mapped devices like nor flash or RAM. Useful for bootm where we save one memcopy when the image is mappable
* whitespace cleanupSascha Hauer2007-07-151-20/+20
|
* svn_rev_575Sascha Hauer2007-07-051-1/+2
| | | | add DEVICE_TYPE_MIIPHY
* svn_rev_481Sascha Hauer2007-07-051-0/+1
| | | | make more char * const, fix compiler warnings
* svn_rev_469Sascha Hauer2007-07-051-8/+23
| | | | | - make some more char * const - dev_add_parameter -> dev_add_param