You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
From: James S. <jsi...@us...> - 2002-03-15 17:24:41
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv31675 Modified Files: vgacon.c Log Message: Fixed nasty bug that lead to a oops. Index: vgacon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/vgacon.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- vgacon.c 14 Mar 2002 22:32:23 -0000 1.62 +++ vgacon.c 15 Mar 2002 17:24:37 -0000 1.63 @@ -480,6 +480,7 @@ } vgacon_state.mode = MODE_TEXT; + vc->display_fg = vt; vt->data_hook = (void *) &vgacon_state; if (init) { |
From: johann d. <jd...@us...> - 2002-03-14 23:21:02
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb In directory usw-pr-cvs1:/tmp/cvs-serv32692 Modified Files: hid-ff.c Log Message: Moved code around (to group functions directly called from outside). Index: hid-ff.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hid-ff.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- hid-ff.c 14 Mar 2002 23:17:43 -0000 1.5 +++ hid-ff.c 14 Mar 2002 23:20:59 -0000 1.6 @@ -225,47 +225,6 @@ } -static void hid_lgff_make_rumble(struct hid_device* hid) -{ - struct hid_ff_logitech *lgff = hid->ff_private; - char packet[] = {0x03, 0x42, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00}; - int err; - int left = 0, right = 0; - int i; - - dbg("in hid_make_rumble"); - memcpy(lgff->buf, packet, 8); - - - for (i=0; i<LGFF_EFFECTS; ++i) { - if (test_bit(EFFECT_USED, lgff->effects[i].flags) - && test_bit(EFFECT_PLAYING, lgff->effects[i].flags)) { - left += lgff->effects[i].left; - right += lgff->effects[i].right; - } - } - - lgff->buf[3] = left > 0x7f ? 0x7f : left; - lgff->buf[4] = right > 0x7f ? 0x7f : right; - - /*FIXME: needs a queue. I should at least check if the urb is - available */ - lgff->urbffout->pipe = usb_sndctrlpipe(hid->dev, 0); - lgff->ffcr.bRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE; - lgff->urbffout->transfer_buffer_length = lgff->ffcr.wLength = 8; - lgff->ffcr.bRequest = 9; - lgff->ffcr.wValue = 0x0203; /*NOTE: Potential problem with - little/big endian */ - lgff->ffcr.wIndex = 0; - - lgff->urbffout->dev = hid->dev; - - if ((err=usb_submit_urb(lgff->urbffout, GFP_ATOMIC))) - warn("usb_submit_urb returned %d", err); - dbg("rumble urb submited"); -} - - /* Erase all effects this process owns */ static int hid_lgff_flush(struct input_dev *dev, struct file *file) { @@ -307,16 +266,6 @@ return 0; } -static void hid_lgff_ctrl_out(struct urb *urb) -{ - struct hid_device *hid = urb->context; - - if (urb->status) - warn("hid_irq_ffout status %d received", urb->status); - - wake_up(&((struct hid_ff_logitech *)(hid->ff_private))->wait); -} - static int hid_lgff_upload_effect(struct input_dev* input, struct ff_effect* effect) { @@ -382,6 +331,56 @@ spin_unlock_irqrestore(&lgff->lock, flags); return 0; +} + +static void hid_lgff_make_rumble(struct hid_device* hid) +{ + struct hid_ff_logitech *lgff = hid->ff_private; + char packet[] = {0x03, 0x42, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00}; + int err; + int left = 0, right = 0; + int i; + + dbg("in hid_make_rumble"); + memcpy(lgff->buf, packet, 8); + + + for (i=0; i<LGFF_EFFECTS; ++i) { + if (test_bit(EFFECT_USED, lgff->effects[i].flags) + && test_bit(EFFECT_PLAYING, lgff->effects[i].flags)) { + left += lgff->effects[i].left; + right += lgff->effects[i].right; + } + } + + lgff->buf[3] = left > 0x7f ? 0x7f : left; + lgff->buf[4] = right > 0x7f ? 0x7f : right; + + /*FIXME: needs a queue. I should at least check if the urb is + available */ + lgff->urbffout->pipe = usb_sndctrlpipe(hid->dev, 0); + lgff->ffcr.bRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE; + lgff->urbffout->transfer_buffer_length = lgff->ffcr.wLength = 8; + lgff->ffcr.bRequest = 9; + lgff->ffcr.wValue = 0x0203; /*NOTE: Potential problem with + little/big endian */ + lgff->ffcr.wIndex = 0; + + lgff->urbffout->dev = hid->dev; + + if ((err=usb_submit_urb(lgff->urbffout, GFP_ATOMIC))) + warn("usb_submit_urb returned %d", err); + dbg("rumble urb submited"); +} + +static void hid_lgff_ctrl_out(struct urb *urb) +{ + struct hid_device *hid = urb->context; + + if (urb->status) + warn("hid_irq_ffout status %d received", urb->status); + + wake_up(&((struct hid_ff_logitech *)(hid->ff_private))->wait); } /* Lock must be held by caller */ |
From: johann d. <jd...@us...> - 2002-03-14 23:17:46
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/usb In directory usw-pr-cvs1:/tmp/cvs-serv31821 Modified Files: hid-ff.c Log Message: Added locking. Wait for the control urb to be unlinked before deallocating it. Index: hid-ff.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/usb/hid-ff.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- hid-ff.c 11 Mar 2002 23:25:46 -0000 1.4 +++ hid-ff.c 14 Mar 2002 23:17:43 -0000 1.5 @@ -37,12 +37,14 @@ #include "hid.h" /* Effect status */ -#define EFFECT_STARTED 0 /* Effect is going to play after some time (ff_replay.delay) */ +#define EFFECT_STARTED 0 /* Effect is going to play after some time + (ff_replay.delay) */ #define EFFECT_PLAYING 1 /* Effect is being played */ #define EFFECT_USED 2 /* Check that the current process can access an effect */ -#define CHECK_OWNERSHIP(effect) (current->pid == 0 || effect.owner == current->pid) +#define CHECK_OWNERSHIP(effect) (current->pid == 0 \ + || effect.owner == current->pid) /* Drivers' initializing functions */ @@ -61,12 +63,14 @@ {0, 0, NULL} /* Terminating entry */ }; -static struct hid_ff_initializer *hid_get_ff_init(__u16 idVendor, __u16 idProduct) +static struct hid_ff_initializer *hid_get_ff_init(__u16 idVendor, + __u16 idProduct) { struct hid_ff_initializer *init; for (init = inits; - init->idVendor && - !(init->idVendor == idVendor && init->idProduct == idProduct); + init->idVendor + && !(init->idVendor == idVendor + && init->idProduct == idProduct); init++); return init->idVendor? init : NULL; @@ -76,7 +80,8 @@ { struct hid_ff_initializer *init; - init = hid_get_ff_init(hid->dev->descriptor.idVendor, hid->dev->descriptor.idProduct); + init = hid_get_ff_init(hid->dev->descriptor.idVendor, + hid->dev->descriptor.idProduct); return init? init->init(hid) : -ENOSYS; } @@ -111,20 +116,25 @@ struct usb_ctrlrequest ffcr; /* ff commands use control URBs */ char buf[LGFF_BUFFER_SIZE]; struct lgff_effect effects[LGFF_EFFECTS]; + spinlock_t lock; /* device-level lock. Having locks on + a per-effect basis could be nice, but + isn't really necessary */ + wait_queue_head_t wait; }; static void hid_lgff_ctrl_out(struct urb *urb); static void hid_lgff_exit(struct hid_device* hid); -static int hid_lgff_event(struct hid_device *hid, struct input_dev* input, +static int hid_lgff_event(struct hid_device *hid, struct input_dev *input, unsigned int type, unsigned int code, int value); static void hid_lgff_make_rumble(struct hid_device* hid); static int hid_lgff_flush(struct input_dev *input, struct file *file); -static int hid_lgff_upload_effect(struct input_dev* input, - struct ff_effect* effect); +static int hid_lgff_upload_effect(struct input_dev *input, + struct ff_effect *effect); static int hid_lgff_erase(struct input_dev *input, int id); - +static void hid_lgff_ctrl_playback(struct hid_device* hid, struct lgff_effect*, + int play); static int hid_lgff_init(struct hid_device* hid) { @@ -139,6 +149,9 @@ hid->ff_private = private; + spin_lock_init(&private->lock); + init_waitqueue_head(&private->wait); + /* Event and exit callbacks */ hid->ff_exit = hid_lgff_exit; hid->ff_event = hid_lgff_event; @@ -169,9 +182,24 @@ static void hid_lgff_exit(struct hid_device* hid) { struct hid_ff_logitech *lgff = hid->ff_private; + DECLARE_WAITQUEUE(wait, current); + int timeout = 5*HZ; /* 5 seconds */ if (lgff->urbffout) { usb_unlink_urb(lgff->urbffout); + + set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(&lgff->wait, &wait); + + if (lgff->urbffout->status == -EINPROGRESS) + timeout = schedule_timeout(timeout); + + if (!timeout) + warn("ff control urb still in use. Unlinking anyway\n"); + + set_current_state(TASK_RUNNING); + remove_wait_queue(&lgff->wait, &wait); + usb_free_urb(lgff->urbffout); } } @@ -181,6 +209,7 @@ { struct hid_ff_logitech *lgff = hid->ff_private; struct lgff_effect *effect = lgff->effects + code; + unsigned long flags; if (type != EV_FF) return -EINVAL; @@ -188,13 +217,9 @@ if (value < 0) return -EINVAL; - if (value > 0) { - set_bit(EFFECT_PLAYING, effect->flags); - hid_lgff_make_rumble(hid); - } else /* value == 0*/ { - clear_bit(EFFECT_PLAYING, effect->flags); - hid_lgff_make_rumble(hid); - } + spin_lock_irqsave(&lgff->lock, flags); + hid_lgff_ctrl_playback(hid, effect, value); + spin_unlock_irqrestore(&lgff->lock, flags); return 0; @@ -240,22 +265,23 @@ dbg("rumble urb submited"); } + +/* Erase all effects this process owns */ static int hid_lgff_flush(struct input_dev *dev, struct file *file) { struct hid_device *hid = dev->private; struct hid_ff_logitech *lgff = hid->ff_private; int i; - /* Erase all effects this process owns */ for (i=0; i<dev->ff_effects_max; ++i) { - if (test_bit(EFFECT_USED, lgff->effects[i].flags) && - current->pid == lgff->effects[i].owner) { + /*NOTE: no need to lock here. The only times EFFECT_USED is + modified is when effects are uploaded or when an effect is + erased. But a process cannot close its dev/input/eventX fd + and perform ioctls on the same fd all at the same time */ + if ( current->pid == lgff->effects[i].owner + && test_bit(EFFECT_USED, lgff->effects[i].flags)) { - /* Stop effect */ - input_report_ff(dev, i, 0); - - /* Free ressources assigned to effect */ if (hid_lgff_erase(dev, i)) warn("erase effect %d failed\n", i); } @@ -269,11 +295,14 @@ { struct hid_device *hid = dev->private; struct hid_ff_logitech *lgff = hid->ff_private; + unsigned long flags; if (!LGFF_CHECK_OWNERSHIP(id, lgff)) return -EACCES; - input_report_ff(dev, id, 0); /* Stop effect */ + spin_lock_irqsave(&lgff->lock, flags); + hid_lgff_ctrl_playback(hid, lgff->effects + id, 0); lgff->effects[id].flags[0] = 0; + spin_unlock_irqrestore(&lgff->lock, flags); return 0; } @@ -284,14 +313,18 @@ if (urb->status) warn("hid_irq_ffout status %d received", urb->status); + + wake_up(&((struct hid_ff_logitech *)(hid->ff_private))->wait); } -static int hid_lgff_upload_effect(struct input_dev* input, struct ff_effect* effect) +static int hid_lgff_upload_effect(struct input_dev* input, + struct ff_effect* effect) { struct hid_device *hid = input->private; struct hid_ff_logitech *lgff = hid->ff_private; struct lgff_effect new; int id; + unsigned long flags; dbg("ioctl rumble"); @@ -299,17 +332,26 @@ if (effect->type != FF_RUMBLE) return -EINVAL; + spin_lock_irqsave(&lgff->lock, flags); + if (effect->id == -1) { int i; for (i=0; i<LGFF_EFFECTS && test_bit(EFFECT_USED, lgff->effects[i].flags); ++i); - if (i >= LGFF_EFFECTS) return -ENOSPC; + if (i >= LGFF_EFFECTS) { + spin_unlock_irqrestore(&lgff->lock, flags); + return -ENOSPC; + } effect->id = i; lgff->effects[i].owner = current->pid; + lgff->effects[i].flags[0] = 0; set_bit(EFFECT_USED, lgff->effects[i].flags); } - else if (!LGFF_CHECK_OWNERSHIP(effect->id, lgff)) return -EACCES; + else if (!LGFF_CHECK_OWNERSHIP(effect->id, lgff)) { + spin_unlock_irqrestore(&lgff->lock, flags); + return -EACCES; + } id = effect->id; new = lgff->effects[id]; @@ -326,8 +368,10 @@ /* Changing replay parameters is not allowed (for the time being) */ if (new.replay.delay != lgff->effects[id].replay.delay - || new.replay.length != lgff->effects[id].replay.length) + || new.replay.length != lgff->effects[id].replay.length) { + spin_unlock_irqrestore(&lgff->lock, flags); return -ENOSYS; + } lgff->effects[id] = new; hid_lgff_make_rumble(hid); @@ -336,7 +380,22 @@ lgff->effects[id] = new; } + spin_unlock_irqrestore(&lgff->lock, flags); return 0; +} + +/* Lock must be held by caller */ +static void hid_lgff_ctrl_playback(struct hid_device *hid, + struct lgff_effect *effect, int play) +{ + if (play) { + set_bit(EFFECT_PLAYING, effect->flags); + hid_lgff_make_rumble(hid); + + } else { + clear_bit(EFFECT_PLAYING, effect->flags); + hid_lgff_make_rumble(hid); + } } #endif /* CONFIG_LOGITECH_RUMBLE */ |
From: James S. <jsi...@us...> - 2002-03-14 22:35:59
|
Update of /cvsroot/linuxconsole/ruby/utils In directory usw-pr-cvs1:/tmp/cvs-serv15731 Modified Files: remove-obsolete-files Log Message: Synced to 2.5.5 Index: remove-obsolete-files =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/remove-obsolete-files,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- remove-obsolete-files 27 Jan 2002 22:22:56 -0000 1.28 +++ remove-obsolete-files 14 Mar 2002 22:35:55 -0000 1.29 @@ -25,35 +25,6 @@ rm -fv drivers/char/busmouse.c rm -fv drivers/char/busmouse.h rm -fv drivers/char/dn_keyb.c -rm -fv drivers/char/joystick/Config.in -rm -fv drivers/char/joystick/Makefile -rm -fv drivers/char/joystick/a3d.c -rm -fv drivers/char/joystick/adi.c -rm -fv drivers/char/joystick/amijoy.c -rm -fv drivers/char/joystick/analog.c -rm -fv drivers/char/joystick/cobra.c -rm -fv drivers/char/joystick/db9.c -rm -fv drivers/char/joystick/gamecon.c -rm -fv drivers/char/joystick/gameport.c -rm -fv drivers/char/joystick/gf2k.c -rm -fv drivers/char/joystick/grip.c -rm -fv drivers/char/joystick/interact.c -rm -fv drivers/char/joystick/lightning.c -rm -fv drivers/char/joystick/magellan.c -rm -fv drivers/char/joystick/ns558.c -rm -fv drivers/char/joystick/emu10k1-gp.c -rm -fv drivers/char/joystick/pcigame.c -rm -fv drivers/char/joystick/serio.c -rm -fv drivers/char/joystick/serport.c -rm -fv drivers/char/joystick/sidewinder.c -rm -fv drivers/char/joystick/spaceball.c -rm -fv drivers/char/joystick/spaceorb.c -rm -fv drivers/char/joystick/tmdc.c -rm -fv drivers/char/joystick/turbografx.c -rm -fv drivers/char/joystick/warrior.c -rm -fv drivers/char/joystick/iforce.c -rm -fv drivers/char/joystick/stinger.c -rm -fv drivers/char/joystick/cs461x.c rm -fv drivers/char/logibusmouse.c rm -fv drivers/char/msbusmouse.c rm -fv drivers/char/pc110pad.c @@ -71,18 +42,6 @@ rm -fv drivers/sbus/char/sunkeymap.map rm -fv drivers/sbus/char/sunmouse.c rm -fv drivers/sbus/char/sunmouse.h -rm -fv drivers/usb/evdev.c -rm -fv drivers/usb/hid-debug.h -rm -fv drivers/usb/hid.c -rm -fv drivers/usb/hid.h -rm -fv drivers/usb/input.c -rm -fv drivers/usb/joydev.c -rm -fv drivers/usb/keybdev.c -rm -fv drivers/usb/mousedev.c -rm -fv drivers/usb/usbkbd.c -rm -fv drivers/usb/usbmouse.c -rm -fv drivers/usb/wacom.c -rm -fv drivers/usb/wmforce.c rm -fv drivers/video/fbcon-afb.c rm -fv drivers/video/fbcon-cfb16.c rm -fv drivers/video/fbcon-cfb2.c @@ -138,4 +97,3 @@ rm -fv include/video/fbcon.h rm -fv include/video/font.h rm -fv include/video/sbusfb.h -rmdir drivers/char/joystick |
From: James S. <jsi...@us...> - 2002-03-14 22:32:53
|
Update of /cvsroot/linuxconsole/ruby/linux/Documentation/serial In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/Documentation/serial Modified Files: driver Log Message: synced to 2.5.5 Index: driver =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Documentation/serial/driver,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- driver 13 Nov 2001 20:17:41 -0000 1.1 +++ driver 14 Mar 2002 22:32:20 -0000 1.2 @@ -37,7 +37,7 @@ Generally, all locking is done by the core driver, except for the interrupt functions. It is the responsibility of the low level hardware driver to -perform the necessary locking there using info->lock. (since it is running +perform the necessary locking there using port->lock. (since it is running in an interrupt, you only need to use spin_lock() and spin_unlock() from the interrupt handler). @@ -56,6 +56,10 @@ If the port does not support this operation, then it should return TIOCSER_TEMT. + Locking: none. + Interrupts: caller dependent. + This call must not sleep + set_mctrl(port, mctrl) This function sets the modem control lines for port described by 'port' to the state described by mctrl. The relevant bits @@ -68,6 +72,10 @@ active. If the bit is clear, the signal should be driven inactive. + Locking: port->lock taken. + Interrupts: locally disabled. + This call must not sleep + get_mctrl(port) Returns the current state of modem control inputs. The state of the outputs should not be returned, since the core keeps @@ -81,39 +89,74 @@ indicate that the signal is permanently active. If RI is not available, the signal should not be indicated as active. - stop_tx(port,from_tty) + Locking: none. + Interrupts: caller dependent. + This call must not sleep + + stop_tx(port,tty_stop) Stop transmitting characters. This might be due to the CTS line becoming inactive or the tty layer indicating we want to stop transmission. - start_tx(port,nonempty,from_tty) + tty_stop: 1 if this call is due to the TTY layer issuing a + TTY stop to the driver (equiv to rs_stop). + + Locking: none. + Interrupts: caller dependent. + This call must not sleep + + start_tx(port,tty_start) start transmitting characters. (incidentally, nonempty will always be nonzero, and shouldn't be used - it will be dropped). + tty_start: 1 if this call was due to the TTY layer issuing + a TTY start to the driver (equiv to rs_start) + + Locking: port->lock taken. + Interrupts: locally disabled. + This call must not sleep + stop_rx(port) Stop receiving characters; the port is in the process of being closed. + Locking: none. + Interrupts: caller dependent. + This call must not sleep + enable_ms(port) Enable the modem status interrupts. + Locking: none. + Interrupts: caller dependent. + break_ctl(port,ctl) Control the transmission of a break signal. If ctl is nonzero, the break signal should be transmitted. The signal should be terminated when another call is made with a zero ctl. - startup(port,info) + Locking: none. + Interrupts: caller dependent. + This call must not sleep + + startup(port) Grab any interrupt resources and initialise any low level driver state. Enable the port for reception. It should not activate RTS nor DTR; this will be done via a separate call to set_mctrl. - shutdown(port,info) + Locking: port_sem taken. + Interrupts: globally disabled. + + shutdown(port) Disable the port, disable any break condition that may be in effect, and free any interrupt resources. It should not disable RTS nor DTR; this will have already been done via a separate call to set_mctrl. + Locking: port_sem taken. + Interrupts: caller dependent. + change_speed(port,cflag,iflag,quot) Change the port parameters, including word length, parity, stop bits. Update read_status_mask and ignore_status_mask to indicate @@ -149,6 +192,10 @@ Yes 1 1 character received, marked as TTY_PARITY + Locking: none. + Interrupts: caller dependent. + This call must not sleep + pm(port,state,oldstate) perform any power management related activities on the specified port. state indicates the new state (defined by ACPI D0-D3), @@ -157,15 +204,32 @@ This function should not be used to grab any resources. + Locking: none. + Interrupts: caller dependent. + + type(port) + Return a pointer to a string constant describing the specified + port, or return NULL, in which case the string 'unknown' is + substituted. + + Locking: none. + Interrupts: caller dependent. + release_port(port) Release any memory and IO region resources currently in use by the port. + Locking: none. + Interrupts: caller dependent. + request_port(port) Request any memory and IO region resources required by the port. If any fail, no resources should be registered when this function returns, and it should return -EBUSY on failure. + Locking: none. + Interrupts: caller dependent. + config_port(port,type) Perform any autoconfiguration steps required for the port. `type` contains a bit mask of the required configuration. UART_CONFIG_TYPE @@ -178,13 +242,22 @@ This is not necessary on platforms where ports have interrupts internally hard wired (eg, system on a chip implementations). + Locking: none. + Interrupts: caller dependent. + verify_port(port,serinfo) Verify the new serial port information contained within serinfo is suitable for this port type. + Locking: none. + Interrupts: caller dependent. + ioctl(port,cmd,arg) Perform any port specific IOCTLs. IOCTL commands must be defined using the standard numbering system found in <asm/ioctl.h> + + Locking: none. + Interrupts: caller dependent. Other notes |
From: James S. <jsi...@us...> - 2002-03-14 22:32:52
|
Update of /cvsroot/linuxconsole/ruby/linux In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux Modified Files: Makefile Log Message: synced to 2.5.5 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- Makefile 14 Mar 2002 20:02:06 -0000 1.46 +++ Makefile 14 Mar 2002 22:32:19 -0000 1.47 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = -ruby KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -122,7 +122,7 @@ NETWORKS =net/network.o LIBS =$(TOPDIR)/lib/lib.a -SUBDIRS =kernel lib drivers mm fs net ipc +SUBDIRS =kernel lib drivers mm fs net ipc sound DRIVERS-n := DRIVERS-y := @@ -158,7 +158,7 @@ endif DRIVERS-$(CONFIG_UART) += drivers/serial/uart.o -DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o +DRIVERS-$(CONFIG_SOUND) += sound/sound.o DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o @@ -202,7 +202,7 @@ drivers/char/drm/*-mod.c \ drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \ drivers/zorro/devlist.h drivers/zorro/gen-devlist \ - drivers/sound/bin2hex drivers/sound/hex2hex \ + sound/oss/bin2hex sound/oss/hex2hex \ drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \ drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \ drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \ @@ -223,11 +223,11 @@ drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \ drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \ drivers/net/hamradio/soundmodem/gentbl \ - drivers/sound/*_boot.h drivers/sound/.*.boot \ - drivers/sound/msndinit.c \ - drivers/sound/msndperm.c \ - drivers/sound/pndsperm.c \ - drivers/sound/pndspini.c \ + sound/oss/*_boot.h sound/oss/.*.boot \ + sound/oss/msndinit.c \ + sound/oss/msndperm.c \ + sound/oss/pndsperm.c \ + sound/oss/pndspini.c \ drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \ .version .config* config.in config.old \ scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \ @@ -344,7 +344,7 @@ init/do_mounts.o: init/do_mounts.c include/config/MARKER $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< -fs lib mm ipc kernel drivers net: dummy +fs lib mm ipc kernel drivers net sound: dummy $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@) TAGS: dummy |
From: James S. <jsi...@us...> - 2002-03-14 22:32:29
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/platforms In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/ppc/platforms Added Files: apus_setup.c chrp_setup.c gemini_setup.c iSeries_setup.c oak_setup.c pmac_setup.c pplus_setup.c prep_setup.c sandpoint_setup.c spruce_setup.c Log Message: synced to 2.5.5 --- NEW FILE: apus_setup.c --- /* * BK Id: %F% %I% %G% %U% %#% */ /* * arch/ppc/platforms/apus_setup.c * * Copyright (C) 1998, 1999 Jesper Skov * * Basically what is needed to replace functionality found in * arch/m68k allowing Amiga drivers to work under APUS. * Bits of code and/or ideas from arch/m68k and arch/ppc files. * * TODO: * This file needs a *really* good cleanup. Restructure and optimize. * Make sure it can be compiled for non-APUS configs. Begin to move * Amiga specific stuff into mach/amiga. */ #include <linux/config.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/init.h> #include <linux/blk.h> #include <linux/seq_file.h> /* Needs INITSERIAL call in head.S! */ #undef APUS_DEBUG #include <asm/bootinfo.h> #include <asm/setup.h> #include <asm/amigahw.h> #include <asm/amigaints.h> #include <asm/amigappc.h> #include <asm/pgtable.h> #include <asm/dma.h> #include <asm/machdep.h> #include <asm/time.h> unsigned long m68k_machtype; char debug_device[6] = ""; extern void amiga_init_IRQ(void); extern void apus_setup_pci_ptrs(void); void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL; /* machine dependent irq functions */ void (*mach_init_IRQ) (void) __initdata = NULL; void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL; void (*mach_get_model) (char *model) = NULL; int (*mach_get_hardware_list) (char *buffer) = NULL; int (*mach_get_irq_list) (struct seq_file *, void *) = NULL; void (*mach_process_int) (int, struct pt_regs *) = NULL; /* machine dependent timer functions */ unsigned long (*mach_gettimeoffset) (void); void (*mach_gettod) (int*, int*, int*, int*, int*, int*); int (*mach_hwclk) (int, struct hwclk_time*) = NULL; int (*mach_set_clock_mmss) (unsigned long) = NULL; void (*mach_reset)( void ); long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ #if defined(CONFIG_AMIGA_FLOPPY) void (*mach_floppy_setup) (char *, int *) __initdata = NULL; #endif #ifdef CONFIG_HEARTBEAT void (*mach_heartbeat) (int) = NULL; extern void apus_heartbeat (void); #endif extern unsigned long amiga_model; extern unsigned decrementer_count;/* count value for 1e6/HZ microseconds */ extern unsigned count_period_num; /* 1 decrementer count equals */ extern unsigned count_period_den; /* count_period_num / count_period_den us */ int num_memory = 0; struct mem_info memory[NUM_MEMINFO];/* memory description */ /* FIXME: Duplicate memory data to avoid conflicts with m68k shared code. */ int m68k_realnum_memory = 0; struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ struct mem_info ramdisk; extern void amiga_floppy_setup(char *, int *); extern void config_amiga(void); static int __60nsram = 0; /* for cpuinfo */ static int __bus_speed = 0; static int __speed_test_failed = 0; /********************************************** COMPILE PROTECTION */ /* Provide some stubs that links to Amiga specific functions. * This allows CONFIG_APUS to be removed from generic PPC files while * preventing link errors for other PPC targets. */ unsigned long apus_get_rtc_time(void) { #ifdef CONFIG_APUS extern unsigned long m68k_get_rtc_time(void); return m68k_get_rtc_time (); #else return 0; #endif } int apus_set_rtc_time(unsigned long nowtime) { #ifdef CONFIG_APUS extern int m68k_set_rtc_time(unsigned long nowtime); return m68k_set_rtc_time (nowtime); #else return 0; #endif } /*********************************************************** SETUP */ /* From arch/m68k/kernel/setup.c. */ void __init apus_setup_arch(void) { #ifdef CONFIG_APUS extern char cmd_line[]; int i; char *p, *q; /* Let m68k-shared code know it should do the Amiga thing. */ m68k_machtype = MACH_AMIGA; /* Parse the command line for arch-specific options. * For the m68k, this is currently only "debug=xxx" to enable printing * certain kernel messages to some machine-specific device. */ for( p = cmd_line; p && *p; ) { i = 0; if (!strncmp( p, "debug=", 6 )) { strncpy( debug_device, p+6, sizeof(debug_device)-1 ); debug_device[sizeof(debug_device)-1] = 0; if ((q = strchr( debug_device, ' ' ))) *q = 0; i = 1; } else if (!strncmp( p, "60nsram", 7 )) { APUS_WRITE (APUS_REG_WAITSTATE, REGWAITSTATE_SETRESET |REGWAITSTATE_PPCR |REGWAITSTATE_PPCW); __60nsram = 1; i = 1; } if (i) { /* option processed, delete it */ if ((q = strchr( p, ' ' ))) strcpy( p, q+1 ); else *p = 0; } else { if ((p = strchr( p, ' ' ))) ++p; } } config_amiga(); #if 0 /* Enable for logging - also include logging.o in Makefile rule */ { #define LOG_SIZE 4096 void* base; /* Throw away some memory - the P5 firmare stomps on top * of CHIP memory during bootup. */ amiga_chip_alloc(0x1000); base = amiga_chip_alloc(LOG_SIZE+sizeof(klog_data_t)); LOG_INIT(base, base+sizeof(klog_data_t), LOG_SIZE); } #endif #endif } int apus_show_cpuinfo(struct seq_file *m) { extern int __map_without_bats; extern unsigned long powerup_PCI_present; seq_printf(m, "machine\t\t: Amiga\n"); seq_printf(m, "bus speed\t: %d%s", __bus_speed, (__speed_test_failed) ? " [failed]\n" : "\n"); seq_printf(m, "using BATs\t: %s\n", (__map_without_bats) ? "No" : "Yes"); seq_printf(m, "ram speed\t: %dns\n", (__60nsram) ? 60 : 70); seq_printf(m, "PCI bridge\t: %s\n", (powerup_PCI_present) ? "Yes" : "No"); return 0; } static void get_current_tb(unsigned long long *time) { __asm __volatile ("1:mftbu 4 \n\t" " mftb 5 \n\t" " mftbu 6 \n\t" " cmpw 4,6 \n\t" " bne 1b \n\t" " stw 4,0(%0)\n\t" " stw 5,4(%0)\n\t" : : "r" (time) : "r4", "r5", "r6"); } void apus_calibrate_decr(void) { #ifdef CONFIG_APUS unsigned long freq; /* This algorithm for determining the bus speed was contributed by Ralph Schmidt. */ unsigned long long start, stop; int bus_speed; int speed_test_failed = 0; { unsigned long loop = amiga_eclock / 10; get_current_tb (&start); while (loop--) { unsigned char tmp; tmp = ciaa.pra; } get_current_tb (&stop); } bus_speed = (((unsigned long)(stop-start))*10*4) / 1000000; if (AMI_1200 == amiga_model) bus_speed /= 2; if ((bus_speed >= 47) && (bus_speed < 53)) { bus_speed = 50; freq = 12500000; } else if ((bus_speed >= 57) && (bus_speed < 63)) { bus_speed = 60; freq = 15000000; } else if ((bus_speed >= 63) && (bus_speed < 69)) { bus_speed = 67; freq = 16666667; } else { printk ("APUS: Unable to determine bus speed (%d). " "Defaulting to 50MHz", bus_speed); bus_speed = 50; freq = 12500000; speed_test_failed = 1; } /* Ease diagnostics... */ { extern int __map_without_bats; extern unsigned long powerup_PCI_present; printk ("APUS: BATs=%d, BUS=%dMHz", (__map_without_bats) ? 0 : 1, bus_speed); if (speed_test_failed) printk ("[FAILED - please report]"); printk (", RAM=%dns, PCI bridge=%d\n", (__60nsram) ? 60 : 70, (powerup_PCI_present) ? 1 : 0); /* print a bit more if asked politely... */ if (!(ciaa.pra & 0x40)){ extern unsigned int bat_addrs[4][3]; int b; for (b = 0; b < 4; ++b) { printk ("APUS: BAT%d ", b); printk ("%08x-%08x -> %08x\n", bat_addrs[b][0], bat_addrs[b][1], bat_addrs[b][2]); } } } printk("time_init: decrementer frequency = %lu.%.6lu MHz\n", freq/1000000, freq%1000000); tb_ticks_per_jiffy = freq / HZ; tb_to_us = mulhwu_scale_factor(freq, 1000000); __bus_speed = bus_speed; __speed_test_failed = speed_test_failed; #endif } void arch_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec) { #ifdef CONFIG_APUS if (mach_gettod) mach_gettod(year, mon, day, hour, min, sec); else *year = *mon = *day = *hour = *min = *sec = 0; #endif } /*********************************************************** FLOPPY */ #if defined(CONFIG_AMIGA_FLOPPY) __init void floppy_setup(char *str, int *ints) { if (mach_floppy_setup) mach_floppy_setup (str, ints); } #endif /*********************************************************** MEMORY */ #define KMAP_MAX 32 unsigned long kmap_chunks[KMAP_MAX*3]; int kmap_chunk_count = 0; /* From pgtable.h */ static __inline__ pte_t *my_find_pte(struct mm_struct *mm,unsigned long va) { pgd_t *dir = 0; pmd_t *pmd = 0; pte_t *pte = 0; va &= PAGE_MASK; dir = pgd_offset( mm, va ); if (dir) { pmd = pmd_offset(dir, va & PAGE_MASK); if (pmd && pmd_present(*pmd)) { pte = pte_offset(pmd, va); } } return pte; } /* Again simulating an m68k/mm/kmap.c function. */ void kernel_set_cachemode( unsigned long address, unsigned long size, unsigned int cmode ) { unsigned long mask, flags; switch (cmode) { case IOMAP_FULL_CACHING: mask = ~(_PAGE_NO_CACHE | _PAGE_GUARDED); flags = 0; break; case IOMAP_NOCACHE_SER: mask = ~0; flags = (_PAGE_NO_CACHE | _PAGE_GUARDED); break; default: panic ("kernel_set_cachemode() doesn't support mode %d\n", cmode); break; } size /= PAGE_SIZE; address &= PAGE_MASK; while (size--) { pte_t *pte; pte = my_find_pte(&init_mm, address); if ( !pte ) { printk("pte NULL in kernel_set_cachemode()\n"); return; } pte_val (*pte) &= mask; pte_val (*pte) |= flags; flush_tlb_page(find_vma(&init_mm,address),address); address += PAGE_SIZE; } } unsigned long mm_ptov (unsigned long paddr) { unsigned long ret; if (paddr < 16*1024*1024) ret = ZTWO_VADDR(paddr); else { int i; for (i = 0; i < kmap_chunk_count;){ unsigned long phys = kmap_chunks[i++]; unsigned long size = kmap_chunks[i++]; unsigned long virt = kmap_chunks[i++]; if (paddr >= phys && paddr < (phys + size)){ ret = virt + paddr - phys; goto exit; } } ret = (unsigned long) __va(paddr); } exit: #ifdef DEBUGPV printk ("PTOV(%lx)=%lx\n", paddr, ret); #endif return ret; } int mm_end_of_chunk (unsigned long addr, int len) { if (memory[0].addr + memory[0].size == addr + len) return 1; return 0; } /*********************************************************** CACHE */ #define L1_CACHE_BYTES 32 #define MAX_CACHE_SIZE 8192 void cache_push(__u32 addr, int length) { addr = mm_ptov(addr); if (MAX_CACHE_SIZE < length) length = MAX_CACHE_SIZE; while(length > 0){ __asm ("dcbf 0,%0\n\t" : : "r" (addr)); addr += L1_CACHE_BYTES; length -= L1_CACHE_BYTES; } /* Also flush trailing block */ __asm ("dcbf 0,%0\n\t" "sync \n\t" : : "r" (addr)); } void cache_clear(__u32 addr, int length) { if (MAX_CACHE_SIZE < length) length = MAX_CACHE_SIZE; addr = mm_ptov(addr); __asm ("dcbf 0,%0\n\t" "sync \n\t" "icbi 0,%0 \n\t" "isync \n\t" : : "r" (addr)); addr += L1_CACHE_BYTES; length -= L1_CACHE_BYTES; while(length > 0){ __asm ("dcbf 0,%0\n\t" "sync \n\t" "icbi 0,%0 \n\t" "isync \n\t" : : "r" (addr)); addr += L1_CACHE_BYTES; length -= L1_CACHE_BYTES; } __asm ("dcbf 0,%0\n\t" "sync \n\t" "icbi 0,%0 \n\t" "isync \n\t" : : "r" (addr)); } /****************************************************** from setup.c */ void apus_restart(char *cmd) { cli(); APUS_WRITE(APUS_REG_LOCK, REGLOCK_BLACKMAGICK1|REGLOCK_BLACKMAGICK2); APUS_WRITE(APUS_REG_LOCK, REGLOCK_BLACKMAGICK1|REGLOCK_BLACKMAGICK3); APUS_WRITE(APUS_REG_LOCK, REGLOCK_BLACKMAGICK2|REGLOCK_BLACKMAGICK3); APUS_WRITE(APUS_REG_SHADOW, REGSHADOW_SELFRESET); APUS_WRITE(APUS_REG_RESET, REGRESET_AMIGARESET); for(;;); } void apus_power_off(void) { for (;;); } void apus_halt(void) { apus_restart(NULL); } /****************************************************** IRQ stuff */ static unsigned char last_ipl[8]; int apus_get_irq(struct pt_regs* regs) { unsigned char ipl_emu, mask; unsigned int level; APUS_READ(APUS_IPL_EMU, ipl_emu); level = (ipl_emu >> 3) & IPLEMU_IPLMASK; mask = IPLEMU_SETRESET|IPLEMU_DISABLEINT|level; level ^= 7; /* Save previous IPL value */ if (last_ipl[level]) return -2; last_ipl[level] = ipl_emu; /* Set to current IPL value */ APUS_WRITE(APUS_IPL_EMU, mask); APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT|level); #ifdef __INTERRUPT_DEBUG printk("<%d:%d>", level, ~ipl_emu & IPLEMU_IPLMASK); #endif return level + IRQ_AMIGA_AUTO; } void apus_end_irq(unsigned int irq) { unsigned char ipl_emu; unsigned int level = irq - IRQ_AMIGA_AUTO; #ifdef __INTERRUPT_DEBUG printk("{%d}", ~last_ipl[level] & IPLEMU_IPLMASK); #endif /* Restore IPL to the previous value */ ipl_emu = last_ipl[level] & IPLEMU_IPLMASK; APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET|IPLEMU_DISABLEINT|ipl_emu); last_ipl[level] = 0; ipl_emu ^= 7; APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT|ipl_emu); } /****************************************************** debugging */ /* some serial hardware definitions */ #define SDR_OVRUN (1<<15) #define SDR_RBF (1<<14) #define SDR_TBE (1<<13) #define SDR_TSRE (1<<12) #define AC_SETCLR (1<<15) #define AC_UARTBRK (1<<11) #define SER_DTR (1<<7) #define SER_RTS (1<<6) #define SER_DCD (1<<5) #define SER_CTS (1<<4) #define SER_DSR (1<<3) static __inline__ void ser_RTSon(void) { ciab.pra &= ~SER_RTS; /* active low */ } int __debug_ser_out( unsigned char c ) { custom.serdat = c | 0x100; mb(); while (!(custom.serdatr & 0x2000)) barrier(); return 1; } unsigned char __debug_ser_in( void ) { unsigned char c; /* XXX: is that ok?? derived from amiga_ser.c... */ while( !(custom.intreqr & IF_RBF) ) barrier(); c = custom.serdatr; /* clear the interrupt, so that another character can be read */ custom.intreq = IF_RBF; return c; } int __debug_serinit( void ) { unsigned long flags; save_flags (flags); cli(); /* turn off Rx and Tx interrupts */ custom.intena = IF_RBF | IF_TBE; /* clear any pending interrupt */ custom.intreq = IF_RBF | IF_TBE; restore_flags (flags); /* * set the appropriate directions for the modem control flags, * and clear RTS and DTR */ ciab.ddra |= (SER_DTR | SER_RTS); /* outputs */ ciab.ddra &= ~(SER_DCD | SER_CTS | SER_DSR); /* inputs */ #ifdef CONFIG_KGDB /* turn Rx interrupts on for GDB */ custom.intena = IF_SETCLR | IF_RBF; ser_RTSon(); #endif return 0; } void __debug_print_hex(unsigned long x) { int i; char hexchars[] = "0123456789ABCDEF"; for (i = 0; i < 8; i++) { __debug_ser_out(hexchars[(x >> 28) & 15]); x <<= 4; } __debug_ser_out('\n'); __debug_ser_out('\r'); } void __debug_print_string(char* s) { unsigned char c; while((c = *s++)) __debug_ser_out(c); __debug_ser_out('\n'); __debug_ser_out('\r'); } static void apus_progress(char *s, unsigned short value) { __debug_print_string(s); } /****************************************************** init */ /* The number of spurious interrupts */ volatile unsigned int num_spurious; extern struct irqaction amiga_sys_irqaction[AUTO_IRQS]; extern void amiga_enable_irq(unsigned int irq); extern void amiga_disable_irq(unsigned int irq); struct hw_interrupt_type amiga_sys_irqctrl = { typename: "Amiga IPL", end: apus_end_irq, }; struct hw_interrupt_type amiga_irqctrl = { typename: "Amiga ", enable: amiga_enable_irq, disable: amiga_disable_irq, }; #define HARDWARE_MAPPED_SIZE (512*1024) unsigned long __init apus_find_end_of_memory(void) { int shadow = 0; unsigned long total; /* The memory size reported by ADOS excludes the 512KB reserved for PPC exception registers and possibly 512KB containing a shadow of the ADOS ROM. */ { unsigned long size = memory[0].size; /* If 2MB aligned, size was probably user specified. We can't tell anything about shadowing in this case so skip shadow assignment. */ if (0 != (size & 0x1fffff)){ /* Align to 512KB to ensure correct handling of both memfile and system specified sizes. */ size = ((size+0x0007ffff) & 0xfff80000); /* If memory is 1MB aligned, assume shadowing. */ shadow = !(size & 0x80000); } /* Add the chunk that ADOS does not see. by aligning the size to the nearest 2MB limit upwards. */ memory[0].size = ((size+0x001fffff) & 0xffe00000); } ppc_memstart = memory[0].addr; ppc_memoffset = PAGE_OFFSET - PPC_MEMSTART; total = memory[0].size; /* Remove the memory chunks that are controlled by special Phase5 hardware. */ /* Remove the upper 512KB if it contains a shadow of the ADOS ROM. FIXME: It might be possible to disable this shadow HW. Check the booter (ppc_boot.c) */ if (shadow) total -= HARDWARE_MAPPED_SIZE; /* Remove the upper 512KB where the PPC exception vectors are mapped. */ total -= HARDWARE_MAPPED_SIZE; /* Linux/APUS only handles one block of memory -- the one on the PowerUP board. Other system memory is horrible slow in comparison. The user can use other memory for swapping using the z2ram device. */ return total; } static void __init apus_map_io(void) { /* Map PPC exception vectors. */ io_block_mapping(0xfff00000, 0xfff00000, 0x00020000, _PAGE_KERNEL); /* Map chip and ZorroII memory */ io_block_mapping(zTwoBase, 0x00000000, 0x01000000, _PAGE_IO); } __init void apus_init_IRQ(void) { struct irqaction *action; int i; #ifdef CONFIG_PCI apus_setup_pci_ptrs(); #endif for ( i = 0 ; i < AMI_IRQS; i++ ) { irq_desc[i].status = IRQ_LEVEL; if (i < IRQ_AMIGA_AUTO) { irq_desc[i].handler = &amiga_irqctrl; } else { irq_desc[i].handler = &amiga_sys_irqctrl; action = &amiga_sys_irqaction[i-IRQ_AMIGA_AUTO]; if (action->name) setup_irq(i, action); } } amiga_init_IRQ(); } __init void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { extern int parse_bootinfo(const struct bi_record *); extern char _end[]; /* Parse bootinfo. The bootinfo is located right after the kernel bss */ parse_bootinfo((const struct bi_record *)&_end); #ifdef CONFIG_BLK_DEV_INITRD /* Take care of initrd if we have one. Use data from bootinfo to avoid the need to initialize PPC registers when kernel is booted via a PPC reset. */ if ( ramdisk.addr ) { initrd_start = (unsigned long) __va(ramdisk.addr); initrd_end = (unsigned long) __va(ramdisk.size + ramdisk.addr); } #endif /* CONFIG_BLK_DEV_INITRD */ ISA_DMA_THRESHOLD = 0x00ffffff; ppc_md.setup_arch = apus_setup_arch; ppc_md.show_cpuinfo = apus_show_cpuinfo; ppc_md.init_IRQ = apus_init_IRQ; ppc_md.get_irq = apus_get_irq; #ifdef CONFIG_HEARTBEAT ppc_md.heartbeat = apus_heartbeat; ppc_md.heartbeat_count = 1; #endif #ifdef APUS_DEBUG __debug_serinit(); ppc_md.progress = apus_progress; #endif ppc_md.init = NULL; ppc_md.restart = apus_restart; ppc_md.power_off = apus_power_off; ppc_md.halt = apus_halt; ppc_md.time_init = NULL; ppc_md.set_rtc_time = apus_set_rtc_time; ppc_md.get_rtc_time = apus_get_rtc_time; ppc_md.calibrate_decr = apus_calibrate_decr; ppc_md.find_end_of_memory = apus_find_end_of_memory; ppc_md.setup_io_mappings = apus_map_io; } --- NEW FILE: chrp_setup.c --- /* * BK Id: %F% %I% %G% %U% %#% */ /* * arch/ppc/platforms/setup.c * * Copyright (C) 1995 Linus Torvalds * Adapted from 'alpha' version by Gary Thomas * Modified by Cort Dougan (co...@cs...) */ /* * bootup setup stuff.. */ #include <linux/config.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/slab.h> #include <linux/user.h> #include <linux/a.out.h> #include <linux/tty.h> #include <linux/major.h> #include <linux/interrupt.h> #include <linux/reboot.h> #include <linux/init.h> #include <linux/pci.h> #include <linux/version.h> #include <linux/adb.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/ide.h> #include <linux/irq.h> #include <linux/seq_file.h> #include <asm/processor.h> #include <asm/io.h> #include <asm/pgtable.h> #include <asm/prom.h> #include <asm/gg2.h> #include <asm/pci-bridge.h> #include <asm/dma.h> #include <asm/machdep.h> #include <asm/irq.h> #include <asm/hydra.h> #include <asm/sections.h> #include <asm/time.h> #include <asm/btext.h> #include <asm/i8259.h> #include <asm/open_pic.h> unsigned long chrp_get_rtc_time(void); int chrp_set_rtc_time(unsigned long nowtime); void chrp_calibrate_decr(void); long chrp_time_init(void); void chrp_find_bridges(void); void chrp_event_scan(void); void rtas_display_progress(char *, unsigned short); void rtas_indicator_progress(char *, unsigned short); void btext_progress(char *, unsigned short); extern unsigned long pmac_find_end_of_memory(void); extern int of_show_percpuinfo(struct seq_file *, int); extern kdev_t boot_dev; extern PTE *Hash, *Hash_end; extern unsigned long Hash_size, Hash_mask; extern int probingmem; extern unsigned long loops_per_jiffy; static int max_width; #ifdef CONFIG_SMP extern struct smp_ops_t chrp_smp_ops; #endif static const char *gg2_memtypes[4] = { "FPM", "SDRAM", "EDO", "BEDO" }; static const char *gg2_cachesizes[4] = { "256 KB", "512 KB", "1 MB", "Reserved" }; static const char *gg2_cachetypes[4] = { "Asynchronous", "Reserved", "Flow-Through Synchronous", "Pipelined Synchronous" }; static const char *gg2_cachemodes[4] = { "Disabled", "Write-Through", "Copy-Back", "Transparent Mode" }; int __chrp chrp_show_cpuinfo(struct seq_file *m) { int i, sdramen; unsigned int t; struct device_node *root; const char *model = ""; root = find_path_device("/"); if (root) model = get_property(root, "model", NULL); seq_printf(m, "machine\t\t: CHRP %s\n", model); /* longtrail (goldengate) stuff */ if (!strncmp(model, "IBM,LongTrail", 13)) { /* VLSI VAS96011/12 `Golden Gate 2' */ /* Memory banks */ sdramen = (in_le32((unsigned *)(gg2_pci_config_base+ GG2_PCI_DRAM_CTRL)) >>31) & 1; for (i = 0; i < (sdramen ? 4 : 6); i++) { t = in_le32((unsigned *)(gg2_pci_config_base+ GG2_PCI_DRAM_BANK0+ i*4)); if (!(t & 1)) continue; switch ((t>>8) & 0x1f) { case 0x1f: model = "4 MB"; break; case 0x1e: model = "8 MB"; break; case 0x1c: model = "16 MB"; break; case 0x18: model = "32 MB"; break; case 0x10: model = "64 MB"; break; case 0x00: model = "128 MB"; break; default: model = "Reserved"; break; } seq_printf(m, "memory bank %d\t: %s %s\n", i, model, gg2_memtypes[sdramen ? 1 : ((t>>1) & 3)]); } /* L2 cache */ t = in_le32((unsigned *)(gg2_pci_config_base+GG2_PCI_CC_CTRL)); seq_printf(m, "board l2\t: %s %s (%s)\n", gg2_cachesizes[(t>>7) & 3], gg2_cachetypes[(t>>2) & 3], gg2_cachemodes[t & 3]); } return 0; } /* * Fixes for the National Semiconductor PC78308VUL SuperI/O * * Some versions of Open Firmware incorrectly initialize the IRQ settings * for keyboard and mouse */ static inline void __init sio_write(u8 val, u8 index) { outb(index, 0x15c); outb(val, 0x15d); } static inline u8 __init sio_read(u8 index) { outb(index, 0x15c); return inb(0x15d); } static void __init sio_fixup_irq(const char *name, u8 device, u8 level, u8 type) { u8 level0, type0, active; /* select logical device */ sio_write(device, 0x07); active = sio_read(0x30); level0 = sio_read(0x70); type0 = sio_read(0x71); if (level0 != level || type0 != type || !active) { printk(KERN_WARNING "sio: %s irq level %d, type %d, %sactive: " "remapping to level %d, type %d, active\n", name, level0, type0, !active ? "in" : "", level, type); sio_write(0x01, 0x30); sio_write(level, 0x70); sio_write(type, 0x71); } } static void __init sio_init(void) { struct device_node *root; if ((root = find_path_device("/")) && !strncmp(get_property(root, "model", NULL), "IBM,LongTrail", 13)) { /* logical device 0 (KBC/Keyboard) */ sio_fixup_irq("keyboard", 0, 1, 2); /* select logical device 1 (KBC/Mouse) */ sio_fixup_irq("mouse", 1, 12, 2); } } void __init chrp_setup_arch(void) { struct device_node *device; /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000/HZ; #ifdef CONFIG_BLK_DEV_INITRD /* this is fine for chrp */ initrd_below_start_ok = 1; if (initrd_start) ROOT_DEV = mk_kdev(RAMDISK_MAJOR, 0); else #endif ROOT_DEV = to_kdev_t(0x0802); /* sda2 (sda1 is for the kernel) */ /* Lookup PCI host bridges */ chrp_find_bridges(); #ifndef CONFIG_PPC64BRIDGE /* * Temporary fixes for PCI devices. * -- Geert */ hydra_init(); /* Mac I/O */ #endif /* CONFIG_PPC64BRIDGE */ /* * Fix the Super I/O configuration */ sio_init(); /* Get the event scan rate for the rtas so we know how * often it expects a heartbeat. -- Cort */ if ( rtas_data ) { struct property *p; device = find_devices("rtas"); for ( p = device->properties; p && strncmp(p->name, "rtas-event-scan-rate", 20); p = p->next ) /* nothing */ ; if ( p && *(unsigned long *)p->value ) { ppc_md.heartbeat = chrp_event_scan; ppc_md.heartbeat_reset = (HZ/(*(unsigned long *)p->value)*30)-1; ppc_md.heartbeat_count = 1; printk("RTAS Event Scan Rate: %lu (%lu jiffies)\n", *(unsigned long *)p->value, ppc_md.heartbeat_reset ); } } pci_create_OF_bus_map(); } void __chrp chrp_event_scan(void) { unsigned char log[1024]; unsigned long ret = 0; /* XXX: we should loop until the hardware says no more error logs -- Cort */ call_rtas( "event-scan", 4, 1, &ret, 0xffffffff, 0, __pa(log), 1024 ); ppc_md.heartbeat_count = ppc_md.heartbeat_reset; } void __chrp chrp_restart(char *cmd) { printk("RTAS system-reboot returned %d\n", call_rtas("system-reboot", 0, 1, NULL)); for (;;); } void __chrp chrp_power_off(void) { /* allow power on only with power button press */ printk("RTAS power-off returned %d\n", call_rtas("power-off", 2, 1, NULL,0xffffffff,0xffffffff)); for (;;); } void __chrp chrp_halt(void) { chrp_power_off(); } u_int __chrp chrp_irq_cannonicalize(u_int irq) { if (irq == 2) return 9; return irq; } /* * Finds the open-pic node and sets OpenPIC_Addr based on its reg property. * Then checks if it has an interrupt-ranges property. If it does then * we have a distributed open-pic, so call openpic_set_sources to tell * the openpic code where to find the interrupt source registers. */ static void __init chrp_find_openpic(void) { struct device_node *np; int len, i; unsigned int *iranges; void *isu; np = find_type_devices("open-pic"); if (np == NULL || np->n_addrs == 0) return; printk(KERN_INFO "OpenPIC at %x (size %x)\n", np->addrs[0].address, np->addrs[0].size); OpenPIC_Addr = ioremap(np->addrs[0].address, 0x40000); if (OpenPIC_Addr == NULL) { printk(KERN_ERR "Failed to map OpenPIC!\n"); return; } iranges = (unsigned int *) get_property(np, "interrupt-ranges", &len); if (iranges == NULL || len < 2 * sizeof(unsigned int)) return; /* not distributed */ /* * The first pair of cells in interrupt-ranges refers to the * IDU; subsequent pairs refer to the ISUs. */ len /= 2 * sizeof(unsigned int); if (np->n_addrs < len) { printk(KERN_ERR "Insufficient addresses for distributed" " OpenPIC (%d < %d)\n", np->n_addrs, len); return; } if (iranges[1] != 0) { printk(KERN_INFO "OpenPIC irqs %d..%d in IDU\n", iranges[0], iranges[0] + iranges[1] - 1); openpic_set_sources(iranges[0], iranges[1], NULL); } for (i = 1; i < len; ++i) { iranges += 2; printk(KERN_INFO "OpenPIC irqs %d..%d in ISU at %x (%x)\n", iranges[0], iranges[0] + iranges[1] - 1, np->addrs[i].address, np->addrs[i].size); isu = ioremap(np->addrs[i].address, np->addrs[i].size); if (isu != NULL) openpic_set_sources(iranges[0], iranges[1], isu); else printk(KERN_ERR "Failed to map OpenPIC ISU at %x!\n", np->addrs[i].address); } } void __init chrp_init_IRQ(void) { struct device_node *np; int i; unsigned char* chrp_int_ack_special = 0; unsigned char init_senses[NR_IRQS - NUM_8259_INTERRUPTS]; int nmi_irq = -1; for (np = find_devices("pci"); np != NULL; np = np->next) { unsigned int *addrp = (unsigned int *) get_property(np, "8259-interrupt-acknowledge", NULL); if (addrp == NULL) continue; chrp_int_ack_special = (unsigned char *) ioremap(addrp[prom_n_addr_cells(np)-1], 1); break; } if (np == NULL) printk("Cannot find pci to get ack address\n"); chrp_find_openpic(); prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS); OpenPIC_InitSenses = init_senses; OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS; openpic_init(1, NUM_8259_INTERRUPTS, chrp_int_ack_special, nmi_irq); for (i = 0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; i8259_init(0); } void __init chrp_init2(void) { #ifdef CONFIG_NVRAM pmac_nvram_init(); #endif request_region(0x20,0x20,"pic1"); request_region(0xa0,0x20,"pic2"); request_region(0x00,0x20,"dma1"); request_region(0x40,0x20,"timer"); request_region(0x80,0x10,"dma page reg"); request_region(0xc0,0x20,"dma2"); if (ppc_md.progress) ppc_md.progress(" Have fun! ", 0x7777); } #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) /* * IDE stuff. */ static int __chrp chrp_ide_check_region(ide_ioreg_t from, unsigned int extent) { return check_region(from, extent); } static void __chrp chrp_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) { request_region(from, extent, name); } static void __chrp chrp_ide_release_region(ide_ioreg_t from, unsigned int extent) { release_region(from, extent); } #endif /* * One of the main thing these mappings are needed for is so that * xmon can get to the serial port early on. We probably should * handle the machines with the mpc106 as well as the python (F50) * and the GG2 (longtrail). Actually we should look in the device * tree and do the right thing. */ static void __init chrp_map_io(void) { char *name; /* * The code below tends to get removed, please don't take it out. * The F50 needs this mapping and it you take it out I'll track you * down and slap your hands. If it causes problems please email me. * -- Cort <co...@fs...> */ name = get_property(find_path_device("/"), "name", NULL); if (name && strncmp(name, "IBM-70", 6) == 0 && strstr(name, "-F50")) { io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); io_block_mapping(0x90000000, 0x90000000, 0x10000000, _PAGE_IO); return; } else { io_block_mapping(0xf8000000, 0xf8000000, 0x04000000, _PAGE_IO); } } void __init chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { #ifdef CONFIG_BLK_DEV_INITRD /* take care of initrd if we have one */ if ( r6 ) { initrd_start = r6 + KERNELBASE; initrd_end = r6 + r7 + KERNELBASE; } #endif /* CONFIG_BLK_DEV_INITRD */ ISA_DMA_THRESHOLD = ~0L; DMA_MODE_READ = 0x44; DMA_MODE_WRITE = 0x48; isa_io_base = CHRP_ISA_IO_BASE; /* default value */ ppc_md.setup_arch = chrp_setup_arch; ppc_md.show_percpuinfo = of_show_percpuinfo; ppc_md.show_cpuinfo = chrp_show_cpuinfo; ppc_md.irq_cannonicalize = chrp_irq_cannonicalize; ppc_md.init_IRQ = chrp_init_IRQ; ppc_md.get_irq = openpic_get_irq; ppc_md.init = chrp_init2; ppc_md.restart = chrp_restart; ppc_md.power_off = chrp_power_off; ppc_md.halt = chrp_halt; ppc_md.time_init = chrp_time_init; ppc_md.set_rtc_time = chrp_set_rtc_time; ppc_md.get_rtc_time = chrp_get_rtc_time; ppc_md.calibrate_decr = chrp_calibrate_decr; ppc_md.find_end_of_memory = pmac_find_end_of_memory; ppc_md.setup_io_mappings = chrp_map_io; if (rtas_data) { struct device_node *rtas; unsigned int *p; rtas = find_devices("rtas"); if (rtas != NULL) { if (get_property(rtas, "display-character", NULL)) { ppc_md.progress = rtas_display_progress; p = (unsigned int *) get_property (rtas, "ibm,display-line-length", NULL); if (p) max_width = *p; } else if (get_property(rtas, "set-indicator", NULL)) ppc_md.progress = rtas_indicator_progress; } } #ifdef CONFIG_BOOTX_TEXT if (ppc_md.progress == NULL && boot_text_mapped) ppc_md.progress = btext_progress; #endif #ifdef CONFIG_SMP ppc_md.smp_ops = &chrp_smp_ops; #endif /* CONFIG_SMP */ #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ppc_ide_md.ide_check_region = chrp_ide_check_region; ppc_ide_md.ide_request_region = chrp_ide_request_region; ppc_ide_md.ide_release_region = chrp_ide_release_region; #endif /* * Print the banner, then scroll down so boot progress * can be printed. -- Cort */ if ( ppc_md.progress ) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0); } void __chrp rtas_display_progress(char *s, unsigned short hex) { int width; char *os = s; if ( call_rtas( "display-character", 1, 1, NULL, '\r' ) ) return; width = max_width; while ( *os ) { if ( (*os == '\n') || (*os == '\r') ) width = max_width; else width--; call_rtas( "display-character", 1, 1, NULL, *os++ ); /* if we overwrite the screen length */ if ( width == 0 ) while ( (*os != 0) && (*os != '\n') && (*os != '\r') ) os++; } /*while ( width-- > 0 )*/ call_rtas( "display-character", 1, 1, NULL, ' ' ); } void __chrp rtas_indicator_progress(char *s, unsigned short hex) { call_rtas("set-indicator", 3, 1, NULL, 6, 0, hex); } #ifdef CONFIG_BOOTX_TEXT void btext_progress(char *s, unsigned short hex) { prom_print(s); prom_print("\n"); } #endif /* CONFIG_BOOTX_TEXT */ --- NEW FILE: gemini_setup.c --- /* * BK Id: %F% %I% %G% %U% %#% */ /* * arch/ppc/platforms/setup.c * * Copyright (C) 1995 Linus Torvalds * Adapted from 'alpha' version by Gary Thomas * Modified by Cort Dougan (co...@cs...) * Synergy Microsystems board support by Dan Cox (da...@sy...) * */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/time.h> #include <linux/kdev_t.h> #include <linux/types.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/console.h> #include <linux/irq.h> #include <linux/seq_file.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/m48t35.h> #include <platforms/gemini.h> #include <asm/time.h> #include <asm/open_pic.h> #include <asm/bootinfo.h> void gemini_find_bridges(void); static int gemini_get_clock_speed(void); extern void gemini_pcibios_fixup(void); static char *gemini_board_families[] = { "VGM", "VSS", "KGM", "VGR", "VCM", "VCS", "KCM", "VCR" }; static int gemini_board_count = sizeof(gemini_board_families) / sizeof(gemini_board_families[0]); static unsigned int cpu_7xx[16] = { 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0 }; static unsigned int cpu_6xx[16] = { 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0 }; /* * prom_init is the Gemini version of prom.c:prom_init. We only need * the BSS clearing code, so I copied that out of prom.c. This is a * lot simpler than hacking prom.c so it will build with Gemini. -VAL */ #define PTRRELOC(x) ((typeof(x))((unsigned long)(x) + offset)) unsigned long prom_init(void) { unsigned long offset = reloc_offset(); unsigned long phys; extern char __bss_start, _end; /* First zero the BSS -- use memset, some arches don't have * caches on yet */ memset_io(PTRRELOC(&__bss_start),0 , &_end - &__bss_start); /* Default */ phys = offset + KERNELBASE; gemini_prom_init(); return phys; } int gemini_show_cpuinfo(struct seq_file *m) { unsigned char reg, rev; char *family; unsigned int type; reg = readb(GEMINI_FEAT); family = gemini_board_families[((reg>>4) & 0xf)]; if (((reg>>4) & 0xf) > gemini_board_count) printk(KERN_ERR "cpuinfo(): unable to determine board family\n"); reg = readb(GEMINI_BREV); type = (reg>>4) & 0xf; rev = reg & 0xf; reg = readb(GEMINI_BECO); seq_printf(m, "machine\t\t: Gemini %s%d, rev %c, eco %d\n", family, type, (rev + 'A'), (reg & 0xf)); seq_printf(m, "board\t\t: Gemini %s", family); if (type > 9) seq_printf(m, "%c", (type - 10) + 'A'); else seq_printf(m, "%d", type); seq_printf(m, ", rev %c, eco %d\n", (rev + 'A'), (reg & 0xf)); seq_printf(m, "clock\t\t: %dMhz\n", gemini_get_clock_speed()); return 0; } static u_char gemini_openpic_initsenses[] = { 1, 1, 1, 1, 0, 0, 1, /* remainder are level-triggered */ }; #define GEMINI_MPIC_ADDR (0xfcfc0000) #define GEMINI_MPIC_PCI_CFG (0x80005800) void __init gemini_openpic_init(void) { OpenPIC_Addr = (volatile struct OpenPIC *) grackle_read(GEMINI_MPIC_PCI_CFG + 0x10); OpenPIC_InitSenses = gemini_openpic_initsenses; OpenPIC_NumInitSenses = sizeof( gemini_openpic_initsenses ); ioremap( GEMINI_MPIC_ADDR, OPENPIC_SIZE); } extern unsigned long loops_per_jiffy; extern int root_mountflags; extern char cmd_line[]; void gemini_heartbeat(void) { static unsigned long led = GEMINI_LEDBASE+(4*8); static char direction = 8; /* We only want to do this on 1 CPU */ if (smp_processor_id()) return; *(char *)led = 0; if ( (led + direction) > (GEMINI_LEDBASE+(7*8)) || (led + direction) < (GEMINI_LEDBASE+(4*8)) ) direction *= -1; led += direction; *(char *)led = 0xff; ppc_md.heartbeat_count = ppc_md.heartbeat_reset; } void __init gemini_setup_arch(void) { extern char cmd_line[]; loops_per_jiffy = 50000000/HZ; #ifdef CONFIG_BLK_DEV_INITRD /* bootable off CDROM */ if (initrd_start) ROOT_DEV = MKDEV(SCSI_CDROM_MAJOR, 0); else #endif ROOT_DEV = to_kdev_t(0x0801); /* nothing but serial consoles... */ sprintf(cmd_line, "%s console=ttyS0", cmd_line); printk("Boot arguments: %s\n", cmd_line); ppc_md.heartbeat = gemini_heartbeat; ppc_md.heartbeat_reset = HZ/8; ppc_md.heartbeat_count = 1; /* Lookup PCI hosts */ gemini_find_bridges(); /* take special pains to map the MPIC, since it isn't mapped yet */ gemini_openpic_init(); /* start the L2 */ gemini_init_l2(); } int gemini_get_clock_speed(void) { unsigned long hid1, pvr; int clock; pvr = mfspr(PVR); hid1 = (mfspr(HID1) >> 28) & 0xf; if (PVR_VER(pvr) == 8 || PVR_VER(pvr) == 12) hid1 = cpu_7xx[hid1]; else hid1 = cpu_6xx[hid1]; switch((readb(GEMINI_BSTAT) & 0xc) >> 2) { case 0: default: clock = (hid1*100)/3; break; case 1: clock = (hid1*125)/3; break; case 2: clock = (hid1*50); break; } return clock; } void __init gemini_init_l2(void) { unsigned char reg, brev, fam, creg; unsigned long cache; unsigned long pvr; reg = readb(GEMINI_L2CFG); brev = readb(GEMINI_BREV); fam = readb(GEMINI_FEAT); pvr = mfspr(PVR); switch(PVR_VER(pvr)) { case 8: if (reg & 0xc0) cache = (((reg >> 6) & 0x3) << 28); else cache = 0x3 << 28; #ifdef CONFIG_SMP /* Pre-3.0 processor revs had snooping errata. Leave their L2's disabled with SMP. -- Dan */ if (PVR_CFG(pvr) < 3) { printk("Pre-3.0 750; L2 left disabled!\n"); return; } #endif /* CONFIG_SMP */ /* Special case: VGM5-B's came before L2 ratios were set on the board. Processor speed shouldn't be too high, so set L2 ratio to 1:1.5. */ if ((brev == 0x51) && ((fam & 0xa0) >> 4) == 0) reg |= 1; /* determine best cache ratio based upon what the board tells us (which sometimes _may_ not be true) and the processor speed. */ else { if (gemini_get_clock_speed() > 250) reg = 2; } break; case 12: { static unsigned long l2_size_val = 0; if (!l2_size_val) l2_size_val = _get_L2CR(); cache = l2_size_val; break; } case 4: case 9: creg = readb(GEMINI_CPUSTAT); if (((creg & 0xc) >> 2) != 1) printk("Dual-604 boards don't support the use of L2\n"); else writeb(1, GEMINI_L2CFG); return; default: printk("Unknown processor; L2 left disabled\n"); return; } cache |= ((1<<reg) << 25); cache |= (L2CR_L2RAM_MASK|L2CR_L2CTL|L2CR_L2DO); _set_L2CR(0); _set_L2CR(cache | L2CR_L2E); } void gemini_restart(char *cmd) { __cli(); /* make a clean restart, not via the MPIC */ _gemini_reboot(); for(;;); } void gemini_power_off(void) { for(;;); } void gemini_halt(void) { gemini_restart(NULL); } void __init gemini_init_IRQ(void) { /* gemini has no 8259 */ openpic_init(1, 0, 0, -1); } #define gemini_rtc_read(x) (readb(GEMINI_RTC+(x))) #define gemini_rtc_write(val,x) (writeb((val),(GEMINI_RTC+(x)))) /* ensure that the RTC is up and running */ long __init gemini_time_init(void) { unsigned char reg; reg = gemini_rtc_read(M48T35_RTC_CONTROL); if ( reg & M48T35_RTC_STOPPED ) { printk(KERN_INFO "M48T35 real-time-clock was stopped. Now starting...\n"); gemini_rtc_write((reg & ~(M48T35_RTC_STOPPED)), M48T35_RTC_CONTROL); gemini_rtc_write((reg | M48T35_RTC_SET), M48T35_RTC_CONTROL); } return 0; } #undef DEBUG_RTC unsigned long gemini_get_rtc_time(void) { unsigned int year, mon, day, hour, min, sec; unsigned char reg; reg = gemini_rtc_read(M48T35_RTC_CONTROL); gemini_rtc_write((reg|M48T35_RTC_READ), M48T35_RTC_CONTROL); #ifdef DEBUG_RTC printk("get rtc: reg = %x\n", reg); #endif do { sec = gemini_rtc_read(M48T35_RTC_SECONDS); min = gemini_rtc_read(M48T35_RTC_MINUTES); hour = gemini_rtc_read(M48T35_RTC_HOURS); day = gemini_rtc_read(M48T35_RTC_DOM); mon = gemini_rtc_read(M48T35_RTC_MONTH); year = gemini_rtc_read(M48T35_RTC_YEAR); } while( sec != gemini_rtc_read(M48T35_RTC_SECONDS)); #ifdef DEBUG_RTC printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n", sec, min, hour, day, mon, year); #endif gemini_rtc_write(reg, M48T35_RTC_CONTROL); BCD_TO_BIN(sec); BCD_TO_BIN(min); BCD_TO_BIN(hour); BCD_TO_BIN(day); BCD_TO_BIN(mon); BCD_TO_BIN(year); if ((year += 1900) < 1970) year += 100; #ifdef DEBUG_RTC printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n", sec, min, hour, day, mon, year); #endif return mktime( year, mon, day, hour, min, sec ); } int gemini_set_rtc_time( unsigned long now ) { unsigned char reg; struct rtc_time tm; to_tm( now, &tm ); reg = gemini_rtc_read(M48T35_RTC_CONTROL); #if DEBUG_RTC printk("set rtc: reg = %x\n", reg); #endif gemini_rtc_write((reg|M48T35_RTC_SET), M48T35_RTC_CONTROL); #if DEBUG_RTC printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n", tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year); #endif tm.tm_year -= 1900; BIN_TO_BCD(tm.tm_sec); BIN_TO_BCD(tm.tm_min); BIN_TO_BCD(tm.tm_hour); BIN_TO_BCD(tm.tm_mon); BIN_TO_BCD(tm.tm_mday); BIN_TO_BCD(tm.tm_year); #ifdef DEBUG_RTC printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n", tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year); #endif gemini_rtc_write(tm.tm_sec, M48T35_RTC_SECONDS); gemini_rtc_write(tm.tm_min, M48T35_RTC_MINUTES); gemini_rtc_write(tm.tm_hour, M48T35_RTC_HOURS); gemini_rtc_write(tm.tm_mday, M48T35_RTC_DOM); gemini_rtc_write(tm.tm_mon, M48T35_RTC_MONTH); gemini_rtc_write(tm.tm_year, M48T35_RTC_YEAR); /* done writing */ gemini_rtc_write(reg, M48T35_RTC_CONTROL); if ((time_state == TIME_ERROR) || (time_state == TIME_BAD)) time_state = TIME_OK; return 0; } /* use the RTC to determine the decrementer count */ void __init gemini_calibrate_decr(void) { int freq, divisor; unsigned char reg; /* determine processor bus speed */ reg = readb(GEMINI_BSTAT); switch(((reg & 0x0c)>>2)&0x3) { case 0: default: freq = 66667; break; case 1: freq = 83000; break; case 2: freq = 100000; break; } freq *= 1000; divisor = 4; tb_ticks_per_jiffy = freq / HZ / divisor; tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); } unsigned long __init gemini_find_end_of_memory(void) { unsigned long total; unsigned char reg; reg = readb(GEMINI_MEMCFG); total = ((1<<((reg & 0x7) - 1)) * (8<<((reg >> 3) & 0x7))); total *= (1024*1024); return total; } static void __init gemini_map_io(void) { io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); } #ifdef CONFIG_SMP static int smp_gemini_probe(void) { int i, nr; nr = (readb(GEMINI_CPUSTAT) & GEMINI_CPU_COUNT_MASK) >> 2; if (nr == 0) nr = 4; if (nr > 1) { openpic_request_IPIs(); for (i = 1; i < nr; ++i) smp_hw_index[i] = i; } return nr; } static void smp_gemini_kick_cpu(int nr) { openpic_reset_processor_phys(1 << nr); openpic_reset_processor_phys(0); } static void smp_gemini_setup_cpu(int cpu_nr) { if (OpenPIC_Addr) do_openpic_setup_cpu(); if (cpu_nr > 0) gemini_init_l2(); } static struct smp_ops_t gemini_smp_ops = { smp_openpic_message_pass, smp_gemini_probe, smp_gemini_kick_cpu, smp_gemini_setup_cpu, }; #endif /* CONFIG_SMP */ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { int i; /* Restore BATs for now */ mtspr(DBAT3U, 0xf0001fff); mtspr(DBAT3L, 0xf000002a); parse_bootinfo(find_bootinfo()); for(i = 0; i < GEMINI_LEDS; i++) gemini_led_off(i); ISA_DMA_THRESHOLD = 0; DMA_MODE_READ = 0; DMA_MODE_WRITE = 0; #ifdef CONFIG_BLK_DEV_INITRD if ( r4 ) { initrd_start = r4 + KERNELBASE; initrd_end = r5 + KERNELBASE; } #endif ppc_md.setup_arch = gemini_setup_arch; ppc_md.show_cpuinfo = gemini_show_cpuinfo; ppc_md.irq_cannonicalize = NULL; ppc_md.init_IRQ = gemini_init_IRQ; ppc_md.get_irq = openpic_get_irq; ppc_md.init = NULL; ppc_md.restart = gemini_restart; ppc_md.power_off = gemini_power_off; ppc_md.halt = gemini_halt; ppc_md.time_init = gemini_time_init; ppc_md.set_rtc_time = gemini_set_rtc_time; ppc_md.get_rtc_time = gemini_get_rtc_time; ppc_md.calibrate_decr = gemini_calibrate_decr; ppc_md.find_end_of_memory = gemini_find_end_of_memory; ppc_md.setup_io_mappings = gemini_map_io; ppc_md.pcibios_fixup_bus = gemini_pcibios_fixup; #ifdef CONFIG_SMP ppc_md.smp_ops = &gemini_smp_ops; #endif /* CONFIG_SMP */ } --- NEW FILE: iSeries_setup.c --- /* * * * Copyright (c) 2000 Mike Corrigan <mi...@us...> * Copyright (c) 1999-2000 Grant Erickson <gr...@lc...> * * Module name: iSeries_setup.c * * Description: * Architecture- / platform-specific boot-time initialization code for * the IBM iSeries LPAR. Adapted from original code by Grant Erickson and * code by Gary Thomas, Cort Dougan <co...@fs...>, and Dan Malek * <da...@ne...>. * */ #include <linux/pci.h> #include <linux/config.h> #include <linux/init.h> #include <linux/threads.h> #include <linux/smp.h> #include <linux/param.h> #include <linux/string.h> #include <linux/bootmem.h> #include <linux/blk.h> #include <linux/ide.h> #include <linux/seq_file.h> #include <asm/processor.h> #include <asm/machdep.h> #include <asm/page.h> #include <asm/bootinfo.h> #include <asm/time.h> #include "iSeries_setup.h" #include <asm/iSeries/LparData.h> #include <asm/iSeries/HvCallHpt.h> #include <asm/iSeries/HvLpConfig.h> #include <asm/iSeries/HvCallEvent.h> #include <asm/iSeries/HvCallSm.h> #include <asm/iSeries/ItLpQueue.h> #include <asm/iSeries/IoHriMainStore.h> #include <asm/iSeries/iSeries_proc.h> #include <asm/iSeries/pmc_proc.h> #include <asm/iSeries/mf.h> #include <asm/pci-bridge.h> #include <asm/iSeries/HvCallXm.h> #include <asm/iSeries/iSeries_fixup.h> #include <asm/iSeries/HvReleaseData.h> /* Function Prototypes */ extern void abort(void); static void build_iSeries_Memory_Map( void ); static void setup_iSeries_cache_sizes( void ); extern void iSeries_pci_Initialize(void); static int iSeries_show_cpuinfo(struct seq_file *m); static int iSeries_show_percpuinfo(struct seq_file *m, int i); extern struct pci_ops iSeries_pci_ops; /* Global Variables */ unsigned short iSeries_icache_line_size = 0; unsigned short iSeries_dcache_line_size = 0; unsigned short iSeries_icache_lines_per_page = 0; unsigned short iSeries_dcache_lines_per_page = 0; unsigned short iSeries_log_icache_line_size = 0; unsigned short iSeries_log_dcache_line_size = 0; unsigned long procFreqHz = 0; unsigned long procFreqMhz = 0; unsigned long procFreqMhzHundreths = 0; unsigned long tbFreqHz = 0; unsigned long tbFreqMhz = 0; unsigned long tbFreqMhzHundreths = 0; unsigned long decr_overclock = 8; unsigned long decr_overclock_proc0 = 8; unsigned long decr_overclock_set = 0; unsigned long decr_overclock_proc0_set = 0; extern unsigned long embedded_sysmap_start; extern unsigned long embedded_sysmap_end; extern unsigned long sysmap; extern unsigned long sysmap_size; extern unsigned long end_of_DRAM; // Defined in ppc/mm/init.c #ifdef CONFIG_SMP extern struct smp_ops_t iSeries_smp_ops; #endif /* CONFIG_SMP */ /* XXX for now... */ #ifndef CONFIG_PCI unsigned long isa_io_base; #endif /* * void __init platform_init() * * Description: * This routine... * * Input(s): * r3 - Optional pointer to a board information structure. * r4 - Optional pointer to the physical starting address of the init RAM * disk. * r5 - Optional pointer to the physical ending address of the init RAM * disk. * r6 - Optional pointer to the physical starting address of any kernel * command-line parameters. * r7 - Optional pointer to the physical ending address of any kernel * command-line parameters. * * Output(s): * N/A * * Returns: * N/A * */ extern int rd_size; // Defined in drivers/block/rd.c extern u64 next_jiffy_update_tb[]; extern u64 get_tb64(void); unsigned long __init iSeries_find_end_of_memory(void) { /* totalLpChunks contains the size of memory (in units of 256K) */ unsigned long memory_end = (totalLpChunks << 18); #ifndef CONFIG_HIGHMEM /* Max memory if highmem is not configured is 768 MB */ if (memory_end > (768 << 20)) memory_end = 768 << 20; #endif /* CONFIG_HIGHMEM */ return memory_end; } void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); #if defined(CONFIG_BLK_DEV_INITRD) /* * If the init RAM disk has been configured and there is * a non-zero starting address for it, set it up */ if ( xNaca.xRamDisk ) { initrd_start = xNaca.xRamDisk + KERNELBASE; initrd_end = initrd_start + xNaca.xRamDiskSize * PAGE_SIZE; initrd_below_start_ok = 1; // ramdisk in kernel space ROOT_DEV = MKDEV( RAMDISK_MAJOR, 0 ); if ( ((rd_size*1024)/PAGE_SIZE) < xNaca.xRamDiskSize ) rd_size = (xNaca.xRamDiskSize*PAGE_SIZE)/1024; } else #endif /* CONFIG_BLK_DEV_INITRD */ #if CONFIG_VIODASD_IDE { ROOT_DEV = MKDEV( IDE0_MAJOR, 1 ); } #elif defined(CONFIG_VIODASD) { ROOT_DEV = MKDEV( VIODASD_MAJOR, 1 ); } #endif /* CONFIG_VIODASD_IDE */ /* If an embedded System.map has been added to the kernel, * set it up. */ if ( embedded_sysmap_start ) { sysmap = embedded_sysmap_start + KERNELBASE; sysmap_size = embedded_sysmap_end - embedded_sysmap_start; } /* Copy the kernel command line arguments to a safe place. */ if (r6) { *(char *)(r7 + KERNELBASE) = 0; strcpy(cmd_line, (char *)(r6 + KERNELBASE)); } /* Initialize the table which translate Linux physical addresses to * iSeries absolute addresses */ build_iSeries_Memory_Map(); setup_iSeries_cache_sizes(); /* Initialize machine-dependency vectors */ ppc_md.setup_arch = iSeries_setup_arch; ppc_md.show_cpuinfo = iSeries_show_cpuinfo; ppc_md.show_percpuinfo = iSeries_show_percpuinfo; ppc_md.irq_cannonicalize = NULL; ppc_md.init_IRQ = iSeries_init_IRQ; ppc_md.get_irq = iSeries_get_irq; ppc_md.init = NULL; ppc_md.restart = iSeries_restart; ppc_md.power_off = iSeries_power_off; ppc_md.halt = iSeries_halt; ppc_md.time_init = NULL; ppc_md.set_rtc_time = iSeries_set_rtc_time; ppc_md.get_rtc_time = iSeries_get_rtc_time; ppc_md.calibrate_decr = iSeries_calibrate_decr; ppc_md.progress = iSeries_progress; ppc_md.find_end_of_memory = iSeries_find_end_of_memory; #ifdef CONFIG_PCI ppc_md.pcibios_fixup_bus = iSeries_fixup_bus; ppc_md.pcibios_fixup = iSeries_fixup; #else ppc_md.pcibios_fixup_bus = NULL; ppc_md.pcibios_fixup = NULL; #endif /* CONFIG_PCI */ #ifdef CONFIG_SMP ppc_md.smp_ops = &iSeries_smp_ops; #endif /* CONFIG_SMP */ // Associate Lp Event Queue 0 with processor 0 HvCallEvent_setLpEventQueueInterruptProc( 0, 0 ); { // copy the command line parameter from the primary VSP char *p, *q; HvCallEvent_dmaToSp( cmd_line, 2*64*1024, 256, HvLpDma_Direction_RemoteToLocal ); p = q = cmd_line + 255; while( p > cmd_line ) { if ((*p == 0) || (*p == ' ') || (*p == '\n')) --p; else break; } if ( p < q ) *(p+1) = 0; } next_jiffy_update_tb[0] = get_tb64(); iSeries_proc_early_init(); mf_init(); iSeries_proc_callback( &pmc_proc_init ); return; } /* * The iSeries may have very large memories ( > 128 GB ) and a partition * may get memory in "chunks" that may be anywhere in the 2**52 real * address space. The chunks are 256K in size. To map this to the * memory model Linux expects, the iSeries specific code builds a * translation table to translate what Linux thinks are "physical" * addresses to the actual real addresses. This allows us to make * it appear to Linux that we have contiguous memory starting at * physical address zero while in fact this could be far from the truth. * To avoid confusion, I'll let the words physical and/or real address * apply to the Linux addresses while I'll use "absolute address" to * refer to the actual hardware real address. * * build_iSeries_Memory_Map gets information from the Hypervisor and * looks at the Main Store VPD to determine the absolute addresses * of the memory that has been assigned to our partition and builds * a table used to translate Linux's physical addresses to these * absolute addresses. Absolute addresses are needed when * communicating with the hypervisor (e.g. to build HPT entries) */ static void __init build_iSeries_Memory_Map(void) { u32 loadAreaFirstChunk, loadAreaLastChunk, loadAreaSize; u32 hptFirstChunk, hptLastChunk, hptSizeChunks; u32 absAddrHi, absAddrLo; u32 nextPhysChunk; u32 holeFirstChunk, holeSizeChunks; u32 totalChunks,moreChunks; u32 currChunk, thisChunk, absChunk; u32 currDword; u32 chunkBit; u64 holeStart, holeEnd, holeSize; u64 map; struct IoHriMainStoreSegment4 * msVpd; // Get absolute address of our load area // and map it to physical address 0 // This guarantees that the loadarea ends up at physical 0 // otherwise, it might not be returned by PLIC as the first // chunks loadAreaFirstChunk = (u32)(itLpNaca.xLoadAreaAddr >> 18); loadAreaSize = itLpNaca.xLoadAreaChunks; loadAreaLastChunk = loadAreaFirstChunk + loadAreaSize - 1; // Get absolute address of our HPT and remember it so // we won't map it to any physical address hptFirstChunk = (u32)(HvCallHpt_getHptAddress() >> 18 ); hptSizeChunks = (u32)(HvCallHpt_getHptPages() >> 6 ); hptLastChunk = hptFirstChunk + hptSizeChunks - 1; loadAreaLastChunk = loadAreaFirstChunk + loadAreaSize - 1; absAddrLo = loadAreaFirstChunk << 18; absAddrHi = loadAreaFirstChunk >> 14; printk( "Mapping load area - physical addr = 0, absolute addr = %08x%08x\n", absAddrHi, absAddrLo ); printk( "Load area size %dK\n", loadAreaSize*256 ); nextPhysChunk = 0; for ( absChunk = loadAreaFirstChunk; absChunk <= loadAreaLastChunk; ++absChunk ) { if ( ( absChunk < hptFirstChunk ) || ( absChunk > hptLastChunk ) ) { msChunks[nextPhysChunk] = absChunk; ++nextPhysChunk; } } // Get absolute address of our HPT and remember it so // we won't map it to any physical address hptFirstChunk = (u32)(HvCallHpt_getHptAddress() >> 18 ); hptSizeChunks = (u32)(HvCallHpt_getHptPages() >> 6 ); hptLastChunk = hptFirstChunk + hptSizeChunks - 1; absAddrLo = hptFirstChunk << 18; absAddrHi = hptFirstChunk >> 14; printk( "HPT absolute addr = %08x%08x, size = %dK\n", absAddrHi, absAddrLo, hptSizeChunks*256 ); // Determine if absolute memory has any // holes so that we can interpret the // access map we get back from the hypervisor // correctly. msVpd = (struct IoHriMainStoreSegment4 *)xMsVpd; holeStart = msVpd->nonInterleavedBlocksStartAdr; holeEnd = msVpd->nonInterleavedBlocksEndAdr; holeSize = holeEnd - holeStart; if ( holeSize ) { holeStart = holeStart & 0x000fffffffffffff; holeStart = holeStart >> 18; holeFirstChunk = (u32)holeStart; holeSize = holeSize >> 18; holeSizeChunks = (u32)holeSize; printk( "Main store hole: start chunk = %0x, size = %0x chunks\n", holeFirstChunk, holeSizeChunks ); } else { holeFirstChunk = 0xffffffff; holeSizeChunks = 0; } // Process the main store access map from the hypervisor // to build up our physical -> absolute translation table totalChunks = (u32)HvLpConfig_getMsChunks(); if ((totalChunks-hptSizeChunks) > 16384) { panic("More than 4GB of memory assigned to this partition"); } currChunk = 0; currDword = 0; moreChunks = totalChunks; while ( moreChunks ) { map = HvCallSm_get64BitsOfAccessMap( itLpNaca.xLpIndex, currDword ); thisChunk = currChunk; while ( map ) { chunkBit = map >> 63; map <<= 1; if ( chunkBit ) { --moreChunks; absChunk = thisChunk; if ( absChunk >= holeFirstChunk ) absChunk += holeSizeChunks; if ( ( ( absChunk < hptFirstChunk ) || ( absChunk > hptLastChunk ) ) && ( ( absChunk < loadAreaFirstChunk ) || ( absChunk > loadAreaLastChunk ) ) ) { // printk( "Mapping physical = %0x to absolute %0x for 256K\n", nextPhysChunk << 18, absChunk << 18 ); msChunks[nextPhysChunk] = absChunk; ++nextPhysChunk; } } ++thisChunk; } ++currDword; currChunk += 64; } // main store size (in chunks) is // totalChunks - hptSizeChunks // which should be equal to // nextPhysChunk totalLpChunks = nextPhysChunk; } /* * Set up the variables that describe the cache line sizes * for this machine. */ static void __init setup_iSeries_cache_sizes(void) { unsigned i,n; iSeries_icache_line_size = xIoHriProcessorVpd[0].xInstCacheOperandSize; iSeries_dcache_line_size = xIoHriProcessorVpd[0].xDataCacheOperandSize; iSeries_icache_lines_per_page = PAGE_SIZE / iSeries_icache_line_size; iSeries_dcache_lines_per_page = PAGE_SIZE / iSeries_dcache_line_size; i = iSeries_icache_line_size; n = 0; while ((i=(i/2))) ++n; iSeries_log_icache_line_size = n; i = iSeries_dcache_line_size; n = 0; while ((i=(i/2))) ++n; iSeries_log_dcache_line_size = n; printk( "D-cache line size = %d (log = %d)\n", (unsigned)iSeries_dcache_line_size, (unsigned)iSeries_log_dcache_line_size ); printk( "I-cache line size = %d (log = %d)\n", (unsigned)iSeries_icache_line_size, (unsigned)iSeries_log_icache_line_size ); } int piranha_simulator = 0; /* * Document me. */ void __init iSeries_setup_arch(void) { void * eventStack; u32 procFreq; u32 tbFreq; // u32 evStackContigReal; // u6... [truncated message content] |
From: James S. <jsi...@us...> - 2002-03-14 22:32:29
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/drivers/video Modified Files: Config.in fbmem.c vgacon.c Log Message: synced to 2.5.5 Index: Config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/Config.in,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- Config.in 14 Mar 2002 20:02:07 -0000 1.58 +++ Config.in 14 Mar 2002 22:32:23 -0000 1.59 @@ -153,7 +153,7 @@ dep_tristate ' G400 second head support' CONFIG_FB_MATROX_MAVEN $CONFIG_FB_MATROX_I2C fi fi - dep_tristate ' G450/G550 second head support' CONFIG_FB_MATROX_G450 $CONFIG_FB_MATROX_G100 + dep_tristate ' G450/G550 second head support (mandatory for G550)' CONFIG_FB_MATROX_G450 $CONFIG_FB_MATROX_G100 bool ' Multihead support' CONFIG_FB_MATROX_MULTIHEAD fi tristate ' ATI Mach64 display support (EXPERIMENTAL)' CONFIG_FB_ATY Index: fbmem.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fbmem.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- fbmem.c 14 Mar 2002 20:02:07 -0000 1.59 +++ fbmem.c 14 Mar 2002 22:32:23 -0000 1.60 @@ -672,6 +672,8 @@ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); #elif defined(__sh__) pgprot_val(vma->vm_page_prot) &= ~_PAGE_CACHABLE; +#elif defined(__ia64__) + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); #else #warning What do we have to do here?? #endif Index: vgacon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/vgacon.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- vgacon.c 30 Jan 2002 17:25:03 -0000 1.61 +++ vgacon.c 14 Mar 2002 22:32:23 -0000 1.62 @@ -100,14 +100,7 @@ static u16 vga_video_port_reg; /* Video register select port */ static u16 vga_video_port_val; /* Video register value port */ static unsigned char vga_hardscroll_enabled; -#ifdef CONFIG_IA64_SOFTSDV_HACKS -/* - * SoftSDV doesn't have hardware assist VGA scrolling - */ -static unsigned char vga_hardscroll_user_enable; -#else static unsigned char vga_hardscroll_user_enable = 1; -#endif static int vga_is_gfx; static int vga_512_chars; static unsigned int vga_rolled_over; |
From: James S. <jsi...@us...> - 2002-03-14 22:32:29
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/serial In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/drivers/serial Modified Files: serial_uart00.c Log Message: synced to 2.5.5 Index: serial_uart00.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/serial/serial_uart00.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 |
From: James S. <jsi...@us...> - 2002-03-14 22:32:29
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sparc64 In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/sparc64 Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sparc64/config.in,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- config.in 14 Mar 2002 20:02:06 -0000 1.23 +++ config.in 14 Mar 2002 22:32:22 -0000 1.24 @@ -256,7 +256,7 @@ tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/Config.in + source sound/Config.in fi endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:29
|
Update of /cvsroot/linuxconsole/ruby/linux/include/asm-ppc In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/include/asm-ppc Modified Files: machdep.h Log Message: synced to 2.5.5 Index: machdep.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/asm-ppc/machdep.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- machdep.h 1 Feb 2002 22:02:58 -0000 1.4 +++ machdep.h 14 Mar 2002 22:32:23 -0000 1.5 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.machdep.h 1.28 12/27/01 10:08:52 trini + * BK Id: %F% %I% %G% %U% %#% */ #ifdef __KERNEL__ #ifndef _PPC_MACHDEP_H |
From: James S. <jsi...@us...> - 2002-03-14 22:32:29
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sh In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/sh Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/sh/config.in,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- config.in 13 Mar 2002 23:48:37 -0000 1.18 +++ config.in 14 Mar 2002 22:32:22 -0000 1.19 @@ -329,7 +329,7 @@ tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/Config.in + source sound/Config.in fi endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:28
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/drivers Modified Files: Makefile Log Message: synced to 2.5.5 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/Makefile,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Makefile 14 Mar 2002 20:02:06 -0000 1.27 +++ Makefile 14 Mar 2002 22:32:23 -0000 1.28 @@ -6,11 +6,11 @@ # -mod-subdirs := dio mtd sbus macintosh usb input telephony sgi ide serial \ +mod-subdirs := dio mtd sbus video macintosh usb input telephony sgi ide \ message/i2o message/fusion scsi md ieee1394 pnp isdn atm \ fc4 net/hamradio i2c acpi bluetooth input/serio input/gameport -subdir-y := base parport char block net sound misc media cdrom hotplug video +subdir-y := base parport char block net misc media cdrom hotplug subdir-m := $(subdir-y) |
From: James S. <jsi...@us...> - 2002-03-14 22:32:28
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/amiga In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/ppc/amiga Modified Files: config.c Log Message: synced to 2.5.5 Index: config.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/amiga/config.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- config.c 20 Jan 2002 03:54:45 -0000 1.4 +++ config.c 14 Mar 2002 22:32:22 -0000 1.5 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.config.c 1.12 09/18/01 11:19:06 paulus + * BK Id: %F% %I% %G% %U% %#% */ #define m68k_debug_device debug_device @@ -28,7 +28,6 @@ #ifdef CONFIG_ZORRO #include <linux/zorro.h> #endif -#include <linux/seq_file.h> #include <asm/bootinfo.h> #include <asm/setup.h> @@ -89,7 +88,6 @@ extern void amiga_disable_irq (unsigned int); static void amiga_get_model(char *model); static int amiga_get_hardware_list(char *buffer); -extern int show_amiga_interrupts (struct seq_file *, void *); /* amiga specific timer functions */ static unsigned long amiga_gettimeoffset (void); static void a3000_gettod (int *, int *, int *, int *, int *, int *); @@ -392,8 +390,8 @@ mach_sched_init = amiga_sched_init; mach_init_IRQ = amiga_init_IRQ; - mach_default_handler = &amiga_default_handler; #ifndef CONFIG_APUS + mach_default_handler = &amiga_default_handler; mach_request_irq = amiga_request_irq; mach_free_irq = amiga_free_irq; enable_irq = amiga_enable_irq; @@ -401,7 +399,6 @@ #endif mach_get_model = amiga_get_model; mach_get_hardware_list = amiga_get_hardware_list; - mach_get_irq_list = show_amiga_interrupts; mach_gettimeoffset = amiga_gettimeoffset; if (AMIGAHW_PRESENT(A3000_CLK)){ mach_gettod = a3000_gettod; |
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/ppc/kernel Added Files: m8260_setup.c m8xx_setup.c ppc4xx_setup.c ppc_ksyms.c Removed Files: apus_setup.c chrp_setup.c pmac_setup.c prep_setup.c Log Message: synced to 2.5.5 --- NEW FILE: m8260_setup.c --- /* * BK Id: %F% %I% %G% %U% %#% */ /* * linux/arch/ppc/kernel/setup.c * * Copyright (C) 1995 Linus Torvalds * Adapted from 'alpha' version by Gary Thomas * Modified by Cort Dougan (co...@cs...) * Modified for MBX using prep/chrp/pmac functions by Dan (dm...@jl...) * Further modified for generic 8xx and 8260 by Dan. */ /* * bootup setup stuff.. */ #include <linux/config.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/slab.h> #include <linux/user.h> #include <linux/a.out.h> #include <linux/tty.h> #include <linux/major.h> #include <linux/interrupt.h> #include <linux/reboot.h> #include <linux/init.h> #include <linux/blk.h> #include <linux/ioport.h> #include <linux/ide.h> #include <linux/seq_file.h> #include <asm/mmu.h> #include <asm/processor.h> #include <asm/residual.h> #include <asm/io.h> #include <asm/pgtable.h> #include <asm/ide.h> #include <asm/mpc8260.h> #include <asm/immap_8260.h> #include <asm/machdep.h> #include <asm/bootinfo.h> #include <asm/time.h> #include "ppc8260_pic.h" static int m8260_set_rtc_time(unsigned long time); static unsigned long m8260_get_rtc_time(void); static void m8260_calibrate_decr(void); unsigned char __res[sizeof(bd_t)]; extern void m8260_cpm_reset(void); static void __init m8260_setup_arch(void) { /* Reset the Communication Processor Module. */ m8260_cpm_reset(); } static void abort(void) { #ifdef CONFIG_XMON extern void xmon(void *); xmon(0); #endif machine_restart(NULL); } /* The decrementer counts at the system (internal) clock frequency * divided by four. */ static void __init m8260_calibrate_decr(void) { bd_t *binfo = (bd_t *)__res; int freq, divisor; freq = binfo->bi_busfreq; divisor = 4; tb_ticks_per_jiffy = freq / HZ / divisor; tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000); } /* The 8260 has an internal 1-second timer update register that * we should use for this purpose. */ static uint rtc_time; static static int m8260_set_rtc_time(unsigned long time) { #ifdef CONFIG_TQM8260 ((immap_t *)IMAP_ADDR)->im_sit.sit_tmcnt = time; ((immap_t *)IMAP_ADDR)->im_sit.sit_tmcntsc = 0x3; #else rtc_time = time; #endif return(0); } static unsigned long m8260_get_rtc_time(void) { #ifdef CONFIG_TQM8260 return ((immap_t *)IMAP_ADDR)->im_sit.sit_tmcnt; #else /* Get time from the RTC. */ return((unsigned long)rtc_time); #endif } static void m8260_restart(char *cmd) { extern void m8260_gorom(bd_t *bi, uint addr); uint startaddr; /* Most boot roms have a warmstart as the second instruction * of the reset vector. If that doesn't work for you, change this * or the reboot program to send a proper address. */ #ifdef CONFIG_TQM8260 startaddr = 0x40000104; #else startaddr = 0xff000104; #endif if (cmd != NULL) { if (!strncmp(cmd, "startaddr=", 10)) startaddr = simple_strtoul(&cmd[10], NULL, 0); } m8260_gorom((unsigned int)__pa(__res), startaddr); } static void m8260_power_off(void) { m8260_restart(NULL); } static void m8260_halt(void) { m8260_restart(NULL); } static int m8260_show_percpuinfo(struct seq_file *m, int i) { bd_t *bp; bp = (bd_t *)__res; seq_printf(m, "core clock\t: %d MHz\n" "CPM clock\t: %d MHz\n" "bus clock\t: %d MHz\n", bp->bi_intfreq / 1000000, bp->bi_cpmfreq / 1000000, bp->bi_busfreq / 1000000); return 0; } /* Initialize the internal interrupt controller. The number of * interrupts supported can vary with the processor type, and the * 8260 family can have up to 64. * External interrupts can be either edge or level triggered, and * need to be initialized by the appropriate driver. */ static void __init m8260_init_IRQ(void) { int i; void cpm_interrupt_init(void); #if 0 ppc8260_pic.irq_offset = 0; #endif for ( i = 0 ; i < NR_SIU_INTS ; i++ ) irq_desc[i].handler = &ppc8260_pic; /* Initialize the default interrupt mapping priorities, * in case the boot rom changed something on us. */ immr->im_intctl.ic_sicr = 0; immr->im_intctl.ic_siprr = 0x05309770; immr->im_intctl.ic_scprrh = 0x05309770; immr->im_intctl.ic_scprrl = 0x05309770; } /* * Same hack as 8xx */ static unsigned long __init m8260_find_end_of_memory(void) { bd_t *binfo; extern unsigned char __res[]; binfo = (bd_t *)__res; return binfo->bi_memsize; } /* Map the IMMR, plus anything else we can cover * in that upper space according to the memory controller * chip select mapping. Grab another bunch of space * below that for stuff we can't cover in the upper. */ static void __init m8260_map_io(void) { io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); io_block_mapping(0xe0000000, 0xe0000000, 0x10000000, _PAGE_IO); } void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); if ( r3 ) memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) ); #ifdef CONFIG_BLK_DEV_INITRD /* take care of initrd if we have one */ if ( r4 ) { initrd_start = r4 + KERNELBASE; initrd_end = r5 + KERNELBASE; } #endif /* CONFIG_BLK_DEV_INITRD */ /* take care of cmd line */ if ( r6 ) { *(char *)(r7+KERNELBASE) = 0; strcpy(cmd_line, (char *)(r6+KERNELBASE)); } ppc_md.setup_arch = m8260_setup_arch; ppc_md.show_percpuinfo = m8260_show_percpuinfo; ppc_md.irq_cannonicalize = NULL; ppc_md.init_IRQ = m8260_init_IRQ; ppc_md.get_irq = m8260_get_irq; ppc_md.init = NULL; ppc_md.restart = m8260_restart; ppc_md.power_off = m8260_power_off; ppc_md.halt = m8260_halt; ppc_md.time_init = NULL; ppc_md.set_rtc_time = m8260_set_rtc_time; ppc_md.get_rtc_time = m8260_get_rtc_time; ppc_md.calibrate_decr = m8260_calibrate_decr; ppc_md.find_end_of_memory = m8260_find_end_of_memory; ppc_md.setup_io_mappings = m8260_map_io; ppc_md.kbd_setkeycode = NULL; ppc_md.kbd_getkeycode = NULL; ppc_md.kbd_translate = NULL; ppc_md.kbd_unexpected_up = NULL; ppc_md.kbd_leds = NULL; ppc_md.kbd_init_hw = NULL; ppc_md.ppc_kbd_sysrq_xlate = NULL; } /* Mainly for ksyms. */ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flag, const char *naem, void *dev) { panic("request IRQ\n"); } --- NEW FILE: m8xx_setup.c --- /* * BK Id: %F% %I% %G% %U% %#% * * linux/arch/ppc/kernel/setup.c * * Copyright (C) 1995 Linus Torvalds * Adapted from 'alpha' version by Gary Thomas * Modified by Cort Dougan (co...@cs...) * Modified for MBX using prep/chrp/pmac functions by Dan (dm...@jl...) * Further modified for generic 8xx by Dan. */ /* * bootup setup stuff.. */ #include <linux/config.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/slab.h> #include <linux/user.h> #include <linux/a.out.h> #include <linux/tty.h> #include <linux/major.h> #include <linux/interrupt.h> #include <linux/reboot.h> #include <linux/init.h> #include <linux/blk.h> #include <linux/ioport.h> #include <linux/bootmem.h> #include <linux/seq_file.h> #include <asm/mmu.h> #include <asm/processor.h> #include <asm/residual.h> #include <asm/io.h> #include <asm/pgtable.h> #include <asm/mpc8xx.h> #include <asm/8xx_immap.h> #include <asm/machdep.h> #include <asm/bootinfo.h> #include <asm/time.h> #include "ppc8xx_pic.h" static int m8xx_set_rtc_time(unsigned long time); static unsigned long m8xx_get_rtc_time(void); void m8xx_calibrate_decr(void); unsigned char __res[sizeof(bd_t)]; extern void m8xx_ide_init(void); extern unsigned long find_available_memory(void); extern void m8xx_cpm_reset(uint); extern void rpxfb_alloc_pages(void); void __init m8xx_setup_arch(void) { int cpm_page; cpm_page = (int) alloc_bootmem_pages(PAGE_SIZE); /* Reset the Communication Processor Module. */ m8xx_cpm_reset(cpm_page); #ifdef CONFIG_FB_RPX rpxfb_alloc_pages(); #endif #ifdef notdef ROOT_DEV = to_kdev_t(0x0301); /* hda1 */ #endif #ifdef CONFIG_BLK_DEV_INITRD #if 0 ROOT_DEV = to_kdev_t(0x0200); /* floppy */ rd_prompt = 1; rd_doload = 1; rd_image_start = 0; #endif #if 0 /* XXX this may need to be updated for the new bootmem stuff, or possibly just deleted (see set_phys_avail() in init.c). - paulus. */ /* initrd_start and size are setup by boot/head.S and kernel/head.S */ if ( initrd_start ) { if (initrd_end > *memory_end_p) { printk("initrd extends beyond end of memory " "(0x%08lx > 0x%08lx)\ndisabling initrd\n", initrd_end,*memory_end_p); initrd_start = 0; } } #endif #endif } void abort(void) { #ifdef CONFIG_XMON xmon(0); #endif machine_restart(NULL); /* not reached */ for (;;); } /* A place holder for time base interrupts, if they are ever enabled. */ void timebase_interrupt(int irq, void * dev, struct pt_regs * regs) { printk ("timebase_interrupt()\n"); } /* The decrementer counts at the system (internal) clock frequency divided by * sixteen, or external oscillator divided by four. We force the processor * to use system clock divided by sixteen. */ void __init m8xx_calibrate_decr(void) { bd_t *binfo = (bd_t *)__res; int freq, fp, divisor; /* Unlock the SCCR. */ ((volatile immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk = ~KAPWR_KEY; ((volatile immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk = KAPWR_KEY; /* Force all 8xx processors to use divide by 16 processor clock. */ ((volatile immap_t *)IMAP_ADDR)->im_clkrst.car_sccr |= 0x02000000; /* Processor frequency is MHz. * The value 'fp' is the number of decrementer ticks per second. */ fp = binfo->bi_intfreq / 16; freq = fp*60; /* try to make freq/1e6 an integer */ divisor = 60; printk("Decrementer Frequency = %d/%d\n", freq, divisor); tb_ticks_per_jiffy = freq / HZ / divisor; tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000); /* Perform some more timer/timebase initialization. This used * to be done elsewhere, but other changes caused it to get * called more than once....that is a bad thing. * * First, unlock all of the registers we are going to modify. * To protect them from corruption during power down, registers * that are maintained by keep alive power are "locked". To * modify these registers we have to write the key value to * the key location associated with the register. * Some boards power up with these unlocked, while others * are locked. Writing anything (including the unlock code?) * to the unlocked registers will lock them again. So, here * we guarantee the registers are locked, then we unlock them * for our use. */ ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_tbscrk = ~KAPWR_KEY; ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_rtcsck = ~KAPWR_KEY; ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_tbk = ~KAPWR_KEY; ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_tbscrk = KAPWR_KEY; ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_rtcsck = KAPWR_KEY; ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_tbk = KAPWR_KEY; /* Disable the RTC one second and alarm interrupts. */ ((volatile immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc &= ~(RTCSC_SIE | RTCSC_ALE); /* Enable the RTC */ ((volatile immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc |= (RTCSC_RTF | RTCSC_RTE); /* Enabling the decrementer also enables the timebase interrupts * (or from the other point of view, to get decrementer interrupts * we have to enable the timebase). The decrementer interrupt * is wired into the vector table, nothing to do here for that. */ ((volatile immap_t *)IMAP_ADDR)->im_sit.sit_tbscr = ((mk_int_int_mask(DEC_INTERRUPT) << 8) | (TBSCR_TBF | TBSCR_TBE)); if (request_8xxirq(DEC_INTERRUPT, timebase_interrupt, 0, "tbint", NULL) != 0) panic("Could not allocate timer IRQ!"); } /* The RTC on the MPC8xx is an internal register. * We want to protect this during power down, so we need to unlock, * modify, and re-lock. */ static int m8xx_set_rtc_time(unsigned long time) { ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_rtck = KAPWR_KEY; ((volatile immap_t *)IMAP_ADDR)->im_sit.sit_rtc = time; ((volatile immap_t *)IMAP_ADDR)->im_sitk.sitk_rtck = ~KAPWR_KEY; return(0); } static unsigned long m8xx_get_rtc_time(void) { /* Get time from the RTC. */ return((unsigned long)(((immap_t *)IMAP_ADDR)->im_sit.sit_rtc)); } static void m8xx_restart(char *cmd) { __volatile__ unsigned char dummy; uint msr; cli(); ((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr |= 0x00000080; /* Clear the ME bit in MSR to cause checkstop on machine check */ __asm__("mfmsr %0" : "=r" (msr) ); msr &= ~0x1000; __asm__("mtmsr %0" : : "r" (msr) ); dummy = ((immap_t *)IMAP_ADDR)->im_clkrst.res[0]; printk("Restart failed\n"); while(1); } static void m8xx_power_off(void) { m8xx_restart(NULL); } static void m8xx_halt(void) { m8xx_restart(NULL); } static int m8xx_show_percpuinfo(struct seq_file *m, int i) { bd_t *bp; bp = (bd_t *)__res; seq_printf(m, "clock\t\t: %dMHz\n" "bus clock\t: %dMHz\n", bp->bi_intfreq / 1000000, bp->bi_busfreq / 1000000); return 0; } /* Initialize the internal interrupt controller. The number of * interrupts supported can vary with the processor type, and the * 82xx family can have up to 64. * External interrupts can be either edge or level triggered, and * need to be initialized by the appropriate driver. */ static void __init m8xx_init_IRQ(void) { int i; void cpm_interrupt_init(void); for ( i = 0 ; i < NR_SIU_INTS ; i++ ) irq_desc[i].handler = &ppc8xx_pic; /* We could probably incorporate the CPM into the multilevel * interrupt structure. */ cpm_interrupt_init(); unmask_irq(CPM_INTERRUPT); #if defined(CONFIG_PCI) for ( i = NR_SIU_INTS ; i < (NR_SIU_INTS + NR_8259_INTS) ; i++ ) irq_desc[i].handler = &i8259_pic; i8259_pic.irq_offset = NR_SIU_INTS; i8259_init(); request_8xxirq(ISA_BRIDGE_INT, mbx_i8259_action, 0, "8259 cascade", NULL); enable_irq(ISA_BRIDGE_INT); #endif } /* -------------------------------------------------------------------- */ /* * This is a big hack right now, but it may turn into something real * someday. * * For the 8xx boards (at this time anyway), there is nothing to initialize * associated the PROM. Rather than include all of the prom.c * functions in the image just to get prom_init, all we really need right * now is the initialization of the physical memory region. */ static unsigned long __init m8xx_find_end_of_memory(void) { bd_t *binfo; extern unsigned char __res[]; binfo = (bd_t *)__res; return binfo->bi_memsize; } /* * Now map in some of the I/O space that is generically needed * or shared with multiple devices. * All of this fits into the same 4Mbyte region, so it only * requires one page table page. (or at least it used to -- paulus) */ static void __init m8xx_map_io(void) { io_block_mapping(IMAP_ADDR, IMAP_ADDR, IMAP_SIZE, _PAGE_IO); #ifdef CONFIG_MBX io_block_mapping(NVRAM_ADDR, NVRAM_ADDR, NVRAM_SIZE, _PAGE_IO); io_block_mapping(MBX_CSR_ADDR, MBX_CSR_ADDR, MBX_CSR_SIZE, _PAGE_IO); io_block_mapping(PCI_CSR_ADDR, PCI_CSR_ADDR, PCI_CSR_SIZE, _PAGE_IO); /* Map some of the PCI/ISA I/O space to get the IDE interface. */ io_block_mapping(PCI_ISA_IO_ADDR, PCI_ISA_IO_ADDR, 0x4000, _PAGE_IO); io_block_mapping(PCI_IDE_ADDR, PCI_IDE_ADDR, 0x4000, _PAGE_IO); #endif #if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC) io_block_mapping(RPX_CSR_ADDR, RPX_CSR_ADDR, RPX_CSR_SIZE, _PAGE_IO); #if !defined(CONFIG_PCI) io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO); #endif #endif #ifdef CONFIG_HTDMSOUND io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO); #endif #ifdef CONFIG_FADS io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO); #endif #ifdef CONFIG_PCI io_block_mapping(PCI_CSR_ADDR, PCI_CSR_ADDR, PCI_CSR_SIZE, _PAGE_IO); #endif } void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); if ( r3 ) memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) ); #ifdef CONFIG_PCI m8xx_setup_pci_ptrs(); #endif #ifdef CONFIG_BLK_DEV_INITRD /* take care of initrd if we have one */ if ( r4 ) { initrd_start = r4 + KERNELBASE; initrd_end = r5 + KERNELBASE; } #endif /* CONFIG_BLK_DEV_INITRD */ /* take care of cmd line */ if ( r6 ) { *(char *)(r7+KERNELBASE) = 0; strcpy(cmd_line, (char *)(r6+KERNELBASE)); } ppc_md.setup_arch = m8xx_setup_arch; ppc_md.show_percpuinfo = m8xx_show_percpuinfo; ppc_md.irq_cannonicalize = NULL; ppc_md.init_IRQ = m8xx_init_IRQ; ppc_md.get_irq = m8xx_get_irq; ppc_md.init = NULL; ppc_md.restart = m8xx_restart; ppc_md.power_off = m8xx_power_off; ppc_md.halt = m8xx_halt; ppc_md.time_init = NULL; ppc_md.set_rtc_time = m8xx_set_rtc_time; ppc_md.get_rtc_time = m8xx_get_rtc_time; ppc_md.calibrate_decr = m8xx_calibrate_decr; ppc_md.find_end_of_memory = m8xx_find_end_of_memory; ppc_md.setup_io_mappings = m8xx_map_io; ppc_md.kbd_setkeycode = NULL; ppc_md.kbd_getkeycode = NULL; ppc_md.kbd_translate = NULL; ppc_md.kbd_unexpected_up = NULL; ppc_md.kbd_leds = NULL; ppc_md.kbd_init_hw = NULL; ppc_md.ppc_kbd_sysrq_xlate = NULL; #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) m8xx_ide_init(); #endif } --- NEW FILE: ppc4xx_setup.c --- /* * * Copyright (c) 1999-2000 Grant Erickson <gr...@lc...> * * Copyright 2000-2001 MontaVista Software Inc. * Completed implementation. * Author: MontaVista Software, Inc. <so...@mv...> * Frank Rowand <fra...@mv...> * Debbie Chu <deb...@mv...> * * Module name: ppc4xx_setup.c * * Description: * Architecture- / platform-specific boot-time initialization code for * IBM PowerPC 4xx based boards. Adapted from original * code by Gary Thomas, Cort Dougan <co...@fs...>, and Dan Malek * <da...@ne...>. * * History: 11/09/2001 - armin * rename board_setup_nvram_access to board_init. board_init is * used for all other board specific instructions needed during * platform_init. * moved RTC to board.c files * moved VT/FB to board.c files * moved r/w4 ide to redwood.c * */ #include <linux/config.h> #include <linux/init.h> #include <linux/smp.h> #include <linux/threads.h> #include <linux/spinlock.h> #include <linux/irq.h> #include <linux/reboot.h> #include <linux/param.h> #include <linux/string.h> #include <linux/blk.h> #include <linux/pci.h> #include <linux/rtc.h> #include <linux/console.h> #include <linux/ide.h> #include <linux/serial_reg.h> #include <linux/seq_file.h> #include <asm/system.h> #include <asm/processor.h> #include <asm/machdep.h> #include <asm/page.h> #include <asm/kgdb.h> #include <asm/ibm4xx.h> #include <asm/time.h> #include <asm/todc.h> #include <asm/ppc4xx_pic.h> #include <asm/pci-bridge.h> #include <asm/bootinfo.h> /* Function Prototypes */ extern void abort(void); extern void ppc4xx_find_bridges(void); extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); extern int pckbd_getkeycode(unsigned int scancode); extern int pckbd_pretranslate(unsigned char scancode, char raw_mode); extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, char raw_mode); extern char pckbd_unexpected_up(unsigned char keycode); extern void pckbd_leds(unsigned char leds); extern void pckbd_init_hw(void); extern int nonpci_ide_default_irq(ide_ioreg_t base); extern void nonpci_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq); extern void ppc4xx_wdt_heartbeat(void); extern int wdt_enable; extern unsigned long wdt_period; /* Board specific functions */ extern void board_setup_arch(void); extern void board_io_mapping(void); extern void board_setup_irq(void); extern void board_init(void); /* Global Variables */ unsigned char __res[sizeof (bd_t)]; static void __init ppc4xx_setup_arch(void) { /* Setup PCI host bridges */ #ifdef CONFIG_PCI ppc4xx_find_bridges(); #endif #if defined(CONFIG_FB) conswitchp = &dummy_con; #endif board_setup_arch(); } /* * This routine pretty-prints the platform's internal CPU clock * frequencies into the buffer for usage in /proc/cpuinfo. */ static int ppc4xx_show_percpuinfo(struct seq_file *m, int i) { bd_t *bip = (bd_t *) __res; seq_printf(m, "clock\t\t: %ldMHz\n", (long) bip->bi_intfreq / 1000000); return 0; } /* * This routine pretty-prints the platform's internal bus clock * frequencies into the buffer for usage in /proc/cpuinfo. */ static int ppc4xx_show_cpuinfo(struct seq_file *m) { bd_t *bip = (bd_t *) __res; seq_printf(m, "machine\t\t: %s\n", PPC4xx_MACHINE_NAME); seq_printf(m, "plb bus clock\t: %ldMHz\n", (long) bip->bi_busfreq / 1000000); #ifdef CONFIG_PCI seq_printf(m, "pci bus clock\t: %dMHz\n", bip->bi_pci_busfreq / 1000000); #endif return 0; } /* * Return the virtual address representing the top of physical RAM. */ static unsigned long __init ppc4xx_find_end_of_memory(void) { bd_t *bip = (bd_t *) __res; return ((unsigned long) bip->bi_memsize); } static void __init m4xx_map_io(void) { io_block_mapping(PPC4xx_ONB_IO_VADDR, PPC4xx_ONB_IO_PADDR, PPC4xx_ONB_IO_SIZE, _PAGE_IO); #ifdef CONFIG_PCI io_block_mapping(PPC4xx_PCI_IO_VADDR, PPC4xx_PCI_IO_PADDR, PPC4xx_PCI_IO_SIZE, _PAGE_IO); io_block_mapping(PPC4xx_PCI_CFG_VADDR, PPC4xx_PCI_CFG_PADDR, PPC4xx_PCI_CFG_SIZE, _PAGE_IO); io_block_mapping(PPC4xx_PCI_LCFG_VADDR, PPC4xx_PCI_LCFG_PADDR, PPC4xx_PCI_LCFG_SIZE, _PAGE_IO); #endif board_io_mapping(); } static void __init ppc4xx_init_IRQ(void) { int i; ppc4xx_pic_init(); for (i = 0; i < NR_IRQS; i++) irq_desc[i].handler = ppc4xx_pic; /* give board specific code a chance to setup things */ board_setup_irq(); return; } static void ppc4xx_restart(char *cmd) { printk("%s\n", cmd); abort(); } static void ppc4xx_power_off(void) { printk("System Halted\n"); __cli(); while (1) ; } static void ppc4xx_halt(void) { printk("System Halted\n"); __cli(); while (1) ; } /* * This routine retrieves the internal processor frequency from the board * information structure, sets up the kernel timer decrementer based on * that value, enables the 4xx programmable interval timer (PIT) and sets * it up for auto-reload. */ static void __init ppc4xx_calibrate_decr(void) { unsigned int freq; bd_t *bip = (bd_t *) __res; #if defined(CONFIG_WALNUT) || defined(CONFIG_CEDER) /* Walnut boot rom sets DCR CHCR1 (aka CPC0_CR1) bit CETE to 1 */ mtdcr(DCRN_CHCR1, mfdcr(DCRN_CHCR1) & ~CHR1_CETE); #endif #ifdef CONFIG_REDWOOD_5 freq = bip->bi_tbfreq; #else freq = bip->bi_intfreq; #endif tb_ticks_per_jiffy = freq / HZ; tb_to_us = mulhwu_scale_factor(freq, 1000000); /* Set the time base to zero. ** At 200 Mhz, time base will rollover in ~2925 years. */ mtspr(SPRN_TBWL, 0); mtspr(SPRN_TBWU, 0); /* Clear any pending timer interrupts */ mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_PIS | TSR_FIS); mtspr(SPRN_TCR, TCR_PIE | TCR_ARE); /* Set the PIT reload value and just let it run. */ mtspr(SPRN_PIT, tb_ticks_per_jiffy); } #ifdef CONFIG_DEBUG_TEXT static void ppc4xx_progress(char *s, unsigned short hex) { printk("%s\n\r", s); } #endif /* * IDE stuff. * should be generic for every IDE PCI chipset */ #if defined(CONFIG_BLK_DEV_IDE) static int ppc4xx_ide_check_region(ide_ioreg_t from, unsigned int extent) { return check_region(from, extent); } static void ppc4xx_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) { request_region(from, extent, name); return; } static void ppc4xx_ide_release_region(ide_ioreg_t from, unsigned int extent) { release_region(from, extent); return; } #endif #if defined(CONFIG_BLK_DEV_IDEPCI) static void ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) { int i; for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; ++i) hw->io_ports[i] = data_port + i - IDE_DATA_OFFSET; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; } #endif TODC_ALLOC(); /* * Input(s): * r3 - Optional pointer to a board information structure. * r4 - Optional pointer to the physical starting address of the init RAM * disk. * r5 - Optional pointer to the physical ending address of the init RAM * disk. * r6 - Optional pointer to the physical starting address of any kernel * command-line parameters. * r7 - Optional pointer to the physical ending address of any kernel * command-line parameters. */ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); /* * If we were passed in a board information, copy it into the * residual data area. */ if (r3) { memcpy((void *) __res, (void *) (r3 + KERNELBASE), sizeof (bd_t)); } #if defined(CONFIG_BLK_DEV_INITRD) /* * If the init RAM disk has been configured in, and there's a valid * starting address for it, set it up. */ if (r4) { initrd_start = r4 + KERNELBASE; initrd_end = r5 + KERNELBASE; } #endif /* CONFIG_BLK_DEV_INITRD */ /* Copy the kernel command line arguments to a safe place. */ if (r6) { *(char *) (r7 + KERNELBASE) = 0; strcpy(cmd_line, (char *) (r6 + KERNELBASE)); } #if defined(CONFIG_PPC405_WDT) /* Look for wdt= option on command line */ if (strstr(cmd_line, "wdt=")) { int valid_wdt = 0; char *p, *q; for (q = cmd_line; (p = strstr(q, "wdt=")) != 0;) { q = p + 4; if (p > cmd_line && p[-1] != ' ') continue; wdt_period = simple_strtoul(q, &q, 0); valid_wdt = 1; ++q; } wdt_enable = valid_wdt; } #endif /* Initialize machine-dependency vectors */ ppc_md.setup_arch = ppc4xx_setup_arch; ppc_md.show_percpuinfo = ppc4xx_show_percpuinfo; ppc_md.show_cpuinfo = ppc4xx_show_cpuinfo; ppc_md.init_IRQ = ppc4xx_init_IRQ; ppc_md.restart = ppc4xx_restart; ppc_md.power_off = ppc4xx_power_off; ppc_md.halt = ppc4xx_halt; ppc_md.calibrate_decr = ppc4xx_calibrate_decr; #ifdef CONFIG_PPC405_WDT ppc_md.heartbeat = ppc4xx_wdt_heartbeat; #endif ppc_md.heartbeat_count = 0; ppc_md.find_end_of_memory = ppc4xx_find_end_of_memory; ppc_md.setup_io_mappings = m4xx_map_io; #ifdef CONFIG_DEBUG_TEXT ppc_md.progress = ppc4xx_progress; #endif #if defined(CONFIG_VT) && defined(CONFIG_PC_KEYBOARD) #if defined(CONFIG_REDWOOD_4) && defined(CONFIG_STB_KB) redwood_irkb_init(); #else ppc_md.kbd_setkeycode = pckbd_setkeycode; ppc_md.kbd_getkeycode = pckbd_getkeycode; ppc_md.kbd_translate = pckbd_translate; ppc_md.kbd_unexpected_up = pckbd_unexpected_up; ppc_md.kbd_leds = pckbd_leds; ppc_md.kbd_init_hw = pckbd_init_hw; #endif #endif /* ** m8xx_setup.c, prep_setup.c use ** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */ #if defined (CONFIG_IDE) ppc_ide_md.ide_request_region = ppc4xx_ide_request_region; ppc_ide_md.ide_release_region = ppc4xx_ide_release_region; ppc_ide_md.ide_check_region = ppc4xx_ide_check_region; #if defined(CONFIG_BLK_DEV_IDEPCI) ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports; #elif defined (CONFIG_DMA_NONPCI) /* ON board IDE */ ppc_ide_md.default_irq = nonpci_ide_default_irq; ppc_ide_md.ide_init_hwif = nonpci_ide_init_hwif_ports; #endif #endif board_init(); return; } --- apus_setup.c DELETED --- --- chrp_setup.c DELETED --- --- pmac_setup.c DELETED --- --- prep_setup.c DELETED --- |
From: James S. <jsi...@us...> - 2002-03-14 22:32:28
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/boot In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/ppc/boot Removed Files: Makefile Log Message: synced to 2.5.5 --- Makefile DELETED --- |
From: James S. <jsi...@us...> - 2002-03-14 22:32:27
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/ppc Modified Files: Config.help config.in Log Message: synced to 2.5.5 Index: Config.help =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/Config.help,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Config.help 27 Jan 2002 22:22:56 -0000 1.1 +++ Config.help 14 Mar 2002 22:32:22 -0000 1.2 @@ -260,55 +260,12 @@ you have use for it; the module is called binfmt_misc.o. If you don't know what to answer at this point, say Y. -CONFIG_VGA_CONSOLE - Saying Y here will allow you to use Linux in text mode through a - display that complies with the generic VGA standard. Virtually - everyone wants that. - - The program SVGATextMode can be used to utilize SVGA video cards to - their full potential in text mode. Download it from - <ftp://ibiblio.org/pub/Linux/utils/console/>. - - Say Y. - CONFIG_IRQ_ALL_CPUS This option gives the kernel permission to distribute IRQs across multiple CPUs. Saying N here will route all IRQs to the first CPU. Generally SMP PowerMacs can answer Y. SMP IBM CHRP boxes or Power3 boxes should say N for now. -CONFIG_FB - The frame buffer device provides an abstraction for the graphics - hardware. It represents the frame buffer of some video hardware and - allows application software to access the graphics hardware through - a well-defined interface, so the software doesn't need to know - anything about the low-level (hardware register) stuff. - - Frame buffer devices work identically across the different - architectures supported by Linux and make the implementation of - application programs easier and more portable; at this point, an X - server exists which uses the frame buffer device exclusively. - On several non-X86 architectures, the frame buffer device is the - only way to use the graphics hardware. - - The device is accessed through special device nodes, usually located - in the /dev directory, i.e. /dev/fb*. - - You need an utility program called fbset to make full use of frame - buffer devices. Please read <file:Documentation/fb/framebuffer.txt> - and the Framebuffer-HOWTO at - <http://www.tahallah.demon.co.uk/programming/prog.html> for more - information. - - Say Y here and to the driver for your graphics board below if you - are compiling a kernel for a non-x86 architecture. - - If you are compiling for the x86 architecture, you can say Y if you - want to play with it, but it is not essential. Please note that - running graphical applications that directly touch the hardware - (e.g. an accelerated X server) and that are not frame buffer - device-aware may cause unexpected results. If unsure, say N. - CONFIG_SCSI If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or any other SCSI device under Linux, say Y and make sure that you know @@ -422,16 +379,6 @@ also includes a MESH II SCSI controller, DBDMA controller, VIA chip, OpenPIC controller and two RS422/Geoports.) -CONFIG_INPUT_ADBHID - Say Y here if you want to have ADB (Apple Desktop Bus) HID devices - such as keyboards, mice, joysticks, trackpads or graphic tablets - handled by the input layer. If you say Y here, make sure to say Y to - the corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV), - "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface - support" (CONFIG_INPUT_EVDEV) as well. - - If unsure, say Y. - CONFIG_SERIAL_CONSOLE If you say Y here, it will be possible to use a serial port as the system console (the system console is the device which receives all @@ -496,31 +443,6 @@ keys are documented in <file:Documentation/sysrq.txt>. Don't say Y unless you really know what this hack does. -CONFIG_ISDN - ISDN ("Integrated Services Digital Networks", called RNIS in France) - is a special type of fully digital telephone service; it's mostly - used to connect to your Internet service provider (with SLIP or - PPP). The main advantage is that the speed is higher than ordinary - modem/telephone connections, and that you can have voice - conversations while downloading stuff. It only works if your - computer is equipped with an ISDN card and both you and your service - provider purchased an ISDN line from the phone company. For - details, read <http://alumni.caltech.edu/~dank/isdn/> on the WWW. - - This driver allows you to use an ISDN-card for networking - connections and as dialin/out device. The isdn-tty's have a built - in AT-compatible modem emulator. Network devices support autodial, - channel-bundling, callback and caller-authentication without having - a daemon running. A reduced T.70 protocol is supported with tty's - suitable for German BTX. On D-Channel, the protocols EDSS1 - (Euro-ISDN) and 1TR6 (German style) are supported. See - <file:Documentation/isdn/README> for more information. - - If you want to compile the ISDN code as a module ( = code which can - be inserted in and removed from the running kernel whenever you - want), say M here and read <file:Documentation/modules.txt>. The - module will be called isdn.o. If unsure, say N. - CONFIG_PROC_HARDWARE Say Y here to support the /proc/hardware file, which gives you access to information about the machine you're running on, @@ -605,6 +527,17 @@ If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. +CONFIG_6xx + There are four types of PowerPC chips supported. The more common + types (601, 603, 604, 740, 750, 7400), the Motorola embedded + versions (821, 823, 850, 855, 860, 8260), the IBM embedded versions + (403 and 405) and the high end 64 bit Power processors (Power 3, + Power 4). Unless you are building a kernel for one of the embedded + processor systems, or a 64 bit IBM RS/6000, choose 6xx. Note that + the kernel runs in 32-bit mode even on 64-bit chips. Also note that + because the 82xx family has a 603e core, specific support for that + chipset is asked later on. + CONFIG_8260 The MPC8260 CPM (Communications Processor Module) is a typical embedded CPU made by Motorola. Selecting this option means that @@ -613,6 +546,17 @@ If in doubt, say N. +CONFIG_OAK + Select Oak if you have an IBM 403GCX "Oak" Evaluation Board. + + Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board. + + More information on these boards is available at: + <http://www.chips.ibm.com/products/powerpc/tools/evk_pn.html#GCX>. + +CONFIG_WALNUT + Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board. + CONFIG_PPC601_SYNC_FIX Some versions of the PPC601 (the first PowerPC chip) have bugs which mean that extra synchronization instructions are required near @@ -643,6 +587,16 @@ Select APUS if configuring for a PowerUP Amiga. More information is available at: <http://linux-apus.sourceforge.net/>. +CONFIG_GEMINI + Select Gemini if configuring for a Synergy Microsystems' Gemini + series Single Board Computer. More information is available at: + <http://www.synergymicro.com/PressRel/97_10_15.html>. + +CONFIG_APUS + Select APUS if configuring for a PowerUP Amiga. + More information is available at: + <http://linux-apus.sourceforge.net/>. + CONFIG_ALTIVEC This option enables kernel support for the Altivec extensions to the PowerPC processor. The kernel currently supports saving and restoring @@ -708,6 +662,178 @@ events; also, the PowerBook button device will be enabled so you can change the screen brightness. +CONFIG_RPXLITE + Single-board computers based around the PowerPC MPC8xx chips and + intended for embedded applications. The following types are + supported: + + RPX-Lite: + Embedded Planet RPX Lite. PC104 form-factor SBC based on the MPC823. + + RPX-Classic: + Embedded Planet RPX Classic Low-fat. Credit-card-size SBC based on + the MPC 860 + + BSE-IP: + Bright Star Engineering ip-Engine. + + TQM823L: + TQM850L: + TQM855L: + TQM860L: + MPC8xx based family of mini modules, half credit card size, + up to 64 MB of RAM, 8 MB Flash, (Fast) Ethernet, 2 x serial ports, + 2 x CAN bus interface, ... + Manufacturer: TQ Components, www.tq-group.de + Date of Release: October (?) 1999 + End of Life: not yet :-) + URL: + - module: <http://www.denx.de/PDF/TQM8xxLHWM201.pdf> + - starter kit: <http://www.denx.de/PDF/STK8xxLHWM201.pdf> + - images: <http://www.denx.de/embedded-ppc-en.html> + + FPS850L: + FingerPrint Sensor System (based on TQM850L) + Manufacturer: IKENDI AG, <http://www.ikendi.com/> + Date of Release: November 1999 + End of life: end 2000 ? + URL: see TQM850L + + SPD823TS: + MPC823 based board used in the "Tele Server" product + Manufacturer: Speech Design, <http://www.speech-design.de/> + Date of Release: Mid 2000 (?) + End of life: - + URL: <http://www.speech-design.de/> + select "English", then "Teleteam Solutions", then "TeleServer" + + IVMS8: + MPC860 based board used in the "Integrated Voice Mail System", + Small Version (8 voice channels) + Manufacturer: Speech Design, <http://www.speech-design.de/> + Date of Release: December 2000 (?) + End of life: - + URL: <http://www.speech-design.de/> + + IVML24: + MPC860 based board used in the "Integrated Voice Mail System", + Large Version (24 voice channels) + Manufacturer: Speech Design, <http://www.speech-design.de/> + Date of Release: March 2001 (?) + End of life: - + URL: <http://www.speech-design.de/> + + SM850: + Service Module (based on TQM850L) + Manufacturer: Dependable Computer Systems, <http://www.decomsys.com/> + Date of Release: end 2000 (?) + End of life: mid 2001 (?) + URL: <http://www.tz-mikroelektronik.de/ServiceModule/index.html> + + HERMES: + Hermes-Pro ISDN/LAN router with integrated 8 x hub + Manufacturer: Multidata Gesellschaft für Datentechnik und Informatik + <http://www.multidata.de/> + Date of Release: 2000 (?) + End of life: - + URL: <http://www.multidata.de/english/products/hpro.htm> + + IP860: + VMEBus IP (Industry Pack) carrier board with MPC860 + Manufacturer: MicroSys GmbH, <http://www.microsys.de/> + Date of Release: ? + End of life: - + URL: <http://www.microsys.de/html/ip860.html> + + PCU_E: + PCU = Peripheral Controller Unit, Extended + Manufacturer: Siemens AG, ICN (Information and Communication Networks) + <http://www.siemens.de/page/1,3771,224315-1-999_2_226207-0,00.html> + Date of Release: April 2001 + End of life: August 2001 + URL: n. a. + +CONFIG_RPXCLASSIC + The RPX-Classic is a single-board computer based on the Motorola + MPC860. It features 16MB of DRAM and a variable amount of flash, + I2C EEPROM, thermal monitoring, a PCMCIA slot, a DIP switch and two + LEDs. Variants with Ethernet ports exist. Say Y here to support it + directly. + +CONFIG_BSEIP + Say Y here to support the Bright Star Engineering ipEngine SBC. + This is a credit-card-sized device featuring a MPC823 processor, + 26MB DRAM, 4MB flash, Ethernet, a 16K-gate FPGA, USB, an LCD/video + controller, and two RS232 ports. + +CONFIG_TQM823L + Say Y here to support the TQM823L, one of an MPC8xx-based family of + mini SBCs (half credit-card size) from TQ Components first released + in late 1999. Technical references are at + <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and + <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at + <http://www.denx.de/embedded-ppc-en.html>. + +CONFIG_TQM850L + Say Y here to support the TQM850L, one of an MPC8xx-based family of + mini SBCs (half credit-card size) from TQ Components first released + in late 1999. Technical references are at + <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and + <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at + <http://www.denx.de/embedded-ppc-en.html>. + +CONFIG_TQM855L + Say Y here to support the TQM855L, one of an MPC8xx-based family of + mini SBCs (half credit-card size) from TQ Components first released + in late 1999. Technical references are at + <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and + <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at + <http://www.denx.de/embedded-ppc-en.html>. + +CONFIG_TQM860L + Say Y here to support the TQM860L, one of an MPC8xx-based family of + mini SBCs (half credit-card size) from TQ Components first released + in late 1999. Technical references are at + <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and + <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at + <http://www.denx.de/embedded-ppc-en.html>. + +CONFIG_TQM860 + Say Y here to support the TQM860, one of an MPC8xx-based family of + SBCs (credit-card size) from TQ Components first released in + mid-1999 and discontinued mid-2000. + +CONFIG_SM850 + Say Y here to support the Service Module 850 from Dependable + Computer Systems, an SBC based on the TQM850L module by TQ + Components. This board is no longer in production. The + manufacturer's website is at <http://www.decomsys.com/>. + +CONFIG_SPD823TS + Say Y here to support the Speech Design 823 Tele-Server from Speech + Design, released in 2000. The manufacturer's website is at + <http://www.speech-design.de/>. + +CONFIG_IVMS8 + Say Y here to support the Integrated Voice-Mail Small 8-channel SBC + from Speech Design, released March 2001. The manufacturer's website + is at <http://www.speech-design.de/>. + +CONFIG_IVML24 + Say Y here to support the Integrated Voice-Mail Large 24-channel SBC + from Speech Design, released March 2001. The manufacturer's website + is at <http://www.speech-design.de/>. + +CONFIG_MBX + MBX is a line of Motorola single-board computer based around the + MPC821 and MPC860 processors, and intended for embedded-controller + applications. Say Y here to support these boards directly. + +CONFIG_WINCEPT + The Wincept 100/110 is a Motorola single-board computer based on the + MPC821 PowerPC, introduced in 1998 and designed to be used in + thin-client machines. Say Y to support it directly. + CONFIG_EST8260 EST8260: The EST8260 is a single-board computer manufactured by Wind River @@ -740,15 +866,6 @@ End of life: - URL: <http://www.microsys.de/html/cu824.html> -CONFIG_MAC_EMUMOUSEBTN - This provides generic support for emulating the 2nd and 3rd mouse - button with keypresses. If you say Y here, the emulation is still - disabled by default. The emulation is controlled by these sysctl - entries: - /proc/sys/dev/mac_hid/mouse_button_emulation - /proc/sys/dev/mac_hid/mouse_button2_keycode - /proc/sys/dev/mac_hid/mouse_button3_keycode - CONFIG_PPC_RTC If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you @@ -808,3 +925,45 @@ Include in-kernel hooks for the xmon kernel monitor/debugger supported by the PPC port. +CONFIG_ADVANCED_OPTIONS + This option will enable prompting for a variety of advanced kernel + configuration options. These options can cause the kernel to not + work if they are set incorrectly, but can be used to optimize certain + aspects of kernel memory management. + + Unless you know what you are doing you *should not* enable this option. + +CONFIG_HIGHMEM_START_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the default PKMAP_BASE address which + is the location of the high memory pool. This can be useful in + optimizing virtual memory usage in a system. + +CONFIG_LOWMEM_SIZE_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the standard calculated value of + MAX_LOW_MEM. This can be useful in optimizing virtual memory usage + in a system. + +CONFIG_KERNEL_START_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the standard PAGE_OFFSET/KERNELBASE + value used by the kernel. This can be useful in controlling + amount of virtual address space available to the kernel. + +CONFIG_TASK_SIZE_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the standard TASK_SIZE value used + by the kernel. This can be useful in controlling amount of + virtual address space available to user tasks. + +CONFIG_BOOT_LOAD_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to change the initial load address of the zImage or + zImage.initrd file. This can be useful if you are on a board which has + a small ammount of memory. Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/config.in,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- config.in 13 Mar 2002 23:48:37 -0000 1.25 +++ config.in 14 Mar 2002 22:32:22 -0000 1.26 @@ -1,4 +1,4 @@ -# BK Id: SCCS/s.config.in 1.45 11/08/01 07:57:40 paulus +# BK Id: %F% %I% %G% %U% %#% # # For a description of the syntax of this configuration file, # see Documentation/kbuild/config-language.txt. @@ -20,20 +20,23 @@ "6xx/7xx/74xx/8260 CONFIG_6xx \ 4xx CONFIG_4xx \ POWER3 CONFIG_POWER3 \ - POWER4 CONFIG_POWER4 \ - 8xx CONFIG_8xx" 6xx + 8xx CONFIG_8xx \ + iSeries CONFIG_PPC_ISERIES" 6xx if [ "$CONFIG_6xx" = "y" ]; then bool 'MPC8260 CPM Support' CONFIG_8260 fi -if [ "$CONFIG_POWER3" = "y" -o "$CONFIG_POWER4" = "y" ]; then +if [ "$CONFIG_POWER3" = "y" ]; then define_bool CONFIG_PPC64BRIDGE y define_bool CONFIG_ALL_PPC y fi -if [ "$CONFIG_6xx" = "y" -o "$CONFIG_POWER3" = "y" -o \ - "$CONFIG_POWER4" = "y" ]; then +if [ "$CONFIG_PPC_ISERIES" = "y" ]; then + define_bool CONFIG_PPC64BRIDGE y +fi + +if [ "$CONFIG_6xx" = "y" -o "$CONFIG_POWER3" = "y" ]; then define_bool CONFIG_PPC_STD_MMU y else define_bool CONFIG_PPC_STD_MMU n @@ -41,17 +44,30 @@ if [ "$CONFIG_8260" = "y" ]; then define_bool CONFIG_SERIAL_CONSOLE y - bool 'Support for EST8260' CONFIG_EST8260 + choice 'Machine Type' \ + "EST8260 CONFIG_EST8260 \ + SBS8260 CONFIG_SBS8260 \ + RPXSUPER CONFIG_RPX6 \ + TQM8260 CONFIG_TQM8260 \ + Willow CONFIG_WILLOW" Willow fi if [ "$CONFIG_4xx" = "y" ]; then choice 'Machine Type' \ - "Oak CONFIG_OAK \ - Walnut CONFIG_WALNUT" Oak + "Ash CONFIG_ASH \ + Ceder CONFIG_CEDER \ + CPCI405 CONFIG_CPCI405 \ + EP405 CONFIG_EP405 \ + Oak CONFIG_OAK \ + Redwood-4 CONFIG_REDWOOD_4 \ + Redwood-5 CONFIG_REDWOOD_5 \ + Tivo CONFIG_TIVO \ + Walnut CONFIG_WALNUT" Walnut fi if [ "$CONFIG_8xx" = "y" ]; then define_bool CONFIG_SERIAL_CONSOLE y + define_bool CONFIG_NOT_COHERENT_CACHE y choice 'Machine Type' \ "RPX-Lite CONFIG_RPXLITE \ @@ -63,11 +79,16 @@ TQM855L CONFIG_TQM855L \ TQM860L CONFIG_TQM860L \ FPS850L CONFIG_FPS850L \ - TQM860 CONFIG_TQM860 \ SPD823TS CONFIG_SPD823TS \ IVMS8 CONFIG_IVMS8 \ IVML24 CONFIG_IVML24 \ SM850 CONFIG_SM850 \ + HERMES CONFIG_HERMES_PRO \ + IP860 CONFIG_IP860 \ + LWMON CONFIG_LWMON \ + PCU_E CONFIG_PCU_E \ + CCM CONFIG_CCM \ + LANTEC CONFIG_LANTEC \ MBX CONFIG_MBX \ WinCept CONFIG_WINCEPT" RPX-Lite @@ -84,8 +105,60 @@ if [ "$CONFIG_6xx" = "y" -a "$CONFIG_8260" = "n" ]; then choice 'Machine Type' \ "CHRP/PowerMac/PReP CONFIG_ALL_PPC \ - Amiga-APUS CONFIG_APUS \ - Synergy-Gemini CONFIG_GEMINI" CHRP/PowerMac/PReP + Amiga-APUS CONFIG_APUS \ + Cogent-Willow CONFIG_WILLOW \ + Force-PowerCore CONFIG_PCORE \ + Force-PowerPMC250 CONFIG_POWERPMC250 \ + Galileo-EV-64260-BP CONFIG_EV64260 \ + IBM-Spruce CONFIG_SPRUCE \ + MEN-F1 CONFIG_MENF1 \ + Motorola-LoPEC CONFIG_LOPEC \ + Motorola-MCPN765 CONFIG_MCPN765 \ + Motorola-MVME5100 CONFIG_MVME5100 \ + Motorola-PowerPlus CONFIG_PPLUS \ + Motorola-PrPMC750 CONFIG_PRPMC750 \ + Motorola-PrPMC800 CONFIG_PRPMC800 \ + Motorola-Sandpoint CONFIG_SANDPOINT \ + SBS-Adirondack CONFIG_ADIR \ + SBS-K2 CONFIG_K2 \ + Synergy-Gemini CONFIG_GEMINI \ + Zynx-ZX4500 CONFIG_ZX4500" CHRP/PowerMac/PReP +fi + +if [ "$CONFIG_PCORE" = "y" \ + -o "$CONFIG_POWERPMC250" = "y" ]; then + define_bool CONFIG_FORCE y +fi + +if [ "$CONFIG_FORCE" = "y" \ + -o "$CONFIG_MENF1" = "y" \ + -o "$CONFIG_SANDPOINT" = "y" \ + -o "$CONFIG_ZX4500" = "y" ]; then + bool 'Enable MPC10x store gathering' CONFIG_MPC10X_STORE_GATHERING +fi + +if [ "$CONFIG_EV64260" = "y" ]; then + define_bool CONFIG_GT64260 y + define_int CONFIG_SERIAL_CONSOLE_BAUD 115200 +fi + +if [ "$CONFIG_K2" = "y" ]; then + bool 'Enable CPC710 data gathering' CONFIG_CPC710_DATA_GATHERING +fi + +if [ "$CONFIG_MVME5100" = "y" ]; then + bool 'MVME5100 configured with an IPMC761' CONFIG_MVME5100_IPMC761_PRESENT +fi + +if [ "$CONFIG_SANDPOINT" = "y" ]; then + bool 'Sandpoint X3' CONFIG_SANDPOINT_X3 + if [ "$CONFIG_SANDPOINT_X3" = "y" ]; then + define_bool CONFIG_EPIC_SERIAL_MODE y + fi +fi + +if [ "$CONFIG_SPRUCE" = "y" ]; then + bool 'Spruce baud clock support' CONFIG_SPRUCE_BAUD_33M fi if [ "$CONFIG_PPC_STD_MMU" != "y" ]; then @@ -96,6 +169,7 @@ if [ "$CONFIG_SMP" = "y" ]; then bool ' Distribute interrupts on all CPUs by default' CONFIG_IRQ_ALL_CPUS fi +define_bool CONFIG_PREEMPT n if [ "$CONFIG_6xx" = "y" -a "$CONFIG_8260" = "n" ];then bool 'AltiVec Support' CONFIG_ALTIVEC @@ -110,14 +184,121 @@ bool 'Math emulation' CONFIG_MATH_EMULATION fi +if [ "$CONFIG_4xx" = "y" ]; then +# It's often necessary to know the specific 4xx processor type. +# Fortunately, it is impled (so far) from the board type, so we +# don't need to ask more redundant questions. + if [ "$CONFIG_ASH" = "y" ]; then + define_bool CONFIG_NP405H y + define_bool CONFIG_TREEBOOT y + define_bool CONFIG_IBM405_ERR77 y + define_bool CONFIG_IBM_OCP y + fi + if [ "$CONFIG_CEDER" = "y" ]; then + define_bool CONFIG_NP405L y + define_bool CONFIG_BIOS_FIXUP y + define_bool CONFIG_TREEBOOT y + define_bool CONFIG_IBM405_ERR77 y + define_bool CONFIG_IBM_OCP y + fi + if [ "$CONFIG_CPCI405" = "y" ]; then + define_bool CONFIG_405GP y + define_bool CONFIG_IBM405_ERR77 y + define_bool CONFIG_IBM_OCP y + fi + if [ "$CONFIG_EP405" = "y" ]; then + define_bool CONFIG_405GP y + define_bool CONFIG_BIOS_FIXUP y + define_bool CONFIG_EMBEDDEDBOOT y + define_bool CONFIG_IBM405_ERR77 y + define_bool CONFIG_IBM_OCP y + fi + if [ "$CONFIG_OAK" = "y" -o "$CONFIG_TIVO" = "y" ]; then + define_bool CONFIG_403GCX y + define_bool CONFIG_TREEBOOT y + fi + if [ "$CONFIG_REDWOOD_4" = "y" ]; then + define_bool CONFIG_STB03xxx y + define_bool CONFIG_TREEBOOT y + define_bool CONFIG_IBM405_ERR77 y + define_bool CONFIG_IBM_OCP y + fi + if [ "$CONFIG_REDWOOD_5" = "y" ]; then + define_bool CONFIG_STB03xxx y + define_bool CONFIG_TREEBOOT y + define_bool CONFIG_IBM405_ERR77 y + define_bool CONFIG_IBM_OCP y + fi + if [ "$CONFIG_WALNUT" = "y" ]; then + define_bool CONFIG_405GP y + define_bool CONFIG_BIOS_FIXUP y + define_bool CONFIG_TREEBOOT y + define_bool CONFIG_IBM405_ERR77 y + define_bool CONFIG_IBM_OCP y + fi + + bool 'Blue Logic DMA' CONFIG_405_DMA + dep_bool 'Power Management support (experimental)' CONFIG_PM $CONFIG_EXPERIMENTAL + + if [ "$CONFIG_4xx" = "y" ]; then + choice 'TTYS0 device and default console' \ + "UART0 CONFIG_UART0_TTYS0 \ + UART1 CONFIG_UART0_TTYS1" UART0 + fi + + define_bool CONFIG_IBM405_ERR51 y + define_bool CONFIG_NOT_COHERENT_CACHE y +fi + +if [ "$CONFIG_8xx" = "y" -o "$CONFIG_8260" = "y" ]; then + define_bool CONFIG_EMBEDDEDBOOT y +fi endmenu mainmenu_option next_comment comment 'General setup' -bool 'High memory support (experimental)' CONFIG_HIGHMEM +bool 'Prompt for advanced kernel configuration options' CONFIG_ADVANCED_OPTIONS +bool 'High memory support' CONFIG_HIGHMEM +if [ "$CONFIG_ADVANCED_OPTIONS" = "y" ]; then + if [ "$CONFIG_HIGHMEM" = "y" ]; then + bool " Set high memory pool address" CONFIG_HIGHMEM_START_BOOL + if [ "$CONFIG_HIGHMEM_START_BOOL" = "y" ]; then + hex " Virtual start address of high memory pool" CONFIG_HIGHMEM_START 0xfe000000 + fi + bool " Set maximum low memory" CONFIG_LOWMEM_SIZE_BOOL + if [ "$CONFIG_LOWMEM_SIZE_BOOL" = "y" ]; then + hex " Maximum low memory size (in bytes)" CONFIG_LOWMEM_SIZE 0x20000000 + fi + fi -define_bool CONFIG_ISA n + bool "Set custom kernel base address" CONFIG_KERNEL_START_BOOL + if [ "$CONFIG_KERNEL_START_BOOL" = "y" ]; then + hex " Virtual address of kernel base" CONFIG_KERNEL_START 0xc0000000 + fi + bool "Set custom user task size" CONFIG_TASK_SIZE_BOOL + if [ "$CONFIG_TASK_SIZE_BOOL" = "y" ]; then + hex " Size of user task space" CONFIG_TASK_SIZE 0x80000000 + fi + if [ "$CONFIG_8xx" = "y" ]; then + bool "Pinned Kernel TLBs (860 ONLY)" CONFIG_PIN_TLB + fi + if [ "$CONFIG_4xx" = "y" ]; then + bool "Pinned Kernel TLBs" CONFIG_PIN_TLB + fi + if [ "$CONFIG_ALL_PPC" = "n" ]; then + bool "Set the boot link/load address" CONFIG_BOOT_LOAD_BOOL + if [ "$CONFIG_BOOT_LOAD_BOOL" = "y" ]; then + hex " Link/load address for booting" CONFIG_BOOT_LOAD 0x00400000 + fi + fi +fi + +if [ "$CONFIG_ALL_PPC" = "y" ]; then + bool 'Support for ISA-bus hardware' CONFIG_ISA +else + define_bool CONFIG_ISA n +fi define_bool CONFIG_EISA n define_bool CONFIG_SBUS n @@ -125,7 +306,8 @@ define_bool CONFIG_MCA n if [ "$CONFIG_4xx" = "y" -o "$CONFIG_8260" = "y" ]; then - define_bool CONFIG_PCI n + bool "Enable PCI" CONFIG_PCI + bool 'PC PS/2 style Keyboard' CONFIG_PC_KEYBOARD else if [ "$CONFIG_8xx" = "y" ]; then bool 'QSpan PCI' CONFIG_PCI_QSPAN @@ -135,7 +317,12 @@ bool 'PCI for Permedia2' CONFIG_PCI_PERMEDIA define_bool CONFIG_PCI $CONFIG_PCI_PERMEDIA else - define_bool CONFIG_PCI y + if [ "$CONFIG_PPC_ISERIES" = "y" ]; then + bool "IBM iSeries Native I/O Support" CONFIG_PCI_ISERIES + define_bool CONFIG_PCI $CONFIG_PCI_ISERIES + else + define_bool CONFIG_PCI y + fi fi fi fi @@ -160,7 +347,7 @@ source drivers/parport/Config.in -if [ "$CONFIG_4xx" != "y" ]; then +if [ "$CONFIG_PPC_ISERIES" != "y" ]; then if [ "$CONFIG_APUS" != "y" ]; then tristate 'Support for /dev/rtc' CONFIG_PPC_RTC else @@ -175,7 +362,6 @@ if [ "$CONFIG_ALL_PPC" = "y" ]; then bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE bool 'Support for RTAS (RunTime Abstraction Services) in /proc' CONFIG_PPC_RTAS - bool 'Support for early boot text console (BootX or OpenFirmware only)' CONFIG_BOOTX_TEXT bool 'Support for PReP Residual Data' CONFIG_PREP_RESIDUAL fi @@ -248,8 +434,12 @@ fi endmenu +source drivers/message/fusion/Config.in + source drivers/ieee1394/Config.in +source drivers/message/i2o/Config.in + if [ "$CONFIG_NET" = "y" ]; then mainmenu_option next_comment comment 'Network device support' @@ -286,6 +476,32 @@ fi endmenu +if [ "$CONFIG_PPC_ISERIES" = "y" ]; then + mainmenu_option next_comment + comment 'iSeries device drivers' + tristate 'iSeries Virtual Console Support' CONFIG_VIOCONS + tristate 'iSeries Virtual I/O disk support' CONFIG_VIODASD + if [ "$CONFIG_VIODASD" = "y" -o "$CONFIG_VIODASD" = "m" ]; then + bool 'iSeries Virtual disk IDE emulation' CONFIG_VIODASD_IDE + fi + tristate 'iSeries Virtual I/O CD support' CONFIG_VIOCD + if [ "$CONFIG_VIOCD" = "y" -o "$CONFIG_VIOCD" = "m" ]; then + bool 'iSeries Virtual CD Aztech emulation' CONFIG_VIOCD_AZTECH + fi + tristate 'iSeries Virtual Tape Support' CONFIG_VIOTAPE + tristate 'iSeries Virtual Ethernet driver support' CONFIG_VETH + if [ "$CONFIG_VIOCONS" != "n" -o "$CONFIG_VIODASD" != "n" \ + -o "$CONFIG_VIOTAPE" != "n" -o "$CONFIG_VIOCD" != "n" ]; then + define_bool CONFIG_VIOPATH y + fi + endmenu +fi + +if [ "$CONFIG_VIOCD" = "y" ]; then + define_bool CONFIG_CD_NO_IDESCSI y + define_bool CONFIG_BLK_DEV_IDECD y +fi + source drivers/input/Config.in mainmenu_option next_comment @@ -297,6 +513,10 @@ bool 'Support for PMU based PowerMacs' CONFIG_ADB_PMU if [ "$CONFIG_ADB_PMU" = "y" ]; then bool ' Power management support for PowerBooks' CONFIG_PMAC_PBOOK + if [ "$CONFIG_PMAC_PBOOK" = "y" ]; then + define_bool CONFIG_PM y + tristate ' APM emulation' CONFIG_PMAC_APM_EMU + fi # made a separate option since backlight may end up beeing used # on non-powerbook machines (but only on PMU based ones AFAIK) bool ' Backlight control for LCD screens' CONFIG_PMAC_BACKLIGHT @@ -322,6 +542,9 @@ if [ "$CONFIG_INPUT" != "n" ]; then define_bool CONFIG_MAC_HID y fi + if [ "$CONFIG_ADB_CUDA" != "n" ]; then + bool 'Support for ANS LCD display' CONFIG_ANSLCD + fi fi endmenu @@ -335,8 +558,8 @@ comment 'Sound' tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/dmasound/Config.in - source drivers/sound/Config.in + source sound/oss/dmasound/Config.in + source sound/Config.in fi endmenu @@ -349,19 +572,57 @@ source arch/ppc/8260_io/Config.in fi -source drivers/usb/Config.in +if [ "$CONFIG_4xx" = "y"]; then + mainmenu_option next_comment + comment 'IBM 4xx options' + if [ "$CONFIG_STB03xxx" = "y" ]; then + bool 'STB IR Keyboard' CONFIG_STB_KB + bool 'SICC Serial port' CONFIG_SERIAL_SICC + if [ "$CONFIG_SERIAL_SICC" = "y" -a "$CONFIG_UART0_TTYS1" = "y" ]; then + define_bool CONFIG_UART1_DFLT_CONSOLE y + define_bool CONFIG_SERIAL_SICC_CONSOLE y + fi + fi + endmenu +fi + source drivers/video/Config.in +source drivers/usb/Config.in if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in fi +source lib/Config.in + mainmenu_option next_comment comment 'Kernel hacking' bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ bool 'Include kgdb kernel debugger' CONFIG_KGDB +if [ "$CONFIG_KGDB" = "y" ]; then + choice 'Serial Port' \ + "ttyS0 CONFIG_KGDB_TTYS0 \ + ttyS1 CONFIG_KGDB_TTYS1 \ + ttyS2 CONFIG_KGDB_TTYS2 \ + ttyS3 CONFIG_KGDB_TTYS3" ttyS1 +fi bool 'Include xmon kernel debugger' CONFIG_XMON -endmenu +bool 'Include BDI-2000 user context switcher' CONFIG_BDI_SWITCH +if [ "$CONFIG_KGDB" = "y" -o "$CONFIG_XMON" = "y" \ + -o "$CONFIG_BDI_SWITCH" = "y" ]; then + bool 'Add any additional compile options' CONFIG_MORE_COMPILE_OPTIONS + if [ "$CONFIG_MORE_COMPILE_OPTIONS" = "y" ]; then + string 'Additional compile arguments' CONFIG_COMPILE_OPTIONS "-g -ggdb" + fi +fi -source lib/Config.in +if [ "$CONFIG_ALL_PPC" = "y" ]; then + bool 'Support for early boot text console (BootX or OpenFirmware only)' CONFIG_BOOTX_TEXT +fi +if [ "$CONFIG_MCPN765" = "y" -o "$CONFIG_SANDPOINT" = "y" \ + -o "$CONFIG_ZX4500" = "y" -o "$CONFIG_PRPMC800" = "y" \ + -o "$CONFIG_4xx" = "y" -o "$CONFIG_GT64260" = "y" ]; then + bool 'Support for early boot texts over serial port' CONFIG_SERIAL_TEXT_DEBUG +fi +endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:27
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/parisc In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/parisc Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/parisc/config.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- config.in 13 Mar 2002 23:48:37 -0000 1.5 +++ config.in 14 Mar 2002 22:32:22 -0000 1.6 @@ -171,7 +171,7 @@ comment 'Sound Drivers' tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/Config.in + source sound/Config.in fi endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:26
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/mips64 In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/mips64 Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/mips64/config.in,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- config.in 13 Mar 2002 23:48:37 -0000 1.18 +++ config.in 14 Mar 2002 22:32:22 -0000 1.19 @@ -219,7 +219,7 @@ tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/Config.in + source sound/Config.in fi endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:26
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/mips In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/mips Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/mips/config.in,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- config.in 13 Mar 2002 23:48:37 -0000 1.17 +++ config.in 14 Mar 2002 22:32:22 -0000 1.18 @@ -443,7 +443,7 @@ tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/Config.in + source sound/Config.in fi endmenu fi |
From: James S. <jsi...@us...> - 2002-03-14 22:32:26
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ia64 In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/ia64 Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ia64/config.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- config.in 13 Mar 2002 23:48:36 -0000 1.19 +++ config.in 14 Mar 2002 22:32:22 -0000 1.20 @@ -200,7 +200,7 @@ tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/Config.in + source sound/Config.in fi endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:25
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/m68k In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/m68k Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/m68k/config.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- config.in 13 Mar 2002 23:48:36 -0000 1.14 +++ config.in 14 Mar 2002 22:32:22 -0000 1.15 @@ -484,7 +484,7 @@ tristate 'Sound support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/dmasound/Config.in + source sound/oss/dmasound/Config.in fi endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:25
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/mm In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/i386/mm Modified Files: fault.c Log Message: synced to 2.5.5 Index: fault.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/mm/fault.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- fault.c 24 Jan 2002 18:48:57 -0000 1.8 +++ fault.c 14 Mar 2002 22:32:21 -0000 1.9 @@ -124,12 +124,6 @@ } } -void do_BUG(const char *file, int line) -{ - bust_spinlocks(1); - printk("kernel BUG at %s:%d!\n", file, line); -} - asmlinkage void do_invalid_op(struct pt_regs *, unsigned long); extern unsigned long idt; @@ -324,12 +318,20 @@ asm("movl %%cr3,%0":"=r" (page)); page = ((unsigned long *) __va(page))[address >> 22]; printk(KERN_ALERT "*pde = %08lx\n", page); + /* + * We must not directly access the pte in the highpte + * case, the page table might be allocated in highmem. + * And lets rather not kmap-atomic the pte, just in case + * it's allocated already. + */ +#ifndef CONFIG_HIGHPTE if (page & 1) { page &= PAGE_MASK; address &= 0x003ff000; page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; printk(KERN_ALERT "*pte = %08lx\n", page); } +#endif die("Oops", regs, error_code); bust_spinlocks(0); do_exit(SIGKILL); @@ -399,7 +401,7 @@ goto no_context; set_pmd(pmd, *pmd_k); - pte_k = pte_offset(pmd_k, address); + pte_k = pte_offset_kernel(pmd_k, address); if (!pte_present(*pte_k)) goto no_context; return; |
From: James S. <jsi...@us...> - 2002-03-14 22:32:25
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386 In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/i386 Modified Files: config.in Log Message: synced to 2.5.5 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/config.in,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- config.in 14 Mar 2002 20:02:06 -0000 1.34 +++ config.in 14 Mar 2002 22:32:21 -0000 1.35 @@ -153,16 +153,27 @@ tristate '/dev/cpu/*/cpuid - CPU information support' CONFIG_X86_CPUID choice 'High Memory Support' \ - "off CONFIG_NOHIGHMEM \ - 4GB CONFIG_HIGHMEM4G \ - 64GB CONFIG_HIGHMEM64G" off + "off CONFIG_NOHIGHMEM \ + 4GB CONFIG_HIGHMEM4G \ + 4GB-highpte CONFIG_HIGHMEM4G_HIGHPTE \ + 64GB CONFIG_HIGHMEM64G \ + 64GB-highpte CONFIG_HIGHMEM64G_HIGHPTE" off if [ "$CONFIG_HIGHMEM4G" = "y" ]; then define_bool CONFIG_HIGHMEM y fi +if [ "$CONFIG_HIGHMEM4G_HIGHPTE" = "y" ]; then + define_bool CONFIG_HIGHMEM y + define_bool CONFIG_HIGHPTE y +fi if [ "$CONFIG_HIGHMEM64G" = "y" ]; then define_bool CONFIG_HIGHMEM y define_bool CONFIG_X86_PAE y fi +if [ "$CONFIG_HIGHMEM64G_HIGHPTE" = "y" ]; then + define_bool CONFIG_HIGHMEM y + define_bool CONFIG_HIGHPTE y + define_bool CONFIG_X86_PAE y +fi bool 'Math emulation' CONFIG_MATH_EMULATION bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR @@ -370,7 +381,7 @@ tristate 'Sound card support' CONFIG_SOUND if [ "$CONFIG_SOUND" != "n" ]; then - source drivers/sound/Config.in + source sound/Config.in fi endmenu @@ -387,12 +398,13 @@ bool 'Kernel debugging' CONFIG_DEBUG_KERNEL if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then - bool ' Debug high memory support' CONFIG_DEBUG_HIGHMEM bool ' Debug memory allocations' CONFIG_DEBUG_SLAB bool ' Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT bool ' Magic SysRq key' CONFIG_MAGIC_SYSRQ bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK - bool ' Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE + if [ "$CONFIG_HIGHMEM" = "y" ]; then + bool ' Highmem debugging' CONFIG_DEBUG_HIGHMEM + fi fi endmenu |
From: James S. <jsi...@us...> - 2002-03-14 22:32:25
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel In directory usw-pr-cvs1:/tmp/cvs-serv14110/linux/arch/i386/kernel Modified Files: setup.c Log Message: synced to 2.5.5 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel/setup.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- setup.c 14 Mar 2002 20:02:06 -0000 1.35 +++ setup.c 14 Mar 2002 22:32:21 -0000 1.36 @@ -138,6 +138,9 @@ /* For PCI or other memory-mapped resources */ unsigned long pci_mem_start = 0x10000000; +/* user-defined highmem size */ +static unsigned int highmem_pages = -1; + /* * Setup options */ @@ -635,8 +638,15 @@ } } /* acpismp=force forces parsing and use of the ACPI SMP table */ - if (c == ' ' && !memcmp(from, "acpismp=force", 13)) + if (c == ' ' && !memcmp(from, "acpismp=force", 13)) enable_acpi_smp_table = 1; + /* + * highmem=size forces highmem to be exactly 'size' bytes. + * This works even on boxes that have no highmem otherwise. + * This also works to reduce highmem size on bigger boxes. + */ + if (c == ' ' && !memcmp(from, "highmem=", 8)) + highmem_pages = memparse(from+8, &from) >> PAGE_SHIFT; c = *(from++); if (!c) @@ -733,6 +743,14 @@ */ max_low_pfn = max_pfn; if (max_low_pfn > MAXMEM_PFN) { + if (highmem_pages == -1) + highmem_pages = max_pfn - MAXMEM_PFN; + if (highmem_pages + MAXMEM_PFN < max_pfn) + max_pfn = MAXMEM_PFN + highmem_pages; + if (highmem_pages + MAXMEM_PFN > max_pfn) { + printk("only %luMB highmem pages available, ignoring highmem size of %uMB.\n", pages_to_mb(max_pfn - MAXMEM_PFN), pages_to_mb(highmem_pages)); + highmem_pages = 0; + } max_low_pfn = MAXMEM_PFN; #ifndef CONFIG_HIGHMEM /* Maximum memory usable is what is directly addressable */ @@ -752,16 +770,37 @@ } #endif /* !CONFIG_X86_PAE */ #endif /* !CONFIG_HIGHMEM */ + } else { + if (highmem_pages == -1) + highmem_pages = 0; +#if CONFIG_HIGHMEM + if (highmem_pages >= max_pfn) { + printk(KERN_ERR "highmem size specified (%uMB) is bigger than pages available (%luMB)!.\n", pages_to_mb(highmem_pages), pages_to_mb(max_pfn)); + highmem_pages = 0; + } + if (highmem_pages) { + if (max_low_pfn-highmem_pages < 64*1024*1024/PAGE_SIZE){ + printk(KERN_ERR "highmem size %uMB results in smaller than 64MB lowmem, ignoring it.\n", pages_to_mb(highmem_pages)); + highmem_pages = 0; + } + max_low_pfn -= highmem_pages; + } +#else + if (highmem_pages) + printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n"); +#endif } #ifdef CONFIG_HIGHMEM highstart_pfn = highend_pfn = max_pfn; - if (max_pfn > MAXMEM_PFN) { - highstart_pfn = MAXMEM_PFN; - printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", - pages_to_mb(highend_pfn - highstart_pfn)); + if (max_pfn > max_low_pfn) { + highstart_pfn = max_low_pfn; } + printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", + pages_to_mb(highend_pfn - highstart_pfn)); #endif + printk(KERN_NOTICE "%ldMB LOWMEM available.\n", + pages_to_mb(max_low_pfn)); /* * Initialize the boot-time allocator (with low memory only): */ |