Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

pmac_setup.c File Reference

#include <linux/config.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/malloc.h>
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/tty.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/major.h>
#include <linux/blk.h>
#include <linux/vt_kern.h>
#include <linux/console.h>
#include <linux/pci.h>
#include <asm/prom.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/pci-bridge.h>
#include <asm/adb.h>
#include <asm/cuda.h>
#include <asm/pmu.h>
#include <asm/ohare.h>
#include <asm/mediabay.h>
#include <asm/feature.h>
#include <asm/ide.h>
#include <asm/machdep.h>
#include <asm/keyboard.h>
#include <asm/time.h>
#include "local_irq.h"
#include "pmac_pic.h"

Include dependency graph for pmac_setup.c:

Go to the source code of this file.

Defines

#define DEFAULT_ROOT_DEVICE   0x0801

Functions

long pmac_time_init (void)
unsigned long pmac_get_rtc_time (void)
int pmac_set_rtc_time (unsigned long nowtime)
void pmac_read_rtc_time (void)
void pmac_calibrate_decr (void)
void pmac_setup_pci_ptrs (void)
int mackbd_setkeycode (unsigned int scancode, unsigned int keycode)
int mackbd_getkeycode (unsigned int scancode)
int mackbd_translate (unsigned char scancode, unsigned char *keycode, char raw_mode)
char mackbd_unexpected_up (unsigned char keycode)
void mackbd_leds (unsigned char leds)
void mackbd_init_hw (void)
int mac_hid_kbd_translate (unsigned char scancode, unsigned char *keycode, char raw_mode)
char mac_hid_kbd_unexpected_up (unsigned char keycode)
void mac_hid_init_hw (void)
void pmac_nvram_update (void)
void * pmac_pci_dev_io_base (unsigned char bus, unsigned char devfn)
void * pmac_pci_dev_mem_base (unsigned char bus, unsigned char devfn)
int pmac_pci_dev_root_bridge (unsigned char bus, unsigned char devfn)
void zs_kgdb_hook (int tty_num)
static void ohare_init (void)
static void init_p2pbridge (void)
__pmac int pmac_get_cpuinfo (char *buffer)
static __pmac void pmac_mksound (unsigned int hz, unsigned int ticks)
 __initfunc (void pmac_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p))
 __initfunc (static void init_p2pbridge(void))
 __initfunc (void pmac_init2(void))
__pmac void note_bootable_part (kdev_t dev, int part, int goodness)
void pmac_restart (char *cmd)
void pmac_power_off (void)
void pmac_halt (void)
 __initfunc (void pmac_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7))

Variables

int keyboard_sends_linux_keycodes
unsigned char drive_info
int ppc_override_l2cr = 0
int ppc_override_l2cr_value
static int current_root_goodness = -1
char saved_command_line []
int pmac_newworld
static volatile u32sysctrl_regs
char * bootpath
char * bootdevice
void * boot_host
int boot_target
int boot_part
kdev_t boot_dev


Define Documentation

#define DEFAULT_ROOT_DEVICE   0x0801
 

Definition at line 110 of file pmac_setup.c.

Referenced by __initfunc(), and note_bootable_part().


Function Documentation

__initfunc void   pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,unsigned long r6, unsigned long r7)  ) 
 

Definition at line 641 of file pmac_setup.c.

References _IO_BASE, machdep_calls::calibrate_decr, DMA_MODE_READ, DMA_MODE_WRITE, machdep_calls::do_IRQ, machdep_calls::get_cpuinfo, machdep_calls::get_rtc_time, machdep_calls::halt, machdep_calls::init, machdep_calls::init_IRQ, machdep_calls::irq_cannonicalize, ISA_DMA_THRESHOLD, isa_mem_base, machdep_calls::kbd_getkeycode, machdep_calls::kbd_init_hw, machdep_calls::kbd_leds, machdep_calls::kbd_setkeycode, machdep_calls::kbd_translate, machdep_calls::kbd_unexpected_up, keyboard_sends_linux_keycodes, L, mac_hid_init_hw(), mac_hid_kbd_translate(), mac_hid_kbd_unexpected_up(), mackbd_getkeycode(), mackbd_init_hw(), mackbd_leds(), mackbd_setkeycode(), mackbd_sysrq_xlate, mackbd_translate(), mackbd_unexpected_up(), NULL, machdep_calls::pci_dev_io_base, machdep_calls::pci_dev_mem_base, machdep_calls::pci_dev_root_bridge, pci_dram_offset, pckbd_sysrq_xlate, pmac_calibrate_decr(), pmac_do_IRQ(), pmac_get_cpuinfo(), pmac_get_rtc_time(), pmac_halt(), pmac_ide_init_hwif_ports(), PMAC_ISA_MEM_BASE, pmac_pci_dev_io_base(), pmac_pci_dev_mem_base(), pmac_pci_dev_root_bridge(), PMAC_PCI_DRAM_OFFSET, pmac_pic_init(), pmac_power_off(), pmac_restart(), pmac_set_rtc_time(), pmac_setup_pci_ptrs(), pmac_time_init(), machdep_calls::power_off, ppc_ide_md, ppc_md, machdep_calls::restart, machdep_calls::set_rtc_time, machdep_calls::setup_arch, machdep_calls::setup_residual, SYSRQ_KEY, and machdep_calls::time_init.

Here is the call graph for this function:

__initfunc void   pmac_init2(void)  ) 
 

Definition at line 412 of file pmac_setup.c.

References adb_init(), and media_bay_init().

Here is the call graph for this function:

__initfunc static void   init_p2pbridge(void)  ) 
 

Definition at line 365 of file pmac_setup.c.

References bus, find_devices(), device_node::name, NULL, device_node::parent, PCI_BRIDGE_CONTROL, PCI_BRIDGE_CTL_MASTER_ABORT, pci_device_loc(), pcibios_read_config_word(), pcibios_write_config_word(), strcmp, and val.

Here is the call graph for this function:

__initfunc void   pmac_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p)  ) 
 

Definition at line 271 of file pmac_setup.c.

References __ioremap(), _get_HID0(), _get_PVR(), _set_HID0(), _set_L2CR(), conswitchp, core99_init_l2(), DEFAULT_ROOT_DEVICE, dummy_con, feature_init(), find_devices(), find_type_devices(), find_via_cuda(), find_via_pmu(), fp, get_property(), HID0_DPM, HZ, init_p2pbridge(), initrd_start, ioremap, kd_mksound, KERN_INFO, loops_per_jiffy, MKDEV, NULL, ohare_init(), PAGE_READONLY, pmac_find_bridges(), pmac_mksound(), pmac_nvram_init(), ppc_override_l2cr, ppc_override_l2cr_value, printk, RAMDISK_MAJOR, ROOT_DEV, u32, x1000, x80000000, and zs_kgdb_hook().

Here is the call graph for this function:

static void init_p2pbridge void   )  [static]
 

Referenced by __initfunc().

void mac_hid_init_hw void   ) 
 

Definition at line 475 of file mac_hid.c.

References _MACH_Pmac, _machine, key_maps, keyboard_sends_linux_keycodes, memcpy, pckbd_init_hw(), pckbd_sysrq_xlate, ppc_md, register_sysctl_table(), and SYSRQ_KEY.

Referenced by __initfunc().

Here is the call graph for this function:

int mac_hid_kbd_translate unsigned char  scancode,
unsigned char *  keycode,
char  raw_mode
 

Definition at line 321 of file mac_hid.c.

References e0_keys, KERN_INFO, KEY_INTL1, KEY_KPEQUAL, KEY_LINEFEED, KEY_PAUSE, keyboard_sends_linux_keycodes, prev_scancode, printk, x100, and x45.

Referenced by __initfunc().

char mac_hid_kbd_unexpected_up unsigned char  keycode  ) 
 

Definition at line 395 of file mac_hid.c.

References KEY_F13, and keyboard_sends_linux_keycodes.

Referenced by __initfunc().

int mackbd_getkeycode unsigned int  scancode  ) 
 

Definition at line 293 of file mac_keyb.c.

References EINVAL.

void mackbd_init_hw void   ) 
 

Definition at line 697 of file mac_keyb.c.

References _MACH_chrp, _MACH_Pmac, _machine, adb_client_list, key_maps, mackeyb_probe(), memcpy, NULL, and plain_map.

Here is the call graph for this function:

void mackbd_leds unsigned char  leds  ) 
 

Definition at line 674 of file mac_keyb.c.

References i, keyboard_ids, and real_mackbd_leds().

Here is the call graph for this function:

int mackbd_setkeycode unsigned int  scancode,
unsigned int  keycode
 

Definition at line 288 of file mac_keyb.c.

References EINVAL.

int mackbd_translate unsigned char  scancode,
unsigned char *  keycode,
char  raw_mode
 

Definition at line 249 of file mackeyb.c.

char mackbd_unexpected_up unsigned char  keycode  ) 
 

Definition at line 269 of file mackeyb.c.

__pmac void note_bootable_part kdev_t  dev,
int  part,
int  goodness
 

Definition at line 496 of file pmac_setup.c.

References current_root_goodness, DEFAULT_ROOT_DEVICE, MAJOR, MINOR, MKDEV, NULL, ROOT_DEV, saved_command_line, and strstr().

Here is the call graph for this function:

static void ohare_init void   )  [static]
 

Referenced by __initfunc().

void pmac_calibrate_decr void   ) 
 

Referenced by __initfunc().

__pmac int pmac_get_cpuinfo char *  buffer  ) 
 

Definition at line 138 of file pmac_setup.c.

References find_devices(), find_type_devices(), get_property(), l, len, n, NULL, pmac_newworld, pp, reg, sprintf(), and strlen.

Referenced by __initfunc().

Here is the call graph for this function:

unsigned long pmac_get_rtc_time void   ) 
 

Definition at line 73 of file pmac_time.c.

References adb_controller, adb_request(), CUDA_GET_TIME, CUDA_PACKET, cuda_poll(), cuda_request(), KERN_ERR, NULL, pmu_poll(), PMU_READ_RTC, pmu_request(), printk, and RTC_OFFSET.

Referenced by __initfunc().

Here is the call graph for this function:

void pmac_halt void   ) 
 

Definition at line 565 of file pmac_setup.c.

Referenced by __initfunc().

static __pmac void pmac_mksound unsigned int  hz,
unsigned int  ticks
[static]
 

Definition at line 265 of file pmac_setup.c.

Referenced by __initfunc().

void pmac_nvram_update void   ) 
 

Definition at line 302 of file pmac_support.c.

References core99_header::adler, chrp_checksum(), chrp_header::cksum, core99_bank, core99_calc_adler(), core99_erase_bank(), CORE99_SIGNATURE, core99_write_bank(), core99_header::generation, core99_header::hdr, is_core_99, memcmp, nvram_data, nvram_image, NVRAM_SIZE, printk, chrp_header::signature, and u8.

Referenced by pmac_power_off(), and pmac_restart().

Here is the call graph for this function:

void* pmac_pci_dev_io_base unsigned char  bus,
unsigned char  devfn
 

void* pmac_pci_dev_mem_base unsigned char  bus,
unsigned char  devfn
 

Definition at line 158 of file pmac_pci.c.

Referenced by __initfunc().

int pmac_pci_dev_root_bridge unsigned char  bus,
unsigned char  devfn
 

Definition at line 97 of file pmac_pci.c.

References device_is_compatible(), find_pci_device_OFnode(), i, KERN_WARNING, NULL, device_node::parent, PCI_SLOT, printk, strcmp, device_node::type, uninorth_count, uninorth_default, and xf8.

Referenced by __initfunc(), pmac_pci_dev_io_base(), and uni_north_access_data().

Here is the call graph for this function:

void pmac_power_off void   ) 
 

Definition at line 543 of file pmac_setup.c.

References adb_hardware, adb_request(), CUDA_PACKET, cuda_poll(), CUDA_POWERDOWN, cuda_request(), NULL, pmac_nvram_update(), and pmu_shutdown().

Referenced by __initfunc().

Here is the call graph for this function:

void pmac_read_rtc_time void   ) 
 

void pmac_restart char *  cmd  ) 
 

Definition at line 521 of file pmac_setup.c.

References adb_hardware, adb_request(), CUDA_PACKET, cuda_poll(), cuda_request(), CUDA_RESET_SYSTEM, NULL, pmac_nvram_update(), and pmu_restart().

Referenced by __initfunc().

Here is the call graph for this function:

int pmac_set_rtc_time unsigned long  nowtime  ) 
 

Definition at line 110 of file pmac_time.c.

References adb_controller, adb_request(), CUDA_PACKET, cuda_poll(), cuda_request(), CUDA_SET_TIME, dst, KERN_ERR, NULL, pmu_poll(), pmu_request(), PMU_SET_RTC, printk, and RTC_OFFSET.

Referenced by __initfunc().

Here is the call graph for this function:

void pmac_setup_pci_ptrs void   ) 
 

Referenced by __initfunc().

long pmac_time_init void   ) 
 

Definition at line 56 of file pmac_time.c.

References dst, PMAC_XPRAM_MACHINE_LOC, pmac_xpram_read(), printk, s32, and x8.

Referenced by __initfunc().

Here is the call graph for this function:

void zs_kgdb_hook int  tty_num  ) 
 

Referenced by __initfunc().


Variable Documentation

kdev_t boot_dev
 

Definition at line 410 of file pmac_setup.c.

void* boot_host
 

Definition at line 407 of file pmac_setup.c.

int boot_part
 

Definition at line 409 of file pmac_setup.c.

int boot_target
 

Definition at line 408 of file pmac_setup.c.

char* bootdevice
 

Definition at line 103 of file prom.c.

Referenced by prom_init().

char* bootpath
 

Definition at line 102 of file prom.c.

Referenced by prom_init().

int current_root_goodness = -1 [static]
 

Definition at line 104 of file pmac_setup.c.

Referenced by note_bootable_part().

unsigned char drive_info
 

Definition at line 99 of file pmac_setup.c.

int keyboard_sends_linux_keycodes
 

Definition at line 192 of file mac_hid.c.

Referenced by __initfunc(), mac_hid_init_hw(), mac_hid_kbd_translate(), and mac_hid_kbd_unexpected_up().

int pmac_newworld
 

Definition at line 112 of file prom.c.

Referenced by finish_device_tree(), lookup_partitions(), and pmac_get_cpuinfo().

int ppc_override_l2cr = 0
 

Definition at line 101 of file pmac_setup.c.

Referenced by __initfunc().

int ppc_override_l2cr_value
 

Definition at line 102 of file pmac_setup.c.

Referenced by __initfunc().

char saved_command_line[]
 

Definition at line 87 of file alpha/kernel/setup.c.

volatile u32* sysctrl_regs [static]
 

Definition at line 269 of file pmac_setup.c.