diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-15 15:07:35 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-15 15:07:35 (GMT) |
commit | 5f2434a66dfa4701b81b79a78eaf9c32da0f8839 (patch) | |
tree | 8c38f1fb0d0fbcd15e496df89be00ad8c4918a43 /arch/powerpc/boot/dtc-src/srcpos.h | |
parent | 278429cff8809958d25415ba0ed32b59866ab1a8 (diff) | |
parent | 6dc6472581f693b5fc95aebedf67b4960fb85cf0 (diff) | |
download | linux-fsl-qoriq-5f2434a66dfa4701b81b79a78eaf9c32da0f8839.tar.xz |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (158 commits)
powerpc: Fix CHRP PCI config access for indirect_pci
powerpc/chrp: Fix detection of Python PCI host bridge on IBM CHRPs
powerpc: Fix 32-bit SMP boot on CHRP
powerpc: Fix link errors on 32-bit machines using legacy DMA
powerpc/pci: Improve detection of unassigned bridge resources
hvc_console: Fix free_irq in spinlocked section
powerpc: Get USE_STRICT_MM_TYPECHECKS working again
powerpc: Reflect the used arguments in machine_init() prototype
powerpc: Fix DMA offset for non-coherent DMA
powerpc: fix fsl_upm nand driver modular build
powerpc/83xx: add NAND support for the MPC8360E-RDK boards
powerpc: FPGA support for GE Fanuc SBC610
i2c: MPC8349E-mITX Power Management and GPIO expander driver
powerpc: reserve two DMA channels for audio in MPC8610 HPCD device tree
powerpc: document the "fsl,ssi-dma-channel" compatible property
powerpc: disable CHRP and PMAC support in various defconfigs
OF: add fsl,mcu-mpc8349emitx to the exception list
powerpc/83xx: add DS1374 RTC support for the MPC837xE-MDS boards
powerpc: remove support for bootmem-allocated memory for the DIU driver
powerpc: remove non-dependent load fsl_booke PTE_64BIT
...
Diffstat (limited to 'arch/powerpc/boot/dtc-src/srcpos.h')
-rw-r--r-- | arch/powerpc/boot/dtc-src/srcpos.h | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/arch/powerpc/boot/dtc-src/srcpos.h b/arch/powerpc/boot/dtc-src/srcpos.h index ce7ab5b..e17c7c0 100644 --- a/arch/powerpc/boot/dtc-src/srcpos.h +++ b/arch/powerpc/boot/dtc-src/srcpos.h @@ -22,13 +22,21 @@ * array of all opened filenames. */ +#include <stdio.h> + +struct dtc_file { + char *dir; + const char *name; + FILE *file; +}; + #if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED) typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; - int filenum; + struct dtc_file *file; } YYLTYPE; #define YYLTYPE_IS_DECLARED 1 @@ -48,7 +56,7 @@ typedef struct YYLTYPE { (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - (Current).filenum = YYRHSLOC (Rhs, N).filenum; \ + (Current).file = YYRHSLOC (Rhs, N).file; \ } \ else \ { \ @@ -56,20 +64,22 @@ typedef struct YYLTYPE { YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ - (Current).filenum = YYRHSLOC (Rhs, 0).filenum; \ + (Current).file = YYRHSLOC (Rhs, 0).file; \ } \ while (YYID (0)) extern void yyerror(char const *); +extern void yyerrorf(char const *, ...) __attribute__((format(printf, 1, 2))); -extern int srcpos_filenum; +extern struct dtc_file *srcpos_file; -extern int push_input_file(const char *filename); -extern int pop_input_file(void); +struct search_path { + const char *dir; /* NULL for current directory */ + struct search_path *prev, *next; +}; -extern FILE *dtc_open_file(const char *fname); -extern int lookup_file_name(const char *fname, int add_it); -extern const char *srcpos_filename_for_num(int filenum); -const char *srcpos_get_filename(void); +extern struct dtc_file *dtc_open_file(const char *fname, + const struct search_path *search); +extern void dtc_close_file(struct dtc_file *file); |