summaryrefslogtreecommitdiffstats
path: root/common/resource.c
Commit message (Collapse)AuthorAgeFilesLines
* resource: fix iomem_resource.end for 64 bit systemsPeter Mamonov2018-05-231-1/+1
| | | | | | | | Fix iomem_resource.end to cover the whole address space addressable by a variable of type resource_size_t. Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let request_ioport_region return an error pointerSascha Hauer2014-09-161-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let request_iomem_region return an error pointerSascha Hauer2014-09-161-7/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let __request_region return an error pointerSascha Hauer2014-09-161-5/+18
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "common: resource: print conflicts as warning"Sascha Hauer2014-08-041-1/+1
| | | | | | | | | | | | | | On several i.MX boards we register SDRAM with the values from the SDRAM controller and also with values from the device tree. This now issues a warning each time the board is started. Revert the commit for now. A better solution might be to check if the same SDRAM region already exists before trying to register it again. This reverts commit c9e2e08edcdce4205821226817686e62dc349eab. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: resource: print conflicts as warningAlexander Aring2014-06-241-1/+1
| | | | | | | | | | | | | | | Crazy things happen if there are resource conflicts and a device probe runs dev_request_mem_region. The dev_request_mem_region returns a start pointer which is zero. The probe function doesn't check on this and probing the device on zero base address. To debug this in debug log level there are many other outputs. This patch replace the debug print to a warning printout. A conflict should normally never happen. If there is a conflict it's much easier to see it with this patch. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: Allow for I/O mapped I/OMichel Stam2014-04-081-5/+23
| | | | | | | | Rework the current framework so that I/O mapped I/O resources are also possible. Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix format specifiersSascha Hauer2013-01-271-7/+19
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: statically initialize iomem resourceSascha Hauer2012-10-071-8/+2
| | | | | | | This gets us rid of an initcall and also has the advantage that request_iomem_region can be called at any time now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+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>
* resource: store 'end' instead of 'size' in struct resourceSascha Hauer2012-07-011-13/+17
| | | | | | | | | | 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>
* add resource management functionsSascha Hauer2011-12-031-0/+121
It is time to track our memory usage. Add a simple resource management. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>