9
0
Fork 0
Commit Graph

53 Commits

Author SHA1 Message Date
Sascha Hauer 30be97aff2 devfs: factor out core devfs functionality
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>
2011-04-11 12:36:07 +02:00
Sascha Hauer f1bb89fd9e fs: implement flush function
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>
2011-04-11 12:36:07 +02:00
Sascha Hauer 3efa8f7bed devfs: remove unused struct filep* argument from open/close
the cdev layer is under the file layer, so it should not use
struct filep*.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:07 +02:00
Jean-Christophe PLAGNIOL-VILLARD c33a2e503c device: fix dev_name
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>
2010-09-20 08:56:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD f2283c2057 use resource_size_t for device resources
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-27 14:25:19 +02:00
Sascha Hauer acc46ca4f0 add partition mtd support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 13:00:02 +02:00
Sascha Hauer c3789cd49b rework device parameters
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>
2010-06-17 08:28:25 +02:00
Sascha Hauer 73d57b1d35 list: remove duplicated list.h
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>
2009-11-03 09:48:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 483d4e0857 driver: add dev_name inline
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-11-02 08:23:45 +01:00
Sascha Hauer f46010a1ab devfs: add open counter
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>
2009-09-11 09:13:33 +02:00
Sascha Hauer 02ba8a0542 get rid of device ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:47 +02:00
Sascha Hauer 4b34297cfb Get rid of remaining DEVICE_TYPE_* usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:46 +02:00
Sascha Hauer a2b7cd183b introduce cdev
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:44 +02:00
Sascha Hauer 4511a8873b we need different bus types
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-07 10:42:33 +02:00
Sascha Hauer 7703263340 fix dev_* macros
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-04-06 11:22:28 +02:00
Sascha Hauer 0b5a776c1e Shutdown U-Boot before starting an OS
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>
2009-03-19 12:21:18 +01:00
Sascha Hauer c3fc1364d9 Introduce dev_* and pr_* functions
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>
2008-10-31 14:02:25 +01:00
Sascha Hauer e133ccdda8 implement memmap for mem driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-14 10:25:56 +02:00
Sascha Hauer 65778b63d2 Partition: Add an own device id for partitions
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>
2008-08-14 09:28:10 +02:00
Sascha Hauer e6b42af9c5 increase maximum driver name length to 32
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-14 08:42:32 +02:00
Sascha Hauer a131b1abc3 Add new device types for NAND
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:14 +02:00
Sascha Hauer ee6d36a540 - introduce ioctl call
- pass open/close/lseek through to drivers
2008-06-06 09:30:48 +02:00
Juergen Beisert b90fc81605 doc added (what else) 2007-10-19 15:35:37 +02:00
Juergen Beisert 6ad2703e6e Merge branch 'master' of jbe@octopus:/home/git/projects/u-boot-v2 2007-10-19 11:58:33 +02:00
Juergen Beisert c616179204 doc added only 2007-10-19 11:58:22 +02:00
sascha 83f101bc30 fix compiler warning 2007-10-19 11:06:32 +02:00
sascha 3b6d6a45e7 - Implement tree structure for devices
- 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.
2007-10-19 08:45:57 +02:00
Sascha Hauer 212f631eb4 let erase and protect functions return int instead of size_t. They
only return succes/error but no size.
2007-10-11 22:00:22 +02:00
Sascha Hauer eadf71abc7 Use Linux kernel list for drivers and devices instead of handmade
list.
2007-10-11 20:20:36 +02:00
Sascha Hauer 056a695c15 implement flash protection 2007-07-16 10:29:28 +02:00
Sascha Hauer 665291e693 implement memmap().
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
2007-07-15 13:50:04 +02:00
Sascha Hauer b844766e03 whitespace cleanup 2007-07-15 12:43:20 +02:00
Sascha Hauer 06bc41745b svn_rev_575
add DEVICE_TYPE_MIIPHY
2007-07-05 18:02:06 +02:00
Sascha Hauer fe2d505d4d svn_rev_481
make more char * const, fix compiler warnings
2007-07-05 18:01:58 +02:00
Sascha Hauer 7baa6289fe svn_rev_469
- make some more char * const
- dev_add_parameter -> dev_add_param
2007-07-05 18:01:56 +02:00
Sascha Hauer a571261fed svn_rev_387
add console driver type
2007-07-05 18:01:49 +02:00
Sascha Hauer e6bd6faf63 svn_rev_366
make pointer const
2007-07-05 18:01:47 +02:00
Sascha Hauer 2897414d14 svn_rev_319
add some comments
2007-07-05 18:01:43 +02:00
Sascha Hauer 4195bc3323 svn_rev_296 2007-07-05 18:01:40 +02:00
Sascha Hauer 93ca1de96a svn_rev_291
add get_first_device() function
2007-07-05 18:01:40 +02:00
Sascha Hauer 0f184e3a55 svn_rev_273
split up header files, make src pointer in write functions const
2007-07-05 18:01:39 +02:00
Sascha Hauer 112ada667b svn_rev_270
WIP FS support
2007-07-05 18:01:38 +02:00
Sascha Hauer cf7a56fc78 svn_rev_268
WIP
2007-07-05 18:01:38 +02:00
Sascha Hauer 9db8ed3312 svn_rev_261
WIP Filesystem support
2007-07-05 18:01:37 +02:00
Sascha Hauer 7880ba6372 svn_rev_235
beginning filesystem support
2007-07-05 18:01:35 +02:00
Sascha Hauer a089e67dce svn_rev_231
moved param related things to extra header file
2007-07-05 18:01:35 +02:00
Sascha Hauer 8dcc816ba9 svn_rev_227
fix parameter handling
2007-07-05 18:01:34 +02:00
Sascha Hauer 76694f989c svn_rev_204 2007-07-05 18:01:32 +02:00
Sascha Hauer 42e2dbc120 svn_rev_149
no need for bi_dram in global data (untested)
2007-07-05 18:01:27 +02:00
Sascha Hauer a0b0cfc5ed svn_rev_121
implement device parameters
2007-07-05 18:01:25 +02:00