File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#include <linux/string.h>
1717#include <linux/dma-direct.h> /* for bus_dma_region */
1818
19- #include "of_private.h"
20-
21- /* Max address size we deal with */
22- #define OF_MAX_ADDR_CELLS 4
23- #define OF_CHECK_ADDR_COUNT (na ) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS)
24- #define OF_CHECK_COUNTS (na , ns ) (OF_CHECK_ADDR_COUNT(na) && (ns) > 0)
19+ /* Uncomment me to enable of_dump_addr() debugging output */
20+ // #define DEBUG
2521
26- /* Debug utility */
27- #ifdef DEBUG
28- static void of_dump_addr (const char * s , const __be32 * addr , int na )
29- {
30- pr_debug ("%s" , s );
31- while (na -- )
32- pr_cont (" %08x" , be32_to_cpu (* (addr ++ )));
33- pr_cont ("\n" );
34- }
35- #else
36- static void of_dump_addr (const char * s , const __be32 * addr , int na ) { }
37- #endif
22+ #include "of_private.h"
3823
3924/* Callbacks for bus specific translators */
4025struct of_bus {
Original file line number Diff line number Diff line change 1717#include <linux/of_fdt.h>
1818#include <linux/sizes.h>
1919
20- /* Max address size we deal with */
21- #define OF_MAX_ADDR_CELLS 4
22- #define OF_CHECK_COUNTS (na , ns ) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
23- (ns) > 0)
24-
25- /* Debug utility */
26- #ifdef DEBUG
27- static void __init of_dump_addr (const char * s , const __be32 * addr , int na )
28- {
29- pr_debug ("%s" , s );
30- while (na -- )
31- pr_cont (" %08x" , be32_to_cpu (* (addr ++ )));
32- pr_cont ("\n" );
33- }
34- #else
35- static void __init of_dump_addr (const char * s , const __be32 * addr , int na ) { }
36- #endif
20+ /* Uncomment me to enable of_dump_addr() debugging output */
21+ // #define DEBUG
22+
23+ #include "of_private.h"
3724
3825/* Callbacks for bus specific translators */
3926struct of_bus {
Original file line number Diff line number Diff line change @@ -188,4 +188,22 @@ void __init fdt_scan_reserved_mem_reg_nodes(void);
188188
189189bool of_fdt_device_is_available (const void * blob , unsigned long node );
190190
191+ /* Max address size we deal with */
192+ #define OF_MAX_ADDR_CELLS 4
193+ #define OF_CHECK_ADDR_COUNT (na ) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS)
194+ #define OF_CHECK_COUNTS (na , ns ) (OF_CHECK_ADDR_COUNT(na) && (ns) > 0)
195+
196+ /* Debug utility */
197+ #ifdef DEBUG
198+ static void __maybe_unused of_dump_addr (const char * s , const __be32 * addr , int na )
199+ {
200+ pr_debug ("%s" , s );
201+ while (na -- )
202+ pr_cont (" %08x" , be32_to_cpu (* (addr ++ )));
203+ pr_cont ("\n" );
204+ }
205+ #else
206+ static void __maybe_unused of_dump_addr (const char * s , const __be32 * addr , int na ) { }
207+ #endif
208+
191209#endif /* _LINUX_OF_PRIVATE_H */
You can’t perform that action at this time.
0 commit comments