14baa9922SRussell King /* 24baa9922SRussell King * arch/arm/include/asm/mach/arch.h 34baa9922SRussell King * 44baa9922SRussell King * Copyright (C) 2000 Russell King 54baa9922SRussell King * 64baa9922SRussell King * This program is free software; you can redistribute it and/or modify 74baa9922SRussell King * it under the terms of the GNU General Public License version 2 as 84baa9922SRussell King * published by the Free Software Foundation. 94baa9922SRussell King */ 104baa9922SRussell King 114baa9922SRussell King #ifndef __ASSEMBLY__ 124baa9922SRussell King 134baa9922SRussell King struct tag; 144baa9922SRussell King struct meminfo; 154baa9922SRussell King struct sys_timer; 164baa9922SRussell King 174baa9922SRussell King struct machine_desc { 184baa9922SRussell King unsigned int nr; /* architecture number */ 194baa9922SRussell King const char *name; /* architecture name */ 204baa9922SRussell King unsigned long boot_params; /* tagged list */ 2193c02ab4SGrant Likely const char **dt_compat; /* array of device tree 2293c02ab4SGrant Likely * 'compatible' strings */ 234baa9922SRussell King 24d71e3eb5SNicolas Pitre unsigned int nr_irqs; /* number of IRQs */ 25d71e3eb5SNicolas Pitre 264fddcaebSNicolas Pitre #ifdef CONFIG_ZONE_DMA 274fddcaebSNicolas Pitre unsigned long dma_zone_size; /* size of DMA-able area */ 284fddcaebSNicolas Pitre #endif 294fddcaebSNicolas Pitre 304baa9922SRussell King unsigned int video_start; /* start of video RAM */ 314baa9922SRussell King unsigned int video_end; /* end of video RAM */ 324baa9922SRussell King 334baa9922SRussell King unsigned int reserve_lp0 :1; /* never has lp0 */ 344baa9922SRussell King unsigned int reserve_lp1 :1; /* never has lp1 */ 354baa9922SRussell King unsigned int reserve_lp2 :1; /* never has lp2 */ 364baa9922SRussell King unsigned int soft_reboot :1; /* soft reboot */ 374baa9922SRussell King void (*fixup)(struct machine_desc *, 384baa9922SRussell King struct tag *, char **, 394baa9922SRussell King struct meminfo *); 4098c672cfSRussell King void (*reserve)(void);/* reserve mem blocks */ 414baa9922SRussell King void (*map_io)(void);/* IO mapping function */ 42dec12e62SRussell King void (*init_early)(void); 434baa9922SRussell King void (*init_irq)(void); 444baa9922SRussell King struct sys_timer *timer; /* system tick timer */ 454baa9922SRussell King void (*init_machine)(void); 4652108641Seric miao #ifdef CONFIG_MULTI_IRQ_HANDLER 4752108641Seric miao void (*handle_irq)(struct pt_regs *); 4852108641Seric miao #endif 494baa9922SRussell King }; 504baa9922SRussell King 514baa9922SRussell King /* 528ff1443cSRussell King * Current machine - only accessible during boot. 538ff1443cSRussell King */ 548ff1443cSRussell King extern struct machine_desc *machine_desc; 558ff1443cSRussell King 568ff1443cSRussell King /* 576291319dSGrant Likely * Machine type table - also only accessible during boot 586291319dSGrant Likely */ 596291319dSGrant Likely extern struct machine_desc __arch_info_begin[], __arch_info_end[]; 606291319dSGrant Likely #define for_each_machine_desc(p) \ 616291319dSGrant Likely for (p = __arch_info_begin; p < __arch_info_end; p++) 626291319dSGrant Likely 636291319dSGrant Likely /* 644baa9922SRussell King * Set of macros to define architecture features. This is built into 654baa9922SRussell King * a table by the linker. 664baa9922SRussell King */ 674baa9922SRussell King #define MACHINE_START(_type,_name) \ 684baa9922SRussell King static const struct machine_desc __mach_desc_##_type \ 694baa9922SRussell King __used \ 704baa9922SRussell King __attribute__((__section__(".arch.info.init"))) = { \ 714baa9922SRussell King .nr = MACH_TYPE_##_type, \ 724baa9922SRussell King .name = _name, 734baa9922SRussell King 744baa9922SRussell King #define MACHINE_END \ 754baa9922SRussell King }; 764baa9922SRussell King 77*85cad1b0SGrant Likely #define DT_MACHINE_START(_name, _namestr) \ 78*85cad1b0SGrant Likely static const struct machine_desc __mach_desc_##_name \ 79*85cad1b0SGrant Likely __used \ 80*85cad1b0SGrant Likely __attribute__((__section__(".arch.info.init"))) = { \ 81*85cad1b0SGrant Likely .nr = ~0, \ 82*85cad1b0SGrant Likely .name = _namestr, 83*85cad1b0SGrant Likely 844baa9922SRussell King #endif 85