Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | #ifdef __KERNEL__ #ifndef _PPC64_MACHDEP_H #define _PPC64_MACHDEP_H /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <linux/config.h> #include <linux/seq_file.h> struct pt_regs; struct pci_bus; struct device_node; struct TceTable; struct rtc_time; #ifdef CONFIG_SMP struct smp_ops_t { void (*message_pass)(int target, int msg, unsigned long data, int wait); int (*probe)(void); void (*kick_cpu)(int nr); void (*setup_cpu)(int nr); void (*take_timebase)(void); void (*give_timebase)(void); }; #endif struct machdep_calls { void (*hpte_invalidate)(unsigned long slot, unsigned long va, int large, int local); long (*hpte_updatepp)(unsigned long slot, unsigned long newpp, unsigned long va, int large); void (*hpte_updateboltedpp)(unsigned long newpp, unsigned long ea); long (*insert_hpte)(unsigned long hpte_group, unsigned long vpn, unsigned long prpn, int secondary, unsigned long hpteflags, int bolted, int large); long (*remove_hpte)(unsigned long hpte_group); void (*flush_hash_range)(unsigned long context, unsigned long number, int local); void (*make_pte)(void *htab, unsigned long va, unsigned long pa, int mode, unsigned long hash_mask, int large); void (*tce_build)(struct TceTable * tbl, long tcenum, unsigned long uaddr, int direction); void (*tce_free_one)(struct TceTable *tbl, long tcenum); void (*setup_arch)(void); /* Optional, may be NULL. */ void (*setup_residual)(struct seq_file *m, int cpu_id); /* Optional, may be NULL. */ void (*get_cpuinfo)(struct seq_file *m); void (*init_IRQ)(void); void (*init_ras_IRQ)(void); int (*get_irq)(struct pt_regs *); /* Optional, may be NULL. */ void (*init)(void); void (*restart)(char *cmd); void (*power_off)(void); void (*halt)(void); int (*set_rtc_time)(struct rtc_time *); void (*get_rtc_time)(struct rtc_time *); void (*get_boot_time)(struct rtc_time *); void (*calibrate_decr)(void); void (*progress)(char *, unsigned short); /* Debug interface. Low level I/O to some terminal device */ void (*udbg_putc)(unsigned char c); unsigned char (*udbg_getc)(void); int (*udbg_getc_poll)(void); /* PCI interfaces */ int (*pcibios_read_config)(struct device_node *dn, int where, int size, u32 *val); int (*pcibios_write_config)(struct device_node *dn, int where, int size, u32 val); /* Called after scanning the bus, before allocating * resources */ void (*pcibios_fixup)(void); /* Called for each PCI bus in the system * when it's probed */ void (*pcibios_fixup_bus)(struct pci_bus *); #ifdef CONFIG_SMP /* functions for dealing with other cpus */ struct smp_ops_t smp_ops; #endif /* CONFIG_SMP */ }; extern struct machdep_calls ppc_md; extern char cmd_line[512]; /* Functions to produce codes on the leds. * The SRC code should be unique for the message category and should * be limited to the lower 24 bits (the upper 8 are set by these funcs), * and (for boot & dump) should be sorted numerically in the order * the events occur. */ /* Print a boot progress message. */ void ppc64_boot_msg(unsigned int src, const char *msg); /* Print a termination message (print only -- does not stop the kernel) */ void ppc64_terminate_msg(unsigned int src, const char *msg); /* Print something that needs attention (device error, etc) */ void ppc64_attention_msg(unsigned int src, const char *msg); /* Print a dump progress message. */ void ppc64_dump_msg(unsigned int src, const char *msg); #endif /* _PPC64_MACHDEP_H */ #endif /* __KERNEL__ */ |